@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
|
@@ -4071,6 +4071,10 @@ class TagsInputComponent {
|
|
|
4071
4071
|
}
|
|
4072
4072
|
}
|
|
4073
4073
|
}
|
|
4074
|
+
ngOnDestroy() {
|
|
4075
|
+
if (this.changeValueSubscription)
|
|
4076
|
+
this.changeValueSubscription.unsubscribe();
|
|
4077
|
+
}
|
|
4074
4078
|
ngOnInit() {
|
|
4075
4079
|
this.controlValidationService.isCreatedBefor = false;
|
|
4076
4080
|
this.options.DatasourceItemText = this.options.DatasourceItemText.toLowerCase();
|
|
@@ -4115,6 +4119,17 @@ class TagsInputComponent {
|
|
|
4115
4119
|
this.group.markAllAsTouched();
|
|
4116
4120
|
this.markAllAsTouched = true;
|
|
4117
4121
|
});
|
|
4122
|
+
//Check for changing in value
|
|
4123
|
+
this.changeValueSubscription = this.TagsFormControl.valueChanges.subscribe(c => {
|
|
4124
|
+
var _a;
|
|
4125
|
+
this.tags = this.TagsFormControl.value;
|
|
4126
|
+
this.SelectedId = (_a = this.tags) === null || _a === void 0 ? void 0 : _a.filter(item => item.id).map(item => item.id);
|
|
4127
|
+
if (this.tags == null) {
|
|
4128
|
+
this.SearchKey.selected = "";
|
|
4129
|
+
this.tags = [];
|
|
4130
|
+
this.TagsFormControl.setValue([]);
|
|
4131
|
+
}
|
|
4132
|
+
});
|
|
4118
4133
|
}
|
|
4119
4134
|
ngAfterViewInit() {
|
|
4120
4135
|
if (this.options.AttributeList != null) {
|
|
@@ -4154,19 +4169,8 @@ class TagsInputComponent {
|
|
|
4154
4169
|
}
|
|
4155
4170
|
AddTag(event, key) {
|
|
4156
4171
|
var _a, _b;
|
|
4157
|
-
//Check if input is charachter
|
|
4158
|
-
if (String.fromCharCode(event.keyCode).match(/(\w|\s)/g)) {
|
|
4159
|
-
if (this.IsNoMatch == true && this.options.AllowNewSelection == false && key.selected) {
|
|
4160
|
-
this.TagsFormControl.setErrors({ "errorMassage": this.options.NoResultText });
|
|
4161
|
-
this.TagsFormControl.markAsTouched();
|
|
4162
|
-
}
|
|
4163
|
-
else if (this.IsNoMatch == false && this.options.AllowNewSelection == false) {
|
|
4164
|
-
this.TagsFormControl.clearValidators();
|
|
4165
|
-
this.TagsFormControl.updateValueAndValidity();
|
|
4166
|
-
}
|
|
4167
|
-
}
|
|
4168
4172
|
//Check if input is enter press
|
|
4169
|
-
|
|
4173
|
+
if (this.IsNoMatch == true && event.key == "Enter" && this.options.AllowNewSelection && key.selected) {
|
|
4170
4174
|
if (!(this.tags.length >= this.options.MaxNumberTags)) {
|
|
4171
4175
|
this.tags.push({ name: key.selected });
|
|
4172
4176
|
this.group.get(this.options.Name).setValue(this.tags);
|
|
@@ -4180,6 +4184,17 @@ class TagsInputComponent {
|
|
|
4180
4184
|
this.tags.pop();
|
|
4181
4185
|
}
|
|
4182
4186
|
}
|
|
4187
|
+
//Check if input is charachter
|
|
4188
|
+
else if (String.fromCharCode(event.keyCode).match(/(\w|\s)/g)) {
|
|
4189
|
+
if (this.IsNoMatch == true && this.options.AllowNewSelection == false && key.selected) {
|
|
4190
|
+
this.TagsFormControl.setErrors({ "errorMassage": this.options.NoResultText });
|
|
4191
|
+
this.TagsFormControl.markAsTouched();
|
|
4192
|
+
}
|
|
4193
|
+
else if (this.IsNoMatch == false && this.options.AllowNewSelection == false) {
|
|
4194
|
+
this.TagsFormControl.clearValidators();
|
|
4195
|
+
this.TagsFormControl.updateValueAndValidity();
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4183
4198
|
//Remove unmatched error incase of deleting search value
|
|
4184
4199
|
else if (event.key === "Backspace" && ((_a = key.selected) === null || _a === void 0 ? void 0 : _a.length) <= 1 && this.TagsFormControl.hasError('errorMassage')) {
|
|
4185
4200
|
this.TagsFormControl.setErrors({ "errorMassage": null });
|
|
@@ -4221,7 +4236,7 @@ TagsInputComponent.decorators = [
|
|
|
4221
4236
|
{ type: Component, args: [{
|
|
4222
4237
|
// tslint:disable-next-line: component-selector
|
|
4223
4238
|
selector: 'BBSF-TagsInput',
|
|
4224
|
-
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",
|
|
4239
|
+
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",
|
|
4225
4240
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4226
4241
|
},] }
|
|
4227
4242
|
];
|
|
@@ -4238,7 +4253,8 @@ TagsInputComponent.ctorParameters = () => [
|
|
|
4238
4253
|
TagsInputComponent.propDecorators = {
|
|
4239
4254
|
group: [{ type: Input }],
|
|
4240
4255
|
options: [{ type: Input }],
|
|
4241
|
-
OnChange: [{ type: Output }]
|
|
4256
|
+
OnChange: [{ type: Output }],
|
|
4257
|
+
SearchKey: [{ type: ViewChild, args: ['SearchKey', { static: false },] }]
|
|
4242
4258
|
};
|
|
4243
4259
|
|
|
4244
4260
|
class PagingDTO {
|
|
@@ -5043,7 +5059,7 @@ TextboxComponent.controlContainerstatic = null;
|
|
|
5043
5059
|
TextboxComponent.decorators = [
|
|
5044
5060
|
{ type: Component, args: [{
|
|
5045
5061
|
selector: 'BBSF-TextBox',
|
|
5046
|
-
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
|
|
5062
|
+
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",
|
|
5047
5063
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
5048
5064
|
},] }
|
|
5049
5065
|
];
|
|
@@ -5964,6 +5980,8 @@ class ControlOptionsBase {
|
|
|
5964
5980
|
this.ViewType = null;
|
|
5965
5981
|
/** Allow to Pass Object With Body of Function which represent CustomValidation and massage for error massage */
|
|
5966
5982
|
this.CustomValidation = [];
|
|
5983
|
+
/** Sets an attribute readonly */
|
|
5984
|
+
this.IsReadonly = false;
|
|
5967
5985
|
}
|
|
5968
5986
|
}
|
|
5969
5987
|
|
|
@@ -6165,6 +6183,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
6165
6183
|
if (this.RepeaterField.ControlOptions.minLength)
|
|
6166
6184
|
Text.MinLength = this.RepeaterField.ControlOptions.minLength;
|
|
6167
6185
|
Text.Value = this.value;
|
|
6186
|
+
Text.IsReadonly = this.RepeaterField.ControlOptions.IsReadonly;
|
|
6168
6187
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Text);
|
|
6169
6188
|
break;
|
|
6170
6189
|
case DataType.Name:
|
|
@@ -6212,6 +6231,7 @@ class RepeaterFieldBuilderComponent {
|
|
|
6212
6231
|
rangeNumber.From = this.RepeaterField.ControlOptions.minLength;
|
|
6213
6232
|
Number.NumberRange = rangeNumber;
|
|
6214
6233
|
Number.Value = this.value;
|
|
6234
|
+
Number.IsReadonly = this.RepeaterField.ControlOptions.IsReadonly;
|
|
6215
6235
|
this.renderComponentService.renderDynamicComponent(this.Item, TextboxComponent, this.group, Number);
|
|
6216
6236
|
break;
|
|
6217
6237
|
///DateTime
|
|
@@ -6872,7 +6892,7 @@ class RepeaterTableComponent {
|
|
|
6872
6892
|
if (this.options.RepeaterValue.length > 0) {
|
|
6873
6893
|
this.originalItems = this.options.RepeaterValue;
|
|
6874
6894
|
for (let index = 0; index < this.options.RepeaterValue.length; index++) {
|
|
6875
|
-
this.items.push(index
|
|
6895
|
+
this.items.push(index);
|
|
6876
6896
|
}
|
|
6877
6897
|
}
|
|
6878
6898
|
else
|
|
@@ -6945,13 +6965,16 @@ class RepeaterTableComponent {
|
|
|
6945
6965
|
this.items = this.items.filter((res) => res != this.items[Index]);
|
|
6946
6966
|
}
|
|
6947
6967
|
addItem() {
|
|
6948
|
-
|
|
6968
|
+
if (this.items.length == 0)
|
|
6969
|
+
this.items.push(this.items.length);
|
|
6970
|
+
else
|
|
6971
|
+
this.items.push(this.items[this.items.length - 1] + 1);
|
|
6949
6972
|
}
|
|
6950
6973
|
}
|
|
6951
6974
|
RepeaterTableComponent.decorators = [
|
|
6952
6975
|
{ type: Component, args: [{
|
|
6953
6976
|
selector: 'BBSF-repeater-table',
|
|
6954
|
-
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)
|
|
6977
|
+
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"
|
|
6955
6978
|
},] }
|
|
6956
6979
|
];
|
|
6957
6980
|
RepeaterTableComponent.ctorParameters = () => [
|
|
@@ -7206,7 +7229,8 @@ class BTagsInputComponent {
|
|
|
7206
7229
|
}
|
|
7207
7230
|
}
|
|
7208
7231
|
removeLastTag(tagInput) {
|
|
7209
|
-
|
|
7232
|
+
var _a;
|
|
7233
|
+
if (!this.removeLastOnBackspace || !((_a = this.tags) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
7210
7234
|
return;
|
|
7211
7235
|
}
|
|
7212
7236
|
if (tagInput.value === '') {
|
|
@@ -7223,6 +7247,8 @@ class BTagsInputComponent {
|
|
|
7223
7247
|
tagInput.value = '';
|
|
7224
7248
|
}
|
|
7225
7249
|
addPredefinedTag(tag) {
|
|
7250
|
+
if (this.tags == null)
|
|
7251
|
+
this.tags = [];
|
|
7226
7252
|
if (!this.maximumOfTagsReached()) {
|
|
7227
7253
|
this.tags.push(tag);
|
|
7228
7254
|
this.tagsChanged('add', tag);
|
|
@@ -7802,6 +7828,8 @@ class RepeaterOptions {
|
|
|
7802
7828
|
this.DeleteButtonText = "Delete";
|
|
7803
7829
|
this.RepeaterValue = [];
|
|
7804
7830
|
this.RepeaterStructure = [];
|
|
7831
|
+
this.DisableAddButton = false;
|
|
7832
|
+
this.DisableDeleteButton = false;
|
|
7805
7833
|
}
|
|
7806
7834
|
}
|
|
7807
7835
|
|