@magic-xpa/angular 4.900.0-dev490.62 → 4.900.0-dev490.68
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/esm2020/src/ui/directives/mgformat.magic.directive.mjs +24 -15
- package/fesm2015/magic-xpa-angular.mjs +23 -14
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +23 -14
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/src/ui/directives/mgformat.magic.directive.d.ts +2 -0
@@ -3255,6 +3255,25 @@ class MgformatMagicDirective {
|
|
3255
3255
|
}
|
3256
3256
|
}
|
3257
3257
|
onFocusEvent($event) {
|
3258
|
+
this.calculatePattern();
|
3259
|
+
}
|
3260
|
+
onInputEvent($event) {
|
3261
|
+
this.calculatePattern();
|
3262
|
+
}
|
3263
|
+
onChangeEvent($event) {
|
3264
|
+
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3265
|
+
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3266
|
+
switch (attr) {
|
3267
|
+
case StorageAttribute.ALPHA:
|
3268
|
+
case StorageAttribute.UNICODE:
|
3269
|
+
this.formatAlphaUnicode(control);
|
3270
|
+
break;
|
3271
|
+
case StorageAttribute.BOOLEAN:
|
3272
|
+
this.formatBoolean(control);
|
3273
|
+
break;
|
3274
|
+
}
|
3275
|
+
}
|
3276
|
+
calculatePattern() {
|
3258
3277
|
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3259
3278
|
if (control != null) {
|
3260
3279
|
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
@@ -3275,19 +3294,6 @@ class MgformatMagicDirective {
|
|
3275
3294
|
}
|
3276
3295
|
}
|
3277
3296
|
}
|
3278
|
-
onChangeEvent($event) {
|
3279
|
-
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3280
|
-
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3281
|
-
switch (attr) {
|
3282
|
-
case StorageAttribute.ALPHA:
|
3283
|
-
case StorageAttribute.UNICODE:
|
3284
|
-
this.formatAlphaUnicode(control);
|
3285
|
-
break;
|
3286
|
-
case StorageAttribute.BOOLEAN:
|
3287
|
-
this.formatBoolean(control);
|
3288
|
-
break;
|
3289
|
-
}
|
3290
|
-
}
|
3291
3297
|
formatDate(pic) {
|
3292
3298
|
let mgDateFormatter = new MgDateFormatter();
|
3293
3299
|
this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
|
@@ -3436,7 +3442,7 @@ class MgformatMagicDirective {
|
|
3436
3442
|
}
|
3437
3443
|
MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
|
3438
3444
|
MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
3439
|
-
i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
|
3445
|
+
i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("input", function MgformatMagicDirective_input_HostBindingHandler($event) { return ctx.onInputEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
|
3440
3446
|
} } });
|
3441
3447
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
|
3442
3448
|
type: Directive,
|
@@ -3446,6 +3452,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
|
|
3446
3452
|
}], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
|
3447
3453
|
type: HostListener,
|
3448
3454
|
args: ['focus', ['$event']]
|
3455
|
+
}], onInputEvent: [{
|
3456
|
+
type: HostListener,
|
3457
|
+
args: ['input', ['$event']]
|
3449
3458
|
}], onChangeEvent: [{
|
3450
3459
|
type: HostListener,
|
3451
3460
|
args: ['change', ['$event']]
|