@cleavelandprice/ngx-lib 4.8.3 → 4.8.4

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,7 +1,7 @@
1
1
  import { ActiveDirectoryService, ActiveDirectoryServiceOptionsToken } from '@cleavelandprice/ngx-lib/active-directory';
2
2
  export * from '@cleavelandprice/ngx-lib/active-directory';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, viewChild, ViewChild, ChangeDetectionStrategy, Component, output, input, forwardRef, Optional, SkipSelf, NgModule } from '@angular/core';
4
+ import { inject, viewChild, ViewChild, ChangeDetectionStrategy, Component, output, input, signal, forwardRef, Optional, SkipSelf, NgModule } from '@angular/core';
5
5
  import * as i1 from '@angular/forms';
6
6
  import { FormGroup, FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import { MAT_DIALOG_DATA, MatDialogRef, MatDialogActions, MatDialogClose, MatDialogContent, MatDialog, MatDialogModule } from '@angular/material/dialog';
@@ -476,6 +476,12 @@ class UserFormFieldComponent {
476
476
  ...(ngDevMode ? [{ debugName: "clickable" }] : /* istanbul ignore next */ []));
477
477
  this.userChooserData = input.required(/* @ts-ignore */
478
478
  ...(ngDevMode ? [{ debugName: "userChooserData" }] : /* istanbul ignore next */ []));
479
+ this.users = signal([], /* @ts-ignore */
480
+ ...(ngDevMode ? [{ debugName: "users" }] : /* istanbul ignore next */ []));
481
+ this.groups = signal([], /* @ts-ignore */
482
+ ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
483
+ this.photos = signal([], /* @ts-ignore */
484
+ ...(ngDevMode ? [{ debugName: "photos" }] : /* istanbul ignore next */ []));
479
485
  this.onChange = (_) => { }; // Invoked when the model has been changed
480
486
  this.onTouched = () => { }; // Invoked when the model has been touched
481
487
  }
@@ -519,8 +525,8 @@ class UserFormFieldComponent {
519
525
  }
520
526
  const data = {
521
527
  ...this._userChooserData,
522
- users: this.users,
523
- photos: this.photos,
528
+ users: this.users(),
529
+ photos: this.photos(),
524
530
  };
525
531
  this.#services.dialog
526
532
  .open(UserChooserComponent, {
@@ -570,22 +576,22 @@ class UserFormFieldComponent {
570
576
  : // Photos need to be retrieved
571
577
  this.#services.sharePoint.getPhotos(),
572
578
  ]).subscribe(([users, groups, photos]) => {
573
- this.users = users;
574
- this.groups = groups;
575
- this.photos = photos;
579
+ this.users.set(users);
580
+ this.groups.set(groups);
581
+ this.photos.set(photos);
576
582
  });
577
583
  }
578
584
  getUser(user) {
579
585
  user =
580
586
  typeof user === 'string'
581
- ? this.users?.find((u) => u.sAMAccountName.toLowerCase() === user?.toString().toLowerCase())
587
+ ? this.users()?.find((u) => u.sAMAccountName.toLowerCase() === user?.toString().toLowerCase())
582
588
  : user;
583
589
  return !user ? undefined : 'groupType' in user ? undefined : user;
584
590
  }
585
591
  getGroup(group) {
586
592
  group =
587
593
  typeof group === 'string'
588
- ? this.groups?.find((g) => g.sAMAccountName.toLowerCase() ===
594
+ ? this.groups()?.find((g) => g.sAMAccountName.toLowerCase() ===
589
595
  group?.toString().toLowerCase())
590
596
  : group;
591
597
  return !group ? undefined : 'groupType' in group ? group : undefined;
@@ -595,7 +601,7 @@ class UserFormFieldComponent {
595
601
  if (!user) {
596
602
  return undefined;
597
603
  }
598
- return this.photos?.find((p) => (p.employeeNumber &&
604
+ return this.photos()?.find((p) => (p.employeeNumber &&
599
605
  p.employeeNumber.toString() === user.employeeNumber) ||
600
606
  p.accountName?.toLowerCase() === user.sAMAccountName.toLowerCase() ||
601
607
  p.displayName?.toLowerCase() ===
@@ -630,7 +636,7 @@ class UserFormFieldComponent {
630
636
  useExisting: forwardRef(() => UserFormFieldComponent),
631
637
  multi: true,
632
638
  },
633
- ], ngImport: i0, template: "\r\n<!-- In Microsoft Edge, selectUser() never gets called if the input fields are disabled\r\nSo... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\r\nIt's definitely a better experience if the field IS disabled.\r\nOtherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\r\n-->\r\n<!-- Update 8/24/2023:\r\nThe above problem also exists in Chrome now.\r\nSo instead of dynamically setting [disabled] based on browser type,\r\nI'm applying CSS to suppress mouse events on the input - thus making it bubble up to the parent control, which responds the way we want/\r\n-->\r\n\r\n@if (users && photos) {\r\n <div (click)=\"selectUser()\" [class.clickable]=\"clickable()\">\r\n @if (accountNames?.length) {\r\n <div [ngClass]=\"class\">\r\n @for (accountName of accountNames; track accountName; let i = $index) {\r\n <div class=\"user\">\r\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\r\n @if (getPhoto(accountName)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\r\n }\r\n @if (getGroup(accountName)) {\r\n <mat-icon>group</mat-icon>\r\n }\r\n <mat-form-field>\r\n <!-- [disabled]=\"!isEdge\" -->\r\n <input matInput disabled [placeholder]=\"i === 0 ? placeholder() : ''\"\r\n [value]=\"getUser(accountName)?.displayName ?? getGroup(accountName)?.displayName ?? accountName\">\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field>\r\n <input matInput disabled [placeholder]=\"placeholder()\"> <!-- [disabled]=\"!isEdge\" -->\r\n </mat-form-field>\r\n }\r\n </div>\r\n} @else {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n}", styles: [".user{display:grid;grid-template-columns:auto 1fr;grid-gap:.5em;align-items:center}.clickable,.clickable input{cursor:pointer!important}img{width:2em;height:2em;border-radius:100%}@media(min-width:801px){.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:1em}.three{grid-template-columns:repeat(3,1fr)}.four{grid-template-columns:repeat(4,1fr)}.five{grid-template-columns:repeat(5,1fr)}::ng-deep .grid mat-form-field{width:15vw}}input[disabled]{pointer-events:none}\n"], dependencies: [{ 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: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
639
+ ], ngImport: i0, template: "\r\n<!-- In Microsoft Edge, selectUser() never gets called if the input fields are disabled\r\nSo... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\r\nIt's definitely a better experience if the field IS disabled.\r\nOtherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\r\n-->\r\n<!-- Update 8/24/2023:\r\nThe above problem also exists in Chrome now.\r\nSo instead of dynamically setting [disabled] based on browser type,\r\nI'm applying CSS to suppress mouse events on the input - thus making it bubble up to the parent control, which responds the way we want/\r\n-->\r\n\r\n@if (users().length && photos().length) {\r\n <div (click)=\"selectUser()\" [class.clickable]=\"clickable()\">\r\n @if (accountNames?.length) {\r\n <div [ngClass]=\"class\">\r\n @for (accountName of accountNames; track accountName; let i = $index) {\r\n <div class=\"user\">\r\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\r\n @if (getPhoto(accountName)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\r\n }\r\n @if (getGroup(accountName)) {\r\n <mat-icon>group</mat-icon>\r\n }\r\n <mat-form-field>\r\n <!-- [disabled]=\"!isEdge\" -->\r\n <input matInput disabled [placeholder]=\"i === 0 ? placeholder() : ''\"\r\n [value]=\"getUser(accountName)?.displayName ?? getGroup(accountName)?.displayName ?? accountName\">\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field>\r\n <input matInput disabled [placeholder]=\"placeholder()\"> <!-- [disabled]=\"!isEdge\" -->\r\n </mat-form-field>\r\n }\r\n </div>\r\n} @else {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n}", styles: [".user{display:grid;grid-template-columns:auto 1fr;grid-gap:.5em;align-items:center}.clickable,.clickable input{cursor:pointer!important}img{width:2em;height:2em;border-radius:100%}@media(min-width:801px){.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:1em}.three{grid-template-columns:repeat(3,1fr)}.four{grid-template-columns:repeat(4,1fr)}.five{grid-template-columns:repeat(5,1fr)}::ng-deep .grid mat-form-field{width:15vw}}input[disabled]{pointer-events:none}\n"], dependencies: [{ 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: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
634
640
  }
635
641
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UserFormFieldComponent, decorators: [{
636
642
  type: Component,
@@ -648,7 +654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
648
654
  useExisting: forwardRef(() => UserFormFieldComponent),
649
655
  multi: true,
650
656
  },
651
- ], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "\r\n<!-- In Microsoft Edge, selectUser() never gets called if the input fields are disabled\r\nSo... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\r\nIt's definitely a better experience if the field IS disabled.\r\nOtherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\r\n-->\r\n<!-- Update 8/24/2023:\r\nThe above problem also exists in Chrome now.\r\nSo instead of dynamically setting [disabled] based on browser type,\r\nI'm applying CSS to suppress mouse events on the input - thus making it bubble up to the parent control, which responds the way we want/\r\n-->\r\n\r\n@if (users && photos) {\r\n <div (click)=\"selectUser()\" [class.clickable]=\"clickable()\">\r\n @if (accountNames?.length) {\r\n <div [ngClass]=\"class\">\r\n @for (accountName of accountNames; track accountName; let i = $index) {\r\n <div class=\"user\">\r\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\r\n @if (getPhoto(accountName)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\r\n }\r\n @if (getGroup(accountName)) {\r\n <mat-icon>group</mat-icon>\r\n }\r\n <mat-form-field>\r\n <!-- [disabled]=\"!isEdge\" -->\r\n <input matInput disabled [placeholder]=\"i === 0 ? placeholder() : ''\"\r\n [value]=\"getUser(accountName)?.displayName ?? getGroup(accountName)?.displayName ?? accountName\">\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field>\r\n <input matInput disabled [placeholder]=\"placeholder()\"> <!-- [disabled]=\"!isEdge\" -->\r\n </mat-form-field>\r\n }\r\n </div>\r\n} @else {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n}", styles: [".user{display:grid;grid-template-columns:auto 1fr;grid-gap:.5em;align-items:center}.clickable,.clickable input{cursor:pointer!important}img{width:2em;height:2em;border-radius:100%}@media(min-width:801px){.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:1em}.three{grid-template-columns:repeat(3,1fr)}.four{grid-template-columns:repeat(4,1fr)}.five{grid-template-columns:repeat(5,1fr)}::ng-deep .grid mat-form-field{width:15vw}}input[disabled]{pointer-events:none}\n"] }]
657
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "\r\n<!-- In Microsoft Edge, selectUser() never gets called if the input fields are disabled\r\nSo... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\r\nIt's definitely a better experience if the field IS disabled.\r\nOtherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\r\n-->\r\n<!-- Update 8/24/2023:\r\nThe above problem also exists in Chrome now.\r\nSo instead of dynamically setting [disabled] based on browser type,\r\nI'm applying CSS to suppress mouse events on the input - thus making it bubble up to the parent control, which responds the way we want/\r\n-->\r\n\r\n@if (users().length && photos().length) {\r\n <div (click)=\"selectUser()\" [class.clickable]=\"clickable()\">\r\n @if (accountNames?.length) {\r\n <div [ngClass]=\"class\">\r\n @for (accountName of accountNames; track accountName; let i = $index) {\r\n <div class=\"user\">\r\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\r\n @if (getPhoto(accountName)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\r\n }\r\n @if (getGroup(accountName)) {\r\n <mat-icon>group</mat-icon>\r\n }\r\n <mat-form-field>\r\n <!-- [disabled]=\"!isEdge\" -->\r\n <input matInput disabled [placeholder]=\"i === 0 ? placeholder() : ''\"\r\n [value]=\"getUser(accountName)?.displayName ?? getGroup(accountName)?.displayName ?? accountName\">\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field>\r\n <input matInput disabled [placeholder]=\"placeholder()\"> <!-- [disabled]=\"!isEdge\" -->\r\n </mat-form-field>\r\n }\r\n </div>\r\n} @else {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n}", styles: [".user{display:grid;grid-template-columns:auto 1fr;grid-gap:.5em;align-items:center}.clickable,.clickable input{cursor:pointer!important}img{width:2em;height:2em;border-radius:100%}@media(min-width:801px){.grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:1em}.three{grid-template-columns:repeat(3,1fr)}.four{grid-template-columns:repeat(4,1fr)}.five{grid-template-columns:repeat(5,1fr)}::ng-deep .grid mat-form-field{width:15vw}}input[disabled]{pointer-events:none}\n"] }]
652
658
  }], propDecorators: { usersSelected: [{ type: i0.Output, args: ["usersSelected"] }], userUnSelected: [{ type: i0.Output, args: ["userUnSelected"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], userChooserData: [{ type: i0.Input, args: [{ isSignal: true, alias: "userChooserData", required: true }] }] } });
653
659
 
654
660
  class MatActiveDirectoryModule {
@@ -1 +1 @@
1
- {"version":3,"file":"cleavelandprice-ngx-lib-active-directory-material.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/default-user-chooser-filter-options.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/user-chooser-mode.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/default-user-chooser-data.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/user-chooser-filter-options.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/user-chooser-pre-processing-group.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-chooser/user-chooser.component.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-chooser/user-chooser.component.html","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-form-field/user-form-field.component.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-form-field/user-form-field.component.html","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/mat-active-directory.module.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/cleavelandprice-ngx-lib-active-directory-material.ts"],"sourcesContent":["import { UserChooserFilterOptions } from \"./user-chooser-filter-options\";\r\n\r\nexport const DefaultUserChooserFilterOptions: UserChooserFilterOptions = {\r\n accountName: true,\r\n department: true,\r\n groupMembership: false,\r\n phoneNumber: true,\r\n title: true\r\n};","export enum UserChooserMode {\r\n Single,\r\n Multiple\r\n}","import { DefaultUserChooserFilterOptions } from \"./default-user-chooser-filter-options\";\r\nimport { UserChooserData } from \"./user-chooser-data\";\r\nimport { UserChooserMode } from \"./user-chooser-mode\";\r\n\r\nexport const DefaultUserChooserData: UserChooserData = {\r\n closeWhenSelectionMade: false,\r\n allowCloseWithoutSelections: false,\r\n includeDisabledUsers: false,\r\n returnUserObjects: false,\r\n showGroupMembershipTooltips: false,\r\n showPhone: true,\r\n title: 'Select User(s)',\r\n mode: UserChooserMode.Single,\r\n objectTypes: '*',\r\n filterOptions: DefaultUserChooserFilterOptions\r\n};","export interface UserChooserFilterOptions {\r\n accountName?: boolean;\r\n department?: boolean;\r\n groupMembership?: boolean;\r\n phoneNumber?: boolean;\r\n title?: boolean;\r\n};","export interface UserChooserPreProcessingGroup {\r\n accountNames?: string[];\r\n departments?: string[];\r\n groups?: string[];\r\n titles?: string[];\r\n};","import {\n Component,\n ElementRef,\n inject,\n OnInit,\n ViewChild,\n viewChild,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport {\n MAT_DIALOG_DATA,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {\n MatListItemAvatar,\n MatListOption,\n MatSelectionList,\n} from '@angular/material/list';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { debounceTime, forkJoin, Observable, of } from 'rxjs';\n\nimport { ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';\nimport {\n PhotoItem,\n SharePointService,\n} from '@cleavelandprice/ngx-lib/sharepoint';\n\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatFormField } from '@angular/material/form-field';\nimport { MatIcon } 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 { MatTooltip } from '@angular/material/tooltip';\nimport { DefaultUserChooserData } from '../../model/default-user-chooser-data';\nimport { SelectableGroup } from '../../model/selectable-group';\nimport { SelectableUser } from '../../model/selectable-user';\nimport { UserChooserData } from '../../model/user-chooser-data';\nimport { UserChooserMode } from '../../model/user-chooser-mode';\n\n@Component({\n templateUrl: './user-chooser.component.html',\n imports: [\n MatButton,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatFormField,\n MatIcon,\n MatIconButton,\n MatInput,\n MatListItemAvatar,\n MatListOption,\n MatProgressSpinner,\n MatSelectionList,\n MatSlideToggle,\n MatTooltip,\n ReactiveFormsModule,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrls: [\n './user-chooser.component.scss',\n '../../../../../styles/mat-icon.scss',\n ],\n})\nexport class UserChooserComponent implements OnInit {\n #services = {\n dialogRef: inject(MatDialogRef<UserChooserComponent>),\n activeDirectory: inject(ActiveDirectoryService),\n sharePoint: inject(SharePointService),\n data: inject<UserChooserData>(MAT_DIALOG_DATA),\n };\n _data = { ...DefaultUserChooserData, ...this.#services.data };\n\n //#region Fields\n\n //@ViewChild(MatSelectionList) selectionList?: MatSelectionList;\n selectionList = viewChild(MatSelectionList);\n\n @ViewChild('filterInput') set filterInput(\n elRef: ElementRef<HTMLInputElement>,\n ) {\n if (elRef) {\n elRef.nativeElement.focus();\n }\n }\n //filterInput = viewChild<ElementRef>('filterInput');\n\n filterForm = new FormGroup({\n filter: new FormControl(),\n });\n\n dataSource?: MatTableDataSource<SelectableUser | SelectableGroup>;\n photos?: PhotoItem[];\n groups?: SelectableGroup[]; // May or may not get populated, depending on config data sent in\n //#endregion\n\n //#region Properties\n get isMultiMode(): boolean {\n return this._data.mode === UserChooserMode.Multiple;\n }\n\n get selectedOptions(): MatListOption[] {\n return this.selectionList()?.options.filter((o) => o.selected) ?? [];\n }\n\n get selectedUsers(): (SelectableUser | SelectableGroup)[] {\n return this.dataSource?.data?.filter((d) => d.selected) ?? [];\n }\n\n get filterValue(): string {\n return this.filterForm.value.filter;\n }\n\n get adGroupsNeeded(): boolean {\n // If any are these are true, then we need to pull AD groups for use later\n return (\n (this._data.showGroupMembershipTooltips ?? false) ||\n (this._data.exclusions?.groups?.length ?? 0) > 0 ||\n (this._data.inclusions?.groups?.length ?? 0) > 0 ||\n (this._data.preSelections?.groups?.length ?? 0) > 0 ||\n this._data.filterOptions?.groupMembership ||\n (this._data.selectableGroupNames?.length ?? 0) > 0 ||\n (this._data.groups?.length ?? 0) > 0\n );\n }\n //#endregion\n\n //#region Lifecycle\n ngOnInit(): void {\n this.#getData();\n this.#listenForFilterChanges();\n }\n //#endregion\n\n //#region Events\n listSelectionChanged(options: MatListOption[]): void {\n if (\n this._data.mode === UserChooserMode.Single &&\n this.selectedOptions.length &&\n this._data.closeWhenSelectionMade\n ) {\n this.close();\n }\n }\n\n optionSelectionChanged(option: MatListOption): void {\n const user = this.dataSource?.data.find(\n (u) =>\n u.sAMAccountName.toLocaleLowerCase() ===\n (option.value as SelectableUser).sAMAccountName.toLowerCase(),\n );\n\n if (user) {\n // If we are in single user selection mode, deselect any existing selections first\n if (!this.isMultiMode && option.selected) {\n this.dataSource?.data\n .filter(\n (u) =>\n u.sAMAccountName.toLowerCase() !==\n (option.value as SelectableUser).sAMAccountName.toLowerCase(),\n )\n .forEach((u) => (u.selected = false));\n }\n\n user.selected = option.selected;\n }\n }\n\n hideUnselectedChanged(selected: boolean): void {\n this.filterForm\n .get('filter')\n ?.setValue(selected ? '{selected:true}' : null);\n }\n\n selectAll(): void {\n this.selectionList()?.selectAll();\n\n if (this.selectionList()?.options) {\n this.listSelectionChanged(this.selectionList()!.options.toArray());\n }\n }\n\n deselectAll(): void {\n this.selectionList()?.deselectAll();\n }\n //#endregion\n\n //#region Utilities\n isUser(userOrGroup: SelectableUser | SelectableGroup): boolean {\n return 'title' in userOrGroup;\n }\n castUser(userOrGroup: SelectableUser | SelectableGroup): SelectableUser {\n return userOrGroup as SelectableUser;\n }\n\n #getData(): void {\n const observables$: Observable<any>[] = [\n this._data.users?.length\n ? // Users were passed in\n of(this._data.users)\n : // Users need to be retrieved\n this.#services.activeDirectory.getUsers(\n this._data.appName ?? 'ngxlibADUserChooser',\n this._data.includeDisabledUsers,\n this._data.parentOu,\n ),\n\n this._data.photos?.length\n ? // Photos were passed in\n of(this._data.photos)\n : // Photos need to be retrieved\n this.#services.sharePoint.getPhotos(),\n ];\n\n // Do we need AD groups?\n if (this.adGroupsNeeded) {\n observables$.push(\n this._data.groups?.length\n ? // Groups were passed in\n of(this._data.groups)\n : // Groups need to be retrieved\n this.#services.activeDirectory.getGroups(),\n );\n }\n\n forkJoin(observables$)\n //.subscribe(([users, photos]) => {\n .subscribe((data) => {\n // Need groups in place before we handle exclusions/inclusions/pre-selections\n this.groups = this.adGroupsNeeded ? data[2] : null;\n\n let users = data[0] as SelectableUser[];\n users.forEach((u) => (u.selected = false)); // In case existing data was re-used\n users = this.#includeUsersByAccountName(users);\n users = this.#includeUsersByGroupName(users);\n users = this.#includeUsersByDepartment(users);\n users = this.#includeUsersByTitle(users);\n\n users = this.#excludeUsersByAccountName(users);\n users = this.#excludeUsersByGroupName(users);\n users = this.#excludeUsersByDepartment(users);\n users = this.#excludeUsersByTitle(users);\n\n users = this.#preSelectUsersByAccountName(users);\n users = this.#preSelectUsersByGroupName(users);\n users = this.#preSelectUsersByDepartment(users);\n users = this.#preSelectUsersByTitle(users);\n\n this.#preSelectGroupsByAccountName();\n\n const usersAndGroups: (SelectableUser | SelectableGroup)[] = [];\n\n // Should we allow users to be selected?\n if (['users', '*'].includes(this._data.objectTypes!)) {\n usersAndGroups.push(...users);\n }\n\n // Should we allow groups to be selected\n\n if (['groups', '*'].includes(this._data.objectTypes!)) {\n if (this._data.selectableGroupNames?.length) {\n if (this._data.selectableGroupNames.includes('*')) {\n usersAndGroups.push(...this.groups!);\n } else {\n this._data.selectableGroupNames.forEach((groupName) => {\n const group = this.groups!.find(\n (g) => g.displayName === groupName,\n );\n\n if (group) {\n usersAndGroups.push({\n ...group,\n selected: group.selected,\n });\n }\n });\n }\n }\n }\n\n this.dataSource = new MatTableDataSource(usersAndGroups);\n\n this.photos = data[1];\n\n this.#setFilterPredicate();\n });\n }\n\n close(): void {\n if (!this.selectedUsers?.length) {\n this.#services.dialogRef.close(\n this._data.allowCloseWithoutSelections ? [] : undefined,\n );\n return;\n }\n const value = this.selectedUsers.map((u) =>\n this._data.returnUserObjects ? u : u.sAMAccountName,\n );\n\n this.#services.dialogRef.close(\n this._data.mode === UserChooserMode.Multiple ? value : value[0],\n );\n }\n\n getPhoto(user: SelectableUser | SelectableGroup): string | undefined {\n if (!this.isUser(user)) {\n return;\n }\n\n return this.photos?.find(\n (p) =>\n (p.employeeNumber &&\n p.employeeNumber.toString() ===\n (user as SelectableUser).employeeNumber) ||\n p.accountName?.toLowerCase() === user.sAMAccountName.toLowerCase() ||\n p.displayName?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase() ||\n p.title?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase(),\n )?.encodedAbsUrl;\n }\n\n //#region Exclusions - won't be included in the dataSource at all\n #excludeUsersByAccountName(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.accountNames?.forEach((accountName) => {\n const index = users.findIndex(\n (u) => u.sAMAccountName.toLowerCase() === accountName.toLowerCase(),\n );\n if (index === -1) {\n return;\n }\n\n users.splice(index, 1);\n });\n\n return users;\n }\n\n #excludeUsersByGroupName(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.groups?.forEach((groupName) => {\n const group = this.groups?.find(\n (g) => g.name.toLowerCase() === groupName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n group.member.forEach((groupMemberDn) => {\n const index = users.findIndex(\n (u) => u.distinguishedName === groupMemberDn,\n );\n if (index === -1) {\n return;\n }\n\n users.splice(index, 1);\n });\n });\n\n return users;\n }\n\n #excludeUsersByDepartment(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.departments?.forEach((department) => {\n const excludedUsers = users.filter(\n (u) => u.department?.toLowerCase() === department.toLowerCase(),\n );\n\n excludedUsers.forEach((user) => {\n const index = users.indexOf(user);\n users.splice(index, 1);\n });\n });\n\n return users;\n }\n\n #excludeUsersByTitle(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.titles?.forEach((title) => {\n const excludedUsers = users.filter(\n (u) => u.title?.toLowerCase() === title.toLowerCase(),\n );\n\n excludedUsers.forEach((user) => {\n const index = users.indexOf(user);\n users.splice(index, 1);\n });\n });\n\n return users;\n }\n //#endregion\n\n //#region Inclusions - only these will be included in the dataSource\n #includeUsersByAccountName(users: SelectableUser[]): SelectableUser[] {\n return users.filter(\n (user) =>\n !this._data.inclusions?.accountNames?.length || // No account inclusions specified\n this._data.inclusions.accountNames.find(\n (accountName) =>\n accountName.toLowerCase() === user.sAMAccountName.toLowerCase(),\n ),\n );\n }\n\n #includeUsersByDepartment(users: SelectableUser[]): SelectableUser[] {\n return users.filter(\n (user) =>\n !this._data.inclusions?.departments?.length || // No department inclusions specified\n this._data.inclusions.departments.find(\n (department) =>\n department.toLowerCase() === user.department?.toLowerCase(),\n ),\n );\n }\n\n #includeUsersByTitle(users: SelectableUser[]): SelectableUser[] {\n return users.filter(\n (user) =>\n !this._data.inclusions?.titles?.length || // No title inclusions specified\n this._data.inclusions.titles.find(\n (title) => title.toLowerCase() === user.title?.toLowerCase(),\n ),\n );\n }\n\n #includeUsersByGroupName(users: SelectableUser[]): SelectableUser[] {\n if (!this._data.inclusions?.groups?.length) {\n return users; // No group inclusions specified\n }\n\n // Cheating a bit and leveraging the 'selected' property to keep track of who should be included\n // Since inclusions happen befor pre-selections, we can do that, as long as we set 'selected' back to false when we're done\n this._data.inclusions.groups.forEach((groupName) => {\n const group = this.groups?.find(\n (g) => g.name.toLowerCase() === groupName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n users\n .filter((user) =>\n group.member.find(\n (groupMemberDn) => groupMemberDn === user.distinguishedName,\n ),\n )\n .forEach((user) => (user.selected = true));\n });\n\n // At this point, all of the appropriate users should have 'selected' set to true\n const selectedUsers = users.filter((user) => user.selected); // Subset of the original list\n // Reset 'selected' to false, and return\n selectedUsers.forEach((user) => (user.selected = false));\n return selectedUsers;\n }\n //#endregion\n\n //#region Pre-Selections\n #preSelectUsersByAccountName(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.accountNames?.forEach((accountName) => {\n const user = users.find(\n (u) => u.sAMAccountName.toLowerCase() === accountName.toLowerCase(),\n );\n if (!user) {\n return;\n }\n\n user.selected = true;\n });\n\n return users;\n }\n\n #preSelectGroupsByAccountName(): void {\n this._data.preSelections?.accountNames?.forEach((accountName) => {\n const group = this.groups?.find(\n (g) => g.sAMAccountName.toLowerCase() === accountName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n group.selected = true;\n });\n }\n\n #preSelectUsersByDepartment(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.departments?.forEach((department) =>\n users\n .filter((u) => u.department?.toLowerCase() === department.toLowerCase())\n .forEach((user) => (user.selected = true)),\n );\n\n return users;\n }\n\n #preSelectUsersByTitle(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.titles?.forEach((title) =>\n users\n .filter((u) => u.title?.toLowerCase() === title.toLowerCase())\n .forEach((user) => (user.selected = true)),\n );\n\n return users;\n }\n\n #preSelectUsersByGroupName(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.groups?.forEach((groupName) => {\n const group = this.groups?.find(\n (g) => g.name.toLowerCase() === groupName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n group.member.forEach((groupMemberDn) => {\n const user = users.find((u) => u.distinguishedName === groupMemberDn);\n if (!user) {\n return;\n }\n\n user.selected = true;\n });\n });\n\n return users;\n }\n //#endregion\n\n #setFilterPredicate(): void {\n if (!this.dataSource) {\n return;\n }\n\n this.dataSource.filterPredicate = (\n user: SelectableUser | SelectableGroup,\n filter: string,\n ) => {\n if (filter === '{selected:true}') {\n return user.selected;\n } else {\n const regex = new RegExp(filter, 'i'); // Case-insensitive\n let match = false; // The end result - whether or not a employee matches the filter\n\n const filterProperties = ['displayName'];\n if (this._data.filterOptions?.accountName) {\n filterProperties.push('sAMAccountName');\n }\n if (this._data.filterOptions?.title) {\n filterProperties.push('title');\n }\n if (this._data.filterOptions?.department) {\n filterProperties.push('department');\n }\n if (this._data.filterOptions?.phoneNumber) {\n filterProperties.push('telephoneNumber');\n }\n\n // Match on the properties configured above\n filterProperties.forEach((field) => {\n // @ts-ignore\n if (user[field] && user[field].match(regex)) {\n match = true;\n }\n });\n\n // Match on group membership (group name)\n if (this._data.filterOptions?.groupMembership) {\n user.memberOf.forEach((groupDn) => {\n const group = this.groups?.find(\n (group) =>\n group.distinguishedName === groupDn && group.name.match(regex),\n );\n\n if (group) {\n match = true;\n }\n });\n }\n\n return match;\n }\n };\n }\n\n #listenForFilterChanges(): void {\n this.filterForm\n .get('filter')\n ?.valueChanges.pipe(debounceTime(250))\n .subscribe(\n () =>\n (this.dataSource!.filter = this.filterForm.value.filter\n ?.trim()\n .toLowerCase()),\n );\n }\n\n tooltip(user: SelectableUser | SelectableGroup): string {\n return this._data.showGroupMembershipTooltips\n ? user.memberOf\n .map(\n (groupDn) =>\n this.groups?.find((group) => group.distinguishedName === groupDn)\n ?.name,\n )\n .sort((a, b) => (a! > b! ? 1 : -1))\n .join('\\n')\n : '';\n }\n //#endregion\n}\n","<div id=\"dialog-title\">\r\n <h2 mat-dialog-title>{{ _data.title }}</h2>\r\n\r\n <div id=\"num-selected\">\r\n {{ selectedOptions.length }} selected\r\n </div>\r\n</div>\r\n\r\n<mat-dialog-content>\r\n @if (dataSource && photos) {\r\n <form [formGroup]=\"filterForm\">\r\n @if (dataSource) {\r\n <mat-form-field>\r\n <input matInput placeholder=\"Search\" formControlName=\"filter\" #filterInput>\r\n @if (filterForm.value.filter) {\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterForm.get('filter')?.setValue('')\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </form>\r\n <mat-selection-list [multiple]=\"isMultiMode\"\r\n (selectionChange)=\"listSelectionChanged($event.options)\">\r\n @for (user of dataSource.filteredData; track user) {\r\n <mat-list-option [value]=\"user\" [selected]=\"user.selected\"\r\n (selectedChange)=\"optionSelectionChanged(option)\" #option>\r\n @if (getPhoto(user)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(user)\">\r\n } @else {\r\n <mat-icon matListItemAvatar class=\"no-photo\"\r\n [fontIcon]=\"isUser(user) ? 'account_circle' : 'group'\"/>\r\n }\r\n <div class=\"user\">\r\n <div [matTooltip]=\"tooltip(user)\" class=\"user-name\">\r\n {{ user.displayName ?? user.name }}\r\n @if (isUser(user) && _data.showPhone && castUser(user).telephoneNumber) {\r\n <div>{{ castUser(user).telephoneNumber }}</div>\r\n }\r\n </div>\r\n @if (isUser(user)) {\r\n <div>{{ castUser(user).department }}</div>\r\n <div class=\"title\">{{ castUser(user).title }}</div>\r\n }\r\n </div>\r\n </mat-list-option>\r\n }\r\n </mat-selection-list>\r\n } @else {\r\n <div>\r\n <mat-spinner [diameter]=\"50\"/>\r\n <h2 id=\"spinner-message\">Getting users and photos...</h2>\r\n </div>\r\n }\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n @if (dataSource && photos) {\r\n @if (selectedOptions.length) {\r\n <mat-slide-toggle (change)=\"hideUnselectedChanged($event.checked)\">\r\n Hide Unselected\r\n </mat-slide-toggle>\r\n }\r\n @if (isMultiMode) {\r\n <button mat-raised-button color=\"primary\" (click)=\"selectAll()\"\r\n >\r\n <mat-icon fontIcon=\"select_all\"/>\r\n <span class=\"hide-mobile\">Select All</span>\r\n </button>\r\n }\r\n @if (isMultiMode && selectedOptions.length) {\r\n <button mat-raised-button color=\"primary\" (click)=\"deselectAll()\"\r\n >\r\n <mat-icon fontIcon=\"clear_all\"/>\r\n <span class=\"hide-mobile\">Clear All</span>\r\n </button>\r\n }\r\n @if (isMultiMode || !_data.closeWhenSelectionMade) {\r\n <button mat-raised-button color=\"primary\" (click)=\"close()\" matTooltip=\"Accept your selection\"\r\n [disabled]=\"!_data.allowCloseWithoutSelections && !selectedOptions.length\">\r\n <mat-icon fontIcon=\"check\"/>\r\n <span class=\"hide-mobile\">Ok</span>\r\n </button>\r\n }\r\n }\r\n\r\n <button mat-raised-button color=\"warn\" mat-dialog-close matTooltip=\"Close this window\">\r\n <mat-icon fontIcon=\"close\"/>\r\n <span class=\"hide-mobile\">Cancel</span>\r\n </button>\r\n</mat-dialog-actions>","import {\n Component,\n forwardRef,\n inject,\n input,\n OnInit,\n output,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { forkJoin, of } from 'rxjs';\n\nimport {\n ActiveDirectoryService,\n User,\n UserOrGroup,\n} from '@cleavelandprice/ngx-lib/active-directory';\nimport {\n PhotoItem,\n SharePointService,\n} from '@cleavelandprice/ngx-lib/sharepoint';\n\nimport { DefaultUserChooserData } from '../../model/default-user-chooser-data';\nimport { UserChooserData } from '../../model/user-chooser-data';\n\nimport { NgClass } from '@angular/common';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatFormField, MatSuffix } from '@angular/material/form-field';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatInput } from '@angular/material/input';\nimport { MatProgressBar } from '@angular/material/progress-bar';\nimport { UserChooserMode } from '../../mat-active-directory.api';\nimport { UserChooserComponent } from '../user-chooser/user-chooser.component';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'cp-user-field',\n imports: [\n MatFormField,\n MatIcon,\n MatIconButton,\n MatInput,\n MatProgressBar,\n MatSuffix,\n NgClass,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserFormFieldComponent),\n multi: true,\n },\n ],\n standalone: true,\n templateUrl: './user-form-field.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrl: './user-form-field.component.scss',\n})\nexport class UserFormFieldComponent implements OnInit {\n //#region Fields\n #services = {\n dialog: inject(MatDialog),\n activeDirectory: inject(ActiveDirectoryService),\n sharePoint: inject(SharePointService),\n };\n usersSelected = output<string | string[] | UserOrGroup | UserOrGroup[]>(); // string for Single mode, string[] for multi\n userUnSelected = output<string>();\n placeholder = input('Select User(s)');\n clickable = input(true);\n userChooserData = input.required<UserChooserData>();\n _userChooserData!: UserChooserData;\n\n accountNames?: string[];\n\n users?: User[];\n groups?: UserOrGroup[];\n photos?: PhotoItem[];\n\n //#region ControlValueAccessor stuff\n // https://stackoverflow.com/questions/50618050/how-to-create-custom-input-component-with-ngmodel-working-in-angular-6\n value: any; // string\n onChange: (_: any) => void = (_: any) => {}; // Invoked when the model has been changed\n onTouched: () => void = () => {}; // Invoked when the model has been touched\n //#endregion\n //#endregion\n\n //#region Properties\n /*get isEdge(): boolean {\n return window.navigator.userAgent.indexOf('Edge') > -1;\n }*/\n get class(): string {\n return this._userChooserData?.mode === UserChooserMode.Single\n ? ''\n : (this.accountNames?.length ?? 0) > 4\n ? 'grid five'\n : (this.accountNames?.length ?? 0) > 3\n ? 'grid four'\n : (this.accountNames?.length ?? 0) > 2\n ? 'grid three'\n : (this.accountNames?.length ?? 0) > 1\n ? 'grid two'\n : '';\n }\n //#endregion\n\n //#region Lifecycle\n ngOnInit(): void {\n this._userChooserData = {\n ...DefaultUserChooserData,\n ...this.userChooserData(),\n };\n\n // If users have been pre-selected in the config, store those in accountNames, which drives the UI of this component\n this.accountNames = this._userChooserData.preSelections?.accountNames;\n\n this.#getData();\n }\n //#endregion\n\n //#region Events\n selectUser(): void {\n if (!this.clickable()) {\n return;\n }\n\n const data: UserChooserData = {\n ...this._userChooserData,\n\n users: this.users,\n photos: this.photos,\n };\n\n this.#services.dialog\n .open(UserChooserComponent, {\n data: data,\n })\n .afterClosed()\n .subscribe(\n (selected: string | string[] | UserOrGroup | UserOrGroup[]) => {\n if (!selected) {\n return;\n }\n\n this.accountNames = Array.isArray(selected)\n ? selected.map((s) =>\n typeof s === 'string' ? s : s.sAMAccountName,\n )\n : [selected].map((s) =>\n typeof s === 'string' ? s : s.sAMAccountName,\n );\n\n // Overwrite what may have been passed in, for subsequent launches of UserChooserComponent - otherwise it just keeps getting fed stale data\n if (this._userChooserData.preSelections) {\n this._userChooserData.preSelections.accountNames =\n this.accountNames;\n }\n\n this.usersSelected.emit(selected);\n },\n );\n }\n\n unSelectUser(accountName: string): void {\n const index = this.accountNames?.findIndex((a) => a === accountName);\n this.accountNames?.splice(index ?? -1, 1);\n\n if (this._userChooserData.preSelections) {\n this._userChooserData.preSelections.accountNames = this.accountNames;\n }\n\n this.userUnSelected.emit(accountName);\n }\n //#endregion\n\n //#region Utilities\n #getData(): void {\n forkJoin([\n this._userChooserData!.users\n ? // Users were passed in\n of(this._userChooserData!.users)\n : // Users need to be retrieved\n this.#services.activeDirectory.getUsers(\n this._userChooserData.appName ?? 'ngxlibADUserFormField',\n this._userChooserData!.includeDisabledUsers,\n this._userChooserData!.parentOu,\n ),\n\n this._userChooserData!.groups\n ? // Groups were passed in\n of(this._userChooserData!.groups)\n : // Groups need to be retrieved\n this.#services.activeDirectory.getGroups(\n this._userChooserData!.parentOu,\n ),\n\n this._userChooserData!.photos\n ? // Photos were passed in\n of(this._userChooserData!.photos)\n : // Photos need to be retrieved\n this.#services.sharePoint.getPhotos(),\n ]).subscribe(([users, groups, photos]) => {\n this.users = users;\n this.groups = groups;\n this.photos = photos;\n });\n }\n\n getUser(user: string | User | undefined): User | undefined {\n user =\n typeof user === 'string'\n ? this.users?.find(\n (u) =>\n u.sAMAccountName.toLowerCase() === user?.toString().toLowerCase(),\n )\n : user;\n\n return !user ? undefined : 'groupType' in user ? undefined : user;\n }\n\n getGroup(group: string | UserOrGroup | undefined): UserOrGroup | undefined {\n group =\n typeof group === 'string'\n ? this.groups?.find(\n (g) =>\n g.sAMAccountName.toLowerCase() ===\n group?.toString().toLowerCase(),\n )\n : group;\n\n return !group ? undefined : 'groupType' in group ? group : undefined;\n }\n\n getPhoto(accountName: string): string | undefined {\n const user = this.getUser(accountName);\n if (!user) {\n return undefined;\n }\n\n return this.photos?.find(\n (p) =>\n (p.employeeNumber &&\n p.employeeNumber.toString() === user.employeeNumber) ||\n p.accountName?.toLowerCase() === user.sAMAccountName.toLowerCase() ||\n p.displayName?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase() ||\n p.title?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase(),\n )?.encodedAbsUrl;\n }\n //#endregion\n\n //#region ControlValueAccessor methods\n // Method that is invoked on an update of a model.\n updateChanges() {\n this.onChange(this.value);\n }\n\n //#region ControlValueAccessor Overrides\n\n // Writes a new item to the element.\n writeValue(value: any): void {\n this.value = value;\n this.updateChanges();\n }\n\n // Registers a callback function that should be called when the control's value changes in the UI.\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // Registers a callback function that should be called when the control receives a blur event.\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n //#endregion\n\n //#endregion\n}\n","\r\n<!-- In Microsoft Edge, selectUser() never gets called if the input fields are disabled\r\nSo... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\r\nIt's definitely a better experience if the field IS disabled.\r\nOtherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\r\n-->\r\n<!-- Update 8/24/2023:\r\nThe above problem also exists in Chrome now.\r\nSo instead of dynamically setting [disabled] based on browser type,\r\nI'm applying CSS to suppress mouse events on the input - thus making it bubble up to the parent control, which responds the way we want/\r\n-->\r\n\r\n@if (users && photos) {\r\n <div (click)=\"selectUser()\" [class.clickable]=\"clickable()\">\r\n @if (accountNames?.length) {\r\n <div [ngClass]=\"class\">\r\n @for (accountName of accountNames; track accountName; let i = $index) {\r\n <div class=\"user\">\r\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\r\n @if (getPhoto(accountName)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\r\n }\r\n @if (getGroup(accountName)) {\r\n <mat-icon>group</mat-icon>\r\n }\r\n <mat-form-field>\r\n <!-- [disabled]=\"!isEdge\" -->\r\n <input matInput disabled [placeholder]=\"i === 0 ? placeholder() : ''\"\r\n [value]=\"getUser(accountName)?.displayName ?? getGroup(accountName)?.displayName ?? accountName\">\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field>\r\n <input matInput disabled [placeholder]=\"placeholder()\"> <!-- [disabled]=\"!isEdge\" -->\r\n </mat-form-field>\r\n }\r\n </div>\r\n} @else {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n}","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatListModule } from '@angular/material/list';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { ActiveDirectoryServiceOptions, ActiveDirectoryServiceOptionsToken } from '@cleavelandprice/ngx-lib/active-directory';\n\nimport { UserChooserComponent } from './components/user-chooser/user-chooser.component';\nimport { UserFormFieldComponent } from './components/user-form-field/user-form-field.component';\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatButtonModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatListModule,\n MatProgressBarModule,\n MatProgressSpinnerModule,\n MatSlideToggleModule,\n MatTableModule,\n MatTooltipModule,\n\n UserChooserComponent,\n UserFormFieldComponent\n ],\n exports: [\n UserChooserComponent,\n UserFormFieldComponent\n ]\n})\nexport class MatActiveDirectoryModule {\n static forRoot(config: ActiveDirectoryServiceOptions): ModuleWithProviders<MatActiveDirectoryModule> {\n return {\n ngModule: MatActiveDirectoryModule,\n providers: [\n {\n provide: ActiveDirectoryServiceOptionsToken,\n useValue: config\n }\n ]\n };\n }\n\n constructor(@Optional() @SkipSelf() parentModule: MatActiveDirectoryModule) {\n if (parentModule) {\n throw new Error(\n 'MatActiveDirectoryModule is already loaded. Import it in the AppModule only');\n }\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './mat-active-directory.api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,+BAA+B,GAA6B;AACrE,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,KAAK,EAAE;;;ICPC;AAAZ,CAAA,UAAY,eAAe,EAAA;AACvB,IAAA,eAAA,CAAA,eAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,eAAA,CAAA,eAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACZ,CAAC,EAHW,eAAe,KAAf,eAAe,GAAA,EAAA,CAAA,CAAA;;ACIpB,MAAM,sBAAsB,GAAoB;AACnD,IAAA,sBAAsB,EAAE,KAAK;AAC7B,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,iBAAiB,EAAE,KAAK;AACxB,IAAA,2BAA2B,EAAE,KAAK;AACl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AoB;wBACpB,wBAAwB;wBACxB,oBAAoB;wBACpB,cAAc;wBACd,gBAAgB;wBAEhB,oBAAoB;wBACpB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB;AACD;AACF,iBAAA;;0BAcc;;0BAAY;;;AC5D3B;;AAEG;;;;"}
1
+ {"version":3,"file":"cleavelandprice-ngx-lib-active-directory-material.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/default-user-chooser-filter-options.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/user-chooser-mode.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/default-user-chooser-data.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/user-chooser-filter-options.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/model/user-chooser-pre-processing-group.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-chooser/user-chooser.component.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-chooser/user-chooser.component.html","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-form-field/user-form-field.component.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/components/user-form-field/user-form-field.component.html","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/mat-active-directory.module.ts","../../../../projects/cleavelandprice/ngx-lib/active-directory/material/src/cleavelandprice-ngx-lib-active-directory-material.ts"],"sourcesContent":["import { UserChooserFilterOptions } from \"./user-chooser-filter-options\";\r\n\r\nexport const DefaultUserChooserFilterOptions: UserChooserFilterOptions = {\r\n accountName: true,\r\n department: true,\r\n groupMembership: false,\r\n phoneNumber: true,\r\n title: true\r\n};","export enum UserChooserMode {\r\n Single,\r\n Multiple\r\n}","import { DefaultUserChooserFilterOptions } from \"./default-user-chooser-filter-options\";\r\nimport { UserChooserData } from \"./user-chooser-data\";\r\nimport { UserChooserMode } from \"./user-chooser-mode\";\r\n\r\nexport const DefaultUserChooserData: UserChooserData = {\r\n closeWhenSelectionMade: false,\r\n allowCloseWithoutSelections: false,\r\n includeDisabledUsers: false,\r\n returnUserObjects: false,\r\n showGroupMembershipTooltips: false,\r\n showPhone: true,\r\n title: 'Select User(s)',\r\n mode: UserChooserMode.Single,\r\n objectTypes: '*',\r\n filterOptions: DefaultUserChooserFilterOptions\r\n};","export interface UserChooserFilterOptions {\r\n accountName?: boolean;\r\n department?: boolean;\r\n groupMembership?: boolean;\r\n phoneNumber?: boolean;\r\n title?: boolean;\r\n};","export interface UserChooserPreProcessingGroup {\r\n accountNames?: string[];\r\n departments?: string[];\r\n groups?: string[];\r\n titles?: string[];\r\n};","import {\n Component,\n ElementRef,\n inject,\n OnInit,\n ViewChild,\n viewChild,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport {\n MAT_DIALOG_DATA,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n} from '@angular/material/dialog';\nimport {\n MatListItemAvatar,\n MatListOption,\n MatSelectionList,\n} from '@angular/material/list';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { debounceTime, forkJoin, Observable, of } from 'rxjs';\n\nimport { ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';\nimport {\n PhotoItem,\n SharePointService,\n} from '@cleavelandprice/ngx-lib/sharepoint';\n\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatFormField } from '@angular/material/form-field';\nimport { MatIcon } 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 { MatTooltip } from '@angular/material/tooltip';\nimport { DefaultUserChooserData } from '../../model/default-user-chooser-data';\nimport { SelectableGroup } from '../../model/selectable-group';\nimport { SelectableUser } from '../../model/selectable-user';\nimport { UserChooserData } from '../../model/user-chooser-data';\nimport { UserChooserMode } from '../../model/user-chooser-mode';\n\n@Component({\n templateUrl: './user-chooser.component.html',\n imports: [\n MatButton,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatFormField,\n MatIcon,\n MatIconButton,\n MatInput,\n MatListItemAvatar,\n MatListOption,\n MatProgressSpinner,\n MatSelectionList,\n MatSlideToggle,\n MatTooltip,\n ReactiveFormsModule,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrls: [\n './user-chooser.component.scss',\n '../../../../../styles/mat-icon.scss',\n ],\n})\nexport class UserChooserComponent implements OnInit {\n #services = {\n dialogRef: inject(MatDialogRef<UserChooserComponent>),\n activeDirectory: inject(ActiveDirectoryService),\n sharePoint: inject(SharePointService),\n data: inject<UserChooserData>(MAT_DIALOG_DATA),\n };\n _data = { ...DefaultUserChooserData, ...this.#services.data };\n\n //#region Fields\n\n //@ViewChild(MatSelectionList) selectionList?: MatSelectionList;\n selectionList = viewChild(MatSelectionList);\n\n @ViewChild('filterInput') set filterInput(\n elRef: ElementRef<HTMLInputElement>,\n ) {\n if (elRef) {\n elRef.nativeElement.focus();\n }\n }\n //filterInput = viewChild<ElementRef>('filterInput');\n\n filterForm = new FormGroup({\n filter: new FormControl(),\n });\n\n dataSource?: MatTableDataSource<SelectableUser | SelectableGroup>;\n photos?: PhotoItem[];\n groups?: SelectableGroup[]; // May or may not get populated, depending on config data sent in\n //#endregion\n\n //#region Properties\n get isMultiMode(): boolean {\n return this._data.mode === UserChooserMode.Multiple;\n }\n\n get selectedOptions(): MatListOption[] {\n return this.selectionList()?.options.filter((o) => o.selected) ?? [];\n }\n\n get selectedUsers(): (SelectableUser | SelectableGroup)[] {\n return this.dataSource?.data?.filter((d) => d.selected) ?? [];\n }\n\n get filterValue(): string {\n return this.filterForm.value.filter;\n }\n\n get adGroupsNeeded(): boolean {\n // If any are these are true, then we need to pull AD groups for use later\n return (\n (this._data.showGroupMembershipTooltips ?? false) ||\n (this._data.exclusions?.groups?.length ?? 0) > 0 ||\n (this._data.inclusions?.groups?.length ?? 0) > 0 ||\n (this._data.preSelections?.groups?.length ?? 0) > 0 ||\n this._data.filterOptions?.groupMembership ||\n (this._data.selectableGroupNames?.length ?? 0) > 0 ||\n (this._data.groups?.length ?? 0) > 0\n );\n }\n //#endregion\n\n //#region Lifecycle\n ngOnInit(): void {\n this.#getData();\n this.#listenForFilterChanges();\n }\n //#endregion\n\n //#region Events\n listSelectionChanged(options: MatListOption[]): void {\n if (\n this._data.mode === UserChooserMode.Single &&\n this.selectedOptions.length &&\n this._data.closeWhenSelectionMade\n ) {\n this.close();\n }\n }\n\n optionSelectionChanged(option: MatListOption): void {\n const user = this.dataSource?.data.find(\n (u) =>\n u.sAMAccountName.toLocaleLowerCase() ===\n (option.value as SelectableUser).sAMAccountName.toLowerCase(),\n );\n\n if (user) {\n // If we are in single user selection mode, deselect any existing selections first\n if (!this.isMultiMode && option.selected) {\n this.dataSource?.data\n .filter(\n (u) =>\n u.sAMAccountName.toLowerCase() !==\n (option.value as SelectableUser).sAMAccountName.toLowerCase(),\n )\n .forEach((u) => (u.selected = false));\n }\n\n user.selected = option.selected;\n }\n }\n\n hideUnselectedChanged(selected: boolean): void {\n this.filterForm\n .get('filter')\n ?.setValue(selected ? '{selected:true}' : null);\n }\n\n selectAll(): void {\n this.selectionList()?.selectAll();\n\n if (this.selectionList()?.options) {\n this.listSelectionChanged(this.selectionList()!.options.toArray());\n }\n }\n\n deselectAll(): void {\n this.selectionList()?.deselectAll();\n }\n //#endregion\n\n //#region Utilities\n isUser(userOrGroup: SelectableUser | SelectableGroup): boolean {\n return 'title' in userOrGroup;\n }\n castUser(userOrGroup: SelectableUser | SelectableGroup): SelectableUser {\n return userOrGroup as SelectableUser;\n }\n\n #getData(): void {\n const observables$: Observable<any>[] = [\n this._data.users?.length\n ? // Users were passed in\n of(this._data.users)\n : // Users need to be retrieved\n this.#services.activeDirectory.getUsers(\n this._data.appName ?? 'ngxlibADUserChooser',\n this._data.includeDisabledUsers,\n this._data.parentOu,\n ),\n\n this._data.photos?.length\n ? // Photos were passed in\n of(this._data.photos)\n : // Photos need to be retrieved\n this.#services.sharePoint.getPhotos(),\n ];\n\n // Do we need AD groups?\n if (this.adGroupsNeeded) {\n observables$.push(\n this._data.groups?.length\n ? // Groups were passed in\n of(this._data.groups)\n : // Groups need to be retrieved\n this.#services.activeDirectory.getGroups(),\n );\n }\n\n forkJoin(observables$)\n //.subscribe(([users, photos]) => {\n .subscribe((data) => {\n // Need groups in place before we handle exclusions/inclusions/pre-selections\n this.groups = this.adGroupsNeeded ? data[2] : null;\n\n let users = data[0] as SelectableUser[];\n users.forEach((u) => (u.selected = false)); // In case existing data was re-used\n users = this.#includeUsersByAccountName(users);\n users = this.#includeUsersByGroupName(users);\n users = this.#includeUsersByDepartment(users);\n users = this.#includeUsersByTitle(users);\n\n users = this.#excludeUsersByAccountName(users);\n users = this.#excludeUsersByGroupName(users);\n users = this.#excludeUsersByDepartment(users);\n users = this.#excludeUsersByTitle(users);\n\n users = this.#preSelectUsersByAccountName(users);\n users = this.#preSelectUsersByGroupName(users);\n users = this.#preSelectUsersByDepartment(users);\n users = this.#preSelectUsersByTitle(users);\n\n this.#preSelectGroupsByAccountName();\n\n const usersAndGroups: (SelectableUser | SelectableGroup)[] = [];\n\n // Should we allow users to be selected?\n if (['users', '*'].includes(this._data.objectTypes!)) {\n usersAndGroups.push(...users);\n }\n\n // Should we allow groups to be selected\n\n if (['groups', '*'].includes(this._data.objectTypes!)) {\n if (this._data.selectableGroupNames?.length) {\n if (this._data.selectableGroupNames.includes('*')) {\n usersAndGroups.push(...this.groups!);\n } else {\n this._data.selectableGroupNames.forEach((groupName) => {\n const group = this.groups!.find(\n (g) => g.displayName === groupName,\n );\n\n if (group) {\n usersAndGroups.push({\n ...group,\n selected: group.selected,\n });\n }\n });\n }\n }\n }\n\n this.dataSource = new MatTableDataSource(usersAndGroups);\n\n this.photos = data[1];\n\n this.#setFilterPredicate();\n });\n }\n\n close(): void {\n if (!this.selectedUsers?.length) {\n this.#services.dialogRef.close(\n this._data.allowCloseWithoutSelections ? [] : undefined,\n );\n return;\n }\n const value = this.selectedUsers.map((u) =>\n this._data.returnUserObjects ? u : u.sAMAccountName,\n );\n\n this.#services.dialogRef.close(\n this._data.mode === UserChooserMode.Multiple ? value : value[0],\n );\n }\n\n getPhoto(user: SelectableUser | SelectableGroup): string | undefined {\n if (!this.isUser(user)) {\n return;\n }\n\n return this.photos?.find(\n (p) =>\n (p.employeeNumber &&\n p.employeeNumber.toString() ===\n (user as SelectableUser).employeeNumber) ||\n p.accountName?.toLowerCase() === user.sAMAccountName.toLowerCase() ||\n p.displayName?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase() ||\n p.title?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase(),\n )?.encodedAbsUrl;\n }\n\n //#region Exclusions - won't be included in the dataSource at all\n #excludeUsersByAccountName(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.accountNames?.forEach((accountName) => {\n const index = users.findIndex(\n (u) => u.sAMAccountName.toLowerCase() === accountName.toLowerCase(),\n );\n if (index === -1) {\n return;\n }\n\n users.splice(index, 1);\n });\n\n return users;\n }\n\n #excludeUsersByGroupName(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.groups?.forEach((groupName) => {\n const group = this.groups?.find(\n (g) => g.name.toLowerCase() === groupName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n group.member.forEach((groupMemberDn) => {\n const index = users.findIndex(\n (u) => u.distinguishedName === groupMemberDn,\n );\n if (index === -1) {\n return;\n }\n\n users.splice(index, 1);\n });\n });\n\n return users;\n }\n\n #excludeUsersByDepartment(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.departments?.forEach((department) => {\n const excludedUsers = users.filter(\n (u) => u.department?.toLowerCase() === department.toLowerCase(),\n );\n\n excludedUsers.forEach((user) => {\n const index = users.indexOf(user);\n users.splice(index, 1);\n });\n });\n\n return users;\n }\n\n #excludeUsersByTitle(users: SelectableUser[]): SelectableUser[] {\n this._data.exclusions?.titles?.forEach((title) => {\n const excludedUsers = users.filter(\n (u) => u.title?.toLowerCase() === title.toLowerCase(),\n );\n\n excludedUsers.forEach((user) => {\n const index = users.indexOf(user);\n users.splice(index, 1);\n });\n });\n\n return users;\n }\n //#endregion\n\n //#region Inclusions - only these will be included in the dataSource\n #includeUsersByAccountName(users: SelectableUser[]): SelectableUser[] {\n return users.filter(\n (user) =>\n !this._data.inclusions?.accountNames?.length || // No account inclusions specified\n this._data.inclusions.accountNames.find(\n (accountName) =>\n accountName.toLowerCase() === user.sAMAccountName.toLowerCase(),\n ),\n );\n }\n\n #includeUsersByDepartment(users: SelectableUser[]): SelectableUser[] {\n return users.filter(\n (user) =>\n !this._data.inclusions?.departments?.length || // No department inclusions specified\n this._data.inclusions.departments.find(\n (department) =>\n department.toLowerCase() === user.department?.toLowerCase(),\n ),\n );\n }\n\n #includeUsersByTitle(users: SelectableUser[]): SelectableUser[] {\n return users.filter(\n (user) =>\n !this._data.inclusions?.titles?.length || // No title inclusions specified\n this._data.inclusions.titles.find(\n (title) => title.toLowerCase() === user.title?.toLowerCase(),\n ),\n );\n }\n\n #includeUsersByGroupName(users: SelectableUser[]): SelectableUser[] {\n if (!this._data.inclusions?.groups?.length) {\n return users; // No group inclusions specified\n }\n\n // Cheating a bit and leveraging the 'selected' property to keep track of who should be included\n // Since inclusions happen befor pre-selections, we can do that, as long as we set 'selected' back to false when we're done\n this._data.inclusions.groups.forEach((groupName) => {\n const group = this.groups?.find(\n (g) => g.name.toLowerCase() === groupName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n users\n .filter((user) =>\n group.member.find(\n (groupMemberDn) => groupMemberDn === user.distinguishedName,\n ),\n )\n .forEach((user) => (user.selected = true));\n });\n\n // At this point, all of the appropriate users should have 'selected' set to true\n const selectedUsers = users.filter((user) => user.selected); // Subset of the original list\n // Reset 'selected' to false, and return\n selectedUsers.forEach((user) => (user.selected = false));\n return selectedUsers;\n }\n //#endregion\n\n //#region Pre-Selections\n #preSelectUsersByAccountName(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.accountNames?.forEach((accountName) => {\n const user = users.find(\n (u) => u.sAMAccountName.toLowerCase() === accountName.toLowerCase(),\n );\n if (!user) {\n return;\n }\n\n user.selected = true;\n });\n\n return users;\n }\n\n #preSelectGroupsByAccountName(): void {\n this._data.preSelections?.accountNames?.forEach((accountName) => {\n const group = this.groups?.find(\n (g) => g.sAMAccountName.toLowerCase() === accountName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n group.selected = true;\n });\n }\n\n #preSelectUsersByDepartment(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.departments?.forEach((department) =>\n users\n .filter((u) => u.department?.toLowerCase() === department.toLowerCase())\n .forEach((user) => (user.selected = true)),\n );\n\n return users;\n }\n\n #preSelectUsersByTitle(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.titles?.forEach((title) =>\n users\n .filter((u) => u.title?.toLowerCase() === title.toLowerCase())\n .forEach((user) => (user.selected = true)),\n );\n\n return users;\n }\n\n #preSelectUsersByGroupName(users: SelectableUser[]): SelectableUser[] {\n this._data.preSelections?.groups?.forEach((groupName) => {\n const group = this.groups?.find(\n (g) => g.name.toLowerCase() === groupName.toLowerCase(),\n );\n if (!group) {\n return;\n }\n\n group.member.forEach((groupMemberDn) => {\n const user = users.find((u) => u.distinguishedName === groupMemberDn);\n if (!user) {\n return;\n }\n\n user.selected = true;\n });\n });\n\n return users;\n }\n //#endregion\n\n #setFilterPredicate(): void {\n if (!this.dataSource) {\n return;\n }\n\n this.dataSource.filterPredicate = (\n user: SelectableUser | SelectableGroup,\n filter: string,\n ) => {\n if (filter === '{selected:true}') {\n return user.selected;\n } else {\n const regex = new RegExp(filter, 'i'); // Case-insensitive\n let match = false; // The end result - whether or not a employee matches the filter\n\n const filterProperties = ['displayName'];\n if (this._data.filterOptions?.accountName) {\n filterProperties.push('sAMAccountName');\n }\n if (this._data.filterOptions?.title) {\n filterProperties.push('title');\n }\n if (this._data.filterOptions?.department) {\n filterProperties.push('department');\n }\n if (this._data.filterOptions?.phoneNumber) {\n filterProperties.push('telephoneNumber');\n }\n\n // Match on the properties configured above\n filterProperties.forEach((field) => {\n // @ts-ignore\n if (user[field] && user[field].match(regex)) {\n match = true;\n }\n });\n\n // Match on group membership (group name)\n if (this._data.filterOptions?.groupMembership) {\n user.memberOf.forEach((groupDn) => {\n const group = this.groups?.find(\n (group) =>\n group.distinguishedName === groupDn && group.name.match(regex),\n );\n\n if (group) {\n match = true;\n }\n });\n }\n\n return match;\n }\n };\n }\n\n #listenForFilterChanges(): void {\n this.filterForm\n .get('filter')\n ?.valueChanges.pipe(debounceTime(250))\n .subscribe(\n () =>\n (this.dataSource!.filter = this.filterForm.value.filter\n ?.trim()\n .toLowerCase()),\n );\n }\n\n tooltip(user: SelectableUser | SelectableGroup): string {\n return this._data.showGroupMembershipTooltips\n ? user.memberOf\n .map(\n (groupDn) =>\n this.groups?.find((group) => group.distinguishedName === groupDn)\n ?.name,\n )\n .sort((a, b) => (a! > b! ? 1 : -1))\n .join('\\n')\n : '';\n }\n //#endregion\n}\n","<div id=\"dialog-title\">\r\n <h2 mat-dialog-title>{{ _data.title }}</h2>\r\n\r\n <div id=\"num-selected\">\r\n {{ selectedOptions.length }} selected\r\n </div>\r\n</div>\r\n\r\n<mat-dialog-content>\r\n @if (dataSource && photos) {\r\n <form [formGroup]=\"filterForm\">\r\n @if (dataSource) {\r\n <mat-form-field>\r\n <input matInput placeholder=\"Search\" formControlName=\"filter\" #filterInput>\r\n @if (filterForm.value.filter) {\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterForm.get('filter')?.setValue('')\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </form>\r\n <mat-selection-list [multiple]=\"isMultiMode\"\r\n (selectionChange)=\"listSelectionChanged($event.options)\">\r\n @for (user of dataSource.filteredData; track user) {\r\n <mat-list-option [value]=\"user\" [selected]=\"user.selected\"\r\n (selectedChange)=\"optionSelectionChanged(option)\" #option>\r\n @if (getPhoto(user)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(user)\">\r\n } @else {\r\n <mat-icon matListItemAvatar class=\"no-photo\"\r\n [fontIcon]=\"isUser(user) ? 'account_circle' : 'group'\"/>\r\n }\r\n <div class=\"user\">\r\n <div [matTooltip]=\"tooltip(user)\" class=\"user-name\">\r\n {{ user.displayName ?? user.name }}\r\n @if (isUser(user) && _data.showPhone && castUser(user).telephoneNumber) {\r\n <div>{{ castUser(user).telephoneNumber }}</div>\r\n }\r\n </div>\r\n @if (isUser(user)) {\r\n <div>{{ castUser(user).department }}</div>\r\n <div class=\"title\">{{ castUser(user).title }}</div>\r\n }\r\n </div>\r\n </mat-list-option>\r\n }\r\n </mat-selection-list>\r\n } @else {\r\n <div>\r\n <mat-spinner [diameter]=\"50\"/>\r\n <h2 id=\"spinner-message\">Getting users and photos...</h2>\r\n </div>\r\n }\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n @if (dataSource && photos) {\r\n @if (selectedOptions.length) {\r\n <mat-slide-toggle (change)=\"hideUnselectedChanged($event.checked)\">\r\n Hide Unselected\r\n </mat-slide-toggle>\r\n }\r\n @if (isMultiMode) {\r\n <button mat-raised-button color=\"primary\" (click)=\"selectAll()\"\r\n >\r\n <mat-icon fontIcon=\"select_all\"/>\r\n <span class=\"hide-mobile\">Select All</span>\r\n </button>\r\n }\r\n @if (isMultiMode && selectedOptions.length) {\r\n <button mat-raised-button color=\"primary\" (click)=\"deselectAll()\"\r\n >\r\n <mat-icon fontIcon=\"clear_all\"/>\r\n <span class=\"hide-mobile\">Clear All</span>\r\n </button>\r\n }\r\n @if (isMultiMode || !_data.closeWhenSelectionMade) {\r\n <button mat-raised-button color=\"primary\" (click)=\"close()\" matTooltip=\"Accept your selection\"\r\n [disabled]=\"!_data.allowCloseWithoutSelections && !selectedOptions.length\">\r\n <mat-icon fontIcon=\"check\"/>\r\n <span class=\"hide-mobile\">Ok</span>\r\n </button>\r\n }\r\n }\r\n\r\n <button mat-raised-button color=\"warn\" mat-dialog-close matTooltip=\"Close this window\">\r\n <mat-icon fontIcon=\"close\"/>\r\n <span class=\"hide-mobile\">Cancel</span>\r\n </button>\r\n</mat-dialog-actions>","import {\n Component,\n forwardRef,\n inject,\n input,\n OnInit,\n output,\n ChangeDetectionStrategy,\n signal,\n} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { forkJoin, of } from 'rxjs';\n\nimport {\n ActiveDirectoryService,\n User,\n UserOrGroup,\n} from '@cleavelandprice/ngx-lib/active-directory';\nimport {\n PhotoItem,\n SharePointService,\n} from '@cleavelandprice/ngx-lib/sharepoint';\n\nimport { DefaultUserChooserData } from '../../model/default-user-chooser-data';\nimport { UserChooserData } from '../../model/user-chooser-data';\n\nimport { NgClass } from '@angular/common';\nimport { MatIconButton } from '@angular/material/button';\nimport { MatFormField, MatSuffix } from '@angular/material/form-field';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatInput } from '@angular/material/input';\nimport { MatProgressBar } from '@angular/material/progress-bar';\nimport { UserChooserMode } from '../../mat-active-directory.api';\nimport { UserChooserComponent } from '../user-chooser/user-chooser.component';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'cp-user-field',\n imports: [\n MatFormField,\n MatIcon,\n MatIconButton,\n MatInput,\n MatProgressBar,\n MatSuffix,\n NgClass,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => UserFormFieldComponent),\n multi: true,\n },\n ],\n standalone: true,\n templateUrl: './user-form-field.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrl: './user-form-field.component.scss',\n})\nexport class UserFormFieldComponent implements OnInit {\n //#region Fields\n #services = {\n dialog: inject(MatDialog),\n activeDirectory: inject(ActiveDirectoryService),\n sharePoint: inject(SharePointService),\n };\n usersSelected = output<string | string[] | UserOrGroup | UserOrGroup[]>(); // string for Single mode, string[] for multi\n userUnSelected = output<string>();\n placeholder = input('Select User(s)');\n clickable = input(true);\n userChooserData = input.required<UserChooserData>();\n _userChooserData!: UserChooserData;\n\n accountNames?: string[];\n\n users = signal<User[]>([]);\n groups = signal<UserOrGroup[]>([]);\n photos = signal<PhotoItem[]>([]);\n\n //#region ControlValueAccessor stuff\n // https://stackoverflow.com/questions/50618050/how-to-create-custom-input-component-with-ngmodel-working-in-angular-6\n value: any; // string\n onChange: (_: any) => void = (_: any) => {}; // Invoked when the model has been changed\n onTouched: () => void = () => {}; // Invoked when the model has been touched\n //#endregion\n //#endregion\n\n //#region Properties\n /*get isEdge(): boolean {\n return window.navigator.userAgent.indexOf('Edge') > -1;\n }*/\n get class(): string {\n return this._userChooserData?.mode === UserChooserMode.Single\n ? ''\n : (this.accountNames?.length ?? 0) > 4\n ? 'grid five'\n : (this.accountNames?.length ?? 0) > 3\n ? 'grid four'\n : (this.accountNames?.length ?? 0) > 2\n ? 'grid three'\n : (this.accountNames?.length ?? 0) > 1\n ? 'grid two'\n : '';\n }\n //#endregion\n\n //#region Lifecycle\n ngOnInit(): void {\n this._userChooserData = {\n ...DefaultUserChooserData,\n ...this.userChooserData(),\n };\n\n // If users have been pre-selected in the config, store those in accountNames, which drives the UI of this component\n this.accountNames = this._userChooserData.preSelections?.accountNames;\n\n this.#getData();\n }\n //#endregion\n\n //#region Events\n selectUser(): void {\n if (!this.clickable()) {\n return;\n }\n\n const data: UserChooserData = {\n ...this._userChooserData,\n\n users: this.users(),\n photos: this.photos(),\n };\n\n this.#services.dialog\n .open(UserChooserComponent, {\n data: data,\n })\n .afterClosed()\n .subscribe(\n (selected: string | string[] | UserOrGroup | UserOrGroup[]) => {\n if (!selected) {\n return;\n }\n\n this.accountNames = Array.isArray(selected)\n ? selected.map((s) =>\n typeof s === 'string' ? s : s.sAMAccountName,\n )\n : [selected].map((s) =>\n typeof s === 'string' ? s : s.sAMAccountName,\n );\n\n // Overwrite what may have been passed in, for subsequent launches of UserChooserComponent - otherwise it just keeps getting fed stale data\n if (this._userChooserData.preSelections) {\n this._userChooserData.preSelections.accountNames =\n this.accountNames;\n }\n\n this.usersSelected.emit(selected);\n },\n );\n }\n\n unSelectUser(accountName: string): void {\n const index = this.accountNames?.findIndex((a) => a === accountName);\n this.accountNames?.splice(index ?? -1, 1);\n\n if (this._userChooserData.preSelections) {\n this._userChooserData.preSelections.accountNames = this.accountNames;\n }\n\n this.userUnSelected.emit(accountName);\n }\n //#endregion\n\n //#region Utilities\n #getData(): void {\n forkJoin([\n this._userChooserData!.users\n ? // Users were passed in\n of(this._userChooserData!.users)\n : // Users need to be retrieved\n this.#services.activeDirectory.getUsers(\n this._userChooserData.appName ?? 'ngxlibADUserFormField',\n this._userChooserData!.includeDisabledUsers,\n this._userChooserData!.parentOu,\n ),\n\n this._userChooserData!.groups\n ? // Groups were passed in\n of(this._userChooserData!.groups)\n : // Groups need to be retrieved\n this.#services.activeDirectory.getGroups(\n this._userChooserData!.parentOu,\n ),\n\n this._userChooserData!.photos\n ? // Photos were passed in\n of(this._userChooserData!.photos)\n : // Photos need to be retrieved\n this.#services.sharePoint.getPhotos(),\n ]).subscribe(([users, groups, photos]) => {\n this.users.set(users);\n this.groups.set(groups);\n this.photos.set(photos);\n });\n }\n\n getUser(user: string | User | undefined): User | undefined {\n user =\n typeof user === 'string'\n ? this.users()?.find(\n (u) =>\n u.sAMAccountName.toLowerCase() === user?.toString().toLowerCase(),\n )\n : user;\n\n return !user ? undefined : 'groupType' in user ? undefined : user;\n }\n\n getGroup(group: string | UserOrGroup | undefined): UserOrGroup | undefined {\n group =\n typeof group === 'string'\n ? this.groups()?.find(\n (g) =>\n g.sAMAccountName.toLowerCase() ===\n group?.toString().toLowerCase(),\n )\n : group;\n\n return !group ? undefined : 'groupType' in group ? group : undefined;\n }\n\n getPhoto(accountName: string): string | undefined {\n const user = this.getUser(accountName);\n if (!user) {\n return undefined;\n }\n\n return this.photos()?.find(\n (p) =>\n (p.employeeNumber &&\n p.employeeNumber.toString() === user.employeeNumber) ||\n p.accountName?.toLowerCase() === user.sAMAccountName.toLowerCase() ||\n p.displayName?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase() ||\n p.title?.toLowerCase() ===\n (user.displayName ?? user.name).toLowerCase(),\n )?.encodedAbsUrl;\n }\n //#endregion\n\n //#region ControlValueAccessor methods\n // Method that is invoked on an update of a model.\n updateChanges() {\n this.onChange(this.value);\n }\n\n //#region ControlValueAccessor Overrides\n\n // Writes a new item to the element.\n writeValue(value: any): void {\n this.value = value;\n this.updateChanges();\n }\n\n // Registers a callback function that should be called when the control's value changes in the UI.\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n // Registers a callback function that should be called when the control receives a blur event.\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n //#endregion\n\n //#endregion\n}\n","\r\n<!-- In Microsoft Edge, selectUser() never gets called if the input fields are disabled\r\nSo... I'm dynamically setting the disabled property based on whether or not the browser is Edge.\r\nIt's definitely a better experience if the field IS disabled.\r\nOtherwise, it's confusing - especially because Edge is SO SLOW to display the resulting dialog window.\r\n-->\r\n<!-- Update 8/24/2023:\r\nThe above problem also exists in Chrome now.\r\nSo instead of dynamically setting [disabled] based on browser type,\r\nI'm applying CSS to suppress mouse events on the input - thus making it bubble up to the parent control, which responds the way we want/\r\n-->\r\n\r\n@if (users().length && photos().length) {\r\n <div (click)=\"selectUser()\" [class.clickable]=\"clickable()\">\r\n @if (accountNames?.length) {\r\n <div [ngClass]=\"class\">\r\n @for (accountName of accountNames; track accountName; let i = $index) {\r\n <div class=\"user\">\r\n <!--<img *ngIf=\"accountName && empUtils.getEmployee(accountName)\" alt=\"\" [src]=\"empUtils.getEmployee(accountName) | employeePhotoUrl:cacheService.photos\">-->\r\n @if (getPhoto(accountName)) {\r\n <img matListItemAvatar alt=\"\" [src]=\"getPhoto(accountName)\">\r\n }\r\n @if (getGroup(accountName)) {\r\n <mat-icon>group</mat-icon>\r\n }\r\n <mat-form-field>\r\n <!-- [disabled]=\"!isEdge\" -->\r\n <input matInput disabled [placeholder]=\"i === 0 ? placeholder() : ''\"\r\n [value]=\"getUser(accountName)?.displayName ?? getGroup(accountName)?.displayName ?? accountName\">\r\n <button matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"$event.stopPropagation(); unSelectUser(accountName)\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field>\r\n <input matInput disabled [placeholder]=\"placeholder()\"> <!-- [disabled]=\"!isEdge\" -->\r\n </mat-form-field>\r\n }\r\n </div>\r\n} @else {\r\n <mat-progress-bar mode=\"indeterminate\"/>\r\n}","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatListModule } from '@angular/material/list';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { ActiveDirectoryServiceOptions, ActiveDirectoryServiceOptionsToken } from '@cleavelandprice/ngx-lib/active-directory';\n\nimport { UserChooserComponent } from './components/user-chooser/user-chooser.component';\nimport { UserFormFieldComponent } from './components/user-form-field/user-form-field.component';\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatButtonModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatListModule,\n MatProgressBarModule,\n MatProgressSpinnerModule,\n MatSlideToggleModule,\n MatTableModule,\n MatTooltipModule,\n\n UserChooserComponent,\n UserFormFieldComponent\n ],\n exports: [\n UserChooserComponent,\n UserFormFieldComponent\n ]\n})\nexport class MatActiveDirectoryModule {\n static forRoot(config: ActiveDirectoryServiceOptions): ModuleWithProviders<MatActiveDirectoryModule> {\n return {\n ngModule: MatActiveDirectoryModule,\n providers: [\n {\n provide: ActiveDirectoryServiceOptionsToken,\n useValue: config\n }\n ]\n };\n }\n\n constructor(@Optional() @SkipSelf() parentModule: MatActiveDirectoryModule) {\n if (parentModule) {\n throw new Error(\n 'MatActiveDirectoryModule is already loaded. Import it in the AppModule only');\n }\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './mat-active-directory.api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,+BAA+B,GAA6B;AACrE,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,KAAK,EAAE;;;ICPC;AAAZ,CAAA,UAAY,eAAe,EAAA;AACvB,IAAA,eAAA,CAAA,eAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,eAAA,CAAA,eAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ;AACZ,CAAC,EAHW,eAAe,KAAf,eAAe,GAAA,EAAA,CAAA,CAAA;;ACIpB,MAAM,sBAAsB,GAAoB;AACnD,IAAA,sBAAsB,EAAE,KAAK;AAC7B,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,iBAAiB,EAAE,KAAK;AACxB,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,eAAe,CAAC,MAA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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,aAAa;wBACb,oBAAoB;wBACpB,wBAAwB;wBACxB,oBAAoB;wBACpB,cAAc;wBACd,gBAAgB;wBAEhB,oBAAoB;wBACpB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB;AACD;AACF,iBAAA;;0BAcc;;0BAAY;;;AC5D3B;;AAEG;;;;"}
@@ -35,7 +35,7 @@ class MatAuthenticationService extends AuthenticationTokenService {
35
35
  this.logout();
36
36
  return;
37
37
  }
38
- this.authenticatedUser = {
38
+ this.authenticatedUser.set({
39
39
  accountName: decoded.winaccountname,
40
40
  admin: decoded.role === 'Admin',
41
41
  department: decoded.department,
@@ -53,24 +53,27 @@ class MatAuthenticationService extends AuthenticationTokenService {
53
53
  sid: decoded.sid,
54
54
  title: decoded.title,
55
55
  workShift: decoded.workShift
56
- };
56
+ });
57
57
  this.storage.setItem(this.options.tokenName, token);
58
58
  this.#getPhoto();
59
- this.authenticated = true;
60
- this.authenticatedChanged.emit(this.authenticated);
61
- this.authenticating = false;
62
- this.authenticatingChanged.emit(this.authenticating);
59
+ this.authenticated.set(true);
60
+ this.authenticatedChanged.emit(this.authenticated());
61
+ this.authenticating.set(false);
62
+ this.authenticatingChanged.emit(this.authenticating());
63
63
  }
64
64
  #getPhoto() {
65
65
  this.#sharePointService.getPhotos()
66
66
  .subscribe(photos => {
67
67
  // The user may have been logged out by the time the photos came back
68
- if (!this.authenticatedUser?.employeeNumber) {
68
+ if (!this.authenticatedUser()?.employeeNumber) {
69
69
  return;
70
70
  }
71
- const photo = this.authenticatedUser.employeeNumber && photos.find(pic => pic.employeeNumber === +this.authenticatedUser.employeeNumber);
71
+ const photo = this.authenticatedUser().employeeNumber && photos.find(pic => pic.employeeNumber === +this.authenticatedUser().employeeNumber);
72
72
  if (photo) {
73
- this.authenticatedUser.photoUrl = photo.encodedAbsUrl;
73
+ this.authenticatedUser.update(current => ({
74
+ ...current,
75
+ photoUrl: photo.encodedAbsUrl
76
+ }));
74
77
  }
75
78
  });
76
79
  }
@@ -142,7 +145,7 @@ class LoginFormComponent {
142
145
  }
143
146
  }
144
147
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
145
- 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) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (errorMessage) {\n <div id=\"error\">\n {{ errorMessage }}\n </div>\n } @else {\n <form [formGroup]=\"form\">\n <mat-form-field>\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\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 <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-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: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: 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: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
148
+ 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()) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (errorMessage) {\n <div id=\"error\">\n {{ errorMessage }}\n </div>\n } @else {\n <form [formGroup]=\"form\">\n <mat-form-field>\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\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 <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-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: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: 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: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
146
149
  }
147
150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginFormComponent, decorators: [{
148
151
  type: Component,
@@ -156,7 +159,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
156
159
  MatProgressSpinner,
157
160
  MatSlideToggle,
158
161
  ReactiveFormsModule,
159
- ], 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) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (errorMessage) {\n <div id=\"error\">\n {{ errorMessage }}\n </div>\n } @else {\n <form [formGroup]=\"form\">\n <mat-form-field>\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\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 <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-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"] }]
162
+ ], 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()) {\n <div id=\"spinner\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\"/>\n </div>\n } @else if (errorMessage) {\n <div id=\"error\">\n {{ errorMessage }}\n </div>\n } @else {\n <form [formGroup]=\"form\">\n <mat-form-field>\n <input matInput formControlName=\"username\" placeholder=\"Username\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\n <mat-form-field>\n <input matInput formControlName=\"password\" type=\"password\" placeholder=\"Password\" (keyup.enter)=\"authenticate()\">\n </mat-form-field>\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 <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-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"] }]
160
163
  }] });
161
164
 
162
165
  class LoginComponent {
@@ -195,11 +198,11 @@ class LoginComponent {
195
198
  });
196
199
  }
197
200
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
198
- 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\">\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 }); }
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\">\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 }); }
199
202
  }
200
203
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LoginComponent, decorators: [{
201
204
  type: Component,
202
- 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"] }]
205
+ 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"] }]
203
206
  }], propDecorators: { adminGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "adminGroup", required: false }] }], additionalInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "additionalInfo", required: false }] }] } });
204
207
 
205
208
  class MatAuthenticationModule {