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