@bnsights/bbsf-controls 1.0.29 → 1.0.32

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.
@@ -4676,6 +4676,12 @@
4676
4676
  OnChange: [{ type: i0.Output }]
4677
4677
  };
4678
4678
 
4679
+ exports.LanguageValidation = void 0;
4680
+ (function (LanguageValidation) {
4681
+ LanguageValidation[LanguageValidation["English"] = 1] = "English";
4682
+ LanguageValidation[LanguageValidation["Arabic"] = 2] = "Arabic";
4683
+ })(exports.LanguageValidation || (exports.LanguageValidation = {}));
4684
+
4679
4685
  var TextboxComponent = /** @class */ (function () {
4680
4686
  // tslint:disable-next-line: max-line-length
4681
4687
  function TextboxComponent(controlUtility, controlContainer, TextControlHost, UtilityService, controlValidationService, globalSettings) {
@@ -4777,18 +4783,18 @@
4777
4783
  }
4778
4784
  break;
4779
4785
  }
4780
- // if (this.options.ForceDirection==ForceDirection.Arabic)
4781
- // {
4782
- // this.validationRules.push(Validators.compose([
4783
- // this.controlUtility.patternValidator(/[\u0621-\u064A]+/, { ArabicLetterOnly: this.ArabicLetterOnly }),
4784
- // ]));
4785
- // }
4786
- // else if (this.options.ForceDirection==ForceDirection.English)
4787
- // {
4788
- // this.validationRules.push(Validators.compose([
4789
- // this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
4790
- // ]));
4791
- // }
4786
+ if (this.options.LanguageValidation) {
4787
+ if (this.options.LanguageValidation == exports.LanguageValidation.Arabic) {
4788
+ this.validationRules.push(forms.Validators.compose([
4789
+ this.controlUtility.patternValidator(/^[^A-Za-z]*$/, { ArabicLetterOnly: this.ArabicLetterOnly }),
4790
+ ]));
4791
+ }
4792
+ else if (this.options.LanguageValidation == exports.LanguageValidation.English) {
4793
+ this.validationRules.push(forms.Validators.compose([
4794
+ this.controlUtility.patternValidator(/^[\x00-\x7F]*$/, { EnglishLetterOnly: this.EnglishLetterOnly }),
4795
+ ]));
4796
+ }
4797
+ }
4792
4798
  if (this.options.CustomValidation.length > 0) {
4793
4799
  var Validations = this.options.CustomValidation;
4794
4800
  for (var index = 0; index < Validations.length; index++) {
@@ -5969,6 +5975,8 @@
5969
5975
  this.CustomValidation = [];
5970
5976
  /** to set Direction of textbox if textbox is Arabic or English */
5971
5977
  this.ForceDirection = null;
5978
+ /** to set Language of textbox if textbox language is Arabic or English */
5979
+ this.LanguageValidation = null;
5972
5980
  /** Set Type of TextBox ("text","password","email","number") */
5973
5981
  this.Type = exports.InputType.Text;
5974
5982
  this.IconPosition = exports.IconPosition.left;
@@ -6039,6 +6047,7 @@
6039
6047
  Text.ViewType = _this.RepeaterField.ControlOptions.ViewType;
6040
6048
  Text.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
6041
6049
  Text.Type = exports.InputType.Text;
6050
+ Text.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
6042
6051
  if (_this.RepeaterField.ControlOptions.maxLength)
6043
6052
  Text.MaxLength = _this.RepeaterField.ControlOptions.maxLength;
6044
6053
  if (_this.RepeaterField.ControlOptions.minLength)
@@ -6053,6 +6062,7 @@
6053
6062
  Name.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
6054
6063
  Name.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
6055
6064
  Name.ViewType = _this.RepeaterField.ControlOptions.ViewType;
6065
+ Name.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
6056
6066
  Name.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
6057
6067
  if (_this.RepeaterField.ControlOptions.maxLength)
6058
6068
  Name.MaxLength = _this.RepeaterField.ControlOptions.maxLength;
@@ -6069,6 +6079,7 @@
6069
6079
  Email.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
6070
6080
  Email.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
6071
6081
  Email.ViewType = _this.RepeaterField.ControlOptions.ViewType;
6082
+ Email.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
6072
6083
  Email.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
6073
6084
  Email.Type = exports.InputType.Email;
6074
6085
  Email.Value = _this.value;
@@ -6081,6 +6092,7 @@
6081
6092
  Number.LabelKey = _this.RepeaterField.ControlOptions.LabelKey;
6082
6093
  Number.IsRequired = _this.RepeaterField.ControlOptions.IsRequired;
6083
6094
  Number.ViewType = _this.RepeaterField.ControlOptions.ViewType;
6095
+ Number.LanguageValidation = _this.RepeaterField.ControlOptions.LanguageValidation;
6084
6096
  Number.LabelDescription = _this.RepeaterField.ControlOptions.LabelDescription ? _this.RepeaterField.ControlOptions.LabelDescription : "";
6085
6097
  Number.Type = exports.InputType.Number;
6086
6098
  var rangeNumber = new RangeNumber();
@@ -6838,7 +6850,7 @@
6838
6850
  RepeaterTableComponent.decorators = [
6839
6851
  { type: i0.Component, args: [{
6840
6852
  selector: 'BBSF-repeater-table',
6841
- template: "<div class=\"b-control b-repeater-table\">\r\n <table class=\"{{options.RepeaterTableExtraClasses}}\">\r\n <thead>\r\n <tr class=\"{{options.RepeaterTableRowExtraClasses}}\">\r\n <th *ngFor=\"let item of options.RepeaterStructure\" class=\"min-w-150px\">{{item.HeaderTitle}}</th>\r\n <th>{{utilityService.getResourceValue(options.ActionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngFor=\"let RepeaterField of options.RepeaterStructure ; index as r\">\r\n <repeater-field-builder [RepeaterField]=\"RepeaterField\" [itemNumber]=\"i\" [itemsValue]=\"originalItems\"\r\n [controlNumber]=\"r\" [group]=\"repeaterGroup\"></repeater-field-builder>\r\n </td>\r\n <td>\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(i)\"\r\n [disabled]=\"(items.length ==options.MinRequiredItems&&options.IsRequired) ||(originalItems.length-1>=i)\"> <span\r\n [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <tr>\r\n <button class=\"{{options.AddButtonExtraClasses}}\" type=\"button\" (click)=\"addItem()\"><span\r\n [innerHTML]=\"options.AddButtonText\"></span></button>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n</div>"
6853
+ template: "<div class=\"b-control b-repeater-table\">\r\n <table class=\"{{options.RepeaterTableExtraClasses}}\">\r\n <thead>\r\n <tr class=\"{{options.RepeaterTableRowExtraClasses}}\">\r\n <th *ngFor=\"let item of options.RepeaterStructure\" class=\"min-w-150px\">{{item.HeaderTitle}}</th>\r\n <th>{{utilityService.getResourceValue(options.ActionLabelKey)}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of items ; index as i\">\r\n <td *ngFor=\"let RepeaterField of options.RepeaterStructure ; index as r\">\r\n <repeater-field-builder [RepeaterField]=\"RepeaterField\" [itemNumber]=\"i\"\r\n [itemsValue]=\"originalItems\" [controlNumber]=\"r\" [group]=\"repeaterGroup\">\r\n </repeater-field-builder>\r\n </td>\r\n <td class=\"d-flex align-items-center\">\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(i)\"\r\n [disabled]=\"(items.length ==options.MinRequiredItems&&options.IsRequired) ||(originalItems.length-1>=i)\">\r\n <span [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <tr>\r\n <td colspan=\"4\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12 d-grid gap-2\"> \r\n <button class=\"{{options.AddButtonExtraClasses}}\" type=\"button\" (click)=\"addItem()\"><span\r\n [innerHTML]=\"options.AddButtonText\"></span></button>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </tfoot>\r\n </table>\r\n</div>"
6842
6854
  },] }
6843
6855
  ];
6844
6856
  RepeaterTableComponent.ctorParameters = function () { return [