@bnsights/bbsf-controls 1.0.78 → 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/bnsights-bbsf-controls-1.0.80.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +38 -17
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/components/app-base-component.js +22 -7
- package/esm2015/lib/Shared/default_intl.js +9 -5
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +2 -2
- package/esm2015/lib/controls/HtmlEditor/HtmlEditor.component.js +2 -2
- package/esm2015/lib/controls/ImageUpload/ImageUpload.component.js +2 -2
- package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +3 -3
- package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +5 -3
- package/esm2015/lib/controls/bbsf-controls.module.js +1 -1
- package/fesm2015/bnsights-bbsf-controls.js +38 -17
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/components/app-base-component.d.ts +1 -0
- package/lib/Shared/default_intl.d.ts +4 -0
- package/package.json +1 -1
- package/src/lib/assets/sass/base.scss +1 -0
- package/src/lib/assets/sass/checkbox.scss +1 -0
- package/src/lib/assets/sass/datetime-picker.scss +5 -0
- package/bnsights-bbsf-controls-1.0.78.tgz +0 -0
|
@@ -704,13 +704,17 @@
|
|
|
704
704
|
var _this = _super.call(this) || this;
|
|
705
705
|
_this.utilityService = utilityService;
|
|
706
706
|
/** A label for the range 'from' in picker info */
|
|
707
|
-
_this.rangeFromLabel = _this.utilityService.getResourceValue(
|
|
707
|
+
_this.rangeFromLabel = _this.utilityService.getResourceValue('From');
|
|
708
708
|
/** A label for the range 'to' in picker info */
|
|
709
|
-
_this.rangeToLabel = _this.utilityService.getResourceValue(
|
|
709
|
+
_this.rangeToLabel = _this.utilityService.getResourceValue('To');
|
|
710
710
|
/** A label for the cancel button */
|
|
711
|
-
_this.cancelBtnLabel = _this.utilityService.getResourceValue(
|
|
711
|
+
_this.cancelBtnLabel = _this.utilityService.getResourceValue('Cancel');
|
|
712
712
|
/** A label for the set button */
|
|
713
|
-
_this.setBtnLabel = _this.utilityService.getResourceValue(
|
|
713
|
+
_this.setBtnLabel = _this.utilityService.getResourceValue('Save');
|
|
714
|
+
/** A label for the hour12 button (AM) */
|
|
715
|
+
_this.hour12AMLabel = _this.utilityService.getResourceValue('AM');
|
|
716
|
+
/** A label for the hour12 button (PM) */
|
|
717
|
+
_this.hour12PMLabel = _this.utilityService.getResourceValue('PM');
|
|
714
718
|
return _this;
|
|
715
719
|
}
|
|
716
720
|
return DefaultIntl;
|
|
@@ -904,7 +908,7 @@
|
|
|
904
908
|
DateInputComponent.decorators = [
|
|
905
909
|
{ type: i0.Component, args: [{
|
|
906
910
|
selector: 'BBSF-DateTimePicker',
|
|
907
|
-
template: "\r\n<div class=\"form-group bbsf-control bbsf-datetime-picker\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n </label>\r\n <
|
|
911
|
+
template: "\r\n<div class=\"form-group bbsf-control bbsf-datetime-picker\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label *ngIf=\"!options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n </label>\r\n <!--Asterisk-->\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger\"\r\n aria-required=\"true\">*</span>\r\n <div class=\"bbsf-input-container\">\r\n <!--input-->\r\n <input autocomplete=\"off\" (dateTimeChange)=\"onDateSelect($event)\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" [owlDateTime]=\"dt1\" [owlDateTimeTrigger]=\"dt1\"\r\n [class.is-invalid]=\"DatePickerFormControl.invalid && DatePickerFormControl.touched\"\r\n [min]=\"options.StartDate\" [max]=\"options.EndDate\" [hour12Timer]=\"options.Hour12Timer\" [selectMode]=\"getSelectMode(options.SelectMode)\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" #Dateinput>\r\n\r\n <owl-date-time [pickerType]=\"getPickerType(options.PickerType)\"\r\n [startView]=\"getStartView(options.StartView)\" [firstDayOfWeek]=\"options.FirstDayOfWeek\"\r\n [hour12Timer]=\"options.Hour12Timer\" #dt1></owl-date-time>\r\n <!--icon-->\r\n <span class=\"copy-clipboard\" [owlDateTimeTrigger]=\"dt1\">\r\n <span class=\"svg-icon\">\r\n <svg id=\"Group_356\" data-name=\"Group 356\" xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"15\" viewBox=\"0 0 48 48\">\r\n <path id=\"Path_6737\" data-name=\"Path 6737\" d=\"M11.583,1a1,1,0,0,0-2,0V5.7h2Z\" style=\"\"></path>\r\n <path id=\"Path_6738\" data-name=\"Path 6738\" d=\"M38.417,1a1,1,0,0,0-2,0V5.7h2Z\"></path>\r\n <path id=\"Path_6739\" data-name=\"Path 6739\" d=\"M0,43.146C0,45.822,1.826,48,4.07,48H43.928C46.174,48,48,45.822,48,43.146V17.121H0Z\" fill=\"#d5d5d5\"></path>\r\n <path id=\"Path_6740\" data-name=\"Path 6740\" d=\"M43.929,5.7H38.417v5.512a1,1,0,1,1-2,0V5.7H11.583v5.512a1,1,0,1,1-2,0V5.7H4.07C1.826,5.7,0,7.877,0,10.555v4.566H48V10.555C48,7.877,46.174,5.7,43.929,5.7Z\" fill=\"#595959\"></path>\r\n </svg>\r\n </span>\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <!-- requiredText-->\r\n <div class=\"bbsf-validation\" *ngIf=\"(DatePickerFormControl.invalid && DatePickerFormControl.touched)\">\r\n {{getErrorValidation(DatePickerFormControl.errors|keyvalue)}}\r\n </div>\r\n </div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n</div>\r\n",
|
|
908
912
|
providers: [
|
|
909
913
|
{ provide: ngPickDatetime.OwlDateTimeIntl, useClass: DefaultIntl }
|
|
910
914
|
]
|
|
@@ -1625,7 +1629,8 @@
|
|
|
1625
1629
|
MultiLingualTextBoxComponent.prototype.trimControlValue = function (type) {
|
|
1626
1630
|
var whitespace = ' ';
|
|
1627
1631
|
if (type == "En") {
|
|
1628
|
-
var originalValue = this.EnglishFormControl.value;
|
|
1632
|
+
var originalValue = this.controlUtility.trimControlValue(this.EnglishFormControl.value);
|
|
1633
|
+
this.EnglishFormControl.patchValue(originalValue);
|
|
1629
1634
|
if (this.options.PatchFunction && this.options.PatchPath && this.EnglishFormControl.valid) {
|
|
1630
1635
|
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1631
1636
|
}
|
|
@@ -1634,7 +1639,8 @@
|
|
|
1634
1639
|
}
|
|
1635
1640
|
}
|
|
1636
1641
|
if (type == "Ar") {
|
|
1637
|
-
var originalValue = this.ArabicFormControl.value;
|
|
1642
|
+
var originalValue = this.controlUtility.trimControlValue(this.ArabicFormControl.value);
|
|
1643
|
+
this.ArabicFormControl.patchValue(originalValue);
|
|
1638
1644
|
if (this.options.PatchFunction && this.options.PatchPath && this.ArabicFormControl.valid) {
|
|
1639
1645
|
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
1640
1646
|
}
|
|
@@ -2964,7 +2970,7 @@
|
|
|
2964
2970
|
],
|
|
2965
2971
|
uploadUrl: 'v1/image',
|
|
2966
2972
|
uploadWithCredentials: false,
|
|
2967
|
-
sanitize:
|
|
2973
|
+
sanitize: false,
|
|
2968
2974
|
toolbarPosition: 'top',
|
|
2969
2975
|
toolbarHiddenButtons: []
|
|
2970
2976
|
};
|
|
@@ -3201,7 +3207,7 @@
|
|
|
3201
3207
|
],
|
|
3202
3208
|
uploadUrl: 'v1/image',
|
|
3203
3209
|
uploadWithCredentials: false,
|
|
3204
|
-
sanitize:
|
|
3210
|
+
sanitize: false,
|
|
3205
3211
|
toolbarPosition: 'top',
|
|
3206
3212
|
toolbarHiddenButtons: []
|
|
3207
3213
|
};
|
|
@@ -3243,7 +3249,7 @@
|
|
|
3243
3249
|
],
|
|
3244
3250
|
uploadUrl: 'v1/image',
|
|
3245
3251
|
uploadWithCredentials: false,
|
|
3246
|
-
sanitize:
|
|
3252
|
+
sanitize: false,
|
|
3247
3253
|
toolbarPosition: 'top',
|
|
3248
3254
|
toolbarHiddenButtons: []
|
|
3249
3255
|
};
|
|
@@ -3861,7 +3867,7 @@
|
|
|
3861
3867
|
ImageUploaderComponent.decorators = [
|
|
3862
3868
|
{ type: i0.Component, args: [{
|
|
3863
3869
|
selector: 'BBSF-ImageUpload',
|
|
3864
|
-
template: "<div class=\"form-group bbsf-control bbsf-image-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div *ngIf=\"options.AllowDropZone\" class=\"bbsf-input-container {{options.ExtraClasses}}\"\r\n ngx-dropzone\r\n [disabled]=\"options.IsDisabled\"\r\n [accept]=\"AcceptedType\"\r\n [multiple]=\"options.IsMultiple\"\r\n (change)=\"onFileChange($event)\"\r\n ngDefaultControl\r\n formControlName=\"{{options.Name}}\"\r\n [maxFileSize]=\"maxFileSize\"\r\n id=\"{{options.Name}}\"\r\n [class.is-invalid]=\"ImageUploadFormControl.invalid && ImageUploadFormControl.touched\">\r\n <ngx-dropzone-label class=\"dropzone-label\">\r\n <img *ngIf=\"ImageSource\" [src]=\"ImageSource\" style=\"align-items: center;border-radius: 5px;display: flex;height: 100px;justify-content: center;margin: 10px;max-width: 180px;min-height: 100px;min-width: 180px;padding: 0px 20px;position: relative;\" />\r\n <div class=\"svg-and-validation\" *ngIf=\"!ImageSource\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 50px; height: 50px;\">\r\n <path opacity=\"0.3\" d=\"M5 16C3.3 16 2 14.7 2 13C2 11.3 3.3 10 5 10H5.1C5 9.7 5 9.3 5 9C5 6.2 7.2 4 10 4C11.9 4 13.5 5 14.3 6.5C14.8 6.2 15.4 6 16 6C17.7 6 19 7.3 19 9C19 9.4 18.9 9.7 18.8 10C18.9 10 18.9 10 19 10C20.7 10 22 11.3 22 13C22 14.7 20.7 16 19 16H5ZM8 13.6H16L12.7 10.3C12.3 9.89999 11.7 9.89999 11.3 10.3L8 13.6Z\" fill=\"currentColor\" style=\"fill: #a1a1a1;\"></path>\r\n <path d=\"M11 13.6V19C11 19.6 11.4 20 12 20C12.6 20 13 19.6 13 19V13.6H11Z\" fill=\"currentColor\" style=\"fill: #989898;\"></path>\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n </div>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-image-preview class=\"dropzone-preview\" *ngFor=\"let f of files\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\" ngProjectAs=\"ngx-dropzone-preview\">\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div *ngIf=\"!options.AllowDropZone\">\r\n <ngx-dropzone-label *ngIf=\"files.length==0\">\r\n <div #element (click)=\"showImageUploader(element)\">\r\n <img [src]=\"ImageSource\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n <div class=\"d-none {{options.ExtraClasses}}\"\r\n ngx-dropzone\r\n [disabled]=\"options.IsDisabled\"\r\n [accept]=\"AcceptedType\"\r\n [multiple]=\"options.IsMultiple\"\r\n (change)=\"onFileChange($event)\"\r\n ngDefaultControl\r\n formControlName=\"{{options.Name}}\"\r\n [maxFileSize]=\"maxFileSize\"\r\n id=\"{{options.Name}}\"\r\n [class.is-invalid]=\"ImageUploadFormControl.invalid && ImageUploadFormControl.touched\">\r\n </div>\r\n <ngx-dropzone-image-preview *ngFor=\"let f of files\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\" ngProjectAs=\"ngx-dropzone-preview\">\r\n </ngx-dropzone-image-preview>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\"\r\n *ngIf=\"(ImageUploadFormControl.invalid && ImageUploadFormControl.touched)\">\r\n {{getErrorValidation(ImageUploadFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n <!-- image cropper modal-->\r\n <div id=\"mdlSample\" class=\"modal bbsf-cropper-modal\" role=\"dialog\" [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 {{UtilityService.getResourceValue(\"CropImage\")}}\r\n </h4>\r\n <button type=\"button\" class=\"btn-close\" data-dismiss=\"modal\" (click)=\"openModal(false)\"></button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"imageUrl\">\r\n <angular-cropper #angularCropper [cropperOptions]=\"config\" [imageUrl]=\"imageUrl\">\r\n </angular-cropper>\r\n <img [src]=\"imgwUrl\" />\r\n </div>\r\n <div class=\"cropper-btns\">\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"zoomImage(0.1)\" class=\"btn btn-default\" ngbTooltip
|
|
3870
|
+
template: "<div class=\"form-group bbsf-control bbsf-image-upload\" [formGroup]=\"group\">\r\n <div [ngClass]=\"(options.ViewType==1)?'bbsf-vertical':'bbsf-horizontal'\">\r\n <!--label-->\r\n <label [hidden]=\"options.HideLabel\" class=\"bbsf-label {{options.LabelExtraClasses}}\">\r\n {{options.LabelValue}}\r\n <!--Asterisk-->\r\n <span *ngIf=\"(options.ShowAsterisk&&options.IsRequired)||(options.IsRequired)\" class=\"text-danger\">*</span>\r\n </label>\r\n <!--Allow dropZone-->\r\n <div *ngIf=\"options.AllowDropZone\" class=\"bbsf-input-container {{options.ExtraClasses}}\"\r\n ngx-dropzone\r\n [disabled]=\"options.IsDisabled\"\r\n [accept]=\"AcceptedType\"\r\n [multiple]=\"options.IsMultiple\"\r\n (change)=\"onFileChange($event)\"\r\n ngDefaultControl\r\n formControlName=\"{{options.Name}}\"\r\n [maxFileSize]=\"maxFileSize\"\r\n id=\"{{options.Name}}\"\r\n [class.is-invalid]=\"ImageUploadFormControl.invalid && ImageUploadFormControl.touched\">\r\n <ngx-dropzone-label class=\"dropzone-label\">\r\n <img *ngIf=\"ImageSource\" [src]=\"ImageSource\" style=\"align-items: center;border-radius: 5px;display: flex;height: 100px;justify-content: center;margin: 10px;max-width: 180px;min-height: 100px;min-width: 180px;padding: 0px 20px;position: relative;\" />\r\n <div class=\"svg-and-validation\" *ngIf=\"!ImageSource\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 50px; height: 50px;\">\r\n <path opacity=\"0.3\" d=\"M5 16C3.3 16 2 14.7 2 13C2 11.3 3.3 10 5 10H5.1C5 9.7 5 9.3 5 9C5 6.2 7.2 4 10 4C11.9 4 13.5 5 14.3 6.5C14.8 6.2 15.4 6 16 6C17.7 6 19 7.3 19 9C19 9.4 18.9 9.7 18.8 10C18.9 10 18.9 10 19 10C20.7 10 22 11.3 22 13C22 14.7 20.7 16 19 16H5ZM8 13.6H16L12.7 10.3C12.3 9.89999 11.7 9.89999 11.3 10.3L8 13.6Z\" fill=\"currentColor\" style=\"fill: #a1a1a1;\"></path>\r\n <path d=\"M11 13.6V19C11 19.6 11.4 20 12 20C12.6 20 13 19.6 13 19V13.6H11Z\" fill=\"currentColor\" style=\"fill: #989898;\"></path>\r\n </svg>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n </div>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-image-preview class=\"dropzone-preview\" *ngFor=\"let f of files\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\" ngProjectAs=\"ngx-dropzone-preview\">\r\n </ngx-dropzone-image-preview>\r\n </div>\r\n <!--Not allowed dropZone-->\r\n <div *ngIf=\"!options.AllowDropZone\">\r\n <ngx-dropzone-label *ngIf=\"files.length==0\">\r\n <div #element (click)=\"showImageUploader(element)\">\r\n <img [src]=\"ImageSource\" />\r\n </div>\r\n </ngx-dropzone-label>\r\n <div class=\"d-none {{options.ExtraClasses}}\"\r\n ngx-dropzone\r\n [disabled]=\"options.IsDisabled\"\r\n [accept]=\"AcceptedType\"\r\n [multiple]=\"options.IsMultiple\"\r\n (change)=\"onFileChange($event)\"\r\n ngDefaultControl\r\n formControlName=\"{{options.Name}}\"\r\n [maxFileSize]=\"maxFileSize\"\r\n id=\"{{options.Name}}\"\r\n [class.is-invalid]=\"ImageUploadFormControl.invalid && ImageUploadFormControl.touched\">\r\n </div>\r\n <ngx-dropzone-image-preview *ngFor=\"let f of files\" [file]=\"f\" [removable]=\"true\" (removed)=\"removeFromControlValue(f)\" ngProjectAs=\"ngx-dropzone-preview\">\r\n </ngx-dropzone-image-preview>\r\n <!--Validation text-->\r\n <div class=\"bbsf-validation-msg\" *ngIf=\"ValidationMessage\" [innerHTML]=\"ValidationMessage\"></div>\r\n </div>\r\n </div>\r\n <div class=\"subtext-container\">\r\n <!-- required text-->\r\n <div class=\"bbsf-validation\"\r\n *ngIf=\"(ImageUploadFormControl.invalid && ImageUploadFormControl.touched)\">\r\n {{getErrorValidation(ImageUploadFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <!-- LabelDescription-->\r\n <div class=\"bbsf-control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n <!-- image cropper modal-->\r\n <div id=\"mdlSample\" class=\"modal bbsf-cropper-modal\" role=\"dialog\" [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 {{UtilityService.getResourceValue(\"CropImage\")}}\r\n </h4>\r\n <button type=\"button\" class=\"btn-close\" data-dismiss=\"modal\" (click)=\"openModal(false)\"></button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"imageUrl\">\r\n <angular-cropper #angularCropper [cropperOptions]=\"config\" [imageUrl]=\"imageUrl\">\r\n </angular-cropper>\r\n <img [src]=\"imgwUrl\" />\r\n </div>\r\n <div class=\"cropper-btns\">\r\n <div class=\"btn-group\">\r\n <button type=\"button\" (click)=\"zoomImage(0.1)\" class=\"btn btn-default\" ngbTooltip='{{UtilityService.getResourceValue(\"ZoomIn\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"ZoomOut\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"MoveLeft\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"MoveRight\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"MoveUp\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"MoveDown\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"RotateLeft\")}}'>\r\n <span class=\"docs-tooltip\">\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\" ngbTooltip='{{UtilityService.getResourceValue(\"RotateRight\")}}'>\r\n <span class=\"docs-tooltip\">\r\n <span class=\"fa fa-redo-alt\"></span>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\" align=\"right\">\r\n <button type=\"button\" id=\"btnClose\" class=\"btn btn-sm btn-light\" (click)=\"openModal(false)\">\r\n {{UtilityService.getResourceValue(\"CancelLabel\")}}\r\n </button>\r\n <button type=\"button\" (click)=\"cropImage()\" id=\"btnOK\" class=\"btn btn-sm btn-brand\">\r\n {{UtilityService.getResourceValue(\"Crop\")}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n"
|
|
3865
3871
|
},] }
|
|
3866
3872
|
];
|
|
3867
3873
|
ImageUploaderComponent.ctorParameters = function () { return [
|
|
@@ -8181,6 +8187,7 @@
|
|
|
8181
8187
|
this.filtersLabel = this.utilityService.getResourceValue("Filters");
|
|
8182
8188
|
this.addLabel = this.utilityService.getResourceValue("Add");
|
|
8183
8189
|
this.userName = this.auhService.name();
|
|
8190
|
+
this.isEN = this.utilityService.isCurrentLanguageEnglish();
|
|
8184
8191
|
}
|
|
8185
8192
|
AppBaseComponent.prototype.updatePageTitle = function (title) {
|
|
8186
8193
|
this.titleService.setTitle(this.calculatePageTitle(title));
|
|
@@ -8285,12 +8292,26 @@
|
|
|
8285
8292
|
return this.utilityService.isCurrentLanguageEnglish();
|
|
8286
8293
|
};
|
|
8287
8294
|
AppBaseComponent.prototype.calculateInitials = function (name) {
|
|
8288
|
-
var
|
|
8289
|
-
var
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8295
|
+
var language = localStorage.getItem("language");
|
|
8296
|
+
var currentUser = this.auhService.user.profile;
|
|
8297
|
+
console.log(currentUser);
|
|
8298
|
+
var userName = language == "en" ? currentUser.given_nameEn : currentUser.given_nameAr;
|
|
8299
|
+
if (currentUser) {
|
|
8300
|
+
var fullName = userName.split(" ");
|
|
8301
|
+
var initials = void 0;
|
|
8302
|
+
if (fullName.length > 1) {
|
|
8303
|
+
if (this.isEN)
|
|
8304
|
+
initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
|
|
8305
|
+
else
|
|
8306
|
+
initials =
|
|
8307
|
+
fullName.shift().charAt(0) + " " + fullName.pop().charAt(0);
|
|
8308
|
+
}
|
|
8309
|
+
else {
|
|
8310
|
+
initials = fullName.pop().charAt(0);
|
|
8311
|
+
}
|
|
8312
|
+
return initials.toUpperCase();
|
|
8313
|
+
}
|
|
8314
|
+
return "";
|
|
8294
8315
|
};
|
|
8295
8316
|
AppBaseComponent.prototype.getCurrentUserInitials = function () {
|
|
8296
8317
|
return this.calculateInitials(this.auhService.name());
|