@wavemaker/app-runtime-wm-build 11.4.3-next.25781 → 11.4.3-next.26202

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/app-runtime-wm-build",
3
- "version": "11.4.3-next.25781",
3
+ "version": "11.4.3-next.26202",
4
4
  "description": "All modules required for a wavemaker application.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12481,7 +12481,7 @@
12481
12481
  if (this.widgetContext.ngform) {
12482
12482
  this.widgetControl.setValidators(this.instance._validators);
12483
12483
  var opt = {};
12484
- if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
12484
+ if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
12485
12485
  opt["emitEvent"] = false;
12486
12486
  }
12487
12487
  this.widgetControl.updateValueAndValidity(opt);
@@ -12534,7 +12534,7 @@
12534
12534
  this.widgetControl.setAsyncValidators([ this._asyncValidatorFn() ]);
12535
12535
  if (this.widgetContext.ngform.touched) {
12536
12536
  var opt = {};
12537
- if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
12537
+ if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
12538
12538
  opt["emitEvent"] = false;
12539
12539
  }
12540
12540
  this.widgetControl.updateValueAndValidity(opt);
@@ -12595,7 +12595,7 @@
12595
12595
  this.applyDefaultValidators();
12596
12596
  if (this._asyncValidatorFn) {
12597
12597
  var opt = {};
12598
- if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
12598
+ if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
12599
12599
  opt["emitEvent"] = false;
12600
12600
  }
12601
12601
  this.widgetControl.setAsyncValidators([ this._asyncValidatorFn() ]);
@@ -12616,10 +12616,13 @@
12616
12616
  _this.applyDefaultValidators();
12617
12617
  }), watchName));
12618
12618
  };
12619
+ BaseFieldValidations.prototype.isNullOrEmptyOrFalsy = function(value) {
12620
+ return _.isEmpty(value);
12621
+ };
12619
12622
  BaseFieldValidations.prototype.applyDefaultValidators = function() {
12620
12623
  var validators = this.getDefaultValidators();
12621
12624
  var opt = {};
12622
- if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
12625
+ if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
12623
12626
  opt["emitEvent"] = false;
12624
12627
  }
12625
12628
  this.widgetControl.setValidators(_.concat(this._syncValidators || [], validators));
@@ -17083,7 +17086,7 @@
17083
17086
  };
17084
17087
  BaseFormCustomComponent.prototype.invokeOnChange = function(value, $event, valid) {
17085
17088
  this._onChange(value);
17086
- if (valid) {
17089
+ if ($event) {
17087
17090
  _super.prototype.invokeOnChange.call(this, value, $event);
17088
17091
  }
17089
17092
  };
@@ -65013,9 +65016,10 @@
65013
65016
  var v = _.isArray(d.value) ? d.value[0] : d.value;
65014
65017
  if (v) {
65015
65018
  if (v.startsWith && v.startsWith("bind:")) {
65016
- v = scope.registerDestroyListener(core.$watch(v.replace("bind:", ""), scope, {}, variable.invokeOnParamChange.bind(variable, d), undefined, undefined, d, (function() {
65019
+ var watchExpression = core.$watch(v.replace("bind:", ""), scope, {}, variable.invokeOnParamChange.bind(variable, d), undefined, undefined, d, (function() {
65017
65020
  return variable.isMuted;
65018
- })));
65021
+ }));
65022
+ v = scope.registerDestroyListener ? scope.registerDestroyListener(watchExpression) : watchExpression;
65019
65023
  } else if (!_.isUndefined(d.value)) {
65020
65024
  variables.setValueToNode(d.target, d, root, variable, d.value, true);
65021
65025
  if (runMode && root !== targetNodeKey) {