@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.
|
@@ -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 (
|
|
17089
|
+
if ($event) {
|
|
17087
17090
|
_super.prototype.invokeOnChange.call(this, value, $event);
|
|
17088
17091
|
}
|
|
17089
17092
|
};
|
|
@@ -73235,9 +73238,10 @@
|
|
|
73235
73238
|
var v = _.isArray(d.value) ? d.value[0] : d.value;
|
|
73236
73239
|
if (v) {
|
|
73237
73240
|
if (v.startsWith && v.startsWith("bind:")) {
|
|
73238
|
-
|
|
73241
|
+
var watchExpression = core.$watch(v.replace("bind:", ""), scope, {}, variable.invokeOnParamChange.bind(variable, d), undefined, undefined, d, (function() {
|
|
73239
73242
|
return variable.isMuted;
|
|
73240
|
-
}))
|
|
73243
|
+
}));
|
|
73244
|
+
v = scope.registerDestroyListener ? scope.registerDestroyListener(watchExpression) : watchExpression;
|
|
73241
73245
|
} else if (!_.isUndefined(d.value)) {
|
|
73242
73246
|
variables.setValueToNode(d.target, d, root, variable, d.value, true);
|
|
73243
73247
|
if (runMode && root !== targetNodeKey) {
|