@bnsights/bbsf-controls 1.0.82 → 1.0.84

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.
@@ -2600,7 +2600,15 @@ class HtmlEditorComponent {
2600
2600
  uploadWithCredentials: false,
2601
2601
  sanitize: false,
2602
2602
  toolbarPosition: 'top',
2603
- toolbarHiddenButtons: []
2603
+ toolbarHiddenButtons: [
2604
+ [
2605
+ 'link',
2606
+ 'unlink',
2607
+ 'insertImage',
2608
+ 'insertVideo',
2609
+ 'insertHorizontalRule',
2610
+ ]
2611
+ ]
2604
2612
  };
2605
2613
  this.controlValidationService.isCreatedBefor = false;
2606
2614
  // this.miscList = this.options.ToolsList_Misc != null ? this.options.ToolsList_Misc : ['codeview', 'undo', 'redo'];
@@ -5806,6 +5814,7 @@ class ConfirmationModalComponent {
5806
5814
  confirmButtonText: this.options.SubmitButtonText,
5807
5815
  showCancelButton: this.options.showCancelButton,
5808
5816
  showCloseButton: this.options.showCloseButton,
5817
+ allowOutsideClick: false
5809
5818
  }).then((result) => {
5810
5819
  if (result.isConfirmed) {
5811
5820
  this.submit();
@@ -7774,16 +7783,16 @@ class CustomValidator {
7774
7783
 
7775
7784
  class AppBaseComponent {
7776
7785
  constructor(injector) {
7777
- this.pageTitle = "";
7786
+ this.pageTitle = '';
7778
7787
  this.PageCount = 12;
7779
7788
  this.onSuccessAddHandler = (success) => {
7780
- this.utilityService.notifySuccessMessage(this.l("RecordAdded"), null, null, false);
7789
+ this.utilityService.notifySuccessMessage(this.l('RecordAdded'), null, null, false);
7781
7790
  };
7782
7791
  this.onSuccessEditHandler = (success) => {
7783
- this.utilityService.notifySuccessMessage(this.l("RecordUpdated"), null, null, false);
7792
+ this.utilityService.notifySuccessMessage(this.l('RecordUpdated'), null, null, false);
7784
7793
  };
7785
7794
  this.onSuccessDeleteHandler = (success) => {
7786
- this.utilityService.notifySuccessMessage(this.l("RecordDeleted"), null, null, false);
7795
+ this.utilityService.notifySuccessMessage(this.l('RecordDeleted'), null, null, false);
7787
7796
  };
7788
7797
  this.utilityService = injector.get(UtilityService);
7789
7798
  this.controlUtility = injector.get(ControlUtility);
@@ -7792,9 +7801,9 @@ class AppBaseComponent {
7792
7801
  this.modalService = injector.get(NgbModal);
7793
7802
  this.titleService = injector.get(Title);
7794
7803
  this.auhService = injector.get(AuthService);
7795
- this.exportLabel = this.utilityService.getResourceValue("Export");
7796
- this.filtersLabel = this.utilityService.getResourceValue("Filters");
7797
- this.addLabel = this.utilityService.getResourceValue("Add");
7804
+ this.exportLabel = this.utilityService.getResourceValue('Export');
7805
+ this.filtersLabel = this.utilityService.getResourceValue('Filters');
7806
+ this.addLabel = this.utilityService.getResourceValue('Add');
7798
7807
  this.userName = this.auhService.name();
7799
7808
  this.isEN = this.utilityService.isCurrentLanguageEnglish();
7800
7809
  }
@@ -7808,7 +7817,7 @@ class AppBaseComponent {
7808
7817
  return this.configurationService.getConfigurationValue(key);
7809
7818
  }
7810
7819
  getLanguageModeValue() {
7811
- return this.configurationService.getConfigurationValue("LanguageMode");
7820
+ return this.configurationService.getConfigurationValue('LanguageMode');
7812
7821
  }
7813
7822
  stopBlockUI() {
7814
7823
  this.utilityService.stopBlockUI();
@@ -7818,13 +7827,23 @@ class AppBaseComponent {
7818
7827
  }
7819
7828
  openModal(modal, size) {
7820
7829
  if (size)
7821
- this.modalService.open(modal, { size: size, backdrop: 'static' });
7830
+ this.modalService.open(modal, {
7831
+ size: size,
7832
+ backdrop: 'static',
7833
+ keyboard: false,
7834
+ });
7822
7835
  else
7823
- this.modalService.open(modal, { backdrop: 'static' });
7836
+ this.modalService.open(modal, { backdrop: 'static', keyboard: false });
7824
7837
  }
7825
7838
  download(fileDTO, fileName) {
7826
7839
  /*let blob = new Blob([file]);*/
7827
- let file = new Blob([fileDTO], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
7840
+ let file = new Blob([fileDTO], {
7841
+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
7842
+ });
7843
+ saveAs(file, fileName);
7844
+ }
7845
+ downloadPDF(fileDTO, fileName) {
7846
+ let file = new Blob([fileDTO], { type: "application/pdf" });
7828
7847
  saveAs(file, fileName);
7829
7848
  }
7830
7849
  base64toBlob(base64Data, contentType) {
@@ -7846,7 +7865,9 @@ class AppBaseComponent {
7846
7865
  return new Blob(byteArrays, { type: contentType });
7847
7866
  }
7848
7867
  calculatePageTitle(title) {
7849
- return title ? title.substring(0, 100) + ` | ${this.l("ApplicationName")}` : `${this.l("ApplicationName")}`;
7868
+ return title
7869
+ ? title.substring(0, 100) + ` | ${this.l('ApplicationName')}`
7870
+ : `${this.l('ApplicationName')}`;
7850
7871
  }
7851
7872
  getPagingFiltersValues(form, filters) {
7852
7873
  let model = new Object();
@@ -7854,7 +7875,10 @@ class AppBaseComponent {
7854
7875
  let filterItem = filters[i];
7855
7876
  if (form.controls[filterItem.FormControlName].value == undefined)
7856
7877
  continue;
7857
- model[filterItem.ActionParameterName] = form.controls[filterItem.FormControlName].value == undefined ? '' : form.controls[filterItem.FormControlName].value;
7878
+ model[filterItem.ActionParameterName] =
7879
+ form.controls[filterItem.FormControlName].value == undefined
7880
+ ? ''
7881
+ : form.controls[filterItem.FormControlName].value;
7858
7882
  // params = params.append(filterItem.ActionParameterName, form.controls[filterItem.FormControlName].value == undefined ? '' : form.controls[filterItem.FormControlName].value);
7859
7883
  }
7860
7884
  return model;
@@ -7874,7 +7898,7 @@ class AppBaseComponent {
7874
7898
  selBox.select();
7875
7899
  document.execCommand('copy');
7876
7900
  document.body.removeChild(selBox);
7877
- this.utilityService.notifySuccessMessage(this.l("CopiedSuccessfully"));
7901
+ this.utilityService.notifySuccessMessage(this.l('CopiedSuccessfully'));
7878
7902
  }
7879
7903
  addRequiredRule(control, controlOptions) {
7880
7904
  this.controlUtility.addRequiredToControl(control, controlOptions);
@@ -7888,39 +7912,39 @@ class AppBaseComponent {
7888
7912
  let fromDate = form.controls[fromDateControl].value;
7889
7913
  let toDate = form.controls[toDateControl].value;
7890
7914
  if (fromDate && toDate && toDate <= fromDate)
7891
- return { 'customerError': true };
7915
+ return { customerError: true };
7892
7916
  return null;
7893
7917
  };
7894
7918
  validator.massage = this.l(validationMessageKey);
7895
7919
  return validator;
7896
7920
  }
7897
7921
  recalculatePageTitle() {
7898
- this.titleService.setTitle(this.calculatePageTitle(""));
7922
+ this.titleService.setTitle(this.calculatePageTitle(''));
7899
7923
  }
7900
7924
  isEnglish() {
7901
7925
  return this.utilityService.isCurrentLanguageEnglish();
7902
7926
  }
7903
7927
  calculateInitials(name) {
7904
- let language = localStorage.getItem("language");
7928
+ let language = localStorage.getItem('language');
7905
7929
  let currentUser = this.auhService.user.profile;
7906
7930
  console.log(currentUser);
7907
- let userName = language == "en" ? currentUser.given_nameEn : currentUser.given_nameAr;
7931
+ let userName = language == 'en' ? currentUser.given_nameEn : currentUser.given_nameAr;
7908
7932
  if (currentUser) {
7909
- let fullName = userName.split(" ");
7933
+ let fullName = userName.split(' ');
7910
7934
  let initials;
7911
7935
  if (fullName.length > 1) {
7912
7936
  if (this.isEN)
7913
7937
  initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
7914
7938
  else
7915
7939
  initials =
7916
- fullName.shift().charAt(0) + " " + fullName.pop().charAt(0);
7940
+ fullName.shift().charAt(0) + ' ' + fullName.pop().charAt(0);
7917
7941
  }
7918
7942
  else {
7919
7943
  initials = fullName.pop().charAt(0);
7920
7944
  }
7921
7945
  return initials.toUpperCase();
7922
7946
  }
7923
- return "";
7947
+ return '';
7924
7948
  }
7925
7949
  getCurrentUserInitials() {
7926
7950
  return this.calculateInitials(this.auhService.name());