@cauca-911/management 22.0.7 → 22.0.8

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,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Injector, inject, Injectable, computed, ChangeDetectionStrategy, Component, ViewChild, signal, viewChild, resource, effect, untracked, model, input, HostListener, forwardRef, ViewEncapsulation, output } from '@angular/core';
3
- import { pendingChangesGuard, DialogService, PageTitleComponent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, StrokedButtonComponent, RaisedButtonComponent, ListPaginatorComponent, IconButtonComponent, LoadingStateService, GroupContainerComponent, ConfirmationResult, SavingErrorBoxComponent, MenuItemComponent, ExpandablePanelComponent, FieldErrorsComponent, PasswordSelectionComponent, PhoneNumberInputComponent, ControlFieldErrorsComponent } from '@cauca-911/material';
3
+ import { pendingChangesGuard, DialogService, PageTitleComponent, LoadingSpinnerIndicatorComponent, LoadingErrorComponent, StrokedButtonComponent, RaisedButtonComponent, ListPaginatorComponent, IconButtonComponent, LoadingStateService, GroupContainerComponent, ConfirmationResult, SavingErrorBoxComponent, MenuItemComponent, ExpandablePanelComponent, FieldErrorsComponent, PasswordSelectionComponent, PhoneNumberInputComponent, ControlErrorStateDirective, ControlFieldErrorsComponent, DropdownChipAutocompleteComponent } from '@cauca-911/material';
4
4
  import * as i1 from '@angular/material/card';
5
5
  import { MatCardModule } from '@angular/material/card';
6
6
  import { TranslatePipe } from '@ngx-translate/core';
@@ -24,7 +24,7 @@ import * as i1$1 from '@angular/material/dialog';
24
24
  import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
25
25
  import * as i4 from '@angular/material/icon';
26
26
  import { MatIconModule, MatIcon } from '@angular/material/icon';
27
- import { toSignal, toObservable, rxResource } from '@angular/core/rxjs-interop';
27
+ import { toSignal, toObservable, rxResource, takeUntilDestroyed } from '@angular/core/rxjs-interop';
28
28
  import { v4 } from 'uuid';
29
29
  import * as i4$1 from '@angular/material/list';
30
30
  import { MatListModule } from '@angular/material/list';
@@ -39,10 +39,6 @@ import { MatColumnDef, MatHeaderCell, MatHeaderCellDef, MatCell, MatCellDef, Mat
39
39
  import { schema, required, maxLength, validateHttp, email, readonly, pattern, FormField } from '@angular/forms/signals';
40
40
  import * as i3$2 from '@angular/material/progress-spinner';
41
41
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
42
- import * as i2$2 from '@angular/material/select';
43
- import { MatSelectModule } from '@angular/material/select';
44
- import * as i3$3 from 'ngx-mat-select-search';
45
- import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
46
42
 
47
43
  const MANAGEMENT_URL_PREFIX = new InjectionToken('MANAGEMENT_URL_PREFIX');
48
44
  const MANAGEMENT_ROUTE_SEGMENT = new InjectionToken('MANAGEMENT_ROUTE_SEGMENT');
@@ -363,7 +359,7 @@ class UserSearchService {
363
359
  }], null, null); })();
364
360
 
365
361
  const _c0$5 = ["resultPaginator"];
366
- const _forTrack0$5 = ($index, $item) => $item.id;
362
+ const _forTrack0$4 = ($index, $item) => $item.id;
367
363
  function GroupUserSelectionDialogComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
368
364
  i0.ɵɵelementStart(0, "div", 8);
369
365
  i0.ɵɵtext(1);
@@ -415,7 +411,7 @@ function GroupUserSelectionDialogComponent_Conditional_17_Template(rf, ctx) { if
415
411
  const _r1 = i0.ɵɵgetCurrentView();
416
412
  i0.ɵɵelementStart(0, "mat-selection-list", 18);
417
413
  i0.ɵɵlistener("selectionChange", function GroupUserSelectionDialogComponent_Conditional_17_Template_mat_selection_list_selectionChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSelectionChange($event)); });
