@bnsights/bbsf-controls 1.0.17 → 1.0.21
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.21.tgz +0 -0
- package/bnsights-bbsf-controls.metadata.json +1 -1
- package/bundles/bnsights-bbsf-controls.umd.js +38 -20
- 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 +8 -4
- 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 +40 -23
- 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 +3 -3
- package/bnsights-bbsf-controls-1.0.17.tgz +0 -0
|
@@ -269,6 +269,10 @@
|
|
|
269
269
|
FormControl.setValidators(ValidationRole);
|
|
270
270
|
FormControl.updateValueAndValidity();
|
|
271
271
|
};
|
|
272
|
+
ControlUtility.getLocal = function () {
|
|
273
|
+
var lang = localStorage.getItem('language');
|
|
274
|
+
return lang == "ar" ? "ar" : "en-UK";
|
|
275
|
+
};
|
|
272
276
|
ControlUtility.prototype.IsValid = function (FormControl) {
|
|
273
277
|
FormControl.markAsTouched();
|
|
274
278
|
};
|
|
@@ -324,8 +328,9 @@
|
|
|
324
328
|
|
|
325
329
|
var DateInputComponent = /** @class */ (function () {
|
|
326
330
|
// tslint:disable-next-line: max-line-length
|
|
327
|
-
function DateInputComponent(onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService) {
|
|
331
|
+
function DateInputComponent(datepipe, onChangeService, ErrorHandler, controlUtility, controlContainer, DateInputControlHost, UtilityService, translate, controlValidationService) {
|
|
328
332
|
var _this = this;
|
|
333
|
+
this.datepipe = datepipe;
|
|
329
334
|
this.onChangeService = onChangeService;
|
|
330
335
|
this.ErrorHandler = ErrorHandler;
|
|
331
336
|
this.controlUtility = controlUtility;
|
|
@@ -425,14 +430,15 @@
|
|
|
425
430
|
};
|
|
426
431
|
DateInputComponent.prototype.onDateSelect = function (item) {
|
|
427
432
|
var DateValue;
|
|
433
|
+
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
|
428
434
|
if (this.options.SelectMode == 2) {
|
|
429
435
|
for (var index = 0; index < item.value.length; index++) {
|
|
430
|
-
item.value[index] = new Date(item.value[index]).toISOString();
|
|
436
|
+
item.value[index] = new Date(item.value[index] - tzoffset).toISOString().slice(0, -1);
|
|
431
437
|
}
|
|
432
438
|
DateValue = item.value;
|
|
433
439
|
}
|
|
434
440
|
else {
|
|
435
|
-
DateValue = new Date(item.value).toISOString();
|
|
441
|
+
DateValue = new Date(item.value - tzoffset).toISOString().slice(0, -1);
|
|
436
442
|
}
|
|
437
443
|
this.DatePickerFormControl.setValue(DateValue);
|
|
438
444
|
this.onChangeService.ChangeValue(this.options.Name);
|
|
@@ -449,6 +455,7 @@
|
|
|
449
455
|
},] }
|
|
450
456
|
];
|
|
451
457
|
DateInputComponent.ctorParameters = function () { return [
|
|
458
|
+
{ type: common.DatePipe },
|
|
452
459
|
{ type: OnPagingFiltersChangeService },
|
|
453
460
|
{ type: ErrorMassageValidation },
|
|
454
461
|
{ type: ControlUtility },
|
|
@@ -473,9 +480,9 @@
|
|
|
473
480
|
var MultipleFileUploadModel = /** @class */ (function () {
|
|
474
481
|
function MultipleFileUploadModel() {
|
|
475
482
|
this.CorrelationID_GUID = null;
|
|
476
|
-
this.
|
|
483
|
+
this.UploadedFiles = [];
|
|
477
484
|
this.ExistingFiles = [];
|
|
478
|
-
this.
|
|
485
|
+
this.RemovedFiles = [];
|
|
479
486
|
}
|
|
480
487
|
return MultipleFileUploadModel;
|
|
481
488
|
}());
|
|
@@ -737,6 +744,7 @@
|
|
|
737
744
|
FileType: file.type,
|
|
738
745
|
FileBase64: reader_1.result.toString().split(',')[1],
|
|
739
746
|
FileSizeInMB: ((file.size / 1000) / 1000),
|
|
747
|
+
NameWithExtension: file.name
|
|
740
748
|
};
|
|
741
749
|
if (_this.options.IsMultipleFile == false) {
|
|
742
750
|
_this.fileUploadModel = new FileUploadModel();
|
|
@@ -746,10 +754,10 @@
|
|
|
746
754
|
}
|
|
747
755
|
else {
|
|
748
756
|
FilesArray.push(AddedFile);
|
|
749
|
-
_this.multipleFileUploadModel.
|
|
757
|
+
_this.multipleFileUploadModel.UploadedFiles = FilesArray;
|
|
750
758
|
if (_this.options.Value != null && _this.options.Value != undefined) {
|
|
751
759
|
if (_this.options.Value.CorrelationID_GUID == null) {
|
|
752
|
-
_this.multipleFileUploadModel.
|
|
760
|
+
_this.multipleFileUploadModel.RemovedFiles = [];
|
|
753
761
|
}
|
|
754
762
|
}
|
|
755
763
|
_this.fileUploadFormControl.setValue(_this.multipleFileUploadModel);
|
|
@@ -779,32 +787,32 @@
|
|
|
779
787
|
else {
|
|
780
788
|
if (this.options.Value != null && this.options.Value != undefined) {
|
|
781
789
|
if (this.options.Value.CorrelationID_GUID == null) {
|
|
782
|
-
this.multipleFileUploadModel.
|
|
790
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
783
791
|
}
|
|
784
792
|
else {
|
|
785
|
-
if (this.multipleFileUploadModel.
|
|
793
|
+
if (this.multipleFileUploadModel.RemovedFiles.length == 0) {
|
|
786
794
|
var FileObject_1 = item.file.rawFile;
|
|
787
795
|
var DeletedItemId = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName == FileObject_1.name; })[0];
|
|
788
796
|
this.options.Value.ExistingFiles = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName != FileObject_1.name; });
|
|
789
|
-
this.multipleFileUploadModel.
|
|
797
|
+
this.multipleFileUploadModel.RemovedFiles.push(DeletedItemId);
|
|
790
798
|
}
|
|
791
799
|
else {
|
|
792
800
|
var FileObject_2 = item.file.rawFile;
|
|
793
|
-
var deletedList = this.multipleFileUploadModel.
|
|
801
|
+
var deletedList = this.multipleFileUploadModel.RemovedFiles.filter(function (Object) { return Object.FileName == FileObject_2.name; });
|
|
794
802
|
if (deletedList.length == 0 || deletedList == undefined) {
|
|
795
803
|
var DeletedItemId = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName == FileObject_2.name; })[0];
|
|
796
804
|
this.options.Value.ExistingFiles = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName != FileObject_2.name; });
|
|
797
|
-
this.multipleFileUploadModel.
|
|
805
|
+
this.multipleFileUploadModel.RemovedFiles.push(DeletedItemId);
|
|
798
806
|
}
|
|
799
807
|
}
|
|
800
808
|
}
|
|
801
809
|
}
|
|
802
810
|
else {
|
|
803
|
-
this.multipleFileUploadModel.
|
|
811
|
+
this.multipleFileUploadModel.RemovedFiles = [];
|
|
804
812
|
}
|
|
805
|
-
var ItemList = this.group.get(this.options.Name).value.
|
|
813
|
+
var ItemList = this.group.get(this.options.Name).value.UploadedFiles;
|
|
806
814
|
ItemList = ItemList.filter(function (Object) { return Object.FileName != item._file.name; });
|
|
807
|
-
this.multipleFileUploadModel.
|
|
815
|
+
this.multipleFileUploadModel.UploadedFiles = ItemList;
|
|
808
816
|
if ((ItemList == null || ItemList == []) && this.options.IsRequired) {
|
|
809
817
|
this.fileUploadFormControl.markAsTouched();
|
|
810
818
|
this.fileUploadFormControl.invalid;
|
|
@@ -2391,6 +2399,7 @@
|
|
|
2391
2399
|
this.UtilityService = UtilityService;
|
|
2392
2400
|
this.controlValidationService = controlValidationService;
|
|
2393
2401
|
this.globalSettings = globalSettings;
|
|
2402
|
+
this.OnChange = new i0.EventEmitter();
|
|
2394
2403
|
this.SlideValue = false;
|
|
2395
2404
|
ToggleslideComponent.controlContainerstatic = this.controlContainer;
|
|
2396
2405
|
}
|
|
@@ -2423,6 +2432,7 @@
|
|
|
2423
2432
|
return this.controlUtility.getErrorValidation(Errorsitem, this.options.CustomValidation);
|
|
2424
2433
|
};
|
|
2425
2434
|
ToggleslideComponent.prototype.changeValueToggle = function () {
|
|
2435
|
+
this.OnChange.emit(this.SlideValue);
|
|
2426
2436
|
this.ToggleslideFormControl.setValue(this.SlideValue);
|
|
2427
2437
|
};
|
|
2428
2438
|
return ToggleslideComponent;
|
|
@@ -2446,7 +2456,8 @@
|
|
|
2446
2456
|
]; };
|
|
2447
2457
|
ToggleslideComponent.propDecorators = {
|
|
2448
2458
|
group: [{ type: i0.Input }],
|
|
2449
|
-
options: [{ type: i0.Input }]
|
|
2459
|
+
options: [{ type: i0.Input }],
|
|
2460
|
+
OnChange: [{ type: i0.Output }]
|
|
2450
2461
|
};
|
|
2451
2462
|
|
|
2452
2463
|
var HtmlEditorComponent = /** @class */ (function () {
|
|
@@ -4271,7 +4282,7 @@
|
|
|
4271
4282
|
this.IsFirstCall = true;
|
|
4272
4283
|
this.getItemList(this.CurrentPage, true);
|
|
4273
4284
|
};
|
|
4274
|
-
PagingComponent.prototype.
|
|
4285
|
+
PagingComponent.prototype.ngAfterViewChecked = function () {
|
|
4275
4286
|
var _this = this;
|
|
4276
4287
|
if (this.options.OnClickFiltersControlNames != null && this.options.OnClickFiltersControlNames.length > 0) {
|
|
4277
4288
|
var OnClickFiltersControlNames = this.options.OnClickFiltersControlNames;
|
|
@@ -4376,6 +4387,8 @@
|
|
|
4376
4387
|
else {
|
|
4377
4388
|
if (this.options.Filters[index].FilterType == exports.FilterType.AutocompleteTextBox)
|
|
4378
4389
|
ControlValue = JSON.stringify(ControlValue);
|
|
4390
|
+
if (this.options.Filters[index].FilterType == exports.FilterType.TagInput)
|
|
4391
|
+
ControlValue = JSON.stringify(ControlValue);
|
|
4379
4392
|
params = params.append(this.options.Filters[index].ActionParameterName, ControlValue);
|
|
4380
4393
|
}
|
|
4381
4394
|
}
|
|
@@ -4666,6 +4679,7 @@
|
|
|
4666
4679
|
this.controlValidationService = controlValidationService;
|
|
4667
4680
|
this.globalSettings = globalSettings;
|
|
4668
4681
|
this.OnChange = new i0.EventEmitter();
|
|
4682
|
+
this.MaskPattern = '';
|
|
4669
4683
|
this.WordCount = 0;
|
|
4670
4684
|
this.WordCountArray = 0;
|
|
4671
4685
|
this.IsShowWordCount = false;
|
|
@@ -4729,7 +4743,7 @@
|
|
|
4729
4743
|
switch (this.options.Type) {
|
|
4730
4744
|
case exports.InputType.Email:
|
|
4731
4745
|
this.validationRules.push(forms.Validators.compose([
|
|
4732
|
-
this.controlUtility.patternValidator(/^[
|
|
4746
|
+
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 }),
|
|
4733
4747
|
]));
|
|
4734
4748
|
break;
|
|
4735
4749
|
case exports.InputType.EID:
|
|
@@ -5419,7 +5433,7 @@
|
|
|
5419
5433
|
this.utilityService.notifyErrorMessage(errorMessage);
|
|
5420
5434
|
}
|
|
5421
5435
|
else {
|
|
5422
|
-
errorMessage = "
|
|
5436
|
+
errorMessage = "error message is: " + (err.error ? err.error.Message : err.message);
|
|
5423
5437
|
if (!this.options.DisableErrorNotification)
|
|
5424
5438
|
this.utilityService.notifyErrorMessage(errorMessage);
|
|
5425
5439
|
}
|
|
@@ -5602,6 +5616,7 @@
|
|
|
5602
5616
|
listPlugin__default["default"],
|
|
5603
5617
|
interactionPlugin__default["default"]
|
|
5604
5618
|
]);
|
|
5619
|
+
var ɵ0 = ControlUtility.getLocal();
|
|
5605
5620
|
var BBSFControlsModule = /** @class */ (function () {
|
|
5606
5621
|
function BBSFControlsModule(injector, translate) {
|
|
5607
5622
|
this.injector = injector;
|
|
@@ -5700,7 +5715,9 @@
|
|
|
5700
5715
|
// ControlValidationService,
|
|
5701
5716
|
forms.FormGroupDirective,
|
|
5702
5717
|
ngBootstrap.NgbModal,
|
|
5703
|
-
ngBootstrap.NgbActiveModal
|
|
5718
|
+
ngBootstrap.NgbActiveModal,
|
|
5719
|
+
common.DatePipe,
|
|
5720
|
+
{ provide: ngPickDatetime.OWL_DATE_TIME_LOCALE, useValue: ɵ0 },
|
|
5704
5721
|
],
|
|
5705
5722
|
schemas: [
|
|
5706
5723
|
i0.NO_ERRORS_SCHEMA
|
|
@@ -6683,6 +6700,7 @@
|
|
|
6683
6700
|
exports.UploadPersonalImage = UploadPersonalImage;
|
|
6684
6701
|
exports.environment = environment;
|
|
6685
6702
|
exports.options = options;
|
|
6703
|
+
exports["ɵ0"] = ɵ0;
|
|
6686
6704
|
exports["ɵa"] = DateInputComponent;
|
|
6687
6705
|
exports["ɵb"] = FileUploadComponent;
|
|
6688
6706
|
exports["ɵc"] = MultiLingualTextBoxComponent;
|