@bnsights/bbsf-controls 1.0.15 → 1.0.19

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.
@@ -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;
@@ -427,12 +432,12 @@
427
432
  var DateValue;
428
433
  if (this.options.SelectMode == 2) {
429
434
  for (var index = 0; index < item.value.length; index++) {
430
- item.value[index] = new Date(item.value[index]).toISOString();
435
+ item.value[index] = new Date(item.value[index]);
431
436
  }
432
437
  DateValue = item.value;
433
438
  }
434
439
  else {
435
- DateValue = new Date(item.value).toISOString();
440
+ DateValue = new Date(item.value);
436
441
  }
437
442
  this.DatePickerFormControl.setValue(DateValue);
438
443
  this.onChangeService.ChangeValue(this.options.Name);
@@ -449,6 +454,7 @@
449
454
  },] }
450
455
  ];
451
456
  DateInputComponent.ctorParameters = function () { return [
457
+ { type: common.DatePipe },
452
458
  { type: OnPagingFiltersChangeService },
453
459
  { type: ErrorMassageValidation },
454
460
  { type: ControlUtility },
@@ -473,9 +479,9 @@
473
479
  var MultipleFileUploadModel = /** @class */ (function () {
474
480
  function MultipleFileUploadModel() {
475
481
  this.CorrelationID_GUID = null;
476
- this.AddedFiles = [];
482
+ this.UploadedFiles = [];
477
483
  this.ExistingFiles = [];
478
- this.DeletedFiles = [];
484
+ this.RemovedFiles = [];
479
485
  }
480
486
  return MultipleFileUploadModel;
481
487
  }());
@@ -737,6 +743,7 @@
737
743
  FileType: file.type,
738
744
  FileBase64: reader_1.result.toString().split(',')[1],
739
745
  FileSizeInMB: ((file.size / 1000) / 1000),
746
+ NameWithExtension: file.name
740
747
  };
741
748
  if (_this.options.IsMultipleFile == false) {
742
749
  _this.fileUploadModel = new FileUploadModel();
@@ -746,10 +753,10 @@
746
753
  }
747
754
  else {
748
755
  FilesArray.push(AddedFile);
749
- _this.multipleFileUploadModel.AddedFiles = FilesArray;
756
+ _this.multipleFileUploadModel.UploadedFiles = FilesArray;
750
757
  if (_this.options.Value != null && _this.options.Value != undefined) {
751
758
  if (_this.options.Value.CorrelationID_GUID == null) {
752
- _this.multipleFileUploadModel.DeletedFiles = [];
759
+ _this.multipleFileUploadModel.RemovedFiles = [];
753
760
  }
754
761
  }
755
762
  _this.fileUploadFormControl.setValue(_this.multipleFileUploadModel);
@@ -779,32 +786,32 @@
779
786
  else {
780
787
  if (this.options.Value != null && this.options.Value != undefined) {
781
788
  if (this.options.Value.CorrelationID_GUID == null) {
782
- this.multipleFileUploadModel.DeletedFiles = [];
789
+ this.multipleFileUploadModel.RemovedFiles = [];
783
790
  }
784
791
  else {
785
- if (this.multipleFileUploadModel.DeletedFiles.length == 0) {
792
+ if (this.multipleFileUploadModel.RemovedFiles.length == 0) {
786
793
  var FileObject_1 = item.file.rawFile;
787
794
  var DeletedItemId = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName == FileObject_1.name; })[0];
788
795
  this.options.Value.ExistingFiles = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName != FileObject_1.name; });
789
- this.multipleFileUploadModel.DeletedFiles.push(DeletedItemId);
796
+ this.multipleFileUploadModel.RemovedFiles.push(DeletedItemId);
790
797
  }
791
798
  else {
792
799
  var FileObject_2 = item.file.rawFile;
793
- var deletedList = this.multipleFileUploadModel.DeletedFiles.filter(function (Object) { return Object.FileName == FileObject_2.name; });
800
+ var deletedList = this.multipleFileUploadModel.RemovedFiles.filter(function (Object) { return Object.FileName == FileObject_2.name; });
794
801
  if (deletedList.length == 0 || deletedList == undefined) {
795
802
  var DeletedItemId = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName == FileObject_2.name; })[0];
796
803
  this.options.Value.ExistingFiles = this.options.Value.ExistingFiles.filter(function (Object) { return Object.FileName != FileObject_2.name; });
797
- this.multipleFileUploadModel.DeletedFiles.push(DeletedItemId);
804
+ this.multipleFileUploadModel.RemovedFiles.push(DeletedItemId);
798
805
  }
799
806
  }
800
807
  }
801
808
  }
802
809
  else {
803
- this.multipleFileUploadModel.DeletedFiles = [];
810
+ this.multipleFileUploadModel.RemovedFiles = [];
804
811
  }
805
- var ItemList = this.group.get(this.options.Name).value.AddedFiles;
812
+ var ItemList = this.group.get(this.options.Name).value.UploadedFiles;
806
813
  ItemList = ItemList.filter(function (Object) { return Object.FileName != item._file.name; });