418
- i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$5);
414
+ i0.ɵɵrepeaterCreate(1, GroupUserSelectionDialogComponent_Conditional_17_For_2_Template, 4, 6, "mat-list-option", 19, _forTrack0$4);
419
415
  i0.ɵɵelementEnd();
420
416
  i0.ɵɵconditionalCreate(3, GroupUserSelectionDialogComponent_Conditional_17_Conditional_3_Template, 2, 2, "cauca-list-paginator", 20);
421
417
  } if (rf & 2) {
@@ -606,7 +602,7 @@ class GroupUserSelectionDialogComponent {
606
602
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GroupUserSelectionDialogComponent, { className: "GroupUserSelectionDialogComponent", filePath: "lib/components/group-user-selection-dialog/group-user-selection-dialog.component.ts", lineNumber: 46 }); })();
607
603
 
608
604
  const _c0$4 = ["paginator"];
609
- const _forTrack0$4 = ($index, $item) => $item.id;
605
+ const _forTrack0$3 = ($index, $item) => $item.id;
610
606
  function GroupUserEditionListComponent_For_10_Conditional_5_Template(rf, ctx) { if (rf & 1) {
611
607
  i0.ɵɵelementStart(0, "div", 11);
612
608
  i0.ɵɵtext(1);
@@ -756,7 +752,7 @@ class GroupUserEditionListComponent {
756
752
  i0.ɵɵtext(7, "search");
757
753
  i0.ɵɵelementEnd()();
758
754
  i0.ɵɵelementStart(8, "mat-list", 5);
759
- i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$4, false, GroupUserEditionListComponent_ForEmpty_11_Template, 2, 1);
755
+ i0.ɵɵrepeaterCreate(9, GroupUserEditionListComponent_For_10_Template, 8, 5, "mat-list-item", 6, _forTrack0$3, false, GroupUserEditionListComponent_ForEmpty_11_Template, 2, 1);
760
756
  i0.ɵɵelementEnd();
761
757
  i0.ɵɵconditionalCreate(12, GroupUserEditionListComponent_Conditional_12_Template, 2, 2, "cauca-list-paginator", 7);
762
758
  i0.ɵɵelementStart(13, "cauca-raised-button", 8);
@@ -829,7 +825,7 @@ class PermissionManagementService {
829
825
  }]
830
826
  }], null, null); })();
831
827
 
832
- const _forTrack0$3 = ($index, $item) => $item.id;
828
+ const _forTrack0$2 = ($index, $item) => $item.id;
833
829
  function GroupPermissionListComponent_For_9_Template(rf, ctx) { if (rf & 1) {
834
830
  const _r1 = i0.ɵɵgetCurrentView();
835
831
  i0.ɵɵelementStart(0, "mat-list-item", 4)(1, "mat-checkbox", 6);
@@ -914,7 +910,7 @@ class GroupPermissionListComponent {
914
910
  i0.ɵɵtext(6, "search");
915
911
  i0.ɵɵelementEnd()();
916
912
  i0.ɵɵelementStart(7, "mat-selection-list", 3);
917
- i0.ɵɵrepeaterCreate(8, GroupPermissionListComponent_For_9_Template, 3, 4, "mat-list-item", 4, _forTrack0$3, false, GroupPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 5);
913
+ i0.ɵɵrepeaterCreate(8, GroupPermissionListComponent_For_9_Template, 3, 4, "mat-list-item", 4, _forTrack0$2, false, GroupPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 5);
918
914
  i0.ɵɵelementEnd();
919
915
  } if (rf & 2) {
920
916
  i0.ɵɵadvance(2);
@@ -1196,7 +1192,7 @@ var UserPermissionOriginKind;
1196
1192
  UserPermissionOriginKind[UserPermissionOriginKind["UserOverride"] = 1] = "UserOverride";
1197
1193
  })(UserPermissionOriginKind || (UserPermissionOriginKind = {}));
1198
1194
 
1199
- const _forTrack0$2 = ($index, $item) => $item.idModulePermission;
1195
+ const _forTrack0$1 = ($index, $item) => $item.idModulePermission;
1200
1196
  function UserPermissionListComponent_For_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
1201
1197
  i0.ɵɵtext(0, " check ");
1202
1198
  } }
