@bnsights/bbsf-controls 1.0.171 → 1.0.173

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 (33) hide show
  1. package/README.md +10 -0
  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 +47 -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 +208 -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/lib/controls/DropdownList/DropdownList.component.d.ts +4 -2
  33. package/package.json +1 -1
@@ -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);
@@ -1940,6 +1955,14 @@ class DropdownListComponent {
1940
1955
  this.group.markAllAsTouched();
1941
1956
  this.markAllAsTouched = true;
1942
1957
  });
1958
+ // Initialize previous selectedItems for change detection
1959
+ this.previousSelectedItems = this.options.selectedItems;
1960
+ }
1961
+ ngDoCheck() {
1962
+ // Check if selectedItems has changed
1963
+ if (this.options && this.options.selectedItems !== this.previousSelectedItems) {
1964
+ this.previousSelectedItems = this.options.selectedItems;
1965
+ }
1943
1966
  }
1944
1967
  ngAfterViewInit() {
1945
1968
  this.controlUtility.setAttributeForControl(this.options);
@@ -1956,10 +1979,23 @@ class DropdownListComponent {
1956
1979
  }
1957
1980
  getSelectedItemValue() {
1958
1981
  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]);
1982
+ if (this.options.singleSelection) {
1983
+ // Handle single selection - selectedItems could be a string or array with one item
1984
+ const selectedItem = Array.isArray(this.options.selectedItems)
1985
+ ? this.options.selectedItems[0]
1986
+ : this.options.selectedItems;
1987
+ const foundItem = this.options.dataSource.find((item) => item[this.options.itemTempletkey] == selectedItem);
1988
+ return foundItem ? foundItem[this.options.itemTempletvalue] : '';
1989
+ }
1990
+ else {
1991
+ // Handle multiple selection - ensure selectedItems is treated as array
1992
+ const itemsArray = Array.isArray(this.options.selectedItems)
1993
+ ? this.options.selectedItems
1994
+ : [this.options.selectedItems];
1995
+ return this.options.dataSource
1996
+ .filter((item) => itemsArray.includes(item[this.options.itemTempletkey]))
1997
+ .map((item) => item[this.options.itemTempletvalue]);
1998
+ }
1963
1999
  }
1964
2000
  else
1965
2001
  return this.utilityService.getResourceValue('NA');
