@trudb/tru-common-lib 0.3.0 → 0.3.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, defer, from, of, Subject, Observable,
|
|
8
|
+
import { BehaviorSubject, merge, defer, from, of, Subject, Observable, fromEvent, Subscription, interval, skip, forkJoin, first, finalize, throwError } from 'rxjs';
|
|
9
9
|
import * as _ from 'underscore';
|
|
10
10
|
import ___default from 'underscore';
|
|
11
11
|
import * as i1$2 from '@angular/common/http';
|
|
@@ -1010,7 +1010,11 @@ class TruPasswordDialog {
|
|
|
1010
1010
|
message = null;
|
|
1011
1011
|
showPassword = false;
|
|
1012
1012
|
passwordScore = null;
|
|
1013
|
+
passwordWarning = null;
|
|
1014
|
+
passwordSuggestions = [];
|
|
1013
1015
|
passwordStrengthLevels = [0, 1, 2, 3, 4];
|
|
1016
|
+
passwordStrengthLabels = ['Very weak', 'Weak', 'Fair', 'Strong', 'Very strong'];
|
|
1017
|
+
minimumPasswordScore = 2;
|
|
1014
1018
|
errorMsg = null;
|
|
1015
1019
|
busy = false;
|
|
1016
1020
|
baseUrl = '';
|
|
@@ -1026,28 +1030,28 @@ class TruPasswordDialog {
|
|
|
1026
1030
|
onShowPasswordClicked = () => {
|
|
1027
1031
|
this.showPassword = this.showPasswordControl.value;
|
|
1028
1032
|
};
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1048
|
-
return canSubmit;
|
|
1049
|
-
};
|
|
1033
|
+
get enablePasswordStrength() {
|
|
1034
|
+
return this.appEnvironment.enablePasswordStrength;
|
|
1035
|
+
}
|
|
1036
|
+
get validationMessage() {
|
|
1037
|
+
if (!this.admin && !this.currentPasswordControl.value)
|
|
1038
|
+
return 'Enter your current password.';
|
|
1039
|
+
if (!this.newPasswordControl.value)
|
|
1040
|
+
return 'Enter a new password.';
|
|
1041
|
+
if (!this.confirmNewPasswordControl.value)
|
|
1042
|
+
return 'Confirm your new password.';
|
|
1043
|
+
if (this.newPasswordControl.value !== this.confirmNewPasswordControl.value)
|
|
1044
|
+
return 'The new passwords do not match.';
|
|
1045
|
+
if (this.enablePasswordStrength &&
|
|
1046
|
+
(this.passwordScore === null || this.passwordScore < this.minimumPasswordScore))
|
|
1047
|
+
return `Choose a password rated ${this.passwordStrengthLabels[this.minimumPasswordScore]} or stronger.`;
|
|
1048
|
+
return null;
|
|
1049
|
+
}
|
|
1050
|
+
canSubmit = () => !this.busy && this.validationMessage === null;
|
|
1050
1051
|
onConfirm = () => {
|
|
1052
|
+
if (!this.canSubmit())
|
|
1053
|
+
return;
|
|
1054
|
+
this.errorMsg = null;
|
|
1051
1055
|
let passwordChangeRequest = new TruPasswordChangeRequest();
|
|
1052
1056
|
passwordChangeRequest.currentPassword = this.currentPasswordControl.value;
|
|
1053
1057
|
passwordChangeRequest.newPassword = this.newPasswordControl.value;
|
|
@@ -1067,7 +1071,9 @@ class TruPasswordDialog {
|
|
|
1067
1071
|
this.dialogRef.close(true);
|
|
1068
1072
|
}, (ex) => {
|
|
1069
1073
|
this.busy = false;
|
|
1070
|
-
this.errorMsg = ex.error
|
|
1074
|
+
this.errorMsg = typeof ex.error === 'string' && ex.error
|
|
1075
|
+
? ex.error
|
|
1076
|
+
: 'Unable to update the password. Please try again.';
|
|
1071
1077
|
});
|
|
1072
1078
|
}
|
|
1073
1079
|
};
|
|
@@ -1075,13 +1081,16 @@ class TruPasswordDialog {
|
|
|
1075
1081
|
this.dialogRef.close(false);
|
|
1076
1082
|
};
|
|
1077
1083
|
ngOnInit() {
|
|
1078
|
-
this.subs.push(this.currentPasswordControl.valueChanges.subscribe(() => {
|
|
1084
|
+
this.subs.push(merge(this.currentPasswordControl.valueChanges, this.newPasswordControl.valueChanges, this.confirmNewPasswordControl.valueChanges).subscribe(() => {
|
|
1079
1085
|
this.errorMsg = null;
|
|
1080
1086
|
}));
|
|
1081
1087
|
this.subs.push(this.newPasswordControl.valueChanges.subscribe((password) => {
|
|
1082
|
-
|
|
1083
|
-
? passwordStrengthEstimator.check(password)
|
|
1088
|
+
const result = password
|
|
1089
|
+
? passwordStrengthEstimator.check(password)
|
|
1084
1090
|
: null;
|
|
1091
|
+
this.passwordScore = result?.score ?? null;
|
|
1092
|
+
this.passwordWarning = result?.feedback.warning ?? null;
|
|
1093
|
+
this.passwordSuggestions = result?.feedback.suggestions ?? [];
|
|
1085
1094
|
}));
|
|
1086
1095
|
this.userRef = this.data.userRef;
|
|
1087
1096
|
this.username = this.data.username;
|
|
@@ -1093,7 +1102,7 @@ class TruPasswordDialog {
|
|
|
1093
1102
|
this.subs.forEach((s) => s.unsubscribe());
|
|
1094
1103
|
}
|
|
1095
1104
|
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 });
|
|
1096
|
-
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
|
|
1105
|
+
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 @if (enablePasswordStrength) {\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]}}.\r\n {{passwordScore >= minimumPasswordScore ? 'Minimum strength met.' : 'Minimum required: ' + passwordStrengthLabels[minimumPasswordScore] + '.'}}</p>\r\n } @else {\r\n <p>Minimum strength: {{passwordStrengthLabels[minimumPasswordScore]}}. Use a longer password or several unrelated words.</p>\r\n }\r\n <p *ngIf=\"passwordWarning\">{{passwordWarning}}</p>\r\n @for (suggestion of passwordSuggestions; track suggestion) {\r\n <p>{{suggestion}}</p>\r\n }\r\n </div>\r\n }\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 });
|
|
1097
1106
|
}
|
|
1098
1107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruPasswordDialog, decorators: [{
|
|
1099
1108
|
type: Component,
|
|
@@ -1102,7 +1111,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
1102
1111
|
FormsModule,
|
|
1103
1112
|
ReactiveFormsModule,
|
|
1104
1113
|
MaterialModule,
|
|
1105
|
-
], 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
|
|
1114
|
+
], 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 @if (enablePasswordStrength) {\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]}}.\r\n {{passwordScore >= minimumPasswordScore ? 'Minimum strength met.' : 'Minimum required: ' + passwordStrengthLabels[minimumPasswordScore] + '.'}}</p>\r\n } @else {\r\n <p>Minimum strength: {{passwordStrengthLabels[minimumPasswordScore]}}. Use a longer password or several unrelated words.</p>\r\n }\r\n <p *ngIf=\"passwordWarning\">{{passwordWarning}}</p>\r\n @for (suggestion of passwordSuggestions; track suggestion) {\r\n <p>{{suggestion}}</p>\r\n }\r\n </div>\r\n }\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"] }]
|
|
1106
1115
|
}], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: i1$2.HttpClient }, { type: TruAppEnvironment }, { type: TruUiNotification }, { type: undefined, decorators: [{
|
|
1107
1116
|
type: Inject,
|
|
1108
1117
|
args: [MAT_DIALOG_DATA]
|
|
@@ -7487,15 +7496,10 @@ class TruDataGridClipboard {
|
|
|
7487
7496
|
formatter;
|
|
7488
7497
|
uiNotification;
|
|
7489
7498
|
modelPropertyLookup;
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
copiedCellEntity = null;
|
|
7495
|
-
copiedCellParams = null;
|
|
7496
|
-
copiedCellText = null;
|
|
7497
|
-
copiedRows = [];
|
|
7498
|
-
copiedRowsText = null;
|
|
7499
|
+
copiedData = null;
|
|
7500
|
+
pendingCopy = null;
|
|
7501
|
+
copySequence = 0;
|
|
7502
|
+
animatedElements = [];
|
|
7499
7503
|
gridElement = null;
|
|
7500
7504
|
constructor(util, formatter, uiNotification, modelPropertyLookup) {
|
|
7501
7505
|
this.util = util;
|
|
@@ -7512,10 +7516,67 @@ class TruDataGridClipboard {
|
|
|
7512
7516
|
return this.formatter.excelFormula(propertyConfig.formatter(controlConfig));
|
|
7513
7517
|
};
|
|
7514
7518
|
normalizeClipboardText = (value) => String(value ?? '').replace(/\r\n/g, '\n').replace(/\r/g, '\n').replace(/\n$/, '');
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
+
writeClipboard = (text, data, event) => {
|
|
7520
|
+
const sequence = ++this.copySequence;
|
|
7521
|
+
this.copiedData = null;
|
|
7522
|
+
this.removeBorderAnimation();
|
|
7523
|
+
const selector = data.kind === 'rows' ? '.ag-row-selected' : '.ag-cell-focus';
|
|
7524
|
+
const elements = Array.from(this.gridElement?.querySelectorAll('.ag-center-cols-container ' + selector) ?? []);
|
|
7525
|
+
const copied = () => {
|
|
7526
|
+
// An earlier asynchronous write must not replace a newer row or cell copy.
|
|
7527
|
+
if (sequence !== this.copySequence)
|
|
7528
|
+
return false;
|
|
7529
|
+
this.copiedData = data;
|
|
7530
|
+
this.animatedElements = elements;
|
|
7531
|
+
elements.forEach(element => element.classList.add('animated-border'));
|
|
7532
|
+
return true;
|
|
7533
|
+
};
|
|
7534
|
+
const failed = () => {
|
|
7535
|
+
if (sequence === this.copySequence)
|
|
7536
|
+
this.uiNotification.error('Unable to copy data to the system clipboard. Please copy the selection again.');
|
|
7537
|
+
return false;
|
|
7538
|
+
};
|
|
7539
|
+
try {
|
|
7540
|
+
if (event) {
|
|
7541
|
+
// Native copy must be completed during the event, before the browser copies its text selection.
|
|
7542
|
+
event.preventDefault();
|
|
7543
|
+
if (!event.clipboardData)
|
|
7544
|
+
throw new Error('Clipboard data is unavailable.');
|
|
7545
|
+
event.clipboardData.setData('text/plain', text);
|
|
7546
|
+
this.pendingCopy = null;
|
|
7547
|
+
return Promise.resolve(copied());
|
|
7548
|
+
}
|
|
7549
|
+
// Context-menu actions have no ClipboardEvent. Do not mark them copied until the write succeeds.
|
|
7550
|
+
this.pendingCopy = navigator.clipboard.writeText(text).then(copied, failed).finally(() => {
|
|
7551
|
+
if (sequence === this.copySequence)
|
|
7552
|
+
this.pendingCopy = null;
|
|
7553
|
+
});
|
|
7554
|
+
return this.pendingCopy;
|
|
7555
|
+
}
|
|
7556
|
+
catch {
|
|
7557
|
+
this.pendingCopy = null;
|
|
7558
|
+
return Promise.resolve(failed());
|
|
7559
|
+
}
|
|
7560
|
+
};
|
|
7561
|
+
readClipboard = async (event) => {
|
|
7562
|
+
const pendingCopy = this.pendingCopy;
|
|
7563
|
+
const eventText = event?.clipboardData?.getData('text/plain');
|
|
7564
|
+
if (pendingCopy && !await pendingCopy)
|
|
7565
|
+
return null;
|
|
7566
|
+
const data = this.copiedData;
|
|
7567
|
+
try {
|
|
7568
|
+
// A paste event raised during a context-menu copy can contain the old clipboard contents.
|
|
7569
|
+
const text = !pendingCopy && eventText !== undefined ? eventText : await navigator.clipboard.readText();
|
|
7570
|
+
if (data !== this.copiedData) {
|
|
7571
|
+
this.uiNotification.error('The copied selection changed while pasting. Please paste again.');
|
|
7572
|
+
return null;
|
|
7573
|
+
}
|
|
7574
|
+
return { text: this.normalizeClipboardText(text), data };
|
|
7575
|
+
}
|
|
7576
|
+
catch {
|
|
7577
|
+
this.uiNotification.error('Unable to read data from the system clipboard.');
|
|
7578
|
+
return null;
|
|
7579
|
+
}
|
|
7519
7580
|
};
|
|
7520
7581
|
parseExternalCellValue = (clipboardText, controlConfig) => {
|
|
7521
7582
|
const value = this.normalizeClipboardText(clipboardText);
|
|
@@ -7552,30 +7613,8 @@ class TruDataGridClipboard {
|
|
|
7552
7613
|
return value;
|
|
7553
7614
|
};
|
|
7554
7615
|
removeBorderAnimation = () => {
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
elementsWithAnimatedBorders.forEach((elementsWithAnimatedBorder) => {
|
|
7558
|
-
elementsWithAnimatedBorder.classList.remove('animated-border');
|
|
7559
|
-
});
|
|
7560
|
-
};
|
|
7561
|
-
addCellBorderAnimation = () => {
|
|
7562
|
-
let rowContainerElement = this.gridElement?.querySelector('.ag-center-cols-container');
|
|
7563
|
-
let selectedCellElement = rowContainerElement?.querySelectorAll('.ag-cell-focus')[0];
|
|
7564
|
-
if (selectedCellElement)
|
|
7565
|
-
selectedCellElement.classList.add('animated-border');
|
|
7566
|
-
};
|
|
7567
|
-
addRowBorderAnimation = () => {
|
|
7568
|
-
var elementsWithAnimatedBorders = this.gridElement?.querySelectorAll('.animated-border');
|
|
7569
|
-
if (elementsWithAnimatedBorders && elementsWithAnimatedBorders.length)
|
|
7570
|
-
elementsWithAnimatedBorders.forEach((elementsWithAnimatedBorder) => {
|
|
7571
|
-
elementsWithAnimatedBorder.classList.remove('animated-border');
|
|
7572
|
-
});
|
|
7573
|
-
let rowContainerElement = this.gridElement?.querySelector('.ag-center-cols-container');
|
|
7574
|
-
let selectedRowElements = rowContainerElement?.querySelectorAll('.ag-row-selected');
|
|
7575
|
-
if (selectedRowElements && selectedRowElements.length)
|
|
7576
|
-
selectedRowElements.forEach((selectedRowElement) => {
|
|
7577
|
-
selectedRowElement.classList.add('animated-border');
|
|
7578
|
-
});
|
|
7616
|
+
this.animatedElements.forEach(element => element.classList.remove('animated-border'));
|
|
7617
|
+
this.animatedElements = [];
|
|
7579
7618
|
};
|
|
7580
7619
|
setGridElement(el) {
|
|
7581
7620
|
this.gridElement = el;
|
|
@@ -7583,53 +7622,43 @@ class TruDataGridClipboard {
|
|
|
7583
7622
|
clearAnimations() {
|
|
7584
7623
|
this.removeBorderAnimation();
|
|
7585
7624
|
}
|
|
7586
|
-
copyCell = async (params, tableName, columnName, copiedCellData, copiedCellEntity) => {
|
|
7587
|
-
|
|
7588
|
-
this.
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
await navigator.clipboard.writeText(params.value);
|
|
7598
|
-
}
|
|
7599
|
-
catch (err) {
|
|
7600
|
-
console.error('Failed to copy text: ', err);
|
|
7601
|
-
}
|
|
7602
|
-
};
|
|
7603
|
-
pasteCell = async (params, pastedCellData, pastedCell) => {
|
|
7625
|
+
copyCell = async (params, tableName, columnName, copiedCellData, copiedCellEntity, event) => {
|
|
7626
|
+
const text = String(params.value ?? '');
|
|
7627
|
+
await this.writeClipboard(text, {
|
|
7628
|
+
kind: 'cell',
|
|
7629
|
+
text: this.normalizeClipboardText(text),
|
|
7630
|
+
typeName: copiedCellData[columnName].property.typeName,
|
|
7631
|
+
value: copiedCellData[columnName].$,
|
|
7632
|
+
entity: copiedCellEntity
|
|
7633
|
+
}, event);
|
|
7634
|
+
};
|
|
7635
|
+
pasteCell = async (params, pastedCellData, pastedCell, event) => {
|
|
7604
7636
|
let colDef = params.colDef;
|
|
7605
7637
|
let columnName = colDef.field;
|
|
7606
|
-
|
|
7638
|
+
const editable = typeof colDef.editable === 'function'
|
|
7639
|
+
? colDef.editable({ ...params, colDef, column: params.column })
|
|
7640
|
+
: colDef.editable;
|
|
7641
|
+
if (!editable) {
|
|
7607
7642
|
this.uiNotification.error('Cannot paste into a non-editable column: ' + colDef.field);
|
|
7608
7643
|
return;
|
|
7609
7644
|
}
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
clipboardText = this.normalizeClipboardText(await this.readClipboardText());
|
|
7613
|
-
}
|
|
7614
|
-
catch (err) {
|
|
7615
|
-
this.uiNotification.error('Unable to read data from the system clipboard.');
|
|
7645
|
+
const clipboard = await this.readClipboard(event);
|
|
7646
|
+
if (!clipboard)
|
|
7616
7647
|
return;
|
|
7617
|
-
}
|
|
7618
7648
|
const pastedCellConfig = pastedCellData[columnName];
|
|
7619
|
-
const
|
|
7620
|
-
if (
|
|
7621
|
-
const
|
|
7622
|
-
const copiedCellDataTypeName = this.copiedCellData[copiedColumnName].property.typeName;
|
|
7649
|
+
const copied = clipboard.data;
|
|
7650
|
+
if (copied?.kind === 'cell' && clipboard.text === copied.text) {
|
|
7651
|
+
const copiedCellDataTypeName = copied.typeName;
|
|
7623
7652
|
const pastedCellDataTypeName = pastedCellConfig.property.typeName;
|
|
7624
7653
|
if (copiedCellDataTypeName !== pastedCellDataTypeName) {
|
|
7625
7654
|
this.uiNotification.error('Clipboard data type does not match the current cell data type: ' + copiedCellDataTypeName + ' vs ' + pastedCellDataTypeName);
|
|
7626
7655
|
return;
|
|
7627
7656
|
}
|
|
7628
|
-
pastedCellConfig.$ =
|
|
7657
|
+
pastedCellConfig.$ = copied.value;
|
|
7629
7658
|
}
|
|
7630
7659
|
else {
|
|
7631
7660
|
try {
|
|
7632
|
-
pastedCellConfig.$ = this.parseExternalCellValue(
|
|
7661
|
+
pastedCellConfig.$ = this.parseExternalCellValue(clipboard.text, pastedCellConfig);
|
|
7633
7662
|
}
|
|
7634
7663
|
catch (err) {
|
|
7635
7664
|
this.uiNotification.error(err.message);
|
|
@@ -7639,12 +7668,7 @@ class TruDataGridClipboard {
|
|
|
7639
7668
|
this.removeBorderAnimation();
|
|
7640
7669
|
params.api.refreshCells({ force: true });
|
|
7641
7670
|
};
|
|
7642
|
-
copyRow = async (tableName, columnDefs, copiedRows, includeHeaders = false) => {
|
|
7643
|
-
this.tableName = tableName;
|
|
7644
|
-
this.copiedRows = copiedRows;
|
|
7645
|
-
this.copiedRowsText = null;
|
|
7646
|
-
this.removeBorderAnimation();
|
|
7647
|
-
this.addRowBorderAnimation();
|
|
7671
|
+
copyRow = async (tableName, columnDefs, copiedRows, includeHeaders = false, event) => {
|
|
7648
7672
|
if (copiedRows.length) {
|
|
7649
7673
|
let multiRowString = '';
|
|
7650
7674
|
if (includeHeaders) {
|
|
@@ -7656,9 +7680,8 @@ class TruDataGridClipboard {
|
|
|
7656
7680
|
});
|
|
7657
7681
|
multiRowString += headerRow.join('\t') + '\n';
|
|
7658
7682
|
}
|
|
7659
|
-
|
|
7683
|
+
copiedRows.forEach((copiedRow) => {
|
|
7660
7684
|
let rowPropertyValues = [];
|
|
7661
|
-
let properties = copiedRow.$entity.entityType.getPropertyNames();
|
|
7662
7685
|
columnDefs
|
|
7663
7686
|
.forEach((columnDef) => {
|
|
7664
7687
|
let propertyName = columnDef.field;
|
|
@@ -7668,43 +7691,38 @@ class TruDataGridClipboard {
|
|
|
7668
7691
|
});
|
|
7669
7692
|
multiRowString += rowPropertyValues.join('\t') + '\n';
|
|
7670
7693
|
});
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
}
|
|
7694
|
+
await this.writeClipboard(multiRowString, {
|
|
7695
|
+
kind: 'rows',
|
|
7696
|
+
tableName,
|
|
7697
|
+
text: this.normalizeClipboardText(multiRowString),
|
|
7698
|
+
rows: copiedRows.slice()
|
|
7699
|
+
}, event);
|
|
7678
7700
|
}
|
|
7679
7701
|
};
|
|
7680
|
-
pasteRow = async (gridApi, config, selectedRows) => {
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
clipboardText = this.normalizeClipboardText(await this.readClipboardText());
|
|
7684
|
-
}
|
|
7685
|
-
catch (err) {
|
|
7686
|
-
this.uiNotification.error('Unable to read data from the system clipboard.');
|
|
7702
|
+
pasteRow = async (gridApi, config, selectedRows, event) => {
|
|
7703
|
+
const clipboard = await this.readClipboard(event);
|
|
7704
|
+
if (!clipboard)
|
|
7687
7705
|
return;
|
|
7688
|
-
|
|
7689
|
-
if (
|
|
7706
|
+
const copied = clipboard.data;
|
|
7707
|
+
if (copied?.kind !== 'rows' || clipboard.text !== copied.text) {
|
|
7690
7708
|
this.uiNotification.error('External row data cannot be pasted as an internal grid row copy. Paste into an individual cell instead.');
|
|
7691
7709
|
return;
|
|
7692
7710
|
}
|
|
7693
|
-
if (
|
|
7694
|
-
this.uiNotification.error('Clipboard data does not match the current table name: ' +
|
|
7711
|
+
if (copied.tableName !== config.tableName) {
|
|
7712
|
+
this.uiNotification.error('Clipboard data does not match the current table name: ' + copied.tableName + ' vs ' + config.tableName);
|
|
7695
7713
|
return;
|
|
7696
7714
|
}
|
|
7697
|
-
if (selectedRows
|
|
7698
|
-
this.uiNotification.error('Clipboard data does not match the number of selected rows: ' +
|
|
7715
|
+
if (!selectedRows || selectedRows.length !== copied.rows.length) {
|
|
7716
|
+
this.uiNotification.error('Clipboard data does not match the number of selected rows: ' + copied.rows.length + ' vs ' + (selectedRows?.length ?? 0));
|
|
7699
7717
|
return;
|
|
7700
7718
|
}
|
|
7701
|
-
if (
|
|
7702
|
-
|
|
7719
|
+
if (copied.rows.length) {
|
|
7720
|
+
copied.rows.slice().reverse().forEach((copiedRow, index) => {
|
|
7703
7721
|
let selectedRow = selectedRows[index];
|
|
7704
7722
|
let properties = copiedRow.$entity.entityType.getPropertyNames();
|
|
7705
7723
|
properties
|
|
7706
7724
|
.forEach((propertyName) => {
|
|
7707
|
-
let property = this.modelPropertyLookup.lookup.get(
|
|
7725
|
+
let property = this.modelPropertyLookup.lookup.get(copied.tableName + '.' + propertyName);
|
|
7708
7726
|
let excludedFromCloning = property ? property.excludeFromCloning : false;
|
|
7709
7727
|
if (typeof selectedRow.$entity.setProperty !== 'undefined' &&
|
|
7710
7728
|
!excludedFromCloning &&
|
|
@@ -7723,17 +7741,20 @@ class TruDataGridClipboard {
|
|
|
7723
7741
|
}
|
|
7724
7742
|
};
|
|
7725
7743
|
insertRowsAtTop = (dataContext, config, addEntity) => {
|
|
7726
|
-
|
|
7727
|
-
|
|
7744
|
+
const copied = this.copiedData;
|
|
7745
|
+
if (copied?.kind !== 'rows')
|
|
7746
|
+
return;
|
|
7747
|
+
if (copied.tableName !== config.tableName) {
|
|
7748
|
+
this.uiNotification.error('Clipboard data does not match the current table name: ' + copied.tableName + ' vs ' + config.tableName);
|
|
7728
7749
|
return;
|
|
7729
7750
|
}
|
|
7730
|
-
if (
|
|
7731
|
-
|
|
7751
|
+
if (copied.rows.length) {
|
|
7752
|
+
copied.rows.slice().reverse().forEach((row) => {
|
|
7732
7753
|
let newEntity = dataContext.entityAccess().add(config.resultConfig.entityType);
|
|
7733
7754
|
let properties = row.$entity.entityType.getPropertyNames();
|
|
7734
7755
|
properties
|
|
7735
7756
|
.filter((propertyName) => {
|
|
7736
|
-
let property = this.modelPropertyLookup.lookup.get(
|
|
7757
|
+
let property = this.modelPropertyLookup.lookup.get(copied.tableName + '.' + propertyName);
|
|
7737
7758
|
let excludedFromCloning = property ? property.excludeFromCloning : false;
|
|
7738
7759
|
return propertyName !== 'Ref' &&
|
|
7739
7760
|
!excludedFromCloning &&
|
|
@@ -7752,10 +7773,10 @@ class TruDataGridClipboard {
|
|
|
7752
7773
|
}
|
|
7753
7774
|
};
|
|
7754
7775
|
getCopiedRows = () => {
|
|
7755
|
-
return this.
|
|
7776
|
+
return this.copiedData?.kind === 'rows' ? this.copiedData.rows : [];
|
|
7756
7777
|
};
|
|
7757
7778
|
getCopiedCell = () => {
|
|
7758
|
-
return this.
|
|
7779
|
+
return this.copiedData?.kind === 'cell' ? this.copiedData.entity : null;
|
|
7759
7780
|
};
|
|
7760
7781
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDataGridClipboard, deps: [{ token: TruUtil }, { token: TruFormatter }, { token: TruUiNotification }, { token: TruModelPropertyLookup }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7761
7782
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDataGridClipboard, providedIn: 'root' });
|
|
@@ -7806,6 +7827,7 @@ class TruDataGridPkeyCellRenderer {
|
|
|
7806
7827
|
let columnDefs = this.params.api.getColumnDefs();
|
|
7807
7828
|
if (selectedRows.length) {
|
|
7808
7829
|
let copiedRowData = selectedRows;
|
|
7830
|
+
this.dataGridClipboard.setGridElement(this.params.eGridCell.closest('tru-data-grid'));
|
|
7809
7831
|
this.dataGridClipboard.copyRow(this.params.context.grid.config.tableName, columnDefs, copiedRowData);
|
|
7810
7832
|
}
|
|
7811
7833
|
};
|
|
@@ -7814,6 +7836,7 @@ class TruDataGridPkeyCellRenderer {
|
|
|
7814
7836
|
let columnDefs = this.params.api.getColumnDefs();
|
|
7815
7837
|
if (selectedRows.length) {
|
|
7816
7838
|
let copiedRowData = selectedRows;
|
|
7839
|
+
this.dataGridClipboard.setGridElement(this.params.eGridCell.closest('tru-data-grid'));
|
|
7817
7840
|
this.dataGridClipboard.copyRow(this.params.context.grid.config.tableName, columnDefs, copiedRowData, true);
|
|
7818
7841
|
}
|
|
7819
7842
|
};
|
|
@@ -9731,24 +9754,62 @@ class TruDataGrid {
|
|
|
9731
9754
|
key: event.code
|
|
9732
9755
|
});
|
|
9733
9756
|
}
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9757
|
+
};
|
|
9758
|
+
getClipboardCell = (event) => {
|
|
9759
|
+
const target = event.target;
|
|
9760
|
+
// Editors and filter inputs own their text-selection clipboard operations.
|
|
9761
|
+
if (event.defaultPrevented || !event.clipboardData || !this.api || this.api.getEditingCells().length ||
|
|
9762
|
+
!target?.closest('.ag-cell') || target.closest('ag-grid-angular') !== event.currentTarget ||
|
|
9763
|
+
target.closest('input, textarea, select') || target.isContentEditable)
|
|
9764
|
+
return null;
|
|
9765
|
+
const focused = this.api.getFocusedCell();
|
|
9766
|
+
if (!focused)
|
|
9767
|
+
return null;
|
|
9768
|
+
const node = focused.rowPinned === 'top' ? this.api.getPinnedTopRow(focused.rowIndex)
|
|
9769
|
+
: focused.rowPinned === 'bottom' ? this.api.getPinnedBottomRow(focused.rowIndex)
|
|
9770
|
+
: this.api.getDisplayedRowAtIndex(focused.rowIndex);
|
|
9771
|
+
if (!node?.data)
|
|
9772
|
+
return null;
|
|
9773
|
+
return {
|
|
9774
|
+
api: this.api,
|
|
9775
|
+
context: this.gridOptions.context,
|
|
9776
|
+
column: focused.column,
|
|
9777
|
+
colDef: focused.column.getColDef(),
|
|
9778
|
+
node,
|
|
9779
|
+
data: node.data,
|
|
9780
|
+
value: this.api.getCellValue({ rowNode: node, colKey: focused.column })
|
|
9781
|
+
};
|
|
9782
|
+
};
|
|
9783
|
+
// AG Grid's cellKeyDown notification is asynchronous; native clipboard events must be handled synchronously.
|
|
9784
|
+
onCopy = (event) => {
|
|
9785
|
+
const cell = this.getClipboardCell(event);
|
|
9786
|
+
if (!cell)
|
|
9787
|
+
return;
|
|
9788
|
+
if (cell.column.isPinned()) {
|
|
9789
|
+
const rows = this.api.getSelectedRows();
|
|
9790
|
+
if (!rows.length)
|
|
9791
|
+
return;
|
|
9792
|
+
this.dataGridClipboard.setGridElement(this.hostElement.nativeElement);
|
|
9793
|
+
event.stopPropagation();
|
|
9794
|
+
void this.dataGridClipboard.copyRow(this.config.tableName, this.api.getColumnDefs(), rows, false, event);
|
|
9746
9795
|
}
|
|
9747
|
-
else if (
|
|
9748
|
-
|
|
9749
|
-
|
|
9796
|
+
else if (cell.colDef.field && cell.data[cell.colDef.field]) {
|
|
9797
|
+
this.dataGridClipboard.setGridElement(this.hostElement.nativeElement);
|
|
9798
|
+
event.stopPropagation();
|
|
9799
|
+
void this.dataGridClipboard.copyCell(cell, this.config.tableName, cell.colDef.field, cell.data, cell.data.$entity, event);
|
|
9750
9800
|
}
|
|
9751
9801
|
};
|
|
9802
|
+
onPaste = (event) => {
|
|
9803
|
+
const cell = this.getClipboardCell(event);
|
|
9804
|
+
if (!cell || (!cell.column.isPinned() && (!cell.colDef.field || !cell.data[cell.colDef.field])))
|
|
9805
|
+
return;
|
|
9806
|
+
event.preventDefault();
|
|
9807
|
+
event.stopPropagation();
|
|
9808
|
+
if (cell.column.isPinned())
|
|
9809
|
+
void this.dataGridClipboard.pasteRow(this.api, this.config, this.api.getSelectedRows(), event);
|
|
9810
|
+
else
|
|
9811
|
+
void this.dataGridClipboard.pasteCell(cell, cell.data, cell.data.$entity, event);
|
|
9812
|
+
};
|
|
9752
9813
|
onCellMouseOver(e) {
|
|
9753
9814
|
let targetElement = e?.event?.target;
|
|
9754
9815
|
const fieldName = e?.colDef?.field;
|
|
@@ -10109,7 +10170,7 @@ class TruDataGrid {
|
|
|
10109
10170
|
}
|
|
10110
10171
|
};
|
|
10111
10172
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDataGrid, deps: [{ token: TruDataContext }, { token: TruComponentLookup }, { token: TruSearchResultViewManager }, { token: TruAppEnvironment }, { token: TruSearchViewEventHandler }, { token: TruUiNotification }, { token: TruConnectionHub }, { token: TruWindowEventHandler }, { token: TruDataGridClipboard }, { token: TruUtil }, { token: i0.ApplicationRef }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: TruDesktopViewEventNotifier }, { token: TruTabGroupEventNotifier, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
10112
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: TruDataGrid, isStandalone: true, selector: "tru-data-grid", inputs: { config: "config", entity: "entity", name: "name" }, host: { properties: { "class.tru-data-grid": "true" } }, viewQueries: [{ propertyName: "dataGridContainer", first: true, predicate: ["dataGridContainer"], descendants: true }, { propertyName: "customToolbarContainer", first: true, predicate: ["customToolbarContainer"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"{'tru-data-grid-label-offset': label}\">\r\n <span class=\"tru-data-grid-label\" *ngIf=\"label\">{{label}}</span>\r\n <div class=\"tru-data-grid-toolbar-container\">\r\n <tru-toolbar>\r\n <tru-toolbar-dropdown [options]=\"unassociatedChoices\"\r\n [(selectedOption)]=\"selectedUnassociatedChoice\"\r\n [disabled]=\"!this.config.tableConfig.canAdd\"\r\n (selectionChange)=\"onUnassociatedChoiceChanged($event)\"\r\n *ngIf=\"gridType === TruDataGridTypes.DetailManyToMany\">\r\n </tru-toolbar-dropdown>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-add-icon'\" [tooltip]=\"'Add - [Ctrl + I]'\" [disabled]=\"!canAdd()\" (onClick)=\"onAdd()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-delete-icon'\" [tooltip]=\"'Delete - [Ctrl + D]'\" (click)=\"onDelete()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-keep-icon'\" [tooltip]=\"'Keep selected records - [Ctrl + K]'\" (click)=\"onKeep()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-remove-icon'\" [tooltip]=\"'Remove selected records - [Ctrl + R]'\" (click)=\"onRemove()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"parentToolbarTemplate\"></tru-toolbar-separator>\r\n <ng-container *ngTemplateOutlet=\"parentToolbarTemplate\"></ng-container>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-export-icon'\" [tooltip]=\"'Export'\" (click)=\"onExport()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"viewMenuItems.length\"></tru-toolbar-separator>\r\n <div *ngIf=\"viewMenuItems.length\">\r\n <tru-toolbar-menu *ngFor=\"let viewMenuItem of viewMenuItems\" [config]=\"viewMenuItem\"></tru-toolbar-menu>\r\n </div>\r\n <ng-container #customToolbarContainer></ng-container>\r\n </tru-toolbar>\r\n </div>\r\n <div #dataGridContainer class=\"tru-data-grid-container\">\r\n <ag-grid-angular class=\"ag-theme-alpine\"\r\n [gridOptions]=\"gridOptions\"\r\n [rowData]=\"rowData\"\r\n [columnDefs]=\"columnDefs\"\r\n [defaultColDef]=\"defaultColDef\"\r\n [headerHeight]=\"25\"\r\n [rowHeight]=\"22\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"true\"\r\n [suppressRowClickSelection]=\"true\"\r\n [stopEditingWhenCellsLoseFocus]=\"false\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n (cellDoubleClicked)=\"onCellDoubleClicked($event)\"\r\n (cellKeyDown)=\"onCellKeyDown($event)\"\r\n (rowDataChanged)=\"onRowDataChanged($event)\"\r\n (cellMouseDown)=\"onCellMouseDown($event)\"\r\n (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($event)\"\r\n (contextmenu)=\"onRightClick($event)\"\r\n (rowClicked)=\"onRowClicked($event)\">\r\n </ag-grid-angular>\r\n </div>\r\n <div class=\"tru-data-grid-statusbar-container\">\r\n <div class=\"tru-data-grid-statusbar-values-container\">\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{rowCount}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">Selected: {{api ? api.getSelectedRows().length : 0}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".tru-data-grid-label{font-size:14px;font-weight:700;margin-bottom:5px;display:flex}.tru-data-grid:first-of-type+.tru-data-grid{margin-left:5px}.tru-data-grid-toolbar-container{display:inline-flex}.tru-data-grid-container{min-height:200px}.tru-data-grid .ag-body-viewport{padding-bottom:var(--grid-footer-height, 23px)}.tru-data-grid-statusbar-container{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.tru-data-grid-statusbar-container p{float:left;color:#fff;font-weight:700;margin-left:10px;margin-top:0!important;line-height:23px;font-size:12px}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!important}.detail-container .ag-root-wrapper{height:calc(100% - 50px)!important}ag-grid-angular{position:absolute;inset:28px 0 23px;width:100%;height:100%}.tru-data-grid-label-offset ag-grid-angular{top:48px;height:calc(100% - 70px)}.ag-root-wrapper{border-top:0px!important}.ag-root{top:0;bottom:23px!important}::ng-deep .mat-mdc-tab-group .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.search-container .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.ag-header-cell{padding-left:0!important;padding-right:0!important}.ag-header-cell-resize:after{top:unset!important;height:25px!important}.ag-header-row{font-weight:500!important}.ag-header-cell-label{justify-content:center}.ag-row{border-color:#d8dbe3}.tru-data-grid .ag-row.validation-dialog-open{z-index:2}.ag-row.popup-editing{z-index:unset!important}.ag-row .ag-cell-value{padding-left:2px!important;padding-right:2px!important}.ag-row .ag-cell-value.invalid{border:1px solid red!important;border-radius:0}.ag-row .ag-cell-value.ag-cell-inline-editing:not(.invalid){border-color:#006dcc!important}.ag-ltr .ag-header-cell-resize{right:-5px}.ag-header-cell-text{font-size:12px!important}.ag-cell-inline-editing{height:21px!important}.ag-cell{height:21px;border-right:solid #d8dbe3 1px!important}.ag-cell ng-component{pointer-events:none}.ag-has-focus .ag-cell-focus:not(.invalid){border:solid #006dcc 1px!important}.ag-pinned-left-cols-container .ag-cell.ag-cell-focus{border:solid #dde2eb 1px!important;border-top:0px!important;border-bottom:0px!important}.ag-pinned-left-cols-container .ag-row-selected .ag-cell,.ag-pinned-left-cols-container .ag-row-focus .ag-cell{border:0px solid #dde2eb!important;border-right:2px solid #006dcc!important;color:#fff;font-weight:700;background-color:#006dcc}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell{background-color:#f5f5f5!important}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell:hover{background-color:#2196f31a!important}.ag-header-cell{background-color:#f5f5f5}.ag-column-focus .ag-header-control-sort-container rect{fill:#ddd}.ag-header-cell.ag-column-focus{border:0px solid #dde2eb!important;border-bottom:2px solid #006dcc!important;color:#006dcc;font-weight:700;background-color:#ddd}.ag-header-cell-comp-wrapper{display:block!important}.ag-cell-label-container{padding:0!important}.ag-pk-aligned-cell{text-align:center}.ag-horizontal-left-spacer{overflow:hidden}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-viewport .ag-row-selected{background-color:#efefef}.ag-viewport .ag-row-selected .ag-cell{background-color:unset!important}.ag-row-selected~.ag-row-selected .ag-cell{border-top-color:#dde2eb}*:not(.ag-row-selected):not(.ag-row-inline-editing)+.ag-row-selected .ag-cell{border-top-color:#006dcc}.ag-row-selected:has(+:not(.ag-row-selected)):not(.ag-row-inline-editing) .ag-cell{border-bottom-color:#006dcc}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:3px;height:3px;border-bottom:solid 3px transparent;border-right:solid 3px transparent;border-left:solid 3px red;border-top:solid 3px red}.ag-grid-row-has-changes-gradient{background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fff,endColorstr=#ffffff);background-image:-moz-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:linear-gradient(top,#fff 0% 25%,#dbffdf);background-image:-webkit-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-o-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-ms-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-webkit-gradient(linear,right top,right bottom,color-stop(0%,#fff),color-stop(25%,#ffffff),color-stop(100%,#dbffdf))}@keyframes ants-marching{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:40px 0,-40px 100%,0 -40px,100% 40px}}.animated-border{background-size:10px 0px,10px 0px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-image:linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%);animation:ants-marching 1s linear infinite}.animated-border.ag-row-selected{background-color:#efefef!important}.animated-border .ag-cell{background-color:unset!important;border-top:none!important;border-bottom:none!important}.animated-border:not(.animated-border+.animated-border){background-size:10px 1px,10px 0px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)){background-size:10px 0px,10px 1px,1px 10px,1px 10px}.animated-border:not(.animated-border+.animated-border).animated-border:has(+:not(.animated-border)){background-size:10px 1px,10px 1px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)) .ag-cell{height:20px!important}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation-name:spin;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear}.detail-container .mat-mdc-tab-body-content tru-data-grid{--grid-scroll-left: 0px;--grid-scroll-right: 0px;--grid-scroll-bottom: 80px;--grid-scroll-visible: 1;display:flex;flex-direction:column;height:100%;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid ag-grid-angular{position:relative!important;inset:0!important;height:calc(100% - var(--grid-footer-height, 23px))!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root-wrapper,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root{height:100%!important;top:0!important;bottom:0!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .tru-data-grid-container{flex:1 1 auto;position:relative;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-viewport{position:relative!important;padding-bottom:calc(var(--grid-footer-height, 23px) + (var(--grid-scroll-bottom, 80px) - var(--grid-footer-height, 23px)) * var(--grid-scroll-visible, 1))!important;overflow-x:auto!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll-viewport,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll{position:fixed!important;left:var(--grid-scroll-left, 0px)!important;right:var(--grid-scroll-right, 0px)!important;width:calc(100% - var(--grid-scroll-left, 0px) - var(--grid-scroll-right, 0px))!important;bottom:var(--grid-scroll-bottom, 80px)!important;height:calc(16px * var(--grid-scroll-visible, 1))!important;min-height:calc(16px * var(--grid-scroll-visible, 1))!important;display:block!important;opacity:var(--grid-scroll-visible, 1)!important;pointer-events:calc(var(--grid-scroll-visible, 1))!important;overflow-x:scroll!important;overflow-y:hidden!important;z-index:9999!important;background:transparent!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressGroupChangesColumnVisibility", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "findSearchValue", "findOptions", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "alwaysPassFilter", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "cellFlashDuration", "cellFadeDuration", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableCellSpan", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "treeData", "treeDataChildrenField", "treeDataParentIdField", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "enableRowPinning", "isRowPinnable", "isRowPinned", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "rowNumbers", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "themeCssLayer", "styleNonce", "themeStyleContainer", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "findChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "rowResizeStarted", "rowResizeEnded", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "pinnedRowsChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: ["config", "icon", "text", "disabled", "tooltip", "type"], outputs: ["onClick", "onKeydown"] }, { kind: "component", type: TruToolbarDropdown, selector: "tru-toolbar-dropdown", inputs: ["config", "options", "tooltip", "multiple", "filterable", "filterTooltip", "width", "selectedOption", "disabled"], outputs: ["selectedOptionChange", "selectionChange"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }, { kind: "component", type: TruToolbarMenu, selector: "tru-toolbar-menu", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
10173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: TruDataGrid, isStandalone: true, selector: "tru-data-grid", inputs: { config: "config", entity: "entity", name: "name" }, host: { properties: { "class.tru-data-grid": "true" } }, viewQueries: [{ propertyName: "dataGridContainer", first: true, predicate: ["dataGridContainer"], descendants: true }, { propertyName: "customToolbarContainer", first: true, predicate: ["customToolbarContainer"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"{'tru-data-grid-label-offset': label}\">\r\n <span class=\"tru-data-grid-label\" *ngIf=\"label\">{{label}}</span>\r\n <div class=\"tru-data-grid-toolbar-container\">\r\n <tru-toolbar>\r\n <tru-toolbar-dropdown [options]=\"unassociatedChoices\"\r\n [(selectedOption)]=\"selectedUnassociatedChoice\"\r\n [disabled]=\"!this.config.tableConfig.canAdd\"\r\n (selectionChange)=\"onUnassociatedChoiceChanged($event)\"\r\n *ngIf=\"gridType === TruDataGridTypes.DetailManyToMany\">\r\n </tru-toolbar-dropdown>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-add-icon'\" [tooltip]=\"'Add - [Ctrl + I]'\" [disabled]=\"!canAdd()\" (onClick)=\"onAdd()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-delete-icon'\" [tooltip]=\"'Delete - [Ctrl + D]'\" (click)=\"onDelete()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-keep-icon'\" [tooltip]=\"'Keep selected records - [Ctrl + K]'\" (click)=\"onKeep()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-remove-icon'\" [tooltip]=\"'Remove selected records - [Ctrl + R]'\" (click)=\"onRemove()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"parentToolbarTemplate\"></tru-toolbar-separator>\r\n <ng-container *ngTemplateOutlet=\"parentToolbarTemplate\"></ng-container>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-export-icon'\" [tooltip]=\"'Export'\" (click)=\"onExport()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"viewMenuItems.length\"></tru-toolbar-separator>\r\n <div *ngIf=\"viewMenuItems.length\">\r\n <tru-toolbar-menu *ngFor=\"let viewMenuItem of viewMenuItems\" [config]=\"viewMenuItem\"></tru-toolbar-menu>\r\n </div>\r\n <ng-container #customToolbarContainer></ng-container>\r\n </tru-toolbar>\r\n </div>\r\n <div #dataGridContainer class=\"tru-data-grid-container\">\r\n <ag-grid-angular class=\"ag-theme-alpine\"\r\n [gridOptions]=\"gridOptions\"\r\n [rowData]=\"rowData\"\r\n [columnDefs]=\"columnDefs\"\r\n [defaultColDef]=\"defaultColDef\"\r\n [headerHeight]=\"25\"\r\n [rowHeight]=\"22\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"true\"\r\n [suppressRowClickSelection]=\"true\"\r\n [stopEditingWhenCellsLoseFocus]=\"false\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n (cellDoubleClicked)=\"onCellDoubleClicked($event)\"\r\n (cellKeyDown)=\"onCellKeyDown($event)\"\r\n (copy)=\"onCopy($event)\"\r\n (paste)=\"onPaste($event)\"\r\n (rowDataChanged)=\"onRowDataChanged($event)\"\r\n (cellMouseDown)=\"onCellMouseDown($event)\"\r\n (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($event)\"\r\n (contextmenu)=\"onRightClick($event)\"\r\n (rowClicked)=\"onRowClicked($event)\">\r\n </ag-grid-angular>\r\n </div>\r\n <div class=\"tru-data-grid-statusbar-container\">\r\n <div class=\"tru-data-grid-statusbar-values-container\">\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{rowCount}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">Selected: {{api ? api.getSelectedRows().length : 0}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".tru-data-grid-label{font-size:14px;font-weight:700;margin-bottom:5px;display:flex}.tru-data-grid:first-of-type+.tru-data-grid{margin-left:5px}.tru-data-grid-toolbar-container{display:inline-flex}.tru-data-grid-container{min-height:200px}.tru-data-grid .ag-body-viewport{padding-bottom:var(--grid-footer-height, 23px)}.tru-data-grid-statusbar-container{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.tru-data-grid-statusbar-container p{float:left;color:#fff;font-weight:700;margin-left:10px;margin-top:0!important;line-height:23px;font-size:12px}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!important}.detail-container .ag-root-wrapper{height:calc(100% - 50px)!important}ag-grid-angular{position:absolute;inset:28px 0 23px;width:100%;height:100%}.tru-data-grid-label-offset ag-grid-angular{top:48px;height:calc(100% - 70px)}.ag-root-wrapper{border-top:0px!important}.ag-root{top:0;bottom:23px!important}::ng-deep .mat-mdc-tab-group .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.search-container .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.ag-header-cell{padding-left:0!important;padding-right:0!important}.ag-header-cell-resize:after{top:unset!important;height:25px!important}.ag-header-row{font-weight:500!important}.ag-header-cell-label{justify-content:center}.ag-row{border-color:#d8dbe3}.tru-data-grid .ag-row.validation-dialog-open{z-index:2}.ag-row.popup-editing{z-index:unset!important}.ag-row .ag-cell-value{padding-left:2px!important;padding-right:2px!important}.ag-row .ag-cell-value.invalid{border:1px solid red!important;border-radius:0}.ag-row .ag-cell-value.ag-cell-inline-editing:not(.invalid){border-color:#006dcc!important}.ag-ltr .ag-header-cell-resize{right:-5px}.ag-header-cell-text{font-size:12px!important}.ag-cell-inline-editing{height:21px!important}.ag-cell{height:21px;border-right:solid #d8dbe3 1px!important}.ag-cell ng-component{pointer-events:none}.ag-has-focus .ag-cell-focus:not(.invalid){border:solid #006dcc 1px!important}.ag-pinned-left-cols-container .ag-cell.ag-cell-focus{border:solid #dde2eb 1px!important;border-top:0px!important;border-bottom:0px!important}.ag-pinned-left-cols-container .ag-row-selected .ag-cell,.ag-pinned-left-cols-container .ag-row-focus .ag-cell{border:0px solid #dde2eb!important;border-right:2px solid #006dcc!important;color:#fff;font-weight:700;background-color:#006dcc}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell{background-color:#f5f5f5!important}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell:hover{background-color:#2196f31a!important}.ag-header-cell{background-color:#f5f5f5}.ag-column-focus .ag-header-control-sort-container rect{fill:#ddd}.ag-header-cell.ag-column-focus{border:0px solid #dde2eb!important;border-bottom:2px solid #006dcc!important;color:#006dcc;font-weight:700;background-color:#ddd}.ag-header-cell-comp-wrapper{display:block!important}.ag-cell-label-container{padding:0!important}.ag-pk-aligned-cell{text-align:center}.ag-horizontal-left-spacer{overflow:hidden}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-viewport .ag-row-selected{background-color:#efefef}.ag-viewport .ag-row-selected .ag-cell{background-color:unset!important}.ag-row-selected~.ag-row-selected .ag-cell{border-top-color:#dde2eb}*:not(.ag-row-selected):not(.ag-row-inline-editing)+.ag-row-selected .ag-cell{border-top-color:#006dcc}.ag-row-selected:has(+:not(.ag-row-selected)):not(.ag-row-inline-editing) .ag-cell{border-bottom-color:#006dcc}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:3px;height:3px;border-bottom:solid 3px transparent;border-right:solid 3px transparent;border-left:solid 3px red;border-top:solid 3px red}.ag-grid-row-has-changes-gradient{background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fff,endColorstr=#ffffff);background-image:-moz-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:linear-gradient(top,#fff 0% 25%,#dbffdf);background-image:-webkit-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-o-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-ms-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-webkit-gradient(linear,right top,right bottom,color-stop(0%,#fff),color-stop(25%,#ffffff),color-stop(100%,#dbffdf))}@keyframes ants-marching{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:40px 0,-40px 100%,0 -40px,100% 40px}}.animated-border{background-size:10px 0px,10px 0px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-image:linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%);animation:ants-marching 1s linear infinite}.animated-border.ag-row-selected{background-color:#efefef!important}.animated-border .ag-cell{background-color:unset!important;border-top:none!important;border-bottom:none!important}.animated-border:not(.animated-border+.animated-border){background-size:10px 1px,10px 0px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)){background-size:10px 0px,10px 1px,1px 10px,1px 10px}.animated-border:not(.animated-border+.animated-border).animated-border:has(+:not(.animated-border)){background-size:10px 1px,10px 1px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)) .ag-cell{height:20px!important}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation-name:spin;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear}.detail-container .mat-mdc-tab-body-content tru-data-grid{--grid-scroll-left: 0px;--grid-scroll-right: 0px;--grid-scroll-bottom: 80px;--grid-scroll-visible: 1;display:flex;flex-direction:column;height:100%;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid ag-grid-angular{position:relative!important;inset:0!important;height:calc(100% - var(--grid-footer-height, 23px))!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root-wrapper,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root{height:100%!important;top:0!important;bottom:0!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .tru-data-grid-container{flex:1 1 auto;position:relative;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-viewport{position:relative!important;padding-bottom:calc(var(--grid-footer-height, 23px) + (var(--grid-scroll-bottom, 80px) - var(--grid-footer-height, 23px)) * var(--grid-scroll-visible, 1))!important;overflow-x:auto!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll-viewport,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll{position:fixed!important;left:var(--grid-scroll-left, 0px)!important;right:var(--grid-scroll-right, 0px)!important;width:calc(100% - var(--grid-scroll-left, 0px) - var(--grid-scroll-right, 0px))!important;bottom:var(--grid-scroll-bottom, 80px)!important;height:calc(16px * var(--grid-scroll-visible, 1))!important;min-height:calc(16px * var(--grid-scroll-visible, 1))!important;display:block!important;opacity:var(--grid-scroll-visible, 1)!important;pointer-events:calc(var(--grid-scroll-visible, 1))!important;overflow-x:scroll!important;overflow-y:hidden!important;z-index:9999!important;background:transparent!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressGroupChangesColumnVisibility", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "components", "editType", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "findSearchValue", "findOptions", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "alwaysPassFilter", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "cellFlashDuration", "cellFadeDuration", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableCellSpan", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "treeData", "treeDataChildrenField", "treeDataParentIdField", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "pinnedTopRowData", "pinnedBottomRowData", "enableRowPinning", "isRowPinnable", "isRowPinned", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "rowNumbers", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "themeCssLayer", "styleNonce", "themeStyleContainer", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "advancedFilterBuilderVisibleChanged", "findChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "rowResizeStarted", "rowResizeEnded", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "pinnedRowsChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: ["config", "icon", "text", "disabled", "tooltip", "type"], outputs: ["onClick", "onKeydown"] }, { kind: "component", type: TruToolbarDropdown, selector: "tru-toolbar-dropdown", inputs: ["config", "options", "tooltip", "multiple", "filterable", "filterTooltip", "width", "selectedOption", "disabled"], outputs: ["selectedOptionChange", "selectionChange"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }, { kind: "component", type: TruToolbarMenu, selector: "tru-toolbar-menu", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
10113
10174
|
}
|
|
10114
10175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruDataGrid, decorators: [{
|
|
10115
10176
|
type: Component,
|
|
@@ -10126,7 +10187,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
10126
10187
|
TruToolbarDropdown,
|
|
10127
10188
|
TruToolbarSeparator,
|
|
10128
10189
|
TruToolbarMenu
|
|
10129
|
-
], template: "<div [ngClass]=\"{'tru-data-grid-label-offset': label}\">\r\n <span class=\"tru-data-grid-label\" *ngIf=\"label\">{{label}}</span>\r\n <div class=\"tru-data-grid-toolbar-container\">\r\n <tru-toolbar>\r\n <tru-toolbar-dropdown [options]=\"unassociatedChoices\"\r\n [(selectedOption)]=\"selectedUnassociatedChoice\"\r\n [disabled]=\"!this.config.tableConfig.canAdd\"\r\n (selectionChange)=\"onUnassociatedChoiceChanged($event)\"\r\n *ngIf=\"gridType === TruDataGridTypes.DetailManyToMany\">\r\n </tru-toolbar-dropdown>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-add-icon'\" [tooltip]=\"'Add - [Ctrl + I]'\" [disabled]=\"!canAdd()\" (onClick)=\"onAdd()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-delete-icon'\" [tooltip]=\"'Delete - [Ctrl + D]'\" (click)=\"onDelete()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-keep-icon'\" [tooltip]=\"'Keep selected records - [Ctrl + K]'\" (click)=\"onKeep()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-remove-icon'\" [tooltip]=\"'Remove selected records - [Ctrl + R]'\" (click)=\"onRemove()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"parentToolbarTemplate\"></tru-toolbar-separator>\r\n <ng-container *ngTemplateOutlet=\"parentToolbarTemplate\"></ng-container>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-export-icon'\" [tooltip]=\"'Export'\" (click)=\"onExport()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"viewMenuItems.length\"></tru-toolbar-separator>\r\n <div *ngIf=\"viewMenuItems.length\">\r\n <tru-toolbar-menu *ngFor=\"let viewMenuItem of viewMenuItems\" [config]=\"viewMenuItem\"></tru-toolbar-menu>\r\n </div>\r\n <ng-container #customToolbarContainer></ng-container>\r\n </tru-toolbar>\r\n </div>\r\n <div #dataGridContainer class=\"tru-data-grid-container\">\r\n <ag-grid-angular class=\"ag-theme-alpine\"\r\n [gridOptions]=\"gridOptions\"\r\n [rowData]=\"rowData\"\r\n [columnDefs]=\"columnDefs\"\r\n [defaultColDef]=\"defaultColDef\"\r\n [headerHeight]=\"25\"\r\n [rowHeight]=\"22\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"true\"\r\n [suppressRowClickSelection]=\"true\"\r\n [stopEditingWhenCellsLoseFocus]=\"false\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n (cellDoubleClicked)=\"onCellDoubleClicked($event)\"\r\n (cellKeyDown)=\"onCellKeyDown($event)\"\r\n (rowDataChanged)=\"onRowDataChanged($event)\"\r\n (cellMouseDown)=\"onCellMouseDown($event)\"\r\n (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($event)\"\r\n (contextmenu)=\"onRightClick($event)\"\r\n (rowClicked)=\"onRowClicked($event)\">\r\n </ag-grid-angular>\r\n </div>\r\n <div class=\"tru-data-grid-statusbar-container\">\r\n <div class=\"tru-data-grid-statusbar-values-container\">\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{rowCount}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">Selected: {{api ? api.getSelectedRows().length : 0}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".tru-data-grid-label{font-size:14px;font-weight:700;margin-bottom:5px;display:flex}.tru-data-grid:first-of-type+.tru-data-grid{margin-left:5px}.tru-data-grid-toolbar-container{display:inline-flex}.tru-data-grid-container{min-height:200px}.tru-data-grid .ag-body-viewport{padding-bottom:var(--grid-footer-height, 23px)}.tru-data-grid-statusbar-container{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.tru-data-grid-statusbar-container p{float:left;color:#fff;font-weight:700;margin-left:10px;margin-top:0!important;line-height:23px;font-size:12px}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!important}.detail-container .ag-root-wrapper{height:calc(100% - 50px)!important}ag-grid-angular{position:absolute;inset:28px 0 23px;width:100%;height:100%}.tru-data-grid-label-offset ag-grid-angular{top:48px;height:calc(100% - 70px)}.ag-root-wrapper{border-top:0px!important}.ag-root{top:0;bottom:23px!important}::ng-deep .mat-mdc-tab-group .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.search-container .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.ag-header-cell{padding-left:0!important;padding-right:0!important}.ag-header-cell-resize:after{top:unset!important;height:25px!important}.ag-header-row{font-weight:500!important}.ag-header-cell-label{justify-content:center}.ag-row{border-color:#d8dbe3}.tru-data-grid .ag-row.validation-dialog-open{z-index:2}.ag-row.popup-editing{z-index:unset!important}.ag-row .ag-cell-value{padding-left:2px!important;padding-right:2px!important}.ag-row .ag-cell-value.invalid{border:1px solid red!important;border-radius:0}.ag-row .ag-cell-value.ag-cell-inline-editing:not(.invalid){border-color:#006dcc!important}.ag-ltr .ag-header-cell-resize{right:-5px}.ag-header-cell-text{font-size:12px!important}.ag-cell-inline-editing{height:21px!important}.ag-cell{height:21px;border-right:solid #d8dbe3 1px!important}.ag-cell ng-component{pointer-events:none}.ag-has-focus .ag-cell-focus:not(.invalid){border:solid #006dcc 1px!important}.ag-pinned-left-cols-container .ag-cell.ag-cell-focus{border:solid #dde2eb 1px!important;border-top:0px!important;border-bottom:0px!important}.ag-pinned-left-cols-container .ag-row-selected .ag-cell,.ag-pinned-left-cols-container .ag-row-focus .ag-cell{border:0px solid #dde2eb!important;border-right:2px solid #006dcc!important;color:#fff;font-weight:700;background-color:#006dcc}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell{background-color:#f5f5f5!important}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell:hover{background-color:#2196f31a!important}.ag-header-cell{background-color:#f5f5f5}.ag-column-focus .ag-header-control-sort-container rect{fill:#ddd}.ag-header-cell.ag-column-focus{border:0px solid #dde2eb!important;border-bottom:2px solid #006dcc!important;color:#006dcc;font-weight:700;background-color:#ddd}.ag-header-cell-comp-wrapper{display:block!important}.ag-cell-label-container{padding:0!important}.ag-pk-aligned-cell{text-align:center}.ag-horizontal-left-spacer{overflow:hidden}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-viewport .ag-row-selected{background-color:#efefef}.ag-viewport .ag-row-selected .ag-cell{background-color:unset!important}.ag-row-selected~.ag-row-selected .ag-cell{border-top-color:#dde2eb}*:not(.ag-row-selected):not(.ag-row-inline-editing)+.ag-row-selected .ag-cell{border-top-color:#006dcc}.ag-row-selected:has(+:not(.ag-row-selected)):not(.ag-row-inline-editing) .ag-cell{border-bottom-color:#006dcc}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:3px;height:3px;border-bottom:solid 3px transparent;border-right:solid 3px transparent;border-left:solid 3px red;border-top:solid 3px red}.ag-grid-row-has-changes-gradient{background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fff,endColorstr=#ffffff);background-image:-moz-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:linear-gradient(top,#fff 0% 25%,#dbffdf);background-image:-webkit-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-o-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-ms-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-webkit-gradient(linear,right top,right bottom,color-stop(0%,#fff),color-stop(25%,#ffffff),color-stop(100%,#dbffdf))}@keyframes ants-marching{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:40px 0,-40px 100%,0 -40px,100% 40px}}.animated-border{background-size:10px 0px,10px 0px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-image:linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%);animation:ants-marching 1s linear infinite}.animated-border.ag-row-selected{background-color:#efefef!important}.animated-border .ag-cell{background-color:unset!important;border-top:none!important;border-bottom:none!important}.animated-border:not(.animated-border+.animated-border){background-size:10px 1px,10px 0px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)){background-size:10px 0px,10px 1px,1px 10px,1px 10px}.animated-border:not(.animated-border+.animated-border).animated-border:has(+:not(.animated-border)){background-size:10px 1px,10px 1px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)) .ag-cell{height:20px!important}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation-name:spin;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear}.detail-container .mat-mdc-tab-body-content tru-data-grid{--grid-scroll-left: 0px;--grid-scroll-right: 0px;--grid-scroll-bottom: 80px;--grid-scroll-visible: 1;display:flex;flex-direction:column;height:100%;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid ag-grid-angular{position:relative!important;inset:0!important;height:calc(100% - var(--grid-footer-height, 23px))!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root-wrapper,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root{height:100%!important;top:0!important;bottom:0!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .tru-data-grid-container{flex:1 1 auto;position:relative;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-viewport{position:relative!important;padding-bottom:calc(var(--grid-footer-height, 23px) + (var(--grid-scroll-bottom, 80px) - var(--grid-footer-height, 23px)) * var(--grid-scroll-visible, 1))!important;overflow-x:auto!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll-viewport,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll{position:fixed!important;left:var(--grid-scroll-left, 0px)!important;right:var(--grid-scroll-right, 0px)!important;width:calc(100% - var(--grid-scroll-left, 0px) - var(--grid-scroll-right, 0px))!important;bottom:var(--grid-scroll-bottom, 80px)!important;height:calc(16px * var(--grid-scroll-visible, 1))!important;min-height:calc(16px * var(--grid-scroll-visible, 1))!important;display:block!important;opacity:var(--grid-scroll-visible, 1)!important;pointer-events:calc(var(--grid-scroll-visible, 1))!important;overflow-x:scroll!important;overflow-y:hidden!important;z-index:9999!important;background:transparent!important}\n"] }]
|
|
10190
|
+
], template: "<div [ngClass]=\"{'tru-data-grid-label-offset': label}\">\r\n <span class=\"tru-data-grid-label\" *ngIf=\"label\">{{label}}</span>\r\n <div class=\"tru-data-grid-toolbar-container\">\r\n <tru-toolbar>\r\n <tru-toolbar-dropdown [options]=\"unassociatedChoices\"\r\n [(selectedOption)]=\"selectedUnassociatedChoice\"\r\n [disabled]=\"!this.config.tableConfig.canAdd\"\r\n (selectionChange)=\"onUnassociatedChoiceChanged($event)\"\r\n *ngIf=\"gridType === TruDataGridTypes.DetailManyToMany\">\r\n </tru-toolbar-dropdown>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-add-icon'\" [tooltip]=\"'Add - [Ctrl + I]'\" [disabled]=\"!canAdd()\" (onClick)=\"onAdd()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-delete-icon'\" [tooltip]=\"'Delete - [Ctrl + D]'\" (click)=\"onDelete()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-keep-icon'\" [tooltip]=\"'Keep selected records - [Ctrl + K]'\" (click)=\"onKeep()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-remove-icon'\" [tooltip]=\"'Remove selected records - [Ctrl + R]'\" (click)=\"onRemove()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"parentToolbarTemplate\"></tru-toolbar-separator>\r\n <ng-container *ngTemplateOutlet=\"parentToolbarTemplate\"></ng-container>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-export-icon'\" [tooltip]=\"'Export'\" (click)=\"onExport()\"></tru-toolbar-button>\r\n <tru-toolbar-separator *ngIf=\"viewMenuItems.length\"></tru-toolbar-separator>\r\n <div *ngIf=\"viewMenuItems.length\">\r\n <tru-toolbar-menu *ngFor=\"let viewMenuItem of viewMenuItems\" [config]=\"viewMenuItem\"></tru-toolbar-menu>\r\n </div>\r\n <ng-container #customToolbarContainer></ng-container>\r\n </tru-toolbar>\r\n </div>\r\n <div #dataGridContainer class=\"tru-data-grid-container\">\r\n <ag-grid-angular class=\"ag-theme-alpine\"\r\n [gridOptions]=\"gridOptions\"\r\n [rowData]=\"rowData\"\r\n [columnDefs]=\"columnDefs\"\r\n [defaultColDef]=\"defaultColDef\"\r\n [headerHeight]=\"25\"\r\n [rowHeight]=\"22\"\r\n [rowBuffer]=\"50\"\r\n [enterNavigatesVertically]=\"true\"\r\n [enterNavigatesVerticallyAfterEdit]=\"true\"\r\n [suppressRowHoverHighlight]=\"true\"\r\n [suppressRowClickSelection]=\"true\"\r\n [stopEditingWhenCellsLoseFocus]=\"false\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n (cellDoubleClicked)=\"onCellDoubleClicked($event)\"\r\n (cellKeyDown)=\"onCellKeyDown($event)\"\r\n (copy)=\"onCopy($event)\"\r\n (paste)=\"onPaste($event)\"\r\n (rowDataChanged)=\"onRowDataChanged($event)\"\r\n (cellMouseDown)=\"onCellMouseDown($event)\"\r\n (cellMouseOver)=\"onCellMouseOver($event)\"\r\n (cellMouseOut)=\"onCellMouseOut($event)\"\r\n (contextmenu)=\"onRightClick($event)\"\r\n (rowClicked)=\"onRowClicked($event)\">\r\n </ag-grid-angular>\r\n </div>\r\n <div class=\"tru-data-grid-statusbar-container\">\r\n <div class=\"tru-data-grid-statusbar-values-container\">\r\n <p class=\"tru-data-grid-statusbar-values-text\">{{rowCount}}</p>\r\n <p class=\"tru-data-grid-statusbar-values-text\">Selected: {{api ? api.getSelectedRows().length : 0}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".tru-data-grid-label{font-size:14px;font-weight:700;margin-bottom:5px;display:flex}.tru-data-grid:first-of-type+.tru-data-grid{margin-left:5px}.tru-data-grid-toolbar-container{display:inline-flex}.tru-data-grid-container{min-height:200px}.tru-data-grid .ag-body-viewport{padding-bottom:var(--grid-footer-height, 23px)}.tru-data-grid-statusbar-container{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.tru-data-grid-statusbar-container p{float:left;color:#fff;font-weight:700;margin-left:10px;margin-top:0!important;line-height:23px;font-size:12px}.detail-container .tru-data-grid{position:relative}.detail-container .mat-mdc-tab-body-content{height:100%;overflow:hidden!important}.detail-container .ag-root-wrapper{height:calc(100% - 50px)!important}ag-grid-angular{position:absolute;inset:28px 0 23px;width:100%;height:100%}.tru-data-grid-label-offset ag-grid-angular{top:48px;height:calc(100% - 70px)}.ag-root-wrapper{border-top:0px!important}.ag-root{top:0;bottom:23px!important}::ng-deep .mat-mdc-tab-group .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.search-container .ag-root.ag-layout-normal{height:calc(100% - 50px)!important}.ag-header-cell{padding-left:0!important;padding-right:0!important}.ag-header-cell-resize:after{top:unset!important;height:25px!important}.ag-header-row{font-weight:500!important}.ag-header-cell-label{justify-content:center}.ag-row{border-color:#d8dbe3}.tru-data-grid .ag-row.validation-dialog-open{z-index:2}.ag-row.popup-editing{z-index:unset!important}.ag-row .ag-cell-value{padding-left:2px!important;padding-right:2px!important}.ag-row .ag-cell-value.invalid{border:1px solid red!important;border-radius:0}.ag-row .ag-cell-value.ag-cell-inline-editing:not(.invalid){border-color:#006dcc!important}.ag-ltr .ag-header-cell-resize{right:-5px}.ag-header-cell-text{font-size:12px!important}.ag-cell-inline-editing{height:21px!important}.ag-cell{height:21px;border-right:solid #d8dbe3 1px!important}.ag-cell ng-component{pointer-events:none}.ag-has-focus .ag-cell-focus:not(.invalid){border:solid #006dcc 1px!important}.ag-pinned-left-cols-container .ag-cell.ag-cell-focus{border:solid #dde2eb 1px!important;border-top:0px!important;border-bottom:0px!important}.ag-pinned-left-cols-container .ag-row-selected .ag-cell,.ag-pinned-left-cols-container .ag-row-focus .ag-cell{border:0px solid #dde2eb!important;border-right:2px solid #006dcc!important;color:#fff;font-weight:700;background-color:#006dcc}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell{background-color:#f5f5f5!important}.ag-pinned-left-cols-container *:not(.ag-row-selected):not(.ag-row-focus) .ag-cell:hover{background-color:#2196f31a!important}.ag-header-cell{background-color:#f5f5f5}.ag-column-focus .ag-header-control-sort-container rect{fill:#ddd}.ag-header-cell.ag-column-focus{border:0px solid #dde2eb!important;border-bottom:2px solid #006dcc!important;color:#006dcc;font-weight:700;background-color:#ddd}.ag-header-cell-comp-wrapper{display:block!important}.ag-cell-label-container{padding:0!important}.ag-pk-aligned-cell{text-align:center}.ag-horizontal-left-spacer{overflow:hidden}.ag-popup-editor{background:#fff;padding:10px;border:solid 1px #006dcc}.ag-overlay-loading-center{border:none!important;box-shadow:none!important}.ag-viewport .ag-row-selected{background-color:#efefef}.ag-viewport .ag-row-selected .ag-cell{background-color:unset!important}.ag-row-selected~.ag-row-selected .ag-cell{border-top-color:#dde2eb}*:not(.ag-row-selected):not(.ag-row-inline-editing)+.ag-row-selected .ag-cell{border-top-color:#006dcc}.ag-row-selected:has(+:not(.ag-row-selected)):not(.ag-row-inline-editing) .ag-cell{border-bottom-color:#006dcc}.ag-cell.invalid .invalid-flag{box-sizing:border-box;position:absolute;left:0;top:0;width:3px;height:3px;border-bottom:solid 3px transparent;border-right:solid 3px transparent;border-left:solid 3px red;border-top:solid 3px red}.ag-grid-row-has-changes-gradient{background-color:#fff;filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#fff,endColorstr=#ffffff);background-image:-moz-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:linear-gradient(top,#fff 0% 25%,#dbffdf);background-image:-webkit-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-o-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-ms-linear-gradient(top,#fff 0%,#ffffff 25%,#dbffdf 100%);background-image:-webkit-gradient(linear,right top,right bottom,color-stop(0%,#fff),color-stop(25%,#ffffff),color-stop(100%,#dbffdf))}@keyframes ants-marching{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:40px 0,-40px 100%,0 -40px,100% 40px}}.animated-border{background-size:10px 0px,10px 0px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;background-image:linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to right,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%),linear-gradient(to bottom,#006dcc 50%,transparent 50%);animation:ants-marching 1s linear infinite}.animated-border.ag-row-selected{background-color:#efefef!important}.animated-border .ag-cell{background-color:unset!important;border-top:none!important;border-bottom:none!important}.animated-border:not(.animated-border+.animated-border){background-size:10px 1px,10px 0px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)){background-size:10px 0px,10px 1px,1px 10px,1px 10px}.animated-border:not(.animated-border+.animated-border).animated-border:has(+:not(.animated-border)){background-size:10px 1px,10px 1px,1px 10px,1px 10px}.animated-border:has(+:not(.animated-border)) .ag-cell{height:20px!important}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin{animation-name:spin;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear}.detail-container .mat-mdc-tab-body-content tru-data-grid{--grid-scroll-left: 0px;--grid-scroll-right: 0px;--grid-scroll-bottom: 80px;--grid-scroll-visible: 1;display:flex;flex-direction:column;height:100%;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid ag-grid-angular{position:relative!important;inset:0!important;height:calc(100% - var(--grid-footer-height, 23px))!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root-wrapper,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-root{height:100%!important;top:0!important;bottom:0!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .tru-data-grid-container{flex:1 1 auto;position:relative;min-height:0}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-viewport{position:relative!important;padding-bottom:calc(var(--grid-footer-height, 23px) + (var(--grid-scroll-bottom, 80px) - var(--grid-footer-height, 23px)) * var(--grid-scroll-visible, 1))!important;overflow-x:auto!important}.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll-viewport,.detail-container .mat-mdc-tab-body-content tru-data-grid .ag-body-horizontal-scroll{position:fixed!important;left:var(--grid-scroll-left, 0px)!important;right:var(--grid-scroll-right, 0px)!important;width:calc(100% - var(--grid-scroll-left, 0px) - var(--grid-scroll-right, 0px))!important;bottom:var(--grid-scroll-bottom, 80px)!important;height:calc(16px * var(--grid-scroll-visible, 1))!important;min-height:calc(16px * var(--grid-scroll-visible, 1))!important;display:block!important;opacity:var(--grid-scroll-visible, 1)!important;pointer-events:calc(var(--grid-scroll-visible, 1))!important;overflow-x:scroll!important;overflow-y:hidden!important;z-index:9999!important;background:transparent!important}\n"] }]
|
|
10130
10191
|
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruComponentLookup }, { type: TruSearchResultViewManager }, { type: TruAppEnvironment }, { type: TruSearchViewEventHandler }, { type: TruUiNotification }, { type: TruConnectionHub }, { type: TruWindowEventHandler }, { type: TruDataGridClipboard }, { type: TruUtil }, { type: i0.ApplicationRef }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: TruDesktopViewEventNotifier }, { type: TruTabGroupEventNotifier, decorators: [{
|
|
10131
10192
|
type: Optional
|
|
10132
10193
|
}] }], propDecorators: { dataGridContainer: [{
|
|
@@ -12857,11 +12918,11 @@ class TruLogin {
|
|
|
12857
12918
|
});
|
|
12858
12919
|
}
|
|
12859
12920
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruLogin, deps: [{ token: TruAuth }, { token: TruAppEnvironment }], target: i0.ɵɵFactoryTarget.Component });
|
|
12860
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", 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-
|
|
12921
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", 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-button-text-state-layer-color: transparent}::ng-deep .login-wrapper button:focus{outline: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[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: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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]):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: "directive", type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
12861
12922
|
}
|
|
12862
12923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TruLogin, decorators: [{
|
|
12863
12924
|
type: Component,
|
|
12864
|
-
args: [{ selector: 'tru-login', changeDetection: ChangeDetectionStrategy.Eager, 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-
|
|
12925
|
+
args: [{ selector: 'tru-login', changeDetection: ChangeDetectionStrategy.Eager, 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-button-text-state-layer-color: transparent}::ng-deep .login-wrapper button:focus{outline:none!important}::ng-deep .login-wrapper .mat-mdc-button-persistent-ripple{display:none!important}\n"] }]
|
|
12865
12926
|
}], ctorParameters: () => [{ type: TruAuth }, { type: TruAppEnvironment }] });
|
|
12866
12927
|
|
|
12867
12928
|
class TruAuthJwtStrategy {
|