@eherve/angular-material-datatable 22.2.1 → 22.2.3

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.
package/README.md CHANGED
@@ -66,3 +66,49 @@ Set inherited CSS custom properties on the datatable or an application ancestor.
66
66
  | `--ngx-mat-extended-on-accent` | Material on-primary | Selected header checkbox checkmark color. |
67
67
 
68
68
  The counter sizes to its content and shares the toolbar button height; long counts remain fully visible. Header checkbox overrides include selected, focused, hovered, pressed and indeterminate states; disabled colors retain the Material theme defaults. Existing `--ngx-mat-datatable-*` color and sticky positioning properties remain supported.
69
+
70
+ ## Restored autocomplete filters
71
+
72
+ Searchable autocomplete columns can supply `resolveOption(value: unknown): Promise<DatatableSearchListOption | null>`
73
+ to recover the display option for a restored filter containing only its stored value. The application owns the lookup
74
+ (API, cache or in-memory list); the table does not assume an endpoint. Return an option whose `value` matches the
75
+ requested value, including its label and optional color/group, or `null` when unavailable.
76
+
77
+ ```ts
78
+ resolveOption: async (value) => {
79
+ if (typeof value !== 'string') return null;
80
+ const item = await service.get(value);
81
+ return item ? { value: item._id, name: item.name } : null;
82
+ },
83
+ ```
84
+
85
+ Resolution runs after initialization or a programmatic value update, when the selected option is unknown. It does not
86
+ run for each search keystroke or for empty values. Known option labels are retained across suggestion searches. Late
87
+ responses after editing, clearing, replacing the filter or destroying the control are ignored. Lookup failures leave
88
+ the stored filter unchanged; successful resolution refreshes the input without emitting a filter change.
89
+ For columns with a resolver, an unresolved value is never displayed as raw text: the input stays blank until its label
90
+ is known, including when lookup fails or returns no option. Columns without a resolver keep their existing display.
91
+
92
+ ## Select filter layout
93
+
94
+ Selected filter values stay on one line with compact icons and ellipsis for long labels.
95
+ This also applies to multiple selections; the open menu keeps all option labels available.
96
+
97
+ Searchable `select` columns accept `panelWidth`, forwarded to Angular Material's public
98
+ `MatSelect.panelWidth` input:
99
+
100
+ - omitted or `'auto'`: match the form field width;
101
+ - `null` or `''`: size the menu to its option content, within the viewport;
102
+ - a number (pixels) or CSS width string: use an explicit menu width.
103
+
104
+ ```ts
105
+ {
106
+ type: 'select',
107
+ columnDef: 'actionType',
108
+ property: 'actionType',
109
+ header: 'Type d’action',
110
+ searchable: true,
111
+ options: actionTypeOptions,
112
+ panelWidth: null,
113
+ }
114
+ ```
@@ -972,15 +972,17 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
972
972
  injector = inject(Injector);
973
973
  changeDetectorRef = inject(ChangeDetectorRef);
974
974
  subsink = new Subscription();
975
+ viewInitialized = false;
976
+ resolutionVersion = 0;
977
+ selectedOption;
975
978
  writeValue(value) {
976
979
  if (value?.value !== this.selectControl.value) {
977
- if (value?.name) {
978
- if (!this.options.find((o) => o.value === value.value)) this.options.push({
979
- value: value.value,
980
- name: value.name
981
- });
982
- }
980
+ this.selectedOption = this.options.find((option) => option.value === value?.value) ?? (value?.name ? {
981
+ value: value.value,
982
+ name: value.name
983
+ } : void 0);
983
984
  this.selectControl.setValue(value?.value, { emitEvent: false });
985
+ if (this.viewInitialized) this.resolveSelectedOption();
984
986
  }
985
987
  this.changeDetectorRef.markForCheck();
986
988
  }
@@ -999,6 +1001,8 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
999
1001
  if (!ngControl) throw new Error(`${this.constructor.name} missing control [column:${this.column.columnDef}]`);
1000
1002
  this.control = ngControl.control;
1001
1003
  this.subsink.add(this.selectControl.valueChanges.subscribe((value) => {
1004
+ this.resolutionVersion++;
1005
+ this.selectedOption = this.options.find((option) => option.value === value) ?? this.selectedOption;
1002
1006
  if (value === void 0) {
1003
1007
  if (this.control.value !== void 0) this.onChange(void 0);
1004
1008
  } else if (value === null && !this.options.find((o) => o.value === null)) {
@@ -1009,9 +1013,13 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
1009
1013
  });
1010
1014
  }));
