@things-factory/grist-ui 4.3.151 → 4.3.155

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.
@@ -227,7 +227,10 @@ export class DataReport extends LitElement {
227
227
  /* 처음 만드는 total records */
228
228
  let record = sortedRecords[0]
229
229
  let totalBase = totals.reduce((base, field) => {
230
- base[field] = columns.find(col => col.name == field)?.rowCount ? 1 : record[field]
230
+ base[field] =
231
+ columns.find(col => col.name == field)?.rowCount && (record[field] === 0 || record[field])
232
+ ? 1
233
+ : record[field]
231
234
  return base
232
235
  }, {})
233
236
  let groupBase = {}
@@ -298,7 +301,10 @@ export class DataReport extends LitElement {
298
301
  (isSameGroupRecord && groupValues[group.column] === lastGroupValues[group.column])
299
302
  ) {
300
303
  for (let field of totals) {
301
- totalRecord[field] += columns.find(col => col.name == field)?.rowCount ? 1 : record[field]
304
+ totalRecord[field] +=
305
+ columns.find(col => col.name == field)?.rowCount && (record[field] === 0 || record[field])
306
+ ? 1
307
+ : record[field]
302
308
  }
303
309
 
304
310
  totalRecord['*'].rowspan++
@@ -317,7 +323,10 @@ export class DataReport extends LitElement {
317
323
  idx,
318
324
  record: totals.reduce(
319
325
  (sum, field) => {
320
- sum[field] = columns.find(col => col.name == field)?.rowCount ? 1 : record[field]
326
+ sum[field] =
327
+ columns.find(col => col.name == field)?.rowCount && (record[field] === 0 || record[field])
328
+ ? 1
329
+ : record[field]
321
330
  return sum
322
331
  },
323
332
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/grist-ui",
3
- "version": "4.3.151",
3
+ "version": "4.3.155",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -33,5 +33,5 @@
33
33
  "lodash-es": "^4.17.15",
34
34
  "underscore": "^1.11.0"
35
35
  },
36
- "gitHead": "7edd641774a5fbb9ca8b33f4cfbb7d89a49ab092"
36
+ "gitHead": "bd238fd69858d34c41931f719cdf34cc9f8fc60a"
37
37
  }