cx 24.6.5 → 24.6.6

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/widgets.js CHANGED
@@ -7112,7 +7112,8 @@ var Input$2 = /*#__PURE__*/ (function (_VDOM$Component) {
7112
7112
  autoFocus(this.input, this);
7113
7113
  };
7114
7114
  _proto2.componentWillUnmount = function componentWillUnmount() {
7115
- if (this.input == getActiveElement()) this.onChange(this.input.value, "blur");
7115
+ if (this.input == getActiveElement() && this.input.value != this.props.data.value)
7116
+ this.onChange(this.input.value, "blur");
7116
7117
  tooltipParentWillUnmount$1(this.props.instance);
7117
7118
  };
7118
7119
  _proto2.onKeyDown = function onKeyDown(e) {
@@ -10121,7 +10122,7 @@ var Input$1 = /*#__PURE__*/ (function (_VDOM$Component) {
10121
10122
  autoFocus(this.input, this);
10122
10123
  };
10123
10124
  _proto2.componentWillUnmount = function componentWillUnmount() {
10124
- if (this.input == getActiveElement()) {
10125
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
10125
10126
  this.onChange(
10126
10127
  {
10127
10128
  target: {
@@ -12391,7 +12392,7 @@ var MonthInput = /*#__PURE__*/ (function (_VDOM$Component) {
12391
12392
  autoFocus(this.input, this);
12392
12393
  };
12393
12394
  _proto2.componentWillUnmount = function componentWillUnmount() {
12394
- if (this.input == getActiveElement()) {
12395
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
12395
12396
  this.onChange(this.input.value, "blur");
12396
12397
  }
12397
12398
  tooltipParentWillUnmount$1(this.props.instance);
@@ -12776,7 +12777,7 @@ var ColorInput = /*#__PURE__*/ (function (_VDOM$Component) {
12776
12777
  if (this.props.instance.widget.autoFocus && !isTouchDevice()) this.input.focus();
12777
12778
  };
12778
12779
  _proto2.componentWillUnmount = function componentWillUnmount() {
12779
- if (this.input == getActiveElement()) {
12780
+ if (this.input == getActiveElement() && this.input.value != this.props.data.value) {
12780
12781
  this.onChange(this.input.value, "blur");
12781
12782
  }
12782
12783
  tooltipParentWillUnmount$1(this.props.instance);
@@ -14925,7 +14926,7 @@ var DateTimeInput = /*#__PURE__*/ (function (_VDOM$Component) {
14925
14926
  autoFocus(this.input, this);
14926
14927
  };
14927
14928
  _proto2.componentWillUnmount = function componentWillUnmount() {
14928
- if (this.input == getActiveElement()) {
14929
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
14929
14930
  this.onChange(this.input.value, "blur");
14930
14931
  }
14931
14932
  tooltipParentWillUnmount$1(this.props.instance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cx",
3
- "version": "24.6.5",
3
+ "version": "24.6.6",
4
4
  "description": "Advanced JavaScript UI framework for admin and dashboard applications with ready to use grid, form and chart components.",
5
5
  "main": "index.js",
6
6
  "jsnext:main": "src/index.js",
@@ -35,7 +35,7 @@ export class ColorField extends Field {
35
35
  required: undefined,
36
36
  format: undefined,
37
37
  },
38
- ...arguments
38
+ ...arguments,
39
39
  );
40
40
  }
41
41
 
@@ -199,7 +199,7 @@ class ColorInput extends VDOM.Component {
199
199
  icon: true,
200
200
  empty: empty && !data.placeholder,
201
201
  error: data.error && (state.visited || !suppressErrorsUntilVisited || !empty),
202
- })
202
+ }),
203
203
  )}
204
204
  style={data.style}
205
205
  onMouseDown={this.onMouseDown.bind(this)}
@@ -353,7 +353,7 @@ class ColorInput extends VDOM.Component {
353
353
  }
354
354
 
355
355
  componentWillUnmount() {
356
- if (this.input == getActiveElement()) {
356
+ if (this.input == getActiveElement() && this.input.value != this.props.data.value) {
357
357
  this.onChange(this.input.value, "blur");
358
358
  }
359
359
  tooltipParentWillUnmount(this.props.instance);
@@ -513,7 +513,7 @@ class DateTimeInput extends VDOM.Component {
513
513
  }
514
514
 
515
515
  componentWillUnmount() {
516
- if (this.input == getActiveElement()) {
516
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
517
517
  this.onChange(this.input.value, "blur");
518
518
  }
519
519
  tooltipParentWillUnmount(this.props.instance);
@@ -485,7 +485,7 @@ class MonthInput extends VDOM.Component {
485
485
  }
486
486
 
487
487
  componentWillUnmount() {
488
- if (this.input == getActiveElement()) {
488
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
489
489
  this.onChange(this.input.value, "blur");
490
490
  }
491
491
  tooltipParentWillUnmount(this.props.instance);
@@ -249,7 +249,7 @@ class Input extends VDOM.Component {
249
249
  }
250
250
 
251
251
  componentWillUnmount() {
252
- if (this.input == getActiveElement()) {
252
+ if (this.input == getActiveElement() && this.input.value != this.props.data.formatted) {
253
253
  this.onChange({ target: { value: this.input.value } }, "blur");
254
254
  }
255
255
  tooltipParentWillUnmount(this.props.instance);
@@ -225,7 +225,8 @@ class Input extends VDOM.Component {
225
225
  }
226
226
 
227
227
  componentWillUnmount() {
228
- if (this.input == getActiveElement()) this.onChange(this.input.value, "blur");
228
+ if (this.input == getActiveElement() && this.input.value != this.props.data.value)
229
+ this.onChange(this.input.value, "blur");
229
230
  tooltipParentWillUnmount(this.props.instance);
230
231
  }
231
232