1011
1015
  this.buildOptions();
1016
+ this.viewInitialized = true;
1017
+ this.resolveSelectedOption();
1012
1018
  this.changeDetectorRef.detectChanges();
1013
1019
  }
1014
1020
  ngOnDestroy() {
1021
+ this.viewInitialized = false;
1022
+ this.resolutionVersion++;
1015
1023
  this.subsink.unsubscribe();
1016
1024
  }
1017
1025
  loadMore(intersect) {
@@ -1025,15 +1033,45 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
1025
1033
  }
1026
1034
  }
1027
1035
  filter() {
1036
+ this.resolutionVersion++;
1028
1037
  const search = this.input.nativeElement.value;
1029
1038
  this.filter$.next(search);
1030
1039
  }
1031
1040
  displayWith = (value) => {
1032
- let val;
1033
- if (!this.options) val = value;
1034
- else val = this.options.find((o) => o.value === value)?.name ?? value;
1035
- return stripHtml(val);
1041
+ return stripHtml((this.options.find((option) => option.value === value) ?? (this.selectedOption?.value === value ? this.selectedOption : void 0))?.name ?? (this.column?.resolveOption ? "" : value));
1036
1042
  };
1043
+ async resolveSelectedOption() {
1044
+ const version = ++this.resolutionVersion;
1045
+ const value = this.selectControl.value;
1046
+ if (this.isEmptyValue(value)) return;
1047
+ const known = this.options.find((option) => option.value === value) ?? (this.selectedOption?.value === value ? this.selectedOption : void 0);
1048
+ if (known) {
1049
+ this.applyResolvedOption(known);
1050
+ return;
1051
+ }
1052
+ if (!this.column.resolveOption) return;
1053
+ try {
1054
+ const option = await this.column.resolveOption(value);
1055
+ if (!this.viewInitialized || version !== this.resolutionVersion || this.selectControl.value !== value || !option || option.value !== value) return;
1056
+ this.applyResolvedOption(option);
1057
+ } catch {}
1058
+ }
1059
+ applyResolvedOption(option) {
1060
+ this.selectedOption = option;
1061
+ this.addOption(option);
1062
+ this.selectControl.setValue(option.value, { emitEvent: false });
1063
+ this.changeDetectorRef.markForCheck();
1064
+ }
1065
+ addOption(option) {
1066
+ if (!this.options.some((existing) => existing.value === option.value)) this.options.push(option);
1067
+ const name = option.group ?? "";
1068
+ const group = this.groups.find((group) => group.name === name);
1069
+ if (!group) this.groups.push({
1070
+ name,
1071
+ options: [option]
1072
+ });
1073
+ else if (!group.options.some((existing) => existing.value === option.value)) group.options.push(option);
1074
+ }
1037
1075
  getGlobalSearchValue() {
1038
1076
  if (!this.control.parent) return null;
1039
1077
  let parent = this.control.parent;
@@ -1054,16 +1092,7 @@ var HeaderAutocompleteFilterComponent = class HeaderAutocompleteFilterComponent
1054
1092
  this.searching = false;
1055
1093
  this.changeDetectorRef.markForCheck();
1056
1094
  }))), filter((data) => Array.isArray(data)), map((data) => {
1057
- data.forEach((d) => {
1058
- this.options.push(d);
1059
- const name = d.group ?? "";
1060
- const group = this.groups.find((g) => g.name === name);
1061
- if (!group) this.groups.push({
1062
- name,
1063
- options: [d]
1064
- });
1065
- else group.options.push(d);
1066
- });
1095
+ data.forEach((option) => this.addOption(option));
1067
1096
  skip += this.column.limit || 10;
1068
1097
  this.hasMore = data.length === (this.column.limit || 10);
1069
1098
  }));
@@ -2965,8 +2994,8 @@ var HeaderSelectFilterComponent = class HeaderSelectFilterComponent {
2965
2994
  useExisting: forwardRef(() => HeaderSelectFilterComponent)
2966
2995
  }],
2967
2996
  ngImport: i0,
