@cleavelandprice/ngx-lib 4.8.12 → 4.8.14

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.
@@ -1,20 +1,25 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Optional, Inject, Injectable, ChangeDetectionStrategy, Component, input, SkipSelf, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, Optional, Inject, Injectable, signal, computed, afterNextRender, ChangeDetectionStrategy, Component, input, SkipSelf, NgModule } from '@angular/core';
3
3
  import { JwtHelperService } from '@auth0/angular-jwt';
4
4
  import { SharePointService } from '@cleavelandprice/ngx-lib/sharepoint';
5
5
  import { AuthenticationTokenService } from '@cleavelandprice/ngx-lib/authentication/token';
6
- import * as i2 from '@angular/forms';
7
- import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
6
+ import { schema, required, debounce, validate, form, apply, FormField } from '@angular/forms/signals';
8
7
  import * as i1 from '@angular/material/dialog';
9
8
  import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
10
9
  import { MatButton, MatButtonModule } from '@angular/material/button';
11
- import { MatFormField, MatFormFieldModule } from '@angular/material/form-field';
12
- import { MatIcon, MatIconModule } from '@angular/material/icon';
10
+ import * as i2 from '@angular/material/form-field';
11
+ import { MatFormFieldModule } from '@angular/material/form-field';
12
+ import * as i3 from '@angular/material/icon';
13
+ import { MatIconModule, MatIcon } from '@angular/material/icon';
13
14
  import { MatInput, MatInputModule } from '@angular/material/input';
14
15
  import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
15
16
  import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
17
+ import * as i4 from '@angular/material/tooltip';
18
+ import { MatTooltipModule } from '@angular/material/tooltip';
19
+ import { ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';
16
20
  import { ConfirmationComponent } from '@cleavelandprice/ngx-lib/dialog';
17
21
  import { CommonModule } from '@angular/common';
22
+ import { ReactiveFormsModule } from '@angular/forms';
18
23
 
19
24
  const MatAuthenticationServiceOptionsToken = new InjectionToken('');
20
25
 
@@ -94,23 +99,107 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
94
99
  }] }] });
95
100
 
