@bnsights/bbsf-controls 1.0.52 → 1.0.55
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 +16 -0
- package/bnsights-bbsf-controls-1.0.55.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +46 -16
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Enums/FileType.js +2 -2
- package/esm2015/lib/Shared/Models/DropdownOptions.js +1 -1
- package/esm2015/lib/Shared/Models/MapAutocompleteDTO.js +4 -1
- package/esm2015/lib/Shared/Models/MultilingualControlOptionsBase.js +1 -1
- package/esm2015/lib/Shared/default_intl.js +5 -1
- package/esm2015/lib/controls/DropdownList/DropdownList.component.js +2 -2
- package/esm2015/lib/controls/MapAutoComplete/MapAutoComplete.component.js +9 -2
- package/esm2015/lib/controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component.js +11 -5
- package/esm2015/lib/controls/MultiLingualTextArea/MultiLingualTextArea.component.js +11 -5
- package/esm2015/lib/controls/MultiLingualTextBox/MultiLingualTextBox.component.js +11 -5
- package/esm2015/lib/controls/Repeater/repeater/repeater.component.js +2 -2
- package/fesm2015/bnsights-bbsf-controls.js +48 -16
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/FileType.d.ts +1 -1
- package/lib/Shared/Models/DropdownOptions.d.ts +2 -0
- package/lib/Shared/Models/MultilingualControlOptionsBase.d.ts +2 -0
- package/lib/Shared/default_intl.d.ts +4 -0
- package/package.json +2 -2
- package/src/lib/assets/Style.css +11 -1
- package/bnsights-bbsf-controls-1.0.52.tgz +0 -0
|
@@ -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.
|
|
1441
|
-
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.
|
|
1442
|
-
|
|
1443
|
-
|
|
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.
|
|
2042
|
-
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.
|
|
2043
|
-
|
|
2044
|
-
|
|
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
|
|
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.
|
|
3293
|
-
this.options.ArabicLabelValue = this.UtilityService.getResourceValue(this.options.
|
|
3294
|
-
|
|
3295
|
-
|
|
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 }),
|
|
@@ -5464,6 +5486,7 @@
|
|
|
5464
5486
|
|
|
5465
5487
|
var MapAutocompleteDTO = /** @class */ (function () {
|
|
5466
5488
|
function MapAutocompleteDTO() {
|
|
5489
|
+
this.Text = null;
|
|
5467
5490
|
}
|
|
5468
5491
|
return MapAutocompleteDTO;
|
|
5469
5492
|
}());
|
|
@@ -5746,6 +5769,13 @@
|
|
|
5746
5769
|
}
|
|
5747
5770
|
};
|
|
5748
5771
|
MapAutoCompleteComponent.prototype.GermanAddressMapped = function (result) {
|
|
5772
|
+
if (result.type) {
|
|
5773
|
+
if (result.target.value == "") {
|
|
5774
|
+
this.MapAutoCompleteFormControl.setValue(result);
|
|
5775
|
+
this.group.controls[this.options.Name].setValue(result);
|
|
5776
|
+
}
|
|
5777
|
+
return;
|
|
5778
|
+
}
|
|
5749
5779
|
this.MapAutoCompleteModel == new MapAutocompleteDTO();
|
|
5750
5780
|
this.MapAutoCompleteModel.Text = result.displayAddress;
|
|
5751
5781
|
this.MapAutoCompleteModel.PlaceID = result.placeID;
|
|
@@ -5762,7 +5792,7 @@
|
|
|
5762
5792
|
MapAutoCompleteComponent.decorators = [
|
|
5763
5793
|
{ type: i0.Component, args: [{
|
|
5764
5794
|
selector: 'BBSF-MapAutoComplete',
|
|
5765
|
-
template: "<div class=\"b-control b-map-auto-complete\">\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'\"
|
|
5795
|
+
template: "<div class=\"b-control b-map-auto-complete\">\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 <div class=\"col-sm-12\" [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\">\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \" [value]=\"MapAutoCompleteModel.Text\"\r\n [address]=\"MapAutoCompleteModel.Text\" value=\"{{MapAutoCompleteModel.Text}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (keyup)=\"GermanAddressMapped($event)\"\r\n matGoogleMapsAutocomplete #search (onAutocompleteSelected)=\"AutocompleteSelected($event)\"\r\n (onLocationSelected)=\"LocationSelected($event)\" (onGermanAddressMapped)=\"GermanAddressMapped($event)\" />\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(MapAutoCompleteFormControl.invalid && MapAutoCompleteFormControl.touched)\">\r\n {{getErrorValidation(MapAutoCompleteFormControl.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 text-dark\">{{options.LabelDescription}}</div>\r\n </div>\r\n\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">\r\n {{resetError()}}</div>\r\n\r\n </div>\r\n </div>\r\n</div>",
|
|
5766
5796
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
5767
5797
|
},] }
|
|
5768
5798
|
];
|
|
@@ -6317,7 +6347,7 @@
|
|
|
6317
6347
|
this.items = this.items.filter(function (res) { return res != _this.items[Index]; });
|
|
6318
6348
|
};
|
|
6319
6349
|
RepeaterComponent.prototype.addItem = function () {
|
|
6320
|
-
this.items.push(this.items
|
|
6350
|
+
this.items.push(this.items.length);
|
|
6321
6351
|
};
|
|
6322
6352
|
RepeaterComponent.prototype.ngAfterViewInit = function () {
|
|
6323
6353
|
var templateRefs = this._templates["_results"].map(function (item) { return item["template"]; });
|
|
@@ -8497,7 +8527,7 @@
|
|
|
8497
8527
|
exports.FileType = void 0;
|
|
8498
8528
|
(function (FileType) {
|
|
8499
8529
|
FileType["PDF"] = "application/pdf";
|
|
8500
|
-
FileType["Word"] = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
|
8530
|
+
FileType["Word"] = "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
8501
8531
|
FileType["Excel"] = "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
8502
8532
|
FileType["ImageTypes"] = "image/png,image/bmp,image/jpeg";
|
|
8503
8533
|
FileType["PNG"] = "image/png";
|