@trudb/tru-common-lib 0.0.659 → 0.0.664
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/login/tru-login.mjs +11 -7
- package/esm2020/lib/components/toolbar/user-profile/tru-toolbar-user-profile.mjs +19 -9
- package/fesm2015/trudb-tru-common-lib.mjs +118 -106
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +116 -104
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/login/tru-login.d.ts +2 -0
- package/lib/components/toolbar/user-profile/tru-toolbar-user-profile.d.ts +7 -1
- package/package.json +1 -1
|
@@ -16,6 +16,10 @@ export class TruLogin {
|
|
|
16
16
|
password: new FormControl('', Validators.required)
|
|
17
17
|
});
|
|
18
18
|
this.loginError = "";
|
|
19
|
+
this.isLoggingIn = false;
|
|
20
|
+
this.isDisabled = () => {
|
|
21
|
+
return !this.f.username.value || !this.f.password.value || this.isLoggingIn;
|
|
22
|
+
};
|
|
19
23
|
}
|
|
20
24
|
get f() {
|
|
21
25
|
return this.loginForm.controls;
|
|
@@ -26,26 +30,26 @@ export class TruLogin {
|
|
|
26
30
|
password: this.f.password.value
|
|
27
31
|
};
|
|
28
32
|
if (loginRequest.username && loginRequest.password) {
|
|
33
|
+
this.isLoggingIn = true;
|
|
29
34
|
this.auth
|
|
30
35
|
.login(loginRequest)
|
|
31
|
-
.subscribe((user) =>
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
.subscribe((user) => {
|
|
37
|
+
this.isLoggingIn = false;
|
|
38
|
+
}, (error) => {
|
|
34
39
|
if (error.status === 401) {
|
|
35
40
|
this.loginError = "Incorrect username and/or password";
|
|
36
41
|
}
|
|
37
42
|
else {
|
|
38
43
|
this.loginError = "Invalid Login - Error: " + error.status;
|
|
39
44
|
}
|
|
40
|
-
//if
|
|
41
45
|
});
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
TruLogin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruLogin, deps: [{ token: i1.TruAuth }], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
-
TruLogin.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruLogin, selector: "tru-login", ngImport: i0, template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\">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}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
50
|
+
TruLogin.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruLogin, selector: "tru-login", ngImport: i0, template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
47
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruLogin, decorators: [{
|
|
48
52
|
type: Component,
|
|
49
|
-
args: [{ selector: 'tru-login', template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\">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}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"] }]
|
|
53
|
+
args: [{ selector: 'tru-login', template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"] }]
|
|
50
54
|
}], ctorParameters: function () { return [{ type: i1.TruAuth }]; } });
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1LWxvZ2luLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHJ1LWNvbW1vbi1saWIvc3JjL2xpYi9jb21wb25lbnRzL2xvZ2luL3RydS1sb2dpbi50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3RydS1jb21tb24tbGliL3NyYy9saWIvY29tcG9uZW50cy9sb2dpbi90cnUtbG9naW4uaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7Ozs7Ozs7QUFVcEUsTUFBTSxPQUFPLFFBQVE7SUFRbkIsWUFBb0IsSUFBYTtRQUFiLFNBQUksR0FBSixJQUFJLENBQVM7UUFQakMsY0FBUyxHQUFHLElBQUksU0FBUyxDQUFDO1lBQ3hCLFFBQVEsRUFBRSxJQUFJLFdBQVcsQ0FBQyxFQUFFLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQztZQUNsRCxRQUFRLEVBQUUsSUFBSSxXQUFXLENBQUMsRUFBRSxFQUFFLFVBQVUsQ0F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gICAgPGlucHV0IG1hdElucHV0IHR5cGU9XCJwYXNzd29yZFwiIGZvcm1Db250cm9sTmFtZT1cInBhc3N3b3JkXCIgcGxhY2Vob2xkZXI9XCJQYXNzd29yZFwiPlxyXG4gICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XHJcbiAgICAgICAgPGRpdiAqbmdJZj1cImxvZ2luRXJyb3JcIiBjbGFzcz1cImFuaW1hdGUtbG9naW4tZXJyb3IgYW5pbWF0ZWQgcnViYmVyQmFuZFwiPlxyXG4gICAgICAgICAgPHAgc3R5bGU9XCJjb2xvcjogcmVkOyBmb250LXdlaWdodDogYm9sZDtcIj4ge3sgbG9naW5FcnJvciB9fTwvcD5cclxuICAgICAgICA8L2Rpdj5cclxuICAgICAgPC9tYXQtY2FyZC1jb250ZW50PlxyXG4gICAgICA8bWF0LWNhcmQtYWN0aW9ucz5cclxuICAgICAgICA8YnV0dG9uIG1hdC1yYWlzZWQtYnV0dG9uIGNvbG9yPVwicHJpbWFyeVwiIHR5cGU9XCJzdWJtaXRcIiBbZGlzYWJsZWRdPVwiaXNEaXNhYmxlZCgpXCI+TG9naW48L2J1dHRvbj5cclxuICAgICAgPC9tYXQtY2FyZC1hY3Rpb25zPlxyXG4gICAgPC9tYXQtY2FyZD5cclxuICA8L2Zvcm0+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { Component, ViewEncapsulation } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "
|
|
4
|
-
import * as i2 from "
|
|
5
|
-
import * as i3 from "@angular/material/
|
|
3
|
+
import * as i1 from "../../../services/tru-app-environment";
|
|
4
|
+
import * as i2 from "../../login/services/tru-auth";
|
|
5
|
+
import * as i3 from "@angular/material/menu";
|
|
6
|
+
import * as i4 from "@angular/material/button";
|
|
7
|
+
import * as i5 from "@angular/material/icon";
|
|
6
8
|
export class TruToolbarUserProfile {
|
|
7
|
-
constructor() {
|
|
9
|
+
constructor(appEnvironment, auth) {
|
|
10
|
+
this.appEnvironment = appEnvironment;
|
|
11
|
+
this.auth = auth;
|
|
12
|
+
this.onChangePasswordButtonClicked = () => {
|
|
13
|
+
};
|
|
14
|
+
this.onLogoutButtonClicked = () => {
|
|
15
|
+
this.auth.logout();
|
|
16
|
+
};
|
|
17
|
+
}
|
|
8
18
|
}
|
|
9
|
-
TruToolbarUserProfile.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruToolbarUserProfile, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
-
TruToolbarUserProfile.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruToolbarUserProfile, selector: "tru-toolbar-user-profile", ngImport: i0, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <p>Noah Dykoski</p>\r\n
|
|
19
|
+
TruToolbarUserProfile.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruToolbarUserProfile, deps: [{ token: i1.TruAppEnvironment }, { token: i2.TruAuth }], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
TruToolbarUserProfile.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruToolbarUserProfile, selector: "tru-toolbar-user-profile", ngImport: i0, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <div class=\"tru-toolbar-user-profile-menu-text-container\">\r\n <p>Noah Dykoski</p>\r\n <p>noah@arkware.com</p>\r\n </div>\r\n <button mat-menu-item\r\n (click)=\"onChangePasswordButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Change Password\r\n </button>\r\n <button mat-menu-item\r\n (click)=\"onLogoutButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Logout\r\n </button>\r\n </div>\r\n</mat-menu>\r\n", styles: [".tru-toolbar-user-profile{height:25px;float:right}.tru-toolbar-user-profile button{height:23px;width:23px;margin-right:10px;margin-top:1px;font-size:12px;box-shadow:none}.tru-toolbar-user-profile-menu-container{width:250px}.tru-toolbar-user-profile-menu-container mat-icon{height:50px;width:50px;margin:auto;display:flex;justify-content:center;color:#006dcc}.tru-toolbar-user-profile-menu-container p{margin:5px;font-size:14px;text-align:center}.tru-toolbar-user-profile-menu-container .tru-toolbar-user-profile-menu-logout-button{display:flex;justify-content:center}.tru-toolbar-user-profile-menu-text-container{margin-top:-15px}.tru-toolbar-user-profile-menu-circle-icon-text{color:#fff;font-weight:200;font-size:30px;margin-right:12px;display:block;margin-left:12px;display:flex;justify-content:center;position:relative;z-index:100;top:-35px}\n"], dependencies: [{ kind: "component", type: i3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
11
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruToolbarUserProfile, decorators: [{
|
|
12
22
|
type: Component,
|
|
13
|
-
args: [{ selector: 'tru-toolbar-user-profile', encapsulation: ViewEncapsulation.None, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <p>Noah Dykoski</p>\r\n
|
|
14
|
-
}], ctorParameters: function () { return []; } });
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
args: [{ selector: 'tru-toolbar-user-profile', encapsulation: ViewEncapsulation.None, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <div class=\"tru-toolbar-user-profile-menu-text-container\">\r\n <p>Noah Dykoski</p>\r\n <p>noah@arkware.com</p>\r\n </div>\r\n <button mat-menu-item\r\n (click)=\"onChangePasswordButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Change Password\r\n </button>\r\n <button mat-menu-item\r\n (click)=\"onLogoutButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Logout\r\n </button>\r\n </div>\r\n</mat-menu>\r\n", styles: [".tru-toolbar-user-profile{height:25px;float:right}.tru-toolbar-user-profile button{height:23px;width:23px;margin-right:10px;margin-top:1px;font-size:12px;box-shadow:none}.tru-toolbar-user-profile-menu-container{width:250px}.tru-toolbar-user-profile-menu-container mat-icon{height:50px;width:50px;margin:auto;display:flex;justify-content:center;color:#006dcc}.tru-toolbar-user-profile-menu-container p{margin:5px;font-size:14px;text-align:center}.tru-toolbar-user-profile-menu-container .tru-toolbar-user-profile-menu-logout-button{display:flex;justify-content:center}.tru-toolbar-user-profile-menu-text-container{margin-top:-15px}.tru-toolbar-user-profile-menu-circle-icon-text{color:#fff;font-weight:200;font-size:30px;margin-right:12px;display:block;margin-left:12px;display:flex;justify-content:center;position:relative;z-index:100;top:-35px}\n"] }]
|
|
24
|
+
}], ctorParameters: function () { return [{ type: i1.TruAppEnvironment }, { type: i2.TruAuth }]; } });
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1LXRvb2xiYXItdXNlci1wcm9maWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHJ1LWNvbW1vbi1saWIvc3JjL2xpYi9jb21wb25lbnRzL3Rvb2xiYXIvdXNlci1wcm9maWxlL3RydS10b29sYmFyLXVzZXItcHJvZmlsZS50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3RydS1jb21tb24tbGliL3NyYy9saWIvY29tcG9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G4gICAgPHNwYW4gY2xhc3M9XCJ0cnUtdG9vbGJhci11c2VyLXByb2ZpbGUtbWVudS1jaXJjbGUtaWNvbi10ZXh0XCI+Tjwvc3Bhbj5cclxuICAgIDxkaXYgY2xhc3M9XCJ0cnUtdG9vbGJhci11c2VyLXByb2ZpbGUtbWVudS10ZXh0LWNvbnRhaW5lclwiPlxyXG4gICAgICA8cD5Ob2FoIER5a29za2k8L3A+XHJcbiAgICAgIDxwPm5vYWhAYXJrd2FyZS5jb208L3A+XHJcbiAgICA8L2Rpdj5cclxuICAgIDxidXR0b24gbWF0LW1lbnUtaXRlbVxyXG4gICAgICAgICAgICAoY2xpY2spPVwib25DaGFuZ2VQYXNzd29yZEJ1dHRvbkNsaWNrZWQoKVwiXHJcbiAgICAgICAgICAgIGNsYXNzPVwidHJ1LXRvb2xiYXItdXNlci1wcm9maWxlLW1lbnUtbG9nb3V0LWJ1dHRvblwiPlxyXG4gICAgICBDaGFuZ2UgUGFzc3dvcmRcclxuICAgIDwvYnV0dG9uPlxyXG4gICAgPGJ1dHRvbiBtYXQtbWVudS1pdGVtXHJcbiAgICAgICAgICAgIChjbGljayk9XCJvbkxvZ291dEJ1dHRvbkNsaWNrZWQoKVwiXHJcbiAgICAgICAgICAgIGNsYXNzPVwidHJ1LXRvb2xiYXItdXNlci1wcm9maWxlLW1lbnUtbG9nb3V0LWJ1dHRvblwiPlxyXG4gICAgICBMb2dvdXRcclxuICAgIDwvYnV0dG9uPlxyXG4gIDwvZGl2PlxyXG48L21hdC1tZW51PlxyXG4iXX0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Injectable, Component, Inject, HostListener, NgModule, EventEmitter, ViewEncapsulation, Output, APP_INITIALIZER, ViewChildren, ViewChild
|
|
2
|
+
import { Directive, Input, Injectable, Component, Inject, HostListener, NgModule, EventEmitter, ViewEncapsulation, Output, InjectionToken, APP_INITIALIZER, ViewChildren, ViewChild } from '@angular/core';
|
|
3
3
|
import { EntityAspect, MetadataStore, EntityManager, DataService, EntityQuery, Predicate, FetchStrategy, EntityState, EntityAction, BinaryPredicate, AndOrPredicate, breeze } from 'breeze-client';
|
|
4
4
|
import { BehaviorSubject, defer, from, of, Subject, Observable, skip, forkJoin, throwError } from 'rxjs';
|
|
5
5
|
import * as _ from 'underscore';
|
|
@@ -43,7 +43,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
43
43
|
import * as i5$1 from '@angular/material/input';
|
|
44
44
|
import { MatInputModule } from '@angular/material/input';
|
|
45
45
|
import { MatListModule } from '@angular/material/list';
|
|
46
|
-
import * as
|
|
46
|
+
import * as i3$3 from '@angular/material/menu';
|
|
47
47
|
import { MatMenuModule } from '@angular/material/menu';
|
|
48
48
|
import * as i5 from '@angular/material/core';
|
|
49
49
|
import { MatNativeDateModule, MatRippleModule, MatOptionModule } from '@angular/material/core';
|
|
@@ -71,12 +71,12 @@ import moment$1 from 'moment';
|
|
|
71
71
|
import * as i8 from 'ag-grid-angular';
|
|
72
72
|
import { AgGridModule } from 'ag-grid-angular';
|
|
73
73
|
import * as i3$2 from '@angular/material/form-field';
|
|
74
|
-
import * as i1$8 from '@angular/platform-browser';
|
|
75
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
76
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
77
74
|
import { tap, map, catchError } from 'rxjs/operators';
|
|
78
|
-
import * as i1$
|
|
75
|
+
import * as i1$6 from '@angular/router';
|
|
79
76
|
import { RouterModule } from '@angular/router';
|
|
77
|
+
import * as i1$7 from '@angular/platform-browser';
|
|
78
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
79
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
80
80
|
|
|
81
81
|
class TruComponentConfigBase {
|
|
82
82
|
constructor() { }
|
|
@@ -3568,15 +3568,107 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
3568
3568
|
}]
|
|
3569
3569
|
}] });
|
|
3570
3570
|
|
|
3571
|
+
const TRU_AUTH_CONFIG = {
|
|
3572
|
+
baseUrl: "https://localhost:44303",
|
|
3573
|
+
authUrl: "/api/auth",
|
|
3574
|
+
auth: "token",
|
|
3575
|
+
};
|
|
3576
|
+
const TRU_AUTH_STRATEGY = new InjectionToken("AuthStrategy");
|
|
3577
|
+
|
|
3578
|
+
class TruAuthCache {
|
|
3579
|
+
constructor() {
|
|
3580
|
+
this.prunables = [];
|
|
3581
|
+
}
|
|
3582
|
+
registerPrunable(prunable) {
|
|
3583
|
+
this.prunables.push(prunable);
|
|
3584
|
+
}
|
|
3585
|
+
pruneAll() {
|
|
3586
|
+
this.prunables.forEach((p) => p.pruneCache());
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
TruAuthCache.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuthCache, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3590
|
+
TruAuthCache.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuthCache, providedIn: "root" });
|
|
3591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuthCache, decorators: [{
|
|
3592
|
+
type: Injectable,
|
|
3593
|
+
args: [{
|
|
3594
|
+
providedIn: "root",
|
|
3595
|
+
}]
|
|
3596
|
+
}] });
|
|
3597
|
+
|
|
3598
|
+
class TruAuth {
|
|
3599
|
+
constructor(router, http, cache, environment, auth) {
|
|
3600
|
+
this.router = router;
|
|
3601
|
+
this.http = http;
|
|
3602
|
+
this.cache = cache;
|
|
3603
|
+
this.environment = environment;
|
|
3604
|
+
this.auth = auth;
|
|
3605
|
+
this.loggedIn = new BehaviorSubject(false);
|
|
3606
|
+
this.baseUrl = '';
|
|
3607
|
+
this.baseUrl = this.environment.appUri;
|
|
3608
|
+
}
|
|
3609
|
+
login(loginRequest) {
|
|
3610
|
+
return this.http
|
|
3611
|
+
.post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/login`, loginRequest)
|
|
3612
|
+
.pipe(tap((data) => {
|
|
3613
|
+
this.auth.doLoginUser(data);
|
|
3614
|
+
this.loggedIn.next(true);
|
|
3615
|
+
}));
|
|
3616
|
+
}
|
|
3617
|
+
logout() {
|
|
3618
|
+
this.doLogoutUser();
|
|
3619
|
+
}
|
|
3620
|
+
isLoggedIn$() {
|
|
3621
|
+
return this.auth.getCurrentUser().pipe(map(() => true), catchError(() => of(false)));
|
|
3622
|
+
}
|
|
3623
|
+
get isLoggedIn() {
|
|
3624
|
+
if (!this.loggedIn.value) {
|
|
3625
|
+
this.loggedIn.next(this.auth.isLoggedIn());
|
|
3626
|
+
}
|
|
3627
|
+
return this.loggedIn.asObservable();
|
|
3628
|
+
}
|
|
3629
|
+
getCurrentUser$() {
|
|
3630
|
+
return this.auth.getCurrentUser();
|
|
3631
|
+
}
|
|
3632
|
+
doLogoutAndRedirectToLogin() {
|
|
3633
|
+
this.doLogoutUser();
|
|
3634
|
+
this.router.navigate([""]);
|
|
3635
|
+
}
|
|
3636
|
+
doLogoutUser() {
|
|
3637
|
+
this.cache.pruneAll();
|
|
3638
|
+
this.auth.doLogoutUser();
|
|
3639
|
+
}
|
|
3640
|
+
}
|
|
3641
|
+
TruAuth.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuth, deps: [{ token: i1$6.Router }, { token: i1$3.HttpClient }, { token: TruAuthCache }, { token: TruAppEnvironment }, { token: TRU_AUTH_STRATEGY }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3642
|
+
TruAuth.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuth, providedIn: "root" });
|
|
3643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuth, decorators: [{
|
|
3644
|
+
type: Injectable,
|
|
3645
|
+
args: [{
|
|
3646
|
+
providedIn: "root",
|
|
3647
|
+
}]
|
|
3648
|
+
}], ctorParameters: function () {
|
|
3649
|
+
return [{ type: i1$6.Router }, { type: i1$3.HttpClient }, { type: TruAuthCache }, { type: TruAppEnvironment }, { type: undefined, decorators: [{
|
|
3650
|
+
type: Inject,
|
|
3651
|
+
args: [TRU_AUTH_STRATEGY]
|
|
3652
|
+
}] }];
|
|
3653
|
+
} });
|
|
3654
|
+
|
|
3571
3655
|
class TruToolbarUserProfile {
|
|
3572
|
-
constructor() {
|
|
3656
|
+
constructor(appEnvironment, auth) {
|
|
3657
|
+
this.appEnvironment = appEnvironment;
|
|
3658
|
+
this.auth = auth;
|
|
3659
|
+
this.onChangePasswordButtonClicked = () => {
|
|
3660
|
+
};
|
|
3661
|
+
this.onLogoutButtonClicked = () => {
|
|
3662
|
+
this.auth.logout();
|
|
3663
|
+
};
|
|
3664
|
+
}
|
|
3573
3665
|
}
|
|
3574
|
-
TruToolbarUserProfile.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruToolbarUserProfile, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3575
|
-
TruToolbarUserProfile.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruToolbarUserProfile, selector: "tru-toolbar-user-profile", ngImport: i0, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <p>Noah Dykoski</p>\r\n
|
|
3666
|
+
TruToolbarUserProfile.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruToolbarUserProfile, deps: [{ token: TruAppEnvironment }, { token: TruAuth }], target: i0.ɵɵFactoryTarget.Component });
|
|
3667
|
+
TruToolbarUserProfile.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruToolbarUserProfile, selector: "tru-toolbar-user-profile", ngImport: i0, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <div class=\"tru-toolbar-user-profile-menu-text-container\">\r\n <p>Noah Dykoski</p>\r\n <p>noah@arkware.com</p>\r\n </div>\r\n <button mat-menu-item\r\n (click)=\"onChangePasswordButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Change Password\r\n </button>\r\n <button mat-menu-item\r\n (click)=\"onLogoutButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Logout\r\n </button>\r\n </div>\r\n</mat-menu>\r\n", styles: [".tru-toolbar-user-profile{height:25px;float:right}.tru-toolbar-user-profile button{height:23px;width:23px;margin-right:10px;margin-top:1px;font-size:12px;box-shadow:none}.tru-toolbar-user-profile-menu-container{width:250px}.tru-toolbar-user-profile-menu-container mat-icon{height:50px;width:50px;margin:auto;display:flex;justify-content:center;color:#006dcc}.tru-toolbar-user-profile-menu-container p{margin:5px;font-size:14px;text-align:center}.tru-toolbar-user-profile-menu-container .tru-toolbar-user-profile-menu-logout-button{display:flex;justify-content:center}.tru-toolbar-user-profile-menu-text-container{margin-top:-15px}.tru-toolbar-user-profile-menu-circle-icon-text{color:#fff;font-weight:200;font-size:30px;margin-right:12px;display:block;margin-left:12px;display:flex;justify-content:center;position:relative;z-index:100;top:-35px}\n"], dependencies: [{ kind: "component", type: i3$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i3.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3576
3668
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruToolbarUserProfile, decorators: [{
|
|
3577
3669
|
type: Component,
|
|
3578
|
-
args: [{ selector: 'tru-toolbar-user-profile', encapsulation: ViewEncapsulation.None, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <p>Noah Dykoski</p>\r\n
|
|
3579
|
-
}], ctorParameters: function () { return []; } });
|
|
3670
|
+
args: [{ selector: 'tru-toolbar-user-profile', encapsulation: ViewEncapsulation.None, template: "<div class=\"tru-toolbar-user-profile\">\r\n <button mat-mini-fab color=\"primary\" class=\"tru-toolbar-user-profile-user-button\" [matMenuTriggerFor]=\"userMenu\">\r\n N\r\n </button>\r\n</div>\r\n<mat-menu #userMenu=\"matMenu\">\r\n <div class=\"tru-toolbar-user-profile-menu-container\">\r\n <mat-icon class=\"tru-toolbar-user-profile-menu-circle-icon\" [svgIcon]=\"'circle-icon'\">N</mat-icon>\r\n <span class=\"tru-toolbar-user-profile-menu-circle-icon-text\">N</span>\r\n <div class=\"tru-toolbar-user-profile-menu-text-container\">\r\n <p>Noah Dykoski</p>\r\n <p>noah@arkware.com</p>\r\n </div>\r\n <button mat-menu-item\r\n (click)=\"onChangePasswordButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Change Password\r\n </button>\r\n <button mat-menu-item\r\n (click)=\"onLogoutButtonClicked()\"\r\n class=\"tru-toolbar-user-profile-menu-logout-button\">\r\n Logout\r\n </button>\r\n </div>\r\n</mat-menu>\r\n", styles: [".tru-toolbar-user-profile{height:25px;float:right}.tru-toolbar-user-profile button{height:23px;width:23px;margin-right:10px;margin-top:1px;font-size:12px;box-shadow:none}.tru-toolbar-user-profile-menu-container{width:250px}.tru-toolbar-user-profile-menu-container mat-icon{height:50px;width:50px;margin:auto;display:flex;justify-content:center;color:#006dcc}.tru-toolbar-user-profile-menu-container p{margin:5px;font-size:14px;text-align:center}.tru-toolbar-user-profile-menu-container .tru-toolbar-user-profile-menu-logout-button{display:flex;justify-content:center}.tru-toolbar-user-profile-menu-text-container{margin-top:-15px}.tru-toolbar-user-profile-menu-circle-icon-text{color:#fff;font-weight:200;font-size:30px;margin-right:12px;display:block;margin-left:12px;display:flex;justify-content:center;position:relative;z-index:100;top:-35px}\n"] }]
|
|
3671
|
+
}], ctorParameters: function () { return [{ type: TruAppEnvironment }, { type: TruAuth }]; } });
|
|
3580
3672
|
|
|
3581
3673
|
class TruToolbarUserProfileModule {
|
|
3582
3674
|
}
|
|
@@ -5703,90 +5795,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
5703
5795
|
}]
|
|
5704
5796
|
}] });
|
|
5705
5797
|
|
|
5706
|
-
const TRU_AUTH_CONFIG = {
|
|
5707
|
-
baseUrl: "https://localhost:44303",
|
|
5708
|
-
authUrl: "/api/auth",
|
|
5709
|
-
auth: "token",
|
|
5710
|
-
};
|
|
5711
|
-
const TRU_AUTH_STRATEGY = new InjectionToken("AuthStrategy");
|
|
5712
|
-
|
|
5713
|
-
class TruAuthCache {
|
|
5714
|
-
constructor() {
|
|
5715
|
-
this.prunables = [];
|
|
5716
|
-
}
|
|
5717
|
-
registerPrunable(prunable) {
|
|
5718
|
-
this.prunables.push(prunable);
|
|
5719
|
-
}
|
|
5720
|
-
pruneAll() {
|
|
5721
|
-
this.prunables.forEach((p) => p.pruneCache());
|
|
5722
|
-
}
|
|
5723
|
-
}
|
|
5724
|
-
TruAuthCache.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuthCache, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5725
|
-
TruAuthCache.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuthCache, providedIn: "root" });
|
|
5726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuthCache, decorators: [{
|
|
5727
|
-
type: Injectable,
|
|
5728
|
-
args: [{
|
|
5729
|
-
providedIn: "root",
|
|
5730
|
-
}]
|
|
5731
|
-
}] });
|
|
5732
|
-
|
|
5733
|
-
class TruAuth {
|
|
5734
|
-
constructor(router, http, cache, environment, auth) {
|
|
5735
|
-
this.router = router;
|
|
5736
|
-
this.http = http;
|
|
5737
|
-
this.cache = cache;
|
|
5738
|
-
this.environment = environment;
|
|
5739
|
-
this.auth = auth;
|
|
5740
|
-
this.loggedIn = new BehaviorSubject(false);
|
|
5741
|
-
this.baseUrl = '';
|
|
5742
|
-
this.baseUrl = this.environment.appUri;
|
|
5743
|
-
}
|
|
5744
|
-
login(loginRequest) {
|
|
5745
|
-
return this.http
|
|
5746
|
-
.post(`${this.baseUrl}${TRU_AUTH_CONFIG.authUrl}/login`, loginRequest)
|
|
5747
|
-
.pipe(tap((data) => {
|
|
5748
|
-
this.auth.doLoginUser(data);
|
|
5749
|
-
this.loggedIn.next(true);
|
|
5750
|
-
}));
|
|
5751
|
-
}
|
|
5752
|
-
logout() {
|
|
5753
|
-
this.doLogoutUser();
|
|
5754
|
-
}
|
|
5755
|
-
isLoggedIn$() {
|
|
5756
|
-
return this.auth.getCurrentUser().pipe(map(() => true), catchError(() => of(false)));
|
|
5757
|
-
}
|
|
5758
|
-
get isLoggedIn() {
|
|
5759
|
-
if (!this.loggedIn.value) {
|
|
5760
|
-
this.loggedIn.next(this.auth.isLoggedIn());
|
|
5761
|
-
}
|
|
5762
|
-
return this.loggedIn.asObservable();
|
|
5763
|
-
}
|
|
5764
|
-
getCurrentUser$() {
|
|
5765
|
-
return this.auth.getCurrentUser();
|
|
5766
|
-
}
|
|
5767
|
-
doLogoutAndRedirectToLogin() {
|
|
5768
|
-
this.doLogoutUser();
|
|
5769
|
-
this.router.navigate([""]);
|
|
5770
|
-
}
|
|
5771
|
-
doLogoutUser() {
|
|
5772
|
-
this.cache.pruneAll();
|
|
5773
|
-
this.auth.doLogoutUser();
|
|
5774
|
-
}
|
|
5775
|
-
}
|
|
5776
|
-
TruAuth.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuth, deps: [{ token: i1$7.Router }, { token: i1$3.HttpClient }, { token: TruAuthCache }, { token: TruAppEnvironment }, { token: TRU_AUTH_STRATEGY }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5777
|
-
TruAuth.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuth, providedIn: "root" });
|
|
5778
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruAuth, decorators: [{
|
|
5779
|
-
type: Injectable,
|
|
5780
|
-
args: [{
|
|
5781
|
-
providedIn: "root",
|
|
5782
|
-
}]
|
|
5783
|
-
}], ctorParameters: function () {
|
|
5784
|
-
return [{ type: i1$7.Router }, { type: i1$3.HttpClient }, { type: TruAuthCache }, { type: TruAppEnvironment }, { type: undefined, decorators: [{
|
|
5785
|
-
type: Inject,
|
|
5786
|
-
args: [TRU_AUTH_STRATEGY]
|
|
5787
|
-
}] }];
|
|
5788
|
-
} });
|
|
5789
|
-
|
|
5790
5798
|
class TruLogin {
|
|
5791
5799
|
constructor(auth) {
|
|
5792
5800
|
this.auth = auth;
|
|
@@ -5795,6 +5803,10 @@ class TruLogin {
|
|
|
5795
5803
|
password: new FormControl('', Validators.required)
|
|
5796
5804
|
});
|
|
5797
5805
|
this.loginError = "";
|
|
5806
|
+
this.isLoggingIn = false;
|
|
5807
|
+
this.isDisabled = () => {
|
|
5808
|
+
return !this.f.username.value || !this.f.password.value || this.isLoggingIn;
|
|
5809
|
+
};
|
|
5798
5810
|
}
|
|
5799
5811
|
get f() {
|
|
5800
5812
|
return this.loginForm.controls;
|
|
@@ -5805,27 +5817,27 @@ class TruLogin {
|
|
|
5805
5817
|
password: this.f.password.value
|
|
5806
5818
|
};
|
|
5807
5819
|
if (loginRequest.username && loginRequest.password) {
|
|
5820
|
+
this.isLoggingIn = true;
|
|
5808
5821
|
this.auth
|
|
5809
5822
|
.login(loginRequest)
|
|
5810
|
-
.subscribe((user) =>
|
|
5811
|
-
|
|
5812
|
-
|
|
5823
|
+
.subscribe((user) => {
|
|
5824
|
+
this.isLoggingIn = false;
|
|
5825
|
+
}, (error) => {
|
|
5813
5826
|
if (error.status === 401) {
|
|
5814
5827
|
this.loginError = "Incorrect username and/or password";
|
|
5815
5828
|
}
|
|
5816
5829
|
else {
|
|
5817
5830
|
this.loginError = "Invalid Login - Error: " + error.status;
|
|
5818
5831
|
}
|
|
5819
|
-
//if
|
|
5820
5832
|
});
|
|
5821
5833
|
}
|
|
5822
5834
|
}
|
|
5823
5835
|
}
|
|
5824
5836
|
TruLogin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruLogin, deps: [{ token: TruAuth }], target: i0.ɵɵFactoryTarget.Component });
|
|
5825
|
-
TruLogin.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruLogin, selector: "tru-login", ngImport: i0, template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\">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}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
5837
|
+
TruLogin.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruLogin, selector: "tru-login", ngImport: i0, template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
5826
5838
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruLogin, decorators: [{
|
|
5827
5839
|
type: Component,
|
|
5828
|
-
args: [{ selector: 'tru-login', template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\">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}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"] }]
|
|
5840
|
+
args: [{ selector: 'tru-login', template: "<div class=\"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> loginFormTitle </mat-card-title>\r\n </mat-card-header>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <mat-label>Username</mat-label>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-label>Password</mat-label>\r\n <input matInput type=\"password\" formControlName=\"password\" placeholder=\"Password\">\r\n </mat-form-field>\r\n <div *ngIf=\"loginError\" class=\"animate-login-error animated rubberBand\">\r\n <p style=\"color: red; font-weight: bold;\"> {{ loginError }}</p>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isDisabled()\">Login</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n</div>\r\n", styles: [".login-container{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;padding:0}.login-input{margin-bottom:20px}.animate-login{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;margin-top:50px}mat-card{max-width:300px;width:100%;max-height:300px;padding:20px}.form-group{width:100%;max-width:400px;margin-bottom:20px}.wrapper{display:flex;justify-content:center;align-items:center;height:100vh}\n"] }]
|
|
5829
5841
|
}], ctorParameters: function () { return [{ type: TruAuth }]; } });
|
|
5830
5842
|
|
|
5831
5843
|
class TruAuthJwtStrategy {
|
|
@@ -5949,7 +5961,7 @@ const routes = [
|
|
|
5949
5961
|
class TruLoginModule {
|
|
5950
5962
|
}
|
|
5951
5963
|
TruLoginModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruLoginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5952
|
-
TruLoginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: TruLoginModule, declarations: [TruLogin], imports: [CommonModule, MaterialModule, FormsModule, ReactiveFormsModule, i1$
|
|
5964
|
+
TruLoginModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: TruLoginModule, declarations: [TruLogin], imports: [CommonModule, MaterialModule, FormsModule, ReactiveFormsModule, i1$6.RouterModule], exports: [TruLogin] });
|
|
5953
5965
|
TruLoginModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruLoginModule, providers: [
|
|
5954
5966
|
{
|
|
5955
5967
|
provide: HTTP_INTERCEPTORS,
|
|
@@ -6571,7 +6583,7 @@ class TruIconModule {
|
|
|
6571
6583
|
iconRegistry.addSvgIconLiteral("more-icon", sanitizer.bypassSecurityTrustHtml(CIRCLE_ICON));
|
|
6572
6584
|
}
|
|
6573
6585
|
}
|
|
6574
|
-
TruIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruIconModule, deps: [{ token: i1$
|
|
6586
|
+
TruIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruIconModule, deps: [{ token: i1$7.DomSanitizer }, { token: i2.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6575
6587
|
TruIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: TruIconModule, imports: [CommonModule, FormsModule] });
|
|
6576
6588
|
TruIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruIconModule, imports: [CommonModule, FormsModule] });
|
|
6577
6589
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruIconModule, decorators: [{
|
|
@@ -6581,7 +6593,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
6581
6593
|
declarations: [],
|
|
6582
6594
|
exports: []
|
|
6583
6595
|
}]
|
|
6584
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
6596
|
+
}], ctorParameters: function () { return [{ type: i1$7.DomSanitizer }, { type: i2.MatIconRegistry }]; } });
|
|
6585
6597
|
|
|
6586
6598
|
const EQUAL_ICON = `
|
|
6587
6599
|
<svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M17,16V14H7V16H17M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H19M17,10V8H7V10H17Z" /></svg>
|
|
@@ -6615,7 +6627,7 @@ class TruSearchIconModule {
|
|
|
6615
6627
|
iconRegistry.addSvgIconLiteral("contains-operator-icon", sanitizer.bypassSecurityTrustHtml(CONTAINS_ICON));
|
|
6616
6628
|
}
|
|
6617
6629
|
}
|
|
6618
|
-
TruSearchIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruSearchIconModule, deps: [{ token: i1$
|
|
6630
|
+
TruSearchIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruSearchIconModule, deps: [{ token: i1$7.DomSanitizer }, { token: i2.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6619
6631
|
TruSearchIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: TruSearchIconModule, imports: [CommonModule, FormsModule] });
|
|
6620
6632
|
TruSearchIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruSearchIconModule, imports: [CommonModule, FormsModule] });
|
|
6621
6633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruSearchIconModule, decorators: [{
|
|
@@ -6625,7 +6637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
6625
6637
|
declarations: [],
|
|
6626
6638
|
exports: []
|
|
6627
6639
|
}]
|
|
6628
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
6640
|
+
}], ctorParameters: function () { return [{ type: i1$7.DomSanitizer }, { type: i2.MatIconRegistry }]; } });
|
|
6629
6641
|
|
|
6630
6642
|
class TruCommonModule {
|
|
6631
6643
|
}
|