ui-kit-ck-consultant 0.5.205 → 0.5.208

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.
@@ -2327,8 +2327,8 @@ var PieChart = /*#__PURE__*/function (_React$Component) {
2327
2327
  data: this.createDatasets(this.props.data.length),
2328
2328
  legend: {
2329
2329
  display: this.legendDisplayData(),
2330
- position: 'bottom',
2331
- align: 'center',
2330
+ position: this.props.positionLegend || 'bottom',
2331
+ align: this.props.alignLegend || 'center',
2332
2332
  labels: {
2333
2333
  usePointStyle: true,
2334
2334
  boxWidth: 10,
@@ -3958,6 +3958,27 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
3958
3958
  var _this;
3959
3959
 
3960
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
+
3961
3982
  _this.state = {
3962
3983
  isActive: false,
3963
3984
  position: 0
@@ -4013,21 +4034,14 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4013
4034
  borderRadius: '8px'
4014
4035
  },
4015
4036
  onMouseMove: function onMouseMove(e) {
4016
- if (_this3.state.isActive) {
4017
- var currentTargetRect = e.currentTarget.getBoundingClientRect();
4018
- var width = currentTargetRect.width;
4019
- var positionX = e.pageX - currentTargetRect.left;
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
- }
4037
+ return _this3.onMouse(e);
4038
+ },
4039
+ onClick: function onClick(e) {
4040
+ return _this3.onMouse(e, true);
4029
4041
  },
4030
- onMouseDown: function onMouseDown() {
4042
+ onMouseDown: function onMouseDown(e) {
4043
+ e.preventDefault();
4044
+
4031
4045
  _this3.setState({
4032
4046
  isActive: true
4033
4047
  });