@bnsights/bbsf-controls 1.0.53 → 1.0.54

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.
@@ -399,6 +399,10 @@ class DefaultIntl extends OwlDateTimeIntl {
399
399
  this.rangeFromLabel = this.utilityService.getResourceValue("From");
400
400
  /** A label for the range 'to' in picker info */
401
401
  this.rangeToLabel = this.utilityService.getResourceValue("To");
402
+ /** A label for the cancel button */
403
+ this.cancelBtnLabel = this.utilityService.getResourceValue("Cancel");
404
+ /** A label for the set button */
405
+ this.setBtnLabel = this.utilityService.getResourceValue("Set");
402
406
  }
403
407
  }
404
408
  DefaultIntl.decorators = [
@@ -1097,10 +1101,16 @@ class MultiLingualTextBoxComponent {
1097
1101
  this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
1098
1102
  if (!this.options.MaxLength)
1099
1103
  this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
1100
- if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1101
- this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1102
- if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
1103
- this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
1104
+ if (this.options.LabelKey != null && this.options.LabelKey != "") {
1105
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InArabic");
1106
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InEnglish");
1107
+ }
1108
+ else {
1109
+ if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1110
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1111
+ if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
1112
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
1113
+ }
1104
1114
  if (this.options.CustomValidation.length > 0) {
1105
1115
  let Validations = this.options.CustomValidation;
1106
1116
  for (let index = 0; index < Validations.length; index++) {
@@ -1681,10 +1691,16 @@ class MultiLingualTextAreaComponent {
1681
1691
  this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
1682
1692
  if (!this.options.MaxLength)
1683
1693
  this.options.MaxLength = this.globalSettings.MaxLengthTextArea;
1684
- if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1685
- this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1686
- if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
1687
- this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
1694
+ if (this.options.LabelKey != null && this.options.LabelKey != "") {
1695
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InArabic");
1696
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InEnglish");
1697
+ }
1698
+ else {
1699
+ if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1700
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1701
+ if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
1702
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
1703
+ }
1688
1704
  this.MultiLanguageTextAreagroup = new FormGroup({});
1689
1705
  this.MultiLanguageTextAreagroup.addControl("Arabic", new FormControl(''));
1690
1706
  this.MultiLanguageTextAreagroup.addControl("English", new FormControl(''));
@@ -2267,7 +2283,7 @@ DropdownListComponent.decorators = [
2267
2283
  { type: Component, args: [{
2268
2284
  // tslint:disable-next-line: component-selector
2269
2285
  selector: 'BBSF-DropdownList',
2270
- 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]=\"options.NotFoundText\" [maxSelectedItems]=\"options.LimitSelection\"\r\n [searchable]=\"options.AllowSearchFilter\" [multiple]=\"!options.SingleSelection\" [readonly]=\"options.IsDisabled\"\r\n [clearable]=\"true\" placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n [selectableGroup]=\"true\" [selectableGroupAsModel]=\"false\" formControlName=\"{{options.Name}}\"\r\n [(ngModel)]=\"options.SelectedItems\" (change)=\"onItemSelect()\" (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()\" [(ngModel)]=\"options.SelectedItems\" [disabled]=\"options.IsDisabled\" formControlName=\"{{options.Name}}\">\r\n <option value=\"\" disabled>--{{UtilityService.getResourceValue(\"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>\r\n",
2286
+ 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]=\"options.NotFoundText\" [maxSelectedItems]=\"options.LimitSelection\"\r\n [searchable]=\"options.AllowSearchFilter\" [multiple]=\"!options.SingleSelection\" [readonly]=\"options.IsDisabled\"\r\n [clearable]=\"true\" placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\"\r\n [selectableGroup]=\"true\" [selectableGroupAsModel]=\"false\" formControlName=\"{{options.Name}}\"\r\n [(ngModel)]=\"options.SelectedItems\" (change)=\"onItemSelect()\" (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 <div title=\"{{item.disabled ? options.DisabledItemsTooltipValue : ''}}\">\r\n <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-select>\r\n\r\n <select *ngIf=\"options.DisableBootstrapSelect\" class=\"form-control bnsights-control\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" (change)=\"onItemSelect()\" [(ngModel)]=\"options.SelectedItems\" [disabled]=\"options.IsDisabled\" formControlName=\"{{options.Name}}\">\r\n <option value=\"\" disabled>--{{UtilityService.getResourceValue(\"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>\r\n",
2271
2287
  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"]
2272
2288
  },] }
2273
2289
  ];
@@ -2906,10 +2922,16 @@ class MultiLingualHtmlEditorComponent {
2906
2922
  this.EnglishValidationRules.push(Validators.maxLength(this.options.MaxLength));
2907
2923
  this.ArabicValidationRules.push(Validators.maxLength(this.options.MaxLength));
2908
2924
  }
2909
- if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
2910
- this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
2911
- if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
2912
- this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
2925
+ if (this.options.LabelKey != null && this.options.LabelKey != "") {
2926
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InArabic");
2927
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InEnglish");
2928
+ }
2929
+ else {
2930
+ if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
2931
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
2932
+ if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
2933
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
2934
+ }
2913
2935
  this.showInputUsingLanguageMode();
2914
2936
  this.ArabicValidationRules.push(Validators.compose([
2915
2937
  this.controlUtility.patternValidator(/^[\u0621-\u064A\u0660-\u0669 ]+$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
@@ -5852,7 +5874,7 @@ class RepeaterComponent {
5852
5874
  this.items = this.items.filter((res) => res != this.items[Index]);
5853
5875
  }
5854
5876
  addItem() {
5855
- this.items.push(this.items[this.items.length - 1] + 1);
5877
+ this.items.push(this.items.length);
5856
5878
  }
5857
5879
  ngAfterViewInit() {
5858
5880
  let templateRefs = this._templates["_results"].map((item) => item["template"]);
@@ -8064,7 +8086,7 @@ var Style;
8064
8086
  var FileType;
8065
8087
  (function (FileType) {
8066
8088
  FileType["PDF"] = "application/pdf";
8067
- FileType["Word"] = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document ";
8089
+ FileType["Word"] = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document";
8068
8090
  FileType["Excel"] = "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
8069
8091
  FileType["ImageTypes"] = "image/png,image/bmp,image/jpeg";
8070
8092
  FileType["PNG"] = "image/png";