@appquality/unguess-design-system 2.12.43 → 2.12.44

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # v2.12.44 (Fri Dec 02 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Update sunburst [#136](https://github.com/AppQuality/unguess-design-system/pull/136) ([@d-beezee](https://github.com/d-beezee))
6
+ - feat(sunburst): Allow passing custom data to tooltip [#135](https://github.com/AppQuality/unguess-design-system/pull/135) ([@d-beezee](https://github.com/d-beezee))
7
+
8
+ #### Authors: 1
9
+
10
+ - [@d-beezee](https://github.com/d-beezee)
11
+
12
+ ---
13
+
1
14
  # v2.12.43 (Fri Dec 02 2022)
2
15
 
3
16
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -1367,9 +1367,11 @@ var SunburstChart = function (_a) {
1367
1367
  var data = _a.data, color = _a.color;
1368
1368
  setCurrentData(data);
1369
1369
  setCurrentColor(color);
1370
+ };
1371
+ React.useEffect(function () {
1370
1372
  if (onChange)
1371
1373
  onChange(currentData);
1372
- };
1374
+ }, [currentData]);
1373
1375
  if (!data.children)
1374
1376
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: "No data" });
1375
1377
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height, style: isHovering ? { cursor: "pointer" } : undefined }, { children: jsxRuntime.jsx(sunburst.ResponsiveSunburst, { theme: tooltip
@@ -1389,6 +1391,7 @@ var SunburstChart = function (_a) {
1389
1391
  ? function (node) { return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: tooltip({
1390
1392
  label: node.data.label || node.data.name,
1391
1393
  value: getChildrenValue(node.data),
1394
+ data: __assign(__assign({}, node.data), { children: undefined }),
1392
1395
  }) })); }
1393
1396
  : undefined, layers: __spreadArray(__spreadArray([
1394
1397
  "arcs"
@@ -1412,7 +1415,7 @@ var SunburstChart = function (_a) {
1412
1415
  color: clickedData.color,
1413
1416
  });
1414
1417
  }
1415
- } }) })), jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: "auto" }, { children: legend ? (jsxRuntime.jsx(Legend, { colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, data: data.children.map(function (d) { return d.name; }), columns: typeof legend === "object" && legend.columns
1418
+ } }) })), jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: "auto" }, { children: legend ? (jsxRuntime.jsx(Legend, { colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, data: data.children.map(function (d) { return d.label || d.name; }), columns: typeof legend === "object" && legend.columns
1416
1419
  ? legend.columns
1417
1420
  : undefined, width: typeof legend === "object" && legend.width
1418
1421
  ? legend.width
@@ -6,6 +6,7 @@ export interface SunburstData {
6
6
  label?: string;
7
7
  children?: SunburstData[];
8
8
  value?: number;
9
+ [key: string]: SunburstData[keyof SunburstData] | string | number | boolean;
9
10
  }
10
11
  export interface SunburstChartProps {
11
12
  data: SunburstData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "2.12.43",
3
+ "version": "2.12.44",
4
4
  "dependencies": {
5
5
  "@nivo/bar": "^0.80.0",
6
6
  "@nivo/bullet": "^0.80.0",