@bizy/core 20.6.9 → 20.6.10

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.
@@ -3053,6 +3053,7 @@ class BizyRangeFilterPipe {
3053
3053
  }
3054
3054
  const min = range.min ?? null;
3055
3055
  const max = range.max ?? null;
3056
+ const activatedFilter = min !== null || max !== null;
3056
3057
  let itemsWithoutProperty = [];
3057
3058
  const output = items.filter(_item => {
3058
3059
  let _value = _item;
@@ -3061,12 +3062,12 @@ class BizyRangeFilterPipe {
3061
3062
  const _property = nestedProperty[i];
3062
3063
  if (typeof _value[_property] === 'undefined' || _value[_property] === null) {
3063
3064
  itemsWithoutProperty.push(_item);
3064
- return false;
3065
+ return !activatedFilter;
3065
3066
  }
3066
3067
  _value = _value[_property];
3067
3068
  }
3068
3069
  if (isNaN(_value)) {
3069
- return false;
3070
+ return !activatedFilter;
3070
3071
  }
3071
3072
  return (min === null || _value >= min) && (max === null || _value <= max);
3072
3073
  });
@@ -4802,7 +4803,7 @@ class BizyExportToCSVService {
4802
4803
  break;
4803
4804
  }
4804
4805
  }
4805
- if (typeof value !== undefined && value !== null) {
4806
+ if (typeof value !== 'undefined' && value !== null) {
4806
4807
  csv += `${escapeCommas(String(value).replace(/\n/g, ''))},`;
4807
4808
  }
4808
4809
  else {
@@ -5430,7 +5431,7 @@ class BizyCopyToClipboardService {
5430
5431
  nestedProperty.forEach(_property => {
5431
5432
  value = value[_property];
5432
5433
  });
5433
- if (typeof value !== undefined && value !== null) {
5434
+ if (typeof value !== 'undefined' && value !== null) {
5434
5435
  toCopy += `${String(value).replace(/\n/g, '')},`;
5435
5436
  }
5436
5437
  else {
@@ -8121,11 +8122,8 @@ class BizyReducePipe {
8121
8122
  if (!items || items.length === 0) {
8122
8123
  return 0;
8123
8124
  }
8124
- if (!key) {
8125
- const reduce = items.reduce((acc, value) => acc + value, 0);
8126
- return Number(reduce.toFixed(fixedTo));
8127
- }
8128
- const reduce = items.map(_d => _d[key]).reduce((acc, value) => acc + value, 0);
8125
+ let _items = key ? items.filter(_item => _item[key]).map(_d => _d[key]) : items;
8126
+ const reduce = _items.filter(v => Number.isFinite(Number(v))).reduce((acc, value) => acc + Number(value), 0);
8129
8127
  return Number(reduce.toFixed(fixedTo));
8130
8128
  }
8131
8129
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyReducePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
@@ -9036,8 +9034,8 @@ class BizyTooltipDirective {
9036
9034
  this.#renderer.setStyle(this.#tooltip, 'left', left + 'px');
9037
9035
  }
9038
9036
  #isTextTruncated = (element) => {
9039
- const { scrollHeight, clientHeight } = element;
9040
- return scrollHeight > clientHeight;
9037
+ const { scrollHeight, clientHeight, scrollWidth, clientWidth } = element;
9038
+ return this.#lineClamp === 1 ? scrollWidth > clientWidth : scrollHeight > clientHeight;
9041
9039
  };
9042
9040
  ngOnDestroy() {
9043
9041
  this.#document.querySelectorAll('.bizy-tooltip-identify').forEach(element => {