@zeedhi/common 1.120.3 → 1.120.5

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.
@@ -8665,7 +8665,7 @@ class CSVReport extends BaseReport {
8665
8665
  const filteredColumns = this.filterColumns(columns);
8666
8666
  const columnNames = filteredColumns.map((col) => col.name);
8667
8667
  const result = data.reduce((reduced, row) => {
8668
- const values = columnNames.map((col) => row[col] || '');
8668
+ const values = columnNames.map((col) => (typeof row[col] === 'number' ? row[col] : (row[col] || '')));
8669
8669
  return [...reduced, values];
8670
8670
  }, [columnNames]);
8671
8671
  return JSON.stringify(result);
@@ -8861,7 +8861,7 @@ class XLSReport extends BaseReport {
8861
8861
  formatRawDataSet(data, columns) {
8862
8862
  const columnNames = columns.map((col) => col.name);
8863
8863
  const result = data.reduce((reduced, row) => {
8864
- const values = columnNames.map((col) => row[col] || '');
8864
+ const values = columnNames.map((col) => (typeof row[col] === 'number' ? row[col] : (row[col] || '')));
8865
8865
  return [...reduced, values];
8866
8866
  }, [columnNames]);
8867
8867
  return result;
@@ -8672,7 +8672,7 @@
8672
8672
  const filteredColumns = this.filterColumns(columns);
8673
8673
  const columnNames = filteredColumns.map((col) => col.name);
8674
8674
  const result = data.reduce((reduced, row) => {
8675
- const values = columnNames.map((col) => row[col] || '');
8675
+ const values = columnNames.map((col) => (typeof row[col] === 'number' ? row[col] : (row[col] || '')));
8676
8676
  return [...reduced, values];
8677
8677
  }, [columnNames]);
8678
8678
  return JSON.stringify(result);
@@ -8868,7 +8868,7 @@
8868
8868
  formatRawDataSet(data, columns) {
8869
8869
  const columnNames = columns.map((col) => col.name);
8870
8870
  const result = data.reduce((reduced, row) => {
8871
- const values = columnNames.map((col) => row[col] || '');
8871
+ const values = columnNames.map((col) => (typeof row[col] === 'number' ? row[col] : (row[col] || '')));
8872
8872
  return [...reduced, values];
8873
8873
  }, [columnNames]);
8874
8874
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.120.3",
3
+ "version": "1.120.5",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -43,5 +43,5 @@
43
43
  "lodash.times": "4.3.*",
44
44
  "mockdate": "3.0.*"
45
45
  },
46
- "gitHead": "48deb34f5847dc102a03346b4ec17cd3cfa44b7f"
46
+ "gitHead": "8f6aea17005ae8d4d3dead3877e377fc577cb1ee"
47
47
  }