@bnsights/bbsf-controls 1.0.174 → 1.0.176

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.
Files changed (32) hide show
  1. package/README.md +11 -1
  2. package/esm2022/lib/Shared/Models/AutocompleteOptions.mjs +16 -1
  3. package/esm2022/lib/Shared/Models/ControlOptionsBase.mjs +5 -1
  4. package/esm2022/lib/Shared/Models/DatePickerOptions.mjs +17 -1
  5. package/esm2022/lib/Shared/Models/DropdownOptions.mjs +23 -1
  6. package/esm2022/lib/Shared/Models/MultiLingualTextBoxOptions.mjs +4 -1
  7. package/esm2022/lib/Shared/Models/MultilingualControlOptionsBase.mjs +6 -1
  8. package/esm2022/lib/Shared/Models/PhoneOptions.mjs +4 -1
  9. package/esm2022/lib/Shared/Models/RadioButtonOptions.mjs +4 -1
  10. package/esm2022/lib/Shared/Models/TagsInputOptions.mjs +16 -1
  11. package/esm2022/lib/Shared/Models/TextAreaOptions.mjs +4 -1
  12. package/esm2022/lib/Shared/Models/TextBoxOptions.mjs +4 -1
  13. package/esm2022/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.mjs +8 -4
  14. package/esm2022/lib/controls/DateTimePicker/DateTimePicker.component.mjs +20 -9
  15. package/esm2022/lib/controls/DropdownList/DropdownList.component.mjs +39 -14
  16. package/esm2022/lib/controls/FileUplaod/FileUplaod.component.mjs +18 -1
  17. package/esm2022/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.mjs +29 -21
  18. package/esm2022/lib/controls/TagsInput/TagsInput.component.mjs +1 -1
  19. package/fesm2022/bnsights-bbsf-controls.mjs +200 -44
  20. package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
  21. package/lib/Shared/Models/AutocompleteOptions.d.ts +1 -0
  22. package/lib/Shared/Models/ControlOptionsBase.d.ts +4 -3
  23. package/lib/Shared/Models/DatePickerOptions.d.ts +1 -0
  24. package/lib/Shared/Models/DropdownOptions.d.ts +1 -0
  25. package/lib/Shared/Models/MultiLingualTextBoxOptions.d.ts +1 -0
  26. package/lib/Shared/Models/MultilingualControlOptionsBase.d.ts +2 -0
  27. package/lib/Shared/Models/PhoneOptions.d.ts +1 -0
  28. package/lib/Shared/Models/RadioButtonOptions.d.ts +1 -0
  29. package/lib/Shared/Models/TagsInputOptions.d.ts +1 -0
  30. package/lib/Shared/Models/TextAreaOptions.d.ts +1 -0
  31. package/lib/Shared/Models/TextBoxOptions.d.ts +1 -0
  32. package/package.json +2 -2
@@ -1085,7 +1085,7 @@ class AutocompleteTextBoxComponent {
1085
1085
  }