@@ -1306,7 +1302,7 @@ class UserPermissionListComponent {
1306
1302
  i0.ɵɵtext(6, "search");
1307
1303
  i0.ɵɵelementEnd()();
1308
1304
  i0.ɵɵelementStart(7, "mat-list", 4);
1309
- i0.ɵɵrepeaterCreate(8, UserPermissionListComponent_For_9_Template, 16, 11, "mat-list-item", 5, _forTrack0$2, false, UserPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 6);
1305
+ i0.ɵɵrepeaterCreate(8, UserPermissionListComponent_For_9_Template, 16, 11, "mat-list-item", 5, _forTrack0$1, false, UserPermissionListComponent_ForEmpty_10_Template, 6, 3, "div", 6);
1310
1306
  i0.ɵɵelementEnd();
1311
1307
  } if (rf & 2) {
1312
1308
  i0.ɵɵadvance(2);
@@ -1485,7 +1481,7 @@ class ScopeListGridColumnComponent extends BaseGridColumnComponent {
1485
1481
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ScopeListGridColumnComponent, { className: "ScopeListGridColumnComponent", filePath: "lib/components/scope-list-grid-column/scope-list-grid-column.component.ts", lineNumber: 28 }); })();
1486
1482
 
1487
1483
  const _c0$2 = () => ["userName"];
1488
- const _forTrack0$1 = ($index, $item) => $item.prop;
1484
+ const _forTrack0 = ($index, $item) => $item.prop;
1489
1485
  function UserListGridComponent_For_9_Case_0_Template(rf, ctx) { if (rf & 1) {
1490
1486
  i0.ɵɵelement(0, "cauca-scope-list-grid-column", 6);
1491
1487
  i0.ɵɵpipe(1, "translate");
@@ -1623,7 +1619,7 @@ class UserListGridComponent {
1623
1619
  i0.ɵɵpipe(5, "translate");
1624
1620
  i0.ɵɵelement(6, "cauca-sortable-data-grid-column", 4);
1625
1621
  i0.ɵɵpipe(7, "translate");
1626
- i0.ɵɵrepeaterCreate(8, UserListGridComponent_For_9_Template, 3, 1, null, null, _forTrack0$1);
1622
+ i0.ɵɵrepeaterCreate(8, UserListGridComponent_For_9_Template, 3, 1, null, null, _forTrack0);
1627
1623
  i0.ɵɵconditionalCreate(10, UserListGridComponent_Conditional_10_Template, 3, 3, "cauca-data-grid-menu-column", 5);
1628
1624
  i0.ɵɵelementEnd();
1629
1625
  } if (rf & 2) {
@@ -2000,17 +1996,6 @@ class UserPersonalInformationFieldsComponent {
2000
1996
  }], null, { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], isEmailReadOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEmailReadOnly", required: false }] }], emailHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "emailHint", required: false }] }] }); })();
2001
1997
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserPersonalInformationFieldsComponent, { className: "UserPersonalInformationFieldsComponent", filePath: "lib/components/user-personal-information-fields/user-personal-information-fields.component.ts", lineNumber: 24 }); })();
2002
1998
 
