@bnsights/bbsf-controls 1.0.46 → 1.0.49
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 +14 -0
- package/bnsights-bbsf-controls-1.0.49.tgz +0 -0
- package/bnsights-bbsf-controls.d.ts +1 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +580 -376
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/bnsights-bbsf-controls.js +2 -1
- package/esm2015/lib/Shared/Enums/TagInputView.js +7 -0
- package/esm2015/lib/Shared/Models/AutocompleteDTO.js +2 -1
- package/esm2015/lib/Shared/Models/AutocompleteOptions.js +2 -1
- package/esm2015/lib/Shared/Models/PagingOptions.js +3 -1
- package/esm2015/lib/Shared/Models/TagsInputDTO.js +1 -1
- package/esm2015/lib/Shared/Models/TagsInputOptions.js +9 -5
- package/esm2015/lib/Shared/components/ng-tag-input.js +307 -0
- package/esm2015/lib/Shared/default_intl.js +21 -0
- package/esm2015/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.js +3 -2
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +6 -1
- package/esm2015/lib/controls/Paging/Paging.component.js +27 -18
- package/esm2015/lib/controls/TagsInput/TagsInput.component.js +2 -2
- package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +2 -2
- package/esm2015/lib/controls/bbsf-controls.module.js +4 -2
- package/esm2015/public-api.js +3 -1
- package/fesm2015/bnsights-bbsf-controls.js +378 -30
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Enums/TagInputView.d.ts +5 -0
- package/lib/Shared/Models/AutocompleteDTO.d.ts +1 -0
- package/lib/Shared/Models/AutocompleteOptions.d.ts +1 -0
- package/lib/Shared/Models/PagingOptions.d.ts +2 -0
- package/lib/Shared/Models/TagsInputDTO.d.ts +4 -2
- package/lib/Shared/Models/TagsInputOptions.d.ts +3 -0
- package/lib/Shared/components/ng-tag-input.d.ts +45 -0
- package/lib/Shared/default_intl.d.ts +10 -0
- package/lib/controls/AutocompleteTextBox/AutocompleteTextBox.component.d.ts +1 -0
- package/lib/controls/Paging/Paging.component.d.ts +5 -2
- package/package.json +2 -2
- package/public-api.d.ts +2 -0
- package/bnsights-bbsf-controls-1.0.46.tgz +0 -0
|
@@ -4,9 +4,9 @@ import timeGridPlugin from '@fullcalendar/timegrid';
|
|
|
4
4
|
import listPlugin from '@fullcalendar/list';
|
|
5
5
|
import interactionPlugin from '@fullcalendar/interaction';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { Injectable, Optional, EventEmitter, Component, Input, Output, ViewChild, NgZone, Directive, TemplateRef, ViewChildren, ComponentFactoryResolver, ViewContainerRef, Pipe, NgModule, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
|
|
7
|
+
import { Injectable, Optional, EventEmitter, Component, Input, Output, ViewChild, NgZone, Directive, TemplateRef, ViewChildren, ComponentFactoryResolver, ViewContainerRef, Pipe, forwardRef, NgModule, NO_ERRORS_SCHEMA, Injector } from '@angular/core';
|
|
8
8
|
import { BlockUIModule } from 'ng-block-ui';
|
|
9
|
-
import { ControlContainer, Validators, FormControl, FormGroupDirective, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
9
|
+
import { ControlContainer, Validators, FormControl, FormGroupDirective, FormGroup, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
10
10
|
import { Http, HttpModule } from '@angular/http';
|
|
11
11
|
import { Router, RouterModule } from '@angular/router';
|
|
12
12
|
import { ToastrModule } from 'ngx-toastr';
|
|
@@ -17,8 +17,8 @@ import { DatePipe, CommonModule } from '@angular/common';
|
|
|
17
17
|
import { SearchCountryField, NgxIntlTelInputModule } from 'ngx-intl-tel-input';
|
|
18
18
|
import { UtilityService, ControlValidationService, BBSFTranslateService, RequestOptionsModel, RequestHandlerService, BBSFUtilitiesModule } from '@bnsights/bbsf-utilities';
|
|
19
19
|
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
|
|
20
|
-
import { Subject, Observable, noop, of } from 'rxjs';
|
|
21
|
-
import { DateTimeAdapter, OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
|
|
20
|
+
import { Subject, Observable, noop as noop$1, of, Subscription } from 'rxjs';
|
|
21
|
+
import { OwlDateTimeIntl, DateTimeAdapter, OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
|
|
22
22
|
import { FileUploader, FileLikeObject, FileUploadModule } from 'ng2-file-upload';
|
|
23
23
|
import { __decorate, __awaiter } from 'tslib';
|
|
24
24
|
import { Expose, plainToClass } from 'class-transformer';
|
|
@@ -390,6 +390,24 @@ OnPagingFiltersChangeService.decorators = [
|
|
|
390
390
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
391
391
|
];
|
|
392
392
|
|
|
393
|
+
// here is the default text string - just adjust the strings to reflect your preferred language
|
|
394
|
+
class DefaultIntl extends OwlDateTimeIntl {
|
|
395
|
+
constructor(utilityService) {
|
|
396
|
+
super();
|
|
397
|
+
this.utilityService = utilityService;
|
|
398
|
+
/** A label for the range 'from' in picker info */
|
|
399
|
+
this.rangeFromLabel = this.utilityService.getResourceValue("From");
|
|
400
|
+
/** A label for the range 'to' in picker info */
|
|
401
|
+
this.rangeToLabel = this.utilityService.getResourceValue("To");
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
DefaultIntl.decorators = [
|
|
405
|
+
{ type: Injectable }
|
|
406
|
+
];
|
|
407
|
+
DefaultIntl.ctorParameters = () => [
|
|
408
|
+
{ type: UtilityService }
|
|
409
|
+
];
|
|
410
|
+
|
|
393
411
|
class DateInputComponent {
|
|
394
412
|
// tslint:disable-next-line: max-line-length
|
|
395
413
|
constructor(datepipe, onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService, dateTimeAdapter) {
|
|
@@ -565,6 +583,9 @@ DateInputComponent.decorators = [
|
|
|
565
583
|
{ type: Component, args: [{
|
|
566
584
|
selector: 'BBSF-DateTimePicker',
|
|
567
585
|
template: "<div class=\"b-control b-date-picker\">\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 <div class=\"input-group\">\r\n <input autocomplete=\"off\" (dateTimeChange)=\"onDateSelect($event)\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}} \"\r\n [ngClass]=\"(options.ViewType==1)?'':'col-md-9'\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n formControlName=\"{{options.Name}}\" [owlDateTime]=\"dt1\" [owlDateTimeTrigger]=\"dt1\"\r\n [class.is-invalid]=\"DatePickerFormControl.invalid && DatePickerFormControl.touched\"\r\n [min]=\"options.StartDate\" [max]=\"options.EndDate\" [hour12Timer]=\"options.Hour12Timer\" [selectMode]=\"getSelectMode(options.SelectMode)\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" #Dateinput>\r\n\r\n <owl-date-time [pickerType]=\"getPickerType(options.PickerType)\"\r\n [startView]=\"getStartView(options.StartView)\" [firstDayOfWeek]=\"options.FirstDayOfWeek\"\r\n [hour12Timer]=\"options.Hour12Timer\" #dt1></owl-date-time>\r\n \r\n <div class=\"input-group-append\">\r\n <span class=\"input-group-text\" [owlDateTimeTrigger]=\"dt1\">\r\n <span class=\"svg-icon\">\r\n <svg id=\"Group_356\" data-name=\"Group 356\" xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"15\" viewBox=\"0 0 48 48\">\r\n <path id=\"Path_6737\" data-name=\"Path 6737\" d=\"M11.583,1a1,1,0,0,0-2,0V5.7h2Z\" style=\"\"></path>\r\n <path id=\"Path_6738\" data-name=\"Path 6738\" d=\"M38.417,1a1,1,0,0,0-2,0V5.7h2Z\"></path>\r\n <path id=\"Path_6739\" data-name=\"Path 6739\" d=\"M0,43.146C0,45.822,1.826,48,4.07,48H43.928C46.174,48,48,45.822,48,43.146V17.121H0Z\" fill=\"#d5d5d5\"></path>\r\n <path id=\"Path_6740\" data-name=\"Path 6740\" d=\"M43.929,5.7H38.417v5.512a1,1,0,1,1-2,0V5.7H11.583v5.512a1,1,0,1,1-2,0V5.7H4.07C1.826,5.7,0,7.877,0,10.555v4.566H48V10.555C48,7.877,46.174,5.7,43.929,5.7Z\" fill=\"#595959\"></path>\r\n </svg>\r\n </span>\r\n </span>\r\n <!--<span class=\"input-group-text\" *ngIf=\"options.EnableCopyToClipboard\"\r\n (click)=\"copyInputMessage(Dateinput)\">\r\n <i class=\"fas fa-copy\"></i>\r\n </span>-->\r\n </div>\r\n </div>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(DatePickerFormControl.invalid && DatePickerFormControl.touched)\">\r\n {{getErrorValidation(DatePickerFormControl.errors|keyvalue)}}\r\n </div>\r\n\r\n <div class=\"control-desc\"*ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n \r\n <div *ngIf=\"(group.valid&&group.dirty&&group.touched )||(group.untouched&&group.invalid&&group.dirty) \">{{resetError()}}</div>\r\n\r\n\r\n\r\n </div>\r\n\r\n </div>\r\n</div>\r\n",
|
|
586
|
+
providers: [
|
|
587
|
+
{ provide: OwlDateTimeIntl, useClass: DefaultIntl }
|
|
588
|
+
],
|
|
568
589
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}\n"]
|
|
569
590
|
},] }
|
|
570
591
|
];
|
|
@@ -2419,7 +2440,7 @@ ToggleslideComponent.controlContainerstatic = null;
|
|
|
2419
2440
|
ToggleslideComponent.decorators = [
|
|
2420
2441
|
{ type: Component, args: [{
|
|
2421
2442
|
selector: 'BBSF-Toggleslide',
|
|
2422
|
-
template: "<div class=\"b-control b-toggle-slide\">\r\n <div class=\"form-group 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 </label>\r\n <mat-slide-toggle [(ngModel)]=\"SlideValue\" dir=\"{{options.ForceDirection==2?'rtl':''}}\" [cssClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n formControlName=\"{{options.Name}}\" disableRipple=\"true\" disabled=\"{{options.IsDisabled}}\" (change)=\"changeValueToggle()\">\r\n </mat-slide-toggle>\r\n \r\n </div>\r\n</div>\r\n",
|
|
2443
|
+
template: "<div class=\"b-control b-toggle-slide\">\r\n <div class=\"form-group 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 </label>\r\n <mat-slide-toggle [(ngModel)]=\"SlideValue\" dir=\"{{options.ForceDirection==2?'rtl':''}}\" [cssClass]=\"(options.ViewType==1)?'':'col-md-9'\"\r\n formControlName=\"{{options.Name}}\" disableRipple=\"true\" disabled=\"{{options.IsDisabled}}\" (change)=\"changeValueToggle()\">\r\n </mat-slide-toggle>\r\n <div class=\"control-desc\" *ngIf=\"options.LabelDescription!=null\">{{options.LabelDescription}}</div>\r\n </div>\r\n</div>\r\n",
|
|
2423
2444
|
styles: [".mat-slide-toggle{padding-left:10px}.mat-slide-toggle.mat-checked .mat-slide-toggle-bar{background-color:#e3f4fe}.mat-slide-toggle-thumb-container{width:25px;height:25px;top:1px;left:-2px}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb{background-color:#009ef7}.mat-slide-toggle-thumb{height:25px;width:25px;border-radius:50%}.mat-slide-toggle.mat-checked .mat-ripple-element{background-color:#009ef7}.mat-slide-toggle-bar{width:55px;height:30px;border-radius:3.25rem}\n"]
|
|
2424
2445
|
},] }
|
|
2425
2446
|
];
|
|
@@ -3703,6 +3724,7 @@ class AutocompleteDTO {
|
|
|
3703
3724
|
constructor() {
|
|
3704
3725
|
this.key = "";
|
|
3705
3726
|
this.value = "";
|
|
3727
|
+
this.image = "";
|
|
3706
3728
|
}
|
|
3707
3729
|
}
|
|
3708
3730
|
|
|
@@ -3730,6 +3752,7 @@ class AutocompleteTextBoxComponent {
|
|
|
3730
3752
|
this.validationRulesasync = [];
|
|
3731
3753
|
this.dataList = [];
|
|
3732
3754
|
this.SelectedValue = "";
|
|
3755
|
+
this.avatarImage = "./src/assets/images/userimg.png";
|
|
3733
3756
|
this.resetError = () => {
|
|
3734
3757
|
this.controlValidationService.RemoveGlobalError();
|
|
3735
3758
|
};
|
|
@@ -3840,7 +3863,7 @@ class AutocompleteTextBoxComponent {
|
|
|
3840
3863
|
requestOptionsModel.disableSuccessNotification = true;
|
|
3841
3864
|
// using github public api to get users by name
|
|
3842
3865
|
return this.requestHandlerService.get(this.options.ActionURL, params, null, requestOptionsModel)
|
|
3843
|
-
.pipe(map((data) => data || []), tap(() => noop, err => {
|
|
3866
|
+
.pipe(map((data) => data || []), tap(() => noop$1, err => {
|
|
3844
3867
|
// in case of http error
|
|
3845
3868
|
this.errorMessage = err && err.message || 'Something goes wrong';
|
|
3846
3869
|
}));
|
|
@@ -3920,7 +3943,7 @@ AutocompleteTextBoxComponent.decorators = [
|
|
|
3920
3943
|
{ type: Component, args: [{
|
|
3921
3944
|
// tslint:disable-next-line: component-selector
|
|
3922
3945
|
selector: 'BBSF-AutocompleteTextBox',
|
|
3923
|
-
template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\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\r\n <!-- <input \r\n[(ngModel)]=\"Search\"\r\n value=\"{{Search}}\" \r\n autocomplete=\"off\"\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 [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n typeaheadOptionField=\"{{Value}}\"\r\n [typeahead]=\"suggestions$\"\r\n [typeaheadAsync]=\"true\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (typeaheadOnSelect)=\"handleResultSelected($event)\" (blur)=\"onBlur($event.target.value)\" /> -->\r\n <!-- \r\n <input ngxTypeahead autocomplete=\"off\"\r\n value=\"{{Search}}\"\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 [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" [taUrl]=\"options.ActionURL\"\r\n [taParams]=\"options.Params\" taQueryParam=\"{{QueryParam}}\" taApi=\"{{Api}}\" taListItemLabel=\"{{Value}}\" (taSelected)=\"handleResultSelected($event)\"> -->\r\n\r\n\r\n\r\n <ng-autocomplete *ngIf=\"!options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n <ng-autocomplete *ngIf=\"options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n\r\n\r\n <ng-template #itemTemplate let-item>\r\n <a [innerHTML]=\"item.value\"></a>\r\n </ng-template>\r\n\r\n <ng-template #notFoundTemplate let-notFound>\r\n <div [innerHTML]=\"notFound\"></div>\r\n </ng-template>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched)\">\r\n {{getErrorValidation(AutocompleteTextBoxControl.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
|
|
3946
|
+
template: "<div class=\"b-control b-auto-complete-textbox\">\r\n <div class=\"form-group row validate is-invalid\" [formGroup]=\"group\">\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\r\n <!-- <input \r\n[(ngModel)]=\"Search\"\r\n value=\"{{Search}}\" \r\n autocomplete=\"off\"\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 [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n typeaheadOptionField=\"{{Value}}\"\r\n [typeahead]=\"suggestions$\"\r\n [typeaheadAsync]=\"true\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" (typeaheadOnSelect)=\"handleResultSelected($event)\" (blur)=\"onBlur($event.target.value)\" /> -->\r\n <!-- \r\n <input ngxTypeahead autocomplete=\"off\"\r\n value=\"{{Search}}\"\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 [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\"\r\n placeholder=\"{{options.Placeholder}}\" id=\"{{options.Name}}\" [taUrl]=\"options.ActionURL\"\r\n [taParams]=\"options.Params\" taQueryParam=\"{{QueryParam}}\" taApi=\"{{Api}}\" taListItemLabel=\"{{Value}}\" (taSelected)=\"handleResultSelected($event)\"> -->\r\n\r\n\r\n\r\n <ng-autocomplete *ngIf=\"!options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n [notFoundTemplate]=\"notFoundTemplate\" class=\"form-control bnsights-control {{options.ExtraClasses}}\"\r\n dir=\"{{options.ForceDirection==2?'rtl':''}}\" formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\"\r\n aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n <ng-autocomplete *ngIf=\"options.AllowNewSelection\" [data]=\"dataList\" [initialValue]=\"SelectedValue\"\r\n [searchKeyword]=\"keyword\" placeholder=\"{{options.Placeholder}}\" (selected)='selectEvent($event)'\r\n (inputChanged)='onChangeSearch($event)' historyIdentifier=\"dataList\" [itemTemplate]=\"itemTemplate\"\r\n class=\"form-control bnsights-control {{options.ExtraClasses}}\" dir=\"{{options.ForceDirection==2?'rtl':''}}\"\r\n formControlName=\"{{options.Name}}\" aria-describedby=\"email-error\" aria-invalid=\"true\"\r\n [class.is-invalid]=\"AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched\">\r\n </ng-autocomplete>\r\n\r\n\r\n\r\n <ng-template #itemTemplate let-item>\r\n <img *ngIf=\"options.ItemWithImage\" style=\"border-radius:50%; height:40px; width: 40px; float:left; margin-left:5px ; margin-top: 5px;margin-right: 5px;\" src=\"{{(item.image?item.image:avatarImage)}}\" />\r\n <a [innerHTML]=\"item.value\"></a>\r\n </ng-template>\r\n\r\n <ng-template #notFoundTemplate let-notFound>\r\n <div [innerHTML]=\"notFound\"></div>\r\n </ng-template>\r\n\r\n <div class=\"text-danger Required-text\"\r\n *ngIf=\"(AutocompleteTextBoxControl.invalid && AutocompleteTextBoxControl.touched)\">\r\n {{getErrorValidation(AutocompleteTextBoxControl.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>\r\n",
|
|
3924
3947
|
styles: [""]
|
|
3925
3948
|
},] }
|
|
3926
3949
|
];
|
|
@@ -4122,7 +4145,7 @@ TagsInputComponent.decorators = [
|
|
|
4122
4145
|
{ type: Component, args: [{
|
|
4123
4146
|
// tslint:disable-next-line: component-selector
|
|
4124
4147
|
selector: 'BBSF-TagsInput',
|
|
4125
|
-
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
|
|
4148
|
+
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 (keypress)=\"AddTag($event.key,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()}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n",
|
|
4126
4149
|
styles: [".example-form{min-width:150px;max-width:500px;width:100%}.example-full-width{width:100%}.flip_V{transform:scaleY(-1)}\n"]
|
|
4127
4150
|
},] }
|
|
4128
4151
|
];
|
|
@@ -4191,6 +4214,7 @@ class PagingComponent {
|
|
|
4191
4214
|
this.direction = '';
|
|
4192
4215
|
this.IsFirstCall = true;
|
|
4193
4216
|
this.Items = new EventEmitter();
|
|
4217
|
+
this.subscriptions = new Subscription();
|
|
4194
4218
|
this.ReinitializePaging = () => {
|
|
4195
4219
|
this.IsFirstCall = true;
|
|
4196
4220
|
this.getItemList(1, true);
|
|
@@ -4200,30 +4224,33 @@ class PagingComponent {
|
|
|
4200
4224
|
this.getItemList(this.CurrentPage);
|
|
4201
4225
|
};
|
|
4202
4226
|
}
|
|
4227
|
+
ngOnDestroy() {
|
|
4228
|
+
this.subscriptions.unsubscribe();
|
|
4229
|
+
}
|
|
4203
4230
|
ngOnInit() {
|
|
4204
4231
|
if (this.options.IsLoadMoreControl)
|
|
4205
4232
|
this.Sum = this.options.PageSize;
|
|
4206
4233
|
if (this.options.DropdownFiltersControlNames != null && this.options.DropdownFiltersControlNames.length > 0) {
|
|
4207
4234
|
const DropdownFiltersControlNames = this.options.DropdownFiltersControlNames;
|
|
4208
|
-
this.onChangeService.GetValue().subscribe((value) => {
|
|
4235
|
+
this.subscriptions.add(this.onChangeService.GetValue().subscribe((value) => {
|
|
4209
4236
|
let result = this.options.DropdownFiltersControlNames.filter((item) => item == value);
|
|
4210
4237
|
if (result.length > 0) {
|
|
4211
4238
|
this.IsFirstCall = true;
|
|
4212
4239
|
this.CurrentPage = 1;
|
|
4213
4240
|
this.getItemList(this.CurrentPage, true);
|
|
4214
4241
|
}
|
|
4215
|
-
});
|
|
4242
|
+
}));
|
|
4216
4243
|
}
|
|
4217
4244
|
if (this.options.BootstrapDatePickersFiltersControlNames != null && this.options.BootstrapDatePickersFiltersControlNames.length > 0) {
|
|
4218
4245
|
const BootstrapDatePickersFiltersControlNames = this.options.BootstrapDatePickersFiltersControlNames;
|
|
4219
|
-
this.onChangeService.GetValue().subscribe((value) => {
|
|
4246
|
+
this.subscriptions.add(this.onChangeService.GetValue().subscribe((value) => {
|
|
4220
4247
|
let result = this.options.BootstrapDatePickersFiltersControlNames.filter((item) => item == value);
|
|
4221
4248
|
if (result.length > 0) {
|
|
4222
4249
|
this.IsFirstCall = true;
|
|
4223
4250
|
this.CurrentPage = 1;
|
|
4224
4251
|
this.getItemList(this.CurrentPage, true);
|
|
4225
4252
|
}
|
|
4226
|
-
});
|
|
4253
|
+
}));
|
|
4227
4254
|
}
|
|
4228
4255
|
this.IsFirstCall = true;
|
|
4229
4256
|
this.getItemList(this.CurrentPage, true);
|
|
@@ -4311,6 +4338,8 @@ class PagingComponent {
|
|
|
4311
4338
|
this.getItemList(this.CurrentPage, true);
|
|
4312
4339
|
}
|
|
4313
4340
|
getItemList(page, IsFilterUpdated = false) {
|
|
4341
|
+
if (this.options.StartPagingCallback)
|
|
4342
|
+
this.options.StartPagingCallback.call(null);
|
|
4314
4343
|
let pagingDTO = new PagingDTO();
|
|
4315
4344
|
let size = Number.parseInt(this.options.PageSize.toString());
|
|
4316
4345
|
if (this.options.IsLoadMoreControl)
|
|
@@ -4327,7 +4356,9 @@ class PagingComponent {
|
|
|
4327
4356
|
PagingDTO: pagingDTO,
|
|
4328
4357
|
Filters: filters
|
|
4329
4358
|
};
|
|
4330
|
-
|
|
4359
|
+
let requestOptions = new RequestOptionsModel();
|
|
4360
|
+
requestOptions.disableBlockUI = this.options.DisableBlockUI;
|
|
4361
|
+
this.requestHandlerService.post(this.options.ActionPostURL, this.options.Filters && this.options.Filters.length > 0 ? filtersDTO : pagingDTO, null, null, requestOptions)
|
|
4331
4362
|
.subscribe((responseData) => {
|
|
4332
4363
|
this.result = responseData.items; //this.castItems(responseData.items);
|
|
4333
4364
|
let castedResult = plainToClass(this.options.TypeOfResponse, this.result, { excludeExtraneousValues: true });
|
|
@@ -4407,21 +4438,21 @@ class PagingComponent {
|
|
|
4407
4438
|
let ControlValue = this.group.controls[FormControlName].value;
|
|
4408
4439
|
if (ControlValue != undefined && ControlValue != null && ControlValue != "") {
|
|
4409
4440
|
if (this.options.Filters[index].FilterType == FilterType.DatePicker) {
|
|
4410
|
-
if (Array.isArray(ControlValue)) {
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
}
|
|
4416
|
-
else {
|
|
4417
|
-
|
|
4418
|
-
}
|
|
4441
|
+
//if (Array.isArray(ControlValue)) {
|
|
4442
|
+
// for (let element = 0; element < ControlValue.length; element++) {
|
|
4443
|
+
// const value = ControlValue[element];
|
|
4444
|
+
// filters[this.options.Filters[index].ActionParameterName] = value;
|
|
4445
|
+
// }
|
|
4446
|
+
//}
|
|
4447
|
+
//else {
|
|
4448
|
+
filters[this.options.Filters[index].ActionParameterName] = ControlValue;
|
|
4449
|
+
//}
|
|
4419
4450
|
}
|
|
4420
4451
|
else {
|
|
4421
4452
|
if (this.options.Filters[index].FilterType == FilterType.AutocompleteTextBox)
|
|
4422
|
-
ControlValue =
|
|
4453
|
+
ControlValue = ControlValue;
|
|
4423
4454
|
if (this.options.Filters[index].FilterType == FilterType.TagInput)
|
|
4424
|
-
ControlValue =
|
|
4455
|
+
ControlValue = ControlValue;
|
|
4425
4456
|
filters[this.options.Filters[index].ActionParameterName] = ControlValue;
|
|
4426
4457
|
}
|
|
4427
4458
|
}
|
|
@@ -6853,6 +6884,316 @@ BBSFDatePipe.ctorParameters = () => [
|
|
|
6853
6884
|
{ type: DatePipe }
|
|
6854
6885
|
];
|
|
6855
6886
|
|
|
6887
|
+
var TagInputView;
|
|
6888
|
+
(function (TagInputView) {
|
|
6889
|
+
TagInputView[TagInputView["WithImage"] = 1] = "WithImage";
|
|
6890
|
+
TagInputView[TagInputView["WithoutImage"] = 2] = "WithoutImage";
|
|
6891
|
+
TagInputView[TagInputView["WithInitial"] = 3] = "WithInitial";
|
|
6892
|
+
})(TagInputView || (TagInputView = {}));
|
|
6893
|
+
|
|
6894
|
+
const noop = () => { };
|
|
6895
|
+
const ɵ0$1 = noop;
|
|
6896
|
+
const TAGS_INPUT_TEMPLATE = `
|
|
6897
|
+
|
|
6898
|
+
<div class="tags-input">
|
|
6899
|
+
<span class="tags-input__tag label label-primary badge badge-primary" *ngFor="let tag of tags">
|
|
6900
|
+
|
|
6901
|
+
<span [ngSwitch]="ViewMode">
|
|
6902
|
+
<span *ngSwitchCase="tagInputViewEnum.WithImage">
|
|
6903
|
+
<img style="border-radius:50%; height:40px; width: 40px; float:left; margin-left:5px ; margin-top: 5px;margin-right: 5px;"
|
|
6904
|
+
src="{{(tag.imageURL?tag.imageURL:defaultImageURL)}}" />
|
|
6905
|
+
</span>
|
|
6906
|
+
|
|
6907
|
+
<span *ngSwitchCase="tagInputViewEnum.WithInitial">
|
|
6908
|
+
<div class="user-initials">{{calculateInitials(tag.name)}}</div>
|
|
6909
|
+
</span>
|
|
6910
|
+
|
|
6911
|
+
<span *ngSwitchDefault>
|
|
6912
|
+
</span>
|
|
6913
|
+
|
|
6914
|
+
</span>
|
|
6915
|
+
{{tag[displayField]}}
|
|
6916
|
+
<span *ngIf="isDeleteable(tag)" role="button" class="tags-input__tag-remove-btn" (click)="removeTag(tag)"
|
|
6917
|
+
(touch)="removeTag(tag)">
|
|
6918
|
+
<span aria-hidden="true">×</span>
|
|
6919
|
+
<span class="sr-only">Close</span>
|
|
6920
|
+
</span>
|
|
6921
|
+
</span>
|
|
6922
|
+
|
|
6923
|
+
<input *ngIf="options === null; else withTypeahead" class="tags-input__input-field" type="text"
|
|
6924
|
+
[placeholder]="getPlaceholder()" name="tags" (keyup.enter)="addTag(tagInput)"
|
|
6925
|
+
(keydown.backspace)="removeLastTag(tagInput)" [disabled]="!canAddTags || maximumOfTagsReached()"
|
|
6926
|
+
[hidden]="!canAddTags || maximumOfTagsReached()" #tagInput />
|
|
6927
|
+
|
|
6928
|
+
<ng-template #withTypeahead>
|
|
6929
|
+
<span [ngSwitch]="ViewMode">
|
|
6930
|
+
|
|
6931
|
+
<span *ngSwitchCase="tagInputViewEnum.WithImage">
|
|
6932
|
+
<input *ngIf="(options !== null)" class="tags-input__input-field" type="text" [placeholder]="getPlaceholder()"
|
|
6933
|
+
name="tags" (keydown.backspace)="removeLastTag(tagInput)" [(ngModel)]="selected" [typeahead]="options"
|
|
6934
|
+
[typeaheadOptionField]="displayField" (typeaheadOnSelect)="typeaheadOnSelect($event)"
|
|
6935
|
+
(typeaheadNoResults)="typeaheadOnNoMatch($event)" [typeaheadMinLength]="minLengthBeforeOptions"
|
|
6936
|
+
[typeaheadScrollable]="scrollableOptions" [typeaheadLatinize]="true"
|
|
6937
|
+
[typeaheadItemTemplate]="itemTemplateWithImage" [typeaheadOptionsInScrollableView]="scrollableOptionsInView"
|
|
6938
|
+
[disabled]="!canAddTags || maximumOfTagsReached()" [hidden]="!canAddTags || maximumOfTagsReached()"
|
|
6939
|
+
#tagInput />
|
|
6940
|
+
</span>
|
|
6941
|
+
|
|
6942
|
+
<span *ngSwitchCase="tagInputViewEnum.WithoutImage">
|
|
6943
|
+
<input *ngIf="(options !== null)" class="tags-input__input-field" type="text" [placeholder]="getPlaceholder()"
|
|
6944
|
+
name="tags" (keydown.backspace)="removeLastTag(tagInput)" [(ngModel)]="selected" [typeahead]="options"
|
|
6945
|
+
[typeaheadOptionField]="displayField" (typeaheadOnSelect)="typeaheadOnSelect($event)"
|
|
6946
|
+
(typeaheadNoResults)="typeaheadOnNoMatch($event)" [typeaheadMinLength]="minLengthBeforeOptions"
|
|
6947
|
+
[typeaheadScrollable]="scrollableOptions" [typeaheadLatinize]="true"
|
|
6948
|
+
[typeaheadItemTemplate]="itemTemplateWithoutImage"
|
|
6949
|
+
[typeaheadOptionsInScrollableView]="scrollableOptionsInView"
|
|
6950
|
+
[disabled]="!canAddTags || maximumOfTagsReached()" [hidden]="!canAddTags || maximumOfTagsReached()"
|
|
6951
|
+
#tagInput />
|
|
6952
|
+
</span>
|
|
6953
|
+
|
|
6954
|
+
<span *ngSwitchCase="tagInputViewEnum.WithInitial">
|
|
6955
|
+
<input *ngIf="(options !== null)" class="tags-input__input-field" type="text" [placeholder]="getPlaceholder()"
|
|
6956
|
+
name="tags" (keydown.backspace)="removeLastTag(tagInput)" [(ngModel)]="selected" [typeahead]="options"
|
|
6957
|
+
[typeaheadOptionField]="displayField" (typeaheadOnSelect)="typeaheadOnSelect($event)"
|
|
6958
|
+
(typeaheadNoResults)="typeaheadOnNoMatch($event)" [typeaheadMinLength]="minLengthBeforeOptions"
|
|
6959
|
+
[typeaheadScrollable]="scrollableOptions" [typeaheadLatinize]="true"
|
|
6960
|
+
[typeaheadItemTemplate]="itemTemplateWithoutInitial"
|
|
6961
|
+
[typeaheadOptionsInScrollableView]="scrollableOptionsInView"
|
|
6962
|
+
[disabled]="!canAddTags || maximumOfTagsReached()" [hidden]="!canAddTags || maximumOfTagsReached()"
|
|
6963
|
+
#tagInput />
|
|
6964
|
+
</span>
|
|
6965
|
+
|
|
6966
|
+
<span *ngSwitchDefault>
|
|
6967
|
+
<input *ngIf="(options !== null)" class="tags-input__input-field" type="text" [placeholder]="getPlaceholder()"
|
|
6968
|
+
name="tags" (keydown.backspace)="removeLastTag(tagInput)" [(ngModel)]="selected" [typeahead]="options"
|
|
6969
|
+
[typeaheadOptionField]="displayField" (typeaheadOnSelect)="typeaheadOnSelect($event)"
|
|
6970
|
+
(typeaheadNoResults)="typeaheadOnNoMatch($event)" [typeaheadMinLength]="minLengthBeforeOptions"
|
|
6971
|
+
[typeaheadScrollable]="scrollableOptions" [typeaheadLatinize]="true"
|
|
6972
|
+
[typeaheadItemTemplate]="itemTemplateWithoutImage"
|
|
6973
|
+
[typeaheadOptionsInScrollableView]="scrollableOptionsInView"
|
|
6974
|
+
[disabled]="!canAddTags || maximumOfTagsReached()" [hidden]="!canAddTags || maximumOfTagsReached()"
|
|
6975
|
+
#tagInput />
|
|
6976
|
+
</span>
|
|
6977
|
+
|
|
6978
|
+
</span>
|
|
6979
|
+
|
|
6980
|
+
</ng-template>
|
|
6981
|
+
|
|
6982
|
+
<ng-template #itemTemplateWithImage let-model="item" let-index="index">
|
|
6983
|
+
<img
|
|
6984
|
+
style="border-radius:50%; height:40px; width: 40px; float:left; margin-left:5px ; margin-top: 5px;margin-right: 5px;"
|
|
6985
|
+
src="{{(model.imageURL?model.imageURL:defaultImageURL)}}" />
|
|
6986
|
+
<div>
|
|
6987
|
+
<a [innerHTML]="model.name"></a>
|
|
6988
|
+
<p *ngIf="showDescription">
|
|
6989
|
+
{{model.description}}
|
|
6990
|
+
</p>
|
|
6991
|
+
</div>
|
|
6992
|
+
</ng-template>
|
|
6993
|
+
|
|
6994
|
+
<ng-template #itemTemplateWithoutImage let-model="item" let-index="index">
|
|
6995
|
+
<div>
|
|
6996
|
+
<a [innerHTML]="model.name"></a>
|
|
6997
|
+
<p *ngIf="showDescription">
|
|
6998
|
+
{{model.description}}
|
|
6999
|
+
</p>
|
|
7000
|
+
</div>
|
|
7001
|
+
</ng-template>
|
|
7002
|
+
|
|
7003
|
+
<ng-template #itemTemplateWithoutInitial let-model="item" let-index="index">
|
|
7004
|
+
<div class="user-image">
|
|
7005
|
+
<div class="user-initials">{{calculateInitials(model.name)}}</div>
|
|
7006
|
+
</div>
|
|
7007
|
+
<div>
|
|
7008
|
+
<a [innerHTML]="model.name"></a>
|
|
7009
|
+
<p *ngIf="showDescription">
|
|
7010
|
+
{{model.description}}
|
|
7011
|
+
</p>
|
|
7012
|
+
</div>
|
|
7013
|
+
</ng-template>
|
|
7014
|
+
</div>
|
|
7015
|
+
`;
|
|
7016
|
+
const TAGS_INPUT_STYLE = `
|
|
7017
|
+
:host {
|
|
7018
|
+
overflow: auto;
|
|
7019
|
+
white-space: nowrap;
|
|
7020
|
+
}
|
|
7021
|
+
|
|
7022
|
+
.tags-input {
|
|
7023
|
+
align-items: center;
|
|
7024
|
+
display: flex;
|
|
7025
|
+
flex-wrap: wrap;
|
|
7026
|
+
}
|
|
7027
|
+
|
|
7028
|
+
.tags-input__tag {
|
|
7029
|
+
display: inline-block;
|
|
7030
|
+
margin-bottom: 2px;
|
|
7031
|
+
margin-right: 5px;
|
|
7032
|
+
padding-right: 0.3em;
|
|
7033
|
+
}
|
|
7034
|
+
|
|
7035
|
+
.tags-input__tag-remove-btn {
|
|
7036
|
+
cursor: pointer;
|
|
7037
|
+
display: inline-block;
|
|
7038
|
+
font-size: 12px;
|
|
7039
|
+
margin: -3px 0 0 3px;
|
|
7040
|
+
padding: 0;
|
|
7041
|
+
vertical-align: top;
|
|
7042
|
+
}
|
|
7043
|
+
|
|
7044
|
+
.tags-input__input-field {
|
|
7045
|
+
border: none;
|
|
7046
|
+
flex-grow: 1;
|
|
7047
|
+
outline: none;
|
|
7048
|
+
}
|
|
7049
|
+
`;
|
|
7050
|
+
const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
|
|
7051
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7052
|
+
useExisting: forwardRef(() => BTagsInputComponent),
|
|
7053
|
+
multi: true
|
|
7054
|
+
};
|
|
7055
|
+
class BTagsInputComponent {
|
|
7056
|
+
constructor() {
|
|
7057
|
+
this.selected = '';
|
|
7058
|
+
this.tags = [];
|
|
7059
|
+
this.onTouchedCallback = noop;
|
|
7060
|
+
this.onChangeCallback = noop;
|
|
7061
|
+
this.tagInputViewEnum = TagInputView;
|
|
7062
|
+
this.removeLastOnBackspace = false;
|
|
7063
|
+
this.canDeleteTags = true;
|
|
7064
|
+
this.canAddTags = true;
|
|
7065
|
+
this.ViewMode = TagInputView.WithoutImage;
|
|
7066
|
+
this.placeholder = '';
|
|
7067
|
+
this.showDescription = true;
|
|
7068
|
+
this.options = null;
|
|
7069
|
+
this.defaultImageURL = null;
|
|
7070
|
+
this.displayField = 'name';
|
|
7071
|
+
this.minLengthBeforeOptions = 1;
|
|
7072
|
+
this.scrollableOptions = false;
|
|
7073
|
+
this.scrollableOptionsInView = 5;
|
|
7074
|
+
this.onTagsChanged = new EventEmitter();
|
|
7075
|
+
this.onMaxTagsReached = new EventEmitter();
|
|
7076
|
+
this.onNoOptionsMatch = new EventEmitter();
|
|
7077
|
+
}
|
|
7078
|
+
getPlaceholder() {
|
|
7079
|
+
if (this.tags && this.tags.length > 0) {
|
|
7080
|
+
return '';
|
|
7081
|
+
}
|
|
7082
|
+
return this.placeholder;
|
|
7083
|
+
}
|
|
7084
|
+
tagsChanged(type, tag) {
|
|
7085
|
+
this.onChangeCallback(this.tags);
|
|
7086
|
+
this.onTagsChanged.emit({
|
|
7087
|
+
change: type,
|
|
7088
|
+
tag: tag
|
|
7089
|
+
});
|
|
7090
|
+
if (this.maximumOfTagsReached()) {
|
|
7091
|
+
this.onMaxTagsReached.emit();
|
|
7092
|
+
}
|
|
7093
|
+
}
|
|
7094
|
+
removeLastTag(tagInput) {
|
|
7095
|
+
if (!this.removeLastOnBackspace || !this.tags.length) {
|
|
7096
|
+
return;
|
|
7097
|
+
}
|
|
7098
|
+
if (tagInput.value === '') {
|
|
7099
|
+
this.removeTag(this.tags[this.tags.length - 1]);
|
|
7100
|
+
}
|
|
7101
|
+
}
|
|
7102
|
+
addTag(tagInput) {
|
|
7103
|
+
if (tagInput.value.trim() !== '') {
|
|
7104
|
+
let tag = {
|
|
7105
|
+
[this.displayField]: tagInput.value
|
|
7106
|
+
};
|
|
7107
|
+
this.addPredefinedTag(tag);
|
|
7108
|
+
}
|
|
7109
|
+
tagInput.value = '';
|
|
7110
|
+
}
|
|
7111
|
+
addPredefinedTag(tag) {
|
|
7112
|
+
if (!this.maximumOfTagsReached()) {
|
|
7113
|
+
this.tags.push(tag);
|
|
7114
|
+
this.tagsChanged('add', tag);
|
|
7115
|
+
}
|
|
7116
|
+
}
|
|
7117
|
+
removeTag(tagToRemove) {
|
|
7118
|
+
if (!this.isDeleteable(tagToRemove)) {
|
|
7119
|
+
return;
|
|
7120
|
+
}
|
|
7121
|
+
this.tags = this.tags.filter(tag => tagToRemove !== tag);
|
|
7122
|
+
this.tagsChanged('remove', tagToRemove);
|
|
7123
|
+
}
|
|
7124
|
+
maximumOfTagsReached() {
|
|
7125
|
+
return typeof this.maxTags !== 'undefined' && this.tags && this.tags.length >= this.maxTags;
|
|
7126
|
+
}
|
|
7127
|
+
isDeleteable(tag) {
|
|
7128
|
+
if (typeof tag.deleteable !== "undefined" && !tag.deleteable) {
|
|
7129
|
+
return false;
|
|
7130
|
+
}
|
|
7131
|
+
return this.canDeleteTags;
|
|
7132
|
+
}
|
|
7133
|
+
typeaheadOnSelect(e) {
|
|
7134
|
+
if (typeof e.item === 'string') {
|
|
7135
|
+
this.addPredefinedTag({
|
|
7136
|
+
[this.displayField]: e.value
|
|
7137
|
+
});
|
|
7138
|
+
}
|
|
7139
|
+
else {
|
|
7140
|
+
this.addPredefinedTag(e.item);
|
|
7141
|
+
}
|
|
7142
|
+
this.selected = '';
|
|
7143
|
+
}
|
|
7144
|
+
typeaheadOnNoMatch(e) {
|
|
7145
|
+
if (typeof this.onNoOptionsMatch !== 'undefined') {
|
|
7146
|
+
this.onNoOptionsMatch.emit(e);
|
|
7147
|
+
}
|
|
7148
|
+
}
|
|
7149
|
+
writeValue(value) {
|
|
7150
|
+
if (value !== this.tags) {
|
|
7151
|
+
this.tags = value;
|
|
7152
|
+
}
|
|
7153
|
+
}
|
|
7154
|
+
registerOnChange(fn) {
|
|
7155
|
+
this.onChangeCallback = fn;
|
|
7156
|
+
}
|
|
7157
|
+
registerOnTouched(fn) {
|
|
7158
|
+
this.onTouchedCallback = fn;
|
|
7159
|
+
}
|
|
7160
|
+
calculateInitials(name) {
|
|
7161
|
+
debugger;
|
|
7162
|
+
var fullName = name.split(' ');
|
|
7163
|
+
var initials = "";
|
|
7164
|
+
if (fullName.length > 1)
|
|
7165
|
+
initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
|
|
7166
|
+
else
|
|
7167
|
+
initials = fullName.shift().charAt(0);
|
|
7168
|
+
return initials.toUpperCase();
|
|
7169
|
+
}
|
|
7170
|
+
}
|
|
7171
|
+
BTagsInputComponent.decorators = [
|
|
7172
|
+
{ type: Component, args: [{
|
|
7173
|
+
selector: 'b-tags-input',
|
|
7174
|
+
template: TAGS_INPUT_TEMPLATE,
|
|
7175
|
+
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
|
|
7176
|
+
styles: [TAGS_INPUT_STYLE]
|
|
7177
|
+
},] }
|
|
7178
|
+
];
|
|
7179
|
+
BTagsInputComponent.propDecorators = {
|
|
7180
|
+
maxTags: [{ type: Input }],
|
|
7181
|
+
removeLastOnBackspace: [{ type: Input }],
|
|
7182
|
+
canDeleteTags: [{ type: Input }],
|
|
7183
|
+
canAddTags: [{ type: Input }],
|
|
7184
|
+
ViewMode: [{ type: Input }],
|
|
7185
|
+
placeholder: [{ type: Input }],
|
|
7186
|
+
showDescription: [{ type: Input }],
|
|
7187
|
+
options: [{ type: Input }],
|
|
7188
|
+
defaultImageURL: [{ type: Input }],
|
|
7189
|
+
minLengthBeforeOptions: [{ type: Input }],
|
|
7190
|
+
scrollableOptions: [{ type: Input }],
|
|
7191
|
+
scrollableOptionsInView: [{ type: Input }],
|
|
7192
|
+
onTagsChanged: [{ type: Output }],
|
|
7193
|
+
onMaxTagsReached: [{ type: Output }],
|
|
7194
|
+
onNoOptionsMatch: [{ type: Output }]
|
|
7195
|
+
};
|
|
7196
|
+
|
|
6856
7197
|
let options;
|
|
6857
7198
|
let AppInjector;
|
|
6858
7199
|
FullCalendarModule.registerPlugins([
|
|
@@ -6902,7 +7243,8 @@ BBSFControlsModule.decorators = [
|
|
|
6902
7243
|
RepeaterItemFieldComponent,
|
|
6903
7244
|
RepeaterTableComponent,
|
|
6904
7245
|
BBSFDateTimePipe,
|
|
6905
|
-
BBSFDatePipe
|
|
7246
|
+
BBSFDatePipe,
|
|
7247
|
+
BTagsInputComponent
|
|
6906
7248
|
],
|
|
6907
7249
|
imports: [
|
|
6908
7250
|
CommonModule,
|
|
@@ -7166,6 +7508,7 @@ class AutocompleteOptions extends ControlOptionsBase {
|
|
|
7166
7508
|
// Params: object={};
|
|
7167
7509
|
this.QueryParam = 'query';
|
|
7168
7510
|
this.SelectedValue = null;
|
|
7511
|
+
this.ItemWithImage = false;
|
|
7169
7512
|
}
|
|
7170
7513
|
}
|
|
7171
7514
|
|
|
@@ -7184,26 +7527,29 @@ class TagsInputOptions extends ControlOptionsBase {
|
|
|
7184
7527
|
/** Allow User To Add Tags */
|
|
7185
7528
|
this.CanAddTags = true;
|
|
7186
7529
|
/** Set Max Number Of Tags That User Can Be Select */
|
|
7187
|
-
this.MaxNumberTags =
|
|
7530
|
+
this.MaxNumberTags = 5;
|
|
7188
7531
|
/** Set Min Length Of Char To Call Search Function */
|
|
7189
7532
|
this.MinSearchLength = 1;
|
|
7190
7533
|
/**Allow Scrolle Option In Dropdown */
|
|
7191
7534
|
this.ScrollableOptions = true;
|
|
7192
7535
|
/** Set Max Number Of Tags That will Be Appear ON Dropdown */
|
|
7193
|
-
this.MaxSearchResultsCount =
|
|
7536
|
+
this.MaxSearchResultsCount = 10;
|
|
7194
7537
|
/**Value Name Of Tag Option In Dropdown */
|
|
7195
|
-
this.DatasourceItemValue = "
|
|
7538
|
+
this.DatasourceItemValue = "id";
|
|
7196
7539
|
/**Text Of Tag That Will Show In Dropdown */
|
|
7197
|
-
this.DatasourceItemText = "
|
|
7540
|
+
this.DatasourceItemText = "name";
|
|
7198
7541
|
/**Set Query Param Name By Default It's 'query'*/
|
|
7199
7542
|
this.QueryParamName = "query";
|
|
7200
7543
|
/**Set Query Param Name By Default It's 'query'*/
|
|
7201
7544
|
this.SelectedItemsParamName = "SelectedItems";
|
|
7202
7545
|
/**Set Filter Param Name By Default It's 'query'*/
|
|
7203
7546
|
this.FilterParamName = "";
|
|
7547
|
+
this.DefaultImgUrl = "";
|
|
7204
7548
|
/** allow add value of TagInput dosn't exist in list*/
|
|
7205
7549
|
this.AllowNewSelection = false;
|
|
7206
7550
|
this.ValidationToken = null;
|
|
7551
|
+
this.TagInputMode = TagInputView.WithoutImage;
|
|
7552
|
+
this.ShowDescription = true;
|
|
7207
7553
|
}
|
|
7208
7554
|
}
|
|
7209
7555
|
|
|
@@ -7256,6 +7602,8 @@ class PagingOptions {
|
|
|
7256
7602
|
this.ForceDirection = ForceDirection.English;
|
|
7257
7603
|
/** Clear Filter button selector */
|
|
7258
7604
|
this.ResetFilterButtonName = null;
|
|
7605
|
+
this.DisableBlockUI = false;
|
|
7606
|
+
this.StartPagingCallback = null;
|
|
7259
7607
|
}
|
|
7260
7608
|
}
|
|
7261
7609
|
|
|
@@ -7664,5 +8012,5 @@ var FileType;
|
|
|
7664
8012
|
* Generated bundle index. Do not edit.
|
|
7665
8013
|
*/
|
|
7666
8014
|
|
|
7667
|
-
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, BBSFDatePipe, BBSFDateTimePipe, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlOptionsBase, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultilingualControlOptionsBase, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0 };
|
|
8015
|
+
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, AutocompleteTextBoxComponent, BBSFControlsModule, BBSFDatePipe, BBSFDateTimePipe, CalendarComponent, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxComponent, CheckBoxOptions, ConfirmationModalComponent, ConfirmationModalOptions, ControlLayout, ControlOptionsBase, ControlUtility, Country, CustomValidation, CustomValidator, DataType, DateInputComponent, DatePickerOptions, DefaultIntl, DropdownListComponent, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadComponent, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormComponent, FormOptions, GlobalSettings, HtmlEditorComponent, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, ImageUploaderComponent, InputType, Insert, JwPaginationComponent, LanguageMode, LanguageValidation, MapAutoCompleteComponent, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorComponent, MultiLingualHtmlEditorOptions, MultiLingualTextAreaComponent, MultiLingualTextAreaOptions, MultiLingualTextBoxComponent, MultiLingualTextBoxOptions, MultilingualControlOptionsBase, MultipleFileUploadModel, NgTemplateNameDirective, OnPagingFiltersChangeService, PagingActionMode, PagingComponent, PagingDTO, PagingOptions, Para, PermissionSets, PhoneComponent, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfileImageUploaderComponent, ProfilePictureDTO, RadioButtonComponent, RadioButtonItem, RadioButtonOptions, RangeNumber, RenderComponentService, RepeaterComponent, RepeaterField, RepeaterFieldBuilderComponent, RepeaterItemFieldComponent, RepeaterOptions, RepeaterTableComponent, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagInputView, TagsInputComponent, TagsInputDTO, TagsInputOptions, TextAreaComponent, TextAreaOptions, TextBoxOptions, TextboxComponent, ToggleSlideOptions, ToggleslideComponent, UploadPersonalImage, environment, options, ɵ0, BTagsInputComponent as ɵa };
|
|
7668
8016
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|