@cleavelandprice/ngx-lib 4.8.16 → 4.8.17

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,24 +1,25 @@
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, signal, forwardRef, Optional, SkipSelf, NgModule } from '@angular/core';
5
- import * as i2 from '@angular/forms';
6
- import { FormGroup, FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import { inject, viewChild, signal, afterRenderEffect, effect, ChangeDetectionStrategy, Component, output, input, forwardRef, Optional, SkipSelf, NgModule } from '@angular/core';
5
+ import { schema, required, debounce, form, apply, FormField } from '@angular/forms/signals';
7
6
  import * as i1 from '@angular/material/dialog';
8
7
  import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
9
8
  import { MatSelectionList, MatListItemAvatar, MatListOption, MatListModule } from '@angular/material/list';
10
9
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
11
- import { of, forkJoin, debounceTime } from 'rxjs';
12
- import { SharePointService } from '@cleavelandprice/ngx-lib/sharepoint';
13
10
  import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
14
- import { MatFormField, MatSuffix, MatFormFieldModule } from '@angular/material/form-field';
11
+ import * as i2 from '@angular/material/form-field';
12
+ import { MatFormFieldModule, MatFormField, MatSuffix } from '@angular/material/form-field';
15
13
  import { MatIcon, MatIconModule } from '@angular/material/icon';
16
14
  import { MatInput, MatInputModule } from '@angular/material/input';
17
15
  import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
18
16
  import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
19
17
  import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
18
+ import { of, forkJoin } from 'rxjs';
19
+ import { SharePointService } from '@cleavelandprice/ngx-lib/sharepoint';
20
20
  import { NgClass, CommonModule } from '@angular/common';
21
21
  import { MatProgressBar, MatProgressBarModule } from '@angular/material/progress-bar';
22
+ import { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
22
23
 
23
24
  const DefaultUserChooserFilterOptions = {
24
25
  accountName: true,
@@ -52,43 +53,13 @@ const DefaultUserChooserData = {
52
53
  ;
53
54
 
54
55
  class UserChooserComponent {
55
- constructor() {
56
- this.#services = {
57
- dialogRef: inject((MatDialogRef)),
58
- activeDirectory: inject(ActiveDirectoryService),
59
- sharePoint: inject(SharePointService),
60
- data: inject(MAT_DIALOG_DATA),
61
- };
62
- this._data = { ...DefaultUserChooserData, ...this.#services.data };
63
- //#region Fields
64
- //@ViewChild(MatSelectionList) selectionList?: MatSelectionList;
65
- this.selectionList = viewChild(MatSelectionList, /* @ts-ignore */
66
- ...(ngDevMode ? [{ debugName: "selectionList" }] : /* istanbul ignore next */ []));
67
- //filterInput = viewChild<ElementRef>('filterInput');
68
- this.filterForm = new FormGroup({
69
- filter: new FormControl(),
70
- });
71
- }
72
56
  #services;
73
- set filterInput(elRef) {
74
- if (elRef) {
75
- elRef.nativeElement.focus();
76
- }
77
- }
57
+ #filterFormSchema;
78
58
  //#endregion
79
59
  //#region Properties
80
60
  get isMultiMode() {
81
61
  return this._data.mode === UserChooserMode.Multiple;
82
62
  }
83
- get selectedOptions() {
84
- return this.selectionList()?.options.filter((o) => o.selected) ?? [];
85
- }
86
- get selectedUsers() {
87
- return this.dataSource?.data?.filter((d) => d.selected) ?? [];
88
- }
89
- get filterValue() {
90
- return this.filterForm.value.filter;
91
- }
92
63
  get adGroupsNeeded() {
93
64
  // If any are these are true, then we need to pull AD groups for use later
94
65
  return ((this._data.showGroupMembershipTooltips ?? false) ||
@@ -101,43 +72,78 @@ class UserChooserComponent {
101
72
  }
102
73
  //#endregion
103
74
  //#region Lifecycle
75
+ constructor() {
76
+ this.#services = {
77
+ dialogRef: inject((MatDialogRef)),
78
+ activeDirectory: inject(ActiveDirectoryService),
79
+ sharePoint: inject(SharePointService),
80
+ data: inject(MAT_DIALOG_DATA),
81
+ };
82
+ this._data = { ...DefaultUserChooserData, ...this.#services.data };
83
+ //#region Fields
84
+ this.selectionList = viewChild(MatSelectionList, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "selectionList" }] : /* istanbul ignore next */ []));
86
+ this.filterInput = viewChild('filterInput', /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "filterInput" }] : /* istanbul ignore next */ []));
88
+ this.filterFormModel = signal({ filter: '' }, /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "filterFormModel" }] : /* istanbul ignore next */ []));
90
+ this.#filterFormSchema = schema((schemaPath) => {
91
+ required(schemaPath.filter);
92
+ debounce(schemaPath.filter, 500);
93
+ });
94
+ this.filterForm = form(this.filterFormModel, (path) => apply(path, this.#filterFormSchema));
95
+ this.dataSource = signal(undefined, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
97
+ this.photos = signal([], /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "photos" }] : /* istanbul ignore next */ []));
99
+ this.groups = signal([], /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ [])); // May or may not get populated, depending on config data sent in
101
+ this.selectedUsersOrGroups = signal([], /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "selectedUsersOrGroups" }] : /* istanbul ignore next */ []));
103
+ afterRenderEffect(() => {
104
+ this.filterInput()?.nativeElement.focus();
105
+ });
106
+ effect(() => {
107
+ if (this.dataSource()) {
108
+ this.dataSource().filter = this.filterForm().value().filter.toLowerCase();
109
+ }
110
+ });
111
+ }
104
112
  ngOnInit() {
105
113
  this.#getData();
106
- this.#listenForFilterChanges();
107
114
  }
