ngx-techlify-core 14.8.1 → 14.8.2
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/esm2020/lib/base-model/techlify-listing-component.class.mjs +20 -1
- package/fesm2015/ngx-techlify-core.mjs +19 -2
- package/fesm2015/ngx-techlify-core.mjs.map +1 -1
- package/fesm2020/ngx-techlify-core.mjs +19 -2
- package/fesm2020/ngx-techlify-core.mjs.map +1 -1
- package/lib/base-model/techlify-listing-component.class.d.ts +5 -10
- package/package.json +1 -1
|
@@ -5,12 +5,13 @@ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
|
5
5
|
import * as i7 from '@angular/flex-layout/flex';
|
|
6
6
|
import * as i5 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import { debounceTime, catchError, takeUntil, tap, distinctUntilChanged, startWith, switchMap, finalize, map, filter } from 'rxjs/operators';
|
|
9
|
+
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
8
10
|
import { __decorate } from 'tslib';
|
|
9
11
|
import * as i11 from '@angular/material/table';
|
|
10
12
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
11
13
|
import * as i10 from '@angular/material/sort';
|
|
12
14
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
13
|
-
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
14
15
|
import * as i2 from '@angular/flex-layout/extended';
|
|
15
16
|
import * as i3 from '@angular/common';
|
|
16
17
|
import { DatePipe, CommonModule } from '@angular/common';
|
|
@@ -31,7 +32,6 @@ import { UntypedFormControl, Validators, ReactiveFormsModule, FormsModule, NG_VA
|
|
|
31
32
|
import * as i1$2 from '@angular/common/http';
|
|
32
33
|
import { HttpResponse, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
33
34
|
import { throwError, Observable, Subject, fromEvent, of, from, interval, map as map$1 } from 'rxjs';
|
|
34
|
-
import { catchError, debounceTime, takeUntil, tap, distinctUntilChanged, startWith, switchMap, finalize, map, filter } from 'rxjs/operators';
|
|
35
35
|
import * as i1$1 from '@angular/material/snack-bar';
|
|
36
36
|
import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
37
37
|
import * as i8$4 from '@angular/material/form-field';
|
|
@@ -179,6 +179,15 @@ class TechlifyListingControllerInterface {
|
|
|
179
179
|
this.lastPage = 500;
|
|
180
180
|
this.isWorking = false;
|
|
181
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Function that listens for any changes in the form group to apply the filters
|
|
184
|
+
*/
|
|
185
|
+
listenForChanges() {
|
|
186
|
+
this.filterForm.valueChanges.pipe(debounceTime(500), untilDestroyed(this))
|
|
187
|
+
.subscribe(() => {
|
|
188
|
+
this.reload();
|
|
189
|
+
});
|
|
190
|
+
}
|
|
182
191
|
/**
|
|
183
192
|
* Reload all data from page 1
|
|
184
193
|
*/
|
|
@@ -199,6 +208,14 @@ class TechlifyListingControllerInterface {
|
|
|
199
208
|
this.loadData();
|
|
200
209
|
}
|
|
201
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Reset the filter.
|
|
213
|
+
*
|
|
214
|
+
* @param field
|
|
215
|
+
*/
|
|
216
|
+
resetFilter(field) {
|
|
217
|
+
this.filterForm.get(field).reset('');
|
|
218
|
+
}
|
|
202
219
|
}
|
|
203
220
|
|
|
204
221
|
/**
|