@tenancy.nz/feature-ui 1.5.1 → 1.5.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.
@@ -98,6 +98,10 @@ function DoughnutChart(_ref) {
98
98
  borderWidth: 0,
99
99
  borderRadius: 5
100
100
  };
101
+ },
102
+ label: function label(_ref2) {
103
+ var index = _ref2.index;
104
+ return " ".concat(chartLabels[index], ": ").concat(parseInt(String(chartValues[index]), 10));
101
105
  }
102
106
  }
103
107
  }
@@ -115,7 +119,7 @@ function DoughnutChart(_ref) {
115
119
  return /* @__PURE__ */React.createElement(ChartLegend.default, {
116
120
  key: reactUid.uid(item),
117
121
  color: color,
118
- count: count,
122
+ count: parseInt(String(count), 10),
119
123
  label: title
120
124
  });
121
125
  }))));
@@ -4,9 +4,6 @@ var parseChartCount = function parseChartCount(value) {
4
4
  if (Number.isNaN(Number.parseInt(String(value), 10))) {
5
5
  return 0;
6
6
  }
7
- if (value === 0) {
8
- return 0;
9
- }
10
7
  return Math.max(Number(value), 1e-3);
11
8
  };
12
9
 
@@ -94,6 +94,10 @@ function DoughnutChart(_ref) {
94
94
  borderWidth: 0,
95
95
  borderRadius: 5
96
96
  };
97
+ },
98
+ label: function label(_ref2) {
99
+ var index = _ref2.index;
100
+ return " ".concat(chartLabels[index], ": ").concat(parseInt(String(chartValues[index]), 10));
97
101
  }
98
102
  }
99
103
  }
@@ -111,7 +115,7 @@ function DoughnutChart(_ref) {
111
115
  return /* @__PURE__ */React.createElement(ChartLegend, {
112
116
  key: uid(item),
113
117
  color: color,
114
- count: count,
118
+ count: parseInt(String(count), 10),
115
119
  label: title
116
120
  });
117
121
  }))));
@@ -2,9 +2,6 @@ var parseChartCount = function parseChartCount(value) {
2
2
  if (Number.isNaN(Number.parseInt(String(value), 10))) {
3
3
  return 0;
4
4
  }
5
- if (value === 0) {
6
- return 0;
7
- }
8
5
  return Math.max(Number(value), 1e-3);
9
6
  };
10
7
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tenancy.nz/feature-ui",
3
3
  "description": "React UI feature components.",
4
- "version": "1.5.1",
4
+ "version": "1.5.2",
5
5
  "author": "TPS <https://www.tenancy.co.nz>",
6
6
  "type": "module",
7
7
  "main": "dist/cjs/index.cjs",
@@ -20,14 +20,14 @@
20
20
  "primereact": "3.1.3",
21
21
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
22
22
  "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
23
- "@tenancy.nz/ui": "1.5.1"
23
+ "@tenancy.nz/ui": "1.5.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@emotion/react": "^11.14.0",
27
27
  "@emotion/styled": "^11.14.1",
28
28
  "@mui/icons-material": "^7.2.0",
29
29
  "@mui/material": "^7.3.1",
30
- "@tenancy.nz/ui": "1.5.1"
30
+ "@tenancy.nz/ui": "1.5.2"
31
31
  },
32
32
  "dependencies": {
33
33
  "react-uid": "^2.4.0"