@symphony-talent/component-library 4.133.0 → 4.135.0

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.
@@ -1835,28 +1835,17 @@ class InputChipsComponent {
1835
1835
  asyncValidators: this.asyncValidators
1836
1836
  }));
1837
1837
  this.form.valueChanges.subscribe(sc => {
1838
- if (this.form.controls[this.controlName].status === 'INVALID') {
1839
- for (const errorMessageKey in this.errorMessages) {
1840
- if (this.form.controls[this.controlName].errors.hasOwnProperty(errorMessageKey)) {
1841
- const lastTag = this.form.controls[this.controlName].value;
1842
- lastTag[lastTag.length - 1].hasError = true;
1843
- this.validationMessage = this.errorMessages[errorMessageKey];
1844
- }
1838
+ const chipsControl = this.form.controls[this.controlName];
1839
+ this.validationMessage = '';
1840
+ for (const errorMessageKey in this.errorMessages) {
1841
+ if (chipsControl.errors && chipsControl.errors.hasOwnProperty(errorMessageKey)) {
1842
+ this.validationMessage = this.errorMessages[errorMessageKey];
1843
+ break;
1845
1844
  }
1846
- this.canAddTag = false;
1847
- }
1848
- else {
1849
- this.canAddTag = true;
1850
1845
  }
1851
1846
  });
1852
1847
  }
1853
1848
  onAdd(event) {
1854
- // if form control has at least 1 error do not let user add new item
1855
- if (this.form.controls[this.controlErrorCount].value > 1) {
1856
- let chips = this.form.controls[this.controlName].value;
1857
- chips = chips.filter(chip => chip.value !== event.value);
1858
- this.form.controls[this.controlName].patchValue(chips);
1859
- }
1860
1849
  this.form.controls[this.controlName].updateValueAndValidity();
1861
1850
  }
1862
1851
  onRemove(event) {
@@ -9402,9 +9391,6 @@ class ReportsPageComponent {
9402
9391
  ngOnInit() {
9403
9392
  this.filteredCardList = this.model.reportsCardList;
9404
9393
  }
9405
- keywordSearch(keyword) {
9406
- this.filteredCardList = this.model.reportsCardList.filter((card) => card.title.toLowerCase().includes(keyword.toLowerCase()));
9407
- }
9408
9394
  onCardClick(card) {
9409
9395
  this.cardClicked.emit(card);
9410
9396
  }