@bnsights/bbsf-controls 1.0.43 → 1.0.44
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 +4 -0
- package/bnsights-bbsf-controls-1.0.44.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +17 -5
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Models/DropdownOptions.js +1 -1
- package/esm2015/lib/Shared/services/render-component-service.service.js +13 -2
- package/esm2015/lib/controls/DropdownList/DropdownList.component.js +4 -4
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +2 -2
- package/fesm2015/bnsights-bbsf-controls.js +16 -5
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Models/DropdownOptions.d.ts +1 -1
- package/lib/Shared/services/render-component-service.service.d.ts +1 -1
- package/lib/controls/DropdownList/DropdownList.component.d.ts +2 -2
- package/package.json +1 -1
- package/bnsights-bbsf-controls-1.0.43.tgz +0 -0
|
@@ -2544,9 +2544,9 @@
|
|
|
2544
2544
|
}
|
|
2545
2545
|
return this.controlUtility.getErrorValidationMassage(ErrorList, this.group, this.options);
|
|
2546
2546
|
};
|
|
2547
|
-
DropdownListComponent.prototype.onItemSelect = function (
|
|
2547
|
+
DropdownListComponent.prototype.onItemSelect = function () {
|
|
2548
2548
|
this.onChangeService.ChangeValue(this.options.Name);
|
|
2549
|
-
var originalValue =
|
|
2549
|
+
var originalValue = this.options.SelectedItems;
|
|
2550
2550
|
if (this.options.PatchFunction && this.options.PatchPath && this.group.get(this.options.Name).valid) {
|
|
2551
2551
|
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
2552
2552
|
}
|
|
@@ -2590,7 +2590,7 @@
|
|
|
2590
2590
|
{ type: i0.Component, args: [{
|
|
2591
2591
|
// tslint:disable-next-line: component-selector
|
|
2592
2592
|
selector: 'BBSF-DropdownList',
|
|
2593
|
-
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]=\"'No data found.'\" [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(
|
|
2593
|
+
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]=\"'No data found.'\" [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",
|
|
2594
2594
|
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"]
|
|
2595
2595
|
},] }
|
|
2596
2596
|
];
|
|
@@ -4545,7 +4545,7 @@
|
|
|
4545
4545
|
this.TagsFormControl.invalid;
|
|
4546
4546
|
}
|
|
4547
4547
|
}
|
|
4548
|
-
var originalValue = this.TagsFormControl.value;
|
|
4548
|
+
var originalValue = this.TagsFormControl.value.map(function (a) { return a.key; });
|
|
4549
4549
|
if (this.options.PatchFunction && this.options.PatchPath && this.TagsFormControl.valid) {
|
|
4550
4550
|
this.controlUtility.patchControlValue(originalValue, this.options.PatchFunction, this.options.PatchPath);
|
|
4551
4551
|
}
|
|
@@ -6432,11 +6432,23 @@
|
|
|
6432
6432
|
function RenderComponentService(componentFactoryResolver) {
|
|
6433
6433
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
6434
6434
|
}
|
|
6435
|
-
RenderComponentService.prototype.renderDynamicComponent = function (viewContainerRef, component, group, options) {
|
|
6435
|
+
RenderComponentService.prototype.renderDynamicComponent = function (viewContainerRef, component, group, options, size) {
|
|
6436
|
+
if (size === void 0) { size = 0; }
|
|
6436
6437
|
var factory = this.componentFactoryResolver.resolveComponentFactory(component);
|
|
6437
6438
|
var componentRef = viewContainerRef.createComponent(factory);
|
|
6438
6439
|
componentRef.instance.group = group;
|
|
6439
6440
|
componentRef.instance.options = options;
|
|
6441
|
+
if (size > 0) {
|
|
6442
|
+
var htmlElement = componentRef.hostView.rootNodes[0];
|
|
6443
|
+
// `element` is the element you want to wrap
|
|
6444
|
+
var parent = htmlElement.parentNode;
|
|
6445
|
+
var wrapper = document.createElement('div');
|
|
6446
|
+
wrapper.className = "col-md-" + size;
|
|
6447
|
+
// set the wrapper as child (instead of the element)
|
|
6448
|
+
parent.replaceChild(wrapper, htmlElement);
|
|
6449
|
+
// set element as child of wrapper
|
|
6450
|
+
wrapper.appendChild(htmlElement);
|
|
6451
|
+
}
|
|
6440
6452
|
};
|
|
6441
6453
|
return RenderComponentService;
|
|
6442
6454
|
}());
|