@bnsights/bbsf-controls 1.0.173 → 1.0.174
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.
- package/README.md +2 -9
- package/esm2022/lib/Shared/Models/AutocompleteOptions.mjs +1 -16
- package/esm2022/lib/Shared/Models/ControlOptionsBase.mjs +1 -5
- package/esm2022/lib/Shared/Models/DatePickerOptions.mjs +1 -17
- package/esm2022/lib/Shared/Models/DropdownOptions.mjs +1 -23
- package/esm2022/lib/Shared/Models/MultiLingualTextBoxOptions.mjs +1 -4
- package/esm2022/lib/Shared/Models/MultilingualControlOptionsBase.mjs +1 -6
- package/esm2022/lib/Shared/Models/PhoneOptions.mjs +1 -4
- package/esm2022/lib/Shared/Models/RadioButtonOptions.mjs +1 -4
- package/esm2022/lib/Shared/Models/TagsInputOptions.mjs +1 -16
- package/esm2022/lib/Shared/Models/TextAreaOptions.mjs +1 -4
- package/esm2022/lib/Shared/Models/TextBoxOptions.mjs +1 -4
- package/esm2022/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.mjs +4 -8
- package/esm2022/lib/controls/DateTimePicker/DateTimePicker.component.mjs +9 -20
- package/esm2022/lib/controls/DropdownList/DropdownList.component.mjs +14 -47
- package/esm2022/lib/controls/FileUplaod/FileUplaod.component.mjs +1 -18
- package/esm2022/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.mjs +21 -29
- package/esm2022/lib/controls/TagsInput/TagsInput.component.mjs +1 -1
- package/fesm2022/bnsights-bbsf-controls.mjs +44 -208
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/Shared/Models/AutocompleteOptions.d.ts +0 -1
- package/lib/Shared/Models/ControlOptionsBase.d.ts +3 -4
- package/lib/Shared/Models/DatePickerOptions.d.ts +0 -1
- package/lib/Shared/Models/DropdownOptions.d.ts +0 -1
- package/lib/Shared/Models/MultiLingualTextBoxOptions.d.ts +0 -1
- package/lib/Shared/Models/MultilingualControlOptionsBase.d.ts +0 -2
- package/lib/Shared/Models/PhoneOptions.d.ts +0 -1
- package/lib/Shared/Models/RadioButtonOptions.d.ts +0 -1
- package/lib/Shared/Models/TagsInputOptions.d.ts +0 -1
- package/lib/Shared/Models/TextAreaOptions.d.ts +0 -1
- package/lib/Shared/Models/TextBoxOptions.d.ts +0 -1
- package/lib/controls/DropdownList/DropdownList.component.d.ts +2 -4
- 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,9 +1098,7 @@ class AutocompleteTextBoxComponent {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
else {
|
|
1100
1100
|
if (this.autoCompleteTextBoxControl.value == item.value) {
|
|
1101
|
-
this.autoCompleteTextBoxControl.setErrors({
|
|
1102
|
-
errorMassage: this.utilityService.getResourceValue('NewSelectionValidationKey')
|
|
1103
|
-
});
|
|
1101
|
+
this.autoCompleteTextBoxControl.setErrors({ errorMassage: this.utilityService.getResourceValue('NewSelectionValidationKey') });
|
|
1104
1102
|
this.autoCompleteTextBoxControl.markAsTouched();
|
|
1105
1103
|
this.autoCompleteTextBoxControl.invalid;
|
|
1106
1104
|
return;
|
|
@@ -1109,9 +1107,7 @@ class AutocompleteTextBoxComponent {
|
|
|
1109
1107
|
this.autoCompleteTextBoxControl.setValue(item);
|
|
1110
1108
|
this.autoCompleteTextBoxControl.updateValueAndValidity();
|
|
1111
1109
|
let originalValue = this.autoCompleteTextBoxControl.value;
|
|
1112
|
-
if (this.options.patchFunction &&
|
|
1113
|
-
this.options.patchPath &&
|
|
1114
|
-
this.group.get(this.name).valid) {
|
|
1110
|
+
if (this.options.patchFunction && this.options.patchPath && this.group.get(this.name).valid) {
|
|
1115
1111
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
1116
1112
|
}
|
|
1117
1113
|
}
|
|
@@ -1706,18 +1702,10 @@ class DateInputComponent {
|
|
|
1706
1702
|
}
|
|
1707
1703
|
//#region events
|
|
1708
1704
|
ngOnInit() {
|
|
1709
|
-
this.textDir = this.options.forceDirection
|
|
1710
|
-
|
|
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());
|
|
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());
|
|
1719
1707
|
// Update the DateTimeAdapter Language with the current thread langauge
|
|
1720
|
-
this.dateTimeAdapter.setLocale(this.utilityService.getCurrentLanguage() ==
|
|
1708
|
+
this.dateTimeAdapter.setLocale(this.utilityService.getCurrentLanguage() == "ar" ? "ar" : "en-UK");
|
|
1721
1709
|
this.controlValidationService.isCreatedBefor = false;
|
|
1722
1710
|
this.group.addControl(this.options.name, new FormControl(''));
|
|
1723
1711
|
this.datePickerFormControl = this.group.controls[this.options.name];
|
|
@@ -1731,7 +1719,7 @@ class DateInputComponent {
|
|
|
1731
1719
|
}
|
|
1732
1720
|
if (this.options.isRequired)
|
|
1733
1721
|
this.validationRules.push(Validators.required);
|
|
1734
|
-
if (this.options.labelKey != null && this.options.labelKey !=
|
|
1722
|
+
if (this.options.labelKey != null && this.options.labelKey != "")
|
|
1735
1723
|
this.options.labelValue = this.utilityService.getResourceValue(this.options.labelKey);
|
|
1736
1724
|
if (this.options.isDisabled)
|
|
1737
1725
|
this.datePickerFormControl.disable();
|
|
@@ -1781,9 +1769,8 @@ class DateInputComponent {
|
|
|
1781
1769
|
}
|
|
1782
1770
|
}
|
|
1783
1771
|
onDateSelect(item) {
|
|
1784
|
-
if (!item)
|
|
1772
|
+
if (!item)
|
|
1785
1773
|
return;
|
|
1786
|
-
}
|
|
1787
1774
|
let dateValue = new Date(item.value);
|
|
1788
1775
|
// var tzOffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
|
1789
1776
|
if (this.options.selectMode == SelectMode.Range) {
|
|
@@ -1799,9 +1786,7 @@ class DateInputComponent {
|
|
|
1799
1786
|
this.datePickerFormControl.setValue(dateValue);
|
|
1800
1787
|
this.onChangeService.ChangeValue(this.options.name);
|
|
1801
1788
|
let originalValue = dateValue;
|
|
1802
|
-
if (this.options.patchFunction &&
|
|
1803
|
-
this.options.patchPath &&
|
|
1804
|
-
this.group.get(this.options.name).valid) {
|
|
1789
|
+
if (this.options.patchFunction && this.options.patchPath && this.group.get(this.options.name).valid) {
|
|
1805
1790
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
1806
1791
|
}
|
|
1807
1792
|
//Use this line to enable two way binding.
|
|
@@ -1811,11 +1796,11 @@ class DateInputComponent {
|
|
|
1811
1796
|
subscribeDateChanges() {
|
|
1812
1797
|
const startDateChanges = this.comparedControl.valueChanges;
|
|
1813
1798
|
const endDateChanges = this.group.get(this.options.name).valueChanges;
|
|
1814
|
-
startDateChanges.subscribe(
|
|
1799
|
+
startDateChanges.subscribe(start => {
|
|
1815
1800
|
this.comparedControl.addValidators(this.checkIfStartDateBeForEndDate);
|
|
1816
1801
|
this.comparedControl.updateValueAndValidity();
|
|
1817
1802
|
});
|
|
1818
|
-
endDateChanges.subscribe(
|
|
1803
|
+
endDateChanges.subscribe(end => {
|
|
1819
1804
|
this.datePickerFormControl.addValidators(this.checkIfEndDateAfterStartDate);
|
|
1820
1805
|
this.datePickerFormControl.updateValueAndValidity();
|
|
1821
1806
|
});
|
|
@@ -1914,7 +1899,7 @@ class DropdownListComponent {
|
|
|
1914
1899
|
this.SelectedList = this.options.selectedItems;
|
|
1915
1900
|
this.dropdownSettings = {
|
|
1916
1901
|
singleSelection: this.options.singleSelection,
|
|
1917
|
-
text:
|
|
1902
|
+
text: "Select",
|
|
1918
1903
|
selectAllText: 'Select All',
|
|
1919
1904
|
unSelectAllText: 'UnSelect All',
|
|
1920
1905
|
enableSearchFilter: this.options.allowSearchFilter,
|
|
@@ -1927,8 +1912,8 @@ class DropdownListComponent {
|
|
|
1927
1912
|
showSelectedItemsAtTop: true,
|
|
1928
1913
|
limitSelection: this.options.limitSelection,
|
|
1929
1914
|
searchPlaceholderText: this.options.placeholder,
|
|
1930
|
-
labelKey:
|
|
1931
|
-
primaryKey:
|
|
1915
|
+
labelKey: "value",
|
|
1916
|
+
primaryKey: "key"
|
|
1932
1917
|
};
|
|
1933
1918
|
this.group.addControl(this.options.name, new FormControl(''));
|
|
1934
1919
|
this.dropdownListFormControl = this.group.controls[this.options.name]; // new FormControl('',validationRules);
|
|
@@ -1944,7 +1929,7 @@ class DropdownListComponent {
|
|
|
1944
1929
|
if (this.options.isRequired) {
|
|
1945
1930
|
this.validationRules.push(Validators.required);
|
|
1946
1931
|
}
|
|
1947
|
-
if (this.options.labelKey != null && this.options.labelKey !=
|
|
1932
|
+
if (this.options.labelKey != null && this.options.labelKey != "")
|
|
1948
1933
|
this.options.labelValue = this.utilityService.getResourceValue(this.options.labelKey);
|
|
1949
1934
|
this.dropdownListFormControl.setValidators(this.validationRules);
|
|
1950
1935
|
this.dropdownListFormControl.setAsyncValidators(this.validationRulesasync);
|
|
@@ -1955,14 +1940,6 @@ class DropdownListComponent {
|
|
|
1955
1940
|
this.group.markAllAsTouched();
|
|
1956
1941
|
this.markAllAsTouched = true;
|
|
1957
1942
|
});
|
|
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
|
-
}
|
|
1966
1943
|
}
|
|
1967
1944
|
ngAfterViewInit() {
|
|
1968
1945
|
this.controlUtility.setAttributeForControl(this.options);
|
|
@@ -1979,23 +1956,10 @@ class DropdownListComponent {
|
|
|
1979
1956
|
}
|
|
1980
1957
|
getSelectedItemValue() {
|
|
1981
1958
|
if (this.options.selectedItems) {
|
|
1982
|
-
if (this.options.singleSelection)
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
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
|
-
}
|
|
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]);
|
|
1999
1963
|
}
|
|
2000
1964
|
else
|
|
2001
1965
|
return this.utilityService.getResourceValue('NA');
|
|
@@ -2003,18 +1967,14 @@ class DropdownListComponent {
|
|
|
2003
1967
|
onItemSelect() {
|
|
2004
1968
|
this.onChangeService.ChangeValue(this.options.name);
|
|
2005
1969
|
let originalValue = this.options.selectedItems;
|
|
2006
|
-
if (this.options.patchFunction &&
|
|
2007
|
-
this.options.patchPath &&
|
|
2008
|
-
this.group.get(this.options.name).valid) {
|
|
1970
|
+
if (this.options.patchFunction && this.options.patchPath && this.group.get(this.options.name).valid) {
|
|
2009
1971
|
this.controlUtility.patchControlValue(originalValue, this.options.patchFunction, this.options.patchPath);
|
|
2010
1972
|
}
|
|
2011
1973
|
this.onChange.emit(originalValue);
|
|
2012
1974
|
//console.log(this.dropdownListFormControl.value)
|
|
2013
1975
|
}
|
|
2014
1976
|
Clear() {
|
|
2015
|
-
//
|
|
2016
|
-
this.selectedItems = [];
|
|
2017
|
-
this.options.selectedItems = null;
|
|
1977
|
+
//console.log("Clear")
|
|
2018
1978
|
this.dropdownListFormControl.setValue(this.selectedItems);
|
|
2019
1979
|
this.onChangeService.ChangeValue(this.options.name);
|
|
2020
1980
|
this.onChange.emit();
|
|
@@ -2030,29 +1990,21 @@ class DropdownListComponent {
|
|
|
2030
1990
|
this.dropdownListFormControl.setValue(this.selectedItems);
|
|
2031
1991
|
}
|
|
2032
1992
|
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
|
-
}
|
|
2037
1993
|
this.dropdownListFormControl.setValue(this.selectedItems);
|
|
2038
|
-
if (this.selectedItems.length == 0 && this.options.isRequired == true) {
|
|
1994
|
+
if ((this.selectedItems.length == 0) && this.options.isRequired == true) {
|
|
2039
1995
|
this.dropdownListFormControl.markAsTouched();
|
|
2040
1996
|
this.dropdownListFormControl.invalid;
|
|
2041
1997
|
}
|
|
2042
1998
|
}
|
|
2043
1999
|
onDeselectAll(items) {
|
|
2044
|
-
// Clear the selected items when all are deselected
|
|
2045
|
-
this.selectedItems = [];
|
|
2046
|
-
this.options.selectedItems = null;
|
|
2047
2000
|
this.dropdownListFormControl.setValue(this.selectedItems);
|
|
2048
|
-
if (this.selectedItems.length == 0 && this.options.isRequired == true) {
|
|
2001
|
+
if ((this.selectedItems.length == 0) && this.options.isRequired == true) {
|
|
2049
2002
|
this.dropdownListFormControl.markAsTouched();
|
|
2050
2003
|
this.dropdownListFormControl.invalid;
|
|
2051
2004
|
}
|
|
2052
2005
|
}
|
|
2053
2006
|
onDropDownClose() {
|
|
2054
|
-
if ((this.selectedItems == undefined || this.selectedItems.length == 0) &&
|
|
2055
|
-
this.options.isRequired == true) {
|
|
2007
|
+
if ((this.selectedItems == undefined || this.selectedItems.length == 0) && this.options.isRequired == true) {
|
|
2056
2008
|
this.dropdownListFormControl.markAsTouched();
|
|
2057
2009
|
this.dropdownListFormControl.invalid;
|
|
2058
2010
|
}
|
|
@@ -2350,11 +2302,6 @@ class FileUploadComponent {
|
|
|
2350
2302
|
this.validationMessage +
|
|
2351
2303
|
`<br /> ${this.UtilityService.getResourceValue('MinFileCountValidationKey') + this.options.minNoOfFiles}`;
|
|
2352
2304
|
}
|
|
2353
|
-
if (this.options.maxNoOfFiles > 0) {
|
|
2354
|
-
this.validationMessage =
|
|
2355
|
-
this.validationMessage +
|
|
2356
|
-
`<br /> ${this.UtilityService.getResourceValue('MaxFileCountValidationKey') + this.options.maxNoOfFiles}`;
|
|
2357
|
-
}
|
|
2358
2305
|
if (this.options.fileUploadAcceptsTypes != null &&
|
|
2359
2306
|
this.options.fileUploadAcceptsTypes.length > 0) {
|
|
2360
2307
|
}
|
|
@@ -2434,18 +2381,6 @@ class FileUploadComponent {
|
|
|
2434
2381
|
this.uploader.queue = [];
|
|
2435
2382
|
return;
|
|
2436
2383
|
}
|
|
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
|
-
}
|
|
2449
2384
|
if (this.options.isMultipleFile &&
|
|
2450
2385
|
this.options.maxSizeForAllFilesInMB != null &&
|
|
2451
2386
|
this.options.maxSizeForAllFilesInMB > 0) {
|
|
@@ -4831,23 +4766,21 @@ class MultiLingualTextBoxComponent {
|
|
|
4831
4766
|
}
|
|
4832
4767
|
onTextChange() {
|
|
4833
4768
|
// this.trimControlValue(type)
|
|
4834
|
-
let arabicValue =
|
|
4835
|
-
let englishValue =
|
|
4836
|
-
if (this.englishFormControl.value ==
|
|
4769
|
+
let arabicValue = "";
|
|
4770
|
+
let englishValue = "";
|
|
4771
|
+
if (this.englishFormControl.value == "") {
|
|
4837
4772
|
this.englishWordCountArray = 0;
|
|
4838
4773
|
this.englishWordCount = 0;
|
|
4839
4774
|
}
|
|
4840
4775
|
else {
|
|
4841
4776
|
if (this.englishFormControl.value != null && this.englishFormControl.value != undefined) {
|
|
4842
|
-
this.englishWordCountArray = this.englishFormControl.value.split(
|
|
4777
|
+
this.englishWordCountArray = this.englishFormControl.value.split(" ").length;
|
|
4843
4778
|
if (this.englishWordCountArray > 0) {
|
|
4844
4779
|
if (this.englishWordCountArray > this.options.maxWordCount) {
|
|
4845
4780
|
this.englishWordCount = this.options.maxWordCount;
|
|
4846
|
-
this.multiLanguageGroup.controls[
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
this.multiLanguageGroup.controls['English'].markAsTouched();
|
|
4850
|
-
this.multiLanguageGroup.controls['English'].invalid;
|
|
4781
|
+
this.multiLanguageGroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.maxWordCount });
|
|
4782
|
+
this.multiLanguageGroup.controls["English"].markAsTouched();
|
|
4783
|
+
this.multiLanguageGroup.controls["English"].invalid;
|
|
4851
4784
|
}
|
|
4852
4785
|
else {
|
|
4853
4786
|
this.englishWordCount = this.englishWordCountArray;
|
|
@@ -4863,9 +4796,9 @@ class MultiLingualTextBoxComponent {
|
|
|
4863
4796
|
this.showEnglishCharsLimitMsg = true;
|
|
4864
4797
|
this.hasEnglishCharsLimitValidationError = true;
|
|
4865
4798
|
if (this.englishCurrentCharsCount == this.options.maxLength)
|
|
4866
|
-
this.englishCharsLimitMsgClass =
|
|
4799
|
+
this.englishCharsLimitMsgClass = "danger";
|
|
4867
4800
|
else
|
|
4868
|
-
this.englishCharsLimitMsgClass =
|
|
4801
|
+
this.englishCharsLimitMsgClass = "warning";
|
|
4869
4802
|
}
|
|
4870
4803
|
else {
|
|
4871
4804
|
this.showEnglishCharsLimitMsg = false;
|
|
@@ -4873,28 +4806,24 @@ class MultiLingualTextBoxComponent {
|
|
|
4873
4806
|
}
|
|
4874
4807
|
let max = this.options.maxLength;
|
|
4875
4808
|
let current = this.englishCurrentCharsCount;
|
|
4876
|
-
let msg = this.utilityService.getResourceValue(
|
|
4809
|
+
let msg = this.utilityService.getResourceValue("MaxLengthLimitWarning");
|
|
4877
4810
|
// Replace placeholders with actual values
|
|
4878
|
-
this.englishMaxLimitWarningMsg = msg
|
|
4879
|
-
.replace('${max}', max.toString())
|
|
4880
|
-
.replace('${current}', current.toString());
|
|
4811
|
+
this.englishMaxLimitWarningMsg = msg.replace("${max}", max.toString()).replace("${current}", current.toString());
|
|
4881
4812
|
}
|
|
4882
4813
|
}
|
|
4883
|
-
if (this.arabicFormControl.value ==
|
|
4814
|
+
if (this.arabicFormControl.value == "") {
|
|
4884
4815
|
this.arabicWordCountArray = 0;
|
|
4885
4816
|
this.arabicWordCount = 0;
|
|
4886
4817
|
}
|
|
4887
4818
|
else {
|
|
4888
4819
|
if (this.arabicFormControl.value != null && this.arabicFormControl.value != undefined) {
|
|
4889
|
-
this.arabicWordCountArray = this.arabicFormControl.value.split(
|
|
4820
|
+
this.arabicWordCountArray = this.arabicFormControl.value.split(" ").length;
|
|
4890
4821
|
if (this.arabicWordCountArray > 0) {
|
|
4891
4822
|
if (this.arabicWordCountArray > this.options.maxWordCount) {
|
|
4892
4823
|
this.arabicWordCount = this.options.maxWordCount;
|
|
4893
|
-
this.multiLanguageGroup.controls[
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
this.multiLanguageGroup.controls['Arabic'].markAsTouched();
|
|
4897
|
-
this.multiLanguageGroup.controls['Arabic'].invalid;
|
|
4824
|
+
this.multiLanguageGroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.maxWordCount });
|
|
4825
|
+
this.multiLanguageGroup.controls["Arabic"].markAsTouched();
|
|
4826
|
+
this.multiLanguageGroup.controls["Arabic"].invalid;
|
|
4898
4827
|
}
|
|
4899
4828
|
else {
|
|
4900
4829
|
this.arabicWordCount = this.arabicWordCountArray;
|
|
@@ -4910,9 +4839,9 @@ class MultiLingualTextBoxComponent {
|
|
|
4910
4839
|
this.showArabicCharsLimitMsg = true;
|
|
4911
4840
|
this.hasArabicCharsLimitValidationError = true;
|
|
4912
4841
|
if (this.arabicCurrentCharsCount == this.options.maxLength)
|
|
4913
|
-
this.arabicCharsLimitMsgClass =
|
|
4842
|
+
this.arabicCharsLimitMsgClass = "danger";
|
|
4914
4843
|
else
|
|
4915
|
-
this.arabicCharsLimitMsgClass =
|
|
4844
|
+
this.arabicCharsLimitMsgClass = "warning";
|
|
4916
4845
|
}
|
|
4917
4846
|
else {
|
|
4918
4847
|
this.showArabicCharsLimitMsg = false;
|
|
@@ -4920,11 +4849,9 @@ class MultiLingualTextBoxComponent {
|
|
|
4920
4849
|
}
|
|
4921
4850
|
let max = this.options.maxLength;
|
|
4922
4851
|
let current = this.arabicCurrentCharsCount;
|
|
4923
|
-
let msg = this.utilityService.getResourceValue(
|
|
4852
|
+
let msg = this.utilityService.getResourceValue("MaxLengthLimitWarning");
|
|
4924
4853
|
// Replace placeholders with actual values
|
|
4925
|
-
this.arabicMaxLimitWarningMsg = msg
|
|
4926
|
-
.replace('${max}', max.toString())
|
|
4927
|
-
.replace('${current}', current.toString());
|
|
4854
|
+
this.arabicMaxLimitWarningMsg = msg.replace("${max}", max.toString()).replace("${current}", current.toString());
|
|
4928
4855
|
}
|
|
4929
4856
|
}
|
|
4930
4857
|
let multiLangModel = new EnglishArabicDTO();
|
|
@@ -7372,10 +7299,6 @@ class ControlOptionsBase {
|
|
|
7372
7299
|
/** Sets an attribute readonly */
|
|
7373
7300
|
this.isReadonly = false;
|
|
7374
7301
|
}
|
|
7375
|
-
get displayValue() {
|
|
7376
|
-
// Default implementation - override in components
|
|
7377
|
-
return null;
|
|
7378
|
-
}
|
|
7379
7302
|
}
|
|
7380
7303
|
|
|
7381
7304
|
class DatePickerOptions extends ControlOptionsBase {
|
|
@@ -7396,21 +7319,6 @@ class DatePickerOptions extends ControlOptionsBase {
|
|
|
7396
7319
|
this.startControlToCompareWith = null;
|
|
7397
7320
|
this.validationClasses = null;
|
|
7398
7321
|
}
|
|
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
|
-
}
|
|
7414
7322
|
}
|
|
7415
7323
|
|
|
7416
7324
|
class DropdownOptions extends ControlOptionsBase {
|
|
@@ -7425,28 +7333,6 @@ class DropdownOptions extends ControlOptionsBase {
|
|
|
7425
7333
|
this.forceDirection = ForceDirection.English;
|
|
7426
7334
|
this.notFoundText = "";
|
|
7427
7335
|
}
|
|
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
|
-
}
|
|
7450
7336
|
}
|
|
7451
7337
|
|
|
7452
7338
|
class FileUploadOptions extends ControlOptionsBase {
|
|
@@ -7513,9 +7399,6 @@ class PhoneOptions extends ControlOptionsBase {
|
|
|
7513
7399
|
this.onlyCountries = [];
|
|
7514
7400
|
this.forceDirection = ForceDirection.English;
|
|
7515
7401
|
}
|
|
7516
|
-
get displayValue() {
|
|
7517
|
-
return this.value;
|
|
7518
|
-
}
|
|
7519
7402
|
}
|
|
7520
7403
|
|
|
7521
7404
|
class RangeNumber {
|
|
@@ -7534,9 +7417,6 @@ class TextAreaOptions extends ControlOptionsBase {
|
|
|
7534
7417
|
//Enable auto save speech language into local storage
|
|
7535
7418
|
this.autoSaveSpeechLanguagetoLocalStorage = true;
|
|
7536
7419
|
}
|
|
7537
|
-
get displayValue() {
|
|
7538
|
-
return this.value;
|
|
7539
|
-
}
|
|
7540
7420
|
}
|
|
7541
7421
|
|
|
7542
7422
|
class TextBoxOptions extends ControlOptionsBase {
|
|
@@ -7556,9 +7436,6 @@ class TextBoxOptions extends ControlOptionsBase {
|
|
|
7556
7436
|
this.noMargin = false;
|
|
7557
7437
|
this.validationRules = [];
|
|
7558
7438
|
}
|
|
7559
|
-
get displayValue() {
|
|
7560
|
-
return this.value;
|
|
7561
|
-
}
|
|
7562
7439
|
}
|
|
7563
7440
|
|
|
7564
7441
|
class ToggleSlideOptions extends ControlOptionsBase {
|
|
@@ -9693,11 +9570,6 @@ class MultilingualControlOptionsBase {
|
|
|
9693
9570
|
/** Sets an attribute readonly */
|
|
9694
9571
|
this.isReadonly = false;
|
|
9695
9572
|
}
|
|
9696
|
-
/** Sets an display value */
|
|
9697
|
-
get displayValue() {
|
|
9698
|
-
// Default implementation - override in components
|
|
9699
|
-
return null;
|
|
9700
|
-
}
|
|
9701
9573
|
}
|
|
9702
9574
|
|
|
9703
9575
|
class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
|
|
@@ -9710,9 +9582,6 @@ class MultiLingualTextBoxOptions extends MultilingualControlOptionsBase {
|
|
|
9710
9582
|
/**Prevent AutoComplete of inputs default value is "on" available values "on" and "off"*/
|
|
9711
9583
|
this.autoComplete = "on";
|
|
9712
9584
|
}
|
|
9713
|
-
get displayValue() {
|
|
9714
|
-
return this.value;
|
|
9715
|
-
}
|
|
9716
9585
|
}
|
|
9717
9586
|
|
|
9718
9587
|
class Attribute {
|
|
@@ -9836,21 +9705,6 @@ class AutocompleteOptions extends ControlOptionsBase {
|
|
|
9836
9705
|
this.selectedValue = null;
|
|
9837
9706
|
this.itemWithImage = false;
|
|
9838
9707
|
}
|
|
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
|
-
}
|
|
9854
9708
|
}
|
|
9855
9709
|
|
|
9856
9710
|
class TagsInputDTO {
|
|
@@ -9892,21 +9746,6 @@ class TagsInputOptions extends ControlOptionsBase {
|
|
|
9892
9746
|
this.tagInputMode = TagInputView.WithoutImage;
|
|
9893
9747
|
this.showDescription = true;
|
|
9894
9748
|
}
|
|
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
|
-
}
|
|
9910
9749
|
}
|
|
9911
9750
|
|
|
9912
9751
|
class FilterItem {
|
|
@@ -9966,9 +9805,6 @@ class PagingOptions {
|
|
|
9966
9805
|
}
|
|
9967
9806
|
|
|
9968
9807
|
class RadioButtonOptions extends ControlOptionsBase {
|
|
9969
|
-
get displayValue() {
|
|
9970
|
-
return this.value;
|
|
9971
|
-
}
|
|
9972
9808
|
}
|
|
9973
9809
|
|
|
9974
9810
|
class RadioButtonItem {
|