108
115
  //#endregion
109
116
  //#region Events
110
- listSelectionChanged(options) {
117
+ closeIfSingleSelection( /* event: MatSelectionListChange */) {
111
118
  if (this._data.mode === UserChooserMode.Single &&
112
- this.selectedOptions.length &&
119
+ this.selectedUsersOrGroups().length &&
113
120
  this._data.closeWhenSelectionMade) {
114
121
  this.close();
115
122
  }
116
123
  }
117
124
  optionSelectionChanged(option) {
118
- const user = this.dataSource?.data.find((u) => u.sAMAccountName.toLocaleLowerCase() ===
125
+ const userOrGroup = this.dataSource()?.data.find((u) => u.sAMAccountName.toLocaleLowerCase() ===
119
126
  option.value.sAMAccountName.toLowerCase());
120
- if (user) {
127
+ if (userOrGroup) {
121
128
  // If we are in single user selection mode, deselect any existing selections first
122
129
  if (!this.isMultiMode && option.selected) {
123
- this.dataSource?.data
130
+ this.dataSource()?.data
124
131
  .filter((u) => u.sAMAccountName.toLowerCase() !==
125
132
  option.value.sAMAccountName.toLowerCase())
126
133
  .forEach((u) => (u.selected = false));
127
134
  }
128
- user.selected = option.selected;
135
+ userOrGroup.selected = option.selected;
129
136
  }
137
+ this.selectedUsersOrGroups.set(this.dataSource()?.data.filter(u => u.selected) ?? []);
130
138
  }
131
139
  hideUnselectedChanged(selected) {
132
- this.filterForm
133
- .get('filter')
134
- ?.setValue(selected ? '{selected:true}' : null);
140
+ this.filterForm().value.set({ filter: selected ? '{selected:true}' : '' });
135
141
  }
136
142
  selectAll() {
137
143
  this.selectionList()?.selectAll();
138
- if (this.selectionList()?.options) {
139
- this.listSelectionChanged(this.selectionList().options.toArray());
140
- }
144
+ /*if (this.selectionList()?.options) {
145
+ this.closeIfSingleSelection();
146
+ }*/
141
147
  }
142
148
  deselectAll() {
143
149
  this.selectionList()?.deselectAll();
@@ -175,7 +181,7 @@ class UserChooserComponent {
175
181
  //.subscribe(([users, photos]) => {
176
182
  .subscribe((data) => {
177
183
  // Need groups in place before we handle exclusions/inclusions/pre-selections
178
- this.groups = this.adGroupsNeeded ? data[2] : null;
184
+ this.groups.set(this.adGroupsNeeded ? data[2] : []);
179
185
  let users = data[0];
180
186
  users.forEach((u) => (u.selected = false)); // In case existing data was re-used
181
187
  users = this.#includeUsersByAccountName(users);
@@ -200,11 +206,11 @@ class UserChooserComponent {
200
206
  if (['groups', '*'].includes(this._data.objectTypes)) {
201
207
  if (this._data.selectableGroupNames?.length) {
202
208
  if (this._data.selectableGroupNames.includes('*')) {
203
- usersAndGroups.push(...this.groups);
209
+ usersAndGroups.push(...this.groups());
204
210
  }
205
211
  else {
206
212
  this._data.selectableGroupNames.forEach((groupName) => {
207
- const group = this.groups.find((g) => g.displayName === groupName);
213
+ const group = this.groups().find((g) => g.displayName === groupName);
208
214
  if (group) {
209
215
  usersAndGroups.push({
210
216
  ...group,
@@ -215,24 +221,24 @@ class UserChooserComponent {
215
221
  }
216
222
  }
217
223
  }
218
- this.dataSource = new MatTableDataSource(usersAndGroups);
219
- this.photos = data[1];
224
+ this.dataSource.set(new MatTableDataSource(usersAndGroups));
225
+ this.photos.set(data[1]);
220
226
  this.#setFilterPredicate();
221
227
  });
222
228
  }
223
229
  close() {
224
- if (!this.selectedUsers?.length) {
230
+ if (!this.selectedUsersOrGroups().length) {
225
231
  this.#services.dialogRef.close(this._data.allowCloseWithoutSelections ? [] : undefined);
226
232
  return;
227
233
  }
228
- const value = this.selectedUsers.map((u) => this._data.returnUserObjects ? u : u.sAMAccountName);
234
+ const value = this.selectedUsersOrGroups().map((u) => this._data.returnUserObjects ? u : u.sAMAccountName);
229
235
  this.#services.dialogRef.close(this._data.mode === UserChooserMode.Multiple ? value : value[0]);
230
236
  }
231
237
  getPhoto(user) {
232
238
  if (!this.isUser(user)) {
233
239
  return;
234
240
  }
235
- return this.photos?.find((p) => (p.employeeNumber &&
241
+ return this.photos().find((p) => (p.employeeNumber &&
236
242
  p.employeeNumber.toString() ===
237
243
  user.employeeNumber) ||
238
244
  p.accountName?.toLowerCase() === user.sAMAccountName.toLowerCase() ||
@@ -254,7 +260,7 @@ class UserChooserComponent {
254
260
  }
255
261
  #excludeUsersByGroupName(users) {
256
262
  this._data.exclusions?.groups?.forEach((groupName) => {
257
- const group = this.groups?.find((g) => g.name.toLowerCase() === groupName.toLowerCase());
263
+ const group = this.groups().find((g) => g.name.toLowerCase() === groupName.toLowerCase());
258
264
  if (!group) {
259
265
  return;
260
266
  }
@@ -309,7 +315,7 @@ class UserChooserComponent {
309
315
  // Cheating a bit and leveraging the 'selected' property to keep track of who should be included
310
316
  // Since inclusions happen befor pre-selections, we can do that, as long as we set 'selected' back to false when we're done
311
317
  this._data.inclusions.groups.forEach((groupName) => {
312
- const group = this.groups?.find((g) => g.name.toLowerCase() === groupName.toLowerCase());
318
+ const group = this.groups().find((g) => g.name.toLowerCase() === groupName.toLowerCase());
313
319
  if (!group) {
314
320
  return;
315
321
  }
@@ -337,7 +343,7 @@ class UserChooserComponent {
337
343
  }
338
344
  #preSelectGroupsByAccountName() {
339
345
  this._data.preSelections?.accountNames?.forEach((accountName) => {
340
- const group = this.groups?.find((g) => g.sAMAccountName.toLowerCase() === accountName.toLowerCase());
346
+ const group = this.groups().find((g) => g.sAMAccountName.toLowerCase() === accountName.toLowerCase());
341
347
  if (!group) {
342
348
  return;
343
349
  }
@@ -358,7 +364,7 @@ class UserChooserComponent {
358
364
  }
359
365
  #preSelectUsersByGroupName(users) {
360
366
  this._data.preSelections?.groups?.forEach((groupName) => {
361
- const group = this.groups?.find((g) => g.name.toLowerCase() === groupName.toLowerCase());
367
+ const group = this.groups().find((g) => g.name.toLowerCase() === groupName.toLowerCase());
362
368
  if (!group) {
363
369
  return;
364
370
  }
@@ -374,10 +380,10 @@ class UserChooserComponent {
374
380
  }
375
381
  //#endregion
376
382
  #setFilterPredicate() {
377
- if (!this.dataSource) {
383
+ if (!this.dataSource()) {
378
384
  return;
379
385
  }
380
- this.dataSource.filterPredicate = (user, filter) => {
386
+ this.dataSource().filterPredicate = (user, filter) => {
381
387
  if (filter === '{selected:true}') {
382
388
  return user.selected;
383
389
  }
@@ -407,7 +413,7 @@ class UserChooserComponent {
407
413
  // Match on group membership (group name)
408
414
  if (this._data.filterOptions?.groupMembership) {
409
415
  user.memberOf.forEach((groupDn) => {
410
- const group = this.groups?.find((group) => group.distinguishedName === groupDn && group.name.match(regex));
416
+ const group = this.groups().find((group) => group.distinguishedName === groupDn && group.name.match(regex));
411
417
  if (group) {
412
418
  match = true;
413
419
  }
@@ -417,32 +423,25 @@ class UserChooserComponent {
417
423
  }
418
424
  };
419
425
  }
420
- #listenForFilterChanges() {
421
- this.filterForm
422
- .get('filter')
423
- ?.valueChanges.pipe(debounceTime(250))
424
- .subscribe(() => (this.dataSource.filter = this.filterForm.value.filter
425
- ?.trim()
426
- .toLowerCase()));
427
- }
428
426
  tooltip(user) {
429
427
  return this._data.showGroupMembershipTooltips
430
428
  ? user.memberOf
431
- .map((groupDn) => this.groups?.find((group) => group.distinguishedName === groupDn)
429
+ .map((groupDn) => this.groups().find((group) => group.distinguishedName === groupDn)
432
430
  ?.name)
433
431
  .sort((a, b) => (a > b ? 1 : -1))
434
432
  .join('\n')
435
433
  : '';
436
434
  }
437
435
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UserChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
438
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: UserChooserComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "selectionList", first: true, predicate: MatSelectionList, descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], ngImport: i0, template: "<div mat-dialog-title>\r\n <div id=\"dialog-title\">\r\n <h2>{{ _data.title }}</h2>\r\n \r\n <div id=\"num-selected\">\r\n {{ selectedOptions.length }} selected\r\n </div>\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>", styles: ["::ng-deep .mat-tooltip{font-size:1em!important;white-space:pre-line}mat-dialog-content{min-width:50vw}#dialog-title{display:flex;justify-content:space-between}.mat-mdc-dialog-title:before{display:none!important}#num-selected{margin:1em 1em 0 0}mat-spinner{margin:0 auto}#spinner-message{text-align:center;padding:.5em}mat-form-field{width:100%}.title{font-style:italic;color:#757575}img,.no-photo{width:2rem;height:2rem;font-size:2.3rem!important;border-radius:100%}.hide-mobile{display:none}mat-dialog-actions{display:grid;grid-auto-flow:column;grid-gap:1em;justify-content:center}.user-name{display:flex;justify-content:space-between}.user-name>div:last-child{margin-right:10rem;font-weight:400;font-style:italic;color:#757575}@media(min-width:801px){.user{display:grid;grid-template-columns:1fr 1fr 1fr}.user>div:first-child{font-weight:700}.hide-mobile{display:initial}}\n", ".material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:\"liga\"}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "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: "directive", type: MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "component", type: MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { 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: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
436
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: UserChooserComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "selectionList", first: true, predicate: MatSelectionList, descendants: true, isSignal: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div mat-dialog-title>\r\n <div id=\"dialog-title\">\r\n <h2>{{ _data.title }}</h2>\r\n \r\n <div id=\"num-selected\">\r\n {{ selectedUsersOrGroups().length }} selected\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<mat-dialog-content>\r\n @if (dataSource() && photos().length) {\r\n <form>\r\n @if (dataSource()) {\r\n <mat-form-field>\r\n <input matInput placeholder=\"Search\" [formField]=\"filterForm.filter\" #filterInput>\r\n @if (filterForm().value().filter) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterFormModel.set({filter: ''})\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </form>\r\n\r\n <mat-selection-list [multiple]=\"isMultiMode\" (selectionChange)=\"closeIfSingleSelection()\">\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().length) {\r\n @if (selectedUsersOrGroups().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 && selectedUsersOrGroups().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 && !selectedUsersOrGroups().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>", styles: ["::ng-deep .mat-tooltip{font-size:1em!important;white-space:pre-line}mat-dialog-content{min-width:50vw}#dialog-title{display:flex;justify-content:space-between}.mat-mdc-dialog-title:before{display:none!important}#num-selected{margin:1em 1em 0 0}mat-spinner{margin:0 auto}#spinner-message{text-align:center;padding:.5em}mat-form-field{width:100%}.title{font-style:italic;color:#757575}img,.no-photo{width:2rem;height:2rem;font-size:2.3rem!important;border-radius:100%}.hide-mobile{display:none}mat-dialog-actions{display:grid;grid-auto-flow:column;grid-gap:1em;justify-content:center}.user-name{display:flex;justify-content:space-between}.user-name>div:last-child{margin-right:10rem;font-weight:400;font-style:italic;color:#757575}@media(min-width:801px){.user{display:grid;grid-template-columns:1fr 1fr 1fr}.user>div:first-child{font-weight:700}.hide-mobile{display:initial}}\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: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: "directive", type: MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "component", type: MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { 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: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.Eager }); }
439
437
  }
440
438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UserChooserComponent, decorators: [{
441
439
  type: Component,
442
440
  args: [{ imports: [
441
+ FormField,
443
442
  MatButton,
444
443
  MatDialogModule,
445
- MatFormField,
444
+ MatFormFieldModule,
446
445
  MatIcon,
447
446
  MatIconButton,
448
447
  MatInput,
@@ -451,13 +450,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
451
450
  MatProgressSpinner,
452
451
  MatSelectionList,
453
452
  MatSlideToggle,
454
- MatTooltip,
455
- ReactiveFormsModule,
456
- ], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<div mat-dialog-title>\r\n <div id=\"dialog-title\">\r\n <h2>{{ _data.title }}</h2>\r\n \r\n <div id=\"num-selected\">\r\n {{ selectedOptions.length }} selected\r\n </div>\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>", styles: ["::ng-deep .mat-tooltip{font-size:1em!important;white-space:pre-line}mat-dialog-content{min-width:50vw}#dialog-title{display:flex;justify-content:space-between}.mat-mdc-dialog-title:before{display:none!important}#num-selected{margin:1em 1em 0 0}mat-spinner{margin:0 auto}#spinner-message{text-align:center;padding:.5em}mat-form-field{width:100%}.title{font-style:italic;color:#757575}img,.no-photo{width:2rem;height:2rem;font-size:2.3rem!important;border-radius:100%}.hide-mobile{display:none}mat-dialog-actions{display:grid;grid-auto-flow:column;grid-gap:1em;justify-content:center}.user-name{display:flex;justify-content:space-between}.user-name>div:last-child{margin-right:10rem;font-weight:400;font-style:italic;color:#757575}@media(min-width:801px){.user{display:grid;grid-template-columns:1fr 1fr 1fr}.user>div:first-child{font-weight:700}.hide-mobile{display:initial}}\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"] }]
457
- }], propDecorators: { selectionList: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSelectionList), { isSignal: true }] }], filterInput: [{
458
- type: ViewChild,
459
- args: ['filterInput']
460
- }] } });
453
+ MatTooltip
454
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.Eager, template: "<div mat-dialog-title>\r\n <div id=\"dialog-title\">\r\n <h2>{{ _data.title }}</h2>\r\n \r\n <div id=\"num-selected\">\r\n {{ selectedUsersOrGroups().length }} selected\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<mat-dialog-content>\r\n @if (dataSource() && photos().length) {\r\n <form>\r\n @if (dataSource()) {\r\n <mat-form-field>\r\n <input matInput placeholder=\"Search\" [formField]=\"filterForm.filter\" #filterInput>\r\n @if (filterForm().value().filter) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterFormModel.set({filter: ''})\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </form>\r\n\r\n <mat-selection-list [multiple]=\"isMultiMode\" (selectionChange)=\"closeIfSingleSelection()\">\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().length) {\r\n @if (selectedUsersOrGroups().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 && selectedUsersOrGroups().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 && !selectedUsersOrGroups().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>", styles: ["::ng-deep .mat-tooltip{font-size:1em!important;white-space:pre-line}mat-dialog-content{min-width:50vw}#dialog-title{display:flex;justify-content:space-between}.mat-mdc-dialog-title:before{display:none!important}#num-selected{margin:1em 1em 0 0}mat-spinner{margin:0 auto}#spinner-message{text-align:center;padding:.5em}mat-form-field{width:100%}.title{font-style:italic;color:#757575}img,.no-photo{width:2rem;height:2rem;font-size:2.3rem!important;border-radius:100%}.hide-mobile{display:none}mat-dialog-actions{display:grid;grid-auto-flow:column;grid-gap:1em;justify-content:center}.user-name{display:flex;justify-content:space-between}.user-name>div:last-child{margin-right:10rem;font-weight:400;font-style:italic;color:#757575}@media(min-width:801px){.user{display:grid;grid-template-columns:1fr 1fr 1fr}.user>div:first-child{font-weight:700}.hide-mobile{display:initial}}\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"] }]
455
+ }], ctorParameters: () => [], propDecorators: { selectionList: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSelectionList), { isSignal: true }] }], filterInput: [{ type: i0.ViewChild, args: ['filterInput', { isSignal: true }] }] } });
461
456
 
462
457
  class UserFormFieldComponent {
463
458
  constructor() {
@@ -475,6 +470,8 @@ class UserFormFieldComponent {
475
470
  ...(ngDevMode ? [{ debugName: "clickable" }] : /* istanbul ignore next */ []));
476
471
  this.userChooserData = input.required(/* @ts-ignore */
477
472
  ...(ngDevMode ? [{ debugName: "userChooserData" }] : /* istanbul ignore next */ []));
473
+ this.accountNames = signal([], /* @ts-ignore */
474
+ ...(ngDevMode ? [{ debugName: "accountNames" }] : /* istanbul ignore next */ []));
478
475
  this.users = signal([], /* @ts-ignore */
479
476
  ...(ngDevMode ? [{ debugName: "users" }] : /* istanbul ignore next */ []));
480
477
  this.groups = signal([], /* @ts-ignore */
@@ -495,13 +492,13 @@ class UserFormFieldComponent {
495
492
  get class() {
496
493
  return this._userChooserData?.mode === UserChooserMode.Single
497
494
  ? ''
498
- : (this.accountNames?.length ?? 0) > 4
495
+ : (this.accountNames().length) > 4
499
496
  ? 'grid five'
500
- : (this.accountNames?.length ?? 0) > 3
497
+ : (this.accountNames().length) > 3
501
498
  ? 'grid four'
502
- : (this.accountNames?.length ?? 0) > 2
499
+ : (this.accountNames().length) > 2
503
500
  ? 'grid three'
504
- : (this.accountNames?.length ?? 0) > 1
501
+ : (this.accountNames().length) > 1
505
502
  ? 'grid two'
506
503
  : '';
507
504
  }
@@ -513,7 +510,7 @@ class UserFormFieldComponent {
513
510
  ...this.userChooserData(),
514
511
  };
515
512
  // If users have been pre-selected in the config, store those in accountNames, which drives the UI of this component
516
- this.accountNames = this._userChooserData.preSelections?.accountNames;
513
+ this.accountNames.set(this._userChooserData.preSelections?.accountNames ?? []);
517
514
  this.#getData();
518
515
  }
519
516
  //#endregion
@@ -536,22 +533,22 @@ class UserFormFieldComponent {
536
533
  if (!selected) {
537
534
  return;
538
535
  }
539
- this.accountNames = Array.isArray(selected)
536
+ this.accountNames.set(Array.isArray(selected)
540
537
  ? selected.map((s) => typeof s === 'string' ? s : s.sAMAccountName)
541
- : [selected].map((s) => typeof s === 'string' ? s : s.sAMAccountName);
538
+ : [selected].map((s) => typeof s === 'string' ? s : s.sAMAccountName));
542
539
  // Overwrite what may have been passed in, for subsequent launches of UserChooserComponent - otherwise it just keeps getting fed stale data
543
540
  if (this._userChooserData.preSelections) {
544
541
  this._userChooserData.preSelections.accountNames =
545
- this.accountNames;
542
+ this.accountNames();
546
543
  }
547
544
  this.usersSelected.emit(selected);
548
545
  });
549
546
  }
550
547
  unSelectUser(accountName) {
551
- const index = this.accountNames?.findIndex((a) => a === accountName);
552
- this.accountNames?.splice(index ?? -1, 1);
548
+ const index = this.accountNames().findIndex((a) => a === accountName);
549
+ this.accountNames().splice(index ?? -1, 1);
553
550
  if (this._userChooserData.preSelections) {
554
- this._userChooserData.preSelections.accountNames = this.accountNames;
551
+ this._userChooserData.preSelections.accountNames = this.accountNames();
555
552
  }
556
553
  this.userUnSelected.emit(accountName);
557
554
  }
@@ -635,7 +632,7 @@ class UserFormFieldComponent {
635
632
  useExisting: forwardRef(() => UserFormFieldComponent),
636
633
  multi: true,
637
634
  },
638
- ], 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 }); }
635
+ ], 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 }); }
639
636
  }
640
637
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: UserFormFieldComponent, decorators: [{
641
638
  type: Component,
@@ -653,7 +650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
653
650
  useExisting: forwardRef(() => UserFormFieldComponent),
654
651
  multi: true,
655
652
  },
656
- ], 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"] }]
653
+ ], 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"] }]
657
654
  }], 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 }] }] } });
