@bnsights/bbsf-controls 1.0.48 → 1.0.51
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 +14 -0
- package/bnsights-bbsf-controls-1.0.51.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +88 -31
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Enums/LanguageMode.js +8 -8
- package/esm2015/lib/Shared/Models/DropdownOptions.js +2 -1
- package/esm2015/lib/Shared/Models/HtmlEditorOptions.js +2 -2
- package/esm2015/lib/Shared/components/ng-tag-input.js +16 -1
- package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +2 -2
- 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 +2 -2
- package/esm2015/lib/controls/TextArea/TextArea.component.js +2 -2
- package/esm2015/lib/controls/TextBox/TextBox.component.js +2 -2
- package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +2 -2
- package/esm2015/lib/controls/bbsf-controls.module.js +3 -3
- package/fesm2015/bnsights-bbsf-controls.js +103 -31
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/LanguageMode.d.ts +7 -7
- 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.48.tgz +0 -0
|
@@ -15,7 +15,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
|
|
15
15
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
16
16
|
import { DatePipe, CommonModule } from '@angular/common';
|
|
17
17
|
import { SearchCountryField, NgxIntlTelInputModule } from 'ngx-intl-tel-input';
|
|
18
|
-
import { UtilityService, ControlValidationService, BBSFTranslateService, RequestOptionsModel, RequestHandlerService, BBSFUtilitiesModule } from '@bnsights/bbsf-utilities';
|
|
18
|
+
import { UtilityService, ControlValidationService, BBSFTranslateService, RequestOptionsModel, RequestHandlerService, environment as environment$1, BBSFUtilitiesModule } from '@bnsights/bbsf-utilities';
|
|
19
19
|
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
|
|
20
20
|
import { Subject, Observable, noop as noop$1, of, Subscription } from 'rxjs';
|
|
21
21
|
import { OwlDateTimeIntl, DateTimeAdapter, OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
|
|
@@ -546,6 +546,8 @@ class DateInputComponent {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
onDateSelect(item) {
|
|
549
|
+
if (!item)
|
|
550
|
+
return;
|
|
549
551
|
let DateValue;
|
|
550
552
|
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
|
551
553
|
if (this.options.SelectMode == 2) {
|
|
@@ -627,13 +629,13 @@ var ControlLayout;
|
|
|
627
629
|
|
|
628
630
|
var LanguageMode;
|
|
629
631
|
(function (LanguageMode) {
|
|
630
|
-
LanguageMode[
|
|
631
|
-
LanguageMode[
|
|
632
|
-
LanguageMode[
|
|
633
|
-
LanguageMode[
|
|
634
|
-
LanguageMode[
|
|
635
|
-
LanguageMode[
|
|
636
|
-
LanguageMode[
|
|
632
|
+
LanguageMode["Both_Languages_are_visible"] = "3c6dbffe-da7f-4108-b44d-4b216a22f701";
|
|
633
|
+
LanguageMode["English_Language_only_is_visible"] = "84cc1d57-1f07-42a1-a38f-1a376c12a367";
|
|
634
|
+
LanguageMode["Arabic_Language_only_is_visible"] = "6a3e59e0-9510-4b16-9080-9313f5c9f229";
|
|
635
|
+
LanguageMode["Both_Languages_but_only_English_is_required"] = "260c38bb-c90c-4aa7-895d-31aba9311a05";
|
|
636
|
+
LanguageMode["Both_Languages_but_only_Arabic_is_required"] = "a1f2e15f-2691-4118-975f-ac21caf8ad5a";
|
|
637
|
+
LanguageMode["Current_Language_only_is_visible_and_required"] = "e2ba1f44-68f3-4035-b84f-9f1b6c2b0c05";
|
|
638
|
+
LanguageMode["Both_Languages_are_visible_but_only_current_language_is_required"] = "b26431f2-b209-4c41-ab04-2d71361847c2";
|
|
637
639
|
})(LanguageMode || (LanguageMode = {}));
|
|
638
640
|
|
|
639
641
|
class GlobalSettings {
|
|
@@ -1024,6 +1026,8 @@ class MultiLingualTextBoxComponent {
|
|
|
1024
1026
|
this.EnglishValidationRulesasync = [];
|
|
1025
1027
|
this.IsShowArabicWordCount = false;
|
|
1026
1028
|
this.IsShowEnglishWordCount = false;
|
|
1029
|
+
this.IsShowAsteriskInArabic = false;
|
|
1030
|
+
this.IsShowAsteriskInEnglish = false;
|
|
1027
1031
|
this.markAllAsTouched = false;
|
|
1028
1032
|
this.ArabicLetterOnly = "";
|
|
1029
1033
|
this.EnglishLetterOnly = "";
|
|
@@ -1167,7 +1171,7 @@ class MultiLingualTextBoxComponent {
|
|
|
1167
1171
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1168
1172
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1169
1173
|
this.englishCurrentCharsCount = this.EnglishFormControl.value.length;
|
|
1170
|
-
if (this.englishCurrentCharsCount
|
|
1174
|
+
if (this.englishCurrentCharsCount > this.minCharsLimit) {
|
|
1171
1175
|
this.showEnglishCharsLimitMsg = true;
|
|
1172
1176
|
this.hasEnglishCharsLimitValidationError = true;
|
|
1173
1177
|
if (this.englishCurrentCharsCount == this.options.MaxLength)
|
|
@@ -1209,7 +1213,7 @@ class MultiLingualTextBoxComponent {
|
|
|
1209
1213
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1210
1214
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1211
1215
|
this.arabicCurrentCharsCount = this.ArabicFormControl.value.length;
|
|
1212
|
-
if (this.arabicCurrentCharsCount
|
|
1216
|
+
if (this.arabicCurrentCharsCount > this.minCharsLimit) {
|
|
1213
1217
|
this.showArabicCharsLimitMsg = true;
|
|
1214
1218
|
this.hasArabicCharsLimitValidationError = true;
|
|
1215
1219
|
if (this.arabicCurrentCharsCount == this.options.MaxLength)
|
|
@@ -1293,6 +1297,8 @@ class MultiLingualTextBoxComponent {
|
|
|
1293
1297
|
if (this.options.IsRequired == true) {
|
|
1294
1298
|
this.EnglishValidationRules.push(Validators.required);
|
|
1295
1299
|
this.ArabicValidationRules.push(Validators.required);
|
|
1300
|
+
this.IsShowAsteriskInArabic = true;
|
|
1301
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1296
1302
|
}
|
|
1297
1303
|
break;
|
|
1298
1304
|
case LanguageMode.Arabic_Language_only_is_visible:
|
|
@@ -1307,11 +1313,13 @@ class MultiLingualTextBoxComponent {
|
|
|
1307
1313
|
if (this.CurrentLanguage == 'ar') {
|
|
1308
1314
|
if (this.options.IsRequired == true) {
|
|
1309
1315
|
this.ArabicValidationRules.push(Validators.required);
|
|
1316
|
+
this.IsShowAsteriskInArabic = true;
|
|
1310
1317
|
}
|
|
1311
1318
|
}
|
|
1312
1319
|
if (this.CurrentLanguage == 'en') {
|
|
1313
1320
|
if (this.options.IsRequired == true) {
|
|
1314
1321
|
this.EnglishValidationRules.push(Validators.required);
|
|
1322
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1315
1323
|
}
|
|
1316
1324
|
}
|
|
1317
1325
|
break;
|
|
@@ -1320,6 +1328,7 @@ class MultiLingualTextBoxComponent {
|
|
|
1320
1328
|
this.ShowEnglishTextBox = true;
|
|
1321
1329
|
if (this.options.IsRequired == true) {
|
|
1322
1330
|
this.ArabicValidationRules.push(Validators.required);
|
|
1331
|
+
this.IsShowAsteriskInArabic = true;
|
|
1323
1332
|
}
|
|
1324
1333
|
break;
|
|
1325
1334
|
case LanguageMode.Both_Languages_but_only_English_is_required:
|
|
@@ -1327,6 +1336,7 @@ class MultiLingualTextBoxComponent {
|
|
|
1327
1336
|
this.ShowEnglishTextBox = true;
|
|
1328
1337
|
if (this.options.IsRequired == true) {
|
|
1329
1338
|
this.EnglishValidationRules.push(Validators.required);
|
|
1339
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1330
1340
|
}
|
|
1331
1341
|
break;
|
|
1332
1342
|
case LanguageMode.Current_Language_only_is_visible_and_required:
|
|
@@ -1335,6 +1345,7 @@ class MultiLingualTextBoxComponent {
|
|
|
1335
1345
|
this.ShowEnglishTextBox = false;
|
|
1336
1346
|
if (this.options.IsRequired == true) {
|
|
1337
1347
|
this.ArabicValidationRules.push(Validators.required);
|
|
1348
|
+
this.IsShowAsteriskInArabic = true;
|
|
1338
1349
|
}
|
|
1339
1350
|
}
|
|
1340
1351
|
if (this.CurrentLanguage == 'en') {
|
|
@@ -1342,6 +1353,7 @@ class MultiLingualTextBoxComponent {
|
|
|
1342
1353
|
this.ShowEnglishTextBox = true;
|
|
1343
1354
|
if (this.options.IsRequired == true) {
|
|
1344
1355
|
this.EnglishValidationRules.push(Validators.required);
|
|
1356
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1345
1357
|
}
|
|
1346
1358
|
}
|
|
1347
1359
|
break;
|
|
@@ -1378,7 +1390,7 @@ MultiLingualTextBoxComponent.controlContainerstatic = null;
|
|
|
1378
1390
|
MultiLingualTextBoxComponent.decorators = [
|
|
1379
1391
|
{ type: Component, args: [{
|
|
1380
1392
|
selector: 'BBSF-MultiLingualTextBox',
|
|
1381
|
-
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",
|
|
1393
|
+
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",
|
|
1382
1394
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1383
1395
|
},] }
|
|
1384
1396
|
];
|
|
@@ -1532,7 +1544,7 @@ class TextAreaComponent {
|
|
|
1532
1544
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1533
1545
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1534
1546
|
this.currentCharsCount = this.TextAreaFormControl.value.length;
|
|
1535
|
-
if (this.currentCharsCount
|
|
1547
|
+
if (this.currentCharsCount > this.minCharsLimit) {
|
|
1536
1548
|
this.showCharsLimitMsg = true;
|
|
1537
1549
|
this.hasCharsLimitValidationError = true;
|
|
1538
1550
|
if (this.currentCharsCount == this.options.MaxLength)
|
|
@@ -1763,7 +1775,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1763
1775
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1764
1776
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1765
1777
|
this.englishCurrentCharsCount = this.EnglishTextAreaFormControl.value.length;
|
|
1766
|
-
if (this.englishCurrentCharsCount
|
|
1778
|
+
if (this.englishCurrentCharsCount > this.minCharsLimit) {
|
|
1767
1779
|
this.showEnglishCharsLimitMsg = true;
|
|
1768
1780
|
this.hasEnglishCharsLimitValidationError = true;
|
|
1769
1781
|
if (this.englishCurrentCharsCount == this.options.MaxLength)
|
|
@@ -1805,7 +1817,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1805
1817
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
1806
1818
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
1807
1819
|
this.arabicCurrentCharsCount = this.ArabicTextAreaFormControl.value.length;
|
|
1808
|
-
if (this.arabicCurrentCharsCount
|
|
1820
|
+
if (this.arabicCurrentCharsCount > this.minCharsLimit) {
|
|
1809
1821
|
this.showArabicCharsLimitMsg = true;
|
|
1810
1822
|
this.hasArabicCharsLimitValidationError = true;
|
|
1811
1823
|
if (this.arabicCurrentCharsCount == this.options.MaxLength)
|
|
@@ -1880,6 +1892,8 @@ class MultiLingualTextAreaComponent {
|
|
|
1880
1892
|
if (this.options.IsRequired == true) {
|
|
1881
1893
|
this.EnglishValidationRules.push(Validators.required);
|
|
1882
1894
|
this.ArabicValidationRules.push(Validators.required);
|
|
1895
|
+
this.IsShowAsteriskInArabic = true;
|
|
1896
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1883
1897
|
}
|
|
1884
1898
|
break;
|
|
1885
1899
|
case LanguageMode.Arabic_Language_only_is_visible:
|
|
@@ -1894,11 +1908,13 @@ class MultiLingualTextAreaComponent {
|
|
|
1894
1908
|
if (this.CurrentLanguage == 'ar') {
|
|
1895
1909
|
if (this.options.IsRequired == true) {
|
|
1896
1910
|
this.ArabicValidationRules.push(Validators.required);
|
|
1911
|
+
this.IsShowAsteriskInArabic = true;
|
|
1897
1912
|
}
|
|
1898
1913
|
}
|
|
1899
1914
|
if (this.CurrentLanguage == 'en') {
|
|
1900
1915
|
if (this.options.IsRequired == true) {
|
|
1901
1916
|
this.EnglishValidationRules.push(Validators.required);
|
|
1917
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1902
1918
|
}
|
|
1903
1919
|
}
|
|
1904
1920
|
break;
|
|
@@ -1907,6 +1923,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1907
1923
|
this.ShowEngishTextArea = true;
|
|
1908
1924
|
if (this.options.IsRequired == true) {
|
|
1909
1925
|
this.ArabicValidationRules.push(Validators.required);
|
|
1926
|
+
this.IsShowAsteriskInArabic = true;
|
|
1910
1927
|
}
|
|
1911
1928
|
break;
|
|
1912
1929
|
case LanguageMode.Both_Languages_but_only_English_is_required:
|
|
@@ -1914,6 +1931,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1914
1931
|
this.ShowEngishTextArea = true;
|
|
1915
1932
|
if (this.options.IsRequired == true) {
|
|
1916
1933
|
this.EnglishValidationRules.push(Validators.required);
|
|
1934
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1917
1935
|
}
|
|
1918
1936
|
break;
|
|
1919
1937
|
case LanguageMode.Current_Language_only_is_visible_and_required:
|
|
@@ -1922,6 +1940,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1922
1940
|
this.ShowEngishTextArea = false;
|
|
1923
1941
|
if (this.options.IsRequired == true) {
|
|
1924
1942
|
this.ArabicValidationRules.push(Validators.required);
|
|
1943
|
+
this.IsShowAsteriskInArabic = true;
|
|
1925
1944
|
}
|
|
1926
1945
|
}
|
|
1927
1946
|
if (this.CurrentLanguage == 'en') {
|
|
@@ -1929,6 +1948,7 @@ class MultiLingualTextAreaComponent {
|
|
|
1929
1948
|
this.ShowEngishTextArea = true;
|
|
1930
1949
|
if (this.options.IsRequired == true) {
|
|
1931
1950
|
this.EnglishValidationRules.push(Validators.required);
|
|
1951
|
+
this.IsShowAsteriskInEnglish = true;
|
|
1932
1952
|
}
|
|
1933
1953
|
}
|
|
1934
1954
|
break;
|
|
@@ -1965,7 +1985,7 @@ MultiLingualTextAreaComponent.controlContainerstatic = null;
|
|
|
1965
1985
|
MultiLingualTextAreaComponent.decorators = [
|
|
1966
1986
|
{ type: Component, args: [{
|
|
1967
1987
|
selector: 'BBSF-MultiLingualTextArea',
|
|
1968
|
-
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",
|
|
1988
|
+
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",
|
|
1969
1989
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1970
1990
|
},] }
|
|
1971
1991
|
];
|
|
@@ -2247,7 +2267,7 @@ DropdownListComponent.decorators = [
|
|
|
2247
2267
|
{ type: Component, args: [{
|
|
2248
2268
|
// tslint:disable-next-line: component-selector
|
|
2249
2269
|
selector: 'BBSF-DropdownList',
|
|
2250
|
-
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]=\"
|
|
2270
|
+
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",
|
|
2251
2271
|
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"]
|
|
2252
2272
|
},] }
|
|
2253
2273
|
];
|
|
@@ -2440,7 +2460,7 @@ ToggleslideComponent.controlContainerstatic = null;
|
|
|
2440
2460
|
ToggleslideComponent.decorators = [
|
|
2441
2461
|
{ type: Component, args: [{
|
|
2442
2462
|
selector: 'BBSF-Toggleslide',
|
|
2443
|
-
template: "<div class=\"b-control b-toggle-slide\">\r\n <div class=\"form-group 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 </label>\r\n <mat-slide-toggle [(ngModel)]=\"SlideValue\" dir=\"{{options.ForceDirection==2?'rtl':''}}\" [cssClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n formControlName=\"{{options.Name}}\" disableRipple=\"true\" disabled=\"{{options.IsDisabled}}\" (change)=\"changeValueToggle()\">\r\n </mat-slide-toggle>\r\n \r\n </div>\r\n</div>\r\n",
|
|
2463
|
+
template: "<div class=\"b-control b-toggle-slide\">\r\n <div class=\"form-group 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 </label>\r\n <mat-slide-toggle [(ngModel)]=\"SlideValue\" dir=\"{{options.ForceDirection==2?'rtl':''}}\" [cssClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n formControlName=\"{{options.Name}}\" disableRipple=\"true\" disabled=\"{{options.IsDisabled}}\" (change)=\"changeValueToggle()\">\r\n </mat-slide-toggle>\r\n <div class=\"control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n </div>\r\n</div>\r\n",
|
|
2444
2464
|
styles: [".mat-slide-toggle{padding-left:10px}.mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#e3f4fe}.mat-slide-toggle-thumb-container{width:25px;height:25px;top:1px;left:-2px}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#009ef7}.mat-slide-toggle-thumb{height:25px;width:25px;border-radius:50%}.mat-slide-toggle.mat-checked .mat-ripple-element{background-color:#009ef7}.mat-slide-toggle-bar{width:55px;height:30px;border-radius:3.25rem}\n"]
|
|
2445
2465
|
},] }
|
|
2446
2466
|
];
|
|
@@ -2503,8 +2523,8 @@ class HtmlEditorComponent {
|
|
|
2503
2523
|
this.editorConfig = {
|
|
2504
2524
|
editable: !this.options.IsDisabled,
|
|
2505
2525
|
spellcheck: true,
|
|
2506
|
-
height: this.options.Height
|
|
2507
|
-
minHeight: this.options.Height
|
|
2526
|
+
height: `${this.options.Height}rem`,
|
|
2527
|
+
minHeight: `${this.options.Height}rem`,
|
|
2508
2528
|
maxHeight: 'auto',
|
|
2509
2529
|
width: 'auto',
|
|
2510
2530
|
minWidth: 'auto',
|
|
@@ -2990,6 +3010,8 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2990
3010
|
if (this.options.IsRequired == true) {
|
|
2991
3011
|
this.EnglishValidationRules.push(Validators.required);
|
|
2992
3012
|
this.ArabicValidationRules.push(Validators.required);
|
|
3013
|
+
this.IsShowAsteriskInArabic = true;
|
|
3014
|
+
this.IsShowAsteriskInEnglish = true;
|
|
2993
3015
|
}
|
|
2994
3016
|
break;
|
|
2995
3017
|
case LanguageMode.Arabic_Language_only_is_visible:
|
|
@@ -3004,11 +3026,13 @@ class MultiLingualHtmlEditorComponent {
|
|
|
3004
3026
|
if (this.CurrentLanguage == 'ar') {
|
|
3005
3027
|
if (this.options.IsRequired == true) {
|
|
3006
3028
|
this.ArabicValidationRules.push(Validators.required);
|
|
3029
|
+
this.IsShowAsteriskInArabic = true;
|
|
3007
3030
|
}
|
|
3008
3031
|
}
|
|
3009
3032
|
if (this.CurrentLanguage == 'en') {
|
|
3010
3033
|
if (this.options.IsRequired == true) {
|
|
3011
3034
|
this.EnglishValidationRules.push(Validators.required);
|
|
3035
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3012
3036
|
}
|
|
3013
3037
|
}
|
|
3014
3038
|
break;
|
|
@@ -3017,6 +3041,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
3017
3041
|
this.ShowEnglishHtmlEditor = true;
|
|
3018
3042
|
if (this.options.IsRequired == true) {
|
|
3019
3043
|
this.ArabicValidationRules.push(Validators.required);
|
|
3044
|
+
this.IsShowAsteriskInArabic = true;
|
|
3020
3045
|
}
|
|
3021
3046
|
break;
|
|
3022
3047
|
case LanguageMode.Both_Languages_but_only_English_is_required:
|
|
@@ -3024,6 +3049,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
3024
3049
|
this.ShowEnglishHtmlEditor = true;
|
|
3025
3050
|
if (this.options.IsRequired == true) {
|
|
3026
3051
|
this.EnglishValidationRules.push(Validators.required);
|
|
3052
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3027
3053
|
}
|
|
3028
3054
|
break;
|
|
3029
3055
|
case LanguageMode.Current_Language_only_is_visible_and_required:
|
|
@@ -3032,6 +3058,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
3032
3058
|
this.ShowEnglishHtmlEditor = false;
|
|
3033
3059
|
if (this.options.IsRequired == true) {
|
|
3034
3060
|
this.ArabicValidationRules.push(Validators.required);
|
|
3061
|
+
this.IsShowAsteriskInArabic = true;
|
|
3035
3062
|
}
|
|
3036
3063
|
}
|
|
3037
3064
|
if (this.CurrentLanguage == 'en') {
|
|
@@ -3039,6 +3066,7 @@ class MultiLingualHtmlEditorComponent {
|
|
|
3039
3066
|
this.ShowEnglishHtmlEditor = true;
|
|
3040
3067
|
if (this.options.IsRequired == true) {
|
|
3041
3068
|
this.EnglishValidationRules.push(Validators.required);
|
|
3069
|
+
this.IsShowAsteriskInEnglish = true;
|
|
3042
3070
|
}
|
|
3043
3071
|
}
|
|
3044
3072
|
break;
|
|
@@ -3055,7 +3083,7 @@ MultiLingualHtmlEditorComponent.controlContainerstatic = null;
|
|
|
3055
3083
|
MultiLingualHtmlEditorComponent.decorators = [
|
|
3056
3084
|
{ type: Component, args: [{
|
|
3057
3085
|
selector: 'BBSF-MultiLingualHtmlEditor',
|
|
3058
|
-
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",
|
|
3086
|
+
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",
|
|
3059
3087
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
3060
3088
|
},] }
|
|
3061
3089
|
];
|
|
@@ -3752,7 +3780,7 @@ class AutocompleteTextBoxComponent {
|
|
|
3752
3780
|
this.validationRulesasync = [];
|
|
3753
3781
|
this.dataList = [];
|
|
3754
3782
|
this.SelectedValue = "";
|
|
3755
|
-
this.avatarImage = "
|
|
3783
|
+
this.avatarImage = "./src/assets/images/userimg.png";
|
|
3756
3784
|
this.resetError = () => {
|
|
3757
3785
|
this.controlValidationService.RemoveGlobalError();
|
|
3758
3786
|
};
|
|
@@ -4145,7 +4173,7 @@ TagsInputComponent.decorators = [
|
|
|
4145
4173
|
{ type: Component, args: [{
|
|
4146
4174
|
// tslint:disable-next-line: component-selector
|
|
4147
4175
|
selector: 'BBSF-TagsInput',
|
|
4148
|
-
template: "<div class=\"b-control b-tags-input\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n <div class=\"form-group row\" [formGroup]=\"TagsFormGroup\">\r\n\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 <b-tags-input id=\"typeahead-http\" type=\"text\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" [disabled]=\"options.IsDisabled\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"tags\"\r\n [class.is-invalid]=\"TagsFormControl.invalid && TagsFormControl.touched\" placeholder=\"{{options.Placeholder}}\"\r\n id=\"{{options.Name}}\" (onTagsChanged)=\"onTagsChanged($event)\" [(ngModel)]=\"tags\"\r\n removeLastOnBackspace=\"{{options.RemoveLastOnBackspace}}\" (onNoOptionsMatch)=\"onNoOptionsMatch($event)\"\r\n [options]=\"searchFunctionFactory(SearchKey.selected)\" #SearchKey\r\n scrollableOptions=\"{{options.ScrollableOptions}}\" scrollableOptionsInView=\"{{options.MaxSearchResultsCount}}\"\r\n (keypress)=\"AddTag($event.key,SearchKey)\" [ViewMode]=\"options.TagInputMode\"\r\n maxTags=\"{{options.MaxNumberTags}}\" minLengthBeforeOptions=\"{{options.MinSearchLength}}\"\r\n [showDescription]=\"options.ShowDescription\" [defaultImageURL]=\"options.DefaultImgUrl\" name=\"tags\">\r\n </b-tags-input>\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(TagsFormControl.invalid && TagsFormControl.touched)\">\r\n {{getErrorValidation(TagsFormControl.errors|keyvalue)}}\r\n </div>\r\n\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 </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n
|
|
4176
|
+
template: "<div class=\"b-control b-tags-input\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n <div class=\"form-group row\" [formGroup]=\"TagsFormGroup\">\r\n\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 <b-tags-input id=\"typeahead-http\" type=\"text\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" [disabled]=\"options.IsDisabled\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"tags\"\r\n [class.is-invalid]=\"TagsFormControl.invalid && TagsFormControl.touched\" placeholder=\"{{options.Placeholder}}\"\r\n id=\"{{options.Name}}\" (onTagsChanged)=\"onTagsChanged($event)\" [(ngModel)]=\"tags\"\r\n removeLastOnBackspace=\"{{options.RemoveLastOnBackspace}}\" (onNoOptionsMatch)=\"onNoOptionsMatch($event)\"\r\n [options]=\"searchFunctionFactory(SearchKey.selected)\" #SearchKey\r\n scrollableOptions=\"{{options.ScrollableOptions}}\" scrollableOptionsInView=\"{{options.MaxSearchResultsCount}}\"\r\n (keypress)=\"AddTag($event.key,SearchKey)\" [ViewMode]=\"options.TagInputMode\"\r\n maxTags=\"{{options.MaxNumberTags}}\" minLengthBeforeOptions=\"{{options.MinSearchLength}}\"\r\n [showDescription]=\"options.ShowDescription\" [defaultImageURL]=\"options.DefaultImgUrl\" name=\"tags\">\r\n </b-tags-input>\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(TagsFormControl.invalid && TagsFormControl.touched)\">\r\n {{getErrorValidation(TagsFormControl.errors|keyvalue)}}\r\n </div>\r\n\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 </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n",
|
|
4149
4177
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4150
4178
|
},] }
|
|
4151
4179
|
];
|
|
@@ -4932,7 +4960,7 @@ class TextboxComponent {
|
|
|
4932
4960
|
//MaxLength should be gretaer than or equals chars limit so that minCharsLimit would be >= 0
|
|
4933
4961
|
if (this.options.MaxLength && this.minCharsLimit >= 0) {
|
|
4934
4962
|
this.currentCharsCount = this.TextBoxFormControl.value.length;
|
|
4935
|
-
if (this.currentCharsCount
|
|
4963
|
+
if (this.currentCharsCount > this.minCharsLimit) {
|
|
4936
4964
|
this.showCharsLimitMsg = true;
|
|
4937
4965
|
this.hasCharsLimitValidationError = true;
|
|
4938
4966
|
if (this.currentCharsCount == this.options.MaxLength)
|
|
@@ -5045,7 +5073,7 @@ class MapAutoCompleteComponent {
|
|
|
5045
5073
|
if (this.CurrentLanguage == 'en')
|
|
5046
5074
|
this.mapsAPILoader["_config"]["localeId"] = "en-US";
|
|
5047
5075
|
this.mapsAPILoader["_scriptLoadingPromise"] = null;
|
|
5048
|
-
this.mapsAPILoader["_config"]["apiKey"] =
|
|
5076
|
+
this.mapsAPILoader["_config"]["apiKey"] = `${environment$1.BBSF_GoogleMapKey}&language=${this.CurrentLanguage}`;
|
|
5049
5077
|
var ScriptTag = document.getElementById(this.mapsAPILoader["_SCRIPT_ID"]);
|
|
5050
5078
|
if (ScriptTag)
|
|
5051
5079
|
ScriptTag.remove();
|
|
@@ -5056,7 +5084,7 @@ class MapAutoCompleteComponent {
|
|
|
5056
5084
|
window.google = null;
|
|
5057
5085
|
this.LazyMapsAPILoader = new LazyMapsAPILoader({
|
|
5058
5086
|
// &language=${UtilityService.CurrentLanguage}
|
|
5059
|
-
apiKey:
|
|
5087
|
+
apiKey: `${environment$1.BBSF_GoogleMapKey}&language=${this.CurrentLanguage}`,
|
|
5060
5088
|
libraries: ['places'],
|
|
5061
5089
|
}, this.mapsAPILoader["_windowRef"], this.mapsAPILoader["_documentRef"], this.mapsAPILoader["_config"]["localeId"]);
|
|
5062
5090
|
this.LazyMapsAPILoader.load().then(() => {
|
|
@@ -5146,18 +5174,17 @@ class MapAutoCompleteComponent {
|
|
|
5146
5174
|
}));
|
|
5147
5175
|
});
|
|
5148
5176
|
});
|
|
5149
|
-
;
|
|
5150
5177
|
if (this.CurrentLanguage == 'ar')
|
|
5151
5178
|
this.mapsAPILoader["_config"]["localeId"] = "ar-EG";
|
|
5152
5179
|
if (this.CurrentLanguage == 'en')
|
|
5153
5180
|
this.mapsAPILoader["_config"]["localeId"] = "en-US";
|
|
5154
5181
|
this.mapsAPILoader["_scriptLoadingPromise"] = null;
|
|
5155
|
-
this.mapsAPILoader["_config"]["apiKey"] =
|
|
5182
|
+
this.mapsAPILoader["_config"]["apiKey"] = `${environment$1.BBSF_GoogleMapKey}&language=${this.CurrentLanguage}`;
|
|
5156
5183
|
var leftSection = document.getElementById(this.mapsAPILoader["_SCRIPT_ID"]);
|
|
5157
5184
|
if (leftSection)
|
|
5158
5185
|
leftSection.remove();
|
|
5159
5186
|
this.LazyMapsAPILoader = new LazyMapsAPILoader({
|
|
5160
|
-
apiKey:
|
|
5187
|
+
apiKey: `${environment$1.BBSF_GoogleMapKey}&language=${this.CurrentLanguage}`,
|
|
5161
5188
|
libraries: ['places'],
|
|
5162
5189
|
}, this.mapsAPILoader["_windowRef"], this.mapsAPILoader["_documentRef"], this.mapsAPILoader["_config"]["localeId"]);
|
|
5163
5190
|
this.LazyMapsAPILoader.load();
|
|
@@ -5181,6 +5208,33 @@ class MapAutoCompleteComponent {
|
|
|
5181
5208
|
this.MapAutoCompleteFormControl.disable();
|
|
5182
5209
|
}
|
|
5183
5210
|
if (this.options.Value != null) {
|
|
5211
|
+
let germanAddress = {
|
|
5212
|
+
url: this.options.Value.GoogleMapsURL,
|
|
5213
|
+
placeID: this.options.Value.PlaceID,
|
|
5214
|
+
displayAddress: this.options.Value.Text,
|
|
5215
|
+
name: this.options.Value.Text,
|
|
5216
|
+
locality: {},
|
|
5217
|
+
state: {},
|
|
5218
|
+
country: {},
|
|
5219
|
+
geoLocation: { latitude: -1, longitude: -1 },
|
|
5220
|
+
};
|
|
5221
|
+
germanAddress.geoLocation.latitude = this.options.Value.Latitude;
|
|
5222
|
+
germanAddress.geoLocation.longitude = this.options.Value.Longitude;
|
|
5223
|
+
this.onGermanAddressMapped.emit(germanAddress);
|
|
5224
|
+
this.GermanAddressMapped(germanAddress);
|
|
5225
|
+
this.place = {
|
|
5226
|
+
url: this.options.Value.GoogleMapsURL,
|
|
5227
|
+
place_id: this.options.Value.PlaceID,
|
|
5228
|
+
formatted_address: this.options.Value.Text,
|
|
5229
|
+
name: this.options.Value.Text,
|
|
5230
|
+
};
|
|
5231
|
+
this.onAutocompleteSelected.emit(this.place);
|
|
5232
|
+
this.AutocompleteSelected(this.place);
|
|
5233
|
+
this.onLocationSelected.emit({
|
|
5234
|
+
latitude: this.options.Value.Latitude,
|
|
5235
|
+
longitude: this.options.Value.Longitude
|
|
5236
|
+
});
|
|
5237
|
+
this.group.controls[this.options.Name].setValue(this.MapAutoCompleteModel);
|
|
5184
5238
|
this.MapAutoCompleteFormControl.setValue(this.options.Value);
|
|
5185
5239
|
}
|
|
5186
5240
|
if (this.options.CustomValidation.length > 0) {
|
|
@@ -5202,6 +5256,8 @@ class MapAutoCompleteComponent {
|
|
|
5202
5256
|
element.setAttribute(this.options.AttributeList[index].Key, this.options.AttributeList[index].value);
|
|
5203
5257
|
}
|
|
5204
5258
|
}
|
|
5259
|
+
var elementHTML = document.getElementById(this.options.Name);
|
|
5260
|
+
elementHTML.value = this.MapAutoCompleteModel.Text;
|
|
5205
5261
|
}
|
|
5206
5262
|
showGlobalError() {
|
|
5207
5263
|
this.controlUtility.showGlobalError();
|
|
@@ -5245,7 +5301,7 @@ MapAutoCompleteComponent.controlContainerstatic = null;
|
|
|
5245
5301
|
MapAutoCompleteComponent.decorators = [
|
|
5246
5302
|
{ type: Component, args: [{
|
|
5247
5303
|
selector: 'BBSF-MapAutoComplete',
|
|
5248
|
-
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
|
|
5304
|
+
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",
|
|
5249
5305
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
5250
5306
|
},] }
|
|
5251
5307
|
];
|
|
@@ -5883,6 +5939,7 @@ class DropdownOptions extends ControlOptionsBase {
|
|
|
5883
5939
|
/** Set value for item in DropdownList */
|
|
5884
5940
|
this.ItemTempletvalue = "value";
|
|
5885
5941
|
this.ForceDirection = ForceDirection.English;
|
|
5942
|
+
this.NotFoundText = "";
|
|
5886
5943
|
}
|
|
5887
5944
|
}
|
|
5888
5945
|
|
|
@@ -5902,7 +5959,7 @@ class HtmlEditorOptions extends ControlOptionsBase {
|
|
|
5902
5959
|
/** to set Direction of HtmlEditor if HtmlEditor is Arabic or English */
|
|
5903
5960
|
this.ForceDirection = ForceDirection.English;
|
|
5904
5961
|
/** Set Height For */
|
|
5905
|
-
this.Height =
|
|
5962
|
+
this.Height = 5;
|
|
5906
5963
|
}
|
|
5907
5964
|
}
|
|
5908
5965
|
|
|
@@ -6897,6 +6954,21 @@ const TAGS_INPUT_TEMPLATE = `
|
|
|
6897
6954
|
|
|
6898
6955
|
<div class="tags-input">
|
|
6899
6956
|
<span class="tags-input__tag label label-primary badge badge-primary" *ngFor="let tag of tags">
|
|
6957
|
+
|
|
6958
|
+
<span [ngSwitch]="ViewMode">
|
|
6959
|
+
<span *ngSwitchCase="tagInputViewEnum.WithImage">
|
|
6960
|
+
<img style="border-radius:50%; height:40px; width: 40px; float:left; margin-left:5px ; margin-top: 5px;margin-right: 5px;"
|
|
6961
|
+
src="{{(tag.imageURL?tag.imageURL:defaultImageURL)}}" />
|
|
6962
|
+
</span>
|
|
6963
|
+
|
|
6964
|
+
<span *ngSwitchCase="tagInputViewEnum.WithInitial">
|
|
6965
|
+
<div class="user-initials">{{calculateInitials(tag.name)}}</div>
|
|
6966
|
+
</span>
|
|
6967
|
+
|
|
6968
|
+
<span *ngSwitchDefault>
|
|
6969
|
+
</span>
|
|
6970
|
+
|
|
6971
|
+
</span>
|
|
6900
6972
|
{{tag[displayField]}}
|
|
6901
6973
|
<span *ngIf="isDeleteable(tag)" role="button" class="tags-input__tag-remove-btn" (click)="removeTag(tag)"
|
|
6902
6974
|
(touch)="removeTag(tag)">
|
|
@@ -7239,7 +7311,7 @@ BBSFControlsModule.decorators = [
|
|
|
7239
7311
|
NgxTypeaheadModule,
|
|
7240
7312
|
AgmCoreModule.forRoot({
|
|
7241
7313
|
// &language=${UtilityService.CurrentLanguage}
|
|
7242
|
-
apiKey:
|
|
7314
|
+
apiKey: environment$1.BBSF_GoogleMapKey,
|
|
7243
7315
|
libraries: ['places'],
|
|
7244
7316
|
}),
|
|
7245
7317
|
MatGoogleMapsAutocompleteModule,
|