@trudb/tru-common-lib 0.1.956 → 0.1.959

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.
@@ -5908,6 +5908,9 @@ class TruDataGridHeader {
5908
5908
  this.params.api.addEventListener('cellFocused', this.onCellFocused.bind(this));
5909
5909
  this.onSortChanged();
5910
5910
  }
5911
+ getHeaderParams() {
5912
+ return this.params;
5913
+ }
5911
5914
  refresh(params) {
5912
5915
  return false;
5913
5916
  }
@@ -6043,7 +6046,7 @@ class TruDataGridHeaderFilter {
6043
6046
  icon: 'desc-sort-icon'
6044
6047
  },
6045
6048
  {
6046
- value: 'clear',
6049
+ value: null,
6047
6050
  label: 'Clear Sort',
6048
6051
  selected: false,
6049
6052
  display: this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(),
@@ -6079,16 +6082,15 @@ class TruDataGridHeaderFilter {
6079
6082
  onFilterInputChanged() {
6080
6083
  this.filterParams.filterChangedCallback();
6081
6084
  }
6082
- onSortSelection = (event) => {
6083
- let value = event.options[0].value === 'clear' ? null : event.options[0].value;
6084
- this.filterParams.colDef.headerComponentParams.setSort(value, false);
6085
+ onSortSelection = (changeEvent) => {
6086
+ this.filterParams.colDef.headerComponent.getHeaderParams().setSort(changeEvent.options[0].value, false);
6085
6087
  };
6086
6088
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeaderFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
6087
6089
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: TruDataGridHeaderFilter, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
6088
6090
  <div class="tru-data-grid-header-filter-container">
6089
6091
  <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
6090
6092
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
6091
- <mat-list-option>
6093
+ <mat-list-option [value]='typeOfSort' *ngIf="typeOfSort.display">
6092
6094
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
6093
6095
  <span matListItem>{{typeOfSort.label}}</span>
6094
6096
  </mat-list-option>
@@ -6108,7 +6110,7 @@ class TruDataGridHeaderFilter {
6108
6110
  (ngModelChange)="onFilterInputChanged()"
6109
6111
  type="text" />
6110
6112
  </mat-form-field>
6111
- </div>`, isInline: true, styles: [".tru-data-grid-header-filter-container{min-width:200px!important}.tru-data-grid-header-filter-container mdc-list{padding-bottom:10px!important}::ng-deep .tru-data-grid-header-filter-container mat-list-option{padding-left:10px!important}::ng-deep .tru-data-grid-header-filter-container mat-icon{height:18px!important;width:18px!important;padding-right:5px;padding-top:4px}::ng-deep .tru-data-grid-header-filter-container .mdc-list-item__primary-text span{font-size:12px!important;vertical-align:text-bottom}::ng-deep .tru-data-grid-header-filter-container .mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{display:none!important}::ng-deep .tru-data-grid-header-filter-container mat-divider{padding-top:5px;padding-bottom:5px;margin-left:10px;margin-right:10px}::ng-deep .tru-data-grid-header-filter-container mat-label{margin-left:10px;font-weight:700}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field{display:block!important;margin:0 10px 10px!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-infix{padding:0!important;min-height:unset!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__leading{border-color:#bd362f}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__notch{border-color:#bd362f}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__trailing{border-color:#bd362f}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-bottom-align:before{content:unset!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 0 5px!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 0 5px!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-infix{padding:0 0 5px!important;min-height:unset!important}::ng-deep .tru-data-grid-header-filter-search-icon svg{fill:#343434}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatFormField$1, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.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: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
6113
+ </div>`, isInline: true, styles: [".tru-data-grid-header-filter-container{min-width:200px!important}.tru-data-grid-header-filter-container mdc-list{padding-bottom:10px!important}::ng-deep .tru-data-grid-header-filter-container mat-list-option{padding-left:10px!important}::ng-deep .tru-data-grid-header-filter-container mat-icon{height:18px!important;width:18px!important;padding-right:5px;padding-top:4px}::ng-deep .tru-data-grid-header-filter-container .mdc-list-item__primary-text span{font-size:12px!important;vertical-align:text-bottom}::ng-deep .tru-data-grid-header-filter-container .mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{display:none!important}::ng-deep .tru-data-grid-header-filter-container mat-divider{padding-top:5px;padding-bottom:5px;margin-left:10px;margin-right:10px}::ng-deep .tru-data-grid-header-filter-container mat-label{margin-left:10px;font-weight:700}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field{display:block!important;margin:0 10px 10px!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-infix{padding:0!important;min-height:unset!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__leading{border-color:#bd362f}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__notch{border-color:#bd362f}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-flex.invalid .mdc-notched-outline__trailing{border-color:#bd362f}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-bottom-align:before{content:unset!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 0 5px!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 0 5px!important}::ng-deep .tru-data-grid-header-filter-container .mat-mdc-form-field-infix{padding:0 0 5px!important;min-height:unset!important}::ng-deep .tru-data-grid-header-filter-search-icon svg{fill:#343434}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatFormField$1, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.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: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
6112
6114
  }
6113
6115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeaderFilter, decorators: [{
6114
6116
  type: Component,
@@ -6132,7 +6134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
6132
6134
  <div class="tru-data-grid-header-filter-container">
6133
6135
  <mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
6134
6136
  @for (typeOfSort of typesOfSort; track typeOfSort.value) {
6135
- <mat-list-option>
6137
+ <mat-list-option [value]='typeOfSort' *ngIf="typeOfSort.display">
6136
6138
  <mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
6137
6139
  <span matListItem>{{typeOfSort.label}}</span>
6138
6140
  </mat-list-option>