658
655
 
659
656
  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 MatDialogModule,\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 MatDialogModule,\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 mat-dialog-title>\r\n <div id=\"dialog-title\">\r\n <h2>{{ _data.title }}</h2>\r\n \r\n <div id=\"num-selected\">\r\n {{ selectedOptions.length }} selected\r\n </div>\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":";;;;;;;;;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mB;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;;;;"}
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 { Component, ElementRef, inject, OnInit, viewChild, ChangeDetectionStrategy, afterRenderEffect, signal, WritableSignal, effect } from '@angular/core';\nimport { apply, debounce, form, PathKind, required, schema, SchemaPathTree, FormField } from '@angular/forms/signals';\n\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatListItemAvatar, MatListOption, MatSelectionList } from '@angular/material/list';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatFormFieldModule } 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';\n\nimport { forkJoin, Observable, of } from 'rxjs';\n\nimport { ActiveDirectoryService } from '@cleavelandprice/ngx-lib/active-directory';\nimport { PhotoItem, SharePointService, } from '@cleavelandprice/ngx-lib/sharepoint';\n\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 FormField,\n MatButton,\n MatDialogModule,\n MatFormFieldModule,\n MatIcon,\n MatIconButton,\n MatInput,\n MatListItemAvatar,\n MatListOption,\n MatProgressSpinner,\n MatSelectionList,\n MatSlideToggle,\n MatTooltip\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 selectionList = viewChild(MatSelectionList);\n filterInput = viewChild<ElementRef<HTMLInputElement>>('filterInput');\n \n filterFormModel = signal<IFilterFormModel>({filter: ''});\n #filterFormSchema = schema((schemaPath: SchemaPathTree<IFilterFormModel, PathKind.Root>) => {\n required(schemaPath.filter);\n debounce(schemaPath.filter, 500);\n });\n filterForm = form(this.filterFormModel, (path) => apply(path, this.#filterFormSchema));\n\n dataSource: WritableSignal<MatTableDataSource<SelectableUser | SelectableGroup> | undefined> = signal(undefined);\n photos = signal<PhotoItem[]>([]);\n groups = signal<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 selectedUsersOrGroups = signal<(SelectableUser | SelectableGroup)[]>([]);\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 constructor() {\n afterRenderEffect(() => {\n this.filterInput()?.nativeElement.focus();\n });\n\n effect(() => {\n if (this.dataSource()) {\n this.dataSource()!.filter = this.filterForm().value().filter.toLowerCase();\n }\n });\n }\n \n ngOnInit(): void {\n this.#getData();\n }\n //#endregion\n\n //#region Events\n closeIfSingleSelection(/* event: MatSelectionListChange */): void {\n if (this._data.mode === UserChooserMode.Single &&\n this.selectedUsersOrGroups().length &&\n this._data.closeWhenSelectionMade) {\n this.close();\n }\n }\n\n optionSelectionChanged(option: MatListOption): void {\n const userOrGroup = this.dataSource()?.data.find(\n (u) =>\n u.sAMAccountName.toLocaleLowerCase() ===\n (option.value as SelectableUser).sAMAccountName.toLowerCase(),\n );\n\n if (userOrGroup) {\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 userOrGroup.selected = option.selected;\n }\n\n this.selectedUsersOrGroups.set(this.dataSource()?.data.filter(u => u.selected) ?? []);\n }\n\n hideUnselectedChanged(selected: boolean): void {\n this.filterForm().value.set({filter: selected ? '{selected:true}' : ''});\n }\n\n selectAll(): void {\n this.selectionList()?.selectAll();\n\n /*if (this.selectionList()?.options) {\n this.closeIfSingleSelection();\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.set(this.adGroupsNeeded ? data[2] : []);\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.set(new MatTableDataSource(usersAndGroups));\n\n this.photos.set(data[1]);\n\n this.#setFilterPredicate();\n });\n }\n\n close(): void {\n if (!this.selectedUsersOrGroups().length) {\n this.#services.dialogRef.close(\n this._data.allowCloseWithoutSelections ? [] : undefined,\n );\n return;\n }\n const value = this.selectedUsersOrGroups().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 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\ninterface IFilterFormModel {\n filter: string;\n}\n","<div mat-dialog-title>\r\n <div id=\"dialog-title\">\r\n <h2>{{ _data.title }}</h2>\r\n \r\n <div id=\"num-selected\">\r\n {{ selectedUsersOrGroups().length }} selected\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<mat-dialog-content>\r\n @if (dataSource() && photos().length) {\r\n <form>\r\n @if (dataSource()) {\r\n <mat-form-field>\r\n <input matInput placeholder=\"Search\" [formField]=\"filterForm.filter\" #filterInput>\r\n @if (filterForm().value().filter) {\r\n <button type=\"button\" matSuffix mat-icon-button aria-label=\"Clear\" (click)=\"filterFormModel.set({filter: ''})\">\r\n <mat-icon fontIcon=\"close\"/>\r\n </button>\r\n }\r\n </mat-form-field>\r\n }\r\n </form>\r\n\r\n <mat-selection-list [multiple]=\"isMultiMode\" (selectionChange)=\"closeIfSingleSelection()\">\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().length) {\r\n @if (selectedUsersOrGroups().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 && selectedUsersOrGroups().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 && !selectedUsersOrGroups().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 = signal<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) > 4\n ? 'grid five'\n : (this.accountNames().length) > 3\n ? 'grid four'\n : (this.accountNames().length) > 2\n ? 'grid three'\n : (this.accountNames().length) > 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.set(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.set(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,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tB,oBAAoB;YACpB,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAGb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAvBjC,YAAY;YACZ,mBAAmB;YAEnB,eAAe;YACf,eAAe;YACf,kBAAkB;YAClB,aAAa;YACb,cAAc;YACd,aAAa;YACb,oBAAoB;YACpB,wBAAwB;YACxB,oBAAoB;YACpB,cAAc;YACd,gBAAgB;YAEhB,oBAAoB;YACpB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAOb,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBA1BpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,eAAe;wBACf,eAAe;wBACf,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,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;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "comment": "NGX-LIB primary entry point package.json",
3
3
  "name": "@cleavelandprice/ngx-lib",
