@firestitch/filter 12.8.1 → 12.9.0

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.
@@ -737,7 +737,7 @@
737
737
  };
738
738
  BaseItem.prototype._clearValue = function (defaultValue) {
739
739
  if (defaultValue === void 0) { defaultValue = undefined; }
740
- this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : null;
740
+ this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : undefined;
741
741
  };
742
742
  return BaseItem;
743
743
  }());
@@ -843,7 +843,7 @@
843
843
  value = (_a = this.values) === null || _a === void 0 ? void 0 : _a.map(function (v) { return v.value; });
844
844
  }
845
845
  else if (!Array.isArray(value) || value.length === 0 || value.indexOf('__all') > -1) {
846
- value = null;
846
+ value = undefined;
847
847
  }
848
848
  return value;
849
849
  },
@@ -984,7 +984,7 @@
984
984
  get: function () {
985
985
  var value = this.model;
986
986
  if (value == '__all' || value === undefined) {
987
- value = null;
987
+ value = undefined;
988
988
  }
989
989
  return value;
990
990
  },
@@ -1044,7 +1044,7 @@
1044
1044
  _super.prototype._clearValue.call(this, defaultValue);
1045
1045
  var value = Array.isArray(this.values) && this.values.some(function (val) { return val.value === '__all'; })
1046
1046
  ? '__all'
1047
- : null;
1047
+ : undefined;
1048
1048
  this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
1049
1049
  };
1050
1050
  return SimpleSelectItem;
@@ -1152,7 +1152,7 @@
1152
1152
  get: function () {
1153
1153
  var value = lodashEs.clone(this.model);
1154
1154
  if (Array.isArray(value) && value.length === 0) {
1155
- return null;
1155
+ return undefined;
1156
1156
  }
1157
1157
  return value;
1158
1158
  },
@@ -1187,7 +1187,7 @@
1187
1187
  params[name] = value.join(',');
1188
1188
  }
1189
1189
  else {
1190
- params[name] = null;
1190
+ params[name] = undefined;
1191
1191
  }
1192
1192
  return params;
1193
1193
  },
@@ -1265,7 +1265,7 @@
1265
1265
  var value = lodashEs.clone(this.model);
1266
1266
  if (!lodashEs.isObject(this.model) ||
1267
1267
  (common.isEmpty(this.model.max, { zero: true }) && common.isEmpty(this.model.min, { zero: true }))) {
1268
- value = null;
1268
+ value = undefined;
1269
1269
  }
1270
1270
  return value;
1271
1271
  },
@@ -1280,12 +1280,12 @@
1280
1280
  var paramMinName = getRangeName(this.case, name, 'min');
1281
1281
  var paramMaxName = getRangeName(this.case, name, 'max');
1282
1282
  if (lodashEs.isObject(value)) {
1283
- params[paramMinName] = value.min || null;
1284
- params[paramMaxName] = value.max || null;
1283
+ params[paramMinName] = value.min || undefined;
1284
+ params[paramMaxName] = value.max || undefined;
1285
1285
  }
1286
1286
  else {
1287
- params[paramMinName] = null;
1288
- params[paramMaxName] = null;
1287
+ params[paramMinName] = undefined;
1288
+ params[paramMaxName] = undefined;
1289
1289
  }
1290
1290
  return params;
1291
1291
  },
@@ -1387,10 +1387,10 @@
1387
1387
  var value = lodashEs.clone(this.model);
1388
1388
  if (!lodashEs.isObject(this.model) ||
1389
1389
  (common.isEmpty(this.model.from, { zero: true }) && common.isEmpty(this.model.to, { zero: true }))) {
1390
- value = null;
1390
+ value = undefined;
1391
1391
  }
1392
1392
  if (common.isEmpty(value, { zero: true })) {
1393
- return null;
1393
+ return undefined;
1394
1394
  }
1395
1395
  var from = value.from;
1396
1396
  var to = value.to;
@@ -1424,8 +1424,8 @@
1424
1424
  var paramFromName = getRangeName(this.case, name, 'from');
1425
1425
  var paramToName = getRangeName(this.case, name, 'to');
1426
1426
  return _c = {},
1427
- _c[paramFromName] = value.from || null,
1428
- _c[paramToName] = value.to || null,
1427
+ _c[paramFromName] = value.from || undefined,
1428
+ _c[paramToName] = value.to || undefined,
1429
1429
  _c;
