@bnsights/bbsf-controls 1.0.57 → 1.0.59
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 +12 -0
- package/bnsights-bbsf-controls-1.0.58.tgz +0 -0
- package/bnsights-bbsf-controls-1.0.59.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +55 -27
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Models/ControlOptionsBase.js +3 -1
- package/esm2015/lib/Shared/Models/RepeaterField.js +1 -1
- package/esm2015/lib/Shared/Models/RepeaterOptions.js +3 -1
- package/esm2015/lib/Shared/components/ng-tag-input.js +5 -2
- package/esm2015/lib/controls/Repeater/repeater-field-builder/repeater-field-builder.component.js +3 -1
- package/esm2015/lib/controls/Repeater/repeater-table/repeater-table.component.js +7 -4
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +32 -16
- package/esm2015/lib/controls/TextBox/TextBox.component.js +2 -2
- package/fesm2015/bnsights-bbsf-controls.js +47 -19
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Models/ControlOptionsBase.d.ts +2 -0
- package/lib/Shared/Models/RepeaterField.d.ts +1 -0
- package/lib/Shared/Models/RepeaterOptions.d.ts +2 -0
- package/lib/controls/TagsInput/TagsInput.component.d.ts +6 -3
- package/package.json +1 -1
- package/bnsights-bbsf-controls-1.0.57.tgz +0 -0
|
@@ -4511,6 +4511,10 @@
|
|
|
4511
4511
|
}
|
|
4512
4512
|
}
|
|
4513
4513
|
};
|
|
4514
|
+
TagsInputComponent.prototype.ngOnDestroy = function () {
|
|
4515
|
+
if (this.changeValueSubscription)
|
|
4516
|
+
this.changeValueSubscription.unsubscribe();
|
|
4517
|
+
};
|
|
4514
4518
|
TagsInputComponent.prototype.ngOnInit = function () {
|
|
4515
4519
|
var _this = this;
|
|
4516
4520
|
this.controlValidationService.isCreatedBefor = false;
|
|
@@ -4556,6 +4560,17 @@
|
|
|
4556
4560
|
_this.group.markAllAsTouched();
|
|
4557
4561
|
_this.markAllAsTouched = true;
|
|
4558
4562
|
});
|
|
4563
|
+
//Check for changing in value
|
|
4564
|
+
this.changeValueSubscription = this.TagsFormControl.valueChanges.subscribe(function (c) {
|
|
4565
|
+
var _a;
|
|
4566
|
+
_this.tags = _this.TagsFormControl.value;
|
|
4567
|
+
_this.SelectedId = (_a = _this.tags) === null || _a === void 0 ? void 0 : _a.filter(function (item) { return item.id; }).map(function (item) { return item.id; });
|
|
4568
|
+
if (_this.tags == null) {
|
|
4569
|
+
_this.SearchKey.selected = "";
|
|
4570
|
+
_this.tags = [];
|
|
4571
|
+
_this.TagsFormControl.setValue([]);
|
|
4572
|
+
}
|
|
4573
|
+
});
|
|
4559
4574
|
};
|
|
4560
4575
|
TagsInputComponent.prototype.ngAfterViewInit = function () {
|
|
4561
4576
|
if (this.options.AttributeList != null) {
|
|
@@ -4595,19 +4610,8 @@
|
|
|
4595
4610
|
};
|
|
4596
4611
|
TagsInputComponent.prototype.AddTag = function (event, key) {
|
|
4597
4612
|
var _a, _b;
|
|
4598
|
-
//Check if input is charachter
|
|
4599
|
-
if (String.fromCharCode(event.keyCode).match(/(\w|\s)/g)) {
|
|
4600
|
-
if (this.IsNoMatch == true && this.options.AllowNewSelection == false && key.selected) {
|
|
4601
|
-
this.TagsFormControl.setErrors({ "errorMassage": this.options.NoResultText });
|
|
4602
|
-
this.TagsFormControl.markAsTouched();
|
|
4603
|
-
}
|
|
4604
|
-
else if (this.IsNoMatch == false && this.options.AllowNewSelection == false) {
|
|
4605
|
-
this.TagsFormControl.clearValidators();
|
|
4606
|
-
this.TagsFormControl.updateValueAndValidity();
|
|
4607
|
-
}
|
|
4608
|
-
}
|
|
4609
4613
|
//Check if input is enter press
|
|
4610
|
-
|
|
4614
|
+
if (this.IsNoMatch == true && event.key == "Enter" && this.options.AllowNewSelection && key.selected) {
|
|
4611
4615
|
if (!(this.tags.length >= this.options.MaxNumberTags)) {
|
|
4612
4616
|
this.tags.push({ name: key.selected });
|
|
4613
4617
|
this.group.get(this.options.Name).setValue(this.tags);
|
|
@@ -4621,6 +4625,17 @@
|
|
|
4621
4625
|
this.tags.pop();
|
|
4622
4626
|
}
|
|
4623
4627
|
}
|
|
4628
|
+
//Check if input is charachter
|
|
4629
|
+
else if (String.fromCharCode(event.keyCode).match(/(\w|\s)/g)) {
|
|
4630
|
+
if (this.IsNoMatch == true && this.options.AllowNewSelection == false && key.selected) {
|
|
4631
|
+
this.TagsFormControl.setErrors({ "errorMassage": this.options.NoResultText });
|
|
4632
|
+
this.TagsFormControl.markAsTouched();
|
|
4633
|
+
}
|
|
4634
|
+
else if (this.IsNoMatch == false && this.options.AllowNewSelection == false) {
|
|
4635
|
+
this.TagsFormControl.clearValidators();
|
|
4636
|
+
this.TagsFormControl.updateValueAndValidity();
|
|
4637
|
+
}
|
|
4638
|
+
}
|
|
4624
4639
|
//Remove unmatched error incase of deleting search value
|
|
4625
4640
|
else if (event.key === "Backspace" && ((_a = key.selected) === null || _a === void 0 ? void 0 : _a.length) <= 1 && this.TagsFormControl.hasError('errorMassage')) {
|
|
4626
4641
|
this.TagsFormControl.setErrors({ "errorMassage": null });
|
|
@@ -4663,7 +4678,7 @@
|
|
|
4663
4678
|
{ type: i0.Component, args: [{
|
|
4664
4679
|
// tslint:disable-next-line: component-selector
|
|
4665
4680
|
selector: 'BBSF-TagsInput',
|
|
4666
|
-
template: "<div class=\"b-control b-tags-input\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n <div class=\"form-group row\" [formGroup]=\"TagsFormGroup\">\r\n\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 <b-tags-input id=\"typeahead-http\" type=\"text\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" [disabled]=\"options.IsDisabled\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"tags\"\r\n [class.is-invalid]=\"TagsFormControl.invalid && TagsFormControl.touched\" placeholder=\"{{options.Placeholder}}\"\r\n id=\"{{options.Name}}\" (onTagsChanged)=\"onTagsChanged($event)\" [(ngModel)]=\"tags\"\r\n removeLastOnBackspace=\"{{options.RemoveLastOnBackspace}}\" (onNoOptionsMatch)=\"onNoOptionsMatch($event)\"\r\n [options]=\"searchFunctionFactory(SearchKey.selected)\" #SearchKey\r\n scrollableOptions=\"{{options.ScrollableOptions}}\" scrollableOptionsInView=\"{{options.MaxSearchResultsCount}}\"\r\n (keydown)=\"AddTag($event,SearchKey)\" [ViewMode]=\"options.TagInputMode\"\r\n maxTags=\"{{options.MaxNumberTags}}\" minLengthBeforeOptions=\"{{options.MinSearchLength}}\"\r\n [showDescription]=\"options.ShowDescription\" [defaultImageURL]=\"options.DefaultImgUrl\" name=\"tags\">\r\n </b-tags-input>\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(TagsFormControl.invalid && TagsFormControl.touched)\">\r\n {{getErrorValidation(TagsFormControl.errors|keyvalue)}}\r\n </div>\r\n\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()}}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n",
|
|
4681
|
+
template: "<div class=\"b-control b-tags-input\">\r\n <div class=\"form-group validate is-invalid\" [formGroup]=\"group\">\r\n <div class=\"form-group row\" [formGroup]=\"TagsFormGroup\">\r\n\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 <b-tags-input id=\"typeahead-http\" type=\"text\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" [disabled]=\"options.IsDisabled\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"tags\"\r\n [class.is-invalid]=\"TagsFormControl.invalid && TagsFormControl.touched\" placeholder=\"{{options.Placeholder}}\"\r\n id=\"{{options.Name}}\" (onTagsChanged)=\"onTagsChanged($event)\" [(ngModel)]=\"tags\" \r\n removeLastOnBackspace=\"{{options.RemoveLastOnBackspace}}\" (onNoOptionsMatch)=\"onNoOptionsMatch($event)\"\r\n [options]=\"searchFunctionFactory(SearchKey.selected)\" #SearchKey\r\n scrollableOptions=\"{{options.ScrollableOptions}}\" scrollableOptionsInView=\"{{options.MaxSearchResultsCount}}\"\r\n (keydown)=\"AddTag($event,SearchKey)\" [ViewMode]=\"options.TagInputMode\"\r\n maxTags=\"{{options.MaxNumberTags}}\" minLengthBeforeOptions=\"{{options.MinSearchLength}}\"\r\n [showDescription]=\"options.ShowDescription\" [defaultImageURL]=\"options.DefaultImgUrl\" name=\"tags\">\r\n </b-tags-input>\r\n\r\n <div class=\"text-danger Required-text\" *ngIf=\"(TagsFormControl.invalid && TagsFormControl.touched)\">\r\n {{getErrorValidation(TagsFormControl.errors|keyvalue)}}\r\n </div>\r\n\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()}}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n",
|
|
4667
4682
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4668
4683
|
},] }
|
|
4669
4684
|
];
|
|
@@ -4680,7 +4695,8 @@
|
|
|
4680
4695
|
TagsInputComponent.propDecorators = {
|
|
4681
4696
|
group: [{ type: i0.Input }],
|
|
4682
4697
|
options: [{ type: i0.Input }],
|
|
4683
|
-
OnChange: [{ type: i0.Output }]
|
|
4698
|
+
OnChange: [{ type: i0.Output }],
|
|
4699
|
+
SearchKey: [{ type: i0.ViewChild, args: ['SearchKey', { static: false },] }]
|
|
4684
4700
|
};
|
|
4685
4701
|
|
|
4686
4702
|
var PagingDTO = /** @class */ (function () {
|
|
@@ -5481,7 +5497,7 @@
|
|
|
5481
5497
|
TextboxComponent.decorators = [
|
|
5482
5498
|
{ type: i0.Component, args: [{
|
|
5483
5499
|
selector: 'BBSF-TextBox',
|
|
5484
|
-
template: "<div class=\"b-control b-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\" [ngClass]=\"(options.NoMargin==true)?'':'NoMargin'\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" *ngIf=\"!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)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern!=null&&MaskPattern!=''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input [mask]=\"MaskPattern\" placeHolderCharacter=\" \" [showMaskTyped]=\"true\" [validation]=\"true\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinput>\r\n <div class=\"input-group-append\">\r\n <span class=\"input-group-text\" *ngIf=\"options.EnableCopyToClipboard\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n\r\n </div>\r\n\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern==null||MaskPattern==''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n (focus)=\"onFocus(true)\" (focusout)=\"onFocus(false)\"\r\n
|
|
5500
|
+
template: "<div class=\"b-control b-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\" [ngClass]=\"(options.NoMargin==true)?'':'NoMargin'\">\r\n <label class=\"b-label col-form-label col-sm-12 \" [ngClass]=\"(options.ViewType==1)?'col-md-12':'col-md-3'\" *ngIf=\"!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)?'': ((options.HideLabel)?'col-md-12':'col-md-9')\">\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern!=null&&MaskPattern!=''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input [mask]=\"MaskPattern\" placeHolderCharacter=\" \" [showMaskTyped]=\"true\" [validation]=\"true\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n aria-describedby=\"email-error\" aria-invalid=\"true\" formControlName=\"{{options.Name}}\"\r\n type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\" [readonly]=\"options.IsReadonly\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\"\r\n #userinput>\r\n <div class=\"input-group-append\">\r\n <span class=\"input-group-text\" *ngIf=\"options.EnableCopyToClipboard\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n\r\n </div>\r\n\r\n <div class=\"input-group align-items-center\" *ngIf=\"MaskPattern==null||MaskPattern==''\">\r\n <div class=\"svg svg-icon-grey\" [ngClass]=\"(options.IconPosition==1)?'left-icon':'right-icon'\" *ngIf=\"options.Icon!=null\">\r\n <span [inlineSVG]=\"options.Icon\"></span>\r\n </div>\r\n <input class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n (focus)=\"onFocus(true)\" (focusout)=\"onFocus(false)\"\r\n maxlength=\"{{options.MaxLength}}\" minlength=\"{{options.MinLength}}\"\r\n aria-describedby=\"email-error\"\r\n aria-invalid=\"true\" formControlName=\"{{options.Name}}\" type=\"{{getInputType(options.Type)}}\"\r\n [class.is-invalid]=\"TextBoxFormControl.invalid && TextBoxFormControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" autocomplete=\"{{options.AutoComplete}}\"\r\n (change)=\"trimControlValue()\" (keyup)=\"onTextChange()\"\r\n (keydown)=\"WordCountArray>options.MaxWordCount&&$event.keyCode !=8?$event.preventDefault():null\" [readonly]=\"options.IsReadonly\"\r\n #userinput>\r\n <div class=\"input-group-append\" *ngIf=\"options.EnableCopyToClipboard\">\r\n <span class=\"input-group-text\" (click)=\"copyInputMessage(userinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>\r\n </div>\r\n <div class=\"text-muted font-weight-500 word-count float-end\" *ngIf=\"options.MaxWordCount>0&&IsShowWordCount\">{{WordCount}}/{{options.MaxWordCount}} Words</div>\r\n </div>\r\n <div class=\"text-danger Required-text\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n *ngIf=\"(TextBoxFormControl.invalid && TextBoxFormControl.touched)\">\r\n {{getErrorValidation(TextBoxFormControl.errors|keyvalue)}}\r\n </div>\r\n <div *ngIf=\"showCharsLimitMsg\">\r\n <span class=\"badge b-character-warning float-end\" [ngClass]=\"{'badge-light-warning': charsLimitMsgClass === 'warning', 'badge-light-danger' : charsLimitMsgClass === 'danger' }\">\r\n {{maxLimitWarningMsg}}\r\n </span>\r\n </div>\r\n <div class=\"control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
5485
5501
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
5486
5502
|
},] }
|
|
5487
5503
|
];
|
|
@@ -6438,6 +6454,8 @@
|
|
|
6438
6454
|
this.ViewType = null;
|
|
6439
6455
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
|
|
6440
6456
|
this.CustomValidation = [];
|
|
6457
|
+
/** Sets an attribute readonly */
|
|
6458
|
+
this.IsReadonly = false;
|
|
6441
6459
|
}
|
|
6442
6460
|
return ControlOptionsBase;
|
|
6443
6461
|
}());
|
|
@@ -6678,6 +6696,7 @@
|
|
|
6678
6696
|
if (_this.RepeaterField.ControlOptions.minLength)
|
|
6679
6697
|
Text.MinLength = _this.RepeaterField.ControlOptions.minLength;
|
|
6680
6698
|
Text.Value = _this.value;
|
|
6699
|
+
Text.IsReadonly = _this.RepeaterField.ControlOptions.IsReadonly;
|
|
6681
6700
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextboxComponent, _this.group, Text);
|
|
6682
6701
|
break;
|
|
6683
6702
|
case exports.DataType.Name:
|
|
@@ -6725,6 +6744,7 @@
|
|
|
6725
6744
|
rangeNumber.From = _this.RepeaterField.ControlOptions.minLength;
|
|
6726
6745
|
Number.NumberRange = rangeNumber;
|
|
6727
6746
|
Number.Value = _this.value;
|
|
6747
|
+
Number.IsReadonly = _this.RepeaterField.ControlOptions.IsReadonly;
|
|
6728
6748
|
_this.renderComponentService.renderDynamicComponent(_this.Item, TextboxComponent, _this.group, Number);
|
|
6729
6749
|
break;
|
|
6730
6750
|
///DateTime
|
|
@@ -7389,7 +7409,7 @@
|
|
|
7389
7409
|
if (this.options.RepeaterValue.length > 0) {
|
|
7390
7410
|
this.originalItems = this.options.RepeaterValue;
|
|
7391
7411
|
for (var index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
7392
|
-
this.items.push(index
|
|
7412
|
+
this.items.push(index);
|
|
7393
7413
|
}
|
|
7394
7414
|
}
|
|
7395
7415
|
else
|
|
@@ -7468,14 +7488,17 @@
|
|
|
7468
7488
|
this.items = this.items.filter(function (res) { return res != _this.items[Index]; });
|
|
7469
7489
|
};
|
|
7470
7490
|
RepeaterTableComponent.prototype.addItem = function () {
|
|
7471
|
-
|
|
7491
|
+
if (this.items.length == 0)
|
|
7492
|
+
this.items.push(this.items.length);
|
|
7493
|
+
else
|
|
7494
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
7472
7495
|
};
|
|
7473
7496
|
return RepeaterTableComponent;
|
|
7474
7497
|
}());
|
|
7475
7498
|
RepeaterTableComponent.decorators = [
|
|
7476
7499
|
{ type: i0.Component, args: [{
|
|
7477
7500
|
selector: 'BBSF-repeater-table',
|
|
7478
|
-
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)
|
|
7501
|
+
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\" [hidden]=\"item.IsHiddenInput\" class=\"min-w-150px\">{{item.HeaderTitle}}</th>\r\n <th *ngIf=\"!options.DisableDeleteButton\">{{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\" [hidden]=\"RepeaterField.IsHiddenInput\">\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\" *ngIf=\"!options.DisableDeleteButton\">\r\n <button class=\"{{options.DeleteButtonExtraClasses}}\" type=\"button\" (click)=\"deleteItem(i)\"\r\n [disabled]=\"(items.length ==options.MinRequiredItems&&options.IsRequired)\">\r\n <span [innerHTML]=\"options.DeleteButtonText\"></span></button>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <!-- ||(originalItems.length-1>=i -->\r\n <tfoot *ngIf=\"!options.DisableAddButton\">\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>\r\n"
|
|
7479
7502
|
},] }
|
|
7480
7503
|
];
|
|
7481
7504
|
RepeaterTableComponent.ctorParameters = function () { return [
|
|
@@ -7580,7 +7603,8 @@
|
|
|
7580
7603
|
}
|
|
7581
7604
|
};
|
|
7582
7605
|
BTagsInputComponent.prototype.removeLastTag = function (tagInput) {
|
|
7583
|
-
|
|
7606
|
+
var _a;
|
|
7607
|
+
if (!this.removeLastOnBackspace || !((_a = this.tags) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
7584
7608
|
return;
|
|
7585
7609
|
}
|
|
7586
7610
|
if (tagInput.value === '') {
|
|
@@ -7588,16 +7612,18 @@
|
|
|
7588
7612
|
}
|
|
7589
7613
|
};
|
|
7590
7614
|
BTagsInputComponent.prototype.addTag = function (tagInput) {
|
|
7591
|
-
var
|
|
7615
|
+
var _b;
|
|
7592
7616
|
if (tagInput.value.trim() !== '') {
|
|
7593
|
-
var tag = (
|
|
7594
|
-
|
|
7595
|
-
|
|
7617
|
+
var tag = (_b = {},
|
|
7618
|
+
_b[this.displayField] = tagInput.value,
|
|
7619
|
+
_b);
|
|
7596
7620
|
this.addPredefinedTag(tag);
|
|
7597
7621
|
}
|
|
7598
7622
|
tagInput.value = '';
|
|
7599
7623
|
};
|
|
7600
7624
|
BTagsInputComponent.prototype.addPredefinedTag = function (tag) {
|
|
7625
|
+
if (this.tags == null)
|
|
7626
|
+
this.tags = [];
|
|
7601
7627
|
if (!this.maximumOfTagsReached()) {
|
|
7602
7628
|
this.tags.push(tag);
|
|
7603
7629
|
this.tagsChanged('add', tag);
|
|
@@ -7620,11 +7646,11 @@
|
|
|
7620
7646
|
return this.canDeleteTags;
|
|
7621
7647
|
};
|
|
7622
7648
|
BTagsInputComponent.prototype.typeaheadOnSelect = function (e) {
|
|
7623
|
-
var
|
|
7649
|
+
var _b;
|
|
7624
7650
|
if (typeof e.item === 'string') {
|
|
7625
|
-
this.addPredefinedTag((
|
|
7626
|
-
|
|
7627
|
-
|
|
7651
|
+
this.addPredefinedTag((_b = {},
|
|
7652
|
+
_b[this.displayField] = e.value,
|
|
7653
|
+
_b));
|
|
7628
7654
|
}
|
|
7629
7655
|
else {
|
|
7630
7656
|
this.addPredefinedTag(e.item);
|
|
@@ -8242,6 +8268,8 @@
|
|
|
8242
8268
|
this.DeleteButtonText = "Delete";
|
|
8243
8269
|
this.RepeaterValue = [];
|
|
8244
8270
|
this.RepeaterStructure = [];
|
|
8271
|
+
this.DisableAddButton = false;
|
|
8272
|
+
this.DisableDeleteButton = false;
|
|
8245
8273
|
}
|
|
8246
8274
|
return RepeaterOptions;
|
|
8247
8275
|
}());
|