ui-kit-ck-consultant 0.5.266 → 0.5.268

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.
@@ -4399,6 +4399,14 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4399
4399
 
4400
4400
  _this = _React$Component.call(this, props) || this;
4401
4401
 
4402
+ _this.eventMouseUp = function () {
4403
+ if (_this.state.isDisplay) {
4404
+ _this.setState({
4405
+ isActive: false
4406
+ });
4407
+ }
4408
+ };
4409
+
4402
4410
  _this.onMouse = function (e, isForce) {
4403
4411
  if (isForce === void 0) {
4404
4412
  isForce = false;
@@ -4420,6 +4428,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4420
4428
  };
4421
4429
 
4422
4430
  _this.state = {
4431
+ isDisplay: true,
4423
4432
  isActive: false,
4424
4433
  position: 0
4425
4434
  };
@@ -4429,7 +4438,9 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4429
4438
  var _proto = Gauge.prototype;
4430
4439
 
4431
4440
  _proto.componentDidMount = function componentDidMount() {
4432
- var _this2 = this;
4441
+ this.setState({
4442
+ isDisplay: true
4443
+ });
4433
4444
 
4434
4445
  if (this.props.position) {
4435
4446
  this.setState({
@@ -4437,11 +4448,17 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
4437
4448
  });
4438
4449
  }
4439
4450
 
4440
- window.addEventListener('mouseup', function () {
4441
- _this2.setState({
4442
- isActive: false
4443
- });
4444
- }, true);
4451
+ window.addEventListener('mouseup', this.eventMouseUp, true);
4452
+ };
4453
+
4454
+ _proto.componentWillUnmount = function componentWillUnmount() {
4455
+ var _this2 = this;
4456
+
4457
+ this.setState({
4458
+ isDisplay: false
4459
+ }, function () {
4460
+ window.removeEventListener('mouseup', _this2.eventMouseUp);
4461
+ });
4445
4462
  };
4446
4463
 
4447
4464
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {