@trudb/tru-common-lib 0.2.488 → 0.2.492
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.
|
@@ -7664,29 +7664,6 @@ class TruDataGridHeaderFilter {
|
|
|
7664
7664
|
constructor() { }
|
|
7665
7665
|
agInit(params) {
|
|
7666
7666
|
this.filterParams = params;
|
|
7667
|
-
this.typesOfSort = [
|
|
7668
|
-
{
|
|
7669
|
-
value: 'asc',
|
|
7670
|
-
label: 'Sort A to Z',
|
|
7671
|
-
selected: false,
|
|
7672
|
-
display: () => { return !this.filterParams.column.isSortAscending(); },
|
|
7673
|
-
icon: 'asc-sort-menu-icon'
|
|
7674
|
-
},
|
|
7675
|
-
{
|
|
7676
|
-
value: 'desc',
|
|
7677
|
-
label: 'Sort Z to A',
|
|
7678
|
-
selected: false,
|
|
7679
|
-
display: () => { return !this.filterParams.column.isSortDescending(); },
|
|
7680
|
-
icon: 'desc-sort-menu-icon'
|
|
7681
|
-
},
|
|
7682
|
-
{
|
|
7683
|
-
value: null,
|
|
7684
|
-
label: 'Clear Sort',
|
|
7685
|
-
selected: false,
|
|
7686
|
-
display: () => { return this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(); },
|
|
7687
|
-
icon: 'no-sort-icon'
|
|
7688
|
-
}
|
|
7689
|
-
];
|
|
7690
7667
|
}
|
|
7691
7668
|
isFilterActive() {
|
|
7692
7669
|
return this.filterText != null && this.filterText !== '';
|
|
@@ -7713,20 +7690,47 @@ class TruDataGridHeaderFilter {
|
|
|
7713
7690
|
}
|
|
7714
7691
|
afterGuiAttached(params) {
|
|
7715
7692
|
this.guiFilterParams = params;
|
|
7693
|
+
this.typesOfSort = [
|
|
7694
|
+
{
|
|
7695
|
+
value: 'asc',
|
|
7696
|
+
label: 'Sort A to Z',
|
|
7697
|
+
selected: false,
|
|
7698
|
+
display: () => { return !this.filterParams.column.isSortAscending(); },
|
|
7699
|
+
icon: 'asc-sort-menu-icon'
|
|
7700
|
+
},
|
|
7701
|
+
{
|
|
7702
|
+
value: 'desc',
|
|
7703
|
+
label: 'Sort Z to A',
|
|
7704
|
+
selected: false,
|
|
7705
|
+
display: () => { return !this.filterParams.column.isSortDescending(); },
|
|
7706
|
+
icon: 'desc-sort-menu-icon'
|
|
7707
|
+
},
|
|
7708
|
+
{
|
|
7709
|
+
value: null,
|
|
7710
|
+
label: 'Clear Sort',
|
|
7711
|
+
selected: false,
|
|
7712
|
+
display: () => { return this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(); },
|
|
7713
|
+
icon: 'no-sort-icon'
|
|
7714
|
+
}
|
|
7715
|
+
];
|
|
7716
7716
|
}
|
|
7717
7717
|
onFilterInputChanged() {
|
|
7718
7718
|
this.filterParams.filterChangedCallback();
|
|
7719
7719
|
}
|
|
7720
|
-
|
|
7721
|
-
this.filterParams.colDef.headerComponentParams.setSort(
|
|
7720
|
+
onSortMenuItemClicked = (event, typeOfSort) => {
|
|
7721
|
+
this.filterParams.colDef.headerComponentParams.setSort(typeOfSort.value, event.shiftKey);
|
|
7722
7722
|
this.guiFilterParams.hidePopup();
|
|
7723
7723
|
};
|
|
7724
7724
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruDataGridHeaderFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7725
7725
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TruDataGridHeaderFilter, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
7726
7726
|
<div class="tru-data-grid-header-filter-container">
|
|
7727
|
-
<mat-selection-list #sort [multiple]="false"
|
|
7727
|
+
<mat-selection-list #sort [multiple]="false">
|
|
7728
7728
|
@for (typeOfSort of typesOfSort; track typeOfSort.value) {
|
|
7729
|
-
<mat-list-option
|
|
7729
|
+
<mat-list-option
|
|
7730
|
+
[selected]="typeOfSort.selected"
|
|
7731
|
+
[value]='typeOfSort'
|
|
7732
|
+
(click)="onSortMenuItemClicked($event, typeOfSort)"
|
|
7733
|
+
*ngIf="typeOfSort.display()">
|
|
7730
7734
|
<mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
|
|
7731
7735
|
<span matListItem>{{typeOfSort.label}}</span>
|
|
7732
7736
|
</mat-list-option>
|
|
@@ -7768,9 +7772,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
7768
7772
|
ReactiveFormsModule
|
|
7769
7773
|
], template: `
|
|
7770
7774
|
<div class="tru-data-grid-header-filter-container">
|
|
7771
|
-
<mat-selection-list #sort [multiple]="false"
|
|
7775
|
+
<mat-selection-list #sort [multiple]="false">
|
|
7772
7776
|
@for (typeOfSort of typesOfSort; track typeOfSort.value) {
|
|
7773
|
-
<mat-list-option
|
|
7777
|
+
<mat-list-option
|
|
7778
|
+
[selected]="typeOfSort.selected"
|
|
7779
|
+
[value]='typeOfSort'
|
|
7780
|
+
(click)="onSortMenuItemClicked($event, typeOfSort)"
|
|
7781
|
+
*ngIf="typeOfSort.display()">
|
|
7774
7782
|
<mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
|
|
7775
7783
|
<span matListItem>{{typeOfSort.label}}</span>
|
|
7776
7784
|
</mat-list-option>
|