ng-tailwind 3.30.369 → 3.30.370

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.
@@ -4007,29 +4007,40 @@
4007
4007
  this.filtersDescription[reference] = description;
4008
4008
  };
4009
4009
  NgtDatatableComponent.prototype.removeFilter = function (reference, refresh) {
4010
- var _this = this;
4011
4010
  if (refresh === void 0) { refresh = true; }
4012
- if (reference && !this.hasAppliedFilter(reference)) {
4013
- return;
4014
- }
4015
- this.cleaningFilter = true;
4016
- if (!reference) {
4017
- this.currentState.filters.defaultFilters = {};
4018
- this.currentState.filters.silentFilters = {};
4019
- this.filtersTranslated = [];
4020
- }
4021
- else {
4022
- delete this.currentState.filters.defaultFilters[reference];
4023
- delete this.currentState.filters.silentFilters[reference];
4024
- this.filtersTranslated = this.filtersTranslated.filter(function (element) { return element && element.reference !== reference; });
4025
- }
4026
- this.onClearFilter.emit(reference);
4027
- if (this.inputSearch && (reference === 'term' || !reference)) {
4028
- this.inputSearch.clearInput();
4029
- }
4030
- if (refresh) {
4031
- this.apply(this.ngtPagination.getCurrentPage(), false).then(function () { return _this.cleaningFilter = false; });
4032
- }
4011
+ return __awaiter(this, void 0, void 0, function () {
4012
+ var _this = this;
4013
+ return __generator(this, function (_b) {
4014
+ return [2 /*return*/, new Promise(function (resolve) {
4015
+ if (reference && !_this.hasAppliedFilter(reference)) {
4016
+ return resolve();
4017
+ }
4018
+ _this.cleaningFilter = true;
4019
+ if (!reference) {
4020
+ _this.currentState.filters.defaultFilters = {};
4021
+ _this.currentState.filters.silentFilters = {};
4022
+ _this.filtersTranslated = [];
4023
+ }
4024
+ else {
4025
+ delete _this.currentState.filters.defaultFilters[reference];
4026
+ delete _this.currentState.filters.silentFilters[reference];
4027
+ _this.filtersTranslated = _this.filtersTranslated.filter(function (element) { return element && element.reference !== reference; });
4028
+ }
4029
+ _this.onClearFilter.emit(reference);
4030
+ if (_this.inputSearch && (reference === 'term' || !reference)) {
4031
+ _this.inputSearch.clearInput();
4032
+ }
4033
+ if (refresh) {
4034
+ return _this.apply(_this.ngtPagination.getCurrentPage(), false)
4035
+ .then(function () {
4036
+ _this.cleaningFilter = false;
4037
+ resolve();
4038
+ });
4039
+ }
4040
+ resolve();
4041
+ })];
4042
+ });
4043
+ });
4033
4044
  };
4034
4045
  NgtDatatableComponent.prototype.hasAppliedFilter = function (filter) {
4035
4046
  var reference = typeof filter === 'string' ? filter : Object.keys(filter !== null && filter !== void 0 ? filter : {})[0];