@appquality/unguess-design-system 2.12.44 → 2.12.46
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,34 @@
|
|
|
1
|
+
# v2.12.46 (Tue Dec 06 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Revert bullet fix [#142](https://github.com/AppQuality/unguess-design-system/pull/142) ([@d-beezee](https://github.com/d-beezee) [@cannarocks](https://github.com/cannarocks))
|
|
6
|
+
- revert: Remove resize from bullet chart [#141](https://github.com/AppQuality/unguess-design-system/pull/141) ([@d-beezee](https://github.com/d-beezee))
|
|
7
|
+
|
|
8
|
+
#### Authors: 2
|
|
9
|
+
|
|
10
|
+
- [@d-beezee](https://github.com/d-beezee)
|
|
11
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# v2.12.45 (Mon Dec 05 2022)
|
|
16
|
+
|
|
17
|
+
#### 🐛 Bug Fix
|
|
18
|
+
|
|
19
|
+
- Change sunburst and pie cornerradius, expose skiparclabel and rerender bullet on resize [#140](https://github.com/AppQuality/unguess-design-system/pull/140) ([@d-beezee](https://github.com/d-beezee) [@marcbon](https://github.com/marcbon) [@iacopolea](https://github.com/iacopolea))
|
|
20
|
+
- feat: Rerender bullet on resize to prevent invalid positioning [#139](https://github.com/AppQuality/unguess-design-system/pull/139) ([@d-beezee](https://github.com/d-beezee))
|
|
21
|
+
- feat: Change pie and sunburst corner radius [#137](https://github.com/AppQuality/unguess-design-system/pull/137) ([@d-beezee](https://github.com/d-beezee))
|
|
22
|
+
- feat(pie): add arcLinkLabelsSkipAngle props [#138](https://github.com/AppQuality/unguess-design-system/pull/138) ([@marcbon](https://github.com/marcbon))
|
|
23
|
+
|
|
24
|
+
#### Authors: 3
|
|
25
|
+
|
|
26
|
+
- [@d-beezee](https://github.com/d-beezee)
|
|
27
|
+
- Iacopo Leardini ([@iacopolea](https://github.com/iacopolea))
|
|
28
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
1
32
|
# v2.12.44 (Fri Dec 02 2022)
|
|
2
33
|
|
|
3
34
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -1164,18 +1164,18 @@ var CustomTooltip = function (_a) {
|
|
|
1164
1164
|
var UgBulletChart = styled__default["default"](bullet.ResponsiveBullet)(templateObject_1$19 || (templateObject_1$19 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
1165
1165
|
var BulletChart = function (_a) {
|
|
1166
1166
|
var width = _a.width, height = _a.height, ranges = _a.ranges, values = _a.values;
|
|
1167
|
-
return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(UgBulletChart, { theme: DEFAULT_CHARTS_THEME, data: [
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1167
|
+
return (jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx("div", __assign({ style: { width: "100%", height: height } }, { children: jsxRuntime.jsx(UgBulletChart, { theme: DEFAULT_CHARTS_THEME, data: [
|
|
1168
|
+
{
|
|
1169
|
+
id: "",
|
|
1170
|
+
title: "",
|
|
1171
|
+
ranges: ranges,
|
|
1172
|
+
measures: values,
|
|
1173
|
+
markers: values,
|
|
1174
|
+
},
|
|
1175
|
+
], animate: false, measureComponent: CustomMeasure, markerColors: CHARTS_COLOR_PALETTE.darkPine, markerComponent: function (_a) {
|
|
1176
|
+
_a.size; var markerProps = __rest(_a, ["size"]);
|
|
1177
|
+
return (jsxRuntime.jsx(CustomBulletChartMarkers, __assign({}, markerProps, { size: 4 })));
|
|
1178
|
+
}, tooltip: CustomTooltip, rangeColors: CHARTS_COLOR_PALETTE.lightGrey, rangeBorderColor: "white", rangeBorderWidth: 2, margin: { top: 0, right: 5, bottom: -1, left: 0 } }) })) })));
|
|
1179
1179
|
};
|
|
1180
1180
|
var templateObject_1$19;
|
|
1181
1181
|
|
|
@@ -1248,16 +1248,16 @@ var templateObject_1$18, templateObject_2$t, templateObject_3$i, templateObject_
|
|
|
1248
1248
|
|
|
1249
1249
|
var PieChart = function (_a) {
|
|
1250
1250
|
var _b;
|
|
1251
|
-
var theme = _a.theme, colors = _a.colors, width = _a.width, height = _a.height, data = _a.data, centerItem = _a.centerItem, margin = _a.margin, tooltip = _a.tooltip, legend = _a.legend;
|
|
1251
|
+
var theme = _a.theme, colors = _a.colors, width = _a.width, height = _a.height, data = _a.data, centerItem = _a.centerItem, margin = _a.margin, tooltip = _a.tooltip, legend = _a.legend, arcLinkLabelsSkipAngle = _a.arcLinkLabelsSkipAngle;
|
|
1252
1252
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
1253
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(pie.ResponsivePie, { theme: __assign({}, __assign(__assign(__assign({}, DEFAULT_CHARTS_THEME), theme), { labels: __assign(__assign({}, theme === null || theme === void 0 ? void 0 : theme.labels), { text: __assign({ fontWeight: themeContext.fontWeights.semibold, fill: themeContext.palette.grey[800] }, (_b = theme === null || theme === void 0 ? void 0 : theme.labels) === null || _b === void 0 ? void 0 : _b.text) }) })), arcLinkLabel: function (d) { return (d.label || d.id).toString(); }, colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, enableArcLabels: false, arcLinkLabelsColor: { from: "color" }, padAngle: 2, data: data, margin: __assign({ top: 40, bottom: 40 }, margin), tooltip: tooltip
|
|
1253
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ChartContainer, __assign({ width: width, height: height }, { children: jsxRuntime.jsx(pie.ResponsivePie, { theme: __assign({}, __assign(__assign(__assign({}, DEFAULT_CHARTS_THEME), theme), { labels: __assign(__assign({}, theme === null || theme === void 0 ? void 0 : theme.labels), { text: __assign({ fontWeight: themeContext.fontWeights.semibold, fill: themeContext.palette.grey[800] }, (_b = theme === null || theme === void 0 ? void 0 : theme.labels) === null || _b === void 0 ? void 0 : _b.text) }) })), arcLinkLabel: function (d) { return (d.label || d.id).toString(); }, colors: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, enableArcLabels: false, arcLinkLabelsColor: { from: "color" }, arcLinkLabelsSkipAngle: arcLinkLabelsSkipAngle !== null && arcLinkLabelsSkipAngle !== void 0 ? arcLinkLabelsSkipAngle : 10, padAngle: 2, data: data, margin: __assign({ top: 40, bottom: 40 }, margin), tooltip: tooltip
|
|
1254
1254
|
? function (node) {
|
|
1255
1255
|
var data = node.datum.data;
|
|
1256
1256
|
var label = (data === null || data === void 0 ? void 0 : data.label) || data.id;
|
|
1257
1257
|
var value = data.value;
|
|
1258
1258
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: tooltip({ label: label, value: value, data: data }) });
|
|
1259
1259
|
}
|
|
1260
|
-
: undefined, cornerRadius:
|
|
1260
|
+
: undefined, cornerRadius: 2, innerRadius: 0.8, arcLinkLabelsThickness: 2, layers: __spreadArray([
|
|
1261
1261
|
"arcs",
|
|
1262
1262
|
"arcLabels",
|
|
1263
1263
|
"arcLinkLabels"
|
|
@@ -1379,7 +1379,7 @@ var SunburstChart = function (_a) {
|
|
|
1379
1379
|
padding: 0,
|
|
1380
1380
|
} }) }) : DEFAULT_CHARTS_THEME, colors: currentColor
|
|
1381
1381
|
? function () { return currentColor; }
|
|
1382
|
-
: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, borderWidth: 4, cornerRadius:
|
|
1382
|
+
: colors !== null && colors !== void 0 ? colors : CHARTS_COLOR_SCHEME_CATEGORICAL_8_A, borderWidth: 4, cornerRadius: 4, onMouseEnter: function (node) {
|
|
1383
1383
|
if (node.data.children) {
|
|
1384
1384
|
setIsHovering(true);
|
|
1385
1385
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PieChartProps } from "./_types";
|
|
2
|
-
declare const PieChart: ({ theme, colors, width, height, data, centerItem, margin, tooltip, legend, }: PieChartProps) => JSX.Element;
|
|
2
|
+
declare const PieChart: ({ theme, colors, width, height, data, centerItem, margin, tooltip, legend, arcLinkLabelsSkipAngle, }: PieChartProps) => JSX.Element;
|
|
3
3
|
export { PieChart };
|
|
@@ -2,5 +2,5 @@ import { ComponentMeta, Story } from "@storybook/react";
|
|
|
2
2
|
import { PieChartProps } from "./_types";
|
|
3
3
|
export declare const Default: Story<PieChartProps>;
|
|
4
4
|
export declare const WithCustomTooltip: Story<PieChartProps>;
|
|
5
|
-
declare const _default: ComponentMeta<({ theme, colors, width, height, data, centerItem, margin, tooltip, legend, }: PieChartProps) => JSX.Element>;
|
|
5
|
+
declare const _default: ComponentMeta<({ theme, colors, width, height, data, centerItem, margin, tooltip, legend, arcLinkLabelsSkipAngle, }: PieChartProps) => JSX.Element>;
|
|
6
6
|
export default _default;
|