@bnsights/bbsf-controls 1.0.8 → 1.0.12
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/bnsights-bbsf-controls-1.0.12.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +342 -215
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Models/AutocompleteOptions.js +2 -3
- package/esm2015/lib/Shared/Models/ConfirmationModalOptions.js +2 -5
- package/esm2015/lib/Shared/Models/DropdownOptions.js +2 -3
- package/esm2015/lib/Shared/Models/FileUploadOptions.js +2 -3
- package/esm2015/lib/Shared/Models/FormOptions.js +1 -1
- package/esm2015/lib/Shared/Models/HtmlEditorOptions.js +2 -3
- package/esm2015/lib/Shared/Models/ImageUploadOptions.js +2 -3
- package/esm2015/lib/Shared/Models/MapAutoCompleteOptions.js +2 -3
- package/esm2015/lib/Shared/Models/MultiLingualHtmlEditorOptions.js +3 -5
- package/esm2015/lib/Shared/Models/MultiLingualTextAreaOptions.js +4 -6
- package/esm2015/lib/Shared/Models/MultilingualTextBoxOptions.js +4 -6
- package/esm2015/lib/Shared/Models/PhoneOptions.js +2 -3
- package/esm2015/lib/Shared/Models/ProfileImageUploadOptions.js +2 -3
- package/esm2015/lib/Shared/Models/RadioButtonOptions.js +2 -3
- package/esm2015/lib/Shared/Models/TagsInputOptions.js +2 -3
- package/esm2015/lib/Shared/Models/TextAreaOptions.js +2 -3
- package/esm2015/lib/Shared/Models/TextBoxOptions.js +6 -3
- package/esm2015/lib/Shared/Models/ToggleslideOptions.js +2 -3
- package/esm2015/lib/Shared/services/ControlUtility.js +13 -3
- package/esm2015/lib/Shared/services/GlobalSettings.service.js +20 -0
- package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +16 -9
- package/esm2015/lib/controls/ConfirmationModal/ConfirmationModal.component.js +34 -18
- package/esm2015/lib/controls/DropdownList/DropdownList.component.js +10 -7
- package/esm2015/lib/controls/FileUplaod/FileUplaod.component.js +9 -6
- package/esm2015/lib/controls/Form/Form.component.js +24 -5
- package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +9 -6
- package/esm2015/lib/controls/ImageUpload/ImageUpload.component.js +9 -9
- package/esm2015/lib/controls/MapAutoComplete/MapAutoComplete.component.js +8 -9
- package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +45 -34
- package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +24 -20
- package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +23 -17
- package/esm2015/lib/controls/Paging/Paging.component.js +27 -7
- package/esm2015/lib/controls/Phone/Phone.component.js +8 -6
- package/esm2015/lib/controls/ProfileImageUploader/ProfileImageUploader.component.js +8 -6
- package/esm2015/lib/controls/RadioButton/RadioButton.component.js +8 -3
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +16 -22
- package/esm2015/lib/controls/TextArea/TextArea.component.js +8 -6
- package/esm2015/lib/controls/TextBox/TextBox.component.js +9 -3
- package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +8 -7
- package/esm2015/lib/controls/bbsf-controls.module.js +10 -8
- package/esm2015/public-api.js +2 -1
- package/fesm2015/bnsights-bbsf-controls.js +338 -214
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Models/ConfirmationModalOptions.d.ts +1 -2
- package/lib/Shared/Models/FormOptions.d.ts +1 -1
- package/lib/Shared/Models/TextBoxOptions.d.ts +1 -0
- package/lib/Shared/services/ControlUtility.d.ts +3 -1
- package/lib/Shared/services/GlobalSettings.service.d.ts +10 -0
- package/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.d.ts +5 -3
- package/lib/controls/ConfirmationModal/ConfirmationModal.component.d.ts +2 -1
- package/lib/controls/DropdownList/DropdownList.component.d.ts +4 -3
- package/lib/controls/FileUplaod/FileUplaod.component.d.ts +4 -3
- package/lib/controls/Form/Form.component.d.ts +6 -1
- package/lib/controls/HtmlEditor/HtmlEditor.component.d.ts +4 -3
- package/lib/controls/ImageUpload/ImageUpload.component.d.ts +4 -5
- package/lib/controls/MapAutoComplete/MapAutoComplete.component.d.ts +3 -5
- package/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.d.ts +7 -6
- package/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.d.ts +4 -5
- package/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.d.ts +3 -3
- package/lib/controls/Paging/Paging.component.d.ts +7 -5
- package/lib/controls/Phone/Phone.component.d.ts +3 -3
- package/lib/controls/ProfileImageUploader/ProfileImageUploader.component.d.ts +3 -3
- package/lib/controls/RadioButton/RadioButton.component.d.ts +3 -1
- package/lib/controls/TagsInput/TagsInput.component.d.ts +5 -4
- package/lib/controls/TextArea/TextArea.component.d.ts +3 -3
- package/lib/controls/TextBox/TextBox.component.d.ts +3 -1
- package/lib/controls/Toggleslide/toggleslide.component.d.ts +3 -3
- package/package.json +6 -4
- package/public-api.d.ts +1 -0
- package/src/lib/assets/Style.css +18 -1
|
@@ -15,7 +15,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
|
|
15
15
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
16
16
|
import { CommonModule } from '@angular/common';
|
|
17
17
|
import { SearchCountryField, NgxIntlTelInputModule } from 'ngx-intl-tel-input';
|
|
18
|
-
import { UtilityService, ControlValidationService, BBSFTranslateService,
|
|
18
|
+
import { UtilityService, ControlValidationService, BBSFTranslateService, RequestOptionsModel, RequestHandlerService, BBSFUtilitiesModule } from '@bnsights/bbsf-utilities';
|
|
19
19
|
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
|
|
20
20
|
import { Subject, Observable, noop, of } from 'rxjs';
|
|
21
21
|
import { FileUploader, FileLikeObject, FileUploadModule } from 'ng2-file-upload';
|
|
@@ -37,7 +37,6 @@ import { switchMap, map, tap } from 'rxjs/operators';
|
|
|
37
37
|
import { NgxTagsInputModule } from 'ngx-tags-input';
|
|
38
38
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
39
39
|
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
|
40
|
-
import { Title } from '@angular/platform-browser';
|
|
41
40
|
import { LazyMapsAPILoader, MapsAPILoader, AgmCoreModule } from '@agm/core';
|
|
42
41
|
import { MatGoogleMapsAutocompleteModule } from '@angular-material-extensions/google-maps-autocomplete';
|
|
43
42
|
import enGbLocale from '@fullcalendar/core/locales/en-gb';
|
|
@@ -47,6 +46,8 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
|
47
46
|
import { AngularEditorModule } from '@kolkov/angular-editor';
|
|
48
47
|
import { AutocompleteLibModule } from 'angular-ng-autocomplete';
|
|
49
48
|
import { InlineSVGModule } from 'ng-inline-svg';
|
|
49
|
+
import Swal from 'sweetalert2';
|
|
50
|
+
import { SweetAlert2Module } from '@sweetalert2/ngx-sweetalert2';
|
|
50
51
|
|
|
51
52
|
class ErrorMassageValidation {
|
|
52
53
|
// tslint:disable-next-line: deprecation
|
|
@@ -246,8 +247,8 @@ class ControlUtility {
|
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
|
-
showGlobalError() {
|
|
250
|
-
this.controlValidationService.showGlobalError();
|
|
250
|
+
showGlobalError(formId) {
|
|
251
|
+
this.controlValidationService.showGlobalError(null, formId);
|
|
251
252
|
this.scrollToGlobalErrorMassage();
|
|
252
253
|
}
|
|
253
254
|
RemoveRequiredValidation(FormControl, ValidationRole, Options) {
|
|
@@ -262,6 +263,16 @@ class ControlUtility {
|
|
|
262
263
|
FormControl.setValidators(ValidationRole);
|
|
263
264
|
FormControl.updateValueAndValidity();
|
|
264
265
|
}
|
|
266
|
+
addRequiredToControl(FormControl, Options) {
|
|
267
|
+
Options.IsRequired = true;
|
|
268
|
+
FormControl.addValidators(Validators.required);
|
|
269
|
+
FormControl.updateValueAndValidity();
|
|
270
|
+
}
|
|
271
|
+
removeRequiredFromControl(FormControl, Options) {
|
|
272
|
+
Options.IsRequired = false;
|
|
273
|
+
FormControl.removeValidators(Validators.required);
|
|
274
|
+
FormControl.updateValueAndValidity();
|
|
275
|
+
}
|
|
265
276
|
RemoveCustomValidation(FormControl, ValidationRole, CustomValidation) {
|
|
266
277
|
ValidationRole = ValidationRole.filter((e) => e != CustomValidation.functionBody);
|
|
267
278
|
FormControl.setValidators(ValidationRole);
|
|
@@ -474,14 +485,47 @@ class MultipleFileUploadModel {
|
|
|
474
485
|
}
|
|
475
486
|
}
|
|
476
487
|
|
|
488
|
+
var ControlLayout;
|
|
489
|
+
(function (ControlLayout) {
|
|
490
|
+
ControlLayout[ControlLayout["Vertical"] = 1] = "Vertical";
|
|
491
|
+
ControlLayout[ControlLayout["Horizontal"] = 2] = "Horizontal";
|
|
492
|
+
})(ControlLayout || (ControlLayout = {}));
|
|
493
|
+
|
|
494
|
+
var LanguageMode;
|
|
495
|
+
(function (LanguageMode) {
|
|
496
|
+
LanguageMode[LanguageMode["Both_Languages_are_visible"] = 1] = "Both_Languages_are_visible";
|
|
497
|
+
LanguageMode[LanguageMode["English_Language_only_is_visible"] = 2] = "English_Language_only_is_visible";
|
|
498
|
+
LanguageMode[LanguageMode["Arabic_Language_only_is_visible"] = 3] = "Arabic_Language_only_is_visible";
|
|
499
|
+
LanguageMode[LanguageMode["Both_Languages_but_only_English_is_required"] = 4] = "Both_Languages_but_only_English_is_required";
|
|
500
|
+
LanguageMode[LanguageMode["Both_Languages_but_only_Arabic_is_required"] = 5] = "Both_Languages_but_only_Arabic_is_required";
|
|
501
|
+
LanguageMode[LanguageMode["Current_Language_only_is_visible_and_required"] = 6] = "Current_Language_only_is_visible_and_required";
|
|
502
|
+
LanguageMode[LanguageMode["Both_Languages_are_visible_but_only_current_language_is_required"] = 7] = "Both_Languages_are_visible_but_only_current_language_is_required";
|
|
503
|
+
})(LanguageMode || (LanguageMode = {}));
|
|
504
|
+
|
|
505
|
+
class GlobalSettings {
|
|
506
|
+
constructor() {
|
|
507
|
+
/** to set type of view if MultilingualTextArea is Vertical or Horizontal */
|
|
508
|
+
this.ViewType = ControlLayout.Vertical;
|
|
509
|
+
/*multi control placement type*/
|
|
510
|
+
this.MultiControlPlacementType = ControlLayout.Horizontal;
|
|
511
|
+
/**To Set LanguageMode To MultipleLanguageText */
|
|
512
|
+
this.LanguageMode = LanguageMode.Both_Languages_are_visible;
|
|
513
|
+
this.HideAstericsWhenRequired = false;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
GlobalSettings.ɵprov = i0.ɵɵdefineInjectable({ factory: function GlobalSettings_Factory() { return new GlobalSettings(); }, token: GlobalSettings, providedIn: "root" });
|
|
517
|
+
GlobalSettings.decorators = [
|
|
518
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
519
|
+
];
|
|
520
|
+
|
|
477
521
|
class FileUploadComponent {
|
|
478
|
-
constructor(controlContainer, MultipleFileUplaodControlHost, controlUtility, UtilityService,
|
|
522
|
+
constructor(controlContainer, MultipleFileUplaodControlHost, controlUtility, UtilityService, controlValidationService, globalSettings) {
|
|
479
523
|
this.controlContainer = controlContainer;
|
|
480
524
|
this.MultipleFileUplaodControlHost = MultipleFileUplaodControlHost;
|
|
481
525
|
this.controlUtility = controlUtility;
|
|
482
526
|
this.UtilityService = UtilityService;
|
|
483
|
-
this.translate = translate;
|
|
484
527
|
this.controlValidationService = controlValidationService;
|
|
528
|
+
this.globalSettings = globalSettings;
|
|
485
529
|
this.OnChange = new EventEmitter();
|
|
486
530
|
this.ValidationMessage = "";
|
|
487
531
|
this.AcceptedType = "";
|
|
@@ -522,6 +566,8 @@ class FileUploadComponent {
|
|
|
522
566
|
ngOnInit() {
|
|
523
567
|
this.fileUploadModel = new FileUploadModel();
|
|
524
568
|
this.multipleFileUploadModel = new MultipleFileUploadModel();
|
|
569
|
+
if (!this.options.ViewType)
|
|
570
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
525
571
|
if (this.options.Value == null) {
|
|
526
572
|
if (this.options.IsMultipleFile == true) {
|
|
527
573
|
//this.options.Value=this.multipleFileUploadModel
|
|
@@ -776,8 +822,8 @@ FileUploadComponent.ctorParameters = () => [
|
|
|
776
822
|
{ type: FormGroupDirective },
|
|
777
823
|
{ type: ControlUtility },
|
|
778
824
|
{ type: UtilityService },
|
|
779
|
-
{ type:
|
|
780
|
-
{ type:
|
|
825
|
+
{ type: ControlValidationService },
|
|
826
|
+
{ type: GlobalSettings }
|
|
781
827
|
];
|
|
782
828
|
FileUploadComponent.propDecorators = {
|
|
783
829
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -789,26 +835,15 @@ FileUploadComponent.propDecorators = {
|
|
|
789
835
|
class EnglishArabicDTO {
|
|
790
836
|
}
|
|
791
837
|
|
|
792
|
-
var LanguageMode;
|
|
793
|
-
(function (LanguageMode) {
|
|
794
|
-
LanguageMode[LanguageMode["Both_Languages_are_visible"] = 1] = "Both_Languages_are_visible";
|
|
795
|
-
LanguageMode[LanguageMode["English_Language_only_is_visible"] = 2] = "English_Language_only_is_visible";
|
|
796
|
-
LanguageMode[LanguageMode["Arabic_Language_only_is_visible"] = 3] = "Arabic_Language_only_is_visible";
|
|
797
|
-
LanguageMode[LanguageMode["Both_Languages_but_only_English_is_required"] = 4] = "Both_Languages_but_only_English_is_required";
|
|
798
|
-
LanguageMode[LanguageMode["Both_Languages_but_only_Arabic_is_required"] = 5] = "Both_Languages_but_only_Arabic_is_required";
|
|
799
|
-
LanguageMode[LanguageMode["Current_Language_only_is_visible_and_required"] = 6] = "Current_Language_only_is_visible_and_required";
|
|
800
|
-
LanguageMode[LanguageMode["Both_Languages_are_visible_but_only_current_language_is_required"] = 7] = "Both_Languages_are_visible_but_only_current_language_is_required";
|
|
801
|
-
})(LanguageMode || (LanguageMode = {}));
|
|
802
|
-
|
|
803
838
|
class MultiLingualTextBoxComponent {
|
|
804
|
-
constructor(
|
|
805
|
-
this.ErrorHandler = ErrorHandler;
|
|
839
|
+
constructor(MultiLingualTextBoxFormControlHost, controlContainer, controlUtility, UtilityService, translate, controlValidationService, globalSettings) {
|
|
806
840
|
this.MultiLingualTextBoxFormControlHost = MultiLingualTextBoxFormControlHost;
|
|
807
841
|
this.controlContainer = controlContainer;
|
|
808
842
|
this.controlUtility = controlUtility;
|
|
809
843
|
this.UtilityService = UtilityService;
|
|
810
844
|
this.translate = translate;
|
|
811
845
|
this.controlValidationService = controlValidationService;
|
|
846
|
+
this.globalSettings = globalSettings;
|
|
812
847
|
this.OnChange = new EventEmitter();
|
|
813
848
|
this.ArabicWordCount = 0;
|
|
814
849
|
this.ArabicWordCountArray = 0;
|
|
@@ -866,12 +901,18 @@ class MultiLingualTextBoxComponent {
|
|
|
866
901
|
// });
|
|
867
902
|
this.MultiLanguagegroup = new FormGroup({});
|
|
868
903
|
;
|
|
869
|
-
this.MultiLanguagegroup.addControl("
|
|
870
|
-
this.MultiLanguagegroup.addControl("
|
|
871
|
-
this.ArabicFormControl = this.MultiLanguagegroup.controls["
|
|
872
|
-
this.EnglishFormControl = this.MultiLanguagegroup.controls["
|
|
904
|
+
this.MultiLanguagegroup.addControl("Arabic", new FormControl(''));
|
|
905
|
+
this.MultiLanguagegroup.addControl("English", new FormControl(''));
|
|
906
|
+
this.ArabicFormControl = this.MultiLanguagegroup.controls["Arabic"]; // new FormControl('',validationRules);
|
|
907
|
+
this.EnglishFormControl = this.MultiLanguagegroup.controls["English"]; // new FormControl('',validationRules);
|
|
873
908
|
this.group.addControl(this.options.Name, new FormGroup(this.MultiLanguagegroup.controls));
|
|
874
909
|
this.getCustomErrorsMassages();
|
|
910
|
+
if (!this.options.ViewType)
|
|
911
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
912
|
+
if (!this.options.LanguageMode)
|
|
913
|
+
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
914
|
+
if (!this.options.MultiControlPlacementType)
|
|
915
|
+
this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
|
|
875
916
|
if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
|
|
876
917
|
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
|
|
877
918
|
if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
|
|
@@ -937,9 +978,9 @@ class MultiLingualTextBoxComponent {
|
|
|
937
978
|
if (this.EnglishWordCountArray > 0) {
|
|
938
979
|
if (this.EnglishWordCountArray > this.options.MaxWordCount) {
|
|
939
980
|
this.EnglishWordCount = this.options.MaxWordCount;
|
|
940
|
-
this.MultiLanguagegroup.controls["
|
|
941
|
-
this.MultiLanguagegroup.controls["
|
|
942
|
-
this.MultiLanguagegroup.controls["
|
|
981
|
+
this.MultiLanguagegroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
982
|
+
this.MultiLanguagegroup.controls["English"].markAsTouched();
|
|
983
|
+
this.MultiLanguagegroup.controls["English"].invalid;
|
|
943
984
|
}
|
|
944
985
|
else {
|
|
945
986
|
this.EnglishWordCount = this.EnglishWordCountArray;
|
|
@@ -958,9 +999,9 @@ class MultiLingualTextBoxComponent {
|
|
|
958
999
|
if (this.ArabicWordCountArray > 0) {
|
|
959
1000
|
if (this.ArabicWordCountArray > this.options.MaxWordCount) {
|
|
960
1001
|
this.ArabicWordCount = this.options.MaxWordCount;
|
|
961
|
-
this.MultiLanguagegroup.controls["
|
|
962
|
-
this.MultiLanguagegroup.controls["
|
|
963
|
-
this.MultiLanguagegroup.controls["
|
|
1002
|
+
this.MultiLanguagegroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1003
|
+
this.MultiLanguagegroup.controls["Arabic"].markAsTouched();
|
|
1004
|
+
this.MultiLanguagegroup.controls["Arabic"].invalid;
|
|
964
1005
|
}
|
|
965
1006
|
else {
|
|
966
1007
|
this.ArabicWordCount = this.ArabicWordCountArray;
|
|
@@ -1098,18 +1139,18 @@ MultiLingualTextBoxComponent.controlContainerstatic = null;
|
|
|
1098
1139
|
MultiLingualTextBoxComponent.decorators = [
|
|
1099
1140
|
{ type: Component, args: [{
|
|
1100
1141
|
selector: 'BBSF-MultiLingualTextBox',
|
|
1101
|
-
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\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPositionEN==1)?'left':'right'\" *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)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"
|
|
1142
|
+
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':'right'\" *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)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"English\"\r\n [hidden]=\"options.IsHideEnglishFields\"\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 #userinputEnglish>\r\n\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 class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}} words</div>\r\n </div>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(EnglishFormControl.invalid && EnglishFormControl.touched)\">\r\n {{getErrorValidation(EnglishFormControl.errors|keyvalue)}}\r\n </div>\r\n\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\r\n <!-- <div *ngIf=\"EnglishFormControl.valid\">{{resetError()}}</div> -->\r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div [ngClass]=\"(options.MultiControlPlacementType==1)?'col-md-12':'col-md-6'\">\r\n\r\n <div class=\"row\" *ngIf=\"ShowArabicTextBox\">\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}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\"\r\n class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n\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)?'right':'left'\" *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)=\"showArabicWordCount(true)\" (focusout)=\"showArabicWordCount(false)\"\r\n [hidden]=\"options.IsHideArabicFields\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\"\r\n 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 (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 class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}} Words</div>\r\n\r\n </div>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ArabicFormControl.invalid && ArabicFormControl.touched)\">\r\n {{getErrorValidation(ArabicFormControl.errors|keyvalue)}}\r\n </div>\r\n\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 \r\n \r\n\r\n <!-- <div *ngIf=\"ArabicFormControl.valid\">{{resetError()}}</div> -->\r\n \r\n <div *ngIf=\"group.valid\">{{resetError()}}</div>\r\n\r\n </div>\r\n \r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
1102
1143
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1103
1144
|
},] }
|
|
1104
1145
|
];
|
|
1105
1146
|
MultiLingualTextBoxComponent.ctorParameters = () => [
|
|
1106
|
-
{ type: ErrorMassageValidation },
|
|
1107
1147
|
{ type: FormGroupDirective },
|
|
1108
1148
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
1109
1149
|
{ type: ControlUtility },
|
|
1110
1150
|
{ type: UtilityService },
|
|
1111
1151
|
{ type: BBSFTranslateService },
|
|
1112
|
-
{ type: ControlValidationService }
|
|
1152
|
+
{ type: ControlValidationService },
|
|
1153
|
+
{ type: GlobalSettings }
|
|
1113
1154
|
];
|
|
1114
1155
|
MultiLingualTextBoxComponent.propDecorators = {
|
|
1115
1156
|
group: [{ type: Input }],
|
|
@@ -1118,13 +1159,13 @@ MultiLingualTextBoxComponent.propDecorators = {
|
|
|
1118
1159
|
};
|
|
1119
1160
|
|
|
1120
1161
|
class TextAreaComponent {
|
|
1121
|
-
constructor(
|
|
1122
|
-
this.ErrorHandler = ErrorHandler;
|
|
1162
|
+
constructor(controlUtility, controlContainer, TextAreaControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
1123
1163
|
this.controlUtility = controlUtility;
|
|
1124
1164
|
this.controlContainer = controlContainer;
|
|
1125
1165
|
this.TextAreaControlHost = TextAreaControlHost;
|
|
1126
1166
|
this.UtilityService = UtilityService;
|
|
1127
1167
|
this.controlValidationService = controlValidationService;
|
|
1168
|
+
this.globalSettings = globalSettings;
|
|
1128
1169
|
this.OnChange = new EventEmitter();
|
|
1129
1170
|
this.WordCount = 0;
|
|
1130
1171
|
this.WordCountArray = 0;
|
|
@@ -1161,6 +1202,8 @@ class TextAreaComponent {
|
|
|
1161
1202
|
this.controlValidationService.isCreatedBefor = false;
|
|
1162
1203
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
1163
1204
|
this.TextAreaFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
1205
|
+
if (!this.options.ViewType)
|
|
1206
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1164
1207
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
1165
1208
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
1166
1209
|
this.TextAreaFormControl.setValue(this.options.Value);
|
|
@@ -1247,12 +1290,12 @@ TextAreaComponent.decorators = [
|
|
|
1247
1290
|
},] }
|
|
1248
1291
|
];
|
|
1249
1292
|
TextAreaComponent.ctorParameters = () => [
|
|
1250
|
-
{ type: ErrorMassageValidation },
|
|
1251
1293
|
{ type: ControlUtility },
|
|
1252
1294
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
1253
1295
|
{ type: FormGroupDirective },
|
|
1254
1296
|
{ type: UtilityService },
|
|
1255
|
-
{ type: ControlValidationService }
|
|
1297
|
+
{ type: ControlValidationService },
|
|
1298
|
+
{ type: GlobalSettings }
|
|
1256
1299
|
];
|
|
1257
1300
|
TextAreaComponent.propDecorators = {
|
|
1258
1301
|
group: [{ type: Input }],
|
|
@@ -1261,14 +1304,13 @@ TextAreaComponent.propDecorators = {
|
|
|
1261
1304
|
};
|
|
1262
1305
|
|
|
1263
1306
|
class MultiLingualTextAreaComponent {
|
|
1264
|
-
constructor(
|
|
1265
|
-
this.ErrorHandler = ErrorHandler;
|
|
1307
|
+
constructor(MultiLingualTextAreaFormControlHost, controlContainer, controlUtility, UtilityService, controlValidationService, globalSettings) {
|
|
1266
1308
|
this.MultiLingualTextAreaFormControlHost = MultiLingualTextAreaFormControlHost;
|
|
1267
1309
|
this.controlContainer = controlContainer;
|
|
1268
1310
|
this.controlUtility = controlUtility;
|
|
1269
1311
|
this.UtilityService = UtilityService;
|
|
1270
|
-
this.translate = translate;
|
|
1271
1312
|
this.controlValidationService = controlValidationService;
|
|
1313
|
+
this.globalSettings = globalSettings;
|
|
1272
1314
|
this.OnChange = new EventEmitter();
|
|
1273
1315
|
this.ArabicWordCount = 0;
|
|
1274
1316
|
this.ArabicWordCountArray = 0;
|
|
@@ -1328,15 +1370,21 @@ class MultiLingualTextAreaComponent {
|
|
|
1328
1370
|
// this.CurrentLanguage = event.lang
|
|
1329
1371
|
// this.showInputUsingLanguageMode();
|
|
1330
1372
|
// });
|
|
1373
|
+
if (!this.options.ViewType)
|
|
1374
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1375
|
+
if (!this.options.LanguageMode)
|
|
1376
|
+
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
1377
|
+
if (!this.options.MultiControlPlacementType)
|
|
1378
|
+
this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
|
|
1331
1379
|
if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
|
|
1332
1380
|
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
|
|
1333
1381
|
if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
|
|
1334
1382
|
this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
|
|
1335
1383
|
this.MultiLanguageTextAreagroup = new FormGroup({});
|
|
1336
|
-
this.MultiLanguageTextAreagroup.addControl("
|
|
1337
|
-
this.MultiLanguageTextAreagroup.addControl("
|
|
1338
|
-
this.ArabicTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["
|
|
1339
|
-
this.EnglishTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["
|
|
1384
|
+
this.MultiLanguageTextAreagroup.addControl("Arabic", new FormControl(''));
|
|
1385
|
+
this.MultiLanguageTextAreagroup.addControl("English", new FormControl(''));
|
|
1386
|
+
this.ArabicTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["Arabic"]; // new FormControl('',validationRules);
|
|
1387
|
+
this.EnglishTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["English"]; // new FormControl('',validationRules);
|
|
1340
1388
|
this.group.addControl(this.options.Name, new FormGroup(this.MultiLanguageTextAreagroup.controls));
|
|
1341
1389
|
this.getCustomErrorsMassages();
|
|
1342
1390
|
switch (this.options.Type) {
|
|
@@ -1405,9 +1453,9 @@ class MultiLingualTextAreaComponent {
|
|
|
1405
1453
|
if (this.EnglishWordCountArray > 0) {
|
|
1406
1454
|
if (this.EnglishWordCountArray > this.options.MaxWordCount) {
|
|
1407
1455
|
this.EnglishWordCount = this.options.MaxWordCount;
|
|
1408
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1409
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1410
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1456
|
+
this.MultiLanguageTextAreagroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1457
|
+
this.MultiLanguageTextAreagroup.controls["English"].markAsTouched();
|
|
1458
|
+
this.MultiLanguageTextAreagroup.controls["English"].invalid;
|
|
1411
1459
|
}
|
|
1412
1460
|
else {
|
|
1413
1461
|
this.EnglishWordCount = this.EnglishWordCountArray;
|
|
@@ -1426,9 +1474,9 @@ class MultiLingualTextAreaComponent {
|
|
|
1426
1474
|
if (this.ArabicWordCountArray > 0) {
|
|
1427
1475
|
if (this.ArabicWordCountArray > this.options.MaxWordCount) {
|
|
1428
1476
|
this.ArabicWordCount = this.options.MaxWordCount;
|
|
1429
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1430
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1431
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1477
|
+
this.MultiLanguageTextAreagroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1478
|
+
this.MultiLanguageTextAreagroup.controls["Arabic"].markAsTouched();
|
|
1479
|
+
this.MultiLanguageTextAreagroup.controls["Arabic"].invalid;
|
|
1432
1480
|
}
|
|
1433
1481
|
else {
|
|
1434
1482
|
this.ArabicWordCount = this.ArabicWordCountArray;
|
|
@@ -1557,18 +1605,17 @@ MultiLingualTextAreaComponent.controlContainerstatic = null;
|
|
|
1557
1605
|
MultiLingualTextAreaComponent.decorators = [
|
|
1558
1606
|
{ type: Component, args: [{
|
|
1559
1607
|
selector: 'BBSF-MultiLingualTextArea',
|
|
1560
|
-
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)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"
|
|
1608
|
+
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)=\"showEnglishWordCount(true)\" (focusout)=\"showEnglishWordCount(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 <div class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowEnglishWordCount\">{{EnglishWordCount}}/{{options.MaxWordCount}} Words</div>\r\n\r\n </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 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.IsHideArabicLable\">\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)=\"showArabicWordCount(true)\" (focusout)=\"showArabicWordCount(false)\"\r\n [hidden]=\"options.IsHideArabicFields\" maxlength=\"{{options.MaxLength}}\"\r\n minlength=\"{{options.MinLength}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"Arabic\" rows=\"{{options.Rows}}\"\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 class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowArabicWordCount\">{{ArabicWordCount}}/{{options.MaxWordCount}}Words</div>\r\n\r\n </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 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\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\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1561
1609
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1562
1610
|
},] }
|
|
1563
1611
|
];
|
|
1564
1612
|
MultiLingualTextAreaComponent.ctorParameters = () => [
|
|
1565
|
-
{ type: ErrorMassageValidation },
|
|
1566
1613
|
{ type: FormGroupDirective },
|
|
1567
1614
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
1568
1615
|
{ type: ControlUtility },
|
|
1569
1616
|
{ type: UtilityService },
|
|
1570
|
-
{ type:
|
|
1571
|
-
{ type:
|
|
1617
|
+
{ type: ControlValidationService },
|
|
1618
|
+
{ type: GlobalSettings }
|
|
1572
1619
|
];
|
|
1573
1620
|
MultiLingualTextAreaComponent.propDecorators = {
|
|
1574
1621
|
group: [{ type: Input }],
|
|
@@ -1685,14 +1732,14 @@ CheckBoxComponent.propDecorators = {
|
|
|
1685
1732
|
|
|
1686
1733
|
class DropdownListComponent {
|
|
1687
1734
|
// tslint:disable-next-line: max-line-length
|
|
1688
|
-
constructor(onChangeService, controlUtility, controlContainer, DropdownListControlHost, UtilityService,
|
|
1735
|
+
constructor(onChangeService, controlUtility, controlContainer, DropdownListControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
1689
1736
|
this.onChangeService = onChangeService;
|
|
1690
1737
|
this.controlUtility = controlUtility;
|
|
1691
1738
|
this.controlContainer = controlContainer;
|
|
1692
1739
|
this.DropdownListControlHost = DropdownListControlHost;
|
|
1693
1740
|
this.UtilityService = UtilityService;
|
|
1694
|
-
this.translate = translate;
|
|
1695
1741
|
this.controlValidationService = controlValidationService;
|
|
1742
|
+
this.globalSettings = globalSettings;
|
|
1696
1743
|
this.dropdownSettings = {};
|
|
1697
1744
|
this.SelectedList = [];
|
|
1698
1745
|
this.OnChange = new EventEmitter();
|
|
@@ -1754,6 +1801,8 @@ class DropdownListComponent {
|
|
|
1754
1801
|
};
|
|
1755
1802
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
1756
1803
|
this.DropdownListFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
1804
|
+
if (!this.options.ViewType)
|
|
1805
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1757
1806
|
if (this.options.CustomValidation.length > 0) {
|
|
1758
1807
|
let Validations = this.options.CustomValidation;
|
|
1759
1808
|
for (let index = 0; index < Validations.length; index++) {
|
|
@@ -1830,7 +1879,7 @@ DropdownListComponent.decorators = [
|
|
|
1830
1879
|
{ type: Component, args: [{
|
|
1831
1880
|
// tslint:disable-next-line: component-selector
|
|
1832
1881
|
selector: 'BBSF-DropdownList',
|
|
1833
|
-
template: "<div class=\"b-control b-dropdown-list\">\r\n
|
|
1882
|
+
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]=\"'No data found.'\" [maxSelectedItems]=\"options.LimitSelection\"\r\n [searchable]=\"options.AllowSearchFilter\" [multiple]=\"!options.SingleSelection\" [readonly]=\"options.IsDisabled\"\r\n [searchable]=\"true\" [clearable]=\"true\" placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n [selectableGroup]=\"true\" [selectableGroupAsModel]=\"false\" formControlName=\"{{options.Name}}\"\r\n [(ngModel)]=\"SelectedList\" (change)=\"onItemSelect($event[options.ItemTempletkey])\" (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($event.target.value)\"\r\n [disabled]=\"options.IsDisabled\" formControlName=\"{{options.Name}}\">\r\n <option value=\"\" disabled>--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>",
|
|
1834
1883
|
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"]
|
|
1835
1884
|
},] }
|
|
1836
1885
|
];
|
|
@@ -1840,8 +1889,8 @@ DropdownListComponent.ctorParameters = () => [
|
|
|
1840
1889
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
1841
1890
|
{ type: FormGroupDirective },
|
|
1842
1891
|
{ type: UtilityService },
|
|
1843
|
-
{ type:
|
|
1844
|
-
{ type:
|
|
1892
|
+
{ type: ControlValidationService },
|
|
1893
|
+
{ type: GlobalSettings }
|
|
1845
1894
|
];
|
|
1846
1895
|
DropdownListComponent.propDecorators = {
|
|
1847
1896
|
group: [{ type: Input }],
|
|
@@ -1852,13 +1901,13 @@ DropdownListComponent.propDecorators = {
|
|
|
1852
1901
|
|
|
1853
1902
|
class PhoneComponent {
|
|
1854
1903
|
// tslint:disable-next-line: max-line-length
|
|
1855
|
-
constructor(
|
|
1856
|
-
this.ErrorHandler = ErrorHandler;
|
|
1904
|
+
constructor(controlUtility, controlContainer, PhoneControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
1857
1905
|
this.controlUtility = controlUtility;
|
|
1858
1906
|
this.controlContainer = controlContainer;
|
|
1859
1907
|
this.PhoneControlHost = PhoneControlHost;
|
|
1860
1908
|
this.UtilityService = UtilityService;
|
|
1861
1909
|
this.controlValidationService = controlValidationService;
|
|
1910
|
+
this.globalSettings = globalSettings;
|
|
1862
1911
|
this.OnChange = new EventEmitter();
|
|
1863
1912
|
this.SearchCountryField = SearchCountryField;
|
|
1864
1913
|
// TooltipLabel = TooltipLabel;
|
|
@@ -1895,6 +1944,8 @@ class PhoneComponent {
|
|
|
1895
1944
|
this.controlValidationService.isCreatedBefor = false;
|
|
1896
1945
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
1897
1946
|
this.PhoneFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
1947
|
+
if (!this.options.ViewType)
|
|
1948
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1898
1949
|
if (this.options.IsRequired) {
|
|
1899
1950
|
this.validationRules.push(Validators.required);
|
|
1900
1951
|
}
|
|
@@ -1945,12 +1996,12 @@ PhoneComponent.decorators = [
|
|
|
1945
1996
|
},] }
|
|
1946
1997
|
];
|
|
1947
1998
|
PhoneComponent.ctorParameters = () => [
|
|
1948
|
-
{ type: ErrorMassageValidation },
|
|
1949
1999
|
{ type: ControlUtility },
|
|
1950
2000
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
1951
2001
|
{ type: FormGroupDirective },
|
|
1952
2002
|
{ type: UtilityService },
|
|
1953
|
-
{ type: ControlValidationService }
|
|
2003
|
+
{ type: ControlValidationService },
|
|
2004
|
+
{ type: GlobalSettings }
|
|
1954
2005
|
];
|
|
1955
2006
|
PhoneComponent.propDecorators = {
|
|
1956
2007
|
group: [{ type: Input }],
|
|
@@ -1960,24 +2011,25 @@ PhoneComponent.propDecorators = {
|
|
|
1960
2011
|
|
|
1961
2012
|
class ToggleslideComponent {
|
|
1962
2013
|
// tslint:disable-next-line: max-line-length
|
|
1963
|
-
constructor(
|
|
1964
|
-
this.ErrorHandler = ErrorHandler;
|
|
2014
|
+
constructor(controlUtility, controlContainer, ToggleslideControlHost, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
1965
2015
|
this.controlUtility = controlUtility;
|
|
1966
2016
|
this.controlContainer = controlContainer;
|
|
1967
2017
|
this.ToggleslideControlHost = ToggleslideControlHost;
|
|
1968
2018
|
this.TextControlHost = TextControlHost;
|
|
1969
2019
|
this.UtilityService = UtilityService;
|
|
1970
2020
|
this.controlValidationService = controlValidationService;
|
|
2021
|
+
this.globalSettings = globalSettings;
|
|
1971
2022
|
this.SlideValue = false;
|
|
1972
2023
|
ToggleslideComponent.controlContainerstatic = this.controlContainer;
|
|
1973
2024
|
}
|
|
1974
2025
|
ngOnInit() {
|
|
1975
|
-
;
|
|
1976
2026
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
1977
2027
|
this.ToggleslideFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
1978
2028
|
let validationRules = [];
|
|
1979
2029
|
let validationRulesasync = [];
|
|
1980
2030
|
this.SlideValue = this.options.Value == undefined ? false : this.options.Value;
|
|
2031
|
+
if (!this.options.ViewType)
|
|
2032
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1981
2033
|
if (this.options.IsDisabled) {
|
|
1982
2034
|
this.ToggleslideFormControl.disable();
|
|
1983
2035
|
}
|
|
@@ -2011,13 +2063,13 @@ ToggleslideComponent.decorators = [
|
|
|
2011
2063
|
},] }
|
|
2012
2064
|
];
|
|
2013
2065
|
ToggleslideComponent.ctorParameters = () => [
|
|
2014
|
-
{ type: ErrorMassageValidation },
|
|
2015
2066
|
{ type: ControlUtility },
|
|
2016
2067
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
2017
2068
|
{ type: FormGroupDirective },
|
|
2018
2069
|
{ type: FormGroupDirective },
|
|
2019
2070
|
{ type: UtilityService },
|
|
2020
|
-
{ type: ControlValidationService }
|
|
2071
|
+
{ type: ControlValidationService },
|
|
2072
|
+
{ type: GlobalSettings }
|
|
2021
2073
|
];
|
|
2022
2074
|
ToggleslideComponent.propDecorators = {
|
|
2023
2075
|
group: [{ type: Input }],
|
|
@@ -2025,14 +2077,14 @@ ToggleslideComponent.propDecorators = {
|
|
|
2025
2077
|
};
|
|
2026
2078
|
|
|
2027
2079
|
class HtmlEditorComponent {
|
|
2028
|
-
constructor(zone, controlUtility, controlContainer, HtmlEditorControlHost, UtilityService,
|
|
2080
|
+
constructor(zone, controlUtility, controlContainer, HtmlEditorControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2029
2081
|
this.zone = zone;
|
|
2030
2082
|
this.controlUtility = controlUtility;
|
|
2031
2083
|
this.controlContainer = controlContainer;
|
|
2032
2084
|
this.HtmlEditorControlHost = HtmlEditorControlHost;
|
|
2033
2085
|
this.UtilityService = UtilityService;
|
|
2034
|
-
this.translate = translate;
|
|
2035
2086
|
this.controlValidationService = controlValidationService;
|
|
2087
|
+
this.globalSettings = globalSettings;
|
|
2036
2088
|
this.OnChange = new EventEmitter();
|
|
2037
2089
|
this.WordCount = 0;
|
|
2038
2090
|
this.WordCountArray = 0;
|
|
@@ -2149,6 +2201,8 @@ class HtmlEditorComponent {
|
|
|
2149
2201
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
2150
2202
|
this.HtmlEditorFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
2151
2203
|
this.HtmlEditorFormControl.setValue(this.options.Value);
|
|
2204
|
+
if (!this.options.ViewType)
|
|
2205
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2152
2206
|
if (this.options.CustomValidation.length > 0) {
|
|
2153
2207
|
let Validations = this.options.CustomValidation;
|
|
2154
2208
|
for (let index = 0; index < Validations.length; index++) {
|
|
@@ -2213,8 +2267,8 @@ HtmlEditorComponent.ctorParameters = () => [
|
|
|
2213
2267
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
2214
2268
|
{ type: FormGroupDirective },
|
|
2215
2269
|
{ type: UtilityService },
|
|
2216
|
-
{ type:
|
|
2217
|
-
{ type:
|
|
2270
|
+
{ type: ControlValidationService },
|
|
2271
|
+
{ type: GlobalSettings }
|
|
2218
2272
|
];
|
|
2219
2273
|
HtmlEditorComponent.propDecorators = {
|
|
2220
2274
|
group: [{ type: Input }],
|
|
@@ -2223,14 +2277,13 @@ HtmlEditorComponent.propDecorators = {
|
|
|
2223
2277
|
};
|
|
2224
2278
|
|
|
2225
2279
|
class MultiLingualHtmlEditorComponent {
|
|
2226
|
-
constructor(
|
|
2227
|
-
this.ErrorHandler = ErrorHandler;
|
|
2280
|
+
constructor(MultiLingualHtmlEditorFormControlHost, controlContainer, controlUtility, UtilityService, controlValidationService, globalSettings) {
|
|
2228
2281
|
this.MultiLingualHtmlEditorFormControlHost = MultiLingualHtmlEditorFormControlHost;
|
|
2229
2282
|
this.controlContainer = controlContainer;
|
|
2230
2283
|
this.controlUtility = controlUtility;
|
|
2231
2284
|
this.UtilityService = UtilityService;
|
|
2232
|
-
this.translate = translate;
|
|
2233
2285
|
this.controlValidationService = controlValidationService;
|
|
2286
|
+
this.globalSettings = globalSettings;
|
|
2234
2287
|
this.OnChange = new EventEmitter();
|
|
2235
2288
|
this.CurrentLanguage = "";
|
|
2236
2289
|
this.ArabicValidationRules = [];
|
|
@@ -2242,6 +2295,8 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2242
2295
|
this.validationRulesasync = [];
|
|
2243
2296
|
this.ArabicLetterOnly = "";
|
|
2244
2297
|
this.EnglishLetterOnly = "";
|
|
2298
|
+
this.englishValue = null;
|
|
2299
|
+
this.arabicValue = null;
|
|
2245
2300
|
this.resetError = () => {
|
|
2246
2301
|
this.controlValidationService.RemoveGlobalError();
|
|
2247
2302
|
};
|
|
@@ -2279,6 +2334,10 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2279
2334
|
}
|
|
2280
2335
|
ngOnInit() {
|
|
2281
2336
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2337
|
+
if (!this.options.ViewType)
|
|
2338
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2339
|
+
if (!this.options.LanguageMode)
|
|
2340
|
+
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
2282
2341
|
this.editorEnglishConfig = {
|
|
2283
2342
|
editable: !this.options.IsDisabled,
|
|
2284
2343
|
spellcheck: true,
|
|
@@ -2400,10 +2459,10 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2400
2459
|
// }
|
|
2401
2460
|
this.MultilingualHtmlEditorgroup = new FormGroup({});
|
|
2402
2461
|
;
|
|
2403
|
-
this.MultilingualHtmlEditorgroup.addControl("
|
|
2404
|
-
this.MultilingualHtmlEditorgroup.addControl("
|
|
2405
|
-
this.ArabicHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["
|
|
2406
|
-
this.EnglishHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["
|
|
2462
|
+
this.MultilingualHtmlEditorgroup.addControl("Arabic", new FormControl(''));
|
|
2463
|
+
this.MultilingualHtmlEditorgroup.addControl("English", new FormControl(''));
|
|
2464
|
+
this.ArabicHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["Arabic"]; // new FormControl('',validationRules);
|
|
2465
|
+
this.EnglishHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["English"]; // new FormControl('',validationRules);
|
|
2407
2466
|
this.group.addControl(this.options.Name, new FormGroup(this.MultilingualHtmlEditorgroup.controls));
|
|
2408
2467
|
this.getCustomErrorsMassages();
|
|
2409
2468
|
switch (this.options.Type) {
|
|
@@ -2463,30 +2522,37 @@ class MultiLingualHtmlEditorComponent {
|
|
|
2463
2522
|
});
|
|
2464
2523
|
});
|
|
2465
2524
|
}
|
|
2466
|
-
onTextChange() {
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
this.MultilingualHtmlEditorgroup.controls["
|
|
2481
|
-
this.
|
|
2525
|
+
onTextChange(type) {
|
|
2526
|
+
if (type == "en") {
|
|
2527
|
+
this.englishValue = this.MultilingualHtmlEditorgroup.controls["English"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["English"].value;
|
|
2528
|
+
if (this.englishValue)
|
|
2529
|
+
this.EnglishHtmlEditorFormControl.setValue(this.englishValue);
|
|
2530
|
+
let EngliswordCountArray = this.EnglishHtmlEditorFormControl.value.split(" ").length;
|
|
2531
|
+
if (EngliswordCountArray > 0) {
|
|
2532
|
+
if (EngliswordCountArray > this.options.MaxWordCount)
|
|
2533
|
+
this.MultilingualHtmlEditorgroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
2534
|
+
this.MultilingualHtmlEditorgroup.controls["English"].markAsTouched();
|
|
2535
|
+
this.MultilingualHtmlEditorgroup.controls["English"].invalid;
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
if (type == "ar") {
|
|
2539
|
+
this.arabicValue = this.MultilingualHtmlEditorgroup.controls["Arabic"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["Arabic"].value;
|
|
2540
|
+
if (this.arabicValue)
|
|
2541
|
+
this.ArabicHtmlEditorFormControl.setValue(this.arabicValue);
|
|
2542
|
+
let ArabicwordCountArray = this.ArabicHtmlEditorFormControl.value.split(" ").length;
|
|
2543
|
+
if (ArabicwordCountArray > 0) {
|
|
2544
|
+
if (ArabicwordCountArray > this.options.MaxWordCount)
|
|
2545
|
+
this.MultilingualHtmlEditorgroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
2546
|
+
this.MultilingualHtmlEditorgroup.controls["Arabic"].markAsTouched();
|
|
2547
|
+
this.MultilingualHtmlEditorgroup.controls["Arabic"].invalid;
|
|
2548
|
+
}
|
|
2482
2549
|
}
|
|
2483
2550
|
let mulitLangModel = new EnglishArabicDTO();
|
|
2484
|
-
mulitLangModel.Arabic = arabicValue;
|
|
2485
|
-
mulitLangModel.English = englishValue;
|
|
2486
|
-
this.ArabicHtmlEditorFormControl.setValue(arabicValue);
|
|
2487
|
-
this.EnglishHtmlEditorFormControl.setValue(englishValue);
|
|
2551
|
+
mulitLangModel.Arabic = this.arabicValue;
|
|
2552
|
+
mulitLangModel.English = this.englishValue;
|
|
2488
2553
|
this.OnChange.emit(mulitLangModel);
|
|
2489
|
-
this.
|
|
2554
|
+
if (this.arabicValue && this.englishValue)
|
|
2555
|
+
this.group.get(this.options.Name).setValue(mulitLangModel);
|
|
2490
2556
|
}
|
|
2491
2557
|
showGlobalError() {
|
|
2492
2558
|
this.controlUtility.showGlobalError();
|
|
@@ -2577,18 +2643,17 @@ MultiLingualHtmlEditorComponent.controlContainerstatic = null;
|
|
|
2577
2643
|
MultiLingualHtmlEditorComponent.decorators = [
|
|
2578
2644
|
{ type: Component, args: [{
|
|
2579
2645
|
selector: 'BBSF-MultiLingualHtmlEditor',
|
|
2580
|
-
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
|
|
2646
|
+
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.IsHideArabicLable\">\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",
|
|
2581
2647
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
2582
2648
|
},] }
|
|
2583
2649
|
];
|
|
2584
2650
|
MultiLingualHtmlEditorComponent.ctorParameters = () => [
|
|
2585
|
-
{ type: ErrorMassageValidation },
|
|
2586
2651
|
{ type: FormGroupDirective },
|
|
2587
2652
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
2588
2653
|
{ type: ControlUtility },
|
|
2589
2654
|
{ type: UtilityService },
|
|
2590
|
-
{ type:
|
|
2591
|
-
{ type:
|
|
2655
|
+
{ type: ControlValidationService },
|
|
2656
|
+
{ type: GlobalSettings }
|
|
2592
2657
|
];
|
|
2593
2658
|
MultiLingualHtmlEditorComponent.propDecorators = {
|
|
2594
2659
|
group: [{ type: Input }],
|
|
@@ -2597,15 +2662,14 @@ MultiLingualHtmlEditorComponent.propDecorators = {
|
|
|
2597
2662
|
};
|
|
2598
2663
|
|
|
2599
2664
|
class ImageUploaderComponent {
|
|
2600
|
-
constructor(zone,
|
|
2665
|
+
constructor(zone, controlUtility, controlContainer, ImageUplaoderControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2601
2666
|
this.zone = zone;
|
|
2602
|
-
this.ErrorHandler = ErrorHandler;
|
|
2603
2667
|
this.controlUtility = controlUtility;
|
|
2604
2668
|
this.controlContainer = controlContainer;
|
|
2605
2669
|
this.ImageUplaoderControlHost = ImageUplaoderControlHost;
|
|
2606
2670
|
this.UtilityService = UtilityService;
|
|
2607
|
-
this.translate = translate;
|
|
2608
2671
|
this.controlValidationService = controlValidationService;
|
|
2672
|
+
this.globalSettings = globalSettings;
|
|
2609
2673
|
this.files = [];
|
|
2610
2674
|
this.ImageSource = "./src/assets/images/uploadimg.png";
|
|
2611
2675
|
this.OnChange = new EventEmitter();
|
|
@@ -2652,6 +2716,8 @@ class ImageUploaderComponent {
|
|
|
2652
2716
|
}
|
|
2653
2717
|
ngOnInit() {
|
|
2654
2718
|
this.controlValidationService.isCreatedBefor = false;
|
|
2719
|
+
if (!this.options.ViewType)
|
|
2720
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2655
2721
|
if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
|
|
2656
2722
|
this.ImageSource = this.options.DefaultImageSrc;
|
|
2657
2723
|
if (this.options.AllowImageCropper) {
|
|
@@ -2882,13 +2948,12 @@ ImageUploaderComponent.decorators = [
|
|
|
2882
2948
|
];
|
|
2883
2949
|
ImageUploaderComponent.ctorParameters = () => [
|
|
2884
2950
|
{ type: NgZone },
|
|
2885
|
-
{ type: ErrorMassageValidation },
|
|
2886
2951
|
{ type: ControlUtility },
|
|
2887
2952
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
2888
2953
|
{ type: FormGroupDirective },
|
|
2889
2954
|
{ type: UtilityService },
|
|
2890
|
-
{ type:
|
|
2891
|
-
{ type:
|
|
2955
|
+
{ type: ControlValidationService },
|
|
2956
|
+
{ type: GlobalSettings }
|
|
2892
2957
|
];
|
|
2893
2958
|
ImageUploaderComponent.propDecorators = {
|
|
2894
2959
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -2902,14 +2967,14 @@ class ProfilePictureDTO {
|
|
|
2902
2967
|
}
|
|
2903
2968
|
|
|
2904
2969
|
class ProfileImageUploaderComponent {
|
|
2905
|
-
constructor(zone,
|
|
2970
|
+
constructor(zone, controlUtility, controlContainer, ProfileImageUploaderControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2906
2971
|
this.zone = zone;
|
|
2907
|
-
this.ErrorHandler = ErrorHandler;
|
|
2908
2972
|
this.controlUtility = controlUtility;
|
|
2909
2973
|
this.controlContainer = controlContainer;
|
|
2910
2974
|
this.ProfileImageUploaderControlHost = ProfileImageUploaderControlHost;
|
|
2911
2975
|
this.UtilityService = UtilityService;
|
|
2912
2976
|
this.controlValidationService = controlValidationService;
|
|
2977
|
+
this.globalSettings = globalSettings;
|
|
2913
2978
|
this.files = [];
|
|
2914
2979
|
this.ImageSource = "./src/assets/images/userimg.png";
|
|
2915
2980
|
this.OnChange = new EventEmitter();
|
|
@@ -2957,6 +3022,8 @@ class ProfileImageUploaderComponent {
|
|
|
2957
3022
|
}
|
|
2958
3023
|
ngOnInit() {
|
|
2959
3024
|
this.controlValidationService.isCreatedBefor = false;
|
|
3025
|
+
if (!this.options.ViewType)
|
|
3026
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2960
3027
|
if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
|
|
2961
3028
|
this.ImageSource = this.options.DefaultImageSrc;
|
|
2962
3029
|
this.config = {
|
|
@@ -3209,12 +3276,12 @@ ProfileImageUploaderComponent.decorators = [
|
|
|
3209
3276
|
];
|
|
3210
3277
|
ProfileImageUploaderComponent.ctorParameters = () => [
|
|
3211
3278
|
{ type: NgZone },
|
|
3212
|
-
{ type: ErrorMassageValidation },
|
|
3213
3279
|
{ type: ControlUtility },
|
|
3214
3280
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
3215
3281
|
{ type: FormGroupDirective },
|
|
3216
3282
|
{ type: UtilityService },
|
|
3217
|
-
{ type: ControlValidationService }
|
|
3283
|
+
{ type: ControlValidationService },
|
|
3284
|
+
{ type: GlobalSettings }
|
|
3218
3285
|
];
|
|
3219
3286
|
ProfileImageUploaderComponent.propDecorators = {
|
|
3220
3287
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -3233,15 +3300,16 @@ class AutocompleteDTO {
|
|
|
3233
3300
|
|
|
3234
3301
|
class AutocompleteTextBoxComponent {
|
|
3235
3302
|
// tslint:disable-next-line: max-line-length
|
|
3236
|
-
constructor(http, ErrorHandler, controlUtility, controlContainer, AutocompleteTextBoxControlHost, UtilityService,
|
|
3303
|
+
constructor(http, ErrorHandler, requestHandlerService, controlUtility, controlContainer, AutocompleteTextBoxControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3237
3304
|
this.http = http;
|
|
3238
3305
|
this.ErrorHandler = ErrorHandler;
|
|
3306
|
+
this.requestHandlerService = requestHandlerService;
|
|
3239
3307
|
this.controlUtility = controlUtility;
|
|
3240
3308
|
this.controlContainer = controlContainer;
|
|
3241
3309
|
this.AutocompleteTextBoxControlHost = AutocompleteTextBoxControlHost;
|
|
3242
3310
|
this.UtilityService = UtilityService;
|
|
3243
|
-
this.translate = translate;
|
|
3244
3311
|
this.controlValidationService = controlValidationService;
|
|
3312
|
+
this.globalSettings = globalSettings;
|
|
3245
3313
|
this.OnChange = new EventEmitter();
|
|
3246
3314
|
this.keyword = 'value';
|
|
3247
3315
|
this.Search = '';
|
|
@@ -3315,6 +3383,8 @@ class AutocompleteTextBoxComponent {
|
|
|
3315
3383
|
this.controlValidationService.isCreatedBefor = false;
|
|
3316
3384
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
3317
3385
|
this.AutocompleteTextBoxControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
3386
|
+
if (!this.options.ViewType)
|
|
3387
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3318
3388
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
3319
3389
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
3320
3390
|
// this.AutocompleteTextBoxControl.setValue(this.options.Value);
|
|
@@ -3357,10 +3427,12 @@ class AutocompleteTextBoxComponent {
|
|
|
3357
3427
|
if (query) {
|
|
3358
3428
|
let params = new HttpParams();
|
|
3359
3429
|
params = params.append(this.options.QueryParam, query);
|
|
3430
|
+
let requestOptionsModel = new RequestOptionsModel();
|
|
3431
|
+
requestOptionsModel.disableBlockUI = true;
|
|
3432
|
+
requestOptionsModel.disableSuccessNotification = true;
|
|
3360
3433
|
// using github public api to get users by name
|
|
3361
|
-
return this.
|
|
3362
|
-
|
|
3363
|
-
}).pipe(map((data) => data || []), tap(() => noop, err => {
|
|
3434
|
+
return this.requestHandlerService.get(this.options.ActionURL, params, requestOptionsModel)
|
|
3435
|
+
.pipe(map((data) => data || []), tap(() => noop, err => {
|
|
3364
3436
|
// in case of http error
|
|
3365
3437
|
this.errorMessage = err && err.message || 'Something goes wrong';
|
|
3366
3438
|
}));
|
|
@@ -3444,12 +3516,13 @@ AutocompleteTextBoxComponent.decorators = [
|
|
|
3444
3516
|
AutocompleteTextBoxComponent.ctorParameters = () => [
|
|
3445
3517
|
{ type: HttpClient },
|
|
3446
3518
|
{ type: ErrorMassageValidation },
|
|
3519
|
+
{ type: RequestHandlerService },
|
|
3447
3520
|
{ type: ControlUtility },
|
|
3448
3521
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
3449
3522
|
{ type: FormGroupDirective },
|
|
3450
3523
|
{ type: UtilityService },
|
|
3451
|
-
{ type:
|
|
3452
|
-
{ type:
|
|
3524
|
+
{ type: ControlValidationService },
|
|
3525
|
+
{ type: GlobalSettings }
|
|
3453
3526
|
];
|
|
3454
3527
|
AutocompleteTextBoxComponent.propDecorators = {
|
|
3455
3528
|
group: [{ type: Input }],
|
|
@@ -3459,14 +3532,15 @@ AutocompleteTextBoxComponent.propDecorators = {
|
|
|
3459
3532
|
|
|
3460
3533
|
class TagsInputComponent {
|
|
3461
3534
|
// tslint:disable-next-line: max-line-length
|
|
3462
|
-
constructor(http,
|
|
3535
|
+
constructor(http, controlUtility, requestHandlerService, controlContainer, TagsInputControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3463
3536
|
this.http = http;
|
|
3464
|
-
this.ErrorHandler = ErrorHandler;
|
|
3465
3537
|
this.controlUtility = controlUtility;
|
|
3538
|
+
this.requestHandlerService = requestHandlerService;
|
|
3466
3539
|
this.controlContainer = controlContainer;
|
|
3467
3540
|
this.TagsInputControlHost = TagsInputControlHost;
|
|
3468
3541
|
this.UtilityService = UtilityService;
|
|
3469
3542
|
this.controlValidationService = controlValidationService;
|
|
3543
|
+
this.globalSettings = globalSettings;
|
|
3470
3544
|
this.OnChange = new EventEmitter();
|
|
3471
3545
|
// TagInputControl: AbstractControl;
|
|
3472
3546
|
this.SelectedId = [];
|
|
@@ -3521,6 +3595,8 @@ class TagsInputComponent {
|
|
|
3521
3595
|
this.TagsFormGroup.addControl("tags", new FormControl(''));
|
|
3522
3596
|
this.TagsFormControl = this.TagsFormGroup.controls["tags"]; // new FormControl('',validationRules);
|
|
3523
3597
|
this.group.addControl(this.options.Name, this.TagsFormControl);
|
|
3598
|
+
if (!this.options.ViewType)
|
|
3599
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3524
3600
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
3525
3601
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
3526
3602
|
// this.group.addControl(this.options.Name, new FormControl(''));
|
|
@@ -3578,21 +3654,11 @@ class TagsInputComponent {
|
|
|
3578
3654
|
this.controlUtility.CopyInputMessage(inputElement);
|
|
3579
3655
|
}
|
|
3580
3656
|
searchFunctionFactory(Text) {
|
|
3581
|
-
const httpOptions = this.options.ValidationToken != null && this.options.ValidationToken != "" ?
|
|
3582
|
-
{
|
|
3583
|
-
headers: new HttpHeaders({
|
|
3584
|
-
'Content-Type': 'application/json',
|
|
3585
|
-
'Authorization': this.options.ValidationToken
|
|
3586
|
-
})
|
|
3587
|
-
}
|
|
3588
|
-
:
|
|
3589
|
-
{
|
|
3590
|
-
headers: new HttpHeaders({
|
|
3591
|
-
'Content-Type': 'application/json',
|
|
3592
|
-
})
|
|
3593
|
-
};
|
|
3594
3657
|
let Url = `${this.options.ActionURL}?${this.options.QueryParamName}=${Text}&${this.options.SelectedItemsParamName}=${this.SelectedId}`;
|
|
3595
|
-
let
|
|
3658
|
+
let requestOptionsModel = new RequestOptionsModel();
|
|
3659
|
+
requestOptionsModel.disableBlockUI = true;
|
|
3660
|
+
requestOptionsModel.disableSuccessNotification = true;
|
|
3661
|
+
let Model = this.requestHandlerService.get(Url, null, requestOptionsModel);
|
|
3596
3662
|
return Model;
|
|
3597
3663
|
}
|
|
3598
3664
|
AddTag(event, key) {
|
|
@@ -3643,12 +3709,13 @@ TagsInputComponent.decorators = [
|
|
|
3643
3709
|
];
|
|
3644
3710
|
TagsInputComponent.ctorParameters = () => [
|
|
3645
3711
|
{ type: HttpClient },
|
|
3646
|
-
{ type: ErrorMassageValidation },
|
|
3647
3712
|
{ type: ControlUtility },
|
|
3713
|
+
{ type: RequestHandlerService },
|
|
3648
3714
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
3649
3715
|
{ type: FormGroupDirective },
|
|
3650
3716
|
{ type: UtilityService },
|
|
3651
|
-
{ type: ControlValidationService }
|
|
3717
|
+
{ type: ControlValidationService },
|
|
3718
|
+
{ type: GlobalSettings }
|
|
3652
3719
|
];
|
|
3653
3720
|
TagsInputComponent.propDecorators = {
|
|
3654
3721
|
group: [{ type: Input }],
|
|
@@ -3682,7 +3749,8 @@ var FilterType;
|
|
|
3682
3749
|
|
|
3683
3750
|
// tslint:disable-next-line: no-conflicting-lifecycle
|
|
3684
3751
|
class PagingComponent {
|
|
3685
|
-
constructor(http, router, onChangeService, requestHandlerService) {
|
|
3752
|
+
constructor(utilityService, http, router, onChangeService, requestHandlerService) {
|
|
3753
|
+
this.utilityService = utilityService;
|
|
3686
3754
|
this.http = http;
|
|
3687
3755
|
this.router = router;
|
|
3688
3756
|
this.onChangeService = onChangeService;
|
|
@@ -3813,7 +3881,6 @@ class PagingComponent {
|
|
|
3813
3881
|
this.getItemList(this.CurrentPage, true);
|
|
3814
3882
|
}
|
|
3815
3883
|
getItemList(page, IsFilterUpdated = false) {
|
|
3816
|
-
;
|
|
3817
3884
|
let pagingDTO = new PagingDTO();
|
|
3818
3885
|
let size = Number.parseInt(this.options.PageSize.toString());
|
|
3819
3886
|
if (this.options.IsLoadMoreControl)
|
|
@@ -3858,25 +3925,45 @@ class PagingComponent {
|
|
|
3858
3925
|
}
|
|
3859
3926
|
this.requestHandlerService.post(this.options.ActionPostURL, pagingDTO, params)
|
|
3860
3927
|
.subscribe((responseData) => {
|
|
3861
|
-
|
|
3928
|
+
debugger;
|
|
3929
|
+
this.result = responseData.items; //this.castItems(responseData.items);
|
|
3862
3930
|
this.Items.emit(this.result);
|
|
3931
|
+
this.totalRow = responseData.totalCount;
|
|
3863
3932
|
if (IsFilterUpdated) {
|
|
3864
3933
|
this.items = [];
|
|
3865
|
-
this.totalRow = responseData.totalCount;
|
|
3866
3934
|
this.Pages = Math.ceil((this.totalRow / this.options.PageSize));
|
|
3867
3935
|
this.items = Array(this.totalRow);
|
|
3868
3936
|
}
|
|
3869
3937
|
});
|
|
3870
3938
|
}
|
|
3939
|
+
castItems(objectArr) {
|
|
3940
|
+
debugger;
|
|
3941
|
+
let originalArray = [];
|
|
3942
|
+
for (let index = 0; index < objectArr.length; index++) {
|
|
3943
|
+
const element = objectArr[index];
|
|
3944
|
+
let key, keys = Object.keys(element);
|
|
3945
|
+
let n = keys.length;
|
|
3946
|
+
let newObject = {};
|
|
3947
|
+
while (n--) {
|
|
3948
|
+
key = keys[n];
|
|
3949
|
+
let Okey = key;
|
|
3950
|
+
newObject[key.charAt(0).toUpperCase() + Okey.slice(1)] = element[key];
|
|
3951
|
+
}
|
|
3952
|
+
let finalObject = newObject;
|
|
3953
|
+
originalArray.push(finalObject);
|
|
3954
|
+
}
|
|
3955
|
+
return originalArray;
|
|
3956
|
+
}
|
|
3871
3957
|
}
|
|
3872
3958
|
PagingComponent.decorators = [
|
|
3873
3959
|
{ type: Component, args: [{
|
|
3874
3960
|
selector: 'BBSF-Paging',
|
|
3875
|
-
template: "<div class=\"b-control b-paging\" *ngIf=\"(result.length > 0)\">\r\n <div class=\"d-flex justify-content-between align-items-center\" *ngIf=\"!options.IsLoadMoreControl\">\r\n <div class=\"b-pagination\">\r\n <jw-pagination [items]=\"items\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\"\r\n (changePage)=\"onChangePage($event)\" [pageSize]=\"options.PageSize\" [ShowFirstAndLast]=\"options.ShowFirstAndLast\"\r\n [initialPage]=\"1\" [maxPages]=\"10\"></jw-pagination>\r\n </div>\r\n <div class=\"b-pages d-flex\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\" >\r\n <select (change)=\"changePageSize($event)\" *ngIf=\"options.ShowPageSizeOption\">\r\n <option>10</option>\r\n <option>20</option>\r\n <option>50</option>\r\n <option>100</option>\r\n <option>200</option>\r\n </select>\r\n <div class=\"b-items ml-3\">\r\n <strong>{{totalRow}}</strong>
|
|
3961
|
+
template: "<div class=\"b-control b-paging\" *ngIf=\"(result.length > 0)\">\r\n <div class=\"d-flex justify-content-between align-items-center\" *ngIf=\"!options.IsLoadMoreControl\">\r\n <div class=\"b-pagination\">\r\n <jw-pagination [items]=\"items\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\"\r\n (changePage)=\"onChangePage($event)\" [pageSize]=\"options.PageSize\" [ShowFirstAndLast]=\"options.ShowFirstAndLast\"\r\n [initialPage]=\"1\" [maxPages]=\"10\"></jw-pagination>\r\n </div>\r\n <div class=\"b-pages d-flex\" *ngIf=\"!((Pages==1)&&options.HidePaginationWhenPageSizeEqualOne)\" >\r\n <select (change)=\"changePageSize($event)\" *ngIf=\"options.ShowPageSizeOption\">\r\n <option>10</option>\r\n <option>20</option>\r\n <option>50</option>\r\n <option>100</option>\r\n <option>200</option>\r\n </select>\r\n <div class=\"b-items ml-3\">\r\n <strong>{{totalRow}}</strong> {{utilityService.getResourceValue(\"ItemsIn\")}} <strong> {{Pages}}</strong> {{utilityService.getResourceValue(\"Pages\")}}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row\" style=\"align-self:center; align-items: center; text-align: center;\" *ngIf=\"options.IsLoadMoreControl\">\r\n <div class=\"search-results\" infinite-scroll [infiniteScrollDistance]=\"ScrollDistance\"\r\n [infiniteScrollUpDistance]=\"ScrollUpDistance\" [infiniteScrollThrottle]=\"Throttle\" (scrolled)=\"options.IsInfiniteScroll==true?onScrollDown():null\"\r\n [scrollWindow]=\"options.ScrollWindow\" [infiniteScrollContainer]=\"options.InfiniteScrollContainer\">\r\n </div>\r\n <button class=\"btn btn-primary\" (click)=\"onScrollDown()\" *ngIf=\"!(result.length==totalRow)\"> Load More </button>\r\n </div>\r\n</div>\r\n",
|
|
3876
3962
|
styles: [".ngx-pager-container{text-align:center;padding:25px 0 0}.ngx-pager-container li{display:inline-block;margin:0 4px}.ngx-pager-container li a{display:block;width:26px;height:26px;border:1px solid #707070;text-align:center;color:#3e4e59;font-size:14px;line-height:24px;border-radius:5px;text-decoration:none}.ngx-pager-container li a:hover{color:#fff;background:#0a0e03}.ngx-pager-container li.invisible{display:none}.ngx-pager-container li.active{background:#0a0e03;border-radius:5px}.ngx-pager-container li.active a{border:none;color:#fff}\n"]
|
|
3877
3963
|
},] }
|
|
3878
3964
|
];
|
|
3879
3965
|
PagingComponent.ctorParameters = () => [
|
|
3966
|
+
{ type: UtilityService },
|
|
3880
3967
|
{ type: HttpClient },
|
|
3881
3968
|
{ type: Router },
|
|
3882
3969
|
{ type: OnPagingFiltersChangeService },
|
|
@@ -4016,12 +4103,13 @@ JwPaginationComponent.propDecorators = {
|
|
|
4016
4103
|
|
|
4017
4104
|
class RadioButtonComponent {
|
|
4018
4105
|
// tslint:disable-next-line: max-line-length
|
|
4019
|
-
constructor(controlUtility, controlContainer, RadioButtonControlHost, UtilityService, controlValidationService) {
|
|
4106
|
+
constructor(controlUtility, controlContainer, RadioButtonControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
4020
4107
|
this.controlUtility = controlUtility;
|
|
4021
4108
|
this.controlContainer = controlContainer;
|
|
4022
4109
|
this.RadioButtonControlHost = RadioButtonControlHost;
|
|
4023
4110
|
this.UtilityService = UtilityService;
|
|
4024
4111
|
this.controlValidationService = controlValidationService;
|
|
4112
|
+
this.globalSettings = globalSettings;
|
|
4025
4113
|
this.OnChange = new EventEmitter();
|
|
4026
4114
|
this.markAllAsTouched = false;
|
|
4027
4115
|
this.validationRules = [];
|
|
@@ -4054,6 +4142,8 @@ class RadioButtonComponent {
|
|
|
4054
4142
|
ngOnInit() {
|
|
4055
4143
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
4056
4144
|
this.RadioButtonFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
4145
|
+
if (!this.options.ViewType)
|
|
4146
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4057
4147
|
if (this.options.IsRequired) {
|
|
4058
4148
|
this.validationRules.push(Validators.required);
|
|
4059
4149
|
}
|
|
@@ -4100,7 +4190,8 @@ RadioButtonComponent.ctorParameters = () => [
|
|
|
4100
4190
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
4101
4191
|
{ type: FormGroupDirective },
|
|
4102
4192
|
{ type: UtilityService },
|
|
4103
|
-
{ type: ControlValidationService }
|
|
4193
|
+
{ type: ControlValidationService },
|
|
4194
|
+
{ type: GlobalSettings }
|
|
4104
4195
|
];
|
|
4105
4196
|
RadioButtonComponent.propDecorators = {
|
|
4106
4197
|
group: [{ type: Input }],
|
|
@@ -4110,12 +4201,13 @@ RadioButtonComponent.propDecorators = {
|
|
|
4110
4201
|
|
|
4111
4202
|
class TextboxComponent {
|
|
4112
4203
|
// tslint:disable-next-line: max-line-length
|
|
4113
|
-
constructor(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService) {
|
|
4204
|
+
constructor(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
4114
4205
|
this.controlUtility = controlUtility;
|
|
4115
4206
|
this.controlContainer = controlContainer;
|
|
4116
4207
|
this.TextControlHost = TextControlHost;
|
|
4117
4208
|
this.UtilityService = UtilityService;
|
|
4118
4209
|
this.controlValidationService = controlValidationService;
|
|
4210
|
+
this.globalSettings = globalSettings;
|
|
4119
4211
|
this.OnChange = new EventEmitter();
|
|
4120
4212
|
this.WordCount = 0;
|
|
4121
4213
|
this.WordCountArray = 0;
|
|
@@ -4164,6 +4256,8 @@ class TextboxComponent {
|
|
|
4164
4256
|
// }
|
|
4165
4257
|
ngOnInit() {
|
|
4166
4258
|
this.controlValidationService.isCreatedBefor = false;
|
|
4259
|
+
if (!this.options.ViewType)
|
|
4260
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4167
4261
|
if (this.options.MaskPattern != null && this.options.MaskPattern != "") {
|
|
4168
4262
|
this.MaskPattern = this.options.MaskPattern;
|
|
4169
4263
|
this.options.Placeholder = this.MaskPattern;
|
|
@@ -4240,6 +4334,7 @@ class TextboxComponent {
|
|
|
4240
4334
|
this.group.markAllAsTouched();
|
|
4241
4335
|
this.markAllAsTouched = true;
|
|
4242
4336
|
});
|
|
4337
|
+
this.options.ValidationRules = this.validationRules;
|
|
4243
4338
|
}
|
|
4244
4339
|
ngAfterViewInit() {
|
|
4245
4340
|
this.controlUtility.setAttributeForControl(this.options);
|
|
@@ -4312,7 +4407,8 @@ TextboxComponent.ctorParameters = () => [
|
|
|
4312
4407
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
4313
4408
|
{ type: FormGroupDirective },
|
|
4314
4409
|
{ type: UtilityService },
|
|
4315
|
-
{ type: ControlValidationService }
|
|
4410
|
+
{ type: ControlValidationService },
|
|
4411
|
+
{ type: GlobalSettings }
|
|
4316
4412
|
];
|
|
4317
4413
|
TextboxComponent.propDecorators = {
|
|
4318
4414
|
group: [{ type: Input }],
|
|
@@ -4324,17 +4420,16 @@ class MapAutocompleteDTO {
|
|
|
4324
4420
|
}
|
|
4325
4421
|
|
|
4326
4422
|
class MapAutoCompleteComponent {
|
|
4327
|
-
constructor(mapsAPILoader, ngZone,
|
|
4423
|
+
constructor(mapsAPILoader, ngZone, controlUtility, controlContainer, MapAutoCompleteControlHost, UtilityService, translate, controlValidationService, globalSettings) {
|
|
4328
4424
|
this.mapsAPILoader = mapsAPILoader;
|
|
4329
4425
|
this.ngZone = ngZone;
|
|
4330
|
-
this.titleService = titleService;
|
|
4331
|
-
this.ErrorHandler = ErrorHandler;
|
|
4332
4426
|
this.controlUtility = controlUtility;
|
|
4333
4427
|
this.controlContainer = controlContainer;
|
|
4334
4428
|
this.MapAutoCompleteControlHost = MapAutoCompleteControlHost;
|
|
4335
4429
|
this.UtilityService = UtilityService;
|
|
4336
4430
|
this.translate = translate;
|
|
4337
4431
|
this.controlValidationService = controlValidationService;
|
|
4432
|
+
this.globalSettings = globalSettings;
|
|
4338
4433
|
this.OnChange = new EventEmitter();
|
|
4339
4434
|
this.MapAutoCompleteModel = new MapAutocompleteDTO();
|
|
4340
4435
|
this.CurrentLanguage = "";
|
|
@@ -4504,6 +4599,8 @@ class MapAutoCompleteComponent {
|
|
|
4504
4599
|
});
|
|
4505
4600
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
4506
4601
|
this.MapAutoCompleteFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
4602
|
+
if (!this.options.ViewType)
|
|
4603
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4507
4604
|
if (this.options.IsRequired) {
|
|
4508
4605
|
this.validationRules.push(Validators.required);
|
|
4509
4606
|
}
|
|
@@ -4582,14 +4679,13 @@ MapAutoCompleteComponent.decorators = [
|
|
|
4582
4679
|
MapAutoCompleteComponent.ctorParameters = () => [
|
|
4583
4680
|
{ type: MapsAPILoader },
|
|
4584
4681
|
{ type: NgZone },
|
|
4585
|
-
{ type: Title },
|
|
4586
|
-
{ type: ErrorMassageValidation },
|
|
4587
4682
|
{ type: ControlUtility },
|
|
4588
4683
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
4589
4684
|
{ type: FormGroupDirective },
|
|
4590
4685
|
{ type: UtilityService },
|
|
4591
4686
|
{ type: BBSFTranslateService },
|
|
4592
|
-
{ type: ControlValidationService }
|
|
4687
|
+
{ type: ControlValidationService },
|
|
4688
|
+
{ type: GlobalSettings }
|
|
4593
4689
|
];
|
|
4594
4690
|
MapAutoCompleteComponent.propDecorators = {
|
|
4595
4691
|
group: [{ type: Input }],
|
|
@@ -4775,17 +4871,22 @@ var PagingActionMode;
|
|
|
4775
4871
|
})(PagingActionMode || (PagingActionMode = {}));
|
|
4776
4872
|
|
|
4777
4873
|
class FormComponent {
|
|
4778
|
-
constructor(utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
4874
|
+
constructor(controlUtility, utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
4875
|
+
this.controlUtility = controlUtility;
|
|
4779
4876
|
this.utilityService = utilityService;
|
|
4780
4877
|
this.controlValidationService = controlValidationService;
|
|
4781
4878
|
this.modalService = modalService;
|
|
4782
4879
|
this.ngbActiveModal = ngbActiveModal;
|
|
4783
4880
|
}
|
|
4784
4881
|
ngOnInit() {
|
|
4882
|
+
this.fromName = this.randomString(5);
|
|
4785
4883
|
}
|
|
4786
4884
|
submit() {
|
|
4787
|
-
|
|
4885
|
+
this.options.FormGroup.markAllAsTouched();
|
|
4886
|
+
if (this.options.FormGroup.invalid) {
|
|
4887
|
+
this.showGlobalError();
|
|
4788
4888
|
return;
|
|
4889
|
+
}
|
|
4789
4890
|
else {
|
|
4790
4891
|
let submitModel = this.options.GetModelFunction();
|
|
4791
4892
|
let submittedService = this.options.ServiceSubmitFunction.apply(null, submitModel);
|
|
@@ -4821,8 +4922,9 @@ class FormComponent {
|
|
|
4821
4922
|
this.utilityService.notifyErrorMessage();
|
|
4822
4923
|
}
|
|
4823
4924
|
else {
|
|
4925
|
+
debugger;
|
|
4824
4926
|
if (err.status == 400) {
|
|
4825
|
-
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new RequestOptionsModel());
|
|
4927
|
+
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new RequestOptionsModel(), this.fromName);
|
|
4826
4928
|
}
|
|
4827
4929
|
else {
|
|
4828
4930
|
errorMessage = `Server returned code: ${err.status}, error message is: ${err.message}`;
|
|
@@ -4834,15 +4936,27 @@ class FormComponent {
|
|
|
4834
4936
|
if (!this.options.DisableBlockUI)
|
|
4835
4937
|
this.utilityService.stopBlockUI();
|
|
4836
4938
|
}
|
|
4939
|
+
showGlobalError() {
|
|
4940
|
+
this.controlUtility.showGlobalError(this.fromName);
|
|
4941
|
+
}
|
|
4942
|
+
randomString(length) {
|
|
4943
|
+
var randomChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
4944
|
+
var result = '';
|
|
4945
|
+
for (var i = 0; i < length; i++) {
|
|
4946
|
+
result += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
|
|
4947
|
+
}
|
|
4948
|
+
return result;
|
|
4949
|
+
}
|
|
4837
4950
|
}
|
|
4838
4951
|
FormComponent.decorators = [
|
|
4839
4952
|
{ type: Component, args: [{
|
|
4840
4953
|
// tslint:disable-next-line: component-selector
|
|
4841
4954
|
selector: 'BBSF-Form',
|
|
4842
|
-
template: "<form [FormGroup]=\"options.FormGroup\" (ngSubmit)=\"submit()\"
|
|
4955
|
+
template: "<form id=\"{{fromName}}\" [FormGroup]=\"options.FormGroup\" (ngSubmit)=\"submit()\" > \r\n \r\n <ng-template #content><ng-content></ng-content></ng-template>\r\n\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n</form>"
|
|
4843
4956
|
},] }
|
|
4844
4957
|
];
|
|
4845
4958
|
FormComponent.ctorParameters = () => [
|
|
4959
|
+
{ type: ControlUtility },
|
|
4846
4960
|
{ type: UtilityService },
|
|
4847
4961
|
{ type: ControlValidationService },
|
|
4848
4962
|
{ type: NgbModal },
|
|
@@ -4861,27 +4975,43 @@ class ConfirmationModalComponent {
|
|
|
4861
4975
|
this.styleSuccess = StyleConfirmationMode.Success;
|
|
4862
4976
|
}
|
|
4863
4977
|
ngOnInit() {
|
|
4864
|
-
console.log("options on initialize");
|
|
4865
|
-
console.log(this.options);
|
|
4866
|
-
//check for options text values
|
|
4867
|
-
this.setTextValues();
|
|
4868
|
-
}
|
|
4869
|
-
ngAfterViewInit() {
|
|
4870
|
-
if (this.options.AutoShowModal)
|
|
4871
|
-
this.showModal();
|
|
4872
4978
|
}
|
|
4873
4979
|
//Method used to show confirmation modal
|
|
4874
4980
|
showModal() {
|
|
4875
4981
|
this.utilityService.startBlockUI();
|
|
4876
|
-
//
|
|
4877
|
-
this.
|
|
4982
|
+
//check for options text values
|
|
4983
|
+
this.setTextValues();
|
|
4984
|
+
//sweetalert styles//
|
|
4985
|
+
switch (this.options.StyleConfirmationMode) {
|
|
4986
|
+
case this.styleSuccess: {
|
|
4987
|
+
this.icon = 'success';
|
|
4988
|
+
this.btnColor = '#50cd89';
|
|
4989
|
+
}
|
|
4990
|
+
case this.styleWarning: {
|
|
4991
|
+
this.icon = 'warning';
|
|
4992
|
+
this.btnColor = '#ffc700';
|
|
4993
|
+
}
|
|
4994
|
+
case this.styleDanger: {
|
|
4995
|
+
this.icon = 'error';
|
|
4996
|
+
this.btnColor = '#f1416c';
|
|
4997
|
+
}
|
|
4998
|
+
}
|
|
4999
|
+
Swal.fire({
|
|
5000
|
+
title: this.options.ConfirmationHeader,
|
|
5001
|
+
text: this.options.ConfirmationBody,
|
|
5002
|
+
icon: this.icon,
|
|
5003
|
+
showCancelButton: true,
|
|
5004
|
+
confirmButtonColor: this.btnColor,
|
|
5005
|
+
cancelButtonColor: '#f5f8fa',
|
|
5006
|
+
showCloseButton: true,
|
|
5007
|
+
}).then((result) => {
|
|
5008
|
+
if (result.isConfirmed) {
|
|
5009
|
+
this.submit();
|
|
5010
|
+
}
|
|
5011
|
+
});
|
|
4878
5012
|
this.utilityService.stopBlockUI();
|
|
4879
|
-
console.log("options after modal opened");
|
|
4880
|
-
console.log(this.options);
|
|
4881
5013
|
}
|
|
4882
5014
|
setTextValues() {
|
|
4883
|
-
console.log("options in first showmodal");
|
|
4884
|
-
console.log(this.options);
|
|
4885
5015
|
if (!this.options.ConfirmationHeader)
|
|
4886
5016
|
this.options.ConfirmationHeader = this.utilityService.getResourceValue("DeleteConfirmation");
|
|
4887
5017
|
if (!this.options.ConfirmationBody)
|
|
@@ -4936,9 +5066,8 @@ class ConfirmationModalComponent {
|
|
|
4936
5066
|
}
|
|
4937
5067
|
ConfirmationModalComponent.decorators = [
|
|
4938
5068
|
{ type: Component, args: [{
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
styles: [""]
|
|
5069
|
+
template: "",
|
|
5070
|
+
selector: 'BBSF-ConfirmationModal'
|
|
4942
5071
|
},] }
|
|
4943
5072
|
];
|
|
4944
5073
|
ConfirmationModalComponent.ctorParameters = () => [
|
|
@@ -5040,18 +5169,19 @@ BBSFControlsModule.decorators = [
|
|
|
5040
5169
|
AutocompleteLibModule,
|
|
5041
5170
|
BBSFUtilitiesModule,
|
|
5042
5171
|
InlineSVGModule.forRoot(),
|
|
5172
|
+
SweetAlert2Module
|
|
5043
5173
|
],
|
|
5044
5174
|
providers: [
|
|
5045
5175
|
ErrorMassageValidation,
|
|
5046
5176
|
ControlUtility,
|
|
5047
5177
|
OnPagingFiltersChangeService,
|
|
5048
|
-
EnvironmentService,
|
|
5049
|
-
AuthService,
|
|
5050
|
-
RequestHandlerService,
|
|
5051
|
-
UtilityService,
|
|
5178
|
+
// EnvironmentService,
|
|
5179
|
+
// AuthService,
|
|
5180
|
+
// RequestHandlerService,
|
|
5181
|
+
// UtilityService,
|
|
5052
5182
|
TranslateService,
|
|
5053
|
-
BBSFTranslateService,
|
|
5054
|
-
ControlValidationService,
|
|
5183
|
+
// BBSFTranslateService,
|
|
5184
|
+
// ControlValidationService,
|
|
5055
5185
|
FormGroupDirective,
|
|
5056
5186
|
NgbModal,
|
|
5057
5187
|
NgbActiveModal
|
|
@@ -5119,12 +5249,6 @@ class CustomValidator {
|
|
|
5119
5249
|
}
|
|
5120
5250
|
}
|
|
5121
5251
|
|
|
5122
|
-
var ControlLayout;
|
|
5123
|
-
(function (ControlLayout) {
|
|
5124
|
-
ControlLayout[ControlLayout["Vertical"] = 1] = "Vertical";
|
|
5125
|
-
ControlLayout[ControlLayout["Horizontal"] = 2] = "Horizontal";
|
|
5126
|
-
})(ControlLayout || (ControlLayout = {}));
|
|
5127
|
-
|
|
5128
5252
|
var ForceDirection;
|
|
5129
5253
|
(function (ForceDirection) {
|
|
5130
5254
|
ForceDirection[ForceDirection["English"] = 1] = "English";
|
|
@@ -5166,14 +5290,17 @@ class TextBoxOptions {
|
|
|
5166
5290
|
/**Prevent AutoComplete of textbox*/
|
|
5167
5291
|
this.AutoComplete = "off";
|
|
5168
5292
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5169
|
-
this.ViewType =
|
|
5293
|
+
this.ViewType = null;
|
|
5170
5294
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5171
5295
|
*/
|
|
5172
5296
|
this.CustomValidation = [];
|
|
5173
5297
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
5174
5298
|
this.ForceDirection = null;
|
|
5299
|
+
/** Set Type of TextBox ("text","password","email","number") */
|
|
5300
|
+
this.Type = InputType.Text;
|
|
5175
5301
|
this.IconPosition = IconPosition.left;
|
|
5176
5302
|
this.NoMargin = false;
|
|
5303
|
+
this.ValidationRules = [];
|
|
5177
5304
|
}
|
|
5178
5305
|
}
|
|
5179
5306
|
|
|
@@ -5187,7 +5314,7 @@ class FileUploadOptions {
|
|
|
5187
5314
|
*/
|
|
5188
5315
|
this.CustomValidation = [];
|
|
5189
5316
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5190
|
-
this.ViewType =
|
|
5317
|
+
this.ViewType = null;
|
|
5191
5318
|
}
|
|
5192
5319
|
}
|
|
5193
5320
|
|
|
@@ -5199,13 +5326,13 @@ class MultiLingualTextBoxOptions {
|
|
|
5199
5326
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5200
5327
|
this.Value = new EnglishArabicDTO();
|
|
5201
5328
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5202
|
-
this.ViewType =
|
|
5329
|
+
this.ViewType = null;
|
|
5203
5330
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5204
|
-
this.LanguageMode =
|
|
5331
|
+
this.LanguageMode = null;
|
|
5205
5332
|
this.IconPositionEN = IconPosition.left;
|
|
5206
5333
|
this.IconPositionAR = IconPosition.right;
|
|
5207
5334
|
/*multi control placement type*/
|
|
5208
|
-
this.MultiControlPlacementType =
|
|
5335
|
+
this.MultiControlPlacementType = null;
|
|
5209
5336
|
}
|
|
5210
5337
|
}
|
|
5211
5338
|
|
|
@@ -5215,7 +5342,7 @@ class Attribute {
|
|
|
5215
5342
|
class TextAreaOptions {
|
|
5216
5343
|
constructor() {
|
|
5217
5344
|
/** to set type of view if TextArea is Vertical or Horizontal */
|
|
5218
|
-
this.ViewType =
|
|
5345
|
+
this.ViewType = null;
|
|
5219
5346
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5220
5347
|
*/
|
|
5221
5348
|
this.CustomValidation = [];
|
|
@@ -5232,11 +5359,11 @@ class MultiLingualTextAreaOptions {
|
|
|
5232
5359
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5233
5360
|
this.Value = new EnglishArabicDTO();
|
|
5234
5361
|
/** to set type of view if MultilingualTextArea is Vertical or Horizontal */
|
|
5235
|
-
this.ViewType =
|
|
5362
|
+
this.ViewType = null;
|
|
5236
5363
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5237
|
-
this.LanguageMode =
|
|
5364
|
+
this.LanguageMode = null;
|
|
5238
5365
|
/*multi control placement type*/
|
|
5239
|
-
this.MultiControlPlacementType =
|
|
5366
|
+
this.MultiControlPlacementType = null;
|
|
5240
5367
|
}
|
|
5241
5368
|
}
|
|
5242
5369
|
|
|
@@ -5259,7 +5386,7 @@ class DropdownOptions {
|
|
|
5259
5386
|
/** Disable Bootstrap DropdownList */
|
|
5260
5387
|
this.DisableBootstrapSelect = false;
|
|
5261
5388
|
/** to set type of view if DropdownList is Vertical or Horizontal */
|
|
5262
|
-
this.ViewType =
|
|
5389
|
+
this.ViewType = null;
|
|
5263
5390
|
/** To Set Custom Validation*/
|
|
5264
5391
|
this.CustomValidation = [];
|
|
5265
5392
|
/** Set key for item in DropdownList */
|
|
@@ -5278,14 +5405,14 @@ class PhoneOptions {
|
|
|
5278
5405
|
/**Set List Of Countries As Preferred Countries*/
|
|
5279
5406
|
this.PreferredCountries = [];
|
|
5280
5407
|
/** to set type of view if Phonebox is Vertical or Horizontal */
|
|
5281
|
-
this.ViewType =
|
|
5408
|
+
this.ViewType = null;
|
|
5282
5409
|
this.ForceDirection = ForceDirection.English;
|
|
5283
5410
|
}
|
|
5284
5411
|
}
|
|
5285
5412
|
|
|
5286
5413
|
class ToggleSlideOptions {
|
|
5287
5414
|
constructor() {
|
|
5288
|
-
this.ViewType =
|
|
5415
|
+
this.ViewType = null;
|
|
5289
5416
|
this.ForceDirection = ForceDirection.English;
|
|
5290
5417
|
}
|
|
5291
5418
|
}
|
|
@@ -5293,7 +5420,7 @@ class ToggleSlideOptions {
|
|
|
5293
5420
|
class HtmlEditorOptions {
|
|
5294
5421
|
constructor() {
|
|
5295
5422
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5296
|
-
this.ViewType =
|
|
5423
|
+
this.ViewType = null;
|
|
5297
5424
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5298
5425
|
*/
|
|
5299
5426
|
this.CustomValidation = [];
|
|
@@ -5312,11 +5439,11 @@ class MultiLingualHtmlEditorOptions {
|
|
|
5312
5439
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5313
5440
|
this.Value = new EnglishArabicDTO();
|
|
5314
5441
|
/** to set type of view if MultipleLanguageText is Vertical or Horizontal */
|
|
5315
|
-
this.ViewType =
|
|
5442
|
+
this.ViewType = null;
|
|
5316
5443
|
/** Set Height For */
|
|
5317
5444
|
this.Height = 150;
|
|
5318
5445
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5319
|
-
this.LanguageMode =
|
|
5446
|
+
this.LanguageMode = null;
|
|
5320
5447
|
}
|
|
5321
5448
|
}
|
|
5322
5449
|
|
|
@@ -5340,7 +5467,7 @@ class ImageUploadOptions {
|
|
|
5340
5467
|
*/
|
|
5341
5468
|
this.CustomValidation = [];
|
|
5342
5469
|
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5343
|
-
this.ViewType =
|
|
5470
|
+
this.ViewType = null;
|
|
5344
5471
|
/** Set List of Custom Attribute to FileInput */
|
|
5345
5472
|
this.FileUploadAcceptsTypes = [ImageType.ImageTypes];
|
|
5346
5473
|
}
|
|
@@ -5353,7 +5480,7 @@ class ProfileImageUploadOptions {
|
|
|
5353
5480
|
this.AllowDropZone = false;
|
|
5354
5481
|
this.CustomValidation = [];
|
|
5355
5482
|
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5356
|
-
this.ViewType =
|
|
5483
|
+
this.ViewType = null;
|
|
5357
5484
|
/** Set List of Custom Attribute to FileInput */
|
|
5358
5485
|
this.ImageUploadAcceptsTypes = [ImageType.ImageTypes];
|
|
5359
5486
|
}
|
|
@@ -5412,7 +5539,7 @@ class MapAutoCompleteOptions {
|
|
|
5412
5539
|
*/
|
|
5413
5540
|
this.CustomValidation = [];
|
|
5414
5541
|
/** to set type of view if MapAutoComplete is Vertical or Horizontal */
|
|
5415
|
-
this.ViewType =
|
|
5542
|
+
this.ViewType = null;
|
|
5416
5543
|
}
|
|
5417
5544
|
}
|
|
5418
5545
|
|
|
@@ -5427,7 +5554,7 @@ class AutocompleteOptions {
|
|
|
5427
5554
|
/** set Range Number to Textbox with type number with From-Value and To-value*/
|
|
5428
5555
|
this.NumberRange = new RangeNumber();
|
|
5429
5556
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5430
|
-
this.ViewType =
|
|
5557
|
+
this.ViewType = null;
|
|
5431
5558
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5432
5559
|
*/
|
|
5433
5560
|
this.CustomValidation = [];
|
|
@@ -5450,7 +5577,7 @@ class TagsInputOptions {
|
|
|
5450
5577
|
/**To set value to tagsinput */
|
|
5451
5578
|
this.Value = null;
|
|
5452
5579
|
/** to set type of view if tagsinput is Vertical or Horizontal */
|
|
5453
|
-
this.ViewType =
|
|
5580
|
+
this.ViewType = null;
|
|
5454
5581
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5455
5582
|
*/
|
|
5456
5583
|
this.CustomValidation = [];
|
|
@@ -5540,7 +5667,7 @@ class PagingOptions {
|
|
|
5540
5667
|
|
|
5541
5668
|
class RadioButtonOptions {
|
|
5542
5669
|
constructor() {
|
|
5543
|
-
this.ViewType =
|
|
5670
|
+
this.ViewType = null;
|
|
5544
5671
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5545
5672
|
*/
|
|
5546
5673
|
this.CustomValidation = [];
|
|
@@ -5599,7 +5726,7 @@ class ConfirmationModalOptions {
|
|
|
5599
5726
|
//Represents refrence to paging control that needs to be updated after success
|
|
5600
5727
|
this.PagingReference = null;
|
|
5601
5728
|
//Represents paging action excutes after submission (Reinitialize/Update)
|
|
5602
|
-
this.PagingActionMode = PagingActionMode.
|
|
5729
|
+
this.PagingActionMode = PagingActionMode.Reinitialize;
|
|
5603
5730
|
//Represents function that excutes after submission error
|
|
5604
5731
|
this.OnErrorHandler = null;
|
|
5605
5732
|
//Represents function that excutes after submission success
|
|
@@ -5610,9 +5737,6 @@ class ConfirmationModalOptions {
|
|
|
5610
5737
|
this.DisableSuccessNotification = false;
|
|
5611
5738
|
//If ="true" disable notification after submission error
|
|
5612
5739
|
this.DisableErrorNotification = false;
|
|
5613
|
-
//If ="true" modal open automatically after options initialization
|
|
5614
|
-
//If="false" should call function showModal()
|
|
5615
|
-
this.AutoShowModal = true;
|
|
5616
5740
|
}
|
|
5617
5741
|
}
|
|
5618
5742
|
|
|
@@ -5939,5 +6063,5 @@ var FileType;
|
|
|
5939
6063
|
* Generated bundle index. Do not edit.
|
|
5940
6064
|
*/
|
|
5941
6065
|
|
|
5942
|
-
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, BBSFControlsModule, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxOptions, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DatePickerOptions, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormOptions, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, InputType, Insert, LanguageMode, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorOptions, MultiLingualTextAreaOptions, MultiLingualTextBoxOptions, MultipleFileUploadModel, OnPagingFiltersChangeService, PagingActionMode, PagingDTO, PagingOptions, Para, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfilePictureDTO, RadioButtonItem, RadioButtonOptions, RangeNumber, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputDTO, TagsInputOptions, TextAreaOptions, TextBoxOptions, ToggleSlideOptions, UploadPersonalImage, environment, options, DateInputComponent as ɵa, FileUploadComponent as ɵb, MultiLingualTextBoxComponent as ɵc, TextboxComponent as ɵd, TextAreaComponent as ɵe, MultiLingualTextAreaComponent as ɵf, CheckBoxComponent as ɵg, DropdownListComponent as ɵh, PhoneComponent as ɵi, ToggleslideComponent as ɵj, HtmlEditorComponent as ɵk, MultiLingualHtmlEditorComponent as ɵl, ImageUploaderComponent as ɵm, ProfileImageUploaderComponent as ɵn, CalendarComponent as ɵo, MapAutoCompleteComponent as ɵp, AutocompleteTextBoxComponent as ɵq, TagsInputComponent as ɵr, PagingComponent as ɵs, JwPaginationComponent as ɵt, RadioButtonComponent as ɵu, FormComponent as ɵv, ConfirmationModalComponent as ɵw };
|
|
6066
|
+
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, BBSFControlsModule, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxOptions, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DatePickerOptions, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormOptions, GlobalSettings, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, InputType, Insert, LanguageMode, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorOptions, MultiLingualTextAreaOptions, MultiLingualTextBoxOptions, MultipleFileUploadModel, OnPagingFiltersChangeService, PagingActionMode, PagingDTO, PagingOptions, Para, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfilePictureDTO, RadioButtonItem, RadioButtonOptions, RangeNumber, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputDTO, TagsInputOptions, TextAreaOptions, TextBoxOptions, ToggleSlideOptions, UploadPersonalImage, environment, options, DateInputComponent as ɵa, FileUploadComponent as ɵb, MultiLingualTextBoxComponent as ɵc, TextboxComponent as ɵd, TextAreaComponent as ɵe, MultiLingualTextAreaComponent as ɵf, CheckBoxComponent as ɵg, DropdownListComponent as ɵh, PhoneComponent as ɵi, ToggleslideComponent as ɵj, HtmlEditorComponent as ɵk, MultiLingualHtmlEditorComponent as ɵl, ImageUploaderComponent as ɵm, ProfileImageUploaderComponent as ɵn, CalendarComponent as ɵo, MapAutoCompleteComponent as ɵp, AutocompleteTextBoxComponent as ɵq, TagsInputComponent as ɵr, PagingComponent as ɵs, JwPaginationComponent as ɵt, RadioButtonComponent as ɵu, FormComponent as ɵv, ConfirmationModalComponent as ɵw };
|
|
5943
6067
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|