1430
1430
  },
1431
1431
  enumerable: false,
@@ -1558,7 +1558,7 @@
1558
1558
  get: function () {
1559
1559
  var value = lodashEs.clone(this.model);
1560
1560
  if (!value || !dateFns.isValid(value) || !dateFns.isDate(value)) {
1561
- return null;
1561
+ return undefined;
1562
1562
  }
1563
1563
  return value;
1564
1564
  },
@@ -1581,7 +1581,7 @@
1581
1581
  var _a;
1582
1582
  var value = this.queryObject[this.name];
1583
1583
  return _a = {},
1584
- _a[this.name] = value ? date.simpleFormat(value) : null,
1584
+ _a[this.name] = value ? date.simpleFormat(value) : undefined,
1585
1585
  _a;
1586
1586
  },
1587
1587
  enumerable: false,
@@ -1628,7 +1628,7 @@
1628
1628
  };
1629
1629
  DateItem.prototype._clearValue = function (defaultValue) {
1630
1630
  if (defaultValue === void 0) { defaultValue = undefined; }
1631
- this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : null;
1631
+ this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : undefined;
1632
1632
  };
1633
1633
  return DateItem;
1634
1634
  }(BaseDateItem));
@@ -1643,7 +1643,7 @@
1643
1643
  };
1644
1644
  DateTimeItem.prototype._clearValue = function (defaultValue) {
1645
1645
  if (defaultValue === void 0) { defaultValue = undefined; }
1646
- this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : null;
1646
+ this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : undefined;
1647
1647
  };
1648
1648
  return DateTimeItem;
1649
1649
  }(BaseDateItem));
@@ -1681,8 +1681,8 @@
1681
1681
  Object.defineProperty(AutocompleteItem.prototype, "value", {
1682
1682
  get: function () {
1683
1683
  var value = lodashEs.clone(this.model);
1684
- if (!this.model || common.isEmpty(this.model.value, { zero: true })) {
1685
- return null;
1684
+ if (!this.model || this.model.value === undefined) {
1685
+ return undefined;
1686
1686
  }
1687
1687
  value = this.model.value;
1688
1688
  return value;
@@ -1707,7 +1707,7 @@
1707
1707
  AutocompleteItem.prototype._init = function () { };
1708
1708
  AutocompleteItem.prototype._clearValue = function (defaultValue) {
1709
1709
  if (defaultValue === void 0) { defaultValue = undefined; }
1710
- this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : null;
1710
+ this.model = defaultValue !== null && defaultValue !== void 0 ? defaultValue : undefined;
1711
1711
  this.search = '';
1712
1712
  };
1713
1713
  return AutocompleteItem;
@@ -1724,7 +1724,7 @@
1724
1724
  Object.defineProperty(AutocompleteChipsItem.prototype, "value", {
1725
1725
  get: function () {
1726
1726
  if (Array.isArray(this.model) && this.model.length === 0) {
1727
- return null;
1727
+ return undefined;
1728
1728
  }
1729
1729
  return lodashEs.clone(this.model);
1730
1730
  },
@@ -1817,7 +1817,7 @@
1817
1817
  get: function () {
1818
1818
  var value = this.model ? this.checked : this.unchecked;
1819
1819
  if (!value) {
1820
- return null;
1820
+ return undefined;
1821
1821
  }
1822
1822
  return value;
1823
1823
  },
@@ -1829,7 +1829,7 @@
1829
1829
  var value = this.value;
1830
1830
  var name = this.name;
1831
1831
  var params = {};
1832
- params[name] = this.model ? value : null;
1832
+ params[name] = this.model ? value : undefined;
1833
1833
  return params;
1834
1834
  },
1835
1835
  enumerable: false,
@@ -1870,7 +1870,7 @@
1870
1870
  };
1871
1871
  Object.defineProperty(TextItem.prototype, "value", {
1872
1872
  get: function () {
1873
- return !!this.model ? this.model : null;
1873
+ return !!this.model ? this.model : undefined;
1874
1874
  },
1875
1875
  enumerable: false,
1876
1876
  configurable: true
@@ -1923,10 +1923,10 @@
1923
1923
  var value = lodashEs.clone(this.model);
1924
1924
  if (!lodashEs.isObject(this.model) ||
1925
1925
  (common.isEmpty(this.model.from, { zero: true }) && common.isEmpty(this.model.to, { zero: true }))) {
1926
- value = null;
1926
+ value = undefined;
1927
1927
  }
1928
1928
  if (common.isEmpty(value, { zero: true })) {
1929
- return null;
1929
+ return undefined;
1930
1930
  }
1931
1931
  var from = value.from;
1932
1932
  var to = value.to;
@@ -1970,9 +1970,9 @@
1970
1970
  var paramToName = getRangeName('camel', name, 'to');
1971
1971
  var paramPeriodName = name + "Period";
1972
1972
  return _a = {},
1973
- _a[paramFromName] = (value === null || value === void 0 ? void 0 : value.from) || null,
1974
- _a[paramToName] = (value === null || value === void 0 ? void 0 : value.to) || null,
1975
- _a[paramPeriodName] = (value === null || value === void 0 ? void 0 : value.period) || null,
1973
+ _a[paramFromName] = (value === null || value === void 0 ? void 0 : value.from) || undefined,
1974
+ _a[paramToName] = (value === null || value === void 0 ? void 0 : value.to) || undefined,
1975
+ _a[paramPeriodName] = (value === null || value === void 0 ? void 0 : value.period) || undefined,
1976
1976
  _a;
1977
1977
  },
1978
1978
  enumerable: false,
@@ -2006,7 +2006,7 @@
2006
2006
  if (value) {
2007
2007
  value.from = parseDate(value.from);
2008
2008
  value.to = parseDate(value.to);
2009
- value.period = parseInt(value.period, 10) || null;
2009
+ value.period = parseInt(value.period, 10) || undefined;
2010
2010
  }
2011
2011
  _super.prototype._setModel.call(this, value);
2012
2012
  };
@@ -2256,7 +2256,7 @@
2256
2256
  });
2257
2257
  if (onlyPresented) {
2258
2258
  return lodashEs.pickBy(params, function (val) {
2259
- return val !== null && val !== void 0;
2259
+ return val !== void 0;
2260
2260
  });
2261
2261
  }
2262
2262
  return params;
@@ -4646,7 +4646,7 @@
4646
4646
  return FsFilterChipsComponent;
4647
4647
  }());
