@firestitch/filter 9.8.4 → 9.8.8

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.
@@ -865,15 +865,14 @@ var RangeItem = /** @class */ (function (_super) {
865
865
  });
866
866
  Object.defineProperty(RangeItem.prototype, "queryObject", {
867
867
  get: function () {
868
- var _a, _b;
869
868
  var value = this.value;
870
869
  var name = this.name;
871
870
  var params = {};
872
871
  var paramMinName = getRangeName(this.case, name, 'min');
873
872
  var paramMaxName = getRangeName(this.case, name, 'max');
874
873
  if (isObject(value)) {
875
- params[paramMinName] = (_a = value.min) !== null && _a !== void 0 ? _a : null;
876
- params[paramMaxName] = (_b = value.max) !== null && _b !== void 0 ? _b : null;
874
+ params[paramMinName] = value.min || null;
875
+ params[paramMaxName] = value.max || null;
877
876
  }
878
877
  else {
879
878
  params[paramMinName] = null;
@@ -1011,14 +1010,13 @@ var BaseDateRangeItem = /** @class */ (function (_super) {
1011
1010
  Object.defineProperty(BaseDateRangeItem.prototype, "queryObject", {
1012
1011
  get: function () {
1013
1012
  var _a;
1014
- var _b, _c;
1015
1013
  var value = this.value || {};
1016
1014
  var name = this.name;
1017
1015
  var paramFromName = getRangeName(this.case, name, 'from');
1018
1016
  var paramToName = getRangeName(this.case, name, 'to');
1019
1017
  return _a = {},
1020
- _a[paramFromName] = (_b = value.from) !== null && _b !== void 0 ? _b : null,
1021
- _a[paramToName] = (_c = value.to) !== null && _c !== void 0 ? _c : null,
1018
+ _a[paramFromName] = value.from || null,
1019
+ _a[paramToName] = value.to || null,
1022
1020
  _a;
1023
1021
  },
1024
1022
  enumerable: true,
@@ -3799,7 +3797,7 @@ var FilterComponent = /** @class */ (function () {
3799
3797
  FilterComponent = __decorate([
3800
3798
  Component({
3801
3799
  selector: 'fs-filter',
3802
- template: "<ng-container *ngIf=\"hasKeyword; else noKeywordFilter\">\n <div class=\"filter-search-container\">\n <div class=\"filter-input-field\">\n <form autocomplete=\"off\" role=\"presentation\" *ngIf=\"keywordVisible$ | async\">\n <mat-form-field floatLabel=\"never\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n\n <input\n matInput\n [formControl]=\"searchText\"\n [placeholder]=\"searchPlaceholder\"\n name=\"filter-input\"\n (click)=\"filterInputEvent($event)\"\n class=\"filter-input\">\n\n <a matSuffix\n *ngIf=\"searchText.value && showFilterInput && config.clear\"\n (click)=\"clearSearchText($event)\"\n href=\"javascript:void(0)\"\n class=\"clear\">\n <mat-icon>clear</mat-icon>\n </a>\n\n <a matSuffix\n (click)=\"reload($event)\"\n class=\"reload\"\n *ngIf=\"config.reload\">\n <mat-icon>refresh</mat-icon>\n </a>\n </mat-form-field>\n </form>\n </div>\n <ng-container *ngTemplateOutlet=\"filterActions\"></ng-container>\n </div>\n <div class=\"status-actions\" *ngIf=\"keywordVisible$ | async\">\n <ng-container *ngTemplateOutlet=\"statusBarContainer\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterChips\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noKeywordFilter>\n <div class=\"filter-searchless-container\">\n <div class=\"status-actions\">\n <ng-container *ngTemplateOutlet=\"statusBarContainer\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterChips\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"filterActions\"></ng-container>\n </div>\n</ng-template>\n\n\n<ng-template #filterActions>\n <div class=\"filter-actions\">\n <ng-container *ngIf=\"hasVisibleItemOrSorting && filtersBtnVisible$ | async \">\n <button\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style == 'raised',\n 'mat-button': config.button.style == 'basic',\n 'mat-icon-button': config.button.style == 'icon'\n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n type=\"button\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </button>\n </ng-container>\n\n <fs-filter-actions\n *ngIf=\"actionsVisible$ | async\"\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n</ng-template>\n\n<ng-template #filterChips>\n <fs-filter-chips\n *ngIf=\"config.chips && hasFilterChips$ | async\"\n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n</ng-template>\n\n<ng-template #statusBarContainer>\n <div class=\"status-bar\" *ngIf=\"statusBar\">\n <small><ng-container *ngTemplateOutlet=\"statusBar\"></ng-container></small>\n </div>\n</ng-template>\n",
3800
+ template: "<ng-container *ngIf=\"hasKeyword; else noKeywordFilter\">\n <div class=\"filter-search-container\">\n <div class=\"filter-input-field\">\n <form autocomplete=\"off\" role=\"presentation\" *ngIf=\"keywordVisible$ | async\">\n <mat-form-field floatLabel=\"never\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n\n <input\n #searchTextInput\n matInput\n [formControl]=\"searchText\"\n [placeholder]=\"searchPlaceholder\"\n name=\"filter-input\"\n (click)=\"filterInputEvent($event)\"\n class=\"filter-input\">\n\n <a matSuffix\n *ngIf=\"searchText.value && showFilterInput && config.clear\"\n (click)=\"clearSearchText($event)\"\n href=\"javascript:void(0)\"\n class=\"clear\">\n <mat-icon>clear</mat-icon>\n </a>\n\n <a matSuffix\n (click)=\"reload($event)\"\n class=\"reload\"\n *ngIf=\"config.reload\">\n <mat-icon>refresh</mat-icon>\n </a>\n </mat-form-field>\n </form>\n </div>\n <ng-container *ngTemplateOutlet=\"filterActions\"></ng-container>\n </div>\n <div class=\"status-actions\" *ngIf=\"keywordVisible$ | async\">\n <ng-container *ngTemplateOutlet=\"statusBarContainer\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterChips\"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noKeywordFilter>\n <div class=\"filter-searchless-container\">\n <div class=\"status-actions\">\n <ng-container *ngTemplateOutlet=\"statusBarContainer\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterChips\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"filterActions\"></ng-container>\n </div>\n</ng-template>\n\n\n<ng-template #filterActions>\n <div class=\"filter-actions\">\n <ng-container *ngIf=\"hasVisibleItemOrSorting && filtersBtnVisible$ | async \">\n <button\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style == 'raised',\n 'mat-button': config.button.style == 'basic',\n 'mat-icon-button': config.button.style == 'icon'\n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n type=\"button\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </button>\n </ng-container>\n\n <fs-filter-actions\n *ngIf=\"actionsVisible$ | async\"\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n</ng-template>\n\n<ng-template #filterChips>\n <fs-filter-chips\n *ngIf=\"config.chips && hasFilterChips$ | async\"\n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n</ng-template>\n\n<ng-template #statusBarContainer>\n <div class=\"status-bar\" *ngIf=\"statusBar\">\n <small><ng-container *ngTemplateOutlet=\"statusBar\"></ng-container></small>\n </div>\n</ng-template>\n",
3803
3801
  encapsulation: ViewEncapsulation.None,
3804
3802
  providers: [
3805
3803
  FsFilterOverlayService,
@@ -4137,17 +4135,28 @@ var TextComponent = /** @class */ (function (_super) {
4137
4135
  return _this;
4138
4136
  }
4139
4137
  TextComponent.prototype.ngOnInit = function () {
4138
+ this._listenControlValueChanges();
4139
+ this._listenModelChanges();
4140
+ };
4141
+ TextComponent.prototype.ngOnDestroy = function () {
4142
+ this.destroy$.next();
4143
+ this.destroy$.complete();
4144
+ };
4145
+ TextComponent.prototype._listenControlValueChanges = function () {
4140
4146
  var _this = this;
4141
- this.textControl.setValue(this.item.model);
4142
4147
  this.textControl.valueChanges
4143
4148
  .pipe(distinctUntilChanged(), debounceTime(200), takeUntil(this.destroy$))
4144
4149
  .subscribe(function (value) {
4145
4150
  _this.item.model = value;
4146
4151
  });
4147
4152
  };
4148
- TextComponent.prototype.ngOnDestroy = function () {
4149
- this.destroy$.next();
4150
- this.destroy$.complete();
4153
+ TextComponent.prototype._listenModelChanges = function () {
4154
+ var _this = this;
4155
+ this._item.value$
4156
+ .pipe(takeUntil(this.destroy$))
4157
+ .subscribe(function () {
4158
+ _this.textControl.setValue(_this.item.model, { emitEvent: false });
4159
+ });
4151
4160
  };
4152
4161
  TextComponent.ctorParameters = function () { return [
4153
4162
  { type: KeyValueDiffers },