@projectcaluma/ember-analytics 13.1.1 → 13.1.2

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.
@@ -30,7 +30,11 @@
30
30
  {{#each this.data.value.fields as |row|}}
31
31
  <tr>
32
32
  {{#each row as |entry|}}
33
- <td data-t={{this.getXLSXType entry.value}}>
33
+ <td
34
+ data-t={{this.getXLSXType entry.value}}
35
+ data-v={{this.cleanValue entry.value}}
36
+ class={{this.getCSSClass entry.value}}
37
+ >
34
38
  {{entry.value}}
35
39
  </td>
36
40
  {{/each}}
@@ -39,7 +43,11 @@
39
43
  {{#if this.data.value.summary}}
40
44
  <tr class="uk-text-bold">
41
45
  {{#each this.data.value.summary as |summary|}}
42
- <td data-t={{this.getXLSXType summary.value}}>
46
+ <td
47
+ data-t={{this.getXLSXType summary.value}}
48
+ data-v={{this.cleanValue summary.value}}
49
+ class={{this.getCSSClass summary.value}}
50
+ >
43
51
  {{summary.value}}
44
52
  </td>
45
53
  {{/each}}
@@ -89,4 +89,15 @@ export default class CaReportPreviewComponent extends Component {
89
89
  // Default to string
90
90
  return "s";
91
91
  }
92
+
93
+ getCSSClass(value) {
94
+ if (value?.includes("\n")) {
95
+ return "multiline-data";
96
+ }
97
+
98
+ return "";
99
+ }
100
+
101
+ // cleaning needed because excel does not support carriage returns
102
+ cleanValue = (value) => value?.replaceAll(/\r/g, "");
92
103
  }
@@ -4,3 +4,10 @@
4
4
  .sortable-item.is-dragging {
5
5
  z-index: 10;
6
6
  }
7
+
8
+ .multiline-data {
9
+ white-space: pre-line;
10
+ line-height: normal;
11
+ padding-top: 0 !important;
12
+ padding-bottom: 0 !important;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectcaluma/ember-analytics",
3
- "version": "13.1.1",
3
+ "version": "13.1.2",
4
4
  "description": "Ember addon for Caluma analytics.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -34,7 +34,7 @@
34
34
  "graphql": "^15.9.0",
35
35
  "reactiveweb": "^1.3.0",
36
36
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
37
- "@projectcaluma/ember-core": "^13.1.1"
37
+ "@projectcaluma/ember-core": "^13.1.2"
38
38
  },
39
39
  "//": [
40
40
  "TODO: remove obsolete dependency to `ember-data` which is only necessary",
@@ -73,7 +73,7 @@
73
73
  "sass": "1.79.4",
74
74
  "uikit": "3.21.13",
75
75
  "webpack": "5.95.0",
76
- "@projectcaluma/ember-testing": "13.1.1"
76
+ "@projectcaluma/ember-testing": "13.1.2"
77
77
  },
78
78
  "peerDependency": {
79
79
  "ember-engines": "^0.11.0",