@eherve/angular-material-datatable 22.2.6 → 22.2.7

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.
@@ -959,7 +959,7 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
959
959
  options = [];
960
960
  groups = [];
961
961
  hasMore = false;
962
- searching = false;
962
+ searching = signal(false, ...ngDevMode ? [{ debugName: "searching" }] : /* istanbul ignore next */ []);
963
963
  input;
964
964
  auto;
965
965
  control;
@@ -1085,13 +1085,13 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
1085
1085
  this.options = [];
1086
1086
  this.groups = [];
1087
1087
  let skip = 0;
1088
- return this.nextPage$.pipe(startWith(skip), tap(() => this.searching = true), switchMap(() => defer(() => this.column.options(this.column.limit || 10, skip, search, this.getGlobalSearchValue())).pipe(catchError(() => {
1088
+ return this.nextPage$.pipe(startWith(skip), switchMap(() => defer(() => {
1089
+ this.searching.set(true);
1090
+ return this.column.options(this.column.limit || 10, skip, search, this.getGlobalSearchValue());
1091
+ }).pipe(catchError(() => {
1089
1092
  this.hasMore = false;
1090
1093
  return of(null);
1091
- }), finalize(() => {
1092
- this.searching = false;
1093
- this.changeDetectorRef.markForCheck();
1094
- }))), filter((data) => Array.isArray(data)), map((data) => {
1094
+ }), finalize(() => this.searching.set(false)))), filter((data) => Array.isArray(data)), map((data) => {
1095
1095
  data.forEach((option) => this.addOption(option));
1096
1096
  skip += this.column.limit || 10;
1097
1097
  this.hasMore = data.length === (this.column.limit || 10);
@@ -1133,7 +1133,7 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
1133
1133
  descendants: true
1134
1134
  }],
1135
1135
  ngImport: i0,
1136
- template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n matInput\n [formControl]=\"selectControl\"\n [matAutocomplete]=\"auto\"\n (input)=\"filter()\"\n (focus)=\"focus()\"\n (blur)=\"onTouched()\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n requireSelection\n [displayWith]=\"displayWith\"\n >\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option.value) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n\n <mat-option id=\"searching-option\" disabled>\n @if (searching) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-option>\n\n @if (hasMore && !searching) {\n <mat-option\n id=\"load-more-options\"\n disabled\n intersectionObserver\n (intersection)=\"loadMore($event.intersect)\"\n >\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (\n selectControl.value !== null &&\n selectControl.value !== undefined &&\n selectControl.value !== \"\"\n ) {\n <button\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n}\n\n<ng-template #autocompleteOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case (\"svg\") {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n ></mat-icon>\n }\n @default {\n <mat-icon\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n >\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label\n [style.color]=\"option.color\"\n [innerHTML]=\"option.name | safeHtml\"\n ></mat-label>\n </div>\n</ng-template>\n",
1136
+ template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n matInput\n [formControl]=\"selectControl\"\n [matAutocomplete]=\"auto\"\n (input)=\"filter()\"\n (focus)=\"focus()\"\n (blur)=\"onTouched()\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n requireSelection\n [displayWith]=\"displayWith\"\n >\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option.value) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n\n <mat-option id=\"searching-option\" disabled>\n @if (searching()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-option>\n\n @if (hasMore && !searching()) {\n <mat-option\n id=\"load-more-options\"\n disabled\n intersectionObserver\n (intersection)=\"loadMore($event.intersect)\"\n >\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (\n selectControl.value !== null &&\n selectControl.value !== undefined &&\n selectControl.value !== \"\"\n ) {\n <button\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n}\n\n<ng-template #autocompleteOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case (\"svg\") {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n ></mat-icon>\n }\n @default {\n <mat-icon\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n >\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label\n [style.color]=\"option.color\"\n [innerHTML]=\"option.name | safeHtml\"\n ></mat-label>\n </div>\n</ng-template>\n",
1137
1137
  styles: [":host{display:flex;flex:1 1 100%}mat-form-field{--mat-form-field-filled-focus-active-indicator-color: var(--datatable-accent);--mat-form-field-filled-focus-label-text-color: var(--datatable-accent);--mat-form-field-outlined-focus-outline-color: var(--datatable-accent);--mat-form-field-outlined-focus-label-text-color: var(--datatable-accent);--mat-form-field-focus-select-arrow-color: var(--datatable-accent);min-width:auto;flex:1 1 100%;margin:6px 0;--mat-form-field-filled-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mat-form-field-filled-container-shape: 0;--mat-form-field-filled-container-color: var(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#searching-option{min-height:2px;position:relative}#searching-option mat-progress-bar{position:absolute;inset:0}\n"],
1138
1138
  dependencies: [
1139
1139
  {
@@ -1392,7 +1392,7 @@ i0.ɵɵngDeclareClassMetadata({
1392
1392
  multi: true,
1393
1393
  useExisting: forwardRef(() => HeaderAutocompleteFilterComponent)
1394
1394
  }],
1395
- template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n matInput\n [formControl]=\"selectControl\"\n [matAutocomplete]=\"auto\"\n (input)=\"filter()\"\n (focus)=\"focus()\"\n (blur)=\"onTouched()\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n requireSelection\n [displayWith]=\"displayWith\"\n >\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option.value) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n\n <mat-option id=\"searching-option\" disabled>\n @if (searching) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-option>\n\n @if (hasMore && !searching) {\n <mat-option\n id=\"load-more-options\"\n disabled\n intersectionObserver\n (intersection)=\"loadMore($event.intersect)\"\n >\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (\n selectControl.value !== null &&\n selectControl.value !== undefined &&\n selectControl.value !== \"\"\n ) {\n <button\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n}\n\n<ng-template #autocompleteOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case (\"svg\") {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n ></mat-icon>\n }\n @default {\n <mat-icon\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n >\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label\n [style.color]=\"option.color\"\n [innerHTML]=\"option.name | safeHtml\"\n ></mat-label>\n </div>\n</ng-template>\n",
1395
+ template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field appearance=\"fill\">\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <input\n #input\n type=\"text\"\n [placeholder]=\"column.placeholder!\"\n matInput\n [formControl]=\"selectControl\"\n [matAutocomplete]=\"auto\"\n (input)=\"filter()\"\n (focus)=\"focus()\"\n (blur)=\"onTouched()\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n requireSelection\n [displayWith]=\"displayWith\"\n >\n @if (column.hasGroup) {\n @for (group of groups; track group) {\n <mat-optgroup>\n <mat-label [innerHTML]=\"group.name | safeHtml\"></mat-label>\n @for (option of group.options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option.value) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"autocompleteOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n\n <mat-option id=\"searching-option\" disabled>\n @if (searching()) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-option>\n\n @if (hasMore && !searching()) {\n <mat-option\n id=\"load-more-options\"\n disabled\n intersectionObserver\n (intersection)=\"loadMore($event.intersect)\"\n >\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (\n selectControl.value !== null &&\n selectControl.value !== undefined &&\n selectControl.value !== \"\"\n ) {\n <button\n mat-icon-button\n matSuffix\n size=\"small\"\n [attr.aria-label]=\"datatableIntl.clearFilterLabel\"\n (click)=\"selectControl.setValue(undefined)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n}\n\n<ng-template #autocompleteOption let-option=\"option\">\n <div class=\"option\">\n @if (option.icon) {\n @switch (option.iconSrc) {\n @case (\"svg\") {\n <mat-icon\n [svgIcon]=\"option.icon\"\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n ></mat-icon>\n }\n @default {\n <mat-icon\n [style.color]=\"option.iconColor ?? option.color\"\n [style.margin-right.px]=\"8\"\n >\n {{ option.icon }}\n </mat-icon>\n }\n }\n }\n <mat-label\n [style.color]=\"option.color\"\n [innerHTML]=\"option.name | safeHtml\"\n ></mat-label>\n </div>\n</ng-template>\n",
1396
1396
  styles: [":host{display:flex;flex:1 1 100%}mat-form-field{--mat-form-field-filled-focus-active-indicator-color: var(--datatable-accent);--mat-form-field-filled-focus-label-text-color: var(--datatable-accent);--mat-form-field-outlined-focus-outline-color: var(--datatable-accent);--mat-form-field-outlined-focus-label-text-color: var(--datatable-accent);--mat-form-field-focus-select-arrow-color: var(--datatable-accent);min-width:auto;flex:1 1 100%;margin:6px 0;--mat-form-field-filled-active-indicator-color: #999;--mat-form-field-hover-state-layer-opacity: 0;--mat-form-field-filled-container-shape: 0;--mat-form-field-filled-container-color: var(--datatable-background)}mat-form-field ::ng-deep .mat-mdc-form-field-bottom-align{display:none}mat-form-field ::ng-deep .mat-mdc-text-field-wrapper{padding:0}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}#searching-option{min-height:2px;position:relative}#searching-option mat-progress-bar{position:absolute;inset:0}\n"]
1397
1397
  }]
1398
1398
  }],