@bnsights/bbsf-controls 1.0.7 → 1.0.11
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.11.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +349 -217
- 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 +11 -10
- 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 +13 -7
- 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 +345 -216
- 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 +5 -6
- 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 +4 -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) {
|
|
@@ -2739,7 +2805,8 @@ class ImageUploaderComponent {
|
|
|
2739
2805
|
}
|
|
2740
2806
|
}
|
|
2741
2807
|
showImageUploader(element) {
|
|
2742
|
-
|
|
2808
|
+
let input = element.parentElement.parentElement.querySelector('input[type=file]');
|
|
2809
|
+
input.click();
|
|
2743
2810
|
}
|
|
2744
2811
|
showGlobalError() {
|
|
2745
2812
|
this.controlUtility.showGlobalError();
|
|
@@ -2881,13 +2948,12 @@ ImageUploaderComponent.decorators = [
|
|
|
2881
2948
|
];
|
|
2882
2949
|
ImageUploaderComponent.ctorParameters = () => [
|
|
2883
2950
|
{ type: NgZone },
|
|
2884
|
-
{ type: ErrorMassageValidation },
|
|
2885
2951
|
{ type: ControlUtility },
|
|
2886
2952
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
2887
2953
|
{ type: FormGroupDirective },
|
|
2888
2954
|
{ type: UtilityService },
|
|
2889
|
-
{ type:
|
|
2890
|
-
{ type:
|
|
2955
|
+
{ type: ControlValidationService },
|
|
2956
|
+
{ type: GlobalSettings }
|
|
2891
2957
|
];
|
|
2892
2958
|
ImageUploaderComponent.propDecorators = {
|
|
2893
2959
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -2901,14 +2967,14 @@ class ProfilePictureDTO {
|
|
|
2901
2967
|
}
|
|
2902
2968
|
|
|
2903
2969
|
class ProfileImageUploaderComponent {
|
|
2904
|
-
constructor(zone,
|
|
2970
|
+
constructor(zone, controlUtility, controlContainer, ProfileImageUploaderControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2905
2971
|
this.zone = zone;
|
|
2906
|
-
this.ErrorHandler = ErrorHandler;
|
|
2907
2972
|
this.controlUtility = controlUtility;
|
|
2908
2973
|
this.controlContainer = controlContainer;
|
|
2909
2974
|
this.ProfileImageUploaderControlHost = ProfileImageUploaderControlHost;
|
|
2910
2975
|
this.UtilityService = UtilityService;
|
|
2911
2976
|
this.controlValidationService = controlValidationService;
|
|
2977
|
+
this.globalSettings = globalSettings;
|
|
2912
2978
|
this.files = [];
|
|
2913
2979
|
this.ImageSource = "./src/assets/images/userimg.png";
|
|
2914
2980
|
this.OnChange = new EventEmitter();
|
|
@@ -2956,6 +3022,8 @@ class ProfileImageUploaderComponent {
|
|
|
2956
3022
|
}
|
|
2957
3023
|
ngOnInit() {
|
|
2958
3024
|
this.controlValidationService.isCreatedBefor = false;
|
|
3025
|
+
if (!this.options.ViewType)
|
|
3026
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2959
3027
|
if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
|
|
2960
3028
|
this.ImageSource = this.options.DefaultImageSrc;
|
|
2961
3029
|
this.config = {
|
|
@@ -3026,6 +3094,10 @@ class ProfileImageUploaderComponent {
|
|
|
3026
3094
|
}
|
|
3027
3095
|
}
|
|
3028
3096
|
}
|
|
3097
|
+
showImageUploader(element) {
|
|
3098
|
+
let input = element.parentElement.parentElement.querySelector('input[type=file]');
|
|
3099
|
+
input.click();
|
|
3100
|
+
}
|
|
3029
3101
|
showGlobalError() {
|
|
3030
3102
|
this.controlUtility.showGlobalError();
|
|
3031
3103
|
}
|
|
@@ -3198,18 +3270,18 @@ ProfileImageUploaderComponent.controlContainerstatic = null;
|
|
|
3198
3270
|
ProfileImageUploaderComponent.decorators = [
|
|
3199
3271
|
{ type: Component, args: [{
|
|
3200
3272
|
selector: 'BBSF-ProfileImageUploader',
|
|
3201
|
-
template: "<div class=\"b-control b-profile-image-upload\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n\r\n <ejs-tooltip id=\"tooltip\" content='{{ValidationMessage}}' tipPointerPosition='Middle'>\r\n <i class=\"fa fa-info-circle\" data-plugin=\"tooltip\" data-html=\"true\"></i>\r\n </ejs-tooltip>\r\n\r\n\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <div *ngIf=\"options.AllowDropZone\" class=\"ProfileDropBox d-inline-flex h-auto w-auto overflow-hidden m-0 {{options.ExtraClasses}}\" style=\"width:200px;height:200px;overflow:inherit;\" ngx-dropzone\r\n [disabled]=\"options.IsDisabled\" [accept]=\"AcceptedType\" (change)=\"onFileChange($event)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" ngDefaultControl formControlName=\"{{options.Name}}\"\r\n id=\"{{options.Name}}\" [class.is-invalid]=\"ProfileImageUploadFormControl.invalid && ProfileImageUploadFormControl.touched\">\r\n <ngx-dropzone-label class=\"rounded-circle w-100 h-100 m-0\">\r\n <div class=\"h-100\">\r\n <img [src]=\"ImageSource\" class=\"w-100 rounded-circle\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-image-preview *ngFor=\"let f of files\" ngProjectAs=\"ngx-dropzone-preview\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\"\r\n class=\"w-100 h-100 m-0\">\r\n\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n\r\n <div class=\"ProfileImageUploadClassSelector\" *ngIf=\"!options.AllowDropZone\" >\r\n <ngx-dropzone-label style=\" border: none !important;width:200px;height:200px;overflow:inherit;\" class=\"d-inline-flex h-auto w-auto overflow-hidden m-0\" *ngIf=\"files.length==0\" >\r\n <div style=\"max-width:200px !important; max-height: 200px !important;\" class=\"h-100 file-fake-input\"
|
|
3273
|
+
template: "<div class=\"b-control b-profile-image-upload\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" [hidden]=\"options.HideLabel\">\r\n {{options.LabelValue}}\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger Required-text\" aria-required=\"true\">*</span>\r\n\r\n <ejs-tooltip id=\"tooltip\" content='{{ValidationMessage}}' tipPointerPosition='Middle'>\r\n <i class=\"fa fa-info-circle\" data-plugin=\"tooltip\" data-html=\"true\"></i>\r\n </ejs-tooltip>\r\n\r\n\r\n </label>\r\n\r\n <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n\r\n <div *ngIf=\"options.AllowDropZone\" class=\"ProfileDropBox d-inline-flex h-auto w-auto overflow-hidden m-0 {{options.ExtraClasses}}\" style=\"width:200px;height:200px;overflow:inherit;\" ngx-dropzone\r\n [disabled]=\"options.IsDisabled\" [accept]=\"AcceptedType\" (change)=\"onFileChange($event)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" ngDefaultControl formControlName=\"{{options.Name}}\"\r\n id=\"{{options.Name}}\" [class.is-invalid]=\"ProfileImageUploadFormControl.invalid && ProfileImageUploadFormControl.touched\">\r\n <ngx-dropzone-label class=\"rounded-circle w-100 h-100 m-0\">\r\n <div class=\"h-100\">\r\n <img [src]=\"ImageSource\" class=\"w-100 rounded-circle\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-image-preview *ngFor=\"let f of files\" ngProjectAs=\"ngx-dropzone-preview\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\"\r\n class=\"w-100 h-100 m-0\">\r\n\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n\r\n <div class=\"ProfileImageUploadClassSelector\" *ngIf=\"!options.AllowDropZone\" >\r\n <ngx-dropzone-label style=\" border: none !important;width:200px;height:200px;overflow:inherit;\" class=\"d-inline-flex h-auto w-auto overflow-hidden m-0\" *ngIf=\"files.length==0\" >\r\n <div style=\"max-width:200px !important; max-height: 200px !important;\" class=\"h-100 file-fake-input\" #element (click)=\"showImageUploader(element)\">\r\n <img [src]=\"ImageSource\" class=\"h-100 w-100\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n \r\n <div class=\"ProfileDropBox rounded-circle {{options.ExtraClasses}}\" style=\" border: none !important;width:200px;height:200px;overflow:inherit;\" ngx-dropzone\r\n [disabled]=\"options.IsDisabled\" [accept]=\"AcceptedType\" (change)=\"onFileChange($event)\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" ngDefaultControl formControlName=\"{{options.Name}}\"\r\n id=\"{{options.Name}}\" [class.is-invalid]=\"ProfileImageUploadFormControl.invalid && ProfileImageUploadFormControl.touched\">\r\n \r\n <ngx-dropzone-image-preview class=\"rounded-circle w-100 h-100 m-0\" *ngFor=\"let f of files\" ngProjectAs=\"ngx-dropzone-preview\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\"\r\n >\r\n\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n </div>\r\n\r\n\r\n <div id=\"mdlSample\" class=\"modal fade\" role=\"dialog\" style=\"z-index: 11 !important ;\"\r\n [ngStyle]=\"{'display': mdlSampleIsOpen ? 'block' : 'none', 'opacity': 1}\">\r\n <div class=\"modal-dialog modal-lg\">\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header\">\r\n <h4 class=\"modal-title\">\r\n Crop Image\r\n </h4>\r\n </div>\r\n <div class=\"modal-body py-5\">\r\n <div *ngIf=\"imageUrl\">\r\n <angular-cropper class=\"ProfileDropBox\" #angularCropper [cropperOptions]=\"config\" [imageUrl]=\"imageUrl\">\r\n </angular-cropper>\r\n <img [src]=\"imgwUrl\" />\r\n </div>\r\n <div style=\"text-align:center;\">\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"zoomImage(0.1)\" class=\"btn btn-default\" data-method=\"zoom\" data-option=\"0.1\" title=\"Zoom In\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.zoom(0.1)\">\r\n <span class=\"fa fa-search-plus\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"zoomImage(-0.1)\" class=\"btn btn-default\" data-method=\"zoom\" data-option=\"-0.1\" title=\"Zoom Out\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.zoom(-0.1)\">\r\n <span class=\"fa fa-search-minus\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"moveImage(-10,0)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"-10\" data-second-option=\"0\" title=\"Move Left\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(-10, 0)\" aria-describedby=\"tooltip631939\">\r\n <span class=\"fa fa-arrow-left\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"moveImage(10,0)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"10\" data-second-option=\"0\" title=\"Move Right\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(10, 0)\">\r\n <span class=\"fa fa-arrow-right\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"moveImage(0,-10)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"0\" data-second-option=\"-10\" title=\"Move Up\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(0, -10)\">\r\n <span class=\"fa fa-arrow-up\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"moveImage(0,10)\" class=\"btn btn-default\" data-method=\"move\" data-option=\"0\" data-second-option=\"10\" title=\"Move Down\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.move(0, 10)\">\r\n <span class=\"fa fa-arrow-down\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"rotateImage(-45)\" class=\"btn btn-default\" data-method=\"rotate\" data-option=\"-45\" title=\"Rotate Left\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.rotate(-45)\" aria-describedby=\"tooltip236044\">\r\n <span class=\"fa fa-undo-alt\"></span>\r\n </span>\r\n </button>\r\n <button type=\"button\" (click)=\"rotateImage(45)\" class=\"btn btn-default\" data-method=\"rotate\" data-option=\"45\" title=\"Rotate Right\">\r\n <span class=\"docs-tooltip\" data-toggle=\"tooltip\" title=\"\" data-original-title=\"cropper.rotate(45)\">\r\n <span class=\"fa fa-redo-alt\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\" align=\"right\">\r\n <button type=\"button\" id=\"btnClose\" class=\"btn btn-default\" (click)=\"openModal(false)\">\r\n <i class=\"fa fa-times fa-fw\"></i> Cancel\r\n </button>\r\n <button type=\"button\" (click)=\"cropImage()\" id=\"btnOK\" class=\"btn btn-success\">\r\n <i class=\"fa fa-check fa-fw\"></i>\r\n Crop\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n \r\n \r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(ProfileImageUploadFormControl.invalid && ProfileImageUploadFormControl.touched)\">\r\n {{getErrorValidation(ProfileImageUploadFormControl.errors|keyvalue)}}\r\n</div>\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"control-desc text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
3202
3274
|
styles: [".e-tip-content{background-color:#afafaf;color:#fff;padding-left:10px;padding-right:10px;padding-top:2px}.my-drop-zone{border:dotted 3px lightgray}.nv-file-over{border:dotted 3px red}.another-file-over-class{border:dotted 3px green}html,body{height:100%}.modal{display:none;position:fixed;z-index:1;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:#0006}.modal-content{position:relative;background-color:#fefefe;margin:auto;padding:0;border:1px solid #888;width:80%;box-shadow:0 4px 8px #0003,0 6px 20px #00000030;-webkit-animation-name:animatetop;-webkit-animation-duration:.4s;animation-name:animatetop;animation-duration:.4s}@keyframes animatetop{0%{top:-300px;opacity:0}to{top:0;opacity:1}}.close{color:#fff;float:right;font-size:28px;font-weight:bold}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.modal-body{padding:2px 16px}\n"]
|
|
3203
3275
|
},] }
|
|
3204
3276
|
];
|
|
3205
3277
|
ProfileImageUploaderComponent.ctorParameters = () => [
|
|
3206
3278
|
{ type: NgZone },
|
|
3207
|
-
{ type: ErrorMassageValidation },
|
|
3208
3279
|
{ type: ControlUtility },
|
|
3209
3280
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
3210
3281
|
{ type: FormGroupDirective },
|
|
3211
3282
|
{ type: UtilityService },
|
|
3212
|
-
{ type: ControlValidationService }
|
|
3283
|
+
{ type: ControlValidationService },
|
|
3284
|
+
{ type: GlobalSettings }
|
|
3213
3285
|
];
|
|
3214
3286
|
ProfileImageUploaderComponent.propDecorators = {
|
|
3215
3287
|
fileInput: [{ type: ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -3228,15 +3300,16 @@ class AutocompleteDTO {
|
|
|
3228
3300
|
|
|
3229
3301
|
class AutocompleteTextBoxComponent {
|
|
3230
3302
|
// tslint:disable-next-line: max-line-length
|
|
3231
|
-
constructor(http, ErrorHandler, controlUtility, controlContainer, AutocompleteTextBoxControlHost, UtilityService,
|
|
3303
|
+
constructor(http, ErrorHandler, requestHandlerService, controlUtility, controlContainer, AutocompleteTextBoxControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3232
3304
|
this.http = http;
|
|
3233
3305
|
this.ErrorHandler = ErrorHandler;
|
|
3306
|
+
this.requestHandlerService = requestHandlerService;
|
|
3234
3307
|
this.controlUtility = controlUtility;
|
|
3235
3308
|
this.controlContainer = controlContainer;
|
|
3236
3309
|
this.AutocompleteTextBoxControlHost = AutocompleteTextBoxControlHost;
|
|
3237
3310
|
this.UtilityService = UtilityService;
|
|
3238
|
-
this.translate = translate;
|
|
3239
3311
|
this.controlValidationService = controlValidationService;
|
|
3312
|
+
this.globalSettings = globalSettings;
|
|
3240
3313
|
this.OnChange = new EventEmitter();
|
|
3241
3314
|
this.keyword = 'value';
|
|
3242
3315
|
this.Search = '';
|
|
@@ -3310,6 +3383,8 @@ class AutocompleteTextBoxComponent {
|
|
|
3310
3383
|
this.controlValidationService.isCreatedBefor = false;
|
|
3311
3384
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
3312
3385
|
this.AutocompleteTextBoxControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
3386
|
+
if (!this.options.ViewType)
|
|
3387
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3313
3388
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
3314
3389
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
3315
3390
|
// this.AutocompleteTextBoxControl.setValue(this.options.Value);
|
|
@@ -3352,10 +3427,12 @@ class AutocompleteTextBoxComponent {
|
|
|
3352
3427
|
if (query) {
|
|
3353
3428
|
let params = new HttpParams();
|
|
3354
3429
|
params = params.append(this.options.QueryParam, query);
|
|
3430
|
+
let requestOptionsModel = new RequestOptionsModel();
|
|
3431
|
+
requestOptionsModel.disableBlockUI = true;
|
|
3432
|
+
requestOptionsModel.disableSuccessNotification = true;
|
|
3355
3433
|
// using github public api to get users by name
|
|
3356
|
-
return this.
|
|
3357
|
-
|
|
3358
|
-
}).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 => {
|
|
3359
3436
|
// in case of http error
|
|
3360
3437
|
this.errorMessage = err && err.message || 'Something goes wrong';
|
|
3361
3438
|
}));
|
|
@@ -3439,12 +3516,13 @@ AutocompleteTextBoxComponent.decorators = [
|
|
|
3439
3516
|
AutocompleteTextBoxComponent.ctorParameters = () => [
|
|
3440
3517
|
{ type: HttpClient },
|
|
3441
3518
|
{ type: ErrorMassageValidation },
|
|
3519
|
+
{ type: RequestHandlerService },
|
|
3442
3520
|
{ type: ControlUtility },
|
|
3443
3521
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
3444
3522
|
{ type: FormGroupDirective },
|
|
3445
3523
|
{ type: UtilityService },
|
|
3446
|
-
{ type:
|
|
3447
|
-
{ type:
|
|
3524
|
+
{ type: ControlValidationService },
|
|
3525
|
+
{ type: GlobalSettings }
|
|
3448
3526
|
];
|
|
3449
3527
|
AutocompleteTextBoxComponent.propDecorators = {
|
|
3450
3528
|
group: [{ type: Input }],
|
|
@@ -3454,14 +3532,15 @@ AutocompleteTextBoxComponent.propDecorators = {
|
|
|
3454
3532
|
|
|
3455
3533
|
class TagsInputComponent {
|
|
3456
3534
|
// tslint:disable-next-line: max-line-length
|
|
3457
|
-
constructor(http,
|
|
3535
|
+
constructor(http, controlUtility, requestHandlerService, controlContainer, TagsInputControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3458
3536
|
this.http = http;
|
|
3459
|
-
this.ErrorHandler = ErrorHandler;
|
|
3460
3537
|
this.controlUtility = controlUtility;
|
|
3538
|
+
this.requestHandlerService = requestHandlerService;
|
|
3461
3539
|
this.controlContainer = controlContainer;
|
|
3462
3540
|
this.TagsInputControlHost = TagsInputControlHost;
|
|
3463
3541
|
this.UtilityService = UtilityService;
|
|
3464
3542
|
this.controlValidationService = controlValidationService;
|
|
3543
|
+
this.globalSettings = globalSettings;
|
|
3465
3544
|
this.OnChange = new EventEmitter();
|
|
3466
3545
|
// TagInputControl: AbstractControl;
|
|
3467
3546
|
this.SelectedId = [];
|
|
@@ -3516,6 +3595,8 @@ class TagsInputComponent {
|
|
|
3516
3595
|
this.TagsFormGroup.addControl("tags", new FormControl(''));
|
|
3517
3596
|
this.TagsFormControl = this.TagsFormGroup.controls["tags"]; // new FormControl('',validationRules);
|
|
3518
3597
|
this.group.addControl(this.options.Name, this.TagsFormControl);
|
|
3598
|
+
if (!this.options.ViewType)
|
|
3599
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3519
3600
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
3520
3601
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
3521
3602
|
// this.group.addControl(this.options.Name, new FormControl(''));
|
|
@@ -3573,21 +3654,11 @@ class TagsInputComponent {
|
|
|
3573
3654
|
this.controlUtility.CopyInputMessage(inputElement);
|
|
3574
3655
|
}
|
|
3575
3656
|
searchFunctionFactory(Text) {
|
|
3576
|
-
const httpOptions = this.options.ValidationToken != null && this.options.ValidationToken != "" ?
|
|
3577
|
-
{
|
|
3578
|
-
headers: new HttpHeaders({
|
|
3579
|
-
'Content-Type': 'application/json',
|
|
3580
|
-
'Authorization': this.options.ValidationToken
|
|
3581
|
-
})
|
|
3582
|
-
}
|
|
3583
|
-
:
|
|
3584
|
-
{
|
|
3585
|
-
headers: new HttpHeaders({
|
|
3586
|
-
'Content-Type': 'application/json',
|
|
3587
|
-
})
|
|
3588
|
-
};
|
|
3589
3657
|
let Url = `${this.options.ActionURL}?${this.options.QueryParamName}=${Text}&${this.options.SelectedItemsParamName}=${this.SelectedId}`;
|
|
3590
|
-
let
|
|
3658
|
+
let requestOptionsModel = new RequestOptionsModel();
|
|
3659
|
+
requestOptionsModel.disableBlockUI = true;
|
|
3660
|
+
requestOptionsModel.disableSuccessNotification = true;
|
|
3661
|
+
let Model = this.requestHandlerService.get(Url, null, requestOptionsModel);
|
|
3591
3662
|
return Model;
|
|
3592
3663
|
}
|
|
3593
3664
|
AddTag(event, key) {
|
|
@@ -3638,12 +3709,13 @@ TagsInputComponent.decorators = [
|
|
|
3638
3709
|
];
|
|
3639
3710
|
TagsInputComponent.ctorParameters = () => [
|
|
3640
3711
|
{ type: HttpClient },
|
|
3641
|
-
{ type: ErrorMassageValidation },
|
|
3642
3712
|
{ type: ControlUtility },
|
|
3713
|
+
{ type: RequestHandlerService },
|
|
3643
3714
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
3644
3715
|
{ type: FormGroupDirective },
|
|
3645
3716
|
{ type: UtilityService },
|
|
3646
|
-
{ type: ControlValidationService }
|
|
3717
|
+
{ type: ControlValidationService },
|
|
3718
|
+
{ type: GlobalSettings }
|
|
3647
3719
|
];
|
|
3648
3720
|
TagsInputComponent.propDecorators = {
|
|
3649
3721
|
group: [{ type: Input }],
|
|
@@ -3677,7 +3749,8 @@ var FilterType;
|
|
|
3677
3749
|
|
|
3678
3750
|
// tslint:disable-next-line: no-conflicting-lifecycle
|
|
3679
3751
|
class PagingComponent {
|
|
3680
|
-
constructor(http, router, onChangeService, requestHandlerService) {
|
|
3752
|
+
constructor(utilityService, http, router, onChangeService, requestHandlerService) {
|
|
3753
|
+
this.utilityService = utilityService;
|
|
3681
3754
|
this.http = http;
|
|
3682
3755
|
this.router = router;
|
|
3683
3756
|
this.onChangeService = onChangeService;
|
|
@@ -3808,7 +3881,6 @@ class PagingComponent {
|
|
|
3808
3881
|
this.getItemList(this.CurrentPage, true);
|
|
3809
3882
|
}
|
|
3810
3883
|
getItemList(page, IsFilterUpdated = false) {
|
|
3811
|
-
;
|
|
3812
3884
|
let pagingDTO = new PagingDTO();
|
|
3813
3885
|
let size = Number.parseInt(this.options.PageSize.toString());
|
|
3814
3886
|
if (this.options.IsLoadMoreControl)
|
|
@@ -3853,25 +3925,45 @@ class PagingComponent {
|
|
|
3853
3925
|
}
|
|
3854
3926
|
this.requestHandlerService.post(this.options.ActionPostURL, pagingDTO, params)
|
|
3855
3927
|
.subscribe((responseData) => {
|
|
3856
|
-
|
|
3928
|
+
debugger;
|
|
3929
|
+
this.result = responseData.items; //this.castItems(responseData.items);
|
|
3857
3930
|
this.Items.emit(this.result);
|
|
3931
|
+
this.totalRow = responseData.totalCount;
|
|
3858
3932
|
if (IsFilterUpdated) {
|
|
3859
3933
|
this.items = [];
|
|
3860
|
-
this.totalRow = responseData.totalCount;
|
|
3861
3934
|
this.Pages = Math.ceil((this.totalRow / this.options.PageSize));
|
|
3862
3935
|
this.items = Array(this.totalRow);
|
|
3863
3936
|
}
|
|
3864
3937
|
});
|
|
3865
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
|
+
}
|
|
3866
3957
|
}
|
|
3867
3958
|
PagingComponent.decorators = [
|
|
3868
3959
|
{ type: Component, args: [{
|
|
3869
3960
|
selector: 'BBSF-Paging',
|
|
3870
|
-
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",
|
|
3871
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"]
|
|
3872
3963
|
},] }
|
|
3873
3964
|
];
|
|
3874
3965
|
PagingComponent.ctorParameters = () => [
|
|
3966
|
+
{ type: UtilityService },
|
|
3875
3967
|
{ type: HttpClient },
|
|
3876
3968
|
{ type: Router },
|
|
3877
3969
|
{ type: OnPagingFiltersChangeService },
|
|
@@ -4011,12 +4103,13 @@ JwPaginationComponent.propDecorators = {
|
|
|
4011
4103
|
|
|
4012
4104
|
class RadioButtonComponent {
|
|
4013
4105
|
// tslint:disable-next-line: max-line-length
|
|
4014
|
-
constructor(controlUtility, controlContainer, RadioButtonControlHost, UtilityService, controlValidationService) {
|
|
4106
|
+
constructor(controlUtility, controlContainer, RadioButtonControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
4015
4107
|
this.controlUtility = controlUtility;
|
|
4016
4108
|
this.controlContainer = controlContainer;
|
|
4017
4109
|
this.RadioButtonControlHost = RadioButtonControlHost;
|
|
4018
4110
|
this.UtilityService = UtilityService;
|
|
4019
4111
|
this.controlValidationService = controlValidationService;
|
|
4112
|
+
this.globalSettings = globalSettings;
|
|
4020
4113
|
this.OnChange = new EventEmitter();
|
|
4021
4114
|
this.markAllAsTouched = false;
|
|
4022
4115
|
this.validationRules = [];
|
|
@@ -4049,6 +4142,8 @@ class RadioButtonComponent {
|
|
|
4049
4142
|
ngOnInit() {
|
|
4050
4143
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
4051
4144
|
this.RadioButtonFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
4145
|
+
if (!this.options.ViewType)
|
|
4146
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4052
4147
|
if (this.options.IsRequired) {
|
|
4053
4148
|
this.validationRules.push(Validators.required);
|
|
4054
4149
|
}
|
|
@@ -4095,7 +4190,8 @@ RadioButtonComponent.ctorParameters = () => [
|
|
|
4095
4190
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
4096
4191
|
{ type: FormGroupDirective },
|
|
4097
4192
|
{ type: UtilityService },
|
|
4098
|
-
{ type: ControlValidationService }
|
|
4193
|
+
{ type: ControlValidationService },
|
|
4194
|
+
{ type: GlobalSettings }
|
|
4099
4195
|
];
|
|
4100
4196
|
RadioButtonComponent.propDecorators = {
|
|
4101
4197
|
group: [{ type: Input }],
|
|
@@ -4105,12 +4201,13 @@ RadioButtonComponent.propDecorators = {
|
|
|
4105
4201
|
|
|
4106
4202
|
class TextboxComponent {
|
|
4107
4203
|
// tslint:disable-next-line: max-line-length
|
|
4108
|
-
constructor(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService) {
|
|
4204
|
+
constructor(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
4109
4205
|
this.controlUtility = controlUtility;
|
|
4110
4206
|
this.controlContainer = controlContainer;
|
|
4111
4207
|
this.TextControlHost = TextControlHost;
|
|
4112
4208
|
this.UtilityService = UtilityService;
|
|
4113
4209
|
this.controlValidationService = controlValidationService;
|
|
4210
|
+
this.globalSettings = globalSettings;
|
|
4114
4211
|
this.OnChange = new EventEmitter();
|
|
4115
4212
|
this.WordCount = 0;
|
|
4116
4213
|
this.WordCountArray = 0;
|
|
@@ -4159,6 +4256,8 @@ class TextboxComponent {
|
|
|
4159
4256
|
// }
|
|
4160
4257
|
ngOnInit() {
|
|
4161
4258
|
this.controlValidationService.isCreatedBefor = false;
|
|
4259
|
+
if (!this.options.ViewType)
|
|
4260
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4162
4261
|
if (this.options.MaskPattern != null && this.options.MaskPattern != "") {
|
|
4163
4262
|
this.MaskPattern = this.options.MaskPattern;
|
|
4164
4263
|
this.options.Placeholder = this.MaskPattern;
|
|
@@ -4235,6 +4334,7 @@ class TextboxComponent {
|
|
|
4235
4334
|
this.group.markAllAsTouched();
|
|
4236
4335
|
this.markAllAsTouched = true;
|
|
4237
4336
|
});
|
|
4337
|
+
this.options.ValidationRules = this.validationRules;
|
|
4238
4338
|
}
|
|
4239
4339
|
ngAfterViewInit() {
|
|
4240
4340
|
this.controlUtility.setAttributeForControl(this.options);
|
|
@@ -4307,7 +4407,8 @@ TextboxComponent.ctorParameters = () => [
|
|
|
4307
4407
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
4308
4408
|
{ type: FormGroupDirective },
|
|
4309
4409
|
{ type: UtilityService },
|
|
4310
|
-
{ type: ControlValidationService }
|
|
4410
|
+
{ type: ControlValidationService },
|
|
4411
|
+
{ type: GlobalSettings }
|
|
4311
4412
|
];
|
|
4312
4413
|
TextboxComponent.propDecorators = {
|
|
4313
4414
|
group: [{ type: Input }],
|
|
@@ -4319,17 +4420,16 @@ class MapAutocompleteDTO {
|
|
|
4319
4420
|
}
|
|
4320
4421
|
|
|
4321
4422
|
class MapAutoCompleteComponent {
|
|
4322
|
-
constructor(mapsAPILoader, ngZone,
|
|
4423
|
+
constructor(mapsAPILoader, ngZone, controlUtility, controlContainer, MapAutoCompleteControlHost, UtilityService, translate, controlValidationService, globalSettings) {
|
|
4323
4424
|
this.mapsAPILoader = mapsAPILoader;
|
|
4324
4425
|
this.ngZone = ngZone;
|
|
4325
|
-
this.titleService = titleService;
|
|
4326
|
-
this.ErrorHandler = ErrorHandler;
|
|
4327
4426
|
this.controlUtility = controlUtility;
|
|
4328
4427
|
this.controlContainer = controlContainer;
|
|
4329
4428
|
this.MapAutoCompleteControlHost = MapAutoCompleteControlHost;
|
|
4330
4429
|
this.UtilityService = UtilityService;
|
|
4331
4430
|
this.translate = translate;
|
|
4332
4431
|
this.controlValidationService = controlValidationService;
|
|
4432
|
+
this.globalSettings = globalSettings;
|
|
4333
4433
|
this.OnChange = new EventEmitter();
|
|
4334
4434
|
this.MapAutoCompleteModel = new MapAutocompleteDTO();
|
|
4335
4435
|
this.CurrentLanguage = "";
|
|
@@ -4499,6 +4599,8 @@ class MapAutoCompleteComponent {
|
|
|
4499
4599
|
});
|
|
4500
4600
|
this.group.addControl(this.options.Name, new FormControl(''));
|
|
4501
4601
|
this.MapAutoCompleteFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
4602
|
+
if (!this.options.ViewType)
|
|
4603
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4502
4604
|
if (this.options.IsRequired) {
|
|
4503
4605
|
this.validationRules.push(Validators.required);
|
|
4504
4606
|
}
|
|
@@ -4577,14 +4679,13 @@ MapAutoCompleteComponent.decorators = [
|
|
|
4577
4679
|
MapAutoCompleteComponent.ctorParameters = () => [
|
|
4578
4680
|
{ type: MapsAPILoader },
|
|
4579
4681
|
{ type: NgZone },
|
|
4580
|
-
{ type: Title },
|
|
4581
|
-
{ type: ErrorMassageValidation },
|
|
4582
4682
|
{ type: ControlUtility },
|
|
4583
4683
|
{ type: ControlContainer, decorators: [{ type: Optional }] },
|
|
4584
4684
|
{ type: FormGroupDirective },
|
|
4585
4685
|
{ type: UtilityService },
|
|
4586
4686
|
{ type: BBSFTranslateService },
|
|
4587
|
-
{ type: ControlValidationService }
|
|
4687
|
+
{ type: ControlValidationService },
|
|
4688
|
+
{ type: GlobalSettings }
|
|
4588
4689
|
];
|
|
4589
4690
|
MapAutoCompleteComponent.propDecorators = {
|
|
4590
4691
|
group: [{ type: Input }],
|
|
@@ -4770,17 +4871,22 @@ var PagingActionMode;
|
|
|
4770
4871
|
})(PagingActionMode || (PagingActionMode = {}));
|
|
4771
4872
|
|
|
4772
4873
|
class FormComponent {
|
|
4773
|
-
constructor(utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
4874
|
+
constructor(controlUtility, utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
4875
|
+
this.controlUtility = controlUtility;
|
|
4774
4876
|
this.utilityService = utilityService;
|
|
4775
4877
|
this.controlValidationService = controlValidationService;
|
|
4776
4878
|
this.modalService = modalService;
|
|
4777
4879
|
this.ngbActiveModal = ngbActiveModal;
|
|
4778
4880
|
}
|
|
4779
4881
|
ngOnInit() {
|
|
4882
|
+
this.fromName = this.randomString(5);
|
|
4780
4883
|
}
|
|
4781
4884
|
submit() {
|
|
4782
|
-
|
|
4885
|
+
this.options.FormGroup.markAllAsTouched();
|
|
4886
|
+
if (this.options.FormGroup.invalid) {
|
|
4887
|
+
this.showGlobalError();
|
|
4783
4888
|
return;
|
|
4889
|
+
}
|
|
4784
4890
|
else {
|
|
4785
4891
|
let submitModel = this.options.GetModelFunction();
|
|
4786
4892
|
let submittedService = this.options.ServiceSubmitFunction.apply(null, submitModel);
|
|
@@ -4816,8 +4922,9 @@ class FormComponent {
|
|
|
4816
4922
|
this.utilityService.notifyErrorMessage();
|
|
4817
4923
|
}
|
|
4818
4924
|
else {
|
|
4925
|
+
debugger;
|
|
4819
4926
|
if (err.status == 400) {
|
|
4820
|
-
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new RequestOptionsModel());
|
|
4927
|
+
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new RequestOptionsModel(), this.fromName);
|
|
4821
4928
|
}
|
|
4822
4929
|
else {
|
|
4823
4930
|
errorMessage = `Server returned code: ${err.status}, error message is: ${err.message}`;
|
|
@@ -4829,15 +4936,27 @@ class FormComponent {
|
|
|
4829
4936
|
if (!this.options.DisableBlockUI)
|
|
4830
4937
|
this.utilityService.stopBlockUI();
|
|
4831
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
|
+
}
|
|
4832
4950
|
}
|
|
4833
4951
|
FormComponent.decorators = [
|
|
4834
4952
|
{ type: Component, args: [{
|
|
4835
4953
|
// tslint:disable-next-line: component-selector
|
|
4836
4954
|
selector: 'BBSF-Form',
|
|
4837
|
-
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>"
|
|
4838
4956
|
},] }
|
|
4839
4957
|
];
|
|
4840
4958
|
FormComponent.ctorParameters = () => [
|
|
4959
|
+
{ type: ControlUtility },
|
|
4841
4960
|
{ type: UtilityService },
|
|
4842
4961
|
{ type: ControlValidationService },
|
|
4843
4962
|
{ type: NgbModal },
|
|
@@ -4856,27 +4975,43 @@ class ConfirmationModalComponent {
|
|
|
4856
4975
|
this.styleSuccess = StyleConfirmationMode.Success;
|
|
4857
4976
|
}
|
|
4858
4977
|
ngOnInit() {
|
|
4859
|
-
console.log("options on initialize");
|
|
4860
|
-
console.log(this.options);
|
|
4861
|
-
//check for options text values
|
|
4862
|
-
this.setTextValues();
|
|
4863
|
-
}
|
|
4864
|
-
ngAfterViewInit() {
|
|
4865
|
-
if (this.options.AutoShowModal)
|
|
4866
|
-
this.showModal();
|
|
4867
4978
|
}
|
|
4868
4979
|
//Method used to show confirmation modal
|
|
4869
4980
|
showModal() {
|
|
4870
4981
|
this.utilityService.startBlockUI();
|
|
4871
|
-
//
|
|
4872
|
-
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
|
+
});
|
|
4873
5012
|
this.utilityService.stopBlockUI();
|
|
4874
|
-
console.log("options after modal opened");
|
|
4875
|
-
console.log(this.options);
|
|
4876
5013
|
}
|
|
4877
5014
|
setTextValues() {
|
|
4878
|
-
console.log("options in first showmodal");
|
|
4879
|
-
console.log(this.options);
|
|
4880
5015
|
if (!this.options.ConfirmationHeader)
|
|
4881
5016
|
this.options.ConfirmationHeader = this.utilityService.getResourceValue("DeleteConfirmation");
|
|
4882
5017
|
if (!this.options.ConfirmationBody)
|
|
@@ -4931,9 +5066,8 @@ class ConfirmationModalComponent {
|
|
|
4931
5066
|
}
|
|
4932
5067
|
ConfirmationModalComponent.decorators = [
|
|
4933
5068
|
{ type: Component, args: [{
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
styles: [""]
|
|
5069
|
+
template: "",
|
|
5070
|
+
selector: 'BBSF-ConfirmationModal'
|
|
4937
5071
|
},] }
|
|
4938
5072
|
];
|
|
4939
5073
|
ConfirmationModalComponent.ctorParameters = () => [
|
|
@@ -5035,18 +5169,19 @@ BBSFControlsModule.decorators = [
|
|
|
5035
5169
|
AutocompleteLibModule,
|
|
5036
5170
|
BBSFUtilitiesModule,
|
|
5037
5171
|
InlineSVGModule.forRoot(),
|
|
5172
|
+
SweetAlert2Module
|
|
5038
5173
|
],
|
|
5039
5174
|
providers: [
|
|
5040
5175
|
ErrorMassageValidation,
|
|
5041
5176
|
ControlUtility,
|
|
5042
5177
|
OnPagingFiltersChangeService,
|
|
5043
|
-
EnvironmentService,
|
|
5044
|
-
AuthService,
|
|
5045
|
-
RequestHandlerService,
|
|
5046
|
-
UtilityService,
|
|
5178
|
+
// EnvironmentService,
|
|
5179
|
+
// AuthService,
|
|
5180
|
+
// RequestHandlerService,
|
|
5181
|
+
// UtilityService,
|
|
5047
5182
|
TranslateService,
|
|
5048
|
-
BBSFTranslateService,
|
|
5049
|
-
ControlValidationService,
|
|
5183
|
+
// BBSFTranslateService,
|
|
5184
|
+
// ControlValidationService,
|
|
5050
5185
|
FormGroupDirective,
|
|
5051
5186
|
NgbModal,
|
|
5052
5187
|
NgbActiveModal
|
|
@@ -5114,12 +5249,6 @@ class CustomValidator {
|
|
|
5114
5249
|
}
|
|
5115
5250
|
}
|
|
5116
5251
|
|
|
5117
|
-
var ControlLayout;
|
|
5118
|
-
(function (ControlLayout) {
|
|
5119
|
-
ControlLayout[ControlLayout["Vertical"] = 1] = "Vertical";
|
|
5120
|
-
ControlLayout[ControlLayout["Horizontal"] = 2] = "Horizontal";
|
|
5121
|
-
})(ControlLayout || (ControlLayout = {}));
|
|
5122
|
-
|
|
5123
5252
|
var ForceDirection;
|
|
5124
5253
|
(function (ForceDirection) {
|
|
5125
5254
|
ForceDirection[ForceDirection["English"] = 1] = "English";
|
|
@@ -5161,14 +5290,17 @@ class TextBoxOptions {
|
|
|
5161
5290
|
/**Prevent AutoComplete of textbox*/
|
|
5162
5291
|
this.AutoComplete = "off";
|
|
5163
5292
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5164
|
-
this.ViewType =
|
|
5293
|
+
this.ViewType = null;
|
|
5165
5294
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5166
5295
|
*/
|
|
5167
5296
|
this.CustomValidation = [];
|
|
5168
5297
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
5169
5298
|
this.ForceDirection = null;
|
|
5299
|
+
/** Set Type of TextBox ("text","password","email","number") */
|
|
5300
|
+
this.Type = InputType.Text;
|
|
5170
5301
|
this.IconPosition = IconPosition.left;
|
|
5171
5302
|
this.NoMargin = false;
|
|
5303
|
+
this.ValidationRules = [];
|
|
5172
5304
|
}
|
|
5173
5305
|
}
|
|
5174
5306
|
|
|
@@ -5182,7 +5314,7 @@ class FileUploadOptions {
|
|
|
5182
5314
|
*/
|
|
5183
5315
|
this.CustomValidation = [];
|
|
5184
5316
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5185
|
-
this.ViewType =
|
|
5317
|
+
this.ViewType = null;
|
|
5186
5318
|
}
|
|
5187
5319
|
}
|
|
5188
5320
|
|
|
@@ -5194,13 +5326,13 @@ class MultiLingualTextBoxOptions {
|
|
|
5194
5326
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5195
5327
|
this.Value = new EnglishArabicDTO();
|
|
5196
5328
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5197
|
-
this.ViewType =
|
|
5329
|
+
this.ViewType = null;
|
|
5198
5330
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5199
|
-
this.LanguageMode =
|
|
5331
|
+
this.LanguageMode = null;
|
|
5200
5332
|
this.IconPositionEN = IconPosition.left;
|
|
5201
5333
|
this.IconPositionAR = IconPosition.right;
|
|
5202
5334
|
/*multi control placement type*/
|
|
5203
|
-
this.MultiControlPlacementType =
|
|
5335
|
+
this.MultiControlPlacementType = null;
|
|
5204
5336
|
}
|
|
5205
5337
|
}
|
|
5206
5338
|
|
|
@@ -5210,7 +5342,7 @@ class Attribute {
|
|
|
5210
5342
|
class TextAreaOptions {
|
|
5211
5343
|
constructor() {
|
|
5212
5344
|
/** to set type of view if TextArea is Vertical or Horizontal */
|
|
5213
|
-
this.ViewType =
|
|
5345
|
+
this.ViewType = null;
|
|
5214
5346
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5215
5347
|
*/
|
|
5216
5348
|
this.CustomValidation = [];
|
|
@@ -5227,11 +5359,11 @@ class MultiLingualTextAreaOptions {
|
|
|
5227
5359
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5228
5360
|
this.Value = new EnglishArabicDTO();
|
|
5229
5361
|
/** to set type of view if MultilingualTextArea is Vertical or Horizontal */
|
|
5230
|
-
this.ViewType =
|
|
5362
|
+
this.ViewType = null;
|
|
5231
5363
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5232
|
-
this.LanguageMode =
|
|
5364
|
+
this.LanguageMode = null;
|
|
5233
5365
|
/*multi control placement type*/
|
|
5234
|
-
this.MultiControlPlacementType =
|
|
5366
|
+
this.MultiControlPlacementType = null;
|
|
5235
5367
|
}
|
|
5236
5368
|
}
|
|
5237
5369
|
|
|
@@ -5254,7 +5386,7 @@ class DropdownOptions {
|
|
|
5254
5386
|
/** Disable Bootstrap DropdownList */
|
|
5255
5387
|
this.DisableBootstrapSelect = false;
|
|
5256
5388
|
/** to set type of view if DropdownList is Vertical or Horizontal */
|
|
5257
|
-
this.ViewType =
|
|
5389
|
+
this.ViewType = null;
|
|
5258
5390
|
/** To Set Custom Validation*/
|
|
5259
5391
|
this.CustomValidation = [];
|
|
5260
5392
|
/** Set key for item in DropdownList */
|
|
@@ -5273,14 +5405,14 @@ class PhoneOptions {
|
|
|
5273
5405
|
/**Set List Of Countries As Preferred Countries*/
|
|
5274
5406
|
this.PreferredCountries = [];
|
|
5275
5407
|
/** to set type of view if Phonebox is Vertical or Horizontal */
|
|
5276
|
-
this.ViewType =
|
|
5408
|
+
this.ViewType = null;
|
|
5277
5409
|
this.ForceDirection = ForceDirection.English;
|
|
5278
5410
|
}
|
|
5279
5411
|
}
|
|
5280
5412
|
|
|
5281
5413
|
class ToggleSlideOptions {
|
|
5282
5414
|
constructor() {
|
|
5283
|
-
this.ViewType =
|
|
5415
|
+
this.ViewType = null;
|
|
5284
5416
|
this.ForceDirection = ForceDirection.English;
|
|
5285
5417
|
}
|
|
5286
5418
|
}
|
|
@@ -5288,7 +5420,7 @@ class ToggleSlideOptions {
|
|
|
5288
5420
|
class HtmlEditorOptions {
|
|
5289
5421
|
constructor() {
|
|
5290
5422
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5291
|
-
this.ViewType =
|
|
5423
|
+
this.ViewType = null;
|
|
5292
5424
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5293
5425
|
*/
|
|
5294
5426
|
this.CustomValidation = [];
|
|
@@ -5307,11 +5439,11 @@ class MultiLingualHtmlEditorOptions {
|
|
|
5307
5439
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5308
5440
|
this.Value = new EnglishArabicDTO();
|
|
5309
5441
|
/** to set type of view if MultipleLanguageText is Vertical or Horizontal */
|
|
5310
|
-
this.ViewType =
|
|
5442
|
+
this.ViewType = null;
|
|
5311
5443
|
/** Set Height For */
|
|
5312
5444
|
this.Height = 150;
|
|
5313
5445
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5314
|
-
this.LanguageMode =
|
|
5446
|
+
this.LanguageMode = null;
|
|
5315
5447
|
}
|
|
5316
5448
|
}
|
|
5317
5449
|
|
|
@@ -5335,7 +5467,7 @@ class ImageUploadOptions {
|
|
|
5335
5467
|
*/
|
|
5336
5468
|
this.CustomValidation = [];
|
|
5337
5469
|
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5338
|
-
this.ViewType =
|
|
5470
|
+
this.ViewType = null;
|
|
5339
5471
|
/** Set List of Custom Attribute to FileInput */
|
|
5340
5472
|
this.FileUploadAcceptsTypes = [ImageType.ImageTypes];
|
|
5341
5473
|
}
|
|
@@ -5348,7 +5480,7 @@ class ProfileImageUploadOptions {
|
|
|
5348
5480
|
this.AllowDropZone = false;
|
|
5349
5481
|
this.CustomValidation = [];
|
|
5350
5482
|
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5351
|
-
this.ViewType =
|
|
5483
|
+
this.ViewType = null;
|
|
5352
5484
|
/** Set List of Custom Attribute to FileInput */
|
|
5353
5485
|
this.ImageUploadAcceptsTypes = [ImageType.ImageTypes];
|
|
5354
5486
|
}
|
|
@@ -5407,7 +5539,7 @@ class MapAutoCompleteOptions {
|
|
|
5407
5539
|
*/
|
|
5408
5540
|
this.CustomValidation = [];
|
|
5409
5541
|
/** to set type of view if MapAutoComplete is Vertical or Horizontal */
|
|
5410
|
-
this.ViewType =
|
|
5542
|
+
this.ViewType = null;
|
|
5411
5543
|
}
|
|
5412
5544
|
}
|
|
5413
5545
|
|
|
@@ -5422,7 +5554,7 @@ class AutocompleteOptions {
|
|
|
5422
5554
|
/** set Range Number to Textbox with type number with From-Value and To-value*/
|
|
5423
5555
|
this.NumberRange = new RangeNumber();
|
|
5424
5556
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5425
|
-
this.ViewType =
|
|
5557
|
+
this.ViewType = null;
|
|
5426
5558
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5427
5559
|
*/
|
|
5428
5560
|
this.CustomValidation = [];
|
|
@@ -5445,7 +5577,7 @@ class TagsInputOptions {
|
|
|
5445
5577
|
/**To set value to tagsinput */
|
|
5446
5578
|
this.Value = null;
|
|
5447
5579
|
/** to set type of view if tagsinput is Vertical or Horizontal */
|
|
5448
|
-
this.ViewType =
|
|
5580
|
+
this.ViewType = null;
|
|
5449
5581
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5450
5582
|
*/
|
|
5451
5583
|
this.CustomValidation = [];
|
|
@@ -5535,7 +5667,7 @@ class PagingOptions {
|
|
|
5535
5667
|
|
|
5536
5668
|
class RadioButtonOptions {
|
|
5537
5669
|
constructor() {
|
|
5538
|
-
this.ViewType =
|
|
5670
|
+
this.ViewType = null;
|
|
5539
5671
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5540
5672
|
*/
|
|
5541
5673
|
this.CustomValidation = [];
|
|
@@ -5594,7 +5726,7 @@ class ConfirmationModalOptions {
|
|
|
5594
5726
|
//Represents refrence to paging control that needs to be updated after success
|
|
5595
5727
|
this.PagingReference = null;
|
|
5596
5728
|
//Represents paging action excutes after submission (Reinitialize/Update)
|
|
5597
|
-
this.PagingActionMode = PagingActionMode.
|
|
5729
|
+
this.PagingActionMode = PagingActionMode.Reinitialize;
|
|
5598
5730
|
//Represents function that excutes after submission error
|
|
5599
5731
|
this.OnErrorHandler = null;
|
|
5600
5732
|
//Represents function that excutes after submission success
|
|
@@ -5605,9 +5737,6 @@ class ConfirmationModalOptions {
|
|
|
5605
5737
|
this.DisableSuccessNotification = false;
|
|
5606
5738
|
//If ="true" disable notification after submission error
|
|
5607
5739
|
this.DisableErrorNotification = false;
|
|
5608
|
-
//If ="true" modal open automatically after options initialization
|
|
5609
|
-
//If="false" should call function showModal()
|
|
5610
|
-
this.AutoShowModal = true;
|
|
5611
5740
|
}
|
|
5612
5741
|
}
|
|
5613
5742
|
|
|
@@ -5934,5 +6063,5 @@ var FileType;
|
|
|
5934
6063
|
* Generated bundle index. Do not edit.
|
|
5935
6064
|
*/
|
|
5936
6065
|
|
|
5937
|
-
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 };
|
|
5938
6067
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|