4
- "version": "4.8.16",
4
+ "version": "4.8.17",
5
5
  "description": "Angular library providing foundational functionality to Cleaveland-Price applications",
6
6
  "peerDependencies": {
7
7
  "@angular/common": "^22.1.1",
@@ -2,16 +2,16 @@ import * as _cleavelandprice_ngx_lib_active_directory from '@cleavelandprice/ngx
2
2
  import { User, Group, UserOrGroup, ActiveDirectoryServiceOptions } from '@cleavelandprice/ngx-lib/active-directory';
3
3
  export * from '@cleavelandprice/ngx-lib/active-directory';
4
4
  import { PhotoItem } from '@cleavelandprice/ngx-lib/sharepoint';
5
+ import * as _angular_forms_signals from '@angular/forms/signals';
5
6
  import * as _angular_core from '@angular/core';
6
- import { OnInit, ElementRef, ModuleWithProviders } from '@angular/core';
7
+ import { OnInit, ElementRef, WritableSignal, ModuleWithProviders } from '@angular/core';
7
8
  import * as _cleavelandprice_ngx_lib_active_directory_material from '@cleavelandprice/ngx-lib/active-directory/material';
8
- import * as i2 from '@angular/forms';
9
- import { FormGroup, FormControl } from '@angular/forms';
10
9
  import * as i8 from '@angular/material/list';
11
10
  import { MatSelectionList, MatListOption } from '@angular/material/list';
12
11
  import * as i12 from '@angular/material/table';
13
12
  import { MatTableDataSource } from '@angular/material/table';
14
13
  import * as i1 from '@angular/common';
14
+ import * as i2 from '@angular/forms';
15
15
  import * as i3 from '@angular/material/button';
16
16
  import * as i4 from '@angular/material/dialog';
17
17
  import * as i5 from '@angular/material/form-field';
@@ -101,20 +101,18 @@ declare class UserChooserComponent implements OnInit {
101
101
  selectableGroupNames?: string[];
102
102
  };
103
103
  selectionList: _angular_core.Signal<MatSelectionList | undefined>;
104
- set filterInput(elRef: ElementRef<HTMLInputElement>);
105
- filterForm: FormGroup<{
106
- filter: FormControl<any>;
107
- }>;
108
- dataSource?: MatTableDataSource<SelectableUser | SelectableGroup>;
109
- photos?: PhotoItem[];
110
- groups?: SelectableGroup[];
104
+ filterInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
105
+ filterFormModel: WritableSignal<IFilterFormModel>;
106
+ filterForm: _angular_forms_signals.FieldTree<IFilterFormModel, string | number, "writable">;
107
+ dataSource: WritableSignal<MatTableDataSource<SelectableUser | SelectableGroup> | undefined>;
108
+ photos: WritableSignal<PhotoItem[]>;
109
+ groups: WritableSignal<SelectableGroup[]>;
111
110
  get isMultiMode(): boolean;
112
- get selectedOptions(): MatListOption[];
113
- get selectedUsers(): (SelectableUser | SelectableGroup)[];
114
- get filterValue(): string;
111
+ selectedUsersOrGroups: WritableSignal<(SelectableGroup | SelectableUser)[]>;
115
112
  get adGroupsNeeded(): boolean;
113
+ constructor();
116
114
  ngOnInit(): void;
117
- listSelectionChanged(options: MatListOption[]): void;
115
+ closeIfSingleSelection(): void;
118
116
  optionSelectionChanged(option: MatListOption): void;
119
117
  hideUnselectedChanged(selected: boolean): void;
120
118
  selectAll(): void;
@@ -127,6 +125,9 @@ declare class UserChooserComponent implements OnInit {
127
125
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserChooserComponent, never>;
128
126
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserChooserComponent, "ng-component", never, {}, {}, never, never, true, never>;
129
127
  }
128
+ interface IFilterFormModel {
129
+ filter: string;
130
+ }
130
131
 
131
132
  declare class UserFormFieldComponent implements OnInit {
132
133
  #private;
@@ -136,7 +137,7 @@ declare class UserFormFieldComponent implements OnInit {
136
137
  clickable: _angular_core.InputSignal<boolean>;
137
138
  userChooserData: _angular_core.InputSignal<UserChooserData>;
138
139
  _userChooserData: UserChooserData;
139
- accountNames?: string[];
140
+ accountNames: _angular_core.WritableSignal<string[]>;
140
141
  users: _angular_core.WritableSignal<User[]>;
141
142
  groups: _angular_core.WritableSignal<UserOrGroup[]>;
142
143
  photos: _angular_core.WritableSignal<PhotoItem[]>;