4648
4648
  FsFilterChipsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFilterChipsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
4649
- FsFilterChipsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipsComponent, selector: "fs-filter-chips", inputs: { filters: "filters" }, ngImport: i0__namespace, template: "<fs-chips [(ngModel)]=\"chips\">\n <ng-container *ngFor=\"let item of filters\">\n <ng-container *ngIf=\"(item.value$ | async) !== null\">\n <fs-filter-chip [item]=\"item\"></fs-filter-chip>\n </ng-container>\n </ng-container>\n</fs-chips>\n", styles: [""], components: [{ type: i2__namespace$1.FsChipsComponent, selector: "fs-chips", inputs: ["compare", "multiple"] }, { type: FsFilterChipComponent, selector: "fs-filter-chip", inputs: ["item"] }], directives: [{ type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
4649
+ FsFilterChipsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsFilterChipsComponent, selector: "fs-filter-chips", inputs: { filters: "filters" }, ngImport: i0__namespace, template: "<fs-chips [(ngModel)]=\"chips\">\n <ng-container *ngFor=\"let item of filters\">\n <ng-container *ngIf=\"(item.value$ | async) !== undefined\">\n <fs-filter-chip [item]=\"item\"></fs-filter-chip>\n </ng-container>\n </ng-container>\n</fs-chips>\n", styles: [""], components: [{ type: i2__namespace$1.FsChipsComponent, selector: "fs-chips", inputs: ["compare", "multiple"] }, { type: FsFilterChipComponent, selector: "fs-filter-chip", inputs: ["item"] }], directives: [{ type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
4650
4650
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFilterChipsComponent, decorators: [{
4651
4651
  type: i0.Component,
4652
4652
  args: [{
@@ -5053,6 +5053,7 @@
5053
5053
  * Call change callback and apply new filter values
5054
5054
  */
5055
5055
  FilterComponent.prototype.change = function () {
5056
+ debugger;
5056
5057
  var data = this._filterItems.valuesAsQuery();
5057
5058
  var sort = this._filterItems.getSort();
5058
5059
  var sortingChanged = ((!sort || !this._sort) && sort !== this._sort)