@zeedhi/common 1.91.2 → 1.91.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.
@@ -3892,6 +3892,7 @@ class Date$1 extends TextInput {
3892
3892
  this.parserFn = FormatterParserProvider.getParser('ZdDate');
3893
3893
  this.previousHint = '';
3894
3894
  this.previousPersistentHint = false;
3895
+ this.lastChangeValue = null;
3895
3896
  this.allowedDates = this.getInitValue('allowedDates', props.allowedDates, this.allowedDates);
3896
3897
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3897
3898
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
@@ -4022,8 +4023,11 @@ class Date$1 extends TextInput {
4022
4023
  return this.formatISODateValue(this.value);
4023
4024
  }
4024
4025
  set isoValue(newValue) {
4026
+ const lastValue = this.value;
4025
4027
  this.dateError = false;
4026
4028
  this.value = this.parseISODateValue(newValue);
4029
+ if (lastValue !== this.value)
4030
+ this.change(this.value);
4027
4031
  }
4028
4032
  formatISODateValue(value) {
4029
4033
  if (value && this.isValidFormatDate(value, this.dateFormat)) {
@@ -4119,6 +4123,9 @@ class Date$1 extends TextInput {
4119
4123
  }
4120
4124
  }
4121
4125
  change(event, element) {
4126
+ if (this.lastChangeValue && this.lastChangeValue === this.value)
4127
+ return;
4128
+ this.lastChangeValue = this.value;
4122
4129
  super.change(event, element);
4123
4130
  this.helperValue = '';
4124
4131
  this.hint = this.previousHint;
@@ -3899,6 +3899,7 @@
3899
3899
  this.parserFn = core.FormatterParserProvider.getParser('ZdDate');
3900
3900
  this.previousHint = '';
3901
3901
  this.previousPersistentHint = false;
3902
+ this.lastChangeValue = null;
3902
3903
  this.allowedDates = this.getInitValue('allowedDates', props.allowedDates, this.allowedDates);
3903
3904
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3904
3905
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
@@ -4029,8 +4030,11 @@
4029
4030
  return this.formatISODateValue(this.value);
4030
4031
  }
4031
4032
  set isoValue(newValue) {
4033
+ const lastValue = this.value;
4032
4034
  this.dateError = false;
4033
4035
  this.value = this.parseISODateValue(newValue);
4036
+ if (lastValue !== this.value)
4037
+ this.change(this.value);
4034
4038
  }
4035
4039
  formatISODateValue(value) {
4036
4040
  if (value && this.isValidFormatDate(value, this.dateFormat)) {
@@ -4126,6 +4130,9 @@
4126
4130
  }
4127
4131
  }
4128
4132
  change(event, element) {
4133
+ if (this.lastChangeValue && this.lastChangeValue === this.value)
4134
+ return;
4135
+ this.lastChangeValue = this.value;
4129
4136
  super.change(event, element);
4130
4137
  this.helperValue = '';
4131
4138
  this.hint = this.previousHint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.91.2",
3
+ "version": "1.91.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": "ba4045b276a62a57f59620b9c57f53b45aa4d4db"
46
+ "gitHead": "4c5ec4fb5580555abebb5661018894a493e8b5b2"
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
  }