96
101
  class LoginFormComponent {
102
+ #data;
103
+ #credentialsModel;
104
+ #formSchema;
97
105
  constructor() {
98
106
  this.#data = inject(MAT_DIALOG_DATA);
99
107
  this.services = {
100
108
  dialogRef: inject((MatDialogRef)),
101
109
  authentication: inject(MatAuthenticationService),
110
+ activeDirectory: inject(ActiveDirectoryService),
102
111
  };
103
- this.form = new FormGroup({
104
- username: new FormControl(null, [Validators.required]),
105
- password: new FormControl(null, [Validators.required]),
106
- adminGroup: new FormControl(),
107
- additionalInfo: new FormControl(),
112
+ this.showPassword = signal(false, /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "showPassword" }] : /* istanbul ignore next */ []));
114
+ this.#credentialsModel = signal({
115
+ username: '',
116
+ password: ''
117
+ }, /* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "#credentialsModel" }] : /* istanbul ignore next */ []));
119
+ this.#formSchema = schema((schemaPath) => {
120
+ required(schemaPath.username);
121
+ required(schemaPath.password);
122
+ debounce(schemaPath.username, 500);
123
+ debounce(schemaPath.password, 500);
124
+ //#region Custom Validation
125
+ validate(schemaPath.username, ({ value, valueOf }) => {
126
+ if (!this.form().dirty()) {
127
+ return null;
128
+ }
129
+ const username = value();
130
+ if (!username) {
131
+ return {
132
+ kind: 'required',
133
+ message: 'Username is required'
134
+ };
135
+ }
136
+ if (username.includes(' ')) {
137
+ return {
138
+ kind: 'noSpaces',
139
+ message: 'Username cannot contain spaces'
140
+ };
141
+ }
142
+ if (!this.user()) {
143
+ return {
144
+ kind: 'invalidUsername',
145
+ message: 'User not found'
146
+ };
147
+ }
148
+ return null; // valid
149
+ });
150
+ //#endregion
151
+ });
152
+ this.form = form(this.#credentialsModel, (path) => apply(path, this.#formSchema));
153
+ this.users = signal([], /* @ts-ignore */
154
+ ...(ngDevMode ? [{ debugName: "users" }] : /* istanbul ignore next */ []));
155
+ this.gettingUsers = signal(false, /* @ts-ignore */
156
+ ...(ngDevMode ? [{ debugName: "gettingUsers" }] : /* istanbul ignore next */ []));
157
+ this.error = signal(null, /* @ts-ignore */
158
+ ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
159
+ this.user = computed(() => {
160
+ return this.form().value().username.trim() ?
161
+ this.users()
162
+ .find(u => u.sAMAccountName.toLowerCase() === this.form().value().username.toLowerCase() ||
163
+ u.employeeNumber === this.form().value().username ||
164
+ (u.mail &&
165
+ (u.mail.toLowerCase() ?? '') === this.form().value().username.toLowerCase())) :
166
+ undefined; // username is blank
167
+ }, /* @ts-ignore */
168
+ ...(ngDevMode ? [{ debugName: "user" }] : /* istanbul ignore next */ []));
169
+ this.userLabel = computed(() => {
170
+ const user = this.user();
171
+ return user?.department ?
172
+ // Valid user with a department
173
+ `<b>${user.displayName ?? user.sAMAccountName}</b>: ${user.department}` :
174
+ user ?
175
+ // Valid user, no department
176
+ (user.displayName ?? user.sAMAccountName) :
177
+ // No valid user
178
+ undefined;
179
+ }, /* @ts-ignore */
180
+ ...(ngDevMode ? [{ debugName: "userLabel" }] : /* istanbul ignore next */ []));
181
+ this.users.set(this.#data.users ?? []);
182
+ afterNextRender(() => {
183
+ if (!(this.users().length)) {
184
+ this.gettingUsers.set(true);
185
+ this.services.activeDirectory.getUsers(this.#data.additionalInfo ?? 'ngxLibLoginComponent')
186
+ .subscribe({
187
+ next: (users) => {
188
+ this.users.set(users);
189
+ this.gettingUsers.set(false);
190
+ },
191
+ error: (error) => {
192
+ console.log('Error while getting users', error);
193
+ this.error.set('Error while getting users');
194
+ this.gettingUsers.set(false);
195
+ }
196
+ });
197
+ }
108
198
  });
109
199
  }
110
- #data;
111
200
  ngOnInit() {
112
- this.form.get('adminGroup')?.setValue(this.#data.adminGroup);
113
- this.form.get('additionalInfo')?.setValue(this.#data.additionalInfo);
201
+ //this.form.get('adminGroup')?.setValue(this.#data.adminGroup);
202
+ //this.form.get('additionalInfo')?.setValue(this.#data.additionalInfo);
114
203
  this.authenticatedChangedSubscription =
115
204
  this.services.authentication.authenticatedChanged.subscribe(this.#authChangedHandler.bind(this));
116
205
  this.authenticationErrorSubscription =
@@ -121,9 +210,10 @@ class LoginFormComponent {
121
210
  this.authenticatedChangedSubscription.unsubscribe();
122
211
  }
123
212
  authenticate() {
124
- this.errorMessage = undefined;
125
- const { username, password, adminGroup, additionalInfo } = this.form.value;
126
- this.services.authentication.login(username, password, adminGroup, additionalInfo);
213
+ this.error.set(null);
214
+ //const { username, password, adminGroup, additionalInfo } = this.form.value;
215
+ const { username, password } = this.form().value();
216
+ this.services.authentication.login(username, password, this.#data.adminGroup, this.#data.additionalInfo);
127
217
  }
128
218
  #authChangedHandler(authenticated) {
129
219
  if (authenticated) {
@@ -132,7 +222,7 @@ class LoginFormComponent {
132
222
  }
133
223
  #errorHandler(err) {
134
224
  console.log('Authentication error', err);
135
- this.errorMessage = `${err.name}: ${err.statusText}`;
225
+ this.error.set(`${err.name}: ${err.statusText}`);
136
226
  }
137
227
  changeTokenStorageMode(checked) {
138
228
  const keyName = 'storeTokenInSession';
@@ -145,22 +235,28 @@ class LoginFormComponent {
145
235
  localStorage.setItem(keyName, 'true');
146
236
  }
147
237
  }
238
+ #usernameExists(username) {
239
+ return this.users()
240
+ .map(u => u.sAMAccountName.toLowerCase())
241
+ .some(u => u.toLowerCase() === username.toLowerCase());
242
+ }
148
243
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
149
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: LoginFormComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 mat-dialog-title>\r\n @if (services.authentication.authenticating()) {\r\n <span>Authenticating...</span>\r\n } @else {\r\n <span>Login</span>\r\n }\r\n</h2>\r\n\r\n<mat-dialog-content>\r\n @if (services.authentication.authenticating()) {\r\n <div id=\"spinner\">\r\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\r\n </div>\r\n } @else if (errorMessage) {\r\n <div id=\"error\">\r\n {{ errorMessage }}\r\n </div>\r\n } @else {\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\r\n </mat-form-field>\r\n @if (services.authentication.options.showRememberMeOption) {\r\n <mat-slide-toggle [checked]=\"!services.authentication.useSessionStorage\" (change)=\"changeTokenStorageMode($event.checked)\">\r\n Remember me next time\r\n </mat-slide-toggle>\r\n }\r\n </form>\r\n }\r\n</mat-dialog-content>\r\n\r\n@if (!services.authentication.authenticating()) {\r\n <mat-dialog-actions>\r\n <button mat-raised-button color=\"primary\" (click)=\"authenticate()\"\r\n [disabled]=\"form.invalid\">\r\n <mat-icon fontIcon=\"done\"/>\r\n <span>OK</span>\r\n </button>\r\n <button mat-raised-button (click)=\"services.dialogRef.close()\">\r\n <mat-icon fontIcon=\"close\"/>\r\n <span>Cancel</span>\r\n </button>\r\n </mat-dialog-actions>\r\n}", styles: ["#spinner{width:100%;height:100%;display:flex;justify-content:center;align-items:center}form{display:grid;gap:1rem}mat-dialog-actions{display:grid;justify-content:center;grid-template-columns:auto auto;gap:1rem}#error{color:red}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"], dependencies: [{ kind: "component", type: 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: "ngmodule", type: MatDialogModule }, { 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: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: 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: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "fullWidth", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
244
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: LoginFormComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 mat-dialog-title>\n @if (services.authentication.authenticating()) {\n <span>Authenticating...</span>\n } @else {\n <span>Login</span>\n }\n</h2>\n\n<mat-dialog-content>\n @if (services.authentication.authenticating() || gettingUsers()) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (error()) {\n <div id=\"error\">\n {{ error() }}\n </div>\n } @else {\n\n <form>\n <mat-form-field>\n <input matInput [formField]=\"form.username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n\n @if (form.username().value() && form.username().errors().length) {\n @for (error of form.username().errors(); track $index) {\n <mat-error>{{ error.message }}</mat-error>\n }\n }\n\n @if (userLabel()) {\n <mat-hint [innerHTML]=\"userLabel()\" />\n }\n </mat-form-field>\n\n <mat-form-field>\n <input matInput [formField]=\"form.password\"\n [type]=\"showPassword() ? 'text' : 'password'\"\n placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n\n <mat-icon matSuffix \n [matTooltip]=\"showPassword() ? 'Hide password' : 'Show password'\"\n aria-label=\"Show password\"\n (pointerdown)=\"$event.preventDefault(); showPassword.set(true)\"\n (pointerup)=\"showPassword.set(false)\"\n (pointercancel)=\"showPassword.set(false)\"\n (pointerleave)=\"showPassword.set(false)\">\n {{ showPassword() ? 'visibility_off' : 'visibility' }}\n </mat-icon>\n </mat-form-field>\n\n @if (services.authentication.options.showRememberMeOption) {\n <mat-slide-toggle [checked]=\"!services.authentication.useSessionStorage\" (change)=\"changeTokenStorageMode($event.checked)\">\n Remember me next time\n </mat-slide-toggle>\n }\n </form>\n }\n</mat-dialog-content>\n\n@if (!services.authentication.authenticating()) {\n <mat-dialog-actions>\n <button mat-raised-button color=\"primary\" (click)=\"authenticate()\"\n [disabled]=\"form().invalid()\">\n <mat-icon fontIcon=\"done\"/>\n <span>OK</span>\n </button>\n \n <button mat-raised-button (click)=\"services.dialogRef.close()\">\n <mat-icon fontIcon=\"close\"/>\n <span>Cancel</span>\n </button>\n </mat-dialog-actions>\n}", styles: ["#spinner{width:100%;height:100%;display:flex;justify-content:center;align-items:center}form{display:grid;gap:1rem}mat-form-field{width:500px}mat-dialog-actions{display:grid;justify-content:center;grid-template-columns:auto auto;gap:1rem}#error{color:red}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"], dependencies: [{ kind: "component", type: 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: "ngmodule", type: MatDialogModule }, { 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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: 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: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "fullWidth", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
150
245
  }
151
246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginFormComponent, decorators: [{
152
247
  type: Component,
153
248
  args: [{ imports: [
154
249
  MatButton,
155
250
  MatDialogModule,
156
- MatFormField,
157
- MatIcon,
251
+ MatFormFieldModule,
252
+ MatIconModule,
158
253
  MatInput,
159
254
  MatProgressSpinner,
160
255
  MatSlideToggle,
161
- ReactiveFormsModule,
162
- ], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<h2 mat-dialog-title>\r\n @if (services.authentication.authenticating()) {\r\n <span>Authenticating...</span>\r\n } @else {\r\n <span>Login</span>\r\n }\r\n</h2>\r\n\r\n<mat-dialog-content>\r\n @if (services.authentication.authenticating()) {\r\n <div id=\"spinner\">\r\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\r\n </div>\r\n } @else if (errorMessage) {\r\n <div id=\"error\">\r\n {{ errorMessage }}\r\n </div>\r\n } @else {\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\r\n </mat-form-field>\r\n @if (services.authentication.options.showRememberMeOption) {\r\n <mat-slide-toggle [checked]=\"!services.authentication.useSessionStorage\" (change)=\"changeTokenStorageMode($event.checked)\">\r\n Remember me next time\r\n </mat-slide-toggle>\r\n }\r\n </form>\r\n }\r\n</mat-dialog-content>\r\n\r\n@if (!services.authentication.authenticating()) {\r\n <mat-dialog-actions>\r\n <button mat-raised-button color=\"primary\" (click)=\"authenticate()\"\r\n [disabled]=\"form.invalid\">\r\n <mat-icon fontIcon=\"done\"/>\r\n <span>OK</span>\r\n </button>\r\n <button mat-raised-button (click)=\"services.dialogRef.close()\">\r\n <mat-icon fontIcon=\"close\"/>\r\n <span>Cancel</span>\r\n </button>\r\n </mat-dialog-actions>\r\n}", styles: ["#spinner{width:100%;height:100%;display:flex;justify-content:center;align-items:center}form{display:grid;gap:1rem}mat-dialog-actions{display:grid;justify-content:center;grid-template-columns:auto auto;gap:1rem}#error{color:red}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"] }]
163
- }] });
256
+ MatTooltipModule,
257
+ FormField
258
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<h2 mat-dialog-title>\n @if (services.authentication.authenticating()) {\n <span>Authenticating...</span>\n } @else {\n <span>Login</span>\n }\n</h2>\n\n<mat-dialog-content>\n @if (services.authentication.authenticating() || gettingUsers()) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (error()) {\n <div id=\"error\">\n {{ error() }}\n </div>\n } @else {\n\n <form>\n <mat-form-field>\n <input matInput [formField]=\"form.username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n\n @if (form.username().value() && form.username().errors().length) {\n @for (error of form.username().errors(); track $index) {\n <mat-error>{{ error.message }}</mat-error>\n }\n }\n\n @if (userLabel()) {\n <mat-hint [innerHTML]=\"userLabel()\" />\n }\n </mat-form-field>\n\n <mat-form-field>\n <input matInput [formField]=\"form.password\"\n [type]=\"showPassword() ? 'text' : 'password'\"\n placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n\n <mat-icon matSuffix \n [matTooltip]=\"showPassword() ? 'Hide password' : 'Show password'\"\n aria-label=\"Show password\"\n (pointerdown)=\"$event.preventDefault(); showPassword.set(true)\"\n (pointerup)=\"showPassword.set(false)\"\n (pointercancel)=\"showPassword.set(false)\"\n (pointerleave)=\"showPassword.set(false)\">\n {{ showPassword() ? 'visibility_off' : 'visibility' }}\n </mat-icon>\n </mat-form-field>\n\n @if (services.authentication.options.showRememberMeOption) {\n <mat-slide-toggle [checked]=\"!services.authentication.useSessionStorage\" (change)=\"changeTokenStorageMode($event.checked)\">\n Remember me next time\n </mat-slide-toggle>\n }\n </form>\n }\n</mat-dialog-content>\n\n@if (!services.authentication.authenticating()) {\n <mat-dialog-actions>\n <button mat-raised-button color=\"primary\" (click)=\"authenticate()\"\n [disabled]=\"form().invalid()\">\n <mat-icon fontIcon=\"done\"/>\n <span>OK</span>\n </button>\n \n <button mat-raised-button (click)=\"services.dialogRef.close()\">\n <mat-icon fontIcon=\"close\"/>\n <span>Cancel</span>\n </button>\n </mat-dialog-actions>\n}", styles: ["#spinner{width:100%;height:100%;display:flex;justify-content:center;align-items:center}form{display:grid;gap:1rem}mat-form-field{width:500px}mat-dialog-actions{display:grid;justify-content:center;grid-template-columns:auto auto;gap:1rem}#error{color:red}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"] }]
259
+ }], ctorParameters: () => [] });
164
260
 
165
261
  class LoginComponent {
166
262
  constructor() {
@@ -175,6 +271,8 @@ class LoginComponent {
175
271
  ...(ngDevMode ? [undefined, { debugName: "adminGroup" }] : /* istanbul ignore next */ []));
176
272
  this.additionalInfo = input(/* @ts-ignore */
177
273
  ...(ngDevMode ? [undefined, { debugName: "additionalInfo" }] : /* istanbul ignore next */ []));
274
+ this.users = input([], /* @ts-ignore */
275
+ ...(ngDevMode ? [{ debugName: "users" }] : /* istanbul ignore next */ []));
178
276
  }
179
277
  #services;
180
278
  login() {
@@ -182,6 +280,7 @@ class LoginComponent {
182
280
  data: {
183
281
  adminGroup: this.adminGroup(),
184
282
  additionalInfo: this.additionalInfo(),
283
+ users: this.users()
185
284
  },
186
285
  });
187
286
  }
@@ -198,12 +297,12 @@ class LoginComponent {
198
297
  });
199
298
  }
200
299
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
201
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: LoginComponent, isStandalone: true, selector: "cp-login", inputs: { adminGroup: { classPropertyName: "adminGroup", publicName: "adminGroup", isSignal: true, isRequired: false, transformFunction: null }, additionalInfo: { classPropertyName: "additionalInfo", publicName: "additionalInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div id=\"user-id\">\r\n <!-- Logged out -->\r\n <!-- Logged in -->\r\n @if (services.authentication.authenticated()) {\r\n <!-- With photo -->\r\n @if (services.authentication.authenticatedUser()?.photoUrl) {\r\n <img\r\n id=\"authenticated-user-image\"\r\n [src]=\"\r\n $safeNavigationMigration(\r\n services.authentication.authenticatedUser()?.photoUrl\r\n )\r\n \"\r\n matTooltip=\"Logout\"\r\n (click)=\"confirmLogout()\"\r\n />\r\n } @else {\r\n <!-- Without photo -->\r\n <mat-icon\r\n fontIcon=\"account_circle\"\r\n matTooltip=\"Logout\"\r\n (click)=\"confirmLogout()\"\r\n >\r\n </mat-icon>\r\n }\r\n <!-- Name -->\r\n <div id=\"user-name\">\r\n {{ services.authentication.authenticatedUser()?.displayName }}\r\n </div>\r\n } @else {\r\n <mat-icon fontIcon=\"account_circle\" matTooltip=\"Login\" (click)=\"login()\">\r\n </mat-icon>\r\n }\r\n</div>\r\n", styles: ["#user-id{display:flex;height:2em;padding:.3em;font-family:Verdana,Geneva,Tahoma,sans-serif}#user-id>div{display:flex;align-items:center;height:100%;margin-left:.75em;font-size:1.15em}mat-icon{font-size:2em!important;height:2em!important;width:2em!important}img{border-radius:100%;width:2em;height:2em}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
300
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: LoginComponent, isStandalone: true, selector: "cp-login", inputs: { adminGroup: { classPropertyName: "adminGroup", publicName: "adminGroup", isSignal: true, isRequired: false, transformFunction: null }, additionalInfo: { classPropertyName: "additionalInfo", publicName: "additionalInfo", isSignal: true, isRequired: false, transformFunction: null }, users: { classPropertyName: "users", publicName: "users", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div id=\"user-id\">\n <!-- Logged out -->\n <!-- Logged in -->\n @if (services.authentication.authenticated()) {\n <!-- With photo -->\n @if (services.authentication.authenticatedUser()?.photoUrl) {\n <img\n id=\"authenticated-user-image\"\n [src]=\"\n $safeNavigationMigration(\n services.authentication.authenticatedUser()?.photoUrl\n )\n \"\n matTooltip=\"Logout\"\n (click)=\"confirmLogout()\"\n />\n } @else {\n <!-- Without photo -->\n <mat-icon\n fontIcon=\"account_circle\"\n matTooltip=\"Logout\"\n (click)=\"confirmLogout()\"\n >\n </mat-icon>\n }\n <!-- Name -->\n <div id=\"user-name\">\n {{ services.authentication.authenticatedUser()?.displayName }}\n </div>\n } @else {\n <mat-icon fontIcon=\"account_circle\" matTooltip=\"Login\" (click)=\"login()\">\n </mat-icon>\n }\n</div>\n", styles: ["#user-id{display:flex;height:2em;padding:.3em;font-family:Verdana,Geneva,Tahoma,sans-serif}#user-id>div{display:flex;align-items:center;height:100%;margin-left:.75em;font-size:1.15em}mat-icon{font-size:2em!important;height:2em!important;width:2em!important}img{border-radius:100%;width:2em;height:2em}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
202
301
  }
203
302
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginComponent, decorators: [{
204
303
  type: Component,
205
- args: [{ selector: 'cp-login', imports: [MatIcon], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<div id=\"user-id\">\r\n <!-- Logged out -->\r\n <!-- Logged in -->\r\n @if (services.authentication.authenticated()) {\r\n <!-- With photo -->\r\n @if (services.authentication.authenticatedUser()?.photoUrl) {\r\n <img\r\n id=\"authenticated-user-image\"\r\n [src]=\"\r\n $safeNavigationMigration(\r\n services.authentication.authenticatedUser()?.photoUrl\r\n )\r\n \"\r\n matTooltip=\"Logout\"\r\n (click)=\"confirmLogout()\"\r\n />\r\n } @else {\r\n <!-- Without photo -->\r\n <mat-icon\r\n fontIcon=\"account_circle\"\r\n matTooltip=\"Logout\"\r\n (click)=\"confirmLogout()\"\r\n >\r\n </mat-icon>\r\n }\r\n <!-- Name -->\r\n <div id=\"user-name\">\r\n {{ services.authentication.authenticatedUser()?.displayName }}\r\n </div>\r\n } @else {\r\n <mat-icon fontIcon=\"account_circle\" matTooltip=\"Login\" (click)=\"login()\">\r\n </mat-icon>\r\n }\r\n</div>\r\n", styles: ["#user-id{display:flex;height:2em;padding:.3em;font-family:Verdana,Geneva,Tahoma,sans-serif}#user-id>div{display:flex;align-items:center;height:100%;margin-left:.75em;font-size:1.15em}mat-icon{font-size:2em!important;height:2em!important;width:2em!important}img{border-radius:100%;width:2em;height:2em}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"] }]
206
- }], propDecorators: { adminGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "adminGroup", required: false }] }], additionalInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalInfo", required: false }] }] } });
304
+ args: [{ selector: 'cp-login', imports: [MatIcon], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<div id=\"user-id\">\n <!-- Logged out -->\n <!-- Logged in -->\n @if (services.authentication.authenticated()) {\n <!-- With photo -->\n @if (services.authentication.authenticatedUser()?.photoUrl) {\n <img\n id=\"authenticated-user-image\"\n [src]=\"\n $safeNavigationMigration(\n services.authentication.authenticatedUser()?.photoUrl\n )\n \"\n matTooltip=\"Logout\"\n (click)=\"confirmLogout()\"\n />\n } @else {\n <!-- Without photo -->\n <mat-icon\n fontIcon=\"account_circle\"\n matTooltip=\"Logout\"\n (click)=\"confirmLogout()\"\n >\n </mat-icon>\n }\n <!-- Name -->\n <div id=\"user-name\">\n {{ services.authentication.authenticatedUser()?.displayName }}\n </div>\n } @else {\n <mat-icon fontIcon=\"account_circle\" matTooltip=\"Login\" (click)=\"login()\">\n </mat-icon>\n }\n</div>\n", styles: ["#user-id{display:flex;height:2em;padding:.3em;font-family:Verdana,Geneva,Tahoma,sans-serif}#user-id>div{display:flex;align-items:center;height:100%;margin-left:.75em;font-size:1.15em}mat-icon{font-size:2em!important;height:2em!important;width:2em!important}img{border-radius:100%;width:2em;height:2em}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"] }]
305
+ }], propDecorators: { adminGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "adminGroup", required: false }] }], additionalInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalInfo", required: false }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }] } });
207
306
 
208
307
  class MatAuthenticationModule {
209
308
  static forRoot(options) {
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-authentication-material.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/model/mat-authentication-service-options-token.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/services/mat-authentication.service.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login-form/login-form.component.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login-form/login-form.component.html","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login/login.component.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login/login.component.html","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/mat-authentication.module.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/cleavelandprice-ngx-lib-authentication-material.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\r\nimport { MatAuthenticationServiceOptions } from \"./mat-authentication-service-options\";\r\n\r\nexport const MatAuthenticationServiceOptionsToken = new InjectionToken<MatAuthenticationServiceOptions>('');","import { Inject, inject, Injectable, Optional } from '@angular/core';\r\nimport { JwtHelperService } from '@auth0/angular-jwt';\r\n\r\nimport { SharePointService } from '@cleavelandprice/ngx-lib/sharepoint';\r\n\r\nimport {\r\n AuthenticationToken,\r\n AuthenticationTokenService\r\n} from '@cleavelandprice/ngx-lib/authentication/token';\r\nimport { MatAuthenticationServiceOptions } from '../model/mat-authentication-service-options';\r\nimport { MatAuthenticationServiceOptionsToken } from '../model/mat-authentication-service-options-token';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MatAuthenticationService extends AuthenticationTokenService {\r\n #sharePointService = inject(SharePointService);\r\n\r\n override options!: MatAuthenticationServiceOptions;\r\n\r\n //#region Lifecycle\r\n constructor(@Optional() @Inject(MatAuthenticationServiceOptionsToken) constructorOptions: MatAuthenticationServiceOptions) {\r\n super({...constructorOptions, deferTokenValidation: true});\r\n\r\n // When super() was called, the parent class defined the 'options' object with all of the other properties\r\n this.options = { ...this.options, ...constructorOptions };\r\n this.checkForExistingToken();\r\n }\r\n //#endregion\r\n\r\n //#region Utilities\r\n override validateUser(token: string): void {\r\n const jwtHelper = new JwtHelperService();\r\n const decoded = jwtHelper.decodeToken(token) as AuthenticationToken;\r\n\r\n if (jwtHelper.isTokenExpired(token)) {\r\n this.logout();\r\n return;\r\n }\r\n\r\n this.authenticatedUser.set({\r\n accountName: decoded.winaccountname,\r\n admin: decoded.role === 'Admin',\r\n department: decoded.department,\r\n displayName: decoded.displayName,\r\n distinguishedName: decoded.distinguishedName,\r\n email: decoded.email,\r\n employeeNumber: decoded.employeeNumber,\r\n firstName: decoded.firstName,\r\n hireDate: decoded.hireDate,\r\n lastName: decoded.lastName,\r\n manager: decoded.manager,\r\n memberOf: decoded.memberOf,\r\n phone: decoded.phone,\r\n photoUrl: undefined,\r\n sid: decoded.sid,\r\n title: decoded.title,\r\n workShift: decoded.workShift\r\n });\r\n\r\n this.storage.setItem(this.options.tokenName!, token);\r\n\r\n this.#getPhoto();\r\n \r\n this.authenticated.set(true);\r\n this.authenticatedChanged.emit(this.authenticated());\r\n\r\n this.authenticating.set(false);\r\n this.authenticatingChanged.emit(this.authenticating());\r\n }\r\n\r\n #getPhoto(): void {\r\n this.#sharePointService.getPhotos()\r\n .subscribe(photos => {\r\n // The user may have been logged out by the time the photos came back\r\n if (!this.authenticatedUser()?.employeeNumber) {\r\n return;\r\n }\r\n\r\n const photo = this.authenticatedUser()!.employeeNumber && photos.find(pic => pic.employeeNumber === +this.authenticatedUser()!.employeeNumber!);\r\n\r\n if (photo) {\r\n this.authenticatedUser.update(current => ({\r\n ...current!,\r\n photoUrl: photo.encodedAbsUrl\r\n }));\r\n }\r\n });\r\n }\r\n //#endregion\r\n}","import {\r\n Component,\r\n inject,\r\n OnDestroy,\r\n OnInit,\r\n OutputRefSubscription,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\nimport {\r\n FormControl,\r\n FormGroup,\r\n ReactiveFormsModule,\r\n Validators,\r\n} from '@angular/forms';\r\nimport {\r\n MAT_DIALOG_DATA,\r\n MatDialogModule,\r\n MatDialogRef,\r\n} from '@angular/material/dialog';\r\n\r\nimport { MatButton } from '@angular/material/button';\r\nimport { MatFormField } from '@angular/material/form-field';\r\nimport { MatIcon } from '@angular/material/icon';\r\nimport { MatInput } from '@angular/material/input';\r\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\r\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\r\nimport { LoginFormData } from '../../model/login-form-data';\r\nimport { MatAuthenticationService } from '../../services/mat-authentication.service';\r\n\r\n@Component({\r\n templateUrl: './login-form.component.html',\r\n imports: [\r\n MatButton,\r\n MatDialogModule,\r\n MatFormField,\r\n MatIcon,\r\n MatInput,\r\n MatProgressSpinner,\r\n MatSlideToggle,\r\n ReactiveFormsModule,\r\n ],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.Eager,\r\n styleUrls: [\r\n './login-form.component.scss',\r\n '../../../../../styles/mat-icon.scss',\r\n ],\r\n})\r\nexport class LoginFormComponent implements OnInit, OnDestroy {\r\n #data = inject<LoginFormData>(MAT_DIALOG_DATA);\r\n\r\n services = {\r\n dialogRef: inject(MatDialogRef<LoginFormComponent>),\r\n authentication: inject(MatAuthenticationService),\r\n };\r\n\r\n errorMessage?: string;\r\n authenticatedChangedSubscription!: OutputRefSubscription;\r\n authenticationErrorSubscription!: OutputRefSubscription;\r\n\r\n form = new FormGroup({\r\n username: new FormControl(null, [Validators.required]),\r\n password: new FormControl(null, [Validators.required]),\r\n adminGroup: new FormControl(),\r\n additionalInfo: new FormControl(),\r\n });\r\n\r\n ngOnInit(): void {\r\n this.form.get('adminGroup')?.setValue(this.#data.adminGroup);\r\n this.form.get('additionalInfo')?.setValue(this.#data.additionalInfo);\r\n\r\n this.authenticatedChangedSubscription =\r\n this.services.authentication.authenticatedChanged.subscribe(\r\n this.#authChangedHandler.bind(this),\r\n );\r\n\r\n this.authenticationErrorSubscription =\r\n this.services.authentication.authenticationError.subscribe(\r\n this.#errorHandler.bind(this),\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.authenticationErrorSubscription.unsubscribe();\r\n this.authenticatedChangedSubscription.unsubscribe();\r\n }\r\n\r\n authenticate() {\r\n this.errorMessage = undefined;\r\n const { username, password, adminGroup, additionalInfo } = this.form.value;\r\n this.services.authentication.login(\r\n username!,\r\n password!,\r\n adminGroup,\r\n additionalInfo,\r\n );\r\n }\r\n\r\n #authChangedHandler(authenticated: boolean): void {\r\n if (authenticated) {\r\n this.services.dialogRef.close();\r\n }\r\n }\r\n\r\n #errorHandler(err: any): void {\r\n console.log('Authentication error', err);\r\n this.errorMessage = `${err.name}: ${err.statusText}`;\r\n }\r\n\r\n changeTokenStorageMode(checked: boolean): void {\r\n const keyName = 'storeTokenInSession';\r\n\r\n if (checked) {\r\n if (localStorage.getItem(keyName)) {\r\n localStorage.removeItem(keyName);\r\n }\r\n } else {\r\n localStorage.setItem(keyName, 'true');\r\n }\r\n }\r\n}\r\n","<h2 mat-dialog-title>\r\n @if (services.authentication.authenticating()) {\r\n <span>Authenticating...</span>\r\n } @else {\r\n <span>Login</span>\r\n }\r\n</h2>\r\n\r\n<mat-dialog-content>\r\n @if (services.authentication.authenticating()) {\r\n <div id=\"spinner\">\r\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\r\n </div>\r\n } @else if (errorMessage) {\r\n <div id=\"error\">\r\n {{ errorMessage }}\r\n </div>\r\n } @else {\r\n <form [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\r\n </mat-form-field>\r\n @if (services.authentication.options.showRememberMeOption) {\r\n <mat-slide-toggle [checked]=\"!services.authentication.useSessionStorage\" (change)=\"changeTokenStorageMode($event.checked)\">\r\n Remember me next time\r\n </mat-slide-toggle>\r\n }\r\n </form>\r\n }\r\n</mat-dialog-content>\r\n\r\n@if (!services.authentication.authenticating()) {\r\n <mat-dialog-actions>\r\n <button mat-raised-button color=\"primary\" (click)=\"authenticate()\"\r\n [disabled]=\"form.invalid\">\r\n <mat-icon fontIcon=\"done\"/>\r\n <span>OK</span>\r\n </button>\r\n <button mat-raised-button (click)=\"services.dialogRef.close()\">\r\n <mat-icon fontIcon=\"close\"/>\r\n <span>Cancel</span>\r\n </button>\r\n </mat-dialog-actions>\r\n}","import {\r\n Component,\r\n inject,\r\n input,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ConfirmationComponent } from '@cleavelandprice/ngx-lib/dialog';\r\n\r\nimport { MatIcon } from '@angular/material/icon';\r\nimport { MatAuthenticationService } from '../../services/mat-authentication.service';\r\nimport { LoginFormComponent } from '../login-form/login-form.component';\r\n\r\n@Component({\r\n selector: 'cp-login',\r\n imports: [MatIcon],\r\n standalone: true,\r\n templateUrl: './login.component.html',\r\n changeDetection: ChangeDetectionStrategy.Eager,\r\n styleUrls: ['./login.component.scss', '../../../../../styles/mat-icon.scss'],\r\n})\r\nexport class LoginComponent {\r\n #services = {\r\n dialog: inject(MatDialog),\r\n };\r\n services = {\r\n authentication: inject(MatAuthenticationService),\r\n };\r\n //#endregion\r\n\r\n adminGroup = input<string>();\r\n additionalInfo = input<string>();\r\n\r\n login(): void {\r\n this.#services.dialog.open(LoginFormComponent, {\r\n data: {\r\n adminGroup: this.adminGroup(),\r\n additionalInfo: this.additionalInfo(),\r\n },\r\n });\r\n }\r\n\r\n confirmLogout(): void {\r\n this.#services.dialog\r\n .open(ConfirmationComponent, {\r\n data: { message: `Are you sure you want to logout?` },\r\n })\r\n .afterClosed()\r\n .subscribe((result) => {\r\n if (result) {\r\n this.services.authentication.logout();\r\n }\r\n });\r\n }\r\n}\r\n","<div id=\"user-id\">\r\n <!-- Logged out -->\r\n <!-- Logged in -->\r\n @if (services.authentication.authenticated()) {\r\n <!-- With photo -->\r\n @if (services.authentication.authenticatedUser()?.photoUrl) {\r\n <img\r\n id=\"authenticated-user-image\"\r\n [src]=\"\r\n $safeNavigationMigration(\r\n services.authentication.authenticatedUser()?.photoUrl\r\n )\r\n \"\r\n matTooltip=\"Logout\"\r\n (click)=\"confirmLogout()\"\r\n />\r\n } @else {\r\n <!-- Without photo -->\r\n <mat-icon\r\n fontIcon=\"account_circle\"\r\n matTooltip=\"Logout\"\r\n (click)=\"confirmLogout()\"\r\n >\r\n </mat-icon>\r\n }\r\n <!-- Name -->\r\n <div id=\"user-name\">\r\n {{ services.authentication.authenticatedUser()?.displayName }}\r\n </div>\r\n } @else {\r\n <mat-icon fontIcon=\"account_circle\" matTooltip=\"Login\" (click)=\"login()\">\r\n </mat-icon>\r\n }\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\n\r\nimport { MatAuthenticationServiceOptions } from './model/mat-authentication-service-options';\r\n\r\n\r\nimport { LoginFormComponent } from './components/login-form/login-form.component';\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { MatAuthenticationServiceOptionsToken } from './model/mat-authentication-service-options-token';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n \r\n MatButtonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatProgressSpinnerModule,\r\n MatSlideToggleModule,\r\n\r\n LoginComponent,\r\n LoginFormComponent\r\n ],\r\n exports: [\r\n LoginComponent,\r\n LoginFormComponent\r\n ]\r\n})\r\nexport class MatAuthenticationModule {\r\n static forRoot(options: MatAuthenticationServiceOptions): ModuleWithProviders<MatAuthenticationModule> {\r\n return {\r\n ngModule: MatAuthenticationModule,\r\n providers: [\r\n {\r\n provide: MatAuthenticationServiceOptionsToken,\r\n useValue: options\r\n }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: MatAuthenticationModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'MatAuthenticationModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './mat-authentication.api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAGa,oCAAoC,GAAG,IAAI,cAAc,CAAkC,EAAE;;ACYpG,MAAO,wBAAyB,SAAQ,0BAA0B,CAAA;AACtE,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;;AAK9C,IAAA,WAAA,CAAsE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EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAnBhC,YAAY;YACZ,mBAAmB;YAEnB,eAAe;YACf,eAAe;YACf,kBAAkB;YAClB,aAAa;YACb,cAAc;YACd,wBAAwB;YACxB,oBAAoB;YAEpB,cAAc;YACd,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAOT,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAtBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,eAAe;wBACf,eAAe;wBACf,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,wBAAwB;wBACxB,oBAAoB;wBAEpB,cAAc;wBACd;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,cAAc;wBACd;AACD;AACF,iBAAA;;0BAcc;;0BAAY;;;ACtD3B;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-authentication-material.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/model/mat-authentication-service-options-token.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/services/mat-authentication.service.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login-form/login-form.component.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login-form/login-form.component.html","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login/login.component.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/components/login/login.component.html","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/mat-authentication.module.ts","../../../../projects/cleavelandprice/ngx-lib/authentication/material/src/cleavelandprice-ngx-lib-authentication-material.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\r\nimport { MatAuthenticationServiceOptions } from \"./mat-authentication-service-options\";\r\n\r\nexport const MatAuthenticationServiceOptionsToken = new InjectionToken<MatAuthenticationServiceOptions>('');","import { Inject, inject, Injectable, Optional } from '@angular/core';\r\nimport { JwtHelperService } from '@auth0/angular-jwt';\r\n\r\nimport { SharePointService } from '@cleavelandprice/ngx-lib/sharepoint';\r\n\r\nimport {\r\n AuthenticationToken,\r\n AuthenticationTokenService\r\n} from '@cleavelandprice/ngx-lib/authentication/token';\r\nimport { MatAuthenticationServiceOptions } from '../model/mat-authentication-service-options';\r\nimport { MatAuthenticationServiceOptionsToken } from '../model/mat-authentication-service-options-token';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class MatAuthenticationService extends AuthenticationTokenService {\r\n #sharePointService = inject(SharePointService);\r\n\r\n override options!: MatAuthenticationServiceOptions;\r\n\r\n //#region Lifecycle\r\n constructor(@Optional() @Inject(MatAuthenticationServiceOptionsToken) constructorOptions: MatAuthenticationServiceOptions) {\r\n super({...constructorOptions, deferTokenValidation: true});\r\n\r\n // When super() was called, the parent class defined the 'options' object with all of the other properties\r\n this.options = { ...this.options, ...constructorOptions };\r\n this.checkForExistingToken();\r\n }\r\n //#endregion\r\n\r\n //#region Utilities\r\n override validateUser(token: string): void {\r\n const jwtHelper = new JwtHelperService();\r\n const decoded = jwtHelper.decodeToken(token) as AuthenticationToken;\r\n\r\n if (jwtHelper.isTokenExpired(token)) {\r\n this.logout();\r\n return;\r\n }\r\n\r\n this.authenticatedUser.set({\r\n accountName: decoded.winaccountname,\r\n admin: decoded.role === 'Admin',\r\n department: decoded.department,\r\n displayName: decoded.displayName,\r\n distinguishedName: decoded.distinguishedName,\r\n email: decoded.email,\r\n employeeNumber: decoded.employeeNumber,\r\n firstName: decoded.firstName,\r\n hireDate: decoded.hireDate,\r\n lastName: decoded.lastName,\r\n manager: decoded.manager,\r\n memberOf: decoded.memberOf,\r\n phone: decoded.phone,\r\n photoUrl: undefined,\r\n sid: decoded.sid,\r\n title: decoded.title,\r\n workShift: decoded.workShift\r\n });\r\n\r\n this.storage.setItem(this.options.tokenName!, token);\r\n\r\n this.#getPhoto();\r\n \r\n this.authenticated.set(true);\r\n this.authenticatedChanged.emit(this.authenticated());\r\n\r\n this.authenticating.set(false);\r\n this.authenticatingChanged.emit(this.authenticating());\r\n }\r\n\r\n #getPhoto(): void {\r\n this.#sharePointService.getPhotos()\r\n .subscribe(photos => {\r\n // The user may have been logged out by the time the photos came back\r\n if (!this.authenticatedUser()?.employeeNumber) {\r\n return;\r\n }\r\n\r\n const photo = this.authenticatedUser()!.employeeNumber && photos.find(pic => pic.employeeNumber === +this.authenticatedUser()!.employeeNumber!);\r\n\r\n if (photo) {\r\n this.authenticatedUser.update(current => ({\r\n ...current!,\r\n photoUrl: photo.encodedAbsUrl\r\n }));\r\n }\r\n });\r\n }\r\n //#endregion\r\n}","import { Component, inject, OnDestroy, OnInit, OutputRefSubscription, ChangeDetectionStrategy, signal, afterNextRender, computed } from '@angular/core';\nimport { apply, debounce, form, PathKind, required, schema, SchemaPathTree, validate, FormField } from '@angular/forms/signals';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatButton } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInput } from '@angular/material/input';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { MatSlideToggle } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { CleavelandPriceUser, ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';\n\nimport { LoginFormData } from '../../model/login-form-data';\nimport { MatAuthenticationService } from '../../services/mat-authentication.service';\n\n@Component({\n templateUrl: './login-form.component.html',\n imports: [\n MatButton,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInput,\n MatProgressSpinner,\n MatSlideToggle,\n MatTooltipModule,\n FormField\n],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrls: [\n './login-form.component.scss',\n '../../../../../styles/mat-icon.scss',\n ],\n})\nexport class LoginFormComponent implements OnInit, OnDestroy {\n #data = inject<LoginFormData>(MAT_DIALOG_DATA);\n\n services = {\n dialogRef: inject(MatDialogRef<LoginFormComponent>),\n authentication: inject(MatAuthenticationService),\n activeDirectory: inject(ActiveDirectoryService),\n };\n\n authenticatedChangedSubscription!: OutputRefSubscription;\n authenticationErrorSubscription!: OutputRefSubscription;\n\n showPassword = signal(false);\n\n #credentialsModel = signal<ICredentialsModel>({\n username: '',\n password: ''\n });\n\n #formSchema = schema((schemaPath: SchemaPathTree<ICredentialsModel, PathKind.Root>) => {\n required(schemaPath.username);\n required(schemaPath.password);\n\n debounce(schemaPath.username, 500);\n debounce(schemaPath.password, 500);\n\n //#region Custom Validation\n validate(schemaPath.username, ({ value, valueOf }) => {\n \n if (!this.form().dirty()) { return null; }\n\n const username = value();\n\n if (!username) {\n return { \n kind: 'required', \n message: 'Username is required' \n };\n }\n\n if (username.includes(' ')) {\n return { \n kind: 'noSpaces', \n message: 'Username cannot contain spaces' \n };\n }\n\n if (!this.user()) {\n return { \n kind: 'invalidUsername', \n message: 'User not found' \n };\n }\n\n return null; // valid\n });\n //#endregion\n });\n\n form = form(this.#credentialsModel, (path) => apply(path, this.#formSchema));\n\n users = signal<CleavelandPriceUser[]>([]);\n gettingUsers = signal(false);\n error = signal<string | null>(null);\n\n constructor() {\n this.users.set(this.#data.users ?? []);\n\n afterNextRender(() => {\n if (!(this.users().length)) {\n this.gettingUsers.set(true);\n\n this.services.activeDirectory.getUsers(this.#data.additionalInfo ?? 'ngxLibLoginComponent')\n .subscribe({\n next: (users) => {\n this.users.set(users);\n this.gettingUsers.set(false);\n },\n error: (error) => {\n console.log('Error while getting users', error);\n this.error.set('Error while getting users');\n this.gettingUsers.set(false);\n }\n });\n }\n });\n }\n\n ngOnInit(): void {\n //this.form.get('adminGroup')?.setValue(this.#data.adminGroup);\n //this.form.get('additionalInfo')?.setValue(this.#data.additionalInfo);\n\n this.authenticatedChangedSubscription =\n this.services.authentication.authenticatedChanged.subscribe(\n this.#authChangedHandler.bind(this),\n );\n\n this.authenticationErrorSubscription =\n this.services.authentication.authenticationError.subscribe(\n this.#errorHandler.bind(this),\n );\n }\n\n ngOnDestroy(): void {\n this.authenticationErrorSubscription.unsubscribe();\n this.authenticatedChangedSubscription.unsubscribe();\n }\n\n authenticate() {\n this.error.set(null);\n \n //const { username, password, adminGroup, additionalInfo } = this.form.value;\n const { username, password } = this.form().value();\n\n this.services.authentication.login(\n username!,\n password!,\n this.#data.adminGroup,\n this.#data.additionalInfo,\n );\n }\n\n #authChangedHandler(authenticated: boolean): void {\n if (authenticated) {\n this.services.dialogRef.close();\n }\n }\n\n #errorHandler(err: any): void {\n console.log('Authentication error', err);\n this.error.set(`${err.name}: ${err.statusText}`);\n }\n\n changeTokenStorageMode(checked: boolean): void {\n const keyName = 'storeTokenInSession';\n\n if (checked) {\n if (localStorage.getItem(keyName)) {\n localStorage.removeItem(keyName);\n }\n } else {\n localStorage.setItem(keyName, 'true');\n }\n }\n\n #usernameExists(username: string): boolean {\n return this.users()\n .map(u => u.sAMAccountName.toLowerCase())\n .some(u => u.toLowerCase() === username.toLowerCase());\n }\n\n user = computed<CleavelandPriceUser | undefined>(() => {\n return this.form().value().username.trim() ?\n this.users()\n .find(u =>\n u.sAMAccountName.toLowerCase() === this.form().value().username.toLowerCase() ||\n u.employeeNumber === this.form().value().username ||\n (\n u.mail &&\n (u.mail.toLowerCase() ?? '') === this.form().value().username.toLowerCase()\n )\n ) :\n undefined; // username is blank\n });\n\n userLabel = computed<string | undefined>(() => {\n const user = this.user();\n \n return user?.department ?\n // Valid user with a department\n `<b>${user.displayName ?? user.sAMAccountName}</b>: ${user.department}` :\n user ?\n // Valid user, no department\n (user.displayName ?? user.sAMAccountName) :\n // No valid user\n undefined;\n });\n}\n\ninterface ICredentialsModel {\n username: string;\n password: string;\n}","<h2 mat-dialog-title>\n @if (services.authentication.authenticating()) {\n <span>Authenticating...</span>\n } @else {\n <span>Login</span>\n }\n</h2>\n\n<mat-dialog-content>\n @if (services.authentication.authenticating() || gettingUsers()) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (error()) {\n <div id=\"error\">\n {{ error() }}\n </div>\n } @else {\n\n <form>\n <mat-form-field>\n <input matInput [formField]=\"form.username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n\n @if (form.username().value() && form.username().errors().length) {\n @for (error of form.username().errors(); track $index) {\n <mat-error>{{ error.message }}</mat-error>\n }\n }\n\n @if (userLabel()) {\n <mat-hint [innerHTML]=\"userLabel()\" />\n }\n </mat-form-field>\n\n <mat-form-field>\n <input matInput [formField]=\"form.password\"\n [type]=\"showPassword() ? 'text' : 'password'\"\n placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n\n <mat-icon matSuffix \n [matTooltip]=\"showPassword() ? 'Hide password' : 'Show password'\"\n aria-label=\"Show password\"\n (pointerdown)=\"$event.preventDefault(); showPassword.set(true)\"\n (pointerup)=\"showPassword.set(false)\"\n (pointercancel)=\"showPassword.set(false)\"\n (pointerleave)=\"showPassword.set(false)\">\n {{ showPassword() ? 'visibility_off' : 'visibility' }}\n </mat-icon>\n </mat-form-field>\n\n @if (services.authentication.options.showRememberMeOption) {\n <mat-slide-toggle [checked]=\"!services.authentication.useSessionStorage\" (change)=\"changeTokenStorageMode($event.checked)\">\n Remember me next time\n </mat-slide-toggle>\n }\n </form>\n }\n</mat-dialog-content>\n\n@if (!services.authentication.authenticating()) {\n <mat-dialog-actions>\n <button mat-raised-button color=\"primary\" (click)=\"authenticate()\"\n [disabled]=\"form().invalid()\">\n <mat-icon fontIcon=\"done\"/>\n <span>OK</span>\n </button>\n \n <button mat-raised-button (click)=\"services.dialogRef.close()\">\n <mat-icon fontIcon=\"close\"/>\n <span>Cancel</span>\n </button>\n </mat-dialog-actions>\n}","import { Component, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatIcon } from '@angular/material/icon';\n\nimport { ConfirmationComponent } from '@cleavelandprice/ngx-lib/dialog';\nimport { CleavelandPriceUser } from '@cleavelandprice/ngx-lib/active-directory';\n\nimport { MatAuthenticationService } from '../../services/mat-authentication.service';\nimport { LoginFormComponent } from '../login-form/login-form.component';\n\n@Component({\n selector: 'cp-login',\n imports: [MatIcon],\n standalone: true,\n templateUrl: './login.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrls: ['./login.component.scss', '../../../../../styles/mat-icon.scss'],\n})\nexport class LoginComponent {\n #services = {\n dialog: inject(MatDialog),\n };\n \n services = {\n authentication: inject(MatAuthenticationService),\n };\n //#endregion\n\n adminGroup = input<string>();\n additionalInfo = input<string>();\n\n users = input<CleavelandPriceUser[]>([]);\n \n login(): void {\n this.#services.dialog.open(LoginFormComponent, {\n data: {\n adminGroup: this.adminGroup(),\n additionalInfo: this.additionalInfo(),\n users: this.users()\n },\n });\n }\n\n confirmLogout(): void {\n this.#services.dialog\n .open(ConfirmationComponent, {\n data: { message: `Are you sure you want to logout?` },\n })\n .afterClosed()\n .subscribe((result) => {\n if (result) {\n this.services.authentication.logout();\n }\n });\n }\n}\n","<div id=\"user-id\">\n <!-- Logged out -->\n <!-- Logged in -->\n @if (services.authentication.authenticated()) {\n <!-- With photo -->\n @if (services.authentication.authenticatedUser()?.photoUrl) {\n <img\n id=\"authenticated-user-image\"\n [src]=\"\n $safeNavigationMigration(\n services.authentication.authenticatedUser()?.photoUrl\n )\n \"\n matTooltip=\"Logout\"\n (click)=\"confirmLogout()\"\n />\n } @else {\n <!-- Without photo -->\n <mat-icon\n fontIcon=\"account_circle\"\n matTooltip=\"Logout\"\n (click)=\"confirmLogout()\"\n >\n </mat-icon>\n }\n <!-- Name -->\n <div id=\"user-name\">\n {{ services.authentication.authenticatedUser()?.displayName }}\n </div>\n } @else {\n <mat-icon fontIcon=\"account_circle\" matTooltip=\"Login\" (click)=\"login()\">\n </mat-icon>\n }\n</div>\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\n\r\nimport { MatAuthenticationServiceOptions } from './model/mat-authentication-service-options';\r\n\r\n\r\nimport { LoginFormComponent } from './components/login-form/login-form.component';\r\nimport { LoginComponent } from './components/login/login.component';\r\nimport { MatAuthenticationServiceOptionsToken } from './model/mat-authentication-service-options-token';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n \r\n MatButtonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatProgressSpinnerModule,\r\n MatSlideToggleModule,\r\n\r\n LoginComponent,\r\n LoginFormComponent\r\n ],\r\n exports: [\r\n LoginComponent,\r\n LoginFormComponent\r\n ]\r\n})\r\nexport class MatAuthenticationModule {\r\n static forRoot(options: MatAuthenticationServiceOptions): ModuleWithProviders<MatAuthenticationModule> {\r\n return {\r\n ngModule: MatAuthenticationModule,\r\n providers: [\r\n {\r\n provide: MatAuthenticationServiceOptionsToken,\r\n useValue: options\r\n }\r\n ]\r\n };\r\n }\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: MatAuthenticationModule) {\r\n if (parentModule) {\r\n throw new Error(\r\n 'MatAuthenticationModule is already loaded. Import it in the AppModule only');\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './mat-authentication.api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAGa,oCAAoC,G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