@magic-xpa/angular 4.1100.0-dev4110.169 → 4.1100.0-dev4110.170

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.
@@ -3444,7 +3444,6 @@ class MgformatMagicDirective {
3444
3444
  onChangeEvent(event) {
3445
3445
  let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
3446
3446
  let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
3447
- const century = Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx());
3448
3447
  switch (attr) {
3449
3448
  case StorageAttribute.ALPHA:
3450
3449
  case StorageAttribute.UNICODE:
@@ -3453,11 +3452,15 @@ class MgformatMagicDirective {
3453
3452
  case StorageAttribute.BOOLEAN:
3454
3453
  this.formatBoolean(control);
3455
3454
  break;
3456
- case StorageAttribute.DATE:
3457
- this.formatDateWithCentury(event.target.value, century, control);
3458
- break;
3459
3455
  }
3460
3456
  }
3457
+ onBlurEvent(event) {
3458
+ let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
3459
+ let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
3460
+ const century = Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx());
3461
+ if (attr == StorageAttribute.DATE)
3462
+ this.formatDateWithCentury(event.target.value, century, control);
3463
+ }
3461
3464
  formatDateWithCentury(userInput, century, control) {
3462
3465
  const dateFormat = this._task.mgInputDateFormat;
3463
3466
  const separator = userInput.includes('/') ? '/' : "-";
@@ -3796,7 +3799,7 @@ class MgformatMagicDirective {
3796
3799
  }
3797
3800
  MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
3798
3801
  MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3799
- i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("paste", function MgformatMagicDirective_paste_HostBindingHandler($event) { return ctx.onPaste($event); })("input", function MgformatMagicDirective_input_HostBindingHandler($event) { return ctx.onInputEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
3802
+ i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("paste", function MgformatMagicDirective_paste_HostBindingHandler($event) { return ctx.onPaste($event); })("input", function MgformatMagicDirective_input_HostBindingHandler($event) { return ctx.onInputEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); })("blur", function MgformatMagicDirective_blur_HostBindingHandler($event) { return ctx.onBlurEvent($event); });
3800
3803
  } } });
3801
3804
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
3802
3805
  type: Directive,
@@ -3815,6 +3818,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
3815
3818
  }], onChangeEvent: [{
3816
3819
  type: HostListener,
3817
3820
  args: ['change', ['$event']]
3821
+ }], onBlurEvent: [{
3822
+ type: HostListener,
3823
+ args: ['blur', ['$event']]
3818
3824
  }] }); })();
3819
3825
 
3820
3826
  class TimeMagicPipe extends DatePipe {