@bnsights/bbsf-controls 1.0.16 → 1.0.20
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/bnsights-bbsf-controls-1.0.20.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +35 -18
- package/bundles/bnsights-bbsf-controls.umd.js.map +1 -1
- package/esm2015/lib/Shared/Models/MultipleFileUploadModel.js +3 -3
- package/esm2015/lib/Shared/services/ControlUtility.js +5 -1
- package/esm2015/lib/controls/DateTimePicker/DateTimePicker.component.js +5 -2
- package/esm2015/lib/controls/FileUplaod/FileUplaod.component.js +12 -11
- package/esm2015/lib/controls/Form/Form.component.js +2 -2
- package/esm2015/lib/controls/Paging/Paging.component.js +4 -2
- package/esm2015/lib/controls/TextBox/TextBox.component.js +3 -2
- package/esm2015/lib/controls/Toggleslide/toggleslide.component.js +6 -3
- package/esm2015/lib/controls/bbsf-controls.module.js +8 -4
- package/fesm2015/bnsights-bbsf-controls.js +37 -21
- package/fesm2015/bnsights-bbsf-controls.js.map +1 -1
- package/lib/Shared/Models/MultipleFileUploadModel.d.ts +2 -2
- package/lib/Shared/services/ControlUtility.d.ts +1 -0
- package/lib/controls/DateTimePicker/DateTimePicker.component.d.ts +3 -1
- package/lib/controls/Paging/Paging.component.d.ts +1 -1
- package/lib/controls/Toggleslide/toggleslide.component.d.ts +2 -1
- package/package.json +5 -5
- package/bnsights-bbsf-controls-1.0.16.tgz +0 -0
|
@@ -13,7 +13,7 @@ import { ToastrModule } from 'ngx-toastr';
|
|
|
13
13
|
import { NgxPermissionsModule } from 'ngx-permissions';
|
|
14
14
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
15
15
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
16
|
-
import { CommonModule } from '@angular/common';
|
|
16
|
+
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';
|
|
@@ -21,7 +21,7 @@ import { Subject, Observable, noop, of } from 'rxjs';
|
|
|
21
21
|
import { FileUploader, FileLikeObject, FileUploadModule } from 'ng2-file-upload';
|
|
22
22
|
import { __decorate, __awaiter } from 'tslib';
|
|
23
23
|
import { Expose, plainToClass } from 'class-transformer';
|
|
24
|
-
import { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
|
|
24
|
+
import { OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_LOCALE } from 'ng-pick-datetime';
|
|
25
25
|
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
|
|
26
26
|
import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown';
|
|
27
27
|
import { NgxSummernoteModule } from 'ngx-summernote';
|
|
@@ -284,6 +284,10 @@ class ControlUtility {
|
|
|
284
284
|
FormControl.setValidators(ValidationRole);
|
|
285
285
|
FormControl.updateValueAndValidity();
|
|
286
286
|
}
|
|
287
|
+
static getLocal() {
|
|
288
|
+
let lang = localStorage.getItem('language');
|
|
289
|
+
return lang == "ar" ? "ar" : "en-UK";
|
|
290
|
+
}
|
|
287
291
|
IsValid(FormControl) {
|
|
288
292
|
FormControl.markAsTouched();
|
|
289
293
|
}
|
|
@@ -337,7 +341,8 @@ OnPagingFiltersChangeService.decorators = [
|
|
|
337
341
|
|
|
338
342
|
class DateInputComponent {
|
|
339
343
|
// tslint:disable-next-line: max-line-length
|
|
340
|
-
constructor(onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService) {
|
|
344
|
+
constructor(datepipe, onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService) {
|
|
345
|
+
this.datepipe = datepipe;
|
|
341
346
|
this.onChangeService = onChangeService;
|
|
342
347
|
this.ErrorHandler = ErrorHandler;
|
|
343
348
|
this.controlUtility = controlUtility;
|
|
@@ -459,6 +464,7 @@ DateInputComponent.decorators = [
|
|
|
459
464
|
},] }
|
|
460
465
|
];
|
|
461
466
|
DateInputComponent.ctorParameters = () => [
|
|
467
|
+
{ type: DatePipe },
|
|
462
468
|
{ type: OnPagingFiltersChangeService },
|
|
463
469
|
{ type: ErrorMassageValidation },
|
|
464
470
|
{ type: ControlUtility },
|
|
@@ -480,9 +486,9 @@ class FileUploadModel {
|
|
|
480
486
|
class MultipleFileUploadModel {
|
|
481
487
|
constructor() {
|
|
482
488
|
this.CorrelationID_GUID = null;
|
|
483
|
-
this.
|
|
489
|
+
this.UploadedFiles = [];
|
|
484
490
|
this.ExistingFiles = [];
|
|
485
|
-
this.
|
|
491
|
+
this.RemovedFiles = [];
|
|
486
492
|
}
|
|
487
493
|
}
|
|
488
494
|
|
|
@@ -739,6 +745,7 @@ class FileUploadComponent {
|
|
|
739
745
|
FileType: file.type,
|
|
740
746
|
FileBase64: reader.result.toString().split(',')[1],
|
|
741
747
|
FileSizeInMB: ((file.size / 1000) / 1000),
|
|
748
|
+
NameWithExtension: file.name
|
|
742
749
|
};
|
|
743
750
|
if (this.options.IsMultipleFile == false) {
|
|
744
751
|
this.fileUploadModel = new FileUploadModel();
|
|
@@ -748,10 +755,10 @@ class FileUploadComponent {
|
|
|
748
755
|
}
|
|
749
756
|
else {
|
|
750
757
|
FilesArray.push(AddedFile);
|
|
751
|
-
this.multipleFileUploadModel.
|
|
758
|
+
this.multipleFileUploadModel.UploadedFiles = FilesArray;
|
|
752
759
|
if (this.options.Value != null && this.options.Value != undefined) {
|
|
753
760
|
if (this.options.Value.CorrelationID_GUID == null) {
|
|
754
|
-
this.multipleFileUploadModel.
|
|
761
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
755
762
|
}
|
|
756
763
|
}
|
|
757
764
|
this.fileUploadFormControl.setValue(this.multipleFileUploadModel);
|
|
@@ -775,32 +782,32 @@ class FileUploadComponent {
|
|
|
775
782
|
else {
|
|
776
783
|
if (this.options.Value != null && this.options.Value != undefined) {
|
|
777
784
|
if (this.options.Value.CorrelationID_GUID == null) {
|
|
778
|
-
this.multipleFileUploadModel.
|
|
785
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
779
786
|
}
|
|
780
787
|
else {
|
|
781
|
-
if (this.multipleFileUploadModel.
|
|
788
|
+
if (this.multipleFileUploadModel.RemovedFiles.length == 0) {
|
|
782
789
|
let FileObject = item.file.rawFile;
|
|
783
790
|
let DeletedItemId = this.options.Value.ExistingFiles.filter(Object => Object.FileName == FileObject.name)[0];
|
|
784
791
|
this.options.Value.ExistingFiles = this.options.Value.ExistingFiles.filter(Object => Object.FileName != FileObject.name);
|
|
785
|
-
this.multipleFileUploadModel.
|
|
792
|
+
this.multipleFileUploadModel.RemovedFiles.push(DeletedItemId);
|
|
786
793
|
}
|
|
787
794
|
else {
|
|
788
795
|
let FileObject = item.file.rawFile;
|
|
789
|
-
let deletedList = this.multipleFileUploadModel.
|
|
796
|
+
let deletedList = this.multipleFileUploadModel.RemovedFiles.filter(Object => Object.FileName == FileObject.name);
|
|
790
797
|
if (deletedList.length == 0 || deletedList == undefined) {
|
|
791
798
|
let DeletedItemId = this.options.Value.ExistingFiles.filter(Object => Object.FileName == FileObject.name)[0];
|
|
792
799
|
this.options.Value.ExistingFiles = this.options.Value.ExistingFiles.filter(Object => Object.FileName != FileObject.name);
|
|
793
|
-
this.multipleFileUploadModel.
|
|
800
|
+
this.multipleFileUploadModel.RemovedFiles.push(DeletedItemId);
|
|
794
801
|
}
|
|
795
802
|
}
|
|
796
803
|
}
|
|
797
804
|
}
|
|
798
805
|
else {
|
|
799
|
-
this.multipleFileUploadModel.
|
|
806
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
800
807
|
}
|
|
801
|
-
let ItemList = this.group.get(this.options.Name).value.
|
|
808
|
+
let ItemList = this.group.get(this.options.Name).value.UploadedFiles;
|
|
802
809
|
ItemList = ItemList.filter(Object => Object.FileName != item._file.name);
|
|
803
|
-
this.multipleFileUploadModel.
|
|
810
|
+
this.multipleFileUploadModel.UploadedFiles = ItemList;
|
|
804
811
|
if ((ItemList == null || ItemList == []) && this.options.IsRequired) {
|
|
805
812
|
this.fileUploadFormControl.markAsTouched();
|
|
806
813
|
this.fileUploadFormControl.invalid;
|
|
@@ -2026,6 +2033,7 @@ class ToggleslideComponent {
|
|
|
2026
2033
|
this.UtilityService = UtilityService;
|
|
2027
2034
|
this.controlValidationService = controlValidationService;
|
|
2028
2035
|
this.globalSettings = globalSettings;
|
|
2036
|
+
this.OnChange = new EventEmitter();
|
|
2029
2037
|
this.SlideValue = false;
|
|
2030
2038
|
ToggleslideComponent.controlContainerstatic = this.controlContainer;
|
|
2031
2039
|
}
|
|
@@ -2058,6 +2066,7 @@ class ToggleslideComponent {
|
|
|
2058
2066
|
return this.controlUtility.getErrorValidation(Errorsitem, this.options.CustomValidation);
|
|
2059
2067
|
}
|
|
2060
2068
|
changeValueToggle() {
|
|
2069
|
+
this.OnChange.emit(this.SlideValue);
|
|
2061
2070
|
this.ToggleslideFormControl.setValue(this.SlideValue);
|
|
2062
2071
|
}
|
|
2063
2072
|
}
|
|
@@ -2080,7 +2089,8 @@ ToggleslideComponent.ctorParameters = () => [
|
|
|
2080
2089
|
];
|
|
2081
2090
|
ToggleslideComponent.propDecorators = {
|
|
2082
2091
|
group: [{ type: Input }],
|
|
2083
|
-
options: [{ type: Input }]
|
|
2092
|
+
options: [{ type: Input }],
|
|
2093
|
+
OnChange: [{ type: Output }]
|
|
2084
2094
|
};
|
|
2085
2095
|
|
|
2086
2096
|
class HtmlEditorComponent {
|
|
@@ -3831,7 +3841,7 @@ class PagingComponent {
|
|
|
3831
3841
|
this.IsFirstCall = true;
|
|
3832
3842
|
this.getItemList(this.CurrentPage, true);
|
|
3833
3843
|
}
|
|
3834
|
-
|
|
3844
|
+
ngAfterViewChecked() {
|
|
3835
3845
|
if (this.options.OnClickFiltersControlNames != null && this.options.OnClickFiltersControlNames.length > 0) {
|
|
3836
3846
|
const OnClickFiltersControlNames = this.options.OnClickFiltersControlNames;
|
|
3837
3847
|
for (let index = 0; index < OnClickFiltersControlNames.length; index++) {
|
|
@@ -3933,6 +3943,8 @@ class PagingComponent {
|
|
|
3933
3943
|
else {
|
|
3934
3944
|
if (this.options.Filters[index].FilterType == FilterType.AutocompleteTextBox)
|
|
3935
3945
|
ControlValue = JSON.stringify(ControlValue);
|
|
3946
|
+
if (this.options.Filters[index].FilterType == FilterType.TagInput)
|
|
3947
|
+
ControlValue = JSON.stringify(ControlValue);
|
|
3936
3948
|
params = params.append(this.options.Filters[index].ActionParameterName, ControlValue);
|
|
3937
3949
|
}
|
|
3938
3950
|
}
|
|
@@ -4235,6 +4247,7 @@ class TextboxComponent {
|
|
|
4235
4247
|
this.controlValidationService = controlValidationService;
|
|
4236
4248
|
this.globalSettings = globalSettings;
|
|
4237
4249
|
this.OnChange = new EventEmitter();
|
|
4250
|
+
this.MaskPattern = '';
|
|
4238
4251
|
this.WordCount = 0;
|
|
4239
4252
|
this.WordCountArray = 0;
|
|
4240
4253
|
this.IsShowWordCount = false;
|
|
@@ -4297,7 +4310,7 @@ class TextboxComponent {
|
|
|
4297
4310
|
switch (this.options.Type) {
|
|
4298
4311
|
case InputType.Email:
|
|
4299
4312
|
this.validationRules.push(Validators.compose([
|
|
4300
|
-
this.controlUtility.patternValidator(/^[
|
|
4313
|
+
this.controlUtility.patternValidator(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, { EmailValidationKey: this.EmailValidationKey }),
|
|
4301
4314
|
]));
|
|
4302
4315
|
break;
|
|
4303
4316
|
case InputType.EID:
|
|
@@ -4962,7 +4975,7 @@ class FormComponent {
|
|
|
4962
4975
|
this.utilityService.notifyErrorMessage(errorMessage);
|
|
4963
4976
|
}
|
|
4964
4977
|
else {
|
|
4965
|
-
errorMessage = `
|
|
4978
|
+
errorMessage = `error message is: ${err.error ? err.error.Message : err.message}`;
|
|
4966
4979
|
if (!this.options.DisableErrorNotification)
|
|
4967
4980
|
this.utilityService.notifyErrorMessage(errorMessage);
|
|
4968
4981
|
}
|
|
@@ -5141,6 +5154,7 @@ FullCalendarModule.registerPlugins([
|
|
|
5141
5154
|
listPlugin,
|
|
5142
5155
|
interactionPlugin
|
|
5143
5156
|
]);
|
|
5157
|
+
const ɵ0 = ControlUtility.getLocal();
|
|
5144
5158
|
class BBSFControlsModule {
|
|
5145
5159
|
constructor(injector, translate) {
|
|
5146
5160
|
this.injector = injector;
|
|
@@ -5238,7 +5252,9 @@ BBSFControlsModule.decorators = [
|
|
|
5238
5252
|
// ControlValidationService,
|
|
5239
5253
|
FormGroupDirective,
|
|
5240
5254
|
NgbModal,
|
|
5241
|
-
NgbActiveModal
|
|
5255
|
+
NgbActiveModal,
|
|
5256
|
+
DatePipe,
|
|
5257
|
+
{ provide: OWL_DATE_TIME_LOCALE, useValue: ɵ0 },
|
|
5242
5258
|
],
|
|
5243
5259
|
schemas: [
|
|
5244
5260
|
NO_ERRORS_SCHEMA
|
|
@@ -6121,5 +6137,5 @@ var FileType;
|
|
|
6121
6137
|
* Generated bundle index. Do not edit.
|
|
6122
6138
|
*/
|
|
6123
6139
|
|
|
6124
|
-
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, BBSFControlsModule, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxOptions, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DatePickerOptions, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormOptions, GlobalSettings, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, InputType, Insert, LanguageMode, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorOptions, MultiLingualTextAreaOptions, MultiLingualTextBoxOptions, MultipleFileUploadModel, OnPagingFiltersChangeService, PagingActionMode, PagingDTO, PagingOptions, Para, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfilePictureDTO, RadioButtonItem, RadioButtonOptions, RangeNumber, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputDTO, TagsInputOptions, TextAreaOptions, TextBoxOptions, ToggleSlideOptions, UploadPersonalImage, environment, options, DateInputComponent as ɵa, FileUploadComponent as ɵb, MultiLingualTextBoxComponent as ɵc, TextboxComponent as ɵd, TextAreaComponent as ɵe, MultiLingualTextAreaComponent as ɵf, CheckBoxComponent as ɵg, DropdownListComponent as ɵh, PhoneComponent as ɵi, ToggleslideComponent as ɵj, HtmlEditorComponent as ɵk, MultiLingualHtmlEditorComponent as ɵl, ImageUploaderComponent as ɵm, ProfileImageUploaderComponent as ɵn, CalendarComponent as ɵo, MapAutoCompleteComponent as ɵp, AutocompleteTextBoxComponent as ɵq, TagsInputComponent as ɵr, PagingComponent as ɵs, JwPaginationComponent as ɵt, RadioButtonComponent as ɵu, FormComponent as ɵv, ConfirmationModalComponent as ɵw };
|
|
6140
|
+
export { AppInjector, Attribute, AutocompleteDTO, AutocompleteOptions, BBSFControlsModule, CalendarEventDTO, CalendarOptions, CalendarView, CancelDTO, CheckBoxOptions, ConfirmationModalOptions, ControlLayout, ControlUtility, Country, CustomValidation, CustomValidator, DatePickerOptions, DropdownListItem, DropdownOptions, EditPersonalImage, EnglishArabicDTO, ErrorMassageValidation, FileType, FileUploadModel, FileUploadOptions, FilterItem, FilterType, FontSize, ForceDirection, FormOptions, GlobalSettings, HtmlEditorOptions, IconPosition, ImageType, ImageUploadOptions, InputType, Insert, LanguageMode, MapAutoCompleteOptions, MapAutocompleteDTO, MenuListType, Misc, MultiLingualHtmlEditorOptions, MultiLingualTextAreaOptions, MultiLingualTextBoxOptions, MultipleFileUploadModel, OnPagingFiltersChangeService, PagingActionMode, PagingDTO, PagingOptions, Para, PhoneOptions, PickerType, ProfileImageUploadOptions, ProfilePictureDTO, RadioButtonItem, RadioButtonOptions, RangeNumber, SaveDTO, SelectMode, StartView, Style, StyleConfirmationMode, TagsInputDTO, TagsInputOptions, TextAreaOptions, TextBoxOptions, ToggleSlideOptions, UploadPersonalImage, environment, options, ɵ0, DateInputComponent as ɵa, FileUploadComponent as ɵb, MultiLingualTextBoxComponent as ɵc, TextboxComponent as ɵd, TextAreaComponent as ɵe, MultiLingualTextAreaComponent as ɵf, CheckBoxComponent as ɵg, DropdownListComponent as ɵh, PhoneComponent as ɵi, ToggleslideComponent as ɵj, HtmlEditorComponent as ɵk, MultiLingualHtmlEditorComponent as ɵl, ImageUploaderComponent as ɵm, ProfileImageUploaderComponent as ɵn, CalendarComponent as ɵo, MapAutoCompleteComponent as ɵp, AutocompleteTextBoxComponent as ɵq, TagsInputComponent as ɵr, PagingComponent as ɵs, JwPaginationComponent as ɵt, RadioButtonComponent as ɵu, FormComponent as ɵv, ConfirmationModalComponent as ɵw };
|
|
6125
6141
|
//# sourceMappingURL=bnsights-bbsf-controls.js.map
|