807
- this.multipleFileUploadModel.AddedFiles = ItemList;
814
+ this.multipleFileUploadModel.UploadedFiles = ItemList;
808
815
  if ((ItemList == null || ItemList == []) && this.options.IsRequired) {
809
816
  this.fileUploadFormControl.markAsTouched();
810
817
  this.fileUploadFormControl.invalid;
@@ -2391,6 +2398,7 @@
2391
2398
  this.UtilityService = UtilityService;
2392
2399
  this.controlValidationService = controlValidationService;
2393
2400
  this.globalSettings = globalSettings;
2401
+ this.OnChange = new i0.EventEmitter();
2394
2402
  this.SlideValue = false;
2395
2403
  ToggleslideComponent.controlContainerstatic = this.controlContainer;
2396
2404
  }
@@ -2423,6 +2431,7 @@
2423
2431
  return this.controlUtility.getErrorValidation(Errorsitem, this.options.CustomValidation);
2424
2432
  };
2425
2433
  ToggleslideComponent.prototype.changeValueToggle = function () {
2434
+ this.OnChange.emit(this.SlideValue);
2426
2435
  this.ToggleslideFormControl.setValue(this.SlideValue);
2427
2436
  };
2428
2437
  return ToggleslideComponent;
@@ -2446,7 +2455,8 @@
2446
2455
  ]; };
2447
2456
  ToggleslideComponent.propDecorators = {
2448
2457
  group: [{ type: i0.Input }],
2449
- options: [{ type: i0.Input }]
2458
+ options: [{ type: i0.Input }],
2459
+ OnChange: [{ type: i0.Output }]
2450
2460
  };
2451
2461
 
2452
2462
  var HtmlEditorComponent = /** @class */ (function () {
@@ -4271,7 +4281,7 @@
4271
4281
  this.IsFirstCall = true;
4272
4282
  this.getItemList(this.CurrentPage, true);
4273
4283
  };
4274
- PagingComponent.prototype.ngAfterViewInit = function () {
4284
+ PagingComponent.prototype.ngAfterViewChecked = function () {
4275
4285
  var _this = this;
4276
4286
  if (this.options.OnClickFiltersControlNames != null && this.options.OnClickFiltersControlNames.length > 0) {
4277
4287
  var OnClickFiltersControlNames = this.options.OnClickFiltersControlNames;
@@ -4376,6 +4386,8 @@
4376
4386
  else {
4377
4387
  if (this.options.Filters[index].FilterType == exports.FilterType.AutocompleteTextBox)
4378
4388
  ControlValue = JSON.stringify(ControlValue);
4389
+ if (this.options.Filters[index].FilterType == exports.FilterType.TagInput)
4390
+ ControlValue = JSON.stringify(ControlValue);
4379
4391
  params = params.append(this.options.Filters[index].ActionParameterName, ControlValue);
4380
4392
  }
4381
4393
  }
@@ -4666,6 +4678,7 @@
4666
4678
  this.controlValidationService = controlValidationService;
4667
4679
  this.globalSettings = globalSettings;
4668
4680
  this.OnChange = new i0.EventEmitter();
4681
+ this.MaskPattern = '';
4669
4682
  this.WordCount = 0;
4670
4683
  this.WordCountArray = 0;
4671
4684
  this.IsShowWordCount = false;
@@ -4729,7 +4742,7 @@
4729
4742
  switch (this.options.Type) {
4730
4743
  case exports.InputType.Email:
4731
4744
  this.validationRules.push(forms.Validators.compose([
4732
- this.controlUtility.patternValidator(/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/, { EmailValidationKey: this.EmailValidationKey }),
4745
+ 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
4746
  ]));
4734
4747
  break;
4735
4748
  case exports.InputType.EID:
@@ -5419,7 +5432,7 @@
5419
5432
  this.utilityService.notifyErrorMessage(errorMessage);
5420
5433
  }
5421
5434
  else {
5422
- errorMessage = "Server returned code: " + err.status + ", error message is: " + err.message;
5435
+ errorMessage = "error message is: " + (err.error ? err.error.Message : err.message);
5423
5436
  if (!this.options.DisableErrorNotification)
5424
5437
  this.utilityService.notifyErrorMessage(errorMessage);
5425
5438
  }
@@ -5602,6 +5615,7 @@
5602
5615
  listPlugin__default["default"],
5603
5616
  interactionPlugin__default["default"]
5604
5617
  ]);
5618
+ var ɵ0 = ControlUtility.getLocal();
5605
5619
  var BBSFControlsModule = /** @class */ (function () {
5606
5620
  function BBSFControlsModule(injector, translate) {
5607
5621
  this.injector = injector;
@@ -5700,7 +5714,9 @@
5700
5714
  // ControlValidationService,
5701
5715
  forms.FormGroupDirective,
5702
5716
  ngBootstrap.NgbModal,
5703
- ngBootstrap.NgbActiveModal
5717
+ ngBootstrap.NgbActiveModal,
5718
+ common.DatePipe,
5719
+ { provide: ngPickDatetime.OWL_DATE_TIME_LOCALE, useValue: ɵ0 },
5704
5720
  ],
5705
5721
  schemas: [
5706
5722
  i0.NO_ERRORS_SCHEMA
@@ -6683,6 +6699,7 @@
6683
6699
  exports.UploadPersonalImage = UploadPersonalImage;
6684
6700
  exports.environment = environment;
6685
6701
  exports.options = options;
6702
+ exports["ɵ0"] = ɵ0;
6686
6703
  exports["ɵa"] = DateInputComponent;
6687
6704
  exports["ɵb"] = FileUploadComponent;
6688
6705
  exports["ɵc"] = MultiLingualTextBoxComponent;