@bnsights/bbsf-controls 1.0.29 → 1.0.30
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 +3 -3
- package/bnsights-bbsf-controls-1.0.30.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +25 -13
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Enums/LanguageValidation.js +6 -0
- package/esm2015/lib/Shared/Models/TextBoxOptions.js +3 -1
- package/esm2015/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.js +5 -1
- package/esm2015/lib/controls/Repeater/repeater-table/repeater-table.component.js +2 -2
- package/esm2015/lib/controls/TextBox/TextBox.component.js +14 -13
- package/esm2015/public-api.js +2 -1
- package/fesm2015/bnsights-bbsf-controls.js +26 -14
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/LanguageValidation.d.ts +4 -0
- package/lib/Shared/Models/TextBoxOptions.d.ts +3 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/bnsights-bbsf-controls-1.0.29.tgz +0 -0
|
@@ -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
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
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
|
|
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>\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=\"3\">\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 [
|