@iamproperty/components 2.7.9 → 2.8.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamproperty/components",
3
- "version": "2.7.9",
3
+ "version": "2.8.1",
4
4
  "private": false,
5
5
  "description": "Component library for iamproperty",
6
6
  "author": {
@@ -39,7 +39,6 @@
39
39
  "bootstrap": "^5.1.3",
40
40
  "cache-loader": "^4.1.0",
41
41
  "glob": "^7.2.0",
42
- "mocha": "^9.2.0",
43
42
  "sass": "^1.45.1",
44
43
  "sass-loader": "^10.2.0",
45
44
  "vue": "^2.6.14",
@@ -80,6 +79,7 @@
80
79
  "jest-puppeteer": "^6.1.0",
81
80
  "jest-puppeteer-preset": "^6.1.0",
82
81
  "markdown-loader": "^8.0.0",
82
+ "mocha": "^9.2.2",
83
83
  "postcss": "^8.4.7",
84
84
  "postcss-css-variables": "^0.18.0",
85
85
  "puppeteer": "^13.7.0",
package/src/.DS_Store CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="container tabs__container" ref="wrapper">
3
3
 
4
- <input type="radio" class="tab__input" v-for="(value,index) in tabLinks()" :key="index" :name="value.name" :id="value.id" :checked="index == 0? 'checked':''" />
4
+ <input type="radio" class="d-none" v-for="(value,index) in tabLinks()" :key="index" :name="value.name" :id="value.id" :checked="index == 0? 'checked':''" />
5
5
 
6
6
  <div class="tabs__links">
7
7
  <label v-for="(value,index) in tabLinks()" :key="index" :for="value.id" class="link" v-on:click="openTab(index)">
@@ -20,21 +20,6 @@
20
20
  import { ucfirst, unsnake } from '../../helpers/strings'
21
21
  import table from '../../../assets/js/modules/table.js'
22
22
 
23
- let numericValue = function(value) {
24
-
25
-
26
- console.log(value);
27
-
28
- value = value.replace('£','')
29
- value = value.replace('%','')
30
-
31
- if (Number.isNaN(Number.parseFloat(value))) {
32
- return 0;
33
- }
34
-
35
- return Number.parseFloat(value)
36
- }
37
-
38
23
  export default {
39
24
  name: 'Table',
40
25
  props: {
@@ -80,8 +65,14 @@ export default {
80
65
  numericValue () {
81
66
  return (value) => {
82
67
 
83
- value = numericValue(value);
84
- return value;
68
+ value = value.replace('£','')
69
+ value = value.replace('%','')
70
+
71
+ if (Number.isNaN(Number.parseFloat(value))) {
72
+ return 0;
73
+ }
74
+
75
+ return Number.parseFloat(value)
85
76
  }
86
77
  }
87
78
  },
@@ -112,11 +103,7 @@ export default {
112
103
 
113
104
  let tbodyHTML = '';
114
105
  this.items.forEach((row, index) => {
115
-
116
- let rowID = row['rowid'] ? row['rowid'] : '';
117
- row = Object.fromEntries(Object.entries(row).filter(([key]) => key !== 'rowid'));
118
-
119
- tbodyHTML += `<tr data-row-id="${rowID}">${ Object.keys(row).map(col => `<td data-label="${ucfirst(unsnake(col))}" data-numeric="${numericValue(row[col])}">${row[col]}</td>` ).join("") }</tr>`;
106
+ tbodyHTML += `<tr>${ Object.keys(row).map(col => `<td data-label="${ucfirst(unsnake(col))}">${row[col]}</td>` ).join("") }</tr>`;
120
107
  });
121
108
  tbody.innerHTML = tbodyHTML;
122
109