@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/angular'), require('@fullcalendar/daygrid'), require('@fullcalendar/timegrid'), require('@fullcalendar/list'), require('@fullcalendar/interaction'), require('@angular/core'), require('ng-block-ui'), require('@angular/forms'), require('@angular/http'), require('@angular/router'), require('ngx-toastr'), require('ngx-permissions'), require('@angular/cdk/overlay'), require('@ngrx/store-devtools'), require('@angular/common'), require('ngx-intl-tel-input'), require('@bnsights/bbsf-utilities'), require('ngx-bootstrap/datepicker'), require('rxjs'), require('ng2-file-upload'), require('ng-pick-datetime'), require('ng-multiselect-dropdown'), require('angular2-multiselect-dropdown'), require('ngx-summernote'), require('ngx-mask'), require('@syncfusion/ej2-angular-popups'), require('ngx-dropzone'), require('angular-cropperjs'), require('ngx-image-cropper'), require('@ng-bootstrap/ng-bootstrap'), require('@ngx-translate/core'), require('@angular/common/http'), require('ngx-typeahead'), require('rxjs/operators'), require('ngx-tags-input'), require('@ng-select/ng-select'), require('ngx-infinite-scroll'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@bnsights/bbsf-controls', ['exports', '@fullcalendar/angular', '@fullcalendar/daygrid', '@fullcalendar/timegrid', '@fullcalendar/list', '@fullcalendar/interaction', '@angular/core', 'ng-block-ui', '@angular/forms', '@angular/http', '@angular/router', 'ngx-toastr', 'ngx-permissions', '@angular/cdk/overlay', '@ngrx/store-devtools', '@angular/common', 'ngx-intl-tel-input', '@bnsights/bbsf-utilities', 'ngx-bootstrap/datepicker', 'rxjs', 'ng2-file-upload', 'ng-pick-datetime', 'ng-multiselect-dropdown', 'angular2-multiselect-dropdown', 'ngx-summernote', 'ngx-mask', '@syncfusion/ej2-angular-popups', 'ngx-dropzone', 'angular-cropperjs', 'ngx-image-cropper', '@ng-bootstrap/ng-bootstrap', '@ngx-translate/core', '@angular/common/http', 'ngx-typeahead', 'rxjs/operators', 'ngx-tags-input', '@ng-select/ng-select', 'ngx-infinite-scroll', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bnsights = global.bnsights || {}, global.bnsights["bbsf-controls"] = {}), global.angular, global.dayGridPlugin, global.timeGridPlugin, global.listPlugin, global.interactionPlugin, global.ng.core, global.ngBlockUi, global.ng.forms, global.ng.http, global.ng.router, global.ngxToastr, global.ngxPermissions, global.ng.cdk.overlay, global.storeDevtools, global.ng.common, global.ngxIntlTelInput, global.bbsfUtilities, global.datepicker, global.rxjs, global.ng2FileUpload, global.ngPickDatetime, global.ngMultiselectDropdown, global.angular2MultiselectDropdown, global.ngxSummernote, global.ngxMask, global.ej2AngularPopups, global.ngxDropzone, global.angularCropperjs, global.ngxImageCropper, global.ngBootstrap, global.core$1, global.ng.common.http, global.ngxTypeahead, global.rxjs.operators, global.ngxTagsInput, global.ngSelect, global.ngxInfiniteScroll, global.
|
|
5
|
-
})(this, (function (exports, angular, dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin, i0, ngBlockUi, forms, http, router, ngxToastr, ngxPermissions, overlay, storeDevtools, common, ngxIntlTelInput, bbsfUtilities, datepicker, rxjs, ng2FileUpload, ngPickDatetime, ngMultiselectDropdown, angular2MultiselectDropdown, ngxSummernote, ngxMask, ej2AngularPopups, ngxDropzone, angularCropperjs, ngxImageCropper, ngBootstrap, core$1, http$1, ngxTypeahead, operators, ngxTagsInput, ngSelect, ngxInfiniteScroll,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fullcalendar/angular'), require('@fullcalendar/daygrid'), require('@fullcalendar/timegrid'), require('@fullcalendar/list'), require('@fullcalendar/interaction'), require('@angular/core'), require('ng-block-ui'), require('@angular/forms'), require('@angular/http'), require('@angular/router'), require('ngx-toastr'), require('ngx-permissions'), require('@angular/cdk/overlay'), require('@ngrx/store-devtools'), require('@angular/common'), require('ngx-intl-tel-input'), require('@bnsights/bbsf-utilities'), require('ngx-bootstrap/datepicker'), require('rxjs'), require('ng2-file-upload'), require('ng-pick-datetime'), require('ng-multiselect-dropdown'), require('angular2-multiselect-dropdown'), require('ngx-summernote'), require('ngx-mask'), require('@syncfusion/ej2-angular-popups'), require('ngx-dropzone'), require('angular-cropperjs'), require('ngx-image-cropper'), require('@ng-bootstrap/ng-bootstrap'), require('@ngx-translate/core'), require('@angular/common/http'), require('ngx-typeahead'), require('rxjs/operators'), require('ngx-tags-input'), require('@ng-select/ng-select'), require('ngx-infinite-scroll'), require('@agm/core'), require('@angular-material-extensions/google-maps-autocomplete'), require('@fullcalendar/core/locales/en-gb'), require('@fullcalendar/core/locales/ar'), require('ngx-bootstrap/typeahead'), require('@angular/material/slide-toggle'), require('@kolkov/angular-editor'), require('angular-ng-autocomplete'), require('ng-inline-svg'), require('sweetalert2'), require('@sweetalert2/ngx-sweetalert2')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@bnsights/bbsf-controls', ['exports', '@fullcalendar/angular', '@fullcalendar/daygrid', '@fullcalendar/timegrid', '@fullcalendar/list', '@fullcalendar/interaction', '@angular/core', 'ng-block-ui', '@angular/forms', '@angular/http', '@angular/router', 'ngx-toastr', 'ngx-permissions', '@angular/cdk/overlay', '@ngrx/store-devtools', '@angular/common', 'ngx-intl-tel-input', '@bnsights/bbsf-utilities', 'ngx-bootstrap/datepicker', 'rxjs', 'ng2-file-upload', 'ng-pick-datetime', 'ng-multiselect-dropdown', 'angular2-multiselect-dropdown', 'ngx-summernote', 'ngx-mask', '@syncfusion/ej2-angular-popups', 'ngx-dropzone', 'angular-cropperjs', 'ngx-image-cropper', '@ng-bootstrap/ng-bootstrap', '@ngx-translate/core', '@angular/common/http', 'ngx-typeahead', 'rxjs/operators', 'ngx-tags-input', '@ng-select/ng-select', 'ngx-infinite-scroll', '@agm/core', '@angular-material-extensions/google-maps-autocomplete', '@fullcalendar/core/locales/en-gb', '@fullcalendar/core/locales/ar', 'ngx-bootstrap/typeahead', '@angular/material/slide-toggle', '@kolkov/angular-editor', 'angular-ng-autocomplete', 'ng-inline-svg', 'sweetalert2', '@sweetalert2/ngx-sweetalert2'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bnsights = global.bnsights || {}, global.bnsights["bbsf-controls"] = {}), global.angular, global.dayGridPlugin, global.timeGridPlugin, global.listPlugin, global.interactionPlugin, global.ng.core, global.ngBlockUi, global.ng.forms, global.ng.http, global.ng.router, global.ngxToastr, global.ngxPermissions, global.ng.cdk.overlay, global.storeDevtools, global.ng.common, global.ngxIntlTelInput, global.bbsfUtilities, global.datepicker, global.rxjs, global.ng2FileUpload, global.ngPickDatetime, global.ngMultiselectDropdown, global.angular2MultiselectDropdown, global.ngxSummernote, global.ngxMask, global.ej2AngularPopups, global.ngxDropzone, global.angularCropperjs, global.ngxImageCropper, global.ngBootstrap, global.core$1, global.ng.common.http, global.ngxTypeahead, global.rxjs.operators, global.ngxTagsInput, global.ngSelect, global.ngxInfiniteScroll, global.core, global.googleMapsAutocomplete, global.enGbLocale, global.ArLocale, global.typeahead, global.ng.material.slideToggle, global.angularEditor, global.angularNgAutocomplete, global.ngInlineSvg, global.Swal, global.ngxSweetalert2));
|
|
5
|
+
})(this, (function (exports, angular, dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin, i0, ngBlockUi, forms, http, router, ngxToastr, ngxPermissions, overlay, storeDevtools, common, ngxIntlTelInput, bbsfUtilities, datepicker, rxjs, ng2FileUpload, ngPickDatetime, ngMultiselectDropdown, angular2MultiselectDropdown, ngxSummernote, ngxMask, ej2AngularPopups, ngxDropzone, angularCropperjs, ngxImageCropper, ngBootstrap, core$1, http$1, ngxTypeahead, operators, ngxTagsInput, ngSelect, ngxInfiniteScroll, core, googleMapsAutocomplete, enGbLocale, ArLocale, typeahead, slideToggle, angularEditor, angularNgAutocomplete, ngInlineSvg, Swal, ngxSweetalert2) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
32
32
|
var enGbLocale__default = /*#__PURE__*/_interopDefaultLegacy(enGbLocale);
|
|
33
33
|
var ArLocale__default = /*#__PURE__*/_interopDefaultLegacy(ArLocale);
|
|
34
|
+
var Swal__default = /*#__PURE__*/_interopDefaultLegacy(Swal);
|
|
34
35
|
|
|
35
36
|
var ErrorMassageValidation = /** @class */ (function () {
|
|
36
37
|
// tslint:disable-next-line: deprecation
|
|
@@ -232,8 +233,8 @@
|
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
};
|
|
235
|
-
ControlUtility.prototype.showGlobalError = function () {
|
|
236
|
-
this.controlValidationService.showGlobalError();
|
|
236
|
+
ControlUtility.prototype.showGlobalError = function (formId) {
|
|
237
|
+
this.controlValidationService.showGlobalError(null, formId);
|
|
237
238
|
this.scrollToGlobalErrorMassage();
|
|
238
239
|
};
|
|
239
240
|
ControlUtility.prototype.RemoveRequiredValidation = function (FormControl, ValidationRole, Options) {
|
|
@@ -248,6 +249,16 @@
|
|
|
248
249
|
FormControl.setValidators(ValidationRole);
|
|
249
250
|
FormControl.updateValueAndValidity();
|
|
250
251
|
};
|
|
252
|
+
ControlUtility.prototype.addRequiredToControl = function (FormControl, Options) {
|
|
253
|
+
Options.IsRequired = true;
|
|
254
|
+
FormControl.addValidators(forms.Validators.required);
|
|
255
|
+
FormControl.updateValueAndValidity();
|
|
256
|
+
};
|
|
257
|
+
ControlUtility.prototype.removeRequiredFromControl = function (FormControl, Options) {
|
|
258
|
+
Options.IsRequired = false;
|
|
259
|
+
FormControl.removeValidators(forms.Validators.required);
|
|
260
|
+
FormControl.updateValueAndValidity();
|
|
261
|
+
};
|
|
251
262
|
ControlUtility.prototype.RemoveCustomValidation = function (FormControl, ValidationRole, CustomValidation) {
|
|
252
263
|
ValidationRole = ValidationRole.filter(function (e) { return e != CustomValidation.functionBody; });
|
|
253
264
|
FormControl.setValidators(ValidationRole);
|
|
@@ -469,15 +480,49 @@
|
|
|
469
480
|
return MultipleFileUploadModel;
|
|
470
481
|
}());
|
|
471
482
|
|
|
483
|
+
exports.ControlLayout = void 0;
|
|
484
|
+
(function (ControlLayout) {
|
|
485
|
+
ControlLayout[ControlLayout["Vertical"] = 1] = "Vertical";
|
|
486
|
+
ControlLayout[ControlLayout["Horizontal"] = 2] = "Horizontal";
|
|
487
|
+
})(exports.ControlLayout || (exports.ControlLayout = {}));
|
|
488
|
+
|
|
489
|
+
exports.LanguageMode = void 0;
|
|
490
|
+
(function (LanguageMode) {
|
|
491
|
+
LanguageMode[LanguageMode["Both_Languages_are_visible"] = 1] = "Both_Languages_are_visible";
|
|
492
|
+
LanguageMode[LanguageMode["English_Language_only_is_visible"] = 2] = "English_Language_only_is_visible";
|
|
493
|
+
LanguageMode[LanguageMode["Arabic_Language_only_is_visible"] = 3] = "Arabic_Language_only_is_visible";
|
|
494
|
+
LanguageMode[LanguageMode["Both_Languages_but_only_English_is_required"] = 4] = "Both_Languages_but_only_English_is_required";
|
|
495
|
+
LanguageMode[LanguageMode["Both_Languages_but_only_Arabic_is_required"] = 5] = "Both_Languages_but_only_Arabic_is_required";
|
|
496
|
+
LanguageMode[LanguageMode["Current_Language_only_is_visible_and_required"] = 6] = "Current_Language_only_is_visible_and_required";
|
|
497
|
+
LanguageMode[LanguageMode["Both_Languages_are_visible_but_only_current_language_is_required"] = 7] = "Both_Languages_are_visible_but_only_current_language_is_required";
|
|
498
|
+
})(exports.LanguageMode || (exports.LanguageMode = {}));
|
|
499
|
+
|
|
500
|
+
var GlobalSettings = /** @class */ (function () {
|
|
501
|
+
function GlobalSettings() {
|
|
502
|
+
/** to set type of view if MultilingualTextArea is Vertical or Horizontal */
|
|
503
|
+
this.ViewType = exports.ControlLayout.Vertical;
|
|
504
|
+
/*multi control placement type*/
|
|
505
|
+
this.MultiControlPlacementType = exports.ControlLayout.Horizontal;
|
|
506
|
+
/**To Set LanguageMode To MultipleLanguageText */
|
|
507
|
+
this.LanguageMode = exports.LanguageMode.Both_Languages_are_visible;
|
|
508
|
+
this.HideAstericsWhenRequired = false;
|
|
509
|
+
}
|
|
510
|
+
return GlobalSettings;
|
|
511
|
+
}());
|
|
512
|
+
GlobalSettings.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function GlobalSettings_Factory() { return new GlobalSettings(); }, token: GlobalSettings, providedIn: "root" });
|
|
513
|
+
GlobalSettings.decorators = [
|
|
514
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
515
|
+
];
|
|
516
|
+
|
|
472
517
|
var FileUploadComponent = /** @class */ (function () {
|
|
473
|
-
function FileUploadComponent(controlContainer, MultipleFileUplaodControlHost, controlUtility, UtilityService,
|
|
518
|
+
function FileUploadComponent(controlContainer, MultipleFileUplaodControlHost, controlUtility, UtilityService, controlValidationService, globalSettings) {
|
|
474
519
|
var _this = this;
|
|
475
520
|
this.controlContainer = controlContainer;
|
|
476
521
|
this.MultipleFileUplaodControlHost = MultipleFileUplaodControlHost;
|
|
477
522
|
this.controlUtility = controlUtility;
|
|
478
523
|
this.UtilityService = UtilityService;
|
|
479
|
-
this.translate = translate;
|
|
480
524
|
this.controlValidationService = controlValidationService;
|
|
525
|
+
this.globalSettings = globalSettings;
|
|
481
526
|
this.OnChange = new i0.EventEmitter();
|
|
482
527
|
this.ValidationMessage = "";
|
|
483
528
|
this.AcceptedType = "";
|
|
@@ -519,6 +564,8 @@
|
|
|
519
564
|
var _this = this;
|
|
520
565
|
this.fileUploadModel = new FileUploadModel();
|
|
521
566
|
this.multipleFileUploadModel = new MultipleFileUploadModel();
|
|
567
|
+
if (!this.options.ViewType)
|
|
568
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
522
569
|
if (this.options.Value == null) {
|
|
523
570
|
if (this.options.IsMultipleFile == true) {
|
|
524
571
|
//this.options.Value=this.multipleFileUploadModel
|
|
@@ -781,8 +828,8 @@
|
|
|
781
828
|
{ type: forms.FormGroupDirective },
|
|
782
829
|
{ type: ControlUtility },
|
|
783
830
|
{ type: bbsfUtilities.UtilityService },
|
|
784
|
-
{ type: bbsfUtilities.
|
|
785
|
-
{ type:
|
|
831
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
832
|
+
{ type: GlobalSettings }
|
|
786
833
|
]; };
|
|
787
834
|
FileUploadComponent.propDecorators = {
|
|
788
835
|
fileInput: [{ type: i0.ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -1115,27 +1162,16 @@
|
|
|
1115
1162
|
return EnglishArabicDTO;
|
|
1116
1163
|
}());
|
|
1117
1164
|
|
|
1118
|
-
exports.LanguageMode = void 0;
|
|
1119
|
-
(function (LanguageMode) {
|
|
1120
|
-
LanguageMode[LanguageMode["Both_Languages_are_visible"] = 1] = "Both_Languages_are_visible";
|
|
1121
|
-
LanguageMode[LanguageMode["English_Language_only_is_visible"] = 2] = "English_Language_only_is_visible";
|
|
1122
|
-
LanguageMode[LanguageMode["Arabic_Language_only_is_visible"] = 3] = "Arabic_Language_only_is_visible";
|
|
1123
|
-
LanguageMode[LanguageMode["Both_Languages_but_only_English_is_required"] = 4] = "Both_Languages_but_only_English_is_required";
|
|
1124
|
-
LanguageMode[LanguageMode["Both_Languages_but_only_Arabic_is_required"] = 5] = "Both_Languages_but_only_Arabic_is_required";
|
|
1125
|
-
LanguageMode[LanguageMode["Current_Language_only_is_visible_and_required"] = 6] = "Current_Language_only_is_visible_and_required";
|
|
1126
|
-
LanguageMode[LanguageMode["Both_Languages_are_visible_but_only_current_language_is_required"] = 7] = "Both_Languages_are_visible_but_only_current_language_is_required";
|
|
1127
|
-
})(exports.LanguageMode || (exports.LanguageMode = {}));
|
|
1128
|
-
|
|
1129
1165
|
var MultiLingualTextBoxComponent = /** @class */ (function () {
|
|
1130
|
-
function MultiLingualTextBoxComponent(
|
|
1166
|
+
function MultiLingualTextBoxComponent(MultiLingualTextBoxFormControlHost, controlContainer, controlUtility, UtilityService, translate, controlValidationService, globalSettings) {
|
|
1131
1167
|
var _this = this;
|
|
1132
|
-
this.ErrorHandler = ErrorHandler;
|
|
1133
1168
|
this.MultiLingualTextBoxFormControlHost = MultiLingualTextBoxFormControlHost;
|
|
1134
1169
|
this.controlContainer = controlContainer;
|
|
1135
1170
|
this.controlUtility = controlUtility;
|
|
1136
1171
|
this.UtilityService = UtilityService;
|
|
1137
1172
|
this.translate = translate;
|
|
1138
1173
|
this.controlValidationService = controlValidationService;
|
|
1174
|
+
this.globalSettings = globalSettings;
|
|
1139
1175
|
this.OnChange = new i0.EventEmitter();
|
|
1140
1176
|
this.ArabicWordCount = 0;
|
|
1141
1177
|
this.ArabicWordCountArray = 0;
|
|
@@ -1201,12 +1237,18 @@
|
|
|
1201
1237
|
// });
|
|
1202
1238
|
this.MultiLanguagegroup = new forms.FormGroup({});
|
|
1203
1239
|
;
|
|
1204
|
-
this.MultiLanguagegroup.addControl("
|
|
1205
|
-
this.MultiLanguagegroup.addControl("
|
|
1206
|
-
this.ArabicFormControl = this.MultiLanguagegroup.controls["
|
|
1207
|
-
this.EnglishFormControl = this.MultiLanguagegroup.controls["
|
|
1240
|
+
this.MultiLanguagegroup.addControl("Arabic", new forms.FormControl(''));
|
|
1241
|
+
this.MultiLanguagegroup.addControl("English", new forms.FormControl(''));
|
|
1242
|
+
this.ArabicFormControl = this.MultiLanguagegroup.controls["Arabic"]; // new FormControl('',validationRules);
|
|
1243
|
+
this.EnglishFormControl = this.MultiLanguagegroup.controls["English"]; // new FormControl('',validationRules);
|
|
1208
1244
|
this.group.addControl(this.options.Name, new forms.FormGroup(this.MultiLanguagegroup.controls));
|
|
1209
1245
|
this.getCustomErrorsMassages();
|
|
1246
|
+
if (!this.options.ViewType)
|
|
1247
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1248
|
+
if (!this.options.LanguageMode)
|
|
1249
|
+
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
1250
|
+
if (!this.options.MultiControlPlacementType)
|
|
1251
|
+
this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
|
|
1210
1252
|
if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
|
|
1211
1253
|
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
|
|
1212
1254
|
if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
|
|
@@ -1276,9 +1318,9 @@
|
|
|
1276
1318
|
if (this.EnglishWordCountArray > 0) {
|
|
1277
1319
|
if (this.EnglishWordCountArray > this.options.MaxWordCount) {
|
|
1278
1320
|
this.EnglishWordCount = this.options.MaxWordCount;
|
|
1279
|
-
this.MultiLanguagegroup.controls["
|
|
1280
|
-
this.MultiLanguagegroup.controls["
|
|
1281
|
-
this.MultiLanguagegroup.controls["
|
|
1321
|
+
this.MultiLanguagegroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1322
|
+
this.MultiLanguagegroup.controls["English"].markAsTouched();
|
|
1323
|
+
this.MultiLanguagegroup.controls["English"].invalid;
|
|
1282
1324
|
}
|
|
1283
1325
|
else {
|
|
1284
1326
|
this.EnglishWordCount = this.EnglishWordCountArray;
|
|
@@ -1297,9 +1339,9 @@
|
|
|
1297
1339
|
if (this.ArabicWordCountArray > 0) {
|
|
1298
1340
|
if (this.ArabicWordCountArray > this.options.MaxWordCount) {
|
|
1299
1341
|
this.ArabicWordCount = this.options.MaxWordCount;
|
|
1300
|
-
this.MultiLanguagegroup.controls["
|
|
1301
|
-
this.MultiLanguagegroup.controls["
|
|
1302
|
-
this.MultiLanguagegroup.controls["
|
|
1342
|
+
this.MultiLanguagegroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1343
|
+
this.MultiLanguagegroup.controls["Arabic"].markAsTouched();
|
|
1344
|
+
this.MultiLanguagegroup.controls["Arabic"].invalid;
|
|
1303
1345
|
}
|
|
1304
1346
|
else {
|
|
1305
1347
|
this.ArabicWordCount = this.ArabicWordCountArray;
|
|
@@ -1438,18 +1480,18 @@
|
|
|
1438
1480
|
MultiLingualTextBoxComponent.decorators = [
|
|
1439
1481
|
{ type: i0.Component, args: [{
|
|
1440
1482
|
selector: 'BBSF-MultiLingualTextBox',
|
|
1441
|
-
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=\"
|
|
1483
|
+
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",
|
|
1442
1484
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1443
1485
|
},] }
|
|
1444
1486
|
];
|
|
1445
1487
|
MultiLingualTextBoxComponent.ctorParameters = function () { return [
|
|
1446
|
-
{ type: ErrorMassageValidation },
|
|
1447
1488
|
{ type: forms.FormGroupDirective },
|
|
1448
1489
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
1449
1490
|
{ type: ControlUtility },
|
|
1450
1491
|
{ type: bbsfUtilities.UtilityService },
|
|
1451
1492
|
{ type: bbsfUtilities.BBSFTranslateService },
|
|
1452
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
1493
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
1494
|
+
{ type: GlobalSettings }
|
|
1453
1495
|
]; };
|
|
1454
1496
|
MultiLingualTextBoxComponent.propDecorators = {
|
|
1455
1497
|
group: [{ type: i0.Input }],
|
|
@@ -1458,14 +1500,14 @@
|
|
|
1458
1500
|
};
|
|
1459
1501
|
|
|
1460
1502
|
var TextAreaComponent = /** @class */ (function () {
|
|
1461
|
-
function TextAreaComponent(
|
|
1503
|
+
function TextAreaComponent(controlUtility, controlContainer, TextAreaControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
1462
1504
|
var _this = this;
|
|
1463
|
-
this.ErrorHandler = ErrorHandler;
|
|
1464
1505
|
this.controlUtility = controlUtility;
|
|
1465
1506
|
this.controlContainer = controlContainer;
|
|
1466
1507
|
this.TextAreaControlHost = TextAreaControlHost;
|
|
1467
1508
|
this.UtilityService = UtilityService;
|
|
1468
1509
|
this.controlValidationService = controlValidationService;
|
|
1510
|
+
this.globalSettings = globalSettings;
|
|
1469
1511
|
this.OnChange = new i0.EventEmitter();
|
|
1470
1512
|
this.WordCount = 0;
|
|
1471
1513
|
this.WordCountArray = 0;
|
|
@@ -1503,6 +1545,8 @@
|
|
|
1503
1545
|
this.controlValidationService.isCreatedBefor = false;
|
|
1504
1546
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
1505
1547
|
this.TextAreaFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
1548
|
+
if (!this.options.ViewType)
|
|
1549
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1506
1550
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
1507
1551
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
1508
1552
|
this.TextAreaFormControl.setValue(this.options.Value);
|
|
@@ -1590,12 +1634,12 @@
|
|
|
1590
1634
|
},] }
|
|
1591
1635
|
];
|
|
1592
1636
|
TextAreaComponent.ctorParameters = function () { return [
|
|
1593
|
-
{ type: ErrorMassageValidation },
|
|
1594
1637
|
{ type: ControlUtility },
|
|
1595
1638
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
1596
1639
|
{ type: forms.FormGroupDirective },
|
|
1597
1640
|
{ type: bbsfUtilities.UtilityService },
|
|
1598
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
1641
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
1642
|
+
{ type: GlobalSettings }
|
|
1599
1643
|
]; };
|
|
1600
1644
|
TextAreaComponent.propDecorators = {
|
|
1601
1645
|
group: [{ type: i0.Input }],
|
|
@@ -1604,15 +1648,14 @@
|
|
|
1604
1648
|
};
|
|
1605
1649
|
|
|
1606
1650
|
var MultiLingualTextAreaComponent = /** @class */ (function () {
|
|
1607
|
-
function MultiLingualTextAreaComponent(
|
|
1651
|
+
function MultiLingualTextAreaComponent(MultiLingualTextAreaFormControlHost, controlContainer, controlUtility, UtilityService, controlValidationService, globalSettings) {
|
|
1608
1652
|
var _this = this;
|
|
1609
|
-
this.ErrorHandler = ErrorHandler;
|
|
1610
1653
|
this.MultiLingualTextAreaFormControlHost = MultiLingualTextAreaFormControlHost;
|
|
1611
1654
|
this.controlContainer = controlContainer;
|
|
1612
1655
|
this.controlUtility = controlUtility;
|
|
1613
1656
|
this.UtilityService = UtilityService;
|
|
1614
|
-
this.translate = translate;
|
|
1615
1657
|
this.controlValidationService = controlValidationService;
|
|
1658
|
+
this.globalSettings = globalSettings;
|
|
1616
1659
|
this.OnChange = new i0.EventEmitter();
|
|
1617
1660
|
this.ArabicWordCount = 0;
|
|
1618
1661
|
this.ArabicWordCountArray = 0;
|
|
@@ -1680,15 +1723,21 @@
|
|
|
1680
1723
|
// this.CurrentLanguage = event.lang
|
|
1681
1724
|
// this.showInputUsingLanguageMode();
|
|
1682
1725
|
// });
|
|
1726
|
+
if (!this.options.ViewType)
|
|
1727
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
1728
|
+
if (!this.options.LanguageMode)
|
|
1729
|
+
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
1730
|
+
if (!this.options.MultiControlPlacementType)
|
|
1731
|
+
this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
|
|
1683
1732
|
if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
|
|
1684
1733
|
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
|
|
1685
1734
|
if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
|
|
1686
1735
|
this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
|
|
1687
1736
|
this.MultiLanguageTextAreagroup = new forms.FormGroup({});
|
|
1688
|
-
this.MultiLanguageTextAreagroup.addControl("
|
|
1689
|
-
this.MultiLanguageTextAreagroup.addControl("
|
|
1690
|
-
this.ArabicTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["
|
|
1691
|
-
this.EnglishTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["
|
|
1737
|
+
this.MultiLanguageTextAreagroup.addControl("Arabic", new forms.FormControl(''));
|
|
1738
|
+
this.MultiLanguageTextAreagroup.addControl("English", new forms.FormControl(''));
|
|
1739
|
+
this.ArabicTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["Arabic"]; // new FormControl('',validationRules);
|
|
1740
|
+
this.EnglishTextAreaFormControl = this.MultiLanguageTextAreagroup.controls["English"]; // new FormControl('',validationRules);
|
|
1692
1741
|
this.group.addControl(this.options.Name, new forms.FormGroup(this.MultiLanguageTextAreagroup.controls));
|
|
1693
1742
|
this.getCustomErrorsMassages();
|
|
1694
1743
|
switch (this.options.Type) {
|
|
@@ -1760,9 +1809,9 @@
|
|
|
1760
1809
|
if (this.EnglishWordCountArray > 0) {
|
|
1761
1810
|
if (this.EnglishWordCountArray > this.options.MaxWordCount) {
|
|
1762
1811
|
this.EnglishWordCount = this.options.MaxWordCount;
|
|
1763
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1764
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1765
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1812
|
+
this.MultiLanguageTextAreagroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1813
|
+
this.MultiLanguageTextAreagroup.controls["English"].markAsTouched();
|
|
1814
|
+
this.MultiLanguageTextAreagroup.controls["English"].invalid;
|
|
1766
1815
|
}
|
|
1767
1816
|
else {
|
|
1768
1817
|
this.EnglishWordCount = this.EnglishWordCountArray;
|
|
@@ -1781,9 +1830,9 @@
|
|
|
1781
1830
|
if (this.ArabicWordCountArray > 0) {
|
|
1782
1831
|
if (this.ArabicWordCountArray > this.options.MaxWordCount) {
|
|
1783
1832
|
this.ArabicWordCount = this.options.MaxWordCount;
|
|
1784
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1785
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1786
|
-
this.MultiLanguageTextAreagroup.controls["
|
|
1833
|
+
this.MultiLanguageTextAreagroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
1834
|
+
this.MultiLanguageTextAreagroup.controls["Arabic"].markAsTouched();
|
|
1835
|
+
this.MultiLanguageTextAreagroup.controls["Arabic"].invalid;
|
|
1787
1836
|
}
|
|
1788
1837
|
else {
|
|
1789
1838
|
this.ArabicWordCount = this.ArabicWordCountArray;
|
|
@@ -1913,18 +1962,17 @@
|
|
|
1913
1962
|
MultiLingualTextAreaComponent.decorators = [
|
|
1914
1963
|
{ type: i0.Component, args: [{
|
|
1915
1964
|
selector: 'BBSF-MultiLingualTextArea',
|
|
1916
|
-
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=\"
|
|
1965
|
+
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",
|
|
1917
1966
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
1918
1967
|
},] }
|
|
1919
1968
|
];
|
|
1920
1969
|
MultiLingualTextAreaComponent.ctorParameters = function () { return [
|
|
1921
|
-
{ type: ErrorMassageValidation },
|
|
1922
1970
|
{ type: forms.FormGroupDirective },
|
|
1923
1971
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
1924
1972
|
{ type: ControlUtility },
|
|
1925
1973
|
{ type: bbsfUtilities.UtilityService },
|
|
1926
|
-
{ type: bbsfUtilities.
|
|
1927
|
-
{ type:
|
|
1974
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
1975
|
+
{ type: GlobalSettings }
|
|
1928
1976
|
]; };
|
|
1929
1977
|
MultiLingualTextAreaComponent.propDecorators = {
|
|
1930
1978
|
group: [{ type: i0.Input }],
|
|
@@ -2044,15 +2092,15 @@
|
|
|
2044
2092
|
|
|
2045
2093
|
var DropdownListComponent = /** @class */ (function () {
|
|
2046
2094
|
// tslint:disable-next-line: max-line-length
|
|
2047
|
-
function DropdownListComponent(onChangeService, controlUtility, controlContainer, DropdownListControlHost, UtilityService,
|
|
2095
|
+
function DropdownListComponent(onChangeService, controlUtility, controlContainer, DropdownListControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2048
2096
|
var _this = this;
|
|
2049
2097
|
this.onChangeService = onChangeService;
|
|
2050
2098
|
this.controlUtility = controlUtility;
|
|
2051
2099
|
this.controlContainer = controlContainer;
|
|
2052
2100
|
this.DropdownListControlHost = DropdownListControlHost;
|
|
2053
2101
|
this.UtilityService = UtilityService;
|
|
2054
|
-
this.translate = translate;
|
|
2055
2102
|
this.controlValidationService = controlValidationService;
|
|
2103
|
+
this.globalSettings = globalSettings;
|
|
2056
2104
|
this.dropdownSettings = {};
|
|
2057
2105
|
this.SelectedList = [];
|
|
2058
2106
|
this.OnChange = new i0.EventEmitter();
|
|
@@ -2115,6 +2163,8 @@
|
|
|
2115
2163
|
};
|
|
2116
2164
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
2117
2165
|
this.DropdownListFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
2166
|
+
if (!this.options.ViewType)
|
|
2167
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2118
2168
|
if (this.options.CustomValidation.length > 0) {
|
|
2119
2169
|
var Validations = this.options.CustomValidation;
|
|
2120
2170
|
for (var index = 0; index < Validations.length; index++) {
|
|
@@ -2192,7 +2242,7 @@
|
|
|
2192
2242
|
{ type: i0.Component, args: [{
|
|
2193
2243
|
// tslint:disable-next-line: component-selector
|
|
2194
2244
|
selector: 'BBSF-DropdownList',
|
|
2195
|
-
template: "<div class=\"b-control b-dropdown-list\">\r\n
|
|
2245
|
+
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>",
|
|
2196
2246
|
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"]
|
|
2197
2247
|
},] }
|
|
2198
2248
|
];
|
|
@@ -2202,8 +2252,8 @@
|
|
|
2202
2252
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
2203
2253
|
{ type: forms.FormGroupDirective },
|
|
2204
2254
|
{ type: bbsfUtilities.UtilityService },
|
|
2205
|
-
{ type: bbsfUtilities.
|
|
2206
|
-
{ type:
|
|
2255
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
2256
|
+
{ type: GlobalSettings }
|
|
2207
2257
|
]; };
|
|
2208
2258
|
DropdownListComponent.propDecorators = {
|
|
2209
2259
|
group: [{ type: i0.Input }],
|
|
@@ -2214,14 +2264,14 @@
|
|
|
2214
2264
|
|
|
2215
2265
|
var PhoneComponent = /** @class */ (function () {
|
|
2216
2266
|
// tslint:disable-next-line: max-line-length
|
|
2217
|
-
function PhoneComponent(
|
|
2267
|
+
function PhoneComponent(controlUtility, controlContainer, PhoneControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2218
2268
|
var _this = this;
|
|
2219
|
-
this.ErrorHandler = ErrorHandler;
|
|
2220
2269
|
this.controlUtility = controlUtility;
|
|
2221
2270
|
this.controlContainer = controlContainer;
|
|
2222
2271
|
this.PhoneControlHost = PhoneControlHost;
|
|
2223
2272
|
this.UtilityService = UtilityService;
|
|
2224
2273
|
this.controlValidationService = controlValidationService;
|
|
2274
|
+
this.globalSettings = globalSettings;
|
|
2225
2275
|
this.OnChange = new i0.EventEmitter();
|
|
2226
2276
|
this.SearchCountryField = ngxIntlTelInput.SearchCountryField;
|
|
2227
2277
|
// TooltipLabel = TooltipLabel;
|
|
@@ -2259,6 +2309,8 @@
|
|
|
2259
2309
|
this.controlValidationService.isCreatedBefor = false;
|
|
2260
2310
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
2261
2311
|
this.PhoneFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
2312
|
+
if (!this.options.ViewType)
|
|
2313
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2262
2314
|
if (this.options.IsRequired) {
|
|
2263
2315
|
this.validationRules.push(forms.Validators.required);
|
|
2264
2316
|
}
|
|
@@ -2310,12 +2362,12 @@
|
|
|
2310
2362
|
},] }
|
|
2311
2363
|
];
|
|
2312
2364
|
PhoneComponent.ctorParameters = function () { return [
|
|
2313
|
-
{ type: ErrorMassageValidation },
|
|
2314
2365
|
{ type: ControlUtility },
|
|
2315
2366
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
2316
2367
|
{ type: forms.FormGroupDirective },
|
|
2317
2368
|
{ type: bbsfUtilities.UtilityService },
|
|
2318
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
2369
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
2370
|
+
{ type: GlobalSettings }
|
|
2319
2371
|
]; };
|
|
2320
2372
|
PhoneComponent.propDecorators = {
|
|
2321
2373
|
group: [{ type: i0.Input }],
|
|
@@ -2325,24 +2377,25 @@
|
|
|
2325
2377
|
|
|
2326
2378
|
var ToggleslideComponent = /** @class */ (function () {
|
|
2327
2379
|
// tslint:disable-next-line: max-line-length
|
|
2328
|
-
function ToggleslideComponent(
|
|
2329
|
-
this.ErrorHandler = ErrorHandler;
|
|
2380
|
+
function ToggleslideComponent(controlUtility, controlContainer, ToggleslideControlHost, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2330
2381
|
this.controlUtility = controlUtility;
|
|
2331
2382
|
this.controlContainer = controlContainer;
|
|
2332
2383
|
this.ToggleslideControlHost = ToggleslideControlHost;
|
|
2333
2384
|
this.TextControlHost = TextControlHost;
|
|
2334
2385
|
this.UtilityService = UtilityService;
|
|
2335
2386
|
this.controlValidationService = controlValidationService;
|
|
2387
|
+
this.globalSettings = globalSettings;
|
|
2336
2388
|
this.SlideValue = false;
|
|
2337
2389
|
ToggleslideComponent.controlContainerstatic = this.controlContainer;
|
|
2338
2390
|
}
|
|
2339
2391
|
ToggleslideComponent.prototype.ngOnInit = function () {
|
|
2340
|
-
;
|
|
2341
2392
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
2342
2393
|
this.ToggleslideFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
2343
2394
|
var validationRules = [];
|
|
2344
2395
|
var validationRulesasync = [];
|
|
2345
2396
|
this.SlideValue = this.options.Value == undefined ? false : this.options.Value;
|
|
2397
|
+
if (!this.options.ViewType)
|
|
2398
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2346
2399
|
if (this.options.IsDisabled) {
|
|
2347
2400
|
this.ToggleslideFormControl.disable();
|
|
2348
2401
|
}
|
|
@@ -2377,13 +2430,13 @@
|
|
|
2377
2430
|
},] }
|
|
2378
2431
|
];
|
|
2379
2432
|
ToggleslideComponent.ctorParameters = function () { return [
|
|
2380
|
-
{ type: ErrorMassageValidation },
|
|
2381
2433
|
{ type: ControlUtility },
|
|
2382
2434
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
2383
2435
|
{ type: forms.FormGroupDirective },
|
|
2384
2436
|
{ type: forms.FormGroupDirective },
|
|
2385
2437
|
{ type: bbsfUtilities.UtilityService },
|
|
2386
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
2438
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
2439
|
+
{ type: GlobalSettings }
|
|
2387
2440
|
]; };
|
|
2388
2441
|
ToggleslideComponent.propDecorators = {
|
|
2389
2442
|
group: [{ type: i0.Input }],
|
|
@@ -2391,15 +2444,15 @@
|
|
|
2391
2444
|
};
|
|
2392
2445
|
|
|
2393
2446
|
var HtmlEditorComponent = /** @class */ (function () {
|
|
2394
|
-
function HtmlEditorComponent(zone, controlUtility, controlContainer, HtmlEditorControlHost, UtilityService,
|
|
2447
|
+
function HtmlEditorComponent(zone, controlUtility, controlContainer, HtmlEditorControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2395
2448
|
var _this = this;
|
|
2396
2449
|
this.zone = zone;
|
|
2397
2450
|
this.controlUtility = controlUtility;
|
|
2398
2451
|
this.controlContainer = controlContainer;
|
|
2399
2452
|
this.HtmlEditorControlHost = HtmlEditorControlHost;
|
|
2400
2453
|
this.UtilityService = UtilityService;
|
|
2401
|
-
this.translate = translate;
|
|
2402
2454
|
this.controlValidationService = controlValidationService;
|
|
2455
|
+
this.globalSettings = globalSettings;
|
|
2403
2456
|
this.OnChange = new i0.EventEmitter();
|
|
2404
2457
|
this.WordCount = 0;
|
|
2405
2458
|
this.WordCountArray = 0;
|
|
@@ -2517,6 +2570,8 @@
|
|
|
2517
2570
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
2518
2571
|
this.HtmlEditorFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
2519
2572
|
this.HtmlEditorFormControl.setValue(this.options.Value);
|
|
2573
|
+
if (!this.options.ViewType)
|
|
2574
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2520
2575
|
if (this.options.CustomValidation.length > 0) {
|
|
2521
2576
|
var Validations = this.options.CustomValidation;
|
|
2522
2577
|
for (var index = 0; index < Validations.length; index++) {
|
|
@@ -2582,8 +2637,8 @@
|
|
|
2582
2637
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
2583
2638
|
{ type: forms.FormGroupDirective },
|
|
2584
2639
|
{ type: bbsfUtilities.UtilityService },
|
|
2585
|
-
{ type: bbsfUtilities.
|
|
2586
|
-
{ type:
|
|
2640
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
2641
|
+
{ type: GlobalSettings }
|
|
2587
2642
|
]; };
|
|
2588
2643
|
HtmlEditorComponent.propDecorators = {
|
|
2589
2644
|
group: [{ type: i0.Input }],
|
|
@@ -2592,15 +2647,14 @@
|
|
|
2592
2647
|
};
|
|
2593
2648
|
|
|
2594
2649
|
var MultiLingualHtmlEditorComponent = /** @class */ (function () {
|
|
2595
|
-
function MultiLingualHtmlEditorComponent(
|
|
2650
|
+
function MultiLingualHtmlEditorComponent(MultiLingualHtmlEditorFormControlHost, controlContainer, controlUtility, UtilityService, controlValidationService, globalSettings) {
|
|
2596
2651
|
var _this = this;
|
|
2597
|
-
this.ErrorHandler = ErrorHandler;
|
|
2598
2652
|
this.MultiLingualHtmlEditorFormControlHost = MultiLingualHtmlEditorFormControlHost;
|
|
2599
2653
|
this.controlContainer = controlContainer;
|
|
2600
2654
|
this.controlUtility = controlUtility;
|
|
2601
2655
|
this.UtilityService = UtilityService;
|
|
2602
|
-
this.translate = translate;
|
|
2603
2656
|
this.controlValidationService = controlValidationService;
|
|
2657
|
+
this.globalSettings = globalSettings;
|
|
2604
2658
|
this.OnChange = new i0.EventEmitter();
|
|
2605
2659
|
this.CurrentLanguage = "";
|
|
2606
2660
|
this.ArabicValidationRules = [];
|
|
@@ -2612,6 +2666,8 @@
|
|
|
2612
2666
|
this.validationRulesasync = [];
|
|
2613
2667
|
this.ArabicLetterOnly = "";
|
|
2614
2668
|
this.EnglishLetterOnly = "";
|
|
2669
|
+
this.englishValue = null;
|
|
2670
|
+
this.arabicValue = null;
|
|
2615
2671
|
this.resetError = function () {
|
|
2616
2672
|
_this.controlValidationService.RemoveGlobalError();
|
|
2617
2673
|
};
|
|
@@ -2654,6 +2710,10 @@
|
|
|
2654
2710
|
return __generator(this, function (_b) {
|
|
2655
2711
|
switch (_b.label) {
|
|
2656
2712
|
case 0:
|
|
2713
|
+
if (!this.options.ViewType)
|
|
2714
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
2715
|
+
if (!this.options.LanguageMode)
|
|
2716
|
+
this.options.LanguageMode = this.globalSettings.LanguageMode;
|
|
2657
2717
|
this.editorEnglishConfig = {
|
|
2658
2718
|
editable: !this.options.IsDisabled,
|
|
2659
2719
|
spellcheck: true,
|
|
@@ -2778,10 +2838,10 @@
|
|
|
2778
2838
|
// }
|
|
2779
2839
|
this.MultilingualHtmlEditorgroup = new forms.FormGroup({});
|
|
2780
2840
|
;
|
|
2781
|
-
this.MultilingualHtmlEditorgroup.addControl("
|
|
2782
|
-
this.MultilingualHtmlEditorgroup.addControl("
|
|
2783
|
-
this.ArabicHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["
|
|
2784
|
-
this.EnglishHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["
|
|
2841
|
+
this.MultilingualHtmlEditorgroup.addControl("Arabic", new forms.FormControl(''));
|
|
2842
|
+
this.MultilingualHtmlEditorgroup.addControl("English", new forms.FormControl(''));
|
|
2843
|
+
this.ArabicHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["Arabic"]; // new FormControl('',validationRules);
|
|
2844
|
+
this.EnglishHtmlEditorFormControl = this.MultilingualHtmlEditorgroup.controls["English"]; // new FormControl('',validationRules);
|
|
2785
2845
|
this.group.addControl(this.options.Name, new forms.FormGroup(this.MultilingualHtmlEditorgroup.controls));
|
|
2786
2846
|
this.getCustomErrorsMassages();
|
|
2787
2847
|
switch (this.options.Type) {
|
|
@@ -2844,30 +2904,37 @@
|
|
|
2844
2904
|
});
|
|
2845
2905
|
});
|
|
2846
2906
|
};
|
|
2847
|
-
MultiLingualHtmlEditorComponent.prototype.onTextChange = function () {
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
this.MultilingualHtmlEditorgroup.controls["
|
|
2862
|
-
this.
|
|
2907
|
+
MultiLingualHtmlEditorComponent.prototype.onTextChange = function (type) {
|
|
2908
|
+
if (type == "en") {
|
|
2909
|
+
this.englishValue = this.MultilingualHtmlEditorgroup.controls["English"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["English"].value;
|
|
2910
|
+
if (this.englishValue)
|
|
2911
|
+
this.EnglishHtmlEditorFormControl.setValue(this.englishValue);
|
|
2912
|
+
var EngliswordCountArray = this.EnglishHtmlEditorFormControl.value.split(" ").length;
|
|
2913
|
+
if (EngliswordCountArray > 0) {
|
|
2914
|
+
if (EngliswordCountArray > this.options.MaxWordCount)
|
|
2915
|
+
this.MultilingualHtmlEditorgroup.controls["English"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
2916
|
+
this.MultilingualHtmlEditorgroup.controls["English"].markAsTouched();
|
|
2917
|
+
this.MultilingualHtmlEditorgroup.controls["English"].invalid;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
if (type == "ar") {
|
|
2921
|
+
this.arabicValue = this.MultilingualHtmlEditorgroup.controls["Arabic"].value == null ? "" : this.MultilingualHtmlEditorgroup.controls["Arabic"].value;
|
|
2922
|
+
if (this.arabicValue)
|
|
2923
|
+
this.ArabicHtmlEditorFormControl.setValue(this.arabicValue);
|
|
2924
|
+
var ArabicwordCountArray = this.ArabicHtmlEditorFormControl.value.split(" ").length;
|
|
2925
|
+
if (ArabicwordCountArray > 0) {
|
|
2926
|
+
if (ArabicwordCountArray > this.options.MaxWordCount)
|
|
2927
|
+
this.MultilingualHtmlEditorgroup.controls["Arabic"].setErrors({ MaxWordCountValidationKey: this.options.MaxWordCount });
|
|
2928
|
+
this.MultilingualHtmlEditorgroup.controls["Arabic"].markAsTouched();
|
|
2929
|
+
this.MultilingualHtmlEditorgroup.controls["Arabic"].invalid;
|
|
2930
|
+
}
|
|
2863
2931
|
}
|
|
2864
2932
|
var mulitLangModel = new EnglishArabicDTO();
|
|
2865
|
-
mulitLangModel.Arabic = arabicValue;
|
|
2866
|
-
mulitLangModel.English = englishValue;
|
|
2867
|
-
this.ArabicHtmlEditorFormControl.setValue(arabicValue);
|
|
2868
|
-
this.EnglishHtmlEditorFormControl.setValue(englishValue);
|
|
2933
|
+
mulitLangModel.Arabic = this.arabicValue;
|
|
2934
|
+
mulitLangModel.English = this.englishValue;
|
|
2869
2935
|
this.OnChange.emit(mulitLangModel);
|
|
2870
|
-
this.
|
|
2936
|
+
if (this.arabicValue && this.englishValue)
|
|
2937
|
+
this.group.get(this.options.Name).setValue(mulitLangModel);
|
|
2871
2938
|
};
|
|
2872
2939
|
MultiLingualHtmlEditorComponent.prototype.showGlobalError = function () {
|
|
2873
2940
|
this.controlUtility.showGlobalError();
|
|
@@ -2959,18 +3026,17 @@
|
|
|
2959
3026
|
MultiLingualHtmlEditorComponent.decorators = [
|
|
2960
3027
|
{ type: i0.Component, args: [{
|
|
2961
3028
|
selector: 'BBSF-MultiLingualHtmlEditor',
|
|
2962
|
-
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
|
|
3029
|
+
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",
|
|
2963
3030
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
2964
3031
|
},] }
|
|
2965
3032
|
];
|
|
2966
3033
|
MultiLingualHtmlEditorComponent.ctorParameters = function () { return [
|
|
2967
|
-
{ type: ErrorMassageValidation },
|
|
2968
3034
|
{ type: forms.FormGroupDirective },
|
|
2969
3035
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
2970
3036
|
{ type: ControlUtility },
|
|
2971
3037
|
{ type: bbsfUtilities.UtilityService },
|
|
2972
|
-
{ type: bbsfUtilities.
|
|
2973
|
-
{ type:
|
|
3038
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
3039
|
+
{ type: GlobalSettings }
|
|
2974
3040
|
]; };
|
|
2975
3041
|
MultiLingualHtmlEditorComponent.propDecorators = {
|
|
2976
3042
|
group: [{ type: i0.Input }],
|
|
@@ -2979,16 +3045,15 @@
|
|
|
2979
3045
|
};
|
|
2980
3046
|
|
|
2981
3047
|
var ImageUploaderComponent = /** @class */ (function () {
|
|
2982
|
-
function ImageUploaderComponent(zone,
|
|
3048
|
+
function ImageUploaderComponent(zone, controlUtility, controlContainer, ImageUplaoderControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
2983
3049
|
var _this = this;
|
|
2984
3050
|
this.zone = zone;
|
|
2985
|
-
this.ErrorHandler = ErrorHandler;
|
|
2986
3051
|
this.controlUtility = controlUtility;
|
|
2987
3052
|
this.controlContainer = controlContainer;
|
|
2988
3053
|
this.ImageUplaoderControlHost = ImageUplaoderControlHost;
|
|
2989
3054
|
this.UtilityService = UtilityService;
|
|
2990
|
-
this.translate = translate;
|
|
2991
3055
|
this.controlValidationService = controlValidationService;
|
|
3056
|
+
this.globalSettings = globalSettings;
|
|
2992
3057
|
this.files = [];
|
|
2993
3058
|
this.ImageSource = "./src/assets/images/uploadimg.png";
|
|
2994
3059
|
this.OnChange = new i0.EventEmitter();
|
|
@@ -3036,6 +3101,8 @@
|
|
|
3036
3101
|
ImageUploaderComponent.prototype.ngOnInit = function () {
|
|
3037
3102
|
var _this = this;
|
|
3038
3103
|
this.controlValidationService.isCreatedBefor = false;
|
|
3104
|
+
if (!this.options.ViewType)
|
|
3105
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3039
3106
|
if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
|
|
3040
3107
|
this.ImageSource = this.options.DefaultImageSrc;
|
|
3041
3108
|
if (this.options.AllowImageCropper) {
|
|
@@ -3123,7 +3190,8 @@
|
|
|
3123
3190
|
}
|
|
3124
3191
|
};
|
|
3125
3192
|
ImageUploaderComponent.prototype.showImageUploader = function (element) {
|
|
3126
|
-
|
|
3193
|
+
var input = element.parentElement.parentElement.querySelector('input[type=file]');
|
|
3194
|
+
input.click();
|
|
3127
3195
|
};
|
|
3128
3196
|
ImageUploaderComponent.prototype.showGlobalError = function () {
|
|
3129
3197
|
this.controlUtility.showGlobalError();
|
|
@@ -3276,13 +3344,12 @@
|
|
|
3276
3344
|
];
|
|
3277
3345
|
ImageUploaderComponent.ctorParameters = function () { return [
|
|
3278
3346
|
{ type: i0.NgZone },
|
|
3279
|
-
{ type: ErrorMassageValidation },
|
|
3280
3347
|
{ type: ControlUtility },
|
|
3281
3348
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
3282
3349
|
{ type: forms.FormGroupDirective },
|
|
3283
3350
|
{ type: bbsfUtilities.UtilityService },
|
|
3284
|
-
{ type: bbsfUtilities.
|
|
3285
|
-
{ type:
|
|
3351
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
3352
|
+
{ type: GlobalSettings }
|
|
3286
3353
|
]; };
|
|
3287
3354
|
ImageUploaderComponent.propDecorators = {
|
|
3288
3355
|
fileInput: [{ type: i0.ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -3299,15 +3366,15 @@
|
|
|
3299
3366
|
}());
|
|
3300
3367
|
|
|
3301
3368
|
var ProfileImageUploaderComponent = /** @class */ (function () {
|
|
3302
|
-
function ProfileImageUploaderComponent(zone,
|
|
3369
|
+
function ProfileImageUploaderComponent(zone, controlUtility, controlContainer, ProfileImageUploaderControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3303
3370
|
var _this = this;
|
|
3304
3371
|
this.zone = zone;
|
|
3305
|
-
this.ErrorHandler = ErrorHandler;
|
|
3306
3372
|
this.controlUtility = controlUtility;
|
|
3307
3373
|
this.controlContainer = controlContainer;
|
|
3308
3374
|
this.ProfileImageUploaderControlHost = ProfileImageUploaderControlHost;
|
|
3309
3375
|
this.UtilityService = UtilityService;
|
|
3310
3376
|
this.controlValidationService = controlValidationService;
|
|
3377
|
+
this.globalSettings = globalSettings;
|
|
3311
3378
|
this.files = [];
|
|
3312
3379
|
this.ImageSource = "./src/assets/images/userimg.png";
|
|
3313
3380
|
this.OnChange = new i0.EventEmitter();
|
|
@@ -3356,6 +3423,8 @@
|
|
|
3356
3423
|
ProfileImageUploaderComponent.prototype.ngOnInit = function () {
|
|
3357
3424
|
var _this = this;
|
|
3358
3425
|
this.controlValidationService.isCreatedBefor = false;
|
|
3426
|
+
if (!this.options.ViewType)
|
|
3427
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3359
3428
|
if (this.options.DefaultImageSrc != null && this.options.DefaultImageSrc != "")
|
|
3360
3429
|
this.ImageSource = this.options.DefaultImageSrc;
|
|
3361
3430
|
this.config = {
|
|
@@ -3426,6 +3495,10 @@
|
|
|
3426
3495
|
}
|
|
3427
3496
|
}
|
|
3428
3497
|
};
|
|
3498
|
+
ProfileImageUploaderComponent.prototype.showImageUploader = function (element) {
|
|
3499
|
+
var input = element.parentElement.parentElement.querySelector('input[type=file]');
|
|
3500
|
+
input.click();
|
|
3501
|
+
};
|
|
3429
3502
|
ProfileImageUploaderComponent.prototype.showGlobalError = function () {
|
|
3430
3503
|
this.controlUtility.showGlobalError();
|
|
3431
3504
|
};
|
|
@@ -3608,18 +3681,18 @@
|
|
|
3608
3681
|
ProfileImageUploaderComponent.decorators = [
|
|
3609
3682
|
{ type: i0.Component, args: [{
|
|
3610
3683
|
selector: 'BBSF-ProfileImageUploader',
|
|
3611
|
-
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\"
|
|
3684
|
+
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",
|
|
3612
3685
|
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"]
|
|
3613
3686
|
},] }
|
|
3614
3687
|
];
|
|
3615
3688
|
ProfileImageUploaderComponent.ctorParameters = function () { return [
|
|
3616
3689
|
{ type: i0.NgZone },
|
|
3617
|
-
{ type: ErrorMassageValidation },
|
|
3618
3690
|
{ type: ControlUtility },
|
|
3619
3691
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
3620
3692
|
{ type: forms.FormGroupDirective },
|
|
3621
3693
|
{ type: bbsfUtilities.UtilityService },
|
|
3622
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
3694
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
3695
|
+
{ type: GlobalSettings }
|
|
3623
3696
|
]; };
|
|
3624
3697
|
ProfileImageUploaderComponent.propDecorators = {
|
|
3625
3698
|
fileInput: [{ type: i0.ViewChild, args: ['fileInput', { static: false },] }],
|
|
@@ -3639,16 +3712,17 @@
|
|
|
3639
3712
|
|
|
3640
3713
|
var AutocompleteTextBoxComponent = /** @class */ (function () {
|
|
3641
3714
|
// tslint:disable-next-line: max-line-length
|
|
3642
|
-
function AutocompleteTextBoxComponent(http, ErrorHandler, controlUtility, controlContainer, AutocompleteTextBoxControlHost, UtilityService,
|
|
3715
|
+
function AutocompleteTextBoxComponent(http, ErrorHandler, requestHandlerService, controlUtility, controlContainer, AutocompleteTextBoxControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3643
3716
|
var _this = this;
|
|
3644
3717
|
this.http = http;
|
|
3645
3718
|
this.ErrorHandler = ErrorHandler;
|
|
3719
|
+
this.requestHandlerService = requestHandlerService;
|
|
3646
3720
|
this.controlUtility = controlUtility;
|
|
3647
3721
|
this.controlContainer = controlContainer;
|
|
3648
3722
|
this.AutocompleteTextBoxControlHost = AutocompleteTextBoxControlHost;
|
|
3649
3723
|
this.UtilityService = UtilityService;
|
|
3650
|
-
this.translate = translate;
|
|
3651
3724
|
this.controlValidationService = controlValidationService;
|
|
3725
|
+
this.globalSettings = globalSettings;
|
|
3652
3726
|
this.OnChange = new i0.EventEmitter();
|
|
3653
3727
|
this.keyword = 'value';
|
|
3654
3728
|
this.Search = '';
|
|
@@ -3723,6 +3797,8 @@
|
|
|
3723
3797
|
this.controlValidationService.isCreatedBefor = false;
|
|
3724
3798
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
3725
3799
|
this.AutocompleteTextBoxControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
3800
|
+
if (!this.options.ViewType)
|
|
3801
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3726
3802
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
3727
3803
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
3728
3804
|
// this.AutocompleteTextBoxControl.setValue(this.options.Value);
|
|
@@ -3765,10 +3841,12 @@
|
|
|
3765
3841
|
if (query) {
|
|
3766
3842
|
var params = new http$1.HttpParams();
|
|
3767
3843
|
params = params.append(_this.options.QueryParam, query);
|
|
3844
|
+
var requestOptionsModel = new bbsfUtilities.RequestOptionsModel();
|
|
3845
|
+
requestOptionsModel.disableBlockUI = true;
|
|
3846
|
+
requestOptionsModel.disableSuccessNotification = true;
|
|
3768
3847
|
// using github public api to get users by name
|
|
3769
|
-
return _this.
|
|
3770
|
-
|
|
3771
|
-
}).pipe(operators.map(function (data) { return data || []; }), operators.tap(function () { return rxjs.noop; }, function (err) {
|
|
3848
|
+
return _this.requestHandlerService.get(_this.options.ActionURL, params, requestOptionsModel)
|
|
3849
|
+
.pipe(operators.map(function (data) { return data || []; }), operators.tap(function () { return rxjs.noop; }, function (err) {
|
|
3772
3850
|
// in case of http error
|
|
3773
3851
|
_this.errorMessage = err && err.message || 'Something goes wrong';
|
|
3774
3852
|
}));
|
|
@@ -3862,12 +3940,13 @@
|
|
|
3862
3940
|
AutocompleteTextBoxComponent.ctorParameters = function () { return [
|
|
3863
3941
|
{ type: http$1.HttpClient },
|
|
3864
3942
|
{ type: ErrorMassageValidation },
|
|
3943
|
+
{ type: bbsfUtilities.RequestHandlerService },
|
|
3865
3944
|
{ type: ControlUtility },
|
|
3866
3945
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
3867
3946
|
{ type: forms.FormGroupDirective },
|
|
3868
3947
|
{ type: bbsfUtilities.UtilityService },
|
|
3869
|
-
{ type: bbsfUtilities.
|
|
3870
|
-
{ type:
|
|
3948
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
3949
|
+
{ type: GlobalSettings }
|
|
3871
3950
|
]; };
|
|
3872
3951
|
AutocompleteTextBoxComponent.propDecorators = {
|
|
3873
3952
|
group: [{ type: i0.Input }],
|
|
@@ -3877,15 +3956,16 @@
|
|
|
3877
3956
|
|
|
3878
3957
|
var TagsInputComponent = /** @class */ (function () {
|
|
3879
3958
|
// tslint:disable-next-line: max-line-length
|
|
3880
|
-
function TagsInputComponent(http,
|
|
3959
|
+
function TagsInputComponent(http, controlUtility, requestHandlerService, controlContainer, TagsInputControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
3881
3960
|
var _this = this;
|
|
3882
3961
|
this.http = http;
|
|
3883
|
-
this.ErrorHandler = ErrorHandler;
|
|
3884
3962
|
this.controlUtility = controlUtility;
|
|
3963
|
+
this.requestHandlerService = requestHandlerService;
|
|
3885
3964
|
this.controlContainer = controlContainer;
|
|
3886
3965
|
this.TagsInputControlHost = TagsInputControlHost;
|
|
3887
3966
|
this.UtilityService = UtilityService;
|
|
3888
3967
|
this.controlValidationService = controlValidationService;
|
|
3968
|
+
this.globalSettings = globalSettings;
|
|
3889
3969
|
this.OnChange = new i0.EventEmitter();
|
|
3890
3970
|
// TagInputControl: AbstractControl;
|
|
3891
3971
|
this.SelectedId = [];
|
|
@@ -3952,6 +4032,8 @@
|
|
|
3952
4032
|
this.TagsFormGroup.addControl("tags", new forms.FormControl(''));
|
|
3953
4033
|
this.TagsFormControl = this.TagsFormGroup.controls["tags"]; // new FormControl('',validationRules);
|
|
3954
4034
|
this.group.addControl(this.options.Name, this.TagsFormControl);
|
|
4035
|
+
if (!this.options.ViewType)
|
|
4036
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
3955
4037
|
if (this.options.LabelKey != null && this.options.LabelKey != "")
|
|
3956
4038
|
this.options.LabelValue = this.UtilityService.getResourceValue(this.options.LabelKey);
|
|
3957
4039
|
// this.group.addControl(this.options.Name, new FormControl(''));
|
|
@@ -4009,21 +4091,11 @@
|
|
|
4009
4091
|
this.controlUtility.CopyInputMessage(inputElement);
|
|
4010
4092
|
};
|
|
4011
4093
|
TagsInputComponent.prototype.searchFunctionFactory = function (Text) {
|
|
4012
|
-
var httpOptions = this.options.ValidationToken != null && this.options.ValidationToken != "" ?
|
|
4013
|
-
{
|
|
4014
|
-
headers: new http$1.HttpHeaders({
|
|
4015
|
-
'Content-Type': 'application/json',
|
|
4016
|
-
'Authorization': this.options.ValidationToken
|
|
4017
|
-
})
|
|
4018
|
-
}
|
|
4019
|
-
:
|
|
4020
|
-
{
|
|
4021
|
-
headers: new http$1.HttpHeaders({
|
|
4022
|
-
'Content-Type': 'application/json',
|
|
4023
|
-
})
|
|
4024
|
-
};
|
|
4025
4094
|
var Url = this.options.ActionURL + "?" + this.options.QueryParamName + "=" + Text + "&" + this.options.SelectedItemsParamName + "=" + this.SelectedId;
|
|
4026
|
-
var
|
|
4095
|
+
var requestOptionsModel = new bbsfUtilities.RequestOptionsModel();
|
|
4096
|
+
requestOptionsModel.disableBlockUI = true;
|
|
4097
|
+
requestOptionsModel.disableSuccessNotification = true;
|
|
4098
|
+
var Model = this.requestHandlerService.get(Url, null, requestOptionsModel);
|
|
4027
4099
|
return Model;
|
|
4028
4100
|
};
|
|
4029
4101
|
TagsInputComponent.prototype.AddTag = function (event, key) {
|
|
@@ -4075,12 +4147,13 @@
|
|
|
4075
4147
|
];
|
|
4076
4148
|
TagsInputComponent.ctorParameters = function () { return [
|
|
4077
4149
|
{ type: http$1.HttpClient },
|
|
4078
|
-
{ type: ErrorMassageValidation },
|
|
4079
4150
|
{ type: ControlUtility },
|
|
4151
|
+
{ type: bbsfUtilities.RequestHandlerService },
|
|
4080
4152
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
4081
4153
|
{ type: forms.FormGroupDirective },
|
|
4082
4154
|
{ type: bbsfUtilities.UtilityService },
|
|
4083
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
4155
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
4156
|
+
{ type: GlobalSettings }
|
|
4084
4157
|
]; };
|
|
4085
4158
|
TagsInputComponent.propDecorators = {
|
|
4086
4159
|
group: [{ type: i0.Input }],
|
|
@@ -4115,8 +4188,9 @@
|
|
|
4115
4188
|
|
|
4116
4189
|
// tslint:disable-next-line: no-conflicting-lifecycle
|
|
4117
4190
|
var PagingComponent = /** @class */ (function () {
|
|
4118
|
-
function PagingComponent(http, router, onChangeService, requestHandlerService) {
|
|
4191
|
+
function PagingComponent(utilityService, http, router, onChangeService, requestHandlerService) {
|
|
4119
4192
|
var _this = this;
|
|
4193
|
+
this.utilityService = utilityService;
|
|
4120
4194
|
this.http = http;
|
|
4121
4195
|
this.router = router;
|
|
4122
4196
|
this.onChangeService = onChangeService;
|
|
@@ -4251,7 +4325,6 @@
|
|
|
4251
4325
|
PagingComponent.prototype.getItemList = function (page, IsFilterUpdated) {
|
|
4252
4326
|
var _this = this;
|
|
4253
4327
|
if (IsFilterUpdated === void 0) { IsFilterUpdated = false; }
|
|
4254
|
-
;
|
|
4255
4328
|
var pagingDTO = new PagingDTO();
|
|
4256
4329
|
var size = Number.parseInt(this.options.PageSize.toString());
|
|
4257
4330
|
if (this.options.IsLoadMoreControl)
|
|
@@ -4296,26 +4369,46 @@
|
|
|
4296
4369
|
}
|
|
4297
4370
|
this.requestHandlerService.post(this.options.ActionPostURL, pagingDTO, params)
|
|
4298
4371
|
.subscribe(function (responseData) {
|
|
4299
|
-
|
|
4372
|
+
debugger;
|
|
4373
|
+
_this.result = responseData.items; //this.castItems(responseData.items);
|
|
4300
4374
|
_this.Items.emit(_this.result);
|
|
4375
|
+
_this.totalRow = responseData.totalCount;
|
|
4301
4376
|
if (IsFilterUpdated) {
|
|
4302
4377
|
_this.items = [];
|
|
4303
|
-
_this.totalRow = responseData.totalCount;
|
|
4304
4378
|
_this.Pages = Math.ceil((_this.totalRow / _this.options.PageSize));
|
|
4305
4379
|
_this.items = Array(_this.totalRow);
|
|
4306
4380
|
}
|
|
4307
4381
|
});
|
|
4308
4382
|
};
|
|
4383
|
+
PagingComponent.prototype.castItems = function (objectArr) {
|
|
4384
|
+
debugger;
|
|
4385
|
+
var originalArray = [];
|
|
4386
|
+
for (var index = 0; index < objectArr.length; index++) {
|
|
4387
|
+
var element = objectArr[index];
|
|
4388
|
+
var key = void 0, keys = Object.keys(element);
|
|
4389
|
+
var n = keys.length;
|
|
4390
|
+
var newObject = {};
|
|
4391
|
+
while (n--) {
|
|
4392
|
+
key = keys[n];
|
|
4393
|
+
var Okey = key;
|
|
4394
|
+
newObject[key.charAt(0).toUpperCase() + Okey.slice(1)] = element[key];
|
|
4395
|
+
}
|
|
4396
|
+
var finalObject = newObject;
|
|
4397
|
+
originalArray.push(finalObject);
|
|
4398
|
+
}
|
|
4399
|
+
return originalArray;
|
|
4400
|
+
};
|
|
4309
4401
|
return PagingComponent;
|
|
4310
4402
|
}());
|
|
4311
4403
|
PagingComponent.decorators = [
|
|
4312
4404
|
{ type: i0.Component, args: [{
|
|
4313
4405
|
selector: 'BBSF-Paging',
|
|
4314
|
-
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>
|
|
4406
|
+
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",
|
|
4315
4407
|
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"]
|
|
4316
4408
|
},] }
|
|
4317
4409
|
];
|
|
4318
4410
|
PagingComponent.ctorParameters = function () { return [
|
|
4411
|
+
{ type: bbsfUtilities.UtilityService },
|
|
4319
4412
|
{ type: http$1.HttpClient },
|
|
4320
4413
|
{ type: router.Router },
|
|
4321
4414
|
{ type: OnPagingFiltersChangeService },
|
|
@@ -4438,13 +4531,14 @@
|
|
|
4438
4531
|
|
|
4439
4532
|
var RadioButtonComponent = /** @class */ (function () {
|
|
4440
4533
|
// tslint:disable-next-line: max-line-length
|
|
4441
|
-
function RadioButtonComponent(controlUtility, controlContainer, RadioButtonControlHost, UtilityService, controlValidationService) {
|
|
4534
|
+
function RadioButtonComponent(controlUtility, controlContainer, RadioButtonControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
4442
4535
|
var _this = this;
|
|
4443
4536
|
this.controlUtility = controlUtility;
|
|
4444
4537
|
this.controlContainer = controlContainer;
|
|
4445
4538
|
this.RadioButtonControlHost = RadioButtonControlHost;
|
|
4446
4539
|
this.UtilityService = UtilityService;
|
|
4447
4540
|
this.controlValidationService = controlValidationService;
|
|
4541
|
+
this.globalSettings = globalSettings;
|
|
4448
4542
|
this.OnChange = new i0.EventEmitter();
|
|
4449
4543
|
this.markAllAsTouched = false;
|
|
4450
4544
|
this.validationRules = [];
|
|
@@ -4478,6 +4572,8 @@
|
|
|
4478
4572
|
var _this = this;
|
|
4479
4573
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
4480
4574
|
this.RadioButtonFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
4575
|
+
if (!this.options.ViewType)
|
|
4576
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4481
4577
|
if (this.options.IsRequired) {
|
|
4482
4578
|
this.validationRules.push(forms.Validators.required);
|
|
4483
4579
|
}
|
|
@@ -4525,7 +4621,8 @@
|
|
|
4525
4621
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
4526
4622
|
{ type: forms.FormGroupDirective },
|
|
4527
4623
|
{ type: bbsfUtilities.UtilityService },
|
|
4528
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
4624
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
4625
|
+
{ type: GlobalSettings }
|
|
4529
4626
|
]; };
|
|
4530
4627
|
RadioButtonComponent.propDecorators = {
|
|
4531
4628
|
group: [{ type: i0.Input }],
|
|
@@ -4535,13 +4632,14 @@
|
|
|
4535
4632
|
|
|
4536
4633
|
var TextboxComponent = /** @class */ (function () {
|
|
4537
4634
|
// tslint:disable-next-line: max-line-length
|
|
4538
|
-
function TextboxComponent(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService) {
|
|
4635
|
+
function TextboxComponent(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService, globalSettings) {
|
|
4539
4636
|
var _this = this;
|
|
4540
4637
|
this.controlUtility = controlUtility;
|
|
4541
4638
|
this.controlContainer = controlContainer;
|
|
4542
4639
|
this.TextControlHost = TextControlHost;
|
|
4543
4640
|
this.UtilityService = UtilityService;
|
|
4544
4641
|
this.controlValidationService = controlValidationService;
|
|
4642
|
+
this.globalSettings = globalSettings;
|
|
4545
4643
|
this.OnChange = new i0.EventEmitter();
|
|
4546
4644
|
this.WordCount = 0;
|
|
4547
4645
|
this.WordCountArray = 0;
|
|
@@ -4591,6 +4689,8 @@
|
|
|
4591
4689
|
TextboxComponent.prototype.ngOnInit = function () {
|
|
4592
4690
|
var _this = this;
|
|
4593
4691
|
this.controlValidationService.isCreatedBefor = false;
|
|
4692
|
+
if (!this.options.ViewType)
|
|
4693
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4594
4694
|
if (this.options.MaskPattern != null && this.options.MaskPattern != "") {
|
|
4595
4695
|
this.MaskPattern = this.options.MaskPattern;
|
|
4596
4696
|
this.options.Placeholder = this.MaskPattern;
|
|
@@ -4667,6 +4767,7 @@
|
|
|
4667
4767
|
_this.group.markAllAsTouched();
|
|
4668
4768
|
_this.markAllAsTouched = true;
|
|
4669
4769
|
});
|
|
4770
|
+
this.options.ValidationRules = this.validationRules;
|
|
4670
4771
|
};
|
|
4671
4772
|
TextboxComponent.prototype.ngAfterViewInit = function () {
|
|
4672
4773
|
this.controlUtility.setAttributeForControl(this.options);
|
|
@@ -4740,7 +4841,8 @@
|
|
|
4740
4841
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
4741
4842
|
{ type: forms.FormGroupDirective },
|
|
4742
4843
|
{ type: bbsfUtilities.UtilityService },
|
|
4743
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
4844
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
4845
|
+
{ type: GlobalSettings }
|
|
4744
4846
|
]; };
|
|
4745
4847
|
TextboxComponent.propDecorators = {
|
|
4746
4848
|
group: [{ type: i0.Input }],
|
|
@@ -4755,18 +4857,17 @@
|
|
|
4755
4857
|
}());
|
|
4756
4858
|
|
|
4757
4859
|
var MapAutoCompleteComponent = /** @class */ (function () {
|
|
4758
|
-
function MapAutoCompleteComponent(mapsAPILoader, ngZone,
|
|
4860
|
+
function MapAutoCompleteComponent(mapsAPILoader, ngZone, controlUtility, controlContainer, MapAutoCompleteControlHost, UtilityService, translate, controlValidationService, globalSettings) {
|
|
4759
4861
|
var _this = this;
|
|
4760
4862
|
this.mapsAPILoader = mapsAPILoader;
|
|
4761
4863
|
this.ngZone = ngZone;
|
|
4762
|
-
this.titleService = titleService;
|
|
4763
|
-
this.ErrorHandler = ErrorHandler;
|
|
4764
4864
|
this.controlUtility = controlUtility;
|
|
4765
4865
|
this.controlContainer = controlContainer;
|
|
4766
4866
|
this.MapAutoCompleteControlHost = MapAutoCompleteControlHost;
|
|
4767
4867
|
this.UtilityService = UtilityService;
|
|
4768
4868
|
this.translate = translate;
|
|
4769
4869
|
this.controlValidationService = controlValidationService;
|
|
4870
|
+
this.globalSettings = globalSettings;
|
|
4770
4871
|
this.OnChange = new i0.EventEmitter();
|
|
4771
4872
|
this.MapAutoCompleteModel = new MapAutocompleteDTO();
|
|
4772
4873
|
this.CurrentLanguage = "";
|
|
@@ -4943,6 +5044,8 @@
|
|
|
4943
5044
|
});
|
|
4944
5045
|
this.group.addControl(this.options.Name, new forms.FormControl(''));
|
|
4945
5046
|
this.MapAutoCompleteFormControl = this.group.controls[this.options.Name]; // new FormControl('',validationRules);
|
|
5047
|
+
if (!this.options.ViewType)
|
|
5048
|
+
this.options.ViewType = this.globalSettings.ViewType;
|
|
4946
5049
|
if (this.options.IsRequired) {
|
|
4947
5050
|
this.validationRules.push(forms.Validators.required);
|
|
4948
5051
|
}
|
|
@@ -5022,14 +5125,13 @@
|
|
|
5022
5125
|
MapAutoCompleteComponent.ctorParameters = function () { return [
|
|
5023
5126
|
{ type: core.MapsAPILoader },
|
|
5024
5127
|
{ type: i0.NgZone },
|
|
5025
|
-
{ type: platformBrowser.Title },
|
|
5026
|
-
{ type: ErrorMassageValidation },
|
|
5027
5128
|
{ type: ControlUtility },
|
|
5028
5129
|
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }] },
|
|
5029
5130
|
{ type: forms.FormGroupDirective },
|
|
5030
5131
|
{ type: bbsfUtilities.UtilityService },
|
|
5031
5132
|
{ type: bbsfUtilities.BBSFTranslateService },
|
|
5032
|
-
{ type: bbsfUtilities.ControlValidationService }
|
|
5133
|
+
{ type: bbsfUtilities.ControlValidationService },
|
|
5134
|
+
{ type: GlobalSettings }
|
|
5033
5135
|
]; };
|
|
5034
5136
|
MapAutoCompleteComponent.propDecorators = {
|
|
5035
5137
|
group: [{ type: i0.Input }],
|
|
@@ -5226,18 +5328,23 @@
|
|
|
5226
5328
|
})(exports.PagingActionMode || (exports.PagingActionMode = {}));
|
|
5227
5329
|
|
|
5228
5330
|
var FormComponent = /** @class */ (function () {
|
|
5229
|
-
function FormComponent(utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
5331
|
+
function FormComponent(controlUtility, utilityService, controlValidationService, modalService, ngbActiveModal) {
|
|
5332
|
+
this.controlUtility = controlUtility;
|
|
5230
5333
|
this.utilityService = utilityService;
|
|
5231
5334
|
this.controlValidationService = controlValidationService;
|
|
5232
5335
|
this.modalService = modalService;
|
|
5233
5336
|
this.ngbActiveModal = ngbActiveModal;
|
|
5234
5337
|
}
|
|
5235
5338
|
FormComponent.prototype.ngOnInit = function () {
|
|
5339
|
+
this.fromName = this.randomString(5);
|
|
5236
5340
|
};
|
|
5237
5341
|
FormComponent.prototype.submit = function () {
|
|
5238
5342
|
var _this = this;
|
|
5239
|
-
|
|
5343
|
+
this.options.FormGroup.markAllAsTouched();
|
|
5344
|
+
if (this.options.FormGroup.invalid) {
|
|
5345
|
+
this.showGlobalError();
|
|
5240
5346
|
return;
|
|
5347
|
+
}
|
|
5241
5348
|
else {
|
|
5242
5349
|
var submitModel = this.options.GetModelFunction();
|
|
5243
5350
|
var submittedService = this.options.ServiceSubmitFunction.apply(null, submitModel);
|
|
@@ -5273,8 +5380,9 @@
|
|
|
5273
5380
|
this.utilityService.notifyErrorMessage();
|
|
5274
5381
|
}
|
|
5275
5382
|
else {
|
|
5383
|
+
debugger;
|
|
5276
5384
|
if (err.status == 400) {
|
|
5277
|
-
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new bbsfUtilities.RequestOptionsModel());
|
|
5385
|
+
this.controlValidationService.renderServerErrors(this.options.FormGroup, err, new bbsfUtilities.RequestOptionsModel(), this.fromName);
|
|
5278
5386
|
}
|
|
5279
5387
|
else {
|
|
5280
5388
|
errorMessage = "Server returned code: " + err.status + ", error message is: " + err.message;
|
|
@@ -5286,16 +5394,28 @@
|
|
|
5286
5394
|
if (!this.options.DisableBlockUI)
|
|
5287
5395
|
this.utilityService.stopBlockUI();
|
|
5288
5396
|
};
|
|
5397
|
+
FormComponent.prototype.showGlobalError = function () {
|
|
5398
|
+
this.controlUtility.showGlobalError(this.fromName);
|
|
5399
|
+
};
|
|
5400
|
+
FormComponent.prototype.randomString = function (length) {
|
|
5401
|
+
var randomChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
5402
|
+
var result = '';
|
|
5403
|
+
for (var i = 0; i < length; i++) {
|
|
5404
|
+
result += randomChars.charAt(Math.floor(Math.random() * randomChars.length));
|
|
5405
|
+
}
|
|
5406
|
+
return result;
|
|
5407
|
+
};
|
|
5289
5408
|
return FormComponent;
|
|
5290
5409
|
}());
|
|
5291
5410
|
FormComponent.decorators = [
|
|
5292
5411
|
{ type: i0.Component, args: [{
|
|
5293
5412
|
// tslint:disable-next-line: component-selector
|
|
5294
5413
|
selector: 'BBSF-Form',
|
|
5295
|
-
template: "<form [FormGroup]=\"options.FormGroup\" (ngSubmit)=\"submit()\"
|
|
5414
|
+
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>"
|
|
5296
5415
|
},] }
|
|
5297
5416
|
];
|
|
5298
5417
|
FormComponent.ctorParameters = function () { return [
|
|
5418
|
+
{ type: ControlUtility },
|
|
5299
5419
|
{ type: bbsfUtilities.UtilityService },
|
|
5300
5420
|
{ type: bbsfUtilities.ControlValidationService },
|
|
5301
5421
|
{ type: ngBootstrap.NgbModal },
|
|
@@ -5314,27 +5434,44 @@
|
|
|
5314
5434
|
this.styleSuccess = exports.StyleConfirmationMode.Success;
|
|
5315
5435
|
}
|
|
5316
5436
|
ConfirmationModalComponent.prototype.ngOnInit = function () {
|
|
5317
|
-
console.log("options on initialize");
|
|
5318
|
-
console.log(this.options);
|
|
5319
|
-
//check for options text values
|
|
5320
|
-
this.setTextValues();
|
|
5321
|
-
};
|
|
5322
|
-
ConfirmationModalComponent.prototype.ngAfterViewInit = function () {
|
|
5323
|
-
if (this.options.AutoShowModal)
|
|
5324
|
-
this.showModal();
|
|
5325
5437
|
};
|
|
5326
5438
|
//Method used to show confirmation modal
|
|
5327
5439
|
ConfirmationModalComponent.prototype.showModal = function () {
|
|
5440
|
+
var _this = this;
|
|
5328
5441
|
this.utilityService.startBlockUI();
|
|
5329
|
-
//
|
|
5330
|
-
this.
|
|
5442
|
+
//check for options text values
|
|
5443
|
+
this.setTextValues();
|
|
5444
|
+
//sweetalert styles//
|
|
5445
|
+
switch (this.options.StyleConfirmationMode) {
|
|
5446
|
+
case this.styleSuccess: {
|
|
5447
|
+
this.icon = 'success';
|
|
5448
|
+
this.btnColor = '#50cd89';
|
|
5449
|
+
}
|
|
5450
|
+
case this.styleWarning: {
|
|
5451
|
+
this.icon = 'warning';
|
|
5452
|
+
this.btnColor = '#ffc700';
|
|
5453
|
+
}
|
|
5454
|
+
case this.styleDanger: {
|
|
5455
|
+
this.icon = 'error';
|
|
5456
|
+
this.btnColor = '#f1416c';
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
Swal__default["default"].fire({
|
|
5460
|
+
title: this.options.ConfirmationHeader,
|
|
5461
|
+
text: this.options.ConfirmationBody,
|
|
5462
|
+
icon: this.icon,
|
|
5463
|
+
showCancelButton: true,
|
|
5464
|
+
confirmButtonColor: this.btnColor,
|
|
5465
|
+
cancelButtonColor: '#f5f8fa',
|
|
5466
|
+
showCloseButton: true,
|
|
5467
|
+
}).then(function (result) {
|
|
5468
|
+
if (result.isConfirmed) {
|
|
5469
|
+
_this.submit();
|
|
5470
|
+
}
|
|
5471
|
+
});
|
|
5331
5472
|
this.utilityService.stopBlockUI();
|
|
5332
|
-
console.log("options after modal opened");
|
|
5333
|
-
console.log(this.options);
|
|
5334
5473
|
};
|
|
5335
5474
|
ConfirmationModalComponent.prototype.setTextValues = function () {
|
|
5336
|
-
console.log("options in first showmodal");
|
|
5337
|
-
console.log(this.options);
|
|
5338
5475
|
if (!this.options.ConfirmationHeader)
|
|
5339
5476
|
this.options.ConfirmationHeader = this.utilityService.getResourceValue("DeleteConfirmation");
|
|
5340
5477
|
if (!this.options.ConfirmationBody)
|
|
@@ -5391,9 +5528,8 @@
|
|
|
5391
5528
|
}());
|
|
5392
5529
|
ConfirmationModalComponent.decorators = [
|
|
5393
5530
|
{ type: i0.Component, args: [{
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
styles: [""]
|
|
5531
|
+
template: "",
|
|
5532
|
+
selector: 'BBSF-ConfirmationModal'
|
|
5397
5533
|
},] }
|
|
5398
5534
|
];
|
|
5399
5535
|
ConfirmationModalComponent.ctorParameters = function () { return [
|
|
@@ -5496,18 +5632,19 @@
|
|
|
5496
5632
|
angularNgAutocomplete.AutocompleteLibModule,
|
|
5497
5633
|
bbsfUtilities.BBSFUtilitiesModule,
|
|
5498
5634
|
ngInlineSvg.InlineSVGModule.forRoot(),
|
|
5635
|
+
ngxSweetalert2.SweetAlert2Module
|
|
5499
5636
|
],
|
|
5500
5637
|
providers: [
|
|
5501
5638
|
ErrorMassageValidation,
|
|
5502
5639
|
ControlUtility,
|
|
5503
5640
|
OnPagingFiltersChangeService,
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5641
|
+
// EnvironmentService,
|
|
5642
|
+
// AuthService,
|
|
5643
|
+
// RequestHandlerService,
|
|
5644
|
+
// UtilityService,
|
|
5508
5645
|
core$1.TranslateService,
|
|
5509
|
-
|
|
5510
|
-
|
|
5646
|
+
// BBSFTranslateService,
|
|
5647
|
+
// ControlValidationService,
|
|
5511
5648
|
forms.FormGroupDirective,
|
|
5512
5649
|
ngBootstrap.NgbModal,
|
|
5513
5650
|
ngBootstrap.NgbActiveModal
|
|
@@ -5581,12 +5718,6 @@
|
|
|
5581
5718
|
return CustomValidator;
|
|
5582
5719
|
}());
|
|
5583
5720
|
|
|
5584
|
-
exports.ControlLayout = void 0;
|
|
5585
|
-
(function (ControlLayout) {
|
|
5586
|
-
ControlLayout[ControlLayout["Vertical"] = 1] = "Vertical";
|
|
5587
|
-
ControlLayout[ControlLayout["Horizontal"] = 2] = "Horizontal";
|
|
5588
|
-
})(exports.ControlLayout || (exports.ControlLayout = {}));
|
|
5589
|
-
|
|
5590
5721
|
exports.ForceDirection = void 0;
|
|
5591
5722
|
(function (ForceDirection) {
|
|
5592
5723
|
ForceDirection[ForceDirection["English"] = 1] = "English";
|
|
@@ -5632,14 +5763,17 @@
|
|
|
5632
5763
|
/**Prevent AutoComplete of textbox*/
|
|
5633
5764
|
this.AutoComplete = "off";
|
|
5634
5765
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5635
|
-
this.ViewType =
|
|
5766
|
+
this.ViewType = null;
|
|
5636
5767
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5637
5768
|
*/
|
|
5638
5769
|
this.CustomValidation = [];
|
|
5639
5770
|
/** to set Direction of textbox if textbox is Arabic or English */
|
|
5640
5771
|
this.ForceDirection = null;
|
|
5772
|
+
/** Set Type of TextBox ("text","password","email","number") */
|
|
5773
|
+
this.Type = exports.InputType.Text;
|
|
5641
5774
|
this.IconPosition = exports.IconPosition.left;
|
|
5642
5775
|
this.NoMargin = false;
|
|
5776
|
+
this.ValidationRules = [];
|
|
5643
5777
|
}
|
|
5644
5778
|
return TextBoxOptions;
|
|
5645
5779
|
}());
|
|
@@ -5654,7 +5788,7 @@
|
|
|
5654
5788
|
*/
|
|
5655
5789
|
this.CustomValidation = [];
|
|
5656
5790
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5657
|
-
this.ViewType =
|
|
5791
|
+
this.ViewType = null;
|
|
5658
5792
|
}
|
|
5659
5793
|
return FileUploadOptions;
|
|
5660
5794
|
}());
|
|
@@ -5667,13 +5801,13 @@
|
|
|
5667
5801
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5668
5802
|
this.Value = new EnglishArabicDTO();
|
|
5669
5803
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5670
|
-
this.ViewType =
|
|
5804
|
+
this.ViewType = null;
|
|
5671
5805
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5672
|
-
this.LanguageMode =
|
|
5806
|
+
this.LanguageMode = null;
|
|
5673
5807
|
this.IconPositionEN = exports.IconPosition.left;
|
|
5674
5808
|
this.IconPositionAR = exports.IconPosition.right;
|
|
5675
5809
|
/*multi control placement type*/
|
|
5676
|
-
this.MultiControlPlacementType =
|
|
5810
|
+
this.MultiControlPlacementType = null;
|
|
5677
5811
|
}
|
|
5678
5812
|
return MultiLingualTextBoxOptions;
|
|
5679
5813
|
}());
|
|
@@ -5687,7 +5821,7 @@
|
|
|
5687
5821
|
var TextAreaOptions = /** @class */ (function () {
|
|
5688
5822
|
function TextAreaOptions() {
|
|
5689
5823
|
/** to set type of view if TextArea is Vertical or Horizontal */
|
|
5690
|
-
this.ViewType =
|
|
5824
|
+
this.ViewType = null;
|
|
5691
5825
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5692
5826
|
*/
|
|
5693
5827
|
this.CustomValidation = [];
|
|
@@ -5705,11 +5839,11 @@
|
|
|
5705
5839
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5706
5840
|
this.Value = new EnglishArabicDTO();
|
|
5707
5841
|
/** to set type of view if MultilingualTextArea is Vertical or Horizontal */
|
|
5708
|
-
this.ViewType =
|
|
5842
|
+
this.ViewType = null;
|
|
5709
5843
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5710
|
-
this.LanguageMode =
|
|
5844
|
+
this.LanguageMode = null;
|
|
5711
5845
|
/*multi control placement type*/
|
|
5712
|
-
this.MultiControlPlacementType =
|
|
5846
|
+
this.MultiControlPlacementType = null;
|
|
5713
5847
|
}
|
|
5714
5848
|
return MultiLingualTextAreaOptions;
|
|
5715
5849
|
}());
|
|
@@ -5737,7 +5871,7 @@
|
|
|
5737
5871
|
/** Disable Bootstrap DropdownList */
|
|
5738
5872
|
this.DisableBootstrapSelect = false;
|
|
5739
5873
|
/** to set type of view if DropdownList is Vertical or Horizontal */
|
|
5740
|
-
this.ViewType =
|
|
5874
|
+
this.ViewType = null;
|
|
5741
5875
|
/** To Set Custom Validation*/
|
|
5742
5876
|
this.CustomValidation = [];
|
|
5743
5877
|
/** Set key for item in DropdownList */
|
|
@@ -5757,7 +5891,7 @@
|
|
|
5757
5891
|
/**Set List Of Countries As Preferred Countries*/
|
|
5758
5892
|
this.PreferredCountries = [];
|
|
5759
5893
|
/** to set type of view if Phonebox is Vertical or Horizontal */
|
|
5760
|
-
this.ViewType =
|
|
5894
|
+
this.ViewType = null;
|
|
5761
5895
|
this.ForceDirection = exports.ForceDirection.English;
|
|
5762
5896
|
}
|
|
5763
5897
|
return PhoneOptions;
|
|
@@ -5765,7 +5899,7 @@
|
|
|
5765
5899
|
|
|
5766
5900
|
var ToggleSlideOptions = /** @class */ (function () {
|
|
5767
5901
|
function ToggleSlideOptions() {
|
|
5768
|
-
this.ViewType =
|
|
5902
|
+
this.ViewType = null;
|
|
5769
5903
|
this.ForceDirection = exports.ForceDirection.English;
|
|
5770
5904
|
}
|
|
5771
5905
|
return ToggleSlideOptions;
|
|
@@ -5774,7 +5908,7 @@
|
|
|
5774
5908
|
var HtmlEditorOptions = /** @class */ (function () {
|
|
5775
5909
|
function HtmlEditorOptions() {
|
|
5776
5910
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5777
|
-
this.ViewType =
|
|
5911
|
+
this.ViewType = null;
|
|
5778
5912
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5779
5913
|
*/
|
|
5780
5914
|
this.CustomValidation = [];
|
|
@@ -5794,11 +5928,11 @@
|
|
|
5794
5928
|
/**To Set Value To MultipleLanguageText with Object From Type "EnglishArabicDTO" */
|
|
5795
5929
|
this.Value = new EnglishArabicDTO();
|
|
5796
5930
|
/** to set type of view if MultipleLanguageText is Vertical or Horizontal */
|
|
5797
|
-
this.ViewType =
|
|
5931
|
+
this.ViewType = null;
|
|
5798
5932
|
/** Set Height For */
|
|
5799
5933
|
this.Height = 150;
|
|
5800
5934
|
/**To Set LanguageMode To MultipleLanguageText */
|
|
5801
|
-
this.LanguageMode =
|
|
5935
|
+
this.LanguageMode = null;
|
|
5802
5936
|
}
|
|
5803
5937
|
return MultiLingualHtmlEditorOptions;
|
|
5804
5938
|
}());
|
|
@@ -5823,7 +5957,7 @@
|
|
|
5823
5957
|
*/
|
|
5824
5958
|
this.CustomValidation = [];
|
|
5825
5959
|
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5826
|
-
this.ViewType =
|
|
5960
|
+
this.ViewType = null;
|
|
5827
5961
|
/** Set List of Custom Attribute to FileInput */
|
|
5828
5962
|
this.FileUploadAcceptsTypes = [exports.ImageType.ImageTypes];
|
|
5829
5963
|
}
|
|
@@ -5837,7 +5971,7 @@
|
|
|
5837
5971
|
this.AllowDropZone = false;
|
|
5838
5972
|
this.CustomValidation = [];
|
|
5839
5973
|
/** to set type of view if FileInput is Vertical or Horizontal */
|
|
5840
|
-
this.ViewType =
|
|
5974
|
+
this.ViewType = null;
|
|
5841
5975
|
/** Set List of Custom Attribute to FileInput */
|
|
5842
5976
|
this.ImageUploadAcceptsTypes = [exports.ImageType.ImageTypes];
|
|
5843
5977
|
}
|
|
@@ -5905,7 +6039,7 @@
|
|
|
5905
6039
|
*/
|
|
5906
6040
|
this.CustomValidation = [];
|
|
5907
6041
|
/** to set type of view if MapAutoComplete is Vertical or Horizontal */
|
|
5908
|
-
this.ViewType =
|
|
6042
|
+
this.ViewType = null;
|
|
5909
6043
|
}
|
|
5910
6044
|
return MapAutoCompleteOptions;
|
|
5911
6045
|
}());
|
|
@@ -5921,7 +6055,7 @@
|
|
|
5921
6055
|
/** set Range Number to Textbox with type number with From-Value and To-value*/
|
|
5922
6056
|
this.NumberRange = new RangeNumber();
|
|
5923
6057
|
/** to set type of view if textbox is Vertical or Horizontal */
|
|
5924
|
-
this.ViewType =
|
|
6058
|
+
this.ViewType = null;
|
|
5925
6059
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5926
6060
|
*/
|
|
5927
6061
|
this.CustomValidation = [];
|
|
@@ -5948,7 +6082,7 @@
|
|
|
5948
6082
|
/**To set value to tagsinput */
|
|
5949
6083
|
this.Value = null;
|
|
5950
6084
|
/** to set type of view if tagsinput is Vertical or Horizontal */
|
|
5951
|
-
this.ViewType =
|
|
6085
|
+
this.ViewType = null;
|
|
5952
6086
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
5953
6087
|
*/
|
|
5954
6088
|
this.CustomValidation = [];
|
|
@@ -6041,7 +6175,7 @@
|
|
|
6041
6175
|
|
|
6042
6176
|
var RadioButtonOptions = /** @class */ (function () {
|
|
6043
6177
|
function RadioButtonOptions() {
|
|
6044
|
-
this.ViewType =
|
|
6178
|
+
this.ViewType = null;
|
|
6045
6179
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage
|
|
6046
6180
|
*/
|
|
6047
6181
|
this.CustomValidation = [];
|
|
@@ -6105,7 +6239,7 @@
|
|
|
6105
6239
|
//Represents refrence to paging control that needs to be updated after success
|
|
6106
6240
|
this.PagingReference = null;
|
|
6107
6241
|
//Represents paging action excutes after submission (Reinitialize/Update)
|
|
6108
|
-
this.PagingActionMode = exports.PagingActionMode.
|
|
6242
|
+
this.PagingActionMode = exports.PagingActionMode.Reinitialize;
|
|
6109
6243
|
//Represents function that excutes after submission error
|
|
6110
6244
|
this.OnErrorHandler = null;
|
|
6111
6245
|
//Represents function that excutes after submission success
|
|
@@ -6116,9 +6250,6 @@
|
|
|
6116
6250
|
this.DisableSuccessNotification = false;
|
|
6117
6251
|
//If ="true" disable notification after submission error
|
|
6118
6252
|
this.DisableErrorNotification = false;
|
|
6119
|
-
//If ="true" modal open automatically after options initialization
|
|
6120
|
-
//If="false" should call function showModal()
|
|
6121
|
-
this.AutoShowModal = true;
|
|
6122
6253
|
}
|
|
6123
6254
|
return ConfirmationModalOptions;
|
|
6124
6255
|
}());
|
|
@@ -6468,6 +6599,7 @@
|
|
|
6468
6599
|
exports.FileUploadOptions = FileUploadOptions;
|
|
6469
6600
|
exports.FilterItem = FilterItem;
|
|
6470
6601
|
exports.FormOptions = FormOptions;
|
|
6602
|
+
exports.GlobalSettings = GlobalSettings;
|
|
6471
6603
|
exports.HtmlEditorOptions = HtmlEditorOptions;
|
|
6472
6604
|
exports.ImageUploadOptions = ImageUploadOptions;
|
|
6473
6605
|
exports.MapAutoCompleteOptions = MapAutoCompleteOptions;
|