@bnsights/bbsf-controls 1.0.49 → 1.0.52
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 +13 -0
- package/bnsights-bbsf-controls-1.0.52.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +110 -41
- 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/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 +36 -8
- 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/esm2015/lib/controls/bbsf-controls.module.js +3 -3
- package/fesm2015/bnsights-bbsf-controls.js +111 -42
- 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/MapAutoComplete/MapAutoComplete.component.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.49.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)
|
|
@@ -5488,7 +5527,7 @@
|
|
|
5488
5527
|
if (_this.CurrentLanguage == 'en')
|
|
5489
5528
|
_this.mapsAPILoader["_config"]["localeId"] = "en-US";
|
|
5490
5529
|
_this.mapsAPILoader["_scriptLoadingPromise"] = null;
|
|
5491
|
-
_this.mapsAPILoader["_config"]["apiKey"] = "
|
|
5530
|
+
_this.mapsAPILoader["_config"]["apiKey"] = bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + _this.CurrentLanguage;
|
|
5492
5531
|
var ScriptTag = document.getElementById(_this.mapsAPILoader["_SCRIPT_ID"]);
|
|
5493
5532
|
if (ScriptTag)
|
|
5494
5533
|
ScriptTag.remove();
|
|
@@ -5499,7 +5538,7 @@
|
|
|
5499
5538
|
window.google = null;
|
|
5500
5539
|
_this.LazyMapsAPILoader = new core.LazyMapsAPILoader({
|
|
5501
5540
|
// &language=${UtilityService.CurrentLanguage}
|
|
5502
|
-
apiKey: "
|
|
5541
|
+
apiKey: bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + _this.CurrentLanguage,
|
|
5503
5542
|
libraries: ['places'],
|
|
5504
5543
|
}, _this.mapsAPILoader["_windowRef"], _this.mapsAPILoader["_documentRef"], _this.mapsAPILoader["_config"]["localeId"]);
|
|
5505
5544
|
_this.LazyMapsAPILoader.load().then(function () {
|
|
@@ -5595,18 +5634,17 @@
|
|
|
5595
5634
|
}));
|
|
5596
5635
|
});
|
|
5597
5636
|
});
|
|
5598
|
-
;
|
|
5599
5637
|
if (this.CurrentLanguage == 'ar')
|
|
5600
5638
|
this.mapsAPILoader["_config"]["localeId"] = "ar-EG";
|
|
5601
5639
|
if (this.CurrentLanguage == 'en')
|
|
5602
5640
|
this.mapsAPILoader["_config"]["localeId"] = "en-US";
|
|
5603
5641
|
this.mapsAPILoader["_scriptLoadingPromise"] = null;
|
|
5604
|
-
this.mapsAPILoader["_config"]["apiKey"] = "
|
|
5642
|
+
this.mapsAPILoader["_config"]["apiKey"] = bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + this.CurrentLanguage;
|
|
5605
5643
|
var leftSection = document.getElementById(this.mapsAPILoader["_SCRIPT_ID"]);
|
|
5606
5644
|
if (leftSection)
|
|
5607
5645
|
leftSection.remove();
|
|
5608
5646
|
this.LazyMapsAPILoader = new core.LazyMapsAPILoader({
|
|
5609
|
-
apiKey: "
|
|
5647
|
+
apiKey: bbsfUtilities.environment.BBSF_GoogleMapKey + "&language=" + this.CurrentLanguage,
|
|
5610
5648
|
libraries: ['places'],
|
|
5611
5649
|
}, this.mapsAPILoader["_windowRef"], this.mapsAPILoader["_documentRef"], this.mapsAPILoader["_config"]["localeId"]);
|
|
5612
5650
|
this.LazyMapsAPILoader.load();
|
|
@@ -5630,6 +5668,33 @@
|
|
|
5630
5668
|
this.MapAutoCompleteFormControl.disable();
|
|
5631
5669
|
}
|
|
5632
5670
|
if (this.options.Value != null) {
|
|
5671
|
+
var germanAddress = {
|
|
5672
|
+
url: this.options.Value.GoogleMapsURL,
|
|
5673
|
+
placeID: this.options.Value.PlaceID,
|
|
5674
|
+
displayAddress: this.options.Value.Text,
|
|
5675
|
+
name: this.options.Value.Text,
|
|
5676
|
+
locality: {},
|
|
5677
|
+
state: {},
|
|
5678
|
+
country: {},
|
|
5679
|
+
geoLocation: { latitude: -1, longitude: -1 },
|
|
5680
|
+
};
|
|
5681
|
+
germanAddress.geoLocation.latitude = this.options.Value.Latitude;
|
|
5682
|
+
germanAddress.geoLocation.longitude = this.options.Value.Longitude;
|
|
5683
|
+
this.onGermanAddressMapped.emit(germanAddress);
|
|
5684
|
+
this.GermanAddressMapped(germanAddress);
|
|
5685
|
+
this.place = {
|
|
5686
|
+
url: this.options.Value.GoogleMapsURL,
|
|
5687
|
+
place_id: this.options.Value.PlaceID,
|
|
5688
|
+
formatted_address: this.options.Value.Text,
|
|
5689
|
+
name: this.options.Value.Text,
|
|
5690
|
+
};
|
|
5691
|
+
this.onAutocompleteSelected.emit(this.place);
|
|
5692
|
+
this.AutocompleteSelected(this.place);
|
|
5693
|
+
this.onLocationSelected.emit({
|
|
5694
|
+
latitude: this.options.Value.Latitude,
|
|
5695
|
+
longitude: this.options.Value.Longitude
|
|
5696
|
+
});
|
|
5697
|
+
this.group.controls[this.options.Name].setValue(this.MapAutoCompleteModel);
|
|
5633
5698
|
this.MapAutoCompleteFormControl.setValue(this.options.Value);
|
|
5634
5699
|
}
|
|
5635
5700
|
if (this.options.CustomValidation.length > 0) {
|
|
@@ -5651,6 +5716,8 @@
|
|
|
5651
5716
|
element.setAttribute(this.options.AttributeList[index].Key, this.options.AttributeList[index].value);
|
|
5652
5717
|
}
|
|
5653
5718
|
}
|
|
5719
|
+
var elementHTML = document.getElementById(this.options.Name);
|
|
5720
|
+
elementHTML.value = this.MapAutoCompleteModel.Text;
|
|
5654
5721
|
};
|
|
5655
5722
|
MapAutoCompleteComponent.prototype.showGlobalError = function () {
|
|
5656
5723
|
this.controlUtility.showGlobalError();
|
|
@@ -5695,7 +5762,7 @@
|
|
|
5695
5762
|
MapAutoCompleteComponent.decorators = [
|
|
5696
5763
|
{ type: i0.Component, args: [{
|
|
5697
5764
|
selector: 'BBSF-MapAutoComplete',
|
|
5698
|
-
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'\" [hidden]=\"options.HideLabel\">\r\n {{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
|
|
5765
|
+
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'\" [hidden]=\"options.HideLabel\">\r\n {{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 <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n [value]=\"MapAutoCompleteModel.Text\"\r\n [address]=\"MapAutoCompleteModel.Text\"\r\n value=\"{{MapAutoCompleteModel.Text}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n matGoogleMapsAutocomplete #search\r\n (onAutocompleteSelected)=\"AutocompleteSelected($event)\"\r\n (onLocationSelected)=\"LocationSelected($event)\"\r\n (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) \">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
5699
5766
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
5700
5767
|
},] }
|
|
5701
5768
|
];
|
|
@@ -6073,12 +6140,11 @@
|
|
|
6073
6140
|
//Modal confirmation submit function
|
|
6074
6141
|
ConfirmationModalComponent.prototype.submit = function () {
|
|
6075
6142
|
var _this = this;
|
|
6076
|
-
console.log("options in submit function");
|
|
6077
|
-
console.log(this.options);
|
|
6078
6143
|
var submitModel = this.options.ServiceSubmitModel;
|
|
6079
6144
|
var submittedService = this.options.ServiceSubmitFunction.apply(null, submitModel);
|
|
6080
6145
|
submittedService.subscribe(function (result) {
|
|
6081
|
-
_this.
|
|
6146
|
+
if (!_this.options.DisableModalDismiss)
|
|
6147
|
+
_this.modalService.dismissAll();
|
|
6082
6148
|
if (!_this.options.DisableSuccessNotification) {
|
|
6083
6149
|
if (!_this.options.SuccessNotificationMessage)
|
|
6084
6150
|
_this.options.SuccessNotificationMessage = _this.utilityService.getResourceValue("DeletedSuccessfully");
|
|
@@ -6364,6 +6430,7 @@
|
|
|
6364
6430
|
/** Set value for item in DropdownList */
|
|
6365
6431
|
_this.ItemTempletvalue = "value";
|
|
6366
6432
|
_this.ForceDirection = exports.ForceDirection.English;
|
|
6433
|
+
_this.NotFoundText = "";
|
|
6367
6434
|
return _this;
|
|
6368
6435
|
}
|
|
6369
6436
|
return DropdownOptions;
|
|
@@ -6389,7 +6456,7 @@
|
|
|
6389
6456
|
/** to set Direction of HtmlEditor if HtmlEditor is Arabic or English */
|
|
6390
6457
|
_this.ForceDirection = exports.ForceDirection.English;
|
|
6391
6458
|
/** Set Height For */
|
|
6392
|
-
_this.Height =
|
|
6459
|
+
_this.Height = 5;
|
|
6393
6460
|
return _this;
|
|
6394
6461
|
}
|
|
6395
6462
|
return HtmlEditorOptions;
|
|
@@ -7634,7 +7701,7 @@
|
|
|
7634
7701
|
ngxTypeahead.NgxTypeaheadModule,
|
|
7635
7702
|
core.AgmCoreModule.forRoot({
|
|
7636
7703
|
// &language=${UtilityService.CurrentLanguage}
|
|
7637
|
-
apiKey:
|
|
7704
|
+
apiKey: bbsfUtilities.environment.BBSF_GoogleMapKey,
|
|
7638
7705
|
libraries: ['places'],
|
|
7639
7706
|
}),
|
|
7640
7707
|
googleMapsAutocomplete.MatGoogleMapsAutocompleteModule,
|
|
@@ -8111,6 +8178,8 @@
|
|
|
8111
8178
|
this.DisableSuccessNotification = false;
|
|
8112
8179
|
//If ="true" disable notification after submission error
|
|
8113
8180
|
this.DisableErrorNotification = false;
|
|
8181
|
+
//If ="true" disable prevent modal from dismiss automatically
|
|
8182
|
+
this.DisableModalDismiss = false;
|
|
8114
8183
|
}
|
|
8115
8184
|
return ConfirmationModalOptions;
|
|
8116
8185
|
}());
|