@wavemaker/app-ng-runtime 11.4.3-rc.127 → 11.4.3-rc.130
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.
- app-ng-runtime/components/base/bundles/index.umd.js +11 -8
- app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +12 -9
- app-ng-runtime/components/base/fesm2015/index.js +11 -8
- app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/index.metadata.json +1 -1
- app-ng-runtime/components/base/widgets/common/base/base-field-validations.d.ts +1 -0
- app-ng-runtime/components/input/default/bundles/index.umd.js +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/input/default/esm2015/base-form-custom.component.js +2 -2
- app-ng-runtime/components/input/default/fesm2015/index.js +1 -1
- app-ng-runtime/components/input/default/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +1 -7
- app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -8
- app-ng-runtime/components/input/epoch/fesm2015/index.js +1 -7
- app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +1 -1
- app-ng-runtime/core/bundles/index.umd.js.map +1 -1
- app-ng-runtime/core/esm2015/utils/watcher.js +2 -2
- app-ng-runtime/core/fesm2015/index.js +1 -1
- app-ng-runtime/core/fesm2015/index.js.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/variables/bundles/index.umd.js +2 -1
- app-ng-runtime/variables/bundles/index.umd.js.map +1 -1
- app-ng-runtime/variables/esm2015/service/variables.service.js +3 -2
- app-ng-runtime/variables/fesm2015/index.js +2 -1
- app-ng-runtime/variables/fesm2015/index.js.map +1 -1
|
@@ -4842,9 +4842,9 @@
|
|
|
4842
4842
|
if (this.widgetContext.ngform) {
|
|
4843
4843
|
this.widgetControl.setValidators(this.instance._validators);
|
|
4844
4844
|
var opt = {};
|
|
4845
|
-
// updating the value only when prevData is not equal to current value.
|
|
4845
|
+
// updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset
|
|
4846
4846
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4847
|
-
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4847
|
+
if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
|
|
4848
4848
|
opt['emitEvent'] = false;
|
|
4849
4849
|
}
|
|
4850
4850
|
this.widgetControl.updateValueAndValidity(opt);
|
|
@@ -4903,9 +4903,9 @@
|
|
|
4903
4903
|
this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);
|
|
4904
4904
|
if (this.widgetContext.ngform.touched) {
|
|
4905
4905
|
var opt = {};
|
|
4906
|
-
// updating the value only when prevData is not equal to current value.
|
|
4906
|
+
// updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset
|
|
4907
4907
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4908
|
-
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4908
|
+
if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
|
|
4909
4909
|
opt['emitEvent'] = false;
|
|
4910
4910
|
}
|
|
4911
4911
|
this.widgetControl.updateValueAndValidity(opt);
|
|
@@ -4974,9 +4974,9 @@
|
|
|
4974
4974
|
this.applyDefaultValidators();
|
|
4975
4975
|
if (this._asyncValidatorFn) {
|
|
4976
4976
|
var opt = {};
|
|
4977
|
-
// updating the value only when prevData is not equal to current value.
|
|
4977
|
+
// updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset
|
|
4978
4978
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
4979
|
-
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
4979
|
+
if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
|
|
4980
4980
|
opt['emitEvent'] = false;
|
|
4981
4981
|
}
|
|
4982
4982
|
this.widgetControl.setAsyncValidators([this._asyncValidatorFn()]);
|
|
@@ -4998,13 +4998,16 @@
|
|
|
4998
4998
|
_this.applyDefaultValidators();
|
|
4999
4999
|
}, watchName));
|
|
5000
5000
|
};
|
|
5001
|
+
BaseFieldValidations.prototype.isNullOrEmptyOrFalsy = function (value) {
|
|
5002
|
+
return _.isEmpty(value);
|
|
5003
|
+
};
|
|
5001
5004
|
// invokes both custom sync validations and default validations.
|
|
5002
5005
|
BaseFieldValidations.prototype.applyDefaultValidators = function () {
|
|
5003
5006
|
var validators = this.getDefaultValidators();
|
|
5004
5007
|
var opt = {};
|
|
5005
|
-
// updating the value only when prevData is not equal to current value.
|
|
5008
|
+
// updating the value only when prevData is not equal to current value. and also initially when instance.value is empty or null for some widgets like date, checkboxset
|
|
5006
5009
|
// emitEvent flag will prevent from emitting the valueChanges when value is equal to the prevDatavalue.
|
|
5007
|
-
if (this.formwidget && this.instance.value === this.formwidget.prevDatavalue) {
|
|
5010
|
+
if (this.formwidget && (this.instance.value === this.formwidget.prevDatavalue || this.isNullOrEmptyOrFalsy(this.instance.value))) {
|
|
5008
5011
|
opt['emitEvent'] = false;
|
|
5009
5012
|
}
|
|
5010
5013
|
this.widgetControl.setValidators(_.concat(this._syncValidators || [], validators));
|