@bnsights/bbsf-controls 1.0.50 → 1.0.53
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 +12 -0
- package/bnsights-bbsf-controls-1.0.53.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +84 -35
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Enums/LanguageMode.js +8 -8
- package/esm2015/lib/Shared/Models/ConfirmationModalOptions.js +3 -1
- package/esm2015/lib/Shared/Models/DropdownOptions.js +2 -1
- package/esm2015/lib/Shared/Models/HtmlEditorOptions.js +2 -2
- package/esm2015/lib/Shared/Models/MapAutocompleteDTO.js +4 -1
- package/esm2015/lib/controls/ConfirmationModal/ConfirmationModal.component.js +3 -4
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +3 -1
- package/esm2015/lib/controls/DropdownList/DropdownList.component.js +2 -2
- package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +3 -3
- package/esm2015/lib/controls/MapAutoComplete/MapAutoComplete.component.js +9 -2
- package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +10 -2
- package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +12 -4
- package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +14 -4
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +23 -12
- package/esm2015/lib/controls/TextArea/TextArea.component.js +2 -2
- package/esm2015/lib/controls/TextBox/TextBox.component.js +2 -2
- package/fesm2015/bnsights-bbsf-controls.js +86 -35
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/LanguageMode.d.ts +7 -7
- package/lib/Shared/Models/ConfirmationModalOptions.d.ts +1 -0
- package/lib/Shared/Models/DropdownOptions.d.ts +1 -0
- package/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.d.ts +2 -0
- package/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.d.ts +2 -0
- package/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.d.ts +2 -0
- package/package.json +2 -2
- package/bnsights-bbsf-controls-1.0.50.tgz +0 -0
|
@@ -857,6 +857,8 @@
|
|
|
857
857
|
}
|
|
858
858
|
};
|
|
859
859
|
DateInputComponent.prototype.onDateSelect = function (item) {
|
|
860
|
+
if (!item)
|
|
861
|
+
return;
|
|
860
862
|
var DateValue;
|
|
861
863
|
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
|
862
864
|
if (this.options.SelectMode == 2) {
|
|
@@ -944,13 +946,13 @@
|
|
|
944
946
|
|
|
945
947
|
exports.LanguageMode = void 0;
|
|
946
948
|
(function (LanguageMode) {
|
|
947
|
-
LanguageMode[
|
|
948
|
-
LanguageMode[
|
|
949
|
-
LanguageMode[
|
|
950
|
-
LanguageMode[
|
|
951
|
-
LanguageMode[
|
|
952
|
-
LanguageMode[
|
|
953
|
-
LanguageMode[
|
|
949
|
+
LanguageMode["Both_Languages_are_visible"] = "3c6dbffe-da7f-4108-b44d-4b216a22f701";
|
|
950
|
+
LanguageMode["English_Language_only_is_visible"] = "84cc1d57-1f07-42a1-a38f-1a376c12a367";
|
|
951
|
+
LanguageMode["Arabic_Language_only_is_visible"] = "6a3e59e0-9510-4b16-9080-9313f5c9f229";
|
|
952
|
+
LanguageMode["Both_Languages_but_only_English_is_required"] = "260c38bb-c90c-4aa7-895d-31aba9311a05";
|
|
953
|
+
LanguageMode["Both_Languages_but_only_Arabic_is_required"] = "a1f2e15f-2691-4118-975f-ac21caf8ad5a";
|
|
954
|
+
LanguageMode["Current_Language_only_is_visible_and_required"] = "e2ba1f44-68f3-4035-b84f-9f1b6c2b0c05";
|
|
955
|
+
LanguageMode["Both_Languages_are_visible_but_only_current_language_is_required"] = "b26431f2-b209-4c41-ab04-2d71361847c2";
|
|
954
956
|
})(exports.LanguageMode || (exports.LanguageMode = {}));
|
|
955
957
|
|
|
956
958
|
var GlobalSettings = /** @class */ (function () {
|
|
@@ -1356,6 +1358,8 @@
|
|
|
1356
1358
|
this.EnglishValidationRulesasync = [];
|
|
1357
1359
|
this.IsShowArabicWordCount = false;
|
|
1358
1360
|
this.IsShowEnglishWordCount = false;
|
|
1361
|
+
this.IsShowAsteriskInArabic = false;
|
|
1362
|
+
this.IsShowAsteriskInEnglish = false;
|
|
1359
1363
|
this.markAllAsTouched = false;
|
|
1360
1364
|
this.ArabicLetterOnly = "";
|
|
1361
1365
|
this.EnglishLetterOnly = "";
|
|
@@ -1511,7 +1515,7 @@
|
|
|
1511
1515
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1512
1516
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1513
1517
|
this.englishCurrentCharsCount = this.EnglishFormControl.value.length;
|
|
1514
|
-
if (this.englishCurrentCharsCount
|
|
1518
|
+
if (this.englishCurrentCharsCount > this.minCharsLimit) {
|
|
1515
1519
|
this.showEnglishCharsLimitMsg = true;
|
|
1516
1520
|
this.hasEnglishCharsLimitValidationError = true;
|
|
1517
1521
|
if (this.englishCurrentCharsCount == this.options.MaxLength)
|
|
@@ -1553,7 +1557,7 @@
|
|
|
1553
1557
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1554
1558
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1555
1559
|
this.arabicCurrentCharsCount = this.ArabicFormControl.value.length;
|
|
1556
|
-
if (this.arabicCurrentCharsCount
|
|
1560
|
+
if (this.arabicCurrentCharsCount > this.minCharsLimit) {
|
|
1557
1561
|
this.showArabicCharsLimitMsg = true;
|
|
1558
1562
|
this.hasArabicCharsLimitValidationError = true;
|
|
1559
1563
|
if (this.arabicCurrentCharsCount == this.options.MaxLength)
|
|
@@ -1637,6 +1641,8 @@
|
|
|
1637
1641
|
if (this.options.IsRequired == true) {
|
|
1638
1642
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
1639
1643
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
1644
|
+
this.IsShowAsteriskInArabic = true;
|
|
1645
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1640
1646
|
}
|
|
1641
1647
|
break;
|
|
1642
1648
|
case exports.LanguageMode.Arabic_Language_only_is_visible:
|
|
@@ -1651,11 +1657,13 @@
|
|
|
1651
1657
|
if (this.CurrentLanguage == 'ar') {
|
|
1652
1658
|
if (this.options.IsRequired == true) {
|
|
1653
1659
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
1660
|
+
this.IsShowAsteriskInArabic = true;
|
|
1654
1661
|
}
|
|
1655
1662
|
}
|
|
1656
1663
|
if (this.CurrentLanguage == 'en') {
|
|
1657
1664
|
if (this.options.IsRequired == true) {
|
|
1658
1665
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
1666
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1659
1667
|
}
|
|
1660
1668
|
}
|
|
1661
1669
|
break;
|
|
@@ -1664,6 +1672,7 @@
|
|
|
1664
1672
|
this.ShowEnglishTextBox = true;
|
|
1665
1673
|
if (this.options.IsRequired == true) {
|
|
1666
1674
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
1675
|
+
this.IsShowAsteriskInArabic = true;
|
|
1667
1676
|
}
|
|
1668
1677
|
break;
|
|
1669
1678
|
case exports.LanguageMode.Both_Languages_but_only_English_is_required:
|
|
@@ -1671,6 +1680,7 @@
|
|
|
1671
1680
|
this.ShowEnglishTextBox = true;
|
|
1672
1681
|
if (this.options.IsRequired == true) {
|
|
1673
1682
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
1683
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1674
1684
|
}
|
|
1675
1685
|
break;
|
|
1676
1686
|
case exports.LanguageMode.Current_Language_only_is_visible_and_required:
|
|
@@ -1679,6 +1689,7 @@
|
|
|
1679
1689
|
this.ShowEnglishTextBox = false;
|
|
1680
1690
|
if (this.options.IsRequired == true) {
|
|
1681
1691
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
1692
|
+
this.IsShowAsteriskInArabic = true;
|
|
1682
1693
|
}
|
|
1683
1694
|
}
|
|
1684
1695
|
if (this.CurrentLanguage == 'en') {
|
|
@@ -1686,6 +1697,7 @@
|
|
|
1686
1697
|
this.ShowEnglishTextBox = true;
|
|
1687
1698
|
if (this.options.IsRequired == true) {
|
|
1688
1699
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
1700
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1689
1701
|
}
|
|
1690
1702
|
}
|
|
1691
1703
|
break;
|
|
@@ -1723,7 +1735,7 @@
|
|
|
1723
1735
|
MultiLingualTextBoxComponent.decorators = [
|
|
1724
1736
|
{ type: i0.Component, args: [{
|
|
1725
1737
|
selector: 'BBSF-MultiLingualTextBox',
|
|
1726
|
-
template: "<div class=\"b-control b-multilangual-textbox\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguagegroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\"\r\n (focus)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(false)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"English\"\r\n [hidden]=\"options.IsHideEnglishFields\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"EnglishFormControl.invalid && EnglishFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n autocomplete=\"{{options.AutoComplete}}\"\r\n id=\"{{options.Name}}.English\"\r\n #userinputEnglish>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(EnglishFormControl.invalid && EnglishFormControl.touched)\">\r\n {{getErrorValidation(EnglishFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"EnglishFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'right-icon':'left-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\" dir=\"rtl\"\r\n (focus)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(false)\"\r\n [hidden]=\"options.IsHideArabicFields\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicFormControl.invalid && ArabicFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n autocomplete=\"{{options.AutoComplete}}\"\r\n id=\"{{options.Name}}.Arabic\"\r\n (change)=\"trimControlValue('Ar')\" #userinputArabic>\r\n\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(ArabicFormControl.invalid && ArabicFormControl.touched)\">\r\n {{getErrorValidation(ArabicFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
1738
|
+
template: "<div class=\"b-control b-multilangual-textbox\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguagegroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue}}\r\n <span *ngIf=\"((options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)&&IsShowAsteriskInEnglish)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\"\r\n (focus)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(false)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"English\"\r\n [hidden]=\"options.IsHideEnglishFields\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"EnglishFormControl.invalid && EnglishFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n autocomplete=\"{{options.AutoComplete}}\"\r\n id=\"{{options.Name}}.English\"\r\n #userinputEnglish>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(EnglishFormControl.invalid && EnglishFormControl.touched)\">\r\n {{getErrorValidation(EnglishFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"EnglishFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextBox\">\r\n <label class=\"b-label col-form-label col-sm-12\"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue}}\r\n <span *ngIf=\"((options.ShowAsterisk&&options.IsRequired)||(options.IsRequired))&&IsShowAsteriskInArabic\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group align-items-center\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'right-icon':'left-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control\" dir=\"rtl\"\r\n (focus)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(false)\"\r\n [hidden]=\"options.IsHideArabicFields\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicFormControl.invalid && ArabicFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n autocomplete=\"{{options.AutoComplete}}\"\r\n id=\"{{options.Name}}.Arabic\"\r\n (change)=\"trimControlValue('Ar')\" #userinputArabic>\r\n\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\" *ngIf=\"(ArabicFormControl.invalid && ArabicFormControl.touched)\">\r\n {{getErrorValidation(ArabicFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
1727
1739
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1728
1740
|
},] }
|
|
1729
1741
|
];
|
|
@@ -1879,7 +1891,7 @@
|
|
|
1879
1891
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1880
1892
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1881
1893
|
this.currentCharsCount = this.TextAreaFormControl.value.length;
|
|
1882
|
-
if (this.currentCharsCount
|
|
1894
|
+
if (this.currentCharsCount > this.minCharsLimit) {
|
|
1883
1895
|
this.showCharsLimitMsg = true;
|
|
1884
1896
|
this.hasCharsLimitValidationError = true;
|
|
1885
1897
|
if (this.currentCharsCount == this.options.MaxLength)
|
|
@@ -2123,7 +2135,7 @@
|
|
|
2123
2135
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
2124
2136
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
2125
2137
|
this.englishCurrentCharsCount = this.EnglishTextAreaFormControl.value.length;
|
|
2126
|
-
if (this.englishCurrentCharsCount
|
|
2138
|
+
if (this.englishCurrentCharsCount > this.minCharsLimit) {
|
|
2127
2139
|
this.showEnglishCharsLimitMsg = true;
|
|
2128
2140
|
this.hasEnglishCharsLimitValidationError = true;
|
|
2129
2141
|
if (this.englishCurrentCharsCount == this.options.MaxLength)
|
|
@@ -2165,7 +2177,7 @@
|
|
|
2165
2177
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
2166
2178
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
2167
2179
|
this.arabicCurrentCharsCount = this.ArabicTextAreaFormControl.value.length;
|
|
2168
|
-
if (this.arabicCurrentCharsCount
|
|
2180
|
+
if (this.arabicCurrentCharsCount > this.minCharsLimit) {
|
|
2169
2181
|
this.showArabicCharsLimitMsg = true;
|
|
2170
2182
|
this.hasArabicCharsLimitValidationError = true;
|
|
2171
2183
|
if (this.arabicCurrentCharsCount == this.options.MaxLength)
|
|
@@ -2240,6 +2252,8 @@
|
|
|
2240
2252
|
if (this.options.IsRequired == true) {
|
|
2241
2253
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
2242
2254
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
2255
|
+
this.IsShowAsteriskInArabic = true;
|
|
2256
|
+
this.IsShowAsteriskInEnglish = true;
|
|
2243
2257
|
}
|
|
2244
2258
|
break;
|
|
2245
2259
|
case exports.LanguageMode.Arabic_Language_only_is_visible:
|
|
@@ -2254,11 +2268,13 @@
|
|
|
2254
2268
|
if (this.CurrentLanguage == 'ar') {
|
|
2255
2269
|
if (this.options.IsRequired == true) {
|
|
2256
2270
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
2271
|
+
this.IsShowAsteriskInArabic = true;
|
|
2257
2272
|
}
|
|
2258
2273
|
}
|
|
2259
2274
|
if (this.CurrentLanguage == 'en') {
|
|
2260
2275
|
if (this.options.IsRequired == true) {
|
|
2261
2276
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
2277
|
+
this.IsShowAsteriskInEnglish = true;
|
|
2262
2278
|
}
|
|
2263
2279
|
}
|
|
2264
2280
|
break;
|
|
@@ -2267,6 +2283,7 @@
|
|
|
2267
2283
|
this.ShowEngishTextArea = true;
|
|
2268
2284
|
if (this.options.IsRequired == true) {
|
|
2269
2285
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
2286
|
+
this.IsShowAsteriskInArabic = true;
|
|
2270
2287
|
}
|
|
2271
2288
|
break;
|
|
2272
2289
|
case exports.LanguageMode.Both_Languages_but_only_English_is_required:
|
|
@@ -2274,6 +2291,7 @@
|
|
|
2274
2291
|
this.ShowEngishTextArea = true;
|
|
2275
2292
|
if (this.options.IsRequired == true) {
|
|
2276
2293
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
2294
|
+
this.IsShowAsteriskInEnglish = true;
|
|
2277
2295
|
}
|
|
2278
2296
|
break;
|
|
2279
2297
|
case exports.LanguageMode.Current_Language_only_is_visible_and_required:
|
|
@@ -2282,6 +2300,7 @@
|
|
|
2282
2300
|
this.ShowEngishTextArea = false;
|
|
2283
2301
|
if (this.options.IsRequired == true) {
|
|
2284
2302
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
2303
|
+
this.IsShowAsteriskInArabic = true;
|
|
2285
2304
|
}
|
|
2286
2305
|
}
|
|
2287
2306
|
if (this.CurrentLanguage == 'en') {
|
|
@@ -2289,6 +2308,7 @@
|
|
|
2289
2308
|
this.ShowEngishTextArea = true;
|
|
2290
2309
|
if (this.options.IsRequired == true) {
|
|
2291
2310
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
2311
|
+
this.IsShowAsteriskInEnglish = true;
|
|
2292
2312
|
}
|
|
2293
2313
|
}
|
|
2294
2314
|
break;
|
|
@@ -2326,7 +2346,7 @@
|
|
|
2326
2346
|
MultiLingualTextAreaComponent.decorators = [
|
|
2327
2347
|
{ type: i0.Component, args: [{
|
|
2328
2348
|
selector: 'BBSF-MultiLingualTextArea',
|
|
2329
|
-
template: "<div class=\"b-control b-multilangual-textarea\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguageTextAreagroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEngishTextArea\">\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"English\" [hidden]=\"options.IsHideEnglishFields\"\r\n [class.is-invalid]=\"EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaEnglish>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched)\">\r\n {{getErrorValidation(EnglishTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n\r\n <!-- <div *ngIf=\"EnglishTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextArea\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" dir=\"rtl\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(false)\"\r\n [hidden]=\"options.IsHideArabicFields\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" rows=\"{{options.Rows}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (change)=\"trimControlValue('Ar')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaArabic>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched)\">\r\n {{getErrorValidation(ArabicTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2349
|
+
template: "<div class=\"b-control b-multilangual-textarea\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultiLanguageTextAreagroup\">\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowEngishTextArea\">\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\" [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"((options.ShowAsterisk&&options.IsRequired)||(options.IsRequired))&&IsShowAsteriskInEnglish\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"onEnglishFocus(true)\" (focusout)=\"onEnglishFocus(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"English\" [hidden]=\"options.IsHideEnglishFields\"\r\n [class.is-invalid]=\"EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched\"\r\n placeholder=\"{{options.EnglishPlaceholder}}\" (change)=\"trimControlValue('En')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"EnglishWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaEnglish>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideEnglishFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaEnglish)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n\r\n\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishTextAreaFormControl.invalid && EnglishTextAreaFormControl.touched)\">\r\n {{getErrorValidation(EnglishTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showEnglishCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': englishCharsLimitMsgClass === 'warning', 'badge-light-danger' : englishCharsLimitMsgClass === 'danger' }\">\r\n {{englishMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='') ||(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!='')\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n\r\n <!-- <div *ngIf=\"EnglishTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n <div class=\"row\" *ngIf=\"ShowArabicTextArea\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"((options.ShowAsterisk&&options.IsRequired)||(options.IsRequired))&&IsShowAsteriskInArabic\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <div class=\"input-group\">\r\n <textarea class=\"form-control bnsights-control\" dir=\"rtl\" rows=\"{{options.Rows}}\" cols=\"{{options.Cols}}\"\r\n (focus)=\"onArabicFocus(true)\" (focusout)=\"onArabicFocus(false)\"\r\n [hidden]=\"options.IsHideArabicFields\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" rows=\"{{options.Rows}}\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n [class.is-invalid]=\"ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched\"\r\n placeholder=\"{{options.ArabicPlaceholder}}\" (change)=\"trimControlValue('Ar')\"\r\n (keyup)=\"onTextChange()\"\r\n (keydown)=\"ArabicWordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinputTextAreaArabic>\r\n </textarea>\r\n <div class=\"input-group-append\" [hidden]=\"options.IsHideArabicFields\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinputTextAreaArabic)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"text-muted font-weight-500 float-end word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}</div>\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicTextAreaFormControl.invalid && ArabicTextAreaFormControl.touched)\">\r\n {{getErrorValidation(ArabicTextAreaFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showArabicCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': arabicCharsLimitMsgClass === 'warning', 'badge-light-danger' : arabicCharsLimitMsgClass === 'danger' }\">\r\n {{arabicMaxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"(options.LabelDescription!=null&&options.LabelDescription!='')||(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!='')\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n <!-- <div *ngIf=\"ArabicTextAreaFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2330
2350
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
2331
2351
|
},] }
|
|
2332
2352
|
];
|
|
@@ -2614,7 +2634,7 @@
|
|
|
2614
2634
|
{ type: i0.Component, args: [{
|
|
2615
2635
|
// tslint:disable-next-line: component-selector
|
|
2616
2636
|
selector: 'BBSF-DropdownList',
|
|
2617
|
-
template: "<div class=\"b-control b-dropdown-list\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <ng-select *ngIf=\"options.DisableBootstrapSelect==false\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n [bindValue]=\"options.ItemTempletkey\" [bindLabel]=\"options.ItemTempletvalue\" [items]=\"options.DataSource\"\r\n [notFoundText]=\"
|
|
2637
|
+
template: "<div class=\"b-control b-dropdown-list\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <ng-select *ngIf=\"options.DisableBootstrapSelect==false\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n [bindValue]=\"options.ItemTempletkey\" [bindLabel]=\"options.ItemTempletvalue\" [items]=\"options.DataSource\"\r\n [notFoundText]=\"options.NotFoundText\" [maxSelectedItems]=\"options.LimitSelection\"\r\n [searchable]=\"options.AllowSearchFilter\" [multiple]=\"!options.SingleSelection\" [readonly]=\"options.IsDisabled\"\r\n [clearable]=\"true\" placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n [selectableGroup]=\"true\" [selectableGroupAsModel]=\"false\" formControlName=\"{{options.Name}}\"\r\n [(ngModel)]=\"options.SelectedItems\" (change)=\"onItemSelect()\" (clear)=\"Clear()\"\r\n [class.is-invalid]=\"DropdownListFormControl.invalid && DropdownListFormControl.touched\"\r\n [closeOnSelect]=\"options.SingleSelection ? true : false\">\r\n\r\n <ng-template *ngIf=\"options.ShowCheckbox\" ng-option-tmp let-item=\"item\" let-item$=\"item$\" let-index=\"index\">\r\n <div class=\"ks-cboxtags\">\r\n <input id=\"item-{{index}}\" type=\"checkbox\" [ngModelOptions]=\"{standalone: true}\" [ngModel]=\"item$.selected\"\r\n class=\" \" /> <label class=\"ng-option-label mb-0\" id={{item.key}}>{{item.value}}</label>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"!options.ShowCheckbox\" ng-option-tmp let-item=\"item\" let-item$=\"item$\" let-index=\"index\">\r\n <label class=\"ng-option-label mb-0\" id={{item.key}}>{{item.value}}</label>\r\n </ng-template>\r\n\r\n </ng-select>\r\n\r\n <select *ngIf=\"options.DisableBootstrapSelect\" class=\"form-control bnsights-control\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" (change)=\"onItemSelect()\" [(ngModel)]=\"options.SelectedItems\" [disabled]=\"options.IsDisabled\" formControlName=\"{{options.Name}}\">\r\n <option value=\"\" disabled>--{{UtilityService.getResourceValue(\"select\")}}--</option>\r\n <option *ngFor=\"let item of options.DataSource\" value=\"{{item.key}}\" [ngValue]=\"item.key\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(DropdownListFormControl.invalid && DropdownListFormControl.touched)\">\r\n {{getErrorValidation(DropdownListFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <!-- <div *ngIf=\"DropdownListFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
2618
2638
|
styles: [".cuppa-dropdown{background-color:#fff}.arrow-up,.arrow-down{border-left:none!important;border-right:none!important}.dropdown-list{padding-top:0!important}.c-token{background-color:#6495ed}.pure-checkbox .selected-item{background-color:#6495ed;color:#fff}\n"]
|
|
2619
2639
|
},] }
|
|
2620
2640
|
];
|
|
@@ -2876,8 +2896,8 @@
|
|
|
2876
2896
|
this.editorConfig = {
|
|
2877
2897
|
editable: !this.options.IsDisabled,
|
|
2878
2898
|
spellcheck: true,
|
|
2879
|
-
height: this.options.Height
|
|
2880
|
-
minHeight: this.options.Height
|
|
2899
|
+
height: this.options.Height + "rem",
|
|
2900
|
+
minHeight: this.options.Height + "rem",
|
|
2881
2901
|
maxHeight: 'auto',
|
|
2882
2902
|
width: 'auto',
|
|
2883
2903
|
minWidth: 'auto',
|
|
@@ -3376,6 +3396,8 @@
|
|
|
3376
3396
|
if (this.options.IsRequired == true) {
|
|
3377
3397
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
3378
3398
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
3399
|
+
this.IsShowAsteriskInArabic = true;
|
|
3400
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3379
3401
|
}
|
|
3380
3402
|
break;
|
|
3381
3403
|
case exports.LanguageMode.Arabic_Language_only_is_visible:
|
|
@@ -3390,11 +3412,13 @@
|
|
|
3390
3412
|
if (this.CurrentLanguage == 'ar') {
|
|
3391
3413
|
if (this.options.IsRequired == true) {
|
|
3392
3414
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
3415
|
+
this.IsShowAsteriskInArabic = true;
|
|
3393
3416
|
}
|
|
3394
3417
|
}
|
|
3395
3418
|
if (this.CurrentLanguage == 'en') {
|
|
3396
3419
|
if (this.options.IsRequired == true) {
|
|
3397
3420
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
3421
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3398
3422
|
}
|
|
3399
3423
|
}
|
|
3400
3424
|
break;
|
|
@@ -3403,6 +3427,7 @@
|
|
|
3403
3427
|
this.ShowEnglishHtmlEditor = true;
|
|
3404
3428
|
if (this.options.IsRequired == true) {
|
|
3405
3429
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
3430
|
+
this.IsShowAsteriskInArabic = true;
|
|
3406
3431
|
}
|
|
3407
3432
|
break;
|
|
3408
3433
|
case exports.LanguageMode.Both_Languages_but_only_English_is_required:
|
|
@@ -3410,6 +3435,7 @@
|
|
|
3410
3435
|
this.ShowEnglishHtmlEditor = true;
|
|
3411
3436
|
if (this.options.IsRequired == true) {
|
|
3412
3437
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
3438
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3413
3439
|
}
|
|
3414
3440
|
break;
|
|
3415
3441
|
case exports.LanguageMode.Current_Language_only_is_visible_and_required:
|
|
@@ -3418,6 +3444,7 @@
|
|
|
3418
3444
|
this.ShowEnglishHtmlEditor = false;
|
|
3419
3445
|
if (this.options.IsRequired == true) {
|
|
3420
3446
|
this.ArabicValidationRules.push(forms.Validators.required);
|
|
3447
|
+
this.IsShowAsteriskInArabic = true;
|
|
3421
3448
|
}
|
|
3422
3449
|
}
|
|
3423
3450
|
if (this.CurrentLanguage == 'en') {
|
|
@@ -3425,6 +3452,7 @@
|
|
|
3425
3452
|
this.ShowEnglishHtmlEditor = true;
|
|
3426
3453
|
if (this.options.IsRequired == true) {
|
|
3427
3454
|
this.EnglishValidationRules.push(forms.Validators.required);
|
|
3455
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3428
3456
|
}
|
|
3429
3457
|
}
|
|
3430
3458
|
break;
|
|
@@ -3442,7 +3470,7 @@
|
|
|
3442
3470
|
MultiLingualHtmlEditorComponent.decorators = [
|
|
3443
3471
|
{ type: i0.Component, args: [{
|
|
3444
3472
|
selector: 'BBSF-MultiLingualHtmlEditor',
|
|
3445
|
-
template: "<div class=\"b-control b-multilangual-html-editor\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultilingualHtmlEditorgroup\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishHtmlEditor\">\r\n <label class=\"b-label col-form-label col-sm-12 \" \r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\"\r\n [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \r\n <angular-editor class=\"form-control bnsights-control {{options.ExtraClasses_EN}} \" (change)=\"onTextChange('en')\" [class.is-invalid]=\"EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched\"\r\n formControlName=\"English\" [config]=\"editorEnglishConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(EnglishHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowArabicHtmlEditor\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \r\n\r\n <angular-editor dir=\"rtl\" class=\"form-control bnsights-control {{options.ExtraClasses_AR}} \" (change)=\"onTextChange('ar')\" [class.is-invalid]=\"ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched\"\r\n formControlName=\"Arabic\" [config]=\"editorArabicConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(ArabicHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n \r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n</div>\r\n",
|
|
3473
|
+
template: "<div class=\"b-control b-multilangual-html-editor\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n\r\n <div class=\"form-group row\" [formGroup]=\"MultilingualHtmlEditorgroup\">\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowEnglishHtmlEditor\">\r\n <label class=\"b-label col-form-label col-sm-12 \" \r\n [ngClass]=\"(options.ViewType==1)?'col-md-9':'col-md-3'\"\r\n [hidden]=\"options.IsHideEnglishLabel\">\r\n {{(options.EnglishLabelValue!=null&&options.EnglishLabelValue!=\"\")?options.EnglishLabelValue:options.LabelValue+\"in English\"}}\r\n <span *ngIf=\"((options.ShowAsterisk&&options.IsRequired)||(options.IsRequired))&&IsShowAsteriskInEnglish\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \r\n <angular-editor class=\"form-control bnsights-control {{options.ExtraClasses_EN}} \" (change)=\"onTextChange('en')\" [class.is-invalid]=\"EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched\"\r\n formControlName=\"English\" [config]=\"editorEnglishConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishHtmlEditorFormControl.invalid && EnglishHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(EnglishHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.EnglishLabelDescription!=null&&options.EnglishLabelDescription!=\"\")?options.EnglishLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6\">\r\n <div class=\"row\" *ngIf=\"ShowArabicHtmlEditor\">\r\n\r\n <label class=\"b-label col-form-label col-sm-12 \"\r\n [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.IsHideArabicLabel\">\r\n {{(options.ArabicLabelValue!=null&&options.ArabicLabelValue!=\"\")?options.ArabicLabelValue:options.LabelValue+\"in Arabic\"}}\r\n <span *ngIf=\"((options.ShowAsterisk&&options.IsRequired)||(options.IsRequired))&&IsShowAsteriskInArabic\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\" col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n \r\n\r\n <angular-editor dir=\"rtl\" class=\"form-control bnsights-control {{options.ExtraClasses_AR}} \" (change)=\"onTextChange('ar')\" [class.is-invalid]=\"ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched\"\r\n formControlName=\"Arabic\" [config]=\"editorArabicConfig\"></angular-editor>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicHtmlEditorFormControl.invalid && ArabicHtmlEditorFormControl.touched)\">\r\n {{getErrorValidation(ArabicHtmlEditorFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n \r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">\r\n {{(options.ArabicLabelDescription!=null&&options.ArabicLabelDescription!=\"\")?options.ArabicLabelDescription:options.LabelDescription}}\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n\r\n</div>\r\n",
|
|
3446
3474
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
3447
3475
|
},] }
|
|
3448
3476
|
];
|
|
@@ -4479,6 +4507,9 @@
|
|
|
4479
4507
|
// this.group.addControl(this.options.Name, new FormControl(''));
|
|
4480
4508
|
// this.TagInputControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
4481
4509
|
this.TagsFormControl.setValue(this.options.Value);
|
|
4510
|
+
if (this.options.IsRequired) {
|
|
4511
|
+
this.validationRules.push(forms.Validators.required);
|
|
4512
|
+
}
|
|
4482
4513
|
if (this.options.CustomValidation.length > 0) {
|
|
4483
4514
|
var Validations = this.options.CustomValidation;
|
|
4484
4515
|
for (var index = 0; index < Validations.length; index++) {
|
|
@@ -4486,9 +4517,6 @@
|
|
|
4486
4517
|
this.validationRules.push(Validation.functionBody);
|
|
4487
4518
|
}
|
|
4488
4519
|
}
|
|
4489
|
-
if (this.options.IsRequired) {
|
|
4490
|
-
this.validationRules.push(forms.Validators.required);
|
|
4491
|
-
}
|
|
4492
4520
|
this.TagsFormControl.setValidators(this.validationRules);
|
|
4493
4521
|
this.TagsFormControl.setAsyncValidators(this.validationRulesasync);
|
|
4494
4522
|
if (this.options.IsDisabled) {
|
|
@@ -4497,7 +4525,7 @@
|
|
|
4497
4525
|
if (this.options.Value != undefined && this.options.Value != []) {
|
|
4498
4526
|
for (var index = 0; index < this.options.Value.length; index++) {
|
|
4499
4527
|
var element = this.options.Value[index];
|
|
4500
|
-
this.SelectedId.push(element.
|
|
4528
|
+
this.SelectedId.push(element.id);
|
|
4501
4529
|
}
|
|
4502
4530
|
this.tags = this.options.Value;
|
|
4503
4531
|
this.TagsFormControl.setValue(this.options.Value);
|
|
@@ -4531,7 +4559,7 @@
|
|
|
4531
4559
|
this.controlUtility.CopyInputMessage(inputElement);
|
|
4532
4560
|
};
|
|
4533
4561
|
TagsInputComponent.prototype.searchFunctionFactory = function (Text) {
|
|
4534
|
-
var Url = this.options.ActionURL + "?" + this.options.QueryParamName + "=" + Text + "&" + this.options.SelectedItemsParamName + "=" + this.SelectedId;
|
|
4562
|
+
var Url = this.options.ActionURL + "?" + this.options.QueryParamName + "=" + encodeURIComponent(Text) + "&" + this.options.SelectedItemsParamName + "=" + this.SelectedId;
|
|
4535
4563
|
if (this.options.ExtraFilters)
|
|
4536
4564
|
Url = Url + ("&" + this.options.ExtraFilters);
|
|
4537
4565
|
var requestOptionsModel = new bbsfUtilities.RequestOptionsModel();
|
|
@@ -4541,7 +4569,7 @@
|
|
|
4541
4569
|
return Model;
|
|
4542
4570
|
};
|
|
4543
4571
|
TagsInputComponent.prototype.AddTag = function (event, key) {
|
|
4544
|
-
if (this.IsNoMatch == true && this.options.AllowNewSelection == false &&
|
|
4572
|
+
if (this.IsNoMatch == true && this.options.AllowNewSelection == false && key.selected) {
|
|
4545
4573
|
this.TagsFormControl.setErrors({ "errorMassage": this.options.NoResultText });
|
|
4546
4574
|
this.TagsFormControl.markAsTouched();
|
|
4547
4575
|
this.TagsFormControl.invalid;
|
|
@@ -4553,28 +4581,39 @@
|
|
|
4553
4581
|
}
|
|
4554
4582
|
else if (this.IsNoMatch == true && event == "Enter" && this.options.AllowNewSelection && key.selected) {
|
|
4555
4583
|
if (!(this.tags.length >= this.options.MaxNumberTags)) {
|
|
4556
|
-
this.tags.push({
|
|
4557
|
-
|
|
4584
|
+
this.tags.push({ name: key.selected });
|
|
4585
|
+
this.group.get(this.options.Name).setValue(this.tags);
|
|
4586
|
+
this.group.get(this.options.Name).markAllAsTouched();
|
|
4587
|
+
this.group.updateValueAndValidity();
|
|
4588
|
+
if (this.group.get(this.options.Name).valid) {
|
|
4589
|
+
key.selected = null;
|
|
4590
|
+
return;
|
|
4591
|
+
}
|
|
4592
|
+
else
|
|
4593
|
+
this.tags.pop();
|
|
4558
4594
|
}
|
|
4559
4595
|
}
|
|
4560
4596
|
};
|
|
4561
4597
|
TagsInputComponent.prototype.onTagsChanged = function (result) {
|
|
4562
4598
|
//console.log(this.tags)
|
|
4563
4599
|
if (result["change"] == "add") {
|
|
4564
|
-
this.SelectedId.push(result.tag.
|
|
4600
|
+
this.SelectedId.push(result.tag.id);
|
|
4565
4601
|
}
|
|
4566
4602
|
if (result["change"] == "remove") {
|
|
4567
|
-
this.SelectedId = this.SelectedId.filter(function (item) { return item != result.tag.
|
|
4603
|
+
this.SelectedId = this.SelectedId.filter(function (item) { return item != result.tag.id; });
|
|
4568
4604
|
if (this.SelectedId.length == 0 && this.options.IsRequired == true) {
|
|
4569
4605
|
this.TagsFormControl.setErrors({ required: "" });
|
|
4570
4606
|
this.TagsFormControl.markAsTouched();
|
|
4571
4607
|
this.TagsFormControl.invalid;
|
|
4572
4608
|
}
|
|
4573
4609
|
}
|
|
4574
|
-
var originalValue = this.TagsFormControl.value.map(function (a) { return a.
|
|
4610
|
+
var originalValue = this.TagsFormControl.value.map(function (a) { return a.id; });
|
|
4575
4611
|
if (this.options.PatchFunction && this.options.PatchPath && this.TagsFormControl.valid) {
|
|
4576
4612
|
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
4577
4613
|
}
|
|
4614
|
+
this.group.get(this.options.Name).setValue(this.tags);
|
|
4615
|
+
this.TagsFormControl.updateValueAndValidity();
|
|
4616
|
+
this.group.updateValueAndValidity();
|
|
4578
4617
|
this.OnChange.emit(originalValue);
|
|
4579
4618
|
};
|
|
4580
4619
|
TagsInputComponent.prototype.onNoOptionsMatch = function (event) {
|
|
@@ -5369,7 +5408,7 @@
|
|
|
5369
5408
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
5370
5409
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
5371
5410
|
this.currentCharsCount = this.TextBoxFormControl.value.length;
|
|
5372
|
-
if (this.currentCharsCount
|
|
5411
|
+
if (this.currentCharsCount > this.minCharsLimit) {
|
|
5373
5412
|
this.showCharsLimitMsg = true;
|
|
5374
5413
|
this.hasCharsLimitValidationError = true;
|
|
5375
5414
|
if (this.currentCharsCount == this.options.MaxLength)
|
|
@@ -5425,6 +5464,7 @@
|
|
|
5425
5464
|
|
|
5426
5465
|
var MapAutocompleteDTO = /** @class */ (function () {
|
|
5427
5466
|
function MapAutocompleteDTO() {
|
|
5467
|
+
this.Text = null;
|
|
5428
5468
|
}
|
|
5429
5469
|
return MapAutocompleteDTO;
|
|
5430
5470
|
}());
|
|
@@ -5707,6 +5747,13 @@
|
|
|
5707
5747
|
}
|
|
5708
5748
|
};
|
|
5709
5749
|
MapAutoCompleteComponent.prototype.GermanAddressMapped = function (result) {
|
|
5750
|
+
if (result.type) {
|
|
5751
|
+
if (result.target.value == "") {
|
|
5752
|
+
this.MapAutoCompleteFormControl.setValue(result);
|
|
5753
|
+
this.group.controls[this.options.Name].setValue(result);
|
|
5754
|
+
}
|
|
5755
|
+
return;
|
|
5756
|
+
}
|
|
5710
5757
|
this.MapAutoCompleteModel == new MapAutocompleteDTO();
|
|
5711
5758
|
this.MapAutoCompleteModel.Text = result.displayAddress;
|
|
5712
5759
|
this.MapAutoCompleteModel.PlaceID = result.placeID;
|
|
@@ -5723,7 +5770,7 @@
|
|
|
5723
5770
|
MapAutoCompleteComponent.decorators = [
|
|
5724
5771
|
{ type: i0.Component, args: [{
|
|
5725
5772
|
selector: 'BBSF-MapAutoComplete',
|
|
5726
|
-
template: "<div class=\"b-control b-map-auto-complete\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"
|
|
5773
|
+
template: "<div class=\"b-control b-map-auto-complete\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\"\r\n [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\"\r\n aria-required=\"true\">*</span>\r\n </label>\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \" [value]=\"MapAutoCompleteModel.Text\"\r\n [address]=\"MapAutoCompleteModel.Text\" value=\"{{MapAutoCompleteModel.Text}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (keyup)=\"GermanAddressMapped($event)\"\r\n matGoogleMapsAutocomplete #search (onAutocompleteSelected)=\"AutocompleteSelected($event)\"\r\n (onLocationSelected)=\"LocationSelected($event)\" (onGermanAddressMapped)=\"GermanAddressMapped($event)\" />\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched)\">\r\n {{getErrorValidation(MapAutoCompleteFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>",
|
|
5727
5774
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
5728
5775
|
},] }
|
|
5729
5776
|
];
|
|
@@ -6101,12 +6148,11 @@
|
|
|
6101
6148
|
//Modal confirmation submit function
|
|
6102
6149
|
ConfirmationModalComponent.prototype.submit = function () {
|
|
6103
6150
|
var _this = this;
|
|
6104
|
-
console.log("options in submit function");
|
|
6105
|
-
console.log(this.options);
|
|
6106
6151
|
var submitModel = this.options.ServiceSubmitModel;
|
|
6107
6152
|
var submittedService = this.options.ServiceSubmitFunction.apply(null, submitModel);
|
|
6108
6153
|
submittedService.subscribe(function (result) {
|
|
6109
|
-
_this.
|
|
6154
|
+
if (!_this.options.DisableModalDismiss)
|
|
6155
|
+
_this.modalService.dismissAll();
|
|
6110
6156
|
if (!_this.options.DisableSuccessNotification) {
|
|
6111
6157
|
if (!_this.options.SuccessNotificationMessage)
|
|
6112
6158
|
_this.options.SuccessNotificationMessage = _this.utilityService.getResourceValue("DeletedSuccessfully");
|
|
@@ -6392,6 +6438,7 @@
|
|
|
6392
6438
|
/** Set value for item in DropdownList */
|
|
6393
6439
|
_this.ItemTempletvalue = "value";
|
|
6394
6440
|
_this.ForceDirection = exports.ForceDirection.English;
|
|
6441
|
+
_this.NotFoundText = "";
|
|
6395
6442
|
return _this;
|
|
6396
6443
|
}
|
|
6397
6444
|
return DropdownOptions;
|
|
@@ -6417,7 +6464,7 @@
|
|
|
6417
6464
|
/** to set Direction of HtmlEditor if HtmlEditor is Arabic or English */
|
|
6418
6465
|
_this.ForceDirection = exports.ForceDirection.English;
|
|
6419
6466
|
/** Set Height For */
|
|
6420
|
-
_this.Height =
|
|
6467
|
+
_this.Height = 5;
|
|
6421
6468
|
return _this;
|
|
6422
6469
|
}
|
|
6423
6470
|
return HtmlEditorOptions;
|
|
@@ -8139,6 +8186,8 @@
|
|
|
8139
8186
|
this.DisableSuccessNotification = false;
|
|
8140
8187
|
//If ="true" disable notification after submission error
|
|
8141
8188
|
this.DisableErrorNotification = false;
|
|
8189
|
+
//If ="true" disable prevent modal from dismiss automatically
|
|
8190
|
+
this.DisableModalDismiss = false;
|
|
8142
8191
|
}
|
|
8143
8192
|
return ConfirmationModalOptions;
|
|
8144
8193
|
}());
|