@bnsights/bbsf-controls 1.0.53 → 1.0.56

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.
@@ -706,6 +706,10 @@
706
706
  _this.rangeFromLabel = _this.utilityService.getResourceValue("From");
707
707
  /** A label for the range 'to' in picker info */
708
708
  _this.rangeToLabel = _this.utilityService.getResourceValue("To");
709
+ /** A label for the cancel button */
710
+ _this.cancelBtnLabel = _this.utilityService.getResourceValue("Cancel");
711
+ /** A label for the set button */
712
+ _this.setBtnLabel = _this.utilityService.getResourceValue("Set");
709
713
  return _this;
710
714
  }
711
715
  return DefaultIntl;
@@ -1437,10 +1441,16 @@
1437
1441
  this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
1438
1442
  if (!this.options.MaxLength)
1439
1443
  this.options.MaxLength = this.globalSettings.MaxLengthTextBox;
1440
- if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1441
- this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1442
- if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
1443
- this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
1444
+ if (this.options.LabelKey != null && this.options.LabelKey != "") {
1445
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InArabic");
1446
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InEnglish");
1447
+ }
1448
+ else {
1449
+ if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
1450
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
1451
+ if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
1452
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
1453
+ }
1444
1454
  if (this.options.CustomValidation.length > 0) {
1445
1455
  Validations = this.options.CustomValidation;
1446
1456
  for (index = 0; index < Validations.length; index++) {
@@ -2038,10 +2048,16 @@
2038
2048
  this.options.MultiControlPlacementType = this.globalSettings.MultiControlPlacementType;
2039
2049
  if (!this.options.MaxLength)
2040
2050
  this.options.MaxLength = this.globalSettings.MaxLengthTextArea;
2041
- if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
2042
- this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
2043
- if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
2044
- this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
2051
+ if (this.options.LabelKey != null && this.options.LabelKey != "") {
2052
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InArabic");
2053
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InEnglish");
2054
+ }
2055
+ else {
2056
+ if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
2057
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
2058
+ if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
2059
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
2060
+ }
2045
2061
  this.MultiLanguageTextAreagroup = new forms.FormGroup({});
2046
2062
  this.MultiLanguageTextAreagroup.addControl("Arabic", new forms.FormControl(''));
2047
2063
  this.MultiLanguageTextAreagroup.addControl("English", new forms.FormControl(''));
@@ -2634,7 +2650,7 @@
2634
2650
  { type: i0.Component, args: [{
2635
2651
  // tslint:disable-next-line: component-selector
2636
2652
  selector: 'BBSF-DropdownList',
2637
- 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",
2653
+ 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",
2638
2654
  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"]
2639
2655
  },] }
2640
2656
  ];
@@ -3289,10 +3305,16 @@
3289
3305
  this.EnglishValidationRules.push(forms.Validators.maxLength(this.options.MaxLength));
3290
3306
  this.ArabicValidationRules.push(forms.Validators.maxLength(this.options.MaxLength));
3291
3307
  }
3292
- if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
3293
- this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
3294
- if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
3295
- this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
3308
+ if (this.options.LabelKey != null && this.options.LabelKey != "") {
3309
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InArabic");
3310
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.LabelKey) + " " + this.UtilityService.getResourceValue("InEnglish");
3311
+ }
3312
+ else {
3313
+ if (this.options.ArabicLabelKey != null && this.options.ArabicLabelKey != "")
3314
+ this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.ArabicLabelKey);
3315
+ if (this.options.EnglishLabelKey != null && this.options.EnglishLabelKey != "")
3316
+ this.options.EnglishLabelValue = this.UtilityService.getResourceValue(this.options.EnglishLabelKey);
3317
+ }
3296
3318
  this.showInputUsingLanguageMode();
3297
3319
  this.ArabicValidationRules.push(forms.Validators.compose([
3298
3320
  this.controlUtility.patternValidator(/^[\u0621-\u064A\u0660-\u0669 ]+$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
@@ -6325,7 +6347,7 @@
6325
6347
  this.items = this.items.filter(function (res) { return res != _this.items[Index]; });
6326
6348
  };
6327
6349
  RepeaterComponent.prototype.addItem = function () {
6328
- this.items.push(this.items[this.items.length - 1] + 1);
6350
+ this.items.push(this.items.length);
6329
6351
  };
6330
6352
  RepeaterComponent.prototype.ngAfterViewInit = function () {
6331
6353
  var templateRefs = this._templates["_results"].map(function (item) { return item["template"]; });
@@ -8505,7 +8527,7 @@
8505
8527
  exports.FileType = void 0;
8506
8528
  (function (FileType) {
8507
8529
  FileType["PDF"] = "application/pdf";
8508
- FileType["Word"] = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document ";
8530
+ FileType["Word"] = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document";
8509
8531
  FileType["Excel"] = "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
8510
8532
  FileType["ImageTypes"] = "image/png,image/bmp,image/jpeg";
8511
8533
  FileType["PNG"] = "image/png";