2968
- template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.label-resting]=\"!filterSelect.shouldLabelFloat\"\n >\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n #filterSelect=\"matSelect\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n (closed)=\"onTouched()\"\n >\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\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=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n </mat-select>\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 #selectOption 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",
2969
- 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);--mat-select-arrow-transform: none}mat-form-field.label-resting{--mat-select-arrow-transform: translateY(-.5lh)}mat-form-field{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}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"],
2997
+ template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.label-resting]=\"!filterSelect.shouldLabelFloat\"\n >\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n #filterSelect=\"matSelect\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n [panelWidth]=\"column.panelWidth === undefined ? 'auto' : column.panelWidth\"\n (closed)=\"onTouched()\"\n >\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\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=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n </mat-select>\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 #selectOption 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",
2998
+ 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);--mat-select-arrow-transform: none}mat-form-field.label-resting{--mat-select-arrow-transform: translateY(-.5lh)}mat-form-field{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}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}mat-select{display:flex}mat-select mat-select-trigger{display:block;padding:0;overflow:hidden}mat-select mat-select-trigger .options{flex-wrap:nowrap;overflow:hidden}mat-select mat-select-trigger .option{min-width:0;flex:0 1 auto;overflow:hidden}mat-select mat-select-trigger mat-icon{width:18px;height:18px;min-width:18px;min-height:18px;line-height:18px;font-size:18px;flex:0 0 18px}mat-select mat-select-trigger mat-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"],
2970
2999
  dependencies: [
2971
3000
  {
2972
3001
  kind: "ngmodule",
@@ -3172,8 +3201,8 @@ i0.ɵɵngDeclareClassMetadata({
3172
3201
  multi: true,
3173
3202
  useExisting: forwardRef(() => HeaderSelectFilterComponent)
3174
3203
  }],
3175
- template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.label-resting]=\"!filterSelect.shouldLabelFloat\"\n >\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n #filterSelect=\"matSelect\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n (closed)=\"onTouched()\"\n >\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\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=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n </mat-select>\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 #selectOption 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",
3176
- 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);--mat-select-arrow-transform: none}mat-form-field.label-resting{--mat-select-arrow-transform: translateY(-.5lh)}mat-form-field{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}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}\n"]
3204
+ template: "<!-- @format -->\n\n@if (selectControl) {\n <mat-form-field\n appearance=\"fill\"\n [class.label-resting]=\"!filterSelect.shouldLabelFloat\"\n >\n <mat-label [innerHTML]=\"column.header | safeHtml\"></mat-label>\n <mat-select\n #filterSelect=\"matSelect\"\n [formControl]=\"selectControl\"\n [placeholder]=\"column.placeholder!\"\n [multiple]=\"column.multiple\"\n [panelWidth]=\"column.panelWidth === undefined ? 'auto' : column.panelWidth\"\n (closed)=\"onTouched()\"\n >\n <mat-select-trigger>\n @if (column.multiple && selectControl.value | isArray) {\n <div class=\"options\">\n @for (v of selectControl.value; track v) {\n @let option = v | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"v | safeHtml\"></mat-label>\n }\n }\n </div>\n } @else {\n @let option = selectControl.value | selectOption: options;\n @if (option) {\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n } @else {\n <mat-label [innerHTML]=\"selectControl.value | safeHtml\"></mat-label>\n }\n }\n </mat-select-trigger>\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=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n </mat-optgroup>\n }\n } @else {\n @for (option of options; track option) {\n <mat-option [value]=\"option.value\">\n <ng-container\n *ngTemplateOutlet=\"selectOption; context: { option }\"\n ></ng-container>\n </mat-option>\n }\n }\n </mat-select>\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 #selectOption 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",
3205
+ 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);--mat-select-arrow-transform: none}mat-form-field.label-resting{--mat-select-arrow-transform: translateY(-.5lh)}mat-form-field{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}.options{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row;flex-wrap:wrap}.options .option:not(:last-child){margin-right:8px}.option{display:flex;box-sizing:border-box;place-content:center start;align-items:center;flex-direction:row}mat-select{display:flex}mat-select mat-select-trigger{display:block;padding:0;overflow:hidden}mat-select mat-select-trigger .options{flex-wrap:nowrap;overflow:hidden}mat-select mat-select-trigger .option{min-width:0;flex:0 1 auto;overflow:hidden}mat-select mat-select-trigger mat-icon{width:18px;height:18px;min-width:18px;min-height:18px;line-height:18px;font-size:18px;flex:0 0 18px}mat-select mat-select-trigger mat-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"]
3177
3206
  }]
3178
3207
  }],
3179
3208
  propDecorators: { column: [{ type: Input }] }