ui-kit-ck-consultant 0.5.204 → 0.5.207
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/dist/index.js +36 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +36 -19
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2110,14 +2110,16 @@ var BarChart = /*#__PURE__*/function (_React$Component) {
|
|
2110
2110
|
var optionsCurrency = {
|
2111
2111
|
style: 'currency',
|
2112
2112
|
currency: 'EUR',
|
2113
|
-
minimumFractionDigits: digits
|
2113
|
+
minimumFractionDigits: digits,
|
2114
|
+
maximumFractionDigits: digits
|
2114
2115
|
};
|
2115
2116
|
var value = new Intl.NumberFormat('fr-FR', optionsCurrency).format(tooltipItem.yLabel);
|
2116
2117
|
return name + " : " + value;
|
2117
2118
|
} else if (_this.props.format === 'percentage') {
|
2118
2119
|
var optionsPercentage = {
|
2119
2120
|
style: 'percent',
|
2120
|
-
minimumFractionDigits: digits
|
2121
|
+
minimumFractionDigits: digits,
|
2122
|
+
maximumFractionDigits: digits
|
2121
2123
|
};
|
2122
2124
|
|
2123
2125
|
var _value = new Intl.NumberFormat('fr-FR', optionsPercentage).format(tooltipItem.yLabel / 100);
|
@@ -2125,7 +2127,8 @@ var BarChart = /*#__PURE__*/function (_React$Component) {
|
|
2125
2127
|
return name + " : " + _value;
|
2126
2128
|
} else {
|
2127
2129
|
var options = {
|
2128
|
-
minimumFractionDigits: digits
|
2130
|
+
minimumFractionDigits: digits,
|
2131
|
+
maximumFractionDigits: digits
|
2129
2132
|
};
|
2130
2133
|
|
2131
2134
|
var _value2 = new Intl.NumberFormat('fr-FR', options).format(tooltipItem.yLabel);
|
@@ -2327,8 +2330,8 @@ var PieChart = /*#__PURE__*/function (_React$Component) {
|
|
2327
2330
|
data: this.createDatasets(this.props.data.length),
|
2328
2331
|
legend: {
|
2329
2332
|
display: this.legendDisplayData(),
|
2330
|
-
position: 'bottom',
|
2331
|
-
align: 'center',
|
2333
|
+
position: this.props.positionLegend || 'bottom',
|
2334
|
+
align: this.props.alignLegend || 'center',
|
2332
2335
|
labels: {
|
2333
2336
|
usePointStyle: true,
|
2334
2337
|
boxWidth: 10,
|
@@ -3958,6 +3961,27 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
3958
3961
|
var _this;
|
3959
3962
|
|
3960
3963
|
_this = _React$Component.call(this, props) || this;
|
3964
|
+
|
3965
|
+
_this.onMouse = function (e, isForce) {
|
3966
|
+
if (isForce === void 0) {
|
3967
|
+
isForce = false;
|
3968
|
+
}
|
3969
|
+
|
3970
|
+
if (_this.state.isActive || isForce) {
|
3971
|
+
var currentTargetRect = e.currentTarget.getBoundingClientRect();
|
3972
|
+
var width = currentTargetRect.width;
|
3973
|
+
var positionX = e.pageX - currentTargetRect.left;
|
3974
|
+
var step = _this.props.step ? _this.props.step : 1;
|
3975
|
+
var position = positionX * 100 / width - positionX * 100 / width % step;
|
3976
|
+
|
3977
|
+
_this.setState({
|
3978
|
+
position: position
|
3979
|
+
}, function () {
|
3980
|
+
return _this.props.onChange ? _this.props.onChange(position) : null;
|
3981
|
+
});
|
3982
|
+
}
|
3983
|
+
};
|
3984
|
+
|
3961
3985
|
_this.state = {
|
3962
3986
|
isActive: false,
|
3963
3987
|
position: 0
|
@@ -4013,21 +4037,14 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4013
4037
|
borderRadius: '8px'
|
4014
4038
|
},
|
4015
4039
|
onMouseMove: function onMouseMove(e) {
|
4016
|
-
|
4017
|
-
|
4018
|
-
|
4019
|
-
|
4020
|
-
var step = _this3.props.step ? _this3.props.step : 1;
|
4021
|
-
var position = positionX * 100 / width - positionX * 100 / width % step;
|
4022
|
-
|
4023
|
-
_this3.setState({
|
4024
|
-
position: position
|
4025
|
-
}, function () {
|
4026
|
-
return _this3.props.onChange ? _this3.props.onChange(position) : null;
|
4027
|
-
});
|
4028
|
-
}
|
4040
|
+
return _this3.onMouse(e);
|
4041
|
+
},
|
4042
|
+
onClick: function onClick(e) {
|
4043
|
+
return _this3.onMouse(e, true);
|
4029
4044
|
},
|
4030
|
-
onMouseDown: function onMouseDown() {
|
4045
|
+
onMouseDown: function onMouseDown(e) {
|
4046
|
+
e.preventDefault();
|
4047
|
+
|
4031
4048
|
_this3.setState({
|
4032
4049
|
isActive: true
|
4033
4050
|
});
|