@zeedhi/common 1.94.2 → 1.94.3

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.
@@ -3895,6 +3895,7 @@ class Date$1 extends TextInput {
3895
3895
  this.parserFn = FormatterParserProvider.getParser('ZdDate');
3896
3896
  this.previousHint = '';
3897
3897
  this.previousPersistentHint = false;
3898
+ this.lastChangeValue = null;
3898
3899
  this.allowedDates = this.getInitValue('allowedDates', props.allowedDates, this.allowedDates);
3899
3900
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3900
3901
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
@@ -4025,8 +4026,11 @@ class Date$1 extends TextInput {
4025
4026
  return this.formatISODateValue(this.value);
4026
4027
  }
4027
4028
  set isoValue(newValue) {
4029
+ const lastValue = this.value;
4028
4030
  this.dateError = false;
4029
4031
  this.value = this.parseISODateValue(newValue);
4032
+ if (lastValue !== this.value)
4033
+ this.change(this.value);
4030
4034
  }
4031
4035
  formatISODateValue(value) {
4032
4036
  if (value && this.isValidFormatDate(value, this.dateFormat)) {
@@ -4122,6 +4126,9 @@ class Date$1 extends TextInput {
4122
4126
  }
4123
4127
  }
4124
4128
  change(event, element) {
4129
+ if (this.lastChangeValue && this.lastChangeValue === this.value)
4130
+ return;
4131
+ this.lastChangeValue = this.value;
4125
4132
  super.change(event, element);
4126
4133
  this.helperValue = '';
4127
4134
  this.hint = this.previousHint;
@@ -3902,6 +3902,7 @@
3902
3902
  this.parserFn = core.FormatterParserProvider.getParser('ZdDate');
3903
3903
  this.previousHint = '';
3904
3904
  this.previousPersistentHint = false;
3905
+ this.lastChangeValue = null;
3905
3906
  this.allowedDates = this.getInitValue('allowedDates', props.allowedDates, this.allowedDates);
3906
3907
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3907
3908
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
@@ -4032,8 +4033,11 @@
4032
4033
  return this.formatISODateValue(this.value);
4033
4034
  }
4034
4035
  set isoValue(newValue) {
4036
+ const lastValue = this.value;
4035
4037
  this.dateError = false;
4036
4038
  this.value = this.parseISODateValue(newValue);
4039
+ if (lastValue !== this.value)
4040
+ this.change(this.value);
4037
4041
  }
4038
4042
  formatISODateValue(value) {
4039
4043
  if (value && this.isValidFormatDate(value, this.dateFormat)) {
@@ -4129,6 +4133,9 @@
4129
4133
  }
4130
4134
  }
4131
4135
  change(event, element) {
4136
+ if (this.lastChangeValue && this.lastChangeValue === this.value)
4137
+ return;
4138
+ this.lastChangeValue = this.value;
4132
4139
  super.change(event, element);
4133
4140
  this.helperValue = '';
4134
4141
  this.hint = this.previousHint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.94.2",
3
+ "version": "1.94.3",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -43,5 +43,5 @@
43
43
  "lodash.times": "4.3.*",
44
44
  "mockdate": "3.0.*"
45
45
  },
46
- "gitHead": "ac867746a5fc37e3c064682a3557387f6a051cbb"
46
+ "gitHead": "753118fca0f43c2904aba5e10d22c518a1a67339"
47
47
  }
@@ -146,5 +146,6 @@ export declare class Date extends TextInput implements IDate {
146
146
  private previousHint;
147
147
  private previousPersistentHint;
148
148
  updateHelperHint(): void;
149
+ private lastChangeValue;
149
150
  change(event?: Event, element?: any): void;
150
151
  }