2003
- const _forTrack0 = ($index, $item) => $item.id;
2004
- function UserGroupsSelectorComponent_For_10_Template(rf, ctx) { if (rf & 1) {
2005
- i0.ɵɵelementStart(0, "mat-option", 3);
2006
- i0.ɵɵtext(1);
2007
- i0.ɵɵelementEnd();
2008
- } if (rf & 2) {
2009
- const option_r1 = ctx.$implicit;
2010
- i0.ɵɵproperty("value", option_r1.id);
2011
- i0.ɵɵadvance();
2012
- i0.ɵɵtextInterpolate(option_r1.name);
2013
- } }
2014
1999
  class UserGroupsSelectorComponent {
2015
2000
  constructor() {
2016
2001
  this.value = model([], /* @ts-ignore */
@@ -2034,78 +2019,87 @@ class UserGroupsSelectorComponent {
2034
2019
  this.errors = input([], /* @ts-ignore */
2035
2020
  ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
2036
2021
  this.touch = output();
2037
- this.filterControl = new FormControl('');
2022
+ // `DropdownChipAutocompleteComponent` is a `ControlValueAccessor` and stays one per ADR-0005,
2023
+ // so a reactive control is the only channel through which its selection can be read back.
2024
+ this.selectedGroupIds = new FormControl([], { nonNullable: true });
2038
2025
  this.options = computed(() => this.groups.value(), /* @ts-ignore */
2039
2026
  ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
2040
- this.filteredOptions = computed(() => {
2041
- const filter = toLowerCaseAndWithoutDiacritics(this.filterText() ?? '');
2042
- if (!filter) {
2043
- return this.options();
2044
- }
2045
- // MatSelect clears its selection model for any value whose option is not
2046
- // rendered, so a selection hidden by the filter is lost on the next pick.
2047
- const selected = new Set(this.value());
2048
- return this.options().filter((option) => selected.has(option.id) || toLowerCaseAndWithoutDiacritics(option.name).includes(filter));
2049
- }, /* @ts-ignore */
2050
- ...(ngDevMode ? [{ debugName: "filteredOptions" }] : /* istanbul ignore next */ []));
2051
- this.isSelectDisabled = computed(() => this.disabled() || this.readonly() || this.options().length === 0, /* @ts-ignore */
2052
- ...(ngDevMode ? [{ debugName: "isSelectDisabled" }] : /* istanbul ignore next */ []));
2027
+ this.isControlDisabled = computed(() => this.disabled() || this.readonly() || this.options().length === 0, /* @ts-ignore */
2028
+ ...(ngDevMode ? [{ debugName: "isControlDisabled" }] : /* istanbul ignore next */ []));
2053
2029
  this.assignableGroupsService = inject(AssignableGroupsService);
2054
- this.filterText = toSignal(this.filterControl.valueChanges, { initialValue: '' });
2055
2030
  this.groups = rxResource({
2056
2031
  stream: () => this.assignableGroupsService.getAssignableGroups(),
2057
2032
  defaultValue: [],
2058
2033
  });
2034
+ this.selectedGroupIds.valueChanges
2035
+ .pipe(takeUntilDestroyed())
2036
+ .subscribe((groupIds) => this.onSelectionChange(groupIds));
2037
+ effect(() => {
2038
+ const groupIds = this.value();
2039
+ if (!haveSameIds(groupIds, this.selectedGroupIds.value)) {
2040
+ this.selectedGroupIds.setValue(groupIds, { emitEvent: false });
2041
+ }
2042
+ });
2043
+ // Toggled through the control rather than a `[disabled]` binding, which logs a dev-mode
2044
+ // warning on a reactive-forms host.
2045
+ effect(() => {
2046
+ if (this.isControlDisabled()) {
2047
+ this.selectedGroupIds.disable({ emitEvent: false });
2048
+ }
2049
+ else {
2050
+ this.selectedGroupIds.enable({ emitEvent: false });
2051
+ }
2052
+ });
2059
2053
  }
2060
2054
  onSelectionChange(groupIds) {
2055
+ // `writeValue` on the chip autocomplete re-invokes its own change callback, so a value
2056
+ // pushed in by the bound field echoes back here; without this guard it would report a
2057
+ // programmatic write as a user touch.
2058
+ if (haveSameIds(groupIds, this.value())) {
2059
+ return;
2060
+ }
2061
2061
  this.value.set(groupIds);
2062
2062
  this.touch.emit();
2063
2063
  }
2064
2064
  static { this.ɵfac = function UserGroupsSelectorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserGroupsSelectorComponent)(); }; }
2065
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserGroupsSelectorComponent, selectors: [["cauca-user-groups-selector"]], inputs: { value: [1, "value"], label: [1, "label"], disabled: [1, "disabled"], readonly: [1, "readonly"], required: [1, "required"], invalid: [1, "invalid"], touched: [1, "touched"], name: [1, "name"], errors: [1, "errors"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 12, vars: 17, consts: [["subscriptSizing", "dynamic", 1, "user-groups-selector-field"], ["multiple", "", 3, "valueChange", "value", "disabled", "required"], [3, "formControl", "placeholderLabel", "noEntriesFoundLabel"], [3, "value"], [3, "touched", "errors"]], template: function UserGroupsSelectorComponent_Template(rf, ctx) { if (rf & 1) {
2065
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserGroupsSelectorComponent, selectors: [["cauca-user-groups-selector"]], inputs: { value: [1, "value"], label: [1, "label"], disabled: [1, "disabled"], readonly: [1, "readonly"], required: [1, "required"], invalid: [1, "invalid"], touched: [1, "touched"], name: [1, "name"], errors: [1, "errors"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 6, vars: 14, consts: [["subscriptSizing", "dynamic", 1, "user-groups-selector-field"], ["caucaControlErrorState", "", "keyValue", "id", "displayValue", "name", 3, "touched", "errors", "formControl", "listAutoComplete", "allowRemove", "canRemoveAll", "required"], [3, "touched", "errors"]], template: function UserGroupsSelectorComponent_Template(rf, ctx) { if (rf & 1) {
2066
2066
  i0.ɵɵelementStart(0, "mat-form-field", 0)(1, "mat-label");
2067
2067
  i0.ɵɵtext(2);
2068
2068
  i0.ɵɵpipe(3, "translate");
2069
2069
  i0.ɵɵelementEnd();
2070
- i0.ɵɵelementStart(4, "mat-select", 1);
2071
- i0.ɵɵlistener("valueChange", function UserGroupsSelectorComponent_Template_mat_select_valueChange_4_listener($event) { return ctx.onSelectionChange($event); });
2072
- i0.ɵɵelementStart(5, "mat-option");
2073
- i0.ɵɵelement(6, "ngx-mat-select-search", 2);
2074
- i0.ɵɵpipe(7, "translate");
2075
- i0.ɵɵpipe(8, "translate");
2070
+ i0.ɵɵelement(4, "cauca-dropdown-chip-autocomplete", 1);
2076
2071
  i0.ɵɵcontrolCreate();
2077
2072
  i0.ɵɵelementEnd();
2078
- i0.ɵɵrepeaterCreate(9, UserGroupsSelectorComponent_For_10_Template, 2, 2, "mat-option", 3, _forTrack0);
2079
- i0.ɵɵelementEnd()();
2080
- i0.ɵɵelement(11, "cauca-control-field-errors", 4);
2073
+ i0.ɵɵelement(5, "cauca-control-field-errors", 2);
2081
2074
  } if (rf & 2) {
2082
2075
  i0.ɵɵadvance(2);
2083
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 11, ctx.label()));
2076
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 12, ctx.label()));
2084
2077
  i0.ɵɵadvance(2);
2085
- i0.ɵɵproperty("value", ctx.value())("disabled", ctx.isSelectDisabled())("required", ctx.required());
2078
+ i0.ɵɵproperty("touched", ctx.touched())("errors", ctx.errors())("formControl", ctx.selectedGroupIds)("listAutoComplete", ctx.options())("allowRemove", !ctx.isControlDisabled())("canRemoveAll", !ctx.isControlDisabled())("required", ctx.required());
2086
2079
  i0.ɵɵattribute("aria-invalid", ctx.invalid())("name", ctx.name() || null);
2087
- i0.ɵɵadvance(2);
2088
- i0.ɵɵproperty("formControl", ctx.filterControl)("placeholderLabel", i0.ɵɵpipeBind1(7, 13, "search"))("noEntriesFoundLabel", i0.ɵɵpipeBind1(8, 15, "noResult"));
2089
2080
  i0.ɵɵcontrol();
2090
- i0.ɵɵadvance(3);
2091
- i0.ɵɵrepeater(ctx.filteredOptions());
2092
- i0.ɵɵadvance(2);
2081
+ i0.ɵɵadvance();
2093
2082
  i0.ɵɵproperty("touched", ctx.touched())("errors", ctx.errors());
2094
- } }, dependencies: [ControlFieldErrorsComponent,
2095
- MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, MatSelectModule, i2$2.MatSelect, i2$2.MatOption, NgxMatSelectSearchModule, i3$3.MatSelectSearchComponent, ReactiveFormsModule, i5.NgControlStatus, i5.FormControlDirective, TranslatePipe], styles: ["[_nghost-%COMP%]{display:block}.user-groups-selector-field[_ngcontent-%COMP%]{width:100%}"] }); }
2083
+ } }, dependencies: [ControlErrorStateDirective,
2084
+ ControlFieldErrorsComponent,
2085
+ DropdownChipAutocompleteComponent,
2086
+ MatFormFieldModule, i1$2.MatFormField, i1$2.MatLabel, ReactiveFormsModule, i5.NgControlStatus, i5.RequiredValidator, i5.FormControlDirective, TranslatePipe], styles: ["[_nghost-%COMP%]{display:block}.user-groups-selector-field[_ngcontent-%COMP%]{width:100%}"] }); }
2096
2087
  }