1086
1086
  selectEvent(item) {
1087
1087
  if (this.options.allowNewSelection == true) {
1088
- if (typeof (item) == 'object') {
1088
+ if (typeof item == 'object') {
1089
1089
  this.autoCompleteTextBoxControl.setValue(item);
1090
1090
  this.autoCompleteTextBoxControl.updateValueAndValidity();
1091
1091
  }
@@ -1098,7 +1098,9 @@ class AutocompleteTextBoxComponent {
1098
1098
  }
1099
1099
  else {
1100
1100
  if (this.autoCompleteTextBoxControl.value == item.value) {
1101
- this.autoCompleteTextBoxControl.setErrors({ errorMassage: this.utilityService.getResourceValue('NewSelectionValidationKey') });
1101
+ this.autoCompleteTextBoxControl.setErrors({
1102
+ errorMassage: this.utilityService.getResourceValue('NewSelectionValidationKey')
1103
+ });
1102
1104
  this.autoCompleteTextBoxControl.markAsTouched();
1103
1105
  this.autoCompleteTextBoxControl.invalid;
1104
1106
  return;
@@ -1107,7 +1109,9 @@ class AutocompleteTextBoxComponent {
1107
1109
  this.autoCompleteTextBoxControl.setValue(item);
1108
1110
  this.autoCompleteTextBoxControl.updateValueAndValidity();
1109
1111
  let originalValue = this.autoCompleteTextBoxControl.value;
1110
- if (this.options.patchFunction && this.options.patchPath && this.group.get(this.name).valid) {
1112
+ if (this.options.patchFunction &&
1113
+ this.options.patchPath &&
1114
+ this.group.get(this.name).valid) {
1111
1115
  this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
1112
1116
  }
1113
1117
  }
@@ -1702,10 +1706,18 @@ class DateInputComponent {
1702
1706
  }
1703
1707
  //#region events
1704
1708
  ngOnInit() {
1705
- this.textDir = this.options.forceDirection ? (this.options.forceDirection == ForceDirection.Arabic ? 'rtl' : 'ltr') : (localStorage.getItem('language') == 'ar' ? 'rtl' : 'ltr');
1706
- this.startView = (this.options.startView == StartView.MultiYear ? 'multi-year' : StartView[this.options.startView].toLowerCase());
1709
+ this.textDir = this.options.forceDirection
1710
+ ? this.options.forceDirection == ForceDirection.Arabic
1711
+ ? 'rtl'
1712
+ : 'ltr'
1713
+ : localStorage.getItem('language') == 'ar'
1714
+ ? 'rtl'
1715
+ : 'ltr';
1716
+ this.startView = (this.options.startView == StartView.MultiYear
1717
+ ? 'multi-year'
1718
+ : StartView[this.options.startView].toLowerCase());
1707
1719
  // Update the DateTimeAdapter Language with the current thread langauge
1708
- this.dateTimeAdapter.setLocale(this.utilityService.getCurrentLanguage() == "ar" ? "ar" : "en-UK");
1720
+ this.dateTimeAdapter.setLocale(this.utilityService.getCurrentLanguage() == 'ar' ? 'ar' : 'en-UK');
1709
1721
  this.controlValidationService.isCreatedBefor = false;
1710
1722
  this.group.addControl(this.options.name, new FormControl(''));
1711
1723
  this.datePickerFormControl = this.group.controls[this.options.name];
@@ -1719,7 +1731,7 @@ class DateInputComponent {
1719
1731
  }
1720
1732
  if (this.options.isRequired)
1721
1733
  this.validationRules.push(Validators.required);
1722
- if (this.options.labelKey != null && this.options.labelKey != "")
1734
+ if (this.options.labelKey != null && this.options.labelKey != '')
1723
1735
  this.options.labelValue = this.utilityService.getResourceValue(this.options.labelKey);
1724
1736
  if (this.options.isDisabled)
1725
1737
  this.datePickerFormControl.disable();
@@ -1769,8 +1781,9 @@ class DateInputComponent {
1769
1781
  }
1770
1782
  }
1771
1783
  onDateSelect(item) {
1772
- if (!item)
1784
+ if (!item) {
1773
1785
  return;
1786
+ }
1774
1787
  let dateValue = new Date(item.value);
1775
1788
  // var tzOffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
1776
1789
  if (this.options.selectMode == SelectMode.Range) {
@@ -1786,7 +1799,9 @@ class DateInputComponent {
1786
1799
  this.datePickerFormControl.setValue(dateValue);
1787
1800
  this.onChangeService.ChangeValue(this.options.name);
1788
1801
  let originalValue = dateValue;
1789
- if (this.options.patchFunction && this.options.patchPath && this.group.get(this.options.name).valid) {
1802
+ if (this.options.patchFunction &&
1803
+ this.options.patchPath &&
1804
+ this.group.get(this.options.name).valid) {
1790
1805
  this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
1791
1806
  }
1792
1807
  //Use this line to enable two way binding.
@@ -1796,11 +1811,11 @@ class DateInputComponent {
1796
1811
  subscribeDateChanges() {
1797
1812
  const startDateChanges = this.comparedControl.valueChanges;
1798
1813
  const endDateChanges = this.group.get(this.options.name).valueChanges;
1799
- startDateChanges.subscribe(start => {
1814
+ startDateChanges.subscribe((start) => {
1800
1815
  this.comparedControl.addValidators(this.checkIfStartDateBeForEndDate);
1801
1816
  this.comparedControl.updateValueAndValidity();
1802
1817
  });
1803
- endDateChanges.subscribe(end => {
1818
+ endDateChanges.subscribe((end) => {
1804
1819
  this.datePickerFormControl.addValidators(this.checkIfEndDateAfterStartDate);
1805
1820
  this.datePickerFormControl.updateValueAndValidity();
1806
1821
  });
@@ -1899,7 +1914,7 @@ class DropdownListComponent {
1899
1914
  this.SelectedList = this.options.selectedItems;
1900
1915
  this.dropdownSettings = {
1901
1916
  singleSelection: this.options.singleSelection,
1902
- text: "Select",
1917
+ text: 'Select',
1903
1918
  selectAllText: 'Select All',
1904
1919
  unSelectAllText: 'UnSelect All',
1905
1920
  enableSearchFilter: this.options.allowSearchFilter,
@@ -1912,8 +1927,8 @@ class DropdownListComponent {
1912
1927
  showSelectedItemsAtTop: true,
1913
1928
  limitSelection: this.options.limitSelection,
1914
1929
  searchPlaceholderText: this.options.placeholder,
1915
- labelKey: "value",
1916
- primaryKey: "key"
1930
+ labelKey: 'value',
1931
+ primaryKey: 'key'
1917
1932
  };
1918
1933
  this.group.addControl(this.options.name, new FormControl(''));
1919
1934
  this.dropdownListFormControl = this.group.controls[this.options.name]; // new FormControl('',validationRules);
@@ -1929,7 +1944,7 @@ class DropdownListComponent {
1929
1944
  if (this.options.isRequired) {
1930
1945
  this.validationRules.push(Validators.required);
1931
1946
  }
1932
- if (this.options.labelKey != null && this.options.labelKey != "")
1947
+ if (this.options.labelKey != null && this.options.labelKey != '')
1933
1948
  this.options.labelValue = this.utilityService.getResourceValue(this.options.labelKey);
1934
1949
  this.dropdownListFormControl.setValidators(this.validationRules);
1935
1950
  this.dropdownListFormControl.setAsyncValidators(this.validationRulesasync);
@@ -1956,10 +1971,23 @@ class DropdownListComponent {
1956
1971
  }
1957
1972
  getSelectedItemValue() {
1958
1973
  if (this.options.selectedItems) {
1959
- if (this.options.singleSelection)
1960
- return this.options.dataSource.filter(item => item[this.options.itemTempletkey] == this.options.selectedItems)[0][this.options.itemTempletvalue];
1961
- else
1962
- return this.options.dataSource.filter(item => this.options.selectedItems.includes(item[this.options.itemTempletkey])).map(item => item[this.options.itemTempletvalue]);
1974
+ if (this.options.singleSelection) {
1975
+ // Handle single selection - selectedItems could be a string or array with one item
1976
+ const selectedItem = Array.isArray(this.options.selectedItems)
1977
+ ? this.options.selectedItems[0]
1978
+ : this.options.selectedItems;
1979
+ const foundItem = this.options.dataSource.find((item) => item[this.options.itemTempletkey] == selectedItem);
1980
+ return foundItem ? foundItem[this.options.itemTempletvalue] : '';
1981
+ }
1982
+ else {
1983
+ // Handle multiple selection - ensure selectedItems is treated as array
1984
+ const itemsArray = Array.isArray(this.options.selectedItems)
1985
+ ? this.options.selectedItems
1986
+ : [this.options.selectedItems];
1987
+ return this.options.dataSource
1988
+ .filter((item) => itemsArray.includes(item[this.options.itemTempletkey]))
1989
+ .map((item) => item[this.options.itemTempletvalue]);
1990
+ }
1963
1991
  }
1964
1992
  else
1965
1993
  return this.utilityService.getResourceValue('NA');
@@ -1967,14 +1995,18 @@ class DropdownListComponent {
1967
1995
  onItemSelect() {
1968
1996
  this.onChangeService.ChangeValue(this.options.name);
1969
1997
  let originalValue = this.options.selectedItems;
1970
- if (this.options.patchFunction && this.options.patchPath && this.group.get(this.options.name).valid) {
1998
+ if (this.options.patchFunction &&
1999
+ this.options.patchPath &&
2000
+ this.group.get(this.options.name).valid) {
1971
2001
  this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
1972
2002
  }
1973
2003
  this.onChange.emit(originalValue);
1974
2004
  //console.log(this.dropdownListFormControl.value)
1975
2005
  }
1976
2006
  Clear() {
1977
- //console.log("Clear")
2007
+ // Clear the selected items
2008
+ this.selectedItems = [];
2009
+ this.options.selectedItems = null;
1978
2010
  this.dropdownListFormControl.setValue(this.selectedItems);
1979
2011
  this.onChangeService.ChangeValue(this.options.name);
1980
2012
  this.onChange.emit();
@@ -1990,21 +2022,29 @@ class DropdownListComponent {
1990
2022
  this.dropdownListFormControl.setValue(this.selectedItems);
1991
2023
  }
1992
2024
  onDeselect(items) {
2025
+ // If no items are selected after deselect, clear options.selectedItems
2026
+ if (this.selectedItems.length == 0) {
2027
+ this.options.selectedItems = null;
2028
+ }
1993
2029
  this.dropdownListFormControl.setValue(this.selectedItems);
1994
- if ((this.selectedItems.length == 0) && this.options.isRequired == true) {
2030
+ if (this.selectedItems.length == 0 && this.options.isRequired == true) {
1995
2031
  this.dropdownListFormControl.markAsTouched();
1996
2032
  this.dropdownListFormControl.invalid;
1997
2033
  }
1998
2034
  }
1999
2035
  onDeselectAll(items) {
2036
+ // Clear the selected items when all are deselected
2037
+ this.selectedItems = [];
2038
+ this.options.selectedItems = null;
2000
2039
  this.dropdownListFormControl.setValue(this.selectedItems);
2001
- if ((this.selectedItems.length == 0) && this.options.isRequired == true) {
2040
+ if (this.selectedItems.length == 0 && this.options.isRequired == true) {
2002
2041
  this.dropdownListFormControl.markAsTouched();
2003
2042
  this.dropdownListFormControl.invalid;
2004
2043
  }
2005
2044
  }
2006
2045
  onDropDownClose() {
2007
- if ((this.selectedItems == undefined || this.selectedItems.length == 0) && this.options.isRequired == true) {
2046
+ if ((this.selectedItems == undefined || this.selectedItems.length == 0) &&
2047
+ this.options.isRequired == true) {
2008
2048
  this.dropdownListFormControl.markAsTouched();
2009
2049
  this.dropdownListFormControl.invalid;
2010
2050
  }
@@ -2302,6 +2342,11 @@ class FileUploadComponent {
2302
2342
  this.validationMessage +
2303
2343
  `<br /> ${this.UtilityService.getResourceValue('MinFileCountValidationKey') + this.options.minNoOfFiles}`;
2304
2344
  }
2345
+ if (this.options.maxNoOfFiles > 0) {
2346
+ this.validationMessage =
2347
+ this.validationMessage +
2348
+ `<br /> ${this.UtilityService.getResourceValue('MaxFileCountValidationKey') + this.options.maxNoOfFiles}`;
2349
+ }
2305
2350
  if (this.options.fileUploadAcceptsTypes != null &&
2306
2351
  this.options.fileUploadAcceptsTypes.length > 0) {
2307
2352
  }
@@ -2381,6 +2426,18 @@ class FileUploadComponent {
2381
2426
  this.uploader.queue = [];
2382
2427
  return;
2383
2428
  }
2429
+ if (this.options.isMultipleFile &&
2430
+ this.options.maxNoOfFiles != null &&
2431
+ this.options.maxNoOfFiles > 0 &&
2432
+ this.options.maxNoOfFiles < this.uploader.queue.length) {
2433
+ const formControl = this.fileUploadFormControl;
2434
+ formControl.setErrors({
2435
+ MaxFileCountValidationKey: this.options.maxNoOfFiles
2436
+ });
2437
+ formControl.markAsTouched();
2438
+ this.uploader.queue = [];
2439
+ return;
2440
+ }
2384
2441
  if (this.options.isMultipleFile &&
2385
2442
  this.options.maxSizeForAllFilesInMB != null &&
2386
2443
  this.options.maxSizeForAllFilesInMB > 0) {
@@ -4766,21 +4823,23 @@ class MultiLingualTextBoxComponent {
4766
4823
  }
4767
4824
  onTextChange() {
4768
4825
  // this.trimControlValue(type)
4769
- let arabicValue = "";
4770
- let englishValue = "";
4771
- if (this.englishFormControl.value == "") {
4826
+ let arabicValue = '';
4827
+ let englishValue = '';
4828
+ if (this.englishFormControl.value == '') {
4772
4829
  this.englishWordCountArray = 0;
4773
4830
  this.englishWordCount = 0;
4774
4831
  }
4775
4832
  else {
4776
4833
  if (this.englishFormControl.value != null && this.englishFormControl.value != undefined) {
4777
- this.englishWordCountArray = this.englishFormControl.value.split(" ").length;
4834
+ this.englishWordCountArray = this.englishFormControl.value.split(' ').length;
4778
4835
  if (this.englishWordCountArray > 0) {
4779
4836
  if (this.englishWordCountArray > this.options.maxWordCount) {
4780
4837
  this.englishWordCount = this.options.maxWordCount;
4781
- this.multiLanguageGroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.maxWordCount });
4782
- this.multiLanguageGroup.controls["English"].markAsTouched();
4783
- this.multiLanguageGroup.controls["English"].invalid;
4838
+ this.multiLanguageGroup.controls['English'].setErrors({
4839
+ MaxWordCountValidationKey: this.options.maxWordCount
4840
+ });
4841
+ this.multiLanguageGroup.controls['English'].markAsTouched();
4842
+ this.multiLanguageGroup.controls['English'].invalid;
4784
4843
  }
4785
4844
  else {
4786
4845
  this.englishWordCount = this.englishWordCountArray;
@@ -4796,9 +4855,9 @@ class MultiLingualTextBoxComponent {
4796
4855
  this.showEnglishCharsLimitMsg = true;
4797
4856
  this.hasEnglishCharsLimitValidationError = true;
4798
4857
  if (this.englishCurrentCharsCount == this.options.maxLength)
4799
- this.englishCharsLimitMsgClass = "danger";
4858
+ this.englishCharsLimitMsgClass = 'danger';
4800
4859
  else
4801
- this.englishCharsLimitMsgClass = "warning";
4860
+ this.englishCharsLimitMsgClass = 'warning';
4802
4861
  }
4803
4862
  else {
4804
4863
  this.showEnglishCharsLimitMsg = false;
@@ -4806,24 +4865,28 @@ class MultiLingualTextBoxComponent {
4806
4865
  }
4807
4866
  let max = this.options.maxLength;
4808
4867
  let current = this.englishCurrentCharsCount;
4809
- let msg = this.utilityService.getResourceValue("MaxLengthLimitWarning");
4868
+ let msg = this.utilityService.getResourceValue('MaxLengthLimitWarning');
4810
4869
  // Replace placeholders with actual values
4811
- this.englishMaxLimitWarningMsg = msg.replace("${max}", max.toString()).replace("${current}", current.toString());
4870
+ this.englishMaxLimitWarningMsg = msg
4871
+ .replace('${max}', max.toString())
4872
+ .replace('${current}', current.toString());
4812
4873
  }
4813
4874
  }
4814
- if (this.arabicFormControl.value == "") {
4875
+ if (this.arabicFormControl.value == '') {
4815
4876
  this.arabicWordCountArray = 0;
4816
4877
  this.arabicWordCount = 0;
4817
4878
  }
4818
4879
  else {
4819
4880
  if (this.arabicFormControl.value != null && this.arabicFormControl.value != undefined) {
4820
- this.arabicWordCountArray = this.arabicFormControl.value.split(" ").length;
4881
+ this.arabicWordCountArray = this.arabicFormControl.value.split(' ').length;
4821
4882
  if (this.arabicWordCountArray > 0) {
4822
4883
  if (this.arabicWordCountArray > this.options.maxWordCount) {
4823
4884
  this.arabicWordCount = this.options.maxWordCount;
4824
- this.multiLanguageGroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.maxWordCount });
4825
- this.multiLanguageGroup.controls["Arabic"].markAsTouched();
4826
- this.multiLanguageGroup.controls["Arabic"].invalid;
4885
+ this.multiLanguageGroup.controls['Arabic'].setErrors({
4886
+ MaxWordCountValidationKey: this.options.maxWordCount
4887
+ });
4888
+ this.multiLanguageGroup.controls['Arabic'].markAsTouched();
4889
+ this.multiLanguageGroup.controls['Arabic'].invalid;
4827
4890
  }
4828
4891
  else {
4829
4892
  this.arabicWordCount = this.arabicWordCountArray;
@@ -4839,9 +4902,9 @@ class MultiLingualTextBoxComponent {
4839
4902
  this.showArabicCharsLimitMsg = true;
4840
4903
  this.hasArabicCharsLimitValidationError = true;
4841
4904
  if (this.arabicCurrentCharsCount == this.options.maxLength)
4842
- this.arabicCharsLimitMsgClass = "danger";
4905
+ this.arabicCharsLimitMsgClass = 'danger';
4843
4906
  else
4844
- this.arabicCharsLimitMsgClass = "warning";
4907
+ this.arabicCharsLimitMsgClass = 'warning';
4845
4908
  }
4846
4909
  else {
4847
4910
  this.showArabicCharsLimitMsg = false;
@@ -4849,9 +4912,11 @@ class MultiLingualTextBoxComponent {
4849
4912
  }
4850
4913
  let max = this.options.maxLength;
4851
4914
  let current = this.arabicCurrentCharsCount;
4852
- let msg = this.utilityService.getResourceValue("MaxLengthLimitWarning");
4915
+ let msg = this.utilityService.getResourceValue('MaxLengthLimitWarning');
4853
4916
  // Replace placeholders with actual values
4854
- this.arabicMaxLimitWarningMsg = msg.replace("${max}", max.toString()).replace("${current}", current.toString());
4917
+ this.arabicMaxLimitWarningMsg = msg
4918
+ .replace('${max}', max.toString())
4919
+ .replace('${current}', current.toString());
4855
4920
  }
4856
4921
  }
4857
4922
  let multiLangModel = new EnglishArabicDTO();
@@ -7299,6 +7364,10 @@ class ControlOptionsBase {
7299
7364
  /** Sets an attribute readonly */
7300
7365
  this.isReadonly = false;
7301
7366
  }
7367
+ get displayValue() {
7368
+ // Default implementation - override in components
7369
+ return null;
7370
+ }
7302
7371
  }
7303
7372
 
7304
7373
  class DatePickerOptions extends ControlOptionsBase {
@@ -7319,6 +7388,21 @@ class DatePickerOptions extends ControlOptionsBase {
7319
7388
  this.startControlToCompareWith = null;
7320
7389
  this.validationClasses = null;
7321
7390
  }
7391
+ get displayValue() {
7392
+ if (!this.value) {
7393
+ return "";
7394
+ }
7395
+ // Format displayValue to DD-MM-YYYY
7396
+ if (this.selectMode == SelectMode.Range && Array.isArray(this.value)) {
7397
+ // For date range, format both dates
7398
+ const formattedDates = this.value.map(date => moment(date).format('DD-MM-YYYY'));
7399
+ return formattedDates.join(' - ');
7400
+ }
7401
+ else {
7402
+ // For single date
7403
+ return moment(this.value).format('DD-MM-YYYY');
7404
+ }
7405
+ }
7322
7406
  }
7323
7407
 
7324
7408
  class DropdownOptions extends ControlOptionsBase {
@@ -7333,6 +7417,28 @@ class DropdownOptions extends ControlOptionsBase {
7333
7417
  this.forceDirection = ForceDirection.English;
7334
7418
  this.notFoundText = "";
7335
7419
  }
7420
+ get displayValue() {
7421
+ let result = "";
7422
+ if (this.selectedItems) {
7423
+ // Handle case where selectedItems could be a single string or an array of strings
7424
+ const itemsArray = Array.isArray(this.selectedItems)
7425
+ ? this.selectedItems
7426
+ : [this.selectedItems];
7427
+ // Only process if the array is not empty
7428
+ if (itemsArray.length > 0) {
7429
+ itemsArray.forEach((item, index) => {
7430
+ const foundItem = this.dataSource?.find((i) => i.key == item);
7431
+ if (foundItem) {
7432
+ result += foundItem.value;
7433
+ if (index < itemsArray.length - 1) {
7434
+ result += ',';
7435
+ }
7436
+ }
7437
+ });
7438
+ }
7439
+ }
7440
+ return result;
7441
+ }
7336
7442
  }
7337
7443
 
7338
7444
  class FileUploadOptions extends ControlOptionsBase {
@@ -7399,6 +7505,9 @@ class PhoneOptions extends ControlOptionsBase {
7399
7505
  this.onlyCountries = [];
7400
7506
  this.forceDirection = ForceDirection.English;
7401
7507
  }
7508
+ get displayValue() {
7509
+ return this.value;
7510
+ }
7402
7511
  }
7403
7512
 
7404
7513
  class RangeNumber {
@@ -7417,6 +7526,9 @@ class TextAreaOptions extends ControlOptionsBase {
7417
7526
  //Enable auto save speech language into local storage
7418
7527
  this.autoSaveSpeechLanguagetoLocalStorage = true;
7419
7528
  }
7529
+ get displayValue() {
7530
+ return this.value;
7531
+ }
7420
7532
  }
7421
7533
 
7422
7534
  class TextBoxOptions extends ControlOptionsBase {
@@ -7436,6 +7548,9 @@ class TextBoxOptions extends ControlOptionsBase {
7436
7548
  this.noMargin = false;
7437
7549
  this.validationRules = [];
7438
7550
  }
7551
+ get displayValue() {
7552
+ return this.value;
7553
+ }
7439
7554
  }
7440
7555
 
7441
7556
  class ToggleSlideOptions extends ControlOptionsBase {
@@ -9570,6 +9685,11 @@ class MultilingualControlOptionsBase {
9570
9685
  /** Sets an attribute readonly */
9571
9686
  this.isReadonly = false;
9572
9687
  }
9688
+ /** Sets an display value */
9689
+ get displayValue() {
9690
+ // Default implementation - override in components
9691
+ return null;
9692
+ }
9573
9693
  }
9574
9694
 
9575
9695
  class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
@@ -9582,6 +9702,9 @@ class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
9582
9702
  /**Prevent AutoComplete of inputs default value is "on" available values "on" and "off"*/
9583
9703
  this.autoComplete = "on";
9584
9704
  }
9705
+ get displayValue() {
9706
+ return this.value;
9707
+ }
9585
9708
  }
9586
9709
 
9587
9710
  class Attribute {
@@ -9705,6 +9828,21 @@ class AutocompleteOptions extends ControlOptionsBase {
9705
9828
  this.selectedValue = null;
9706
9829
  this.itemWithImage = false;
9707
9830
  }
9831
+ get displayValue() {
9832
+ let result = "";
9833
+ if (this.value && Array.isArray(this.value)) {
9834
+ const displayValues = this.value;
9835
+ displayValues.forEach((element, index) => {
9836
+ if (element && element.Value) {
9837
+ result += element.Value;
9838
+ if (index < displayValues.length - 1) {
9839
+ result += ',';
9840
+ }
9841
+ }
9842
+ });
9843
+ }
9844
+ return result;
9845
+ }
9708
9846
  }
9709
9847
 
9710
9848
  class TagsInputDTO {
@@ -9746,6 +9884,21 @@ class TagsInputOptions extends ControlOptionsBase {
9746
9884
  this.tagInputMode = TagInputView.WithoutImage;
9747
9885
  this.showDescription = true;
9748
9886
  }
9887
+ get displayValue() {
9888
+ let result = "";
9889
+ if (this.value && Array.isArray(this.value)) {
9890
+ const displayValues = this.value;
9891
+ displayValues.forEach((tag, index) => {
9892
+ if (tag && tag.name) {
9893
+ result += tag.name;
9894
+ if (index < displayValues.length - 1) {
9895
+ result += ',';
9896
+ }
9897
+ }
9898
+ });
9899
+ }
9900
+ return result;
9901
+ }
9749
9902
  }
9750
9903
 
9751
9904
  class FilterItem {
@@ -9805,6 +9958,9 @@ class PagingOptions {
9805
9958
  }
9806
9959
 
9807
9960
  class RadioButtonOptions extends ControlOptionsBase {
9961
+ get displayValue() {
9962
+ return this.value;
9963
+ }
9808
9964
  }
9809
9965
 
9810
9966
  class RadioButtonItem {