ui-kit-ck-consultant 0.5.267 → 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.
- package/dist/index.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -8
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -4403,9 +4403,11 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4403
4403
|
_this = _React$Component.call(this, props) || this;
|
4404
4404
|
|
4405
4405
|
_this.eventMouseUp = function () {
|
4406
|
-
_this.
|
4407
|
-
|
4408
|
-
|
4406
|
+
if (_this.state.isDisplay) {
|
4407
|
+
_this.setState({
|
4408
|
+
isActive: false
|
4409
|
+
});
|
4410
|
+
}
|
4409
4411
|
};
|
4410
4412
|
|
4411
4413
|
_this.onMouse = function (e, isForce) {
|
@@ -4429,6 +4431,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4429
4431
|
};
|
4430
4432
|
|
4431
4433
|
_this.state = {
|
4434
|
+
isDisplay: true,
|
4432
4435
|
isActive: false,
|
4433
4436
|
position: 0
|
4434
4437
|
};
|
@@ -4438,6 +4441,10 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4438
4441
|
var _proto = Gauge.prototype;
|
4439
4442
|
|
4440
4443
|
_proto.componentDidMount = function componentDidMount() {
|
4444
|
+
this.setState({
|
4445
|
+
isDisplay: true
|
4446
|
+
});
|
4447
|
+
|
4441
4448
|
if (this.props.position) {
|
4442
4449
|
this.setState({
|
4443
4450
|
position: this.props.position
|
@@ -4448,7 +4455,13 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4448
4455
|
};
|
4449
4456
|
|
4450
4457
|
_proto.componentWillUnmount = function componentWillUnmount() {
|
4451
|
-
|
4458
|
+
var _this2 = this;
|
4459
|
+
|
4460
|
+
this.setState({
|
4461
|
+
isDisplay: false
|
4462
|
+
}, function () {
|
4463
|
+
window.removeEventListener('mouseup', _this2.eventMouseUp);
|
4464
|
+
});
|
4452
4465
|
};
|
4453
4466
|
|
4454
4467
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
@@ -4460,7 +4473,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4460
4473
|
};
|
4461
4474
|
|
4462
4475
|
_proto.render = function render() {
|
4463
|
-
var
|
4476
|
+
var _this3 = this;
|
4464
4477
|
|
4465
4478
|
return /*#__PURE__*/React__default.createElement("div", {
|
4466
4479
|
className: this.props.className
|
@@ -4492,15 +4505,15 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4492
4505
|
borderRadius: '8px'
|
4493
4506
|
},
|
4494
4507
|
onMouseMove: function onMouseMove(e) {
|
4495
|
-
return
|
4508
|
+
return _this3.onMouse(e);
|
4496
4509
|
},
|
4497
4510
|
onClick: function onClick(e) {
|
4498
|
-
return
|
4511
|
+
return _this3.onMouse(e, true);
|
4499
4512
|
},
|
4500
4513
|
onMouseDown: function onMouseDown(e) {
|
4501
4514
|
e.preventDefault();
|
4502
4515
|
|
4503
|
-
|
4516
|
+
_this3.setState({
|
4504
4517
|
isActive: true
|
4505
4518
|
});
|
4506
4519
|
}
|