2097
2088
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserGroupsSelectorComponent, [{
2098
2089
  type: Component,
2099
2090
  args: [{ selector: 'cauca-user-groups-selector', imports: [
2091
+ ControlErrorStateDirective,
2100
2092
  ControlFieldErrorsComponent,
2093
+ DropdownChipAutocompleteComponent,
2101
2094
  MatFormFieldModule,
2102
- MatSelectModule,
2103
- NgxMatSelectSearchModule,
2104
2095
  ReactiveFormsModule,
2105
2096
  TranslatePipe,
2106
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field class=\"user-groups-selector-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ label() | translate }}</mat-label>\n <mat-select multiple [value]=\"value()\" [disabled]=\"isSelectDisabled()\"\n [required]=\"required()\"\n [attr.aria-invalid]=\"invalid()\"\n [attr.name]=\"name() || null\"\n (valueChange)=\"onSelectionChange($event)\">\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"filterControl\"\n [placeholderLabel]=\"'search' | translate\"\n [noEntriesFoundLabel]=\"'noResult' | translate\"/>\n </mat-option>\n\n @for (option of filteredOptions(); track option.id) {\n <mat-option [value]=\"option.id\">{{ option.name }}</mat-option>\n }\n </mat-select>\n</mat-form-field>\n\n<cauca-control-field-errors [touched]=\"touched()\" [errors]=\"errors()\"/>\n", styles: [":host{display:block}.user-groups-selector-field{width:100%}\n"] }]
2107
- }], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
2108
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserGroupsSelectorComponent, { className: "UserGroupsSelectorComponent", filePath: "lib/components/user-groups-selector/user-groups-selector.component.ts", lineNumber: 28 }); })();
2097
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field class=\"user-groups-selector-field\" subscriptSizing=\"dynamic\">\n <mat-label>{{ label() | translate }}</mat-label>\n\n <cauca-dropdown-chip-autocomplete\n caucaControlErrorState [touched]=\"touched()\" [errors]=\"errors()\"\n [formControl]=\"selectedGroupIds\"\n [listAutoComplete]=\"options()\"\n keyValue=\"id\"\n displayValue=\"name\"\n [allowRemove]=\"!isControlDisabled()\"\n [canRemoveAll]=\"!isControlDisabled()\"\n [required]=\"required()\"\n [attr.aria-invalid]=\"invalid()\"\n [attr.name]=\"name() || null\"/>\n</mat-form-field>\n\n<cauca-control-field-errors [touched]=\"touched()\" [errors]=\"errors()\"/>\n", styles: [":host{display:block}.user-groups-selector-field{width:100%}\n"] }]
2098
+ }], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
2099
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserGroupsSelectorComponent, { className: "UserGroupsSelectorComponent", filePath: "lib/components/user-groups-selector/user-groups-selector.component.ts", lineNumber: 29 }); })();
2100
+ function haveSameIds(left, right) {
2101
+ return left.length === right.length && left.every((id, index) => id === right[index]);
2102
+ }
2109
2103
 
2110
2104
  /*
2111
2105
  * Public API Surface of cauca-management