@@ -1967,14 +2003,18 @@ class DropdownListComponent {
1967
2003
  onItemSelect() {
1968
2004
  this.onChangeService.ChangeValue(this.options.name);
1969
2005
  let originalValue = this.options.selectedItems;
1970
- if (this.options.patchFunction && this.options.patchPath && this.group.get(this.options.name).valid) {
2006
+ if (this.options.patchFunction &&
2007
+ this.options.patchPath &&
2008
+ this.group.get(this.options.name).valid) {
1971
2009
  this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
1972
2010
  }
1973
2011
  this.onChange.emit(originalValue);
1974
2012
  //console.log(this.dropdownListFormControl.value)
1975
2013
  }
1976
2014
  Clear() {
1977
- //console.log("Clear")
2015
+ // Clear the selected items
2016
+ this.selectedItems = [];
2017
+ this.options.selectedItems = null;
1978
2018
  this.dropdownListFormControl.setValue(this.selectedItems);
1979
2019
  this.onChangeService.ChangeValue(this.options.name);
1980
2020
  this.onChange.emit();
@@ -1990,21 +2030,29 @@ class DropdownListComponent {
1990
2030
  this.dropdownListFormControl.setValue(this.selectedItems);
1991
2031
  }
1992
2032
  onDeselect(items) {
2033
+ // If no items are selected after deselect, clear options.selectedItems
2034
+ if (this.selectedItems.length == 0) {
2035
+ this.options.selectedItems = null;
2036
+ }
1993
2037
  this.dropdownListFormControl.setValue(this.selectedItems);
1994
- if ((this.selectedItems.length == 0) && this.options.isRequired == true) {
2038
+ if (this.selectedItems.length == 0 && this.options.isRequired == true) {
1995
2039
  this.dropdownListFormControl.markAsTouched();
1996
2040
  this.dropdownListFormControl.invalid;
1997
2041
  }
1998
2042
  }
1999
2043
  onDeselectAll(items) {
2044
+ // Clear the selected items when all are deselected
2045
+ this.selectedItems = [];
2046
+ this.options.selectedItems = null;
2000
2047
  this.dropdownListFormControl.setValue(this.selectedItems);
2001
- if ((this.selectedItems.length == 0) && this.options.isRequired == true) {
2048
+ if (this.selectedItems.length == 0 && this.options.isRequired == true) {
2002
2049
  this.dropdownListFormControl.markAsTouched();
2003
2050
  this.dropdownListFormControl.invalid;
2004
2051
  }
2005
2052
  }
2006
2053
  onDropDownClose() {
2007
- if ((this.selectedItems == undefined || this.selectedItems.length == 0) && this.options.isRequired == true) {
2054
+ if ((this.selectedItems == undefined || this.selectedItems.length == 0) &&
2055
+ this.options.isRequired == true) {
2008
2056
  this.dropdownListFormControl.markAsTouched();
2009
2057
  this.dropdownListFormControl.invalid;
2010
2058
  }
@@ -2302,6 +2350,11 @@ class FileUploadComponent {
2302
2350
  this.validationMessage +
2303
2351
  `<br /> ${this.UtilityService.getResourceValue('MinFileCountValidationKey') + this.options.minNoOfFiles}`;
2304
2352
  }
2353
+ if (this.options.maxNoOfFiles > 0) {
2354
+ this.validationMessage =
2355
+ this.validationMessage +
2356
+ `<br /> ${this.UtilityService.getResourceValue('MaxFileCountValidationKey') + this.options.maxNoOfFiles}`;
2357
+ }
2305
2358
  if (this.options.fileUploadAcceptsTypes != null &&
2306
2359
  this.options.fileUploadAcceptsTypes.length > 0) {
2307
2360
  }
@@ -2381,6 +2434,18 @@ class FileUploadComponent {
2381
2434
  this.uploader.queue = [];
2382
2435
  return;
2383
2436
  }
2437
+ if (this.options.isMultipleFile &&
2438
+ this.options.maxNoOfFiles != null &&
2439
+ this.options.maxNoOfFiles > 0 &&
2440
+ this.options.maxNoOfFiles < this.uploader.queue.length) {
2441
+ const formControl = this.fileUploadFormControl;
2442
+ formControl.setErrors({
2443
+ MaxFileCountValidationKey: this.options.maxNoOfFiles
2444
+ });
2445
+ formControl.markAsTouched();
2446
+ this.uploader.queue = [];
2447
+ return;
2448
+ }
2384
2449
  if (this.options.isMultipleFile &&
2385
2450
  this.options.maxSizeForAllFilesInMB != null &&
2386
2451
  this.options.maxSizeForAllFilesInMB > 0) {
@@ -4766,21 +4831,23 @@ class MultiLingualTextBoxComponent {
4766
4831
  }
4767
4832
  onTextChange() {
4768
4833
  // this.trimControlValue(type)
4769
- let arabicValue = "";
4770
- let englishValue = "";
4771
- if (this.englishFormControl.value == "") {
4834
+ let arabicValue = '';
4835
+ let englishValue = '';
4836
+ if (this.englishFormControl.value == '') {
4772
4837
  this.englishWordCountArray = 0;
4773
4838
  this.englishWordCount = 0;
4774
4839
  }
4775
4840
  else {
4776
4841
  if (this.englishFormControl.value != null && this.englishFormControl.value != undefined) {
4777
- this.englishWordCountArray = this.englishFormControl.value.split(" ").length;
4842
+ this.englishWordCountArray = this.englishFormControl.value.split(' ').length;
4778
4843
  if (this.englishWordCountArray > 0) {
4779
4844
  if (this.englishWordCountArray > this.options.maxWordCount) {
4780
4845
  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;
4846
+ this.multiLanguageGroup.controls['English'].setErrors({
4847
+ MaxWordCountValidationKey: this.options.maxWordCount
4848
+ });
4849
+ this.multiLanguageGroup.controls['English'].markAsTouched();
4850
+ this.multiLanguageGroup.controls['English'].invalid;
4784
4851
  }
4785
4852
  else {
4786
4853
  this.englishWordCount = this.englishWordCountArray;
@@ -4796,9 +4863,9 @@ class MultiLingualTextBoxComponent {
4796
4863
  this.showEnglishCharsLimitMsg = true;
4797
4864
  this.hasEnglishCharsLimitValidationError = true;
4798
4865
  if (this.englishCurrentCharsCount == this.options.maxLength)
4799
- this.englishCharsLimitMsgClass = "danger";
4866
+ this.englishCharsLimitMsgClass = 'danger';
4800
4867
  else
4801
- this.englishCharsLimitMsgClass = "warning";
4868
+ this.englishCharsLimitMsgClass = 'warning';
4802
4869
  }
4803
4870
  else {
4804
4871
  this.showEnglishCharsLimitMsg = false;
@@ -4806,24 +4873,28 @@ class MultiLingualTextBoxComponent {
4806
4873
  }
4807
4874
  let max = this.options.maxLength;
4808
4875
  let current = this.englishCurrentCharsCount;
4809
- let msg = this.utilityService.getResourceValue("MaxLengthLimitWarning");
4876
+ let msg = this.utilityService.getResourceValue('MaxLengthLimitWarning');
4810
4877
  // Replace placeholders with actual values
4811
- this.englishMaxLimitWarningMsg = msg.replace("${max}", max.toString()).replace("${current}", current.toString());
4878
+ this.englishMaxLimitWarningMsg = msg
4879
+ .replace('${max}', max.toString())
4880
+ .replace('${current}', current.toString());
4812
4881
  }
4813
4882
  }
4814
- if (this.arabicFormControl.value == "") {
4883
+ if (this.arabicFormControl.value == '') {
4815
4884
  this.arabicWordCountArray = 0;
4816
4885
  this.arabicWordCount = 0;
4817
4886
  }
4818
4887
  else {
4819
4888
  if (this.arabicFormControl.value != null && this.arabicFormControl.value != undefined) {
4820
- this.arabicWordCountArray = this.arabicFormControl.value.split(" ").length;
4889
+ this.arabicWordCountArray = this.arabicFormControl.value.split(' ').length;
4821
4890
  if (this.arabicWordCountArray > 0) {
4822
4891
  if (this.arabicWordCountArray > this.options.maxWordCount) {
4823
4892
  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;
4893
+ this.multiLanguageGroup.controls['Arabic'].setErrors({
4894
+ MaxWordCountValidationKey: this.options.maxWordCount
4895
+ });
4896
+ this.multiLanguageGroup.controls['Arabic'].markAsTouched();
4897
+ this.multiLanguageGroup.controls['Arabic'].invalid;
4827
4898
  }
4828
4899
  else {
4829
4900
  this.arabicWordCount = this.arabicWordCountArray;
@@ -4839,9 +4910,9 @@ class MultiLingualTextBoxComponent {
4839
4910
  this.showArabicCharsLimitMsg = true;
4840
4911
  this.hasArabicCharsLimitValidationError = true;
4841
4912
  if (this.arabicCurrentCharsCount == this.options.maxLength)
4842
- this.arabicCharsLimitMsgClass = "danger";
4913
+ this.arabicCharsLimitMsgClass = 'danger';
4843
4914
  else
4844
- this.arabicCharsLimitMsgClass = "warning";
4915
+ this.arabicCharsLimitMsgClass = 'warning';
4845
4916
  }
4846
4917
  else {
4847
4918
  this.showArabicCharsLimitMsg = false;
@@ -4849,9 +4920,11 @@ class MultiLingualTextBoxComponent {
4849
4920
  }
4850
4921
  let max = this.options.maxLength;
4851
4922
  let current = this.arabicCurrentCharsCount;
4852
- let msg = this.utilityService.getResourceValue("MaxLengthLimitWarning");
4923
+ let msg = this.utilityService.getResourceValue('MaxLengthLimitWarning');
4853
4924
  // Replace placeholders with actual values
4854
- this.arabicMaxLimitWarningMsg = msg.replace("${max}", max.toString()).replace("${current}", current.toString());
4925
+ this.arabicMaxLimitWarningMsg = msg
4926
+ .replace('${max}', max.toString())
4927
+ .replace('${current}', current.toString());
4855
4928
  }
4856
4929
  }
4857
4930
  let multiLangModel = new EnglishArabicDTO();
@@ -7299,6 +7372,10 @@ class ControlOptionsBase {
7299
7372
  /** Sets an attribute readonly */
7300
7373
  this.isReadonly = false;
7301
7374
  }
7375
+ get displayValue() {
7376
+ // Default implementation - override in components
7377
+ return null;
7378
+ }
7302
7379
  }
7303
7380
 
7304
7381
  class DatePickerOptions extends ControlOptionsBase {
@@ -7319,6 +7396,21 @@ class DatePickerOptions extends ControlOptionsBase {
7319
7396
  this.startControlToCompareWith = null;
7320
7397
  this.validationClasses = null;
7321
7398
  }
7399
+ get displayValue() {
7400
+ if (!this.value) {
7401
+ return "";
7402
+ }
7403
+ // Format displayValue to DD-MM-YYYY
7404
+ if (this.selectMode == SelectMode.Range && Array.isArray(this.value)) {
7405
+ // For date range, format both dates
7406
+ const formattedDates = this.value.map(date => moment(date).format('DD-MM-YYYY'));
7407
+ return formattedDates.join(' - ');
7408
+ }
7409
+ else {
7410
+ // For single date
7411
+ return moment(this.value).format('DD-MM-YYYY');
7412
+ }
7413
+ }
7322
7414
  }
7323
7415
 
7324
7416
  class DropdownOptions extends ControlOptionsBase {
@@ -7333,6 +7425,28 @@ class DropdownOptions extends ControlOptionsBase {
7333
7425
  this.forceDirection = ForceDirection.English;
7334
7426
  this.notFoundText = "";
7335
7427
  }
7428
+ get displayValue() {
7429
+ let result = "";
7430
+ if (this.selectedItems) {
7431
+ // Handle case where selectedItems could be a single string or an array of strings
7432
+ const itemsArray = Array.isArray(this.selectedItems)
7433
+ ? this.selectedItems
7434
+ : [this.selectedItems];
7435
+ // Only process if the array is not empty
7436
+ if (itemsArray.length > 0) {
7437
+ itemsArray.forEach((item, index) => {
7438
+ const foundItem = this.dataSource?.find((i) => i.key == item);
7439
+ if (foundItem) {
7440
+ result += foundItem.value;
7441
+ if (index < itemsArray.length - 1) {
7442
+ result += ',';
7443
+ }
7444
+ }
7445
+ });
7446
+ }
7447
+ }
7448
+ return result;
7449
+ }
7336
7450
  }
7337
7451
 
7338
7452
  class FileUploadOptions extends ControlOptionsBase {
@@ -7399,6 +7513,9 @@ class PhoneOptions extends ControlOptionsBase {
7399
7513
  this.onlyCountries = [];
7400
7514
  this.forceDirection = ForceDirection.English;
7401
7515
  }
7516
+ get displayValue() {
7517
+ return this.value;
7518
+ }
7402
7519
  }
7403
7520
 
7404
7521
  class RangeNumber {
@@ -7417,6 +7534,9 @@ class TextAreaOptions extends ControlOptionsBase {
7417
7534
  //Enable auto save speech language into local storage
7418
7535
  this.autoSaveSpeechLanguagetoLocalStorage = true;
7419
7536
  }
7537
+ get displayValue() {
7538
+ return this.value;
7539
+ }
7420
7540
  }
7421
7541
 
7422
7542
  class TextBoxOptions extends ControlOptionsBase {
@@ -7436,6 +7556,9 @@ class TextBoxOptions extends ControlOptionsBase {
7436
7556
  this.noMargin = false;
7437
7557
  this.validationRules = [];
7438
7558
  }
7559
+ get displayValue() {
7560
+ return this.value;
7561
+ }
7439
7562
  }
7440
7563
 
7441
7564
  class ToggleSlideOptions extends ControlOptionsBase {
@@ -9570,6 +9693,11 @@ class MultilingualControlOptionsBase {
9570
9693
  /** Sets an attribute readonly */
9571
9694
  this.isReadonly = false;
9572
9695
  }
9696
+ /** Sets an display value */
9697
+ get displayValue() {
9698
+ // Default implementation - override in components
9699
+ return null;
9700
+ }
9573
9701
  }
9574
9702
 
9575
9703
  class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
@@ -9582,6 +9710,9 @@ class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
9582
9710
  /**Prevent AutoComplete of inputs default value is "on" available values "on" and "off"*/
9583
9711
  this.autoComplete = "on";
9584
9712
  }
9713
+ get displayValue() {
9714
+ return this.value;
9715
+ }
9585
9716
  }
9586
9717
 
9587
9718
  class Attribute {
@@ -9705,6 +9836,21 @@ class AutocompleteOptions extends ControlOptionsBase {
9705
9836
  this.selectedValue = null;
9706
9837
  this.itemWithImage = false;
9707
9838
  }
9839
+ get displayValue() {
9840
+ let result = "";
9841
+ if (this.value && Array.isArray(this.value)) {
9842
+ const displayValues = this.value;
9843
+ displayValues.forEach((element, index) => {
9844
+ if (element && element.Value) {
9845
+ result += element.Value;
9846
+ if (index < displayValues.length - 1) {
9847
+ result += ',';
9848
+ }
9849
+ }
9850
+ });
9851
+ }
9852
+ return result;
9853
+ }
9708
9854
  }
9709
9855
 
9710
9856
  class TagsInputDTO {
@@ -9746,6 +9892,21 @@ class TagsInputOptions extends ControlOptionsBase {
9746
9892
  this.tagInputMode = TagInputView.WithoutImage;
9747
9893
  this.showDescription = true;
9748
9894
  }
9895
+ get displayValue() {
9896
+ let result = "";
9897
+ if (this.value && Array.isArray(this.value)) {
9898
+ const displayValues = this.value;
9899
+ displayValues.forEach((tag, index) => {
9900
+ if (tag && tag.name) {
9901
+ result += tag.name;
9902
+ if (index < displayValues.length - 1) {
9903
+ result += ',';
9904
+ }
9905
+ }
9906
+ });
9907
+ }
9908
+ return result;
9909
+ }
9749
9910
  }
9750
9911
 
9751
9912
  class FilterItem {
@@ -9805,6 +9966,9 @@ class PagingOptions {
9805
9966
  }
9806
9967
 
9807
9968
  class RadioButtonOptions extends ControlOptionsBase {
9969
+ get displayValue() {
9970
+ return this.value;
9971
+ }
9808
9972
  }
9809
9973
 
9810
9974
  class RadioButtonItem {