@trudb/tru-common-lib 0.1.954 → 0.1.956
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.
|
@@ -6021,32 +6021,35 @@ class TruDataGridHeaderFilter {
|
|
|
6021
6021
|
filterParams;
|
|
6022
6022
|
gui;
|
|
6023
6023
|
filterText = '';
|
|
6024
|
-
typesOfSort = [
|
|
6025
|
-
|
|
6026
|
-
value: 'asc',
|
|
6027
|
-
label: 'Sort A to Z',
|
|
6028
|
-
selected: false,
|
|
6029
|
-
display: true,
|
|
6030
|
-
icon: 'asc-sort-icon'
|
|
6031
|
-
},
|
|
6032
|
-
{
|
|
6033
|
-
value: 'desc',
|
|
6034
|
-
label: 'Sort Z to A',
|
|
6035
|
-
selected: false,
|
|
6036
|
-
display: true,
|
|
6037
|
-
icon: 'desc-sort-icon'
|
|
6038
|
-
},
|
|
6039
|
-
{
|
|
6040
|
-
value: 'clear',
|
|
6041
|
-
label: 'Clear Sort',
|
|
6042
|
-
selected: false,
|
|
6043
|
-
display: true,
|
|
6044
|
-
icon: 'no-sort-icon'
|
|
6045
|
-
}
|
|
6046
|
-
];
|
|
6024
|
+
typesOfSort = [];
|
|
6025
|
+
values = [];
|
|
6047
6026
|
filterInputControl = new FormControl('', []);
|
|
6048
6027
|
constructor() { }
|
|
6049
6028
|
agInit(params) {
|
|
6029
|
+
this.filterParams = params;
|
|
6030
|
+
this.typesOfSort = [
|
|
6031
|
+
{
|
|
6032
|
+
value: 'asc',
|
|
6033
|
+
label: 'Sort A to Z',
|
|
6034
|
+
selected: false,
|
|
6035
|
+
display: !this.filterParams.column.isSortAscending(),
|
|
6036
|
+
icon: 'asc-sort-icon'
|
|
6037
|
+
},
|
|
6038
|
+
{
|
|
6039
|
+
value: 'desc',
|
|
6040
|
+
label: 'Sort Z to A',
|
|
6041
|
+
selected: false,
|
|
6042
|
+
display: !this.filterParams.column.isSortDescending(),
|
|
6043
|
+
icon: 'desc-sort-icon'
|
|
6044
|
+
},
|
|
6045
|
+
{
|
|
6046
|
+
value: 'clear',
|
|
6047
|
+
label: 'Clear Sort',
|
|
6048
|
+
selected: false,
|
|
6049
|
+
display: this.filterParams.column.isSortAscending() || this.filterParams.column.isSortDescending(),
|
|
6050
|
+
icon: 'no-sort-icon'
|
|
6051
|
+
}
|
|
6052
|
+
];
|
|
6050
6053
|
}
|
|
6051
6054
|
isFilterActive() {
|
|
6052
6055
|
return this.filterText != null && this.filterText !== '';
|
|
@@ -6066,16 +6069,24 @@ class TruDataGridHeaderFilter {
|
|
|
6066
6069
|
return { value: this.filterText };
|
|
6067
6070
|
}
|
|
6068
6071
|
setModel(model) {
|
|
6072
|
+
this.filterText = model == null ? null : model.value;
|
|
6069
6073
|
}
|
|
6070
6074
|
getGui() {
|
|
6071
6075
|
return this.gui;
|
|
6072
6076
|
}
|
|
6073
6077
|
afterGuiAttached() {
|
|
6074
6078
|
}
|
|
6079
|
+
onFilterInputChanged() {
|
|
6080
|
+
this.filterParams.filterChangedCallback();
|
|
6081
|
+
}
|
|
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
|
+
};
|
|
6075
6086
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeaderFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6076
6087
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: TruDataGridHeaderFilter, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
6077
6088
|
<div class="tru-data-grid-header-filter-container">
|
|
6078
|
-
<mat-selection-list [multiple]="false">
|
|
6089
|
+
<mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
|
|
6079
6090
|
@for (typeOfSort of typesOfSort; track typeOfSort.value) {
|
|
6080
6091
|
<mat-list-option>
|
|
6081
6092
|
<mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
|
|
@@ -6093,6 +6104,8 @@ class TruDataGridHeaderFilter {
|
|
|
6093
6104
|
<input #filterInput
|
|
6094
6105
|
matInput
|
|
6095
6106
|
[formControl]="filterInputControl"
|
|
6107
|
+
[(ngModel)]="filterText"
|
|
6108
|
+
(ngModelChange)="onFilterInputChanged()"
|
|
6096
6109
|
type="text" />
|
|
6097
6110
|
</mat-form-field>
|
|
6098
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"] }] });
|
|
@@ -6117,7 +6130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
6117
6130
|
ReactiveFormsModule
|
|
6118
6131
|
], template: `
|
|
6119
6132
|
<div class="tru-data-grid-header-filter-container">
|
|
6120
|
-
<mat-selection-list [multiple]="false">
|
|
6133
|
+
<mat-selection-list #sort [multiple]="false" (selectionChange)="onSortSelection($event)">
|
|
6121
6134
|
@for (typeOfSort of typesOfSort; track typeOfSort.value) {
|
|
6122
6135
|
<mat-list-option>
|
|
6123
6136
|
<mat-icon [svgIcon]="typeOfSort.icon"></mat-icon>
|
|
@@ -6135,6 +6148,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
6135
6148
|
<input #filterInput
|
|
6136
6149
|
matInput
|
|
6137
6150
|
[formControl]="filterInputControl"
|
|
6151
|
+
[(ngModel)]="filterText"
|
|
6152
|
+
(ngModelChange)="onFilterInputChanged()"
|
|
6138
6153
|
type="text" />
|
|
6139
6154
|
</mat-form-field>
|
|
6140
6155
|
</div>`, 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"] }]
|