@projectcaluma/ember-analytics 12.15.1 → 12.15.3
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,7 @@
|
|
|
30
30
|
{{#each this.data.value.fields as |row|}}
|
|
31
31
|
<tr>
|
|
32
32
|
{{#each row as |entry|}}
|
|
33
|
-
<td>
|
|
33
|
+
<td data-t={{this.getXLSXType entry.value}}>
|
|
34
34
|
{{entry.value}}
|
|
35
35
|
</td>
|
|
36
36
|
{{/each}}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
{{#if this.data.value.summary}}
|
|
40
40
|
<tr class="uk-text-bold">
|
|
41
41
|
{{#each this.data.value.summary as |summary|}}
|
|
42
|
-
<td>
|
|
42
|
+
<td data-t={{this.getXLSXType summary.value}}>
|
|
43
43
|
{{summary.value}}
|
|
44
44
|
</td>
|
|
45
45
|
{{/each}}
|
|
@@ -74,4 +74,19 @@ export default class CaReportPreviewComponent extends Component {
|
|
|
74
74
|
);
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
+
|
|
78
|
+
getXLSXType(input) {
|
|
79
|
+
// Check if it's a number
|
|
80
|
+
if (!isNaN(input) && input.trim() !== "") {
|
|
81
|
+
return "n";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Check if it looks like a date and can be parsed as a date
|
|
85
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(input) && !isNaN(Date.parse(input))) {
|
|
86
|
+
return "d";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Default to string
|
|
90
|
+
return "s";
|
|
91
|
+
}
|
|
77
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectcaluma/ember-analytics",
|
|
3
|
-
"version": "12.15.
|
|
3
|
+
"version": "12.15.3",
|
|
4
4
|
"description": "Ember addon for Caluma analytics.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"graphql": "^15.8.0",
|
|
33
33
|
"reactiveweb": "^1.2.3",
|
|
34
34
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz",
|
|
35
|
-
"@projectcaluma/ember-core": "^12.15.
|
|
35
|
+
"@projectcaluma/ember-core": "^12.15.3"
|
|
36
36
|
},
|
|
37
37
|
"//": [
|
|
38
38
|
"TODO: remove obsolete dependency to `ember-data` which is only necessary",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"sass": "1.75.0",
|
|
72
72
|
"uikit": "3.21.5",
|
|
73
73
|
"webpack": "5.91.0",
|
|
74
|
-
"@projectcaluma/ember-testing": "12.15.
|
|
74
|
+
"@projectcaluma/ember-testing": "12.15.3"
|
|
75
75
|
},
|
|
76
76
|
"peerDependency": {
|
|
77
77
|
"ember-engines": "^0.9.0",
|