ui-kit-ck-consultant 0.5.266 → 0.5.267

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 CHANGED
@@ -4402,6 +4402,12 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4402
4402
 
4403
4403
  _this = _React$Component.call(this, props) || this;
4404
4404
 
4405
+ _this.eventMouseUp = function () {
4406
+ _this.setState({
4407
+ isActive: false
4408
+ });
4409
+ };
4410
+
4405
4411
  _this.onMouse = function (e, isForce) {
4406
4412
  if (isForce === void 0) {
4407
4413
  isForce = false;
@@ -4432,19 +4438,17 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4432
4438
  var _proto = Gauge.prototype;
4433
4439
 
4434
4440
  _proto.componentDidMount = function componentDidMount() {
4435
- var _this2 = this;
4436
-
4437
4441
  if (this.props.position) {
4438
4442
  this.setState({
4439
4443
  position: this.props.position
4440
4444
  });
4441
4445
  }
4442
4446
 
4443
- window.addEventListener('mouseup', function () {
4444
- _this2.setState({
4445
- isActive: false
4446
- });
4447
- }, true);
4447
+ window.addEventListener('mouseup', this.eventMouseUp, true);
4448
+ };
4449
+
4450
+ _proto.componentWillUnmount = function componentWillUnmount() {
4451
+ window.removeEventListener('mouseup', this.eventMouseUp);
4448
4452
  };
4449
4453
 
4450
4454
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
@@ -4456,7 +4460,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4456
4460
  };
4457
4461
 
4458
4462
  _proto.render = function render() {
4459
- var _this3 = this;
4463
+ var _this2 = this;
4460
4464
 
4461
4465
  return /*#__PURE__*/React__default.createElement("div", {
4462
4466
  className: this.props.className
@@ -4488,15 +4492,15 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4488
4492
  borderRadius: '8px'
4489
4493
  },
4490
4494
  onMouseMove: function onMouseMove(e) {
4491
- return _this3.onMouse(e);
4495
+ return _this2.onMouse(e);
4492
4496
  },
4493
4497
  onClick: function onClick(e) {
4494
- return _this3.onMouse(e, true);
4498
+ return _this2.onMouse(e, true);
4495
4499
  },
4496
4500
  onMouseDown: function onMouseDown(e) {
4497
4501
  e.preventDefault();
4498
4502
 
4499
- _this3.setState({
4503
+ _this2.setState({
4500
4504
  isActive: true
4501
4505
  });
4502
4506
  }