@magic-xpa/angular 4.900.0-dev490.28 → 4.900.0-dev490.280
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/services/accessor.magic.service.mjs +29 -6
- package/esm2020/src/services/engine.magic.service.mjs +3 -3
- package/esm2020/src/services/mg-date-adapter.mjs +12 -7
- package/esm2020/src/services/task.magics.service.mjs +5 -12
- package/esm2020/src/ui/directives/magic.directive.mjs +36 -33
- package/esm2020/src/ui/directives/mgformat.magic.directive.mjs +32 -17
- package/esm2020/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +1 -1
- package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +2 -2
- package/esm2020/src/ui/magic-root.component.mjs +1 -1
- package/fesm2015/magic-xpa-angular.mjs +104 -64
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +102 -64
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/src/services/accessor.magic.service.d.ts +1 -0
- package/src/services/engine.magic.service.d.ts +1 -1
- package/src/services/mg-date-adapter.d.ts +2 -1
- package/src/services/task.magics.service.d.ts +1 -1
- package/src/ui/directives/magic.directive.d.ts +6 -6
- package/src/ui/directives/mgformat.magic.directive.d.ts +2 -0
@@ -10,14 +10,14 @@ import * as i3 from 'ng-dynamic-component';
|
|
10
10
|
import { DynamicModule } from 'ng-dynamic-component';
|
11
11
|
import { InteractiveCommandType, OverlayType, Styles, HtmlProperties, GuiConstants, CommandType, PIC, GuiEnvironment, Modifiers } from '@magic-xpa/gui';
|
12
12
|
import { MagicBridge, getGuiEventObj, CookieService } from '@magic-xpa/engine';
|
13
|
-
import { MagicProperties, Logger, StrUtil, StorageAttribute, BindingLevel, StorageAttributeType,
|
13
|
+
import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, BindingLevel, StorageAttributeType, MgControlType } from '@magic-xpa/utils';
|
14
14
|
import { filter, map, debounceTime } from 'rxjs/operators';
|
15
15
|
import { Subject, fromEvent } from 'rxjs';
|
16
16
|
import { __decorate, __metadata } from 'tslib';
|
17
17
|
import * as i1$1 from '@angular/platform-browser';
|
18
18
|
import * as i1$2 from '@angular/common/http';
|
19
19
|
import { HttpClientModule } from '@angular/common/http';
|
20
|
-
import { NativeDateAdapter, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
20
|
+
import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
21
21
|
import * as i1$3 from '@angular/cdk/platform';
|
22
22
|
|
23
23
|
class ControlMetadata {
|
@@ -270,8 +270,8 @@ class EngineMagicService {
|
|
270
270
|
GetControlPictureMask(taskId, controlName) {
|
271
271
|
return this.magicBridge.GetControlPictureMask(taskId, controlName);
|
272
272
|
}
|
273
|
-
GetFormattedValue(taskId, controlName, value) {
|
274
|
-
return this.magicBridge.GetFormattedValue(taskId, controlName, value);
|
273
|
+
GetFormattedValue(taskId, controlName, value, rowId) {
|
274
|
+
return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);
|
275
275
|
}
|
276
276
|
ValidateControlValue(taskId, controlName, value) {
|
277
277
|
return this.magicBridge.ValidateControlValue(taskId, controlName, value);
|
@@ -934,7 +934,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
934
934
|
i0.ɵɵproperty("ngIf", ctx.getShowTitleBar());
|
935
935
|
i0.ɵɵadvance(1);
|
936
936
|
i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
|
937
|
-
} }, directives: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;
|
937
|
+
} }, directives: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
|
938
938
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
|
939
939
|
type: Component,
|
940
940
|
args: [{ selector: 'app-magic-overlay-container', template: `
|
@@ -953,7 +953,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
953
953
|
</div>
|
954
954
|
</div>
|
955
955
|
</div>
|
956
|
-
`, styles: [".modal-foreground{position:fixed;
|
956
|
+
`, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}\n"] }]
|
957
957
|
}], function () { return [{ type: i0.ComponentFactoryResolver }]; }, { headerElementRef: [{
|
958
958
|
type: ViewChild,
|
959
959
|
args: ['modalheader', { static: false }]
|
@@ -1128,7 +1128,7 @@ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlay
|
|
1128
1128
|
i0.ɵɵelementEnd();
|
1129
1129
|
i0.ɵɵelement(6, "div", 5);
|
1130
1130
|
i0.ɵɵelementEnd();
|
1131
|
-
} }, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;
|
1131
|
+
} }, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;z-index:999;inset:0}"] });
|
1132
1132
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
|
1133
1133
|
type: Component,
|
1134
1134
|
args: [{
|
@@ -1752,8 +1752,8 @@ class TaskMagicService {
|
|
1752
1752
|
guiRowId = '0';
|
1753
1753
|
return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';
|
1754
1754
|
}
|
1755
|
-
getFormattedValue(controlName, val) {
|
1756
|
-
return this.magic.GetFormattedValue(this.taskId, controlName, val);
|
1755
|
+
getFormattedValue(controlName, val, rowId) {
|
1756
|
+
return this.magic.GetFormattedValue(this.taskId, controlName, val, rowId);
|
1757
1757
|
}
|
1758
1758
|
setValue(controlId, guiRowId, value) {
|
1759
1759
|
return this.Records.list[guiRowId].setValue(controlId, value);
|
@@ -1888,8 +1888,6 @@ class TaskMagicService {
|
|
1888
1888
|
this.Records.list[guiRowId].values[controlId] = command.value;
|
1889
1889
|
let c = this.getFormControl(guiRowId.toString(), controlId);
|
1890
1890
|
if (!isNullOrUndefined(c)) {
|
1891
|
-
if (command.Bool1)
|
1892
|
-
c.reset();
|
1893
1891
|
c.setValue(this.ConvertValFromNative(controlId, command.line, command.value));
|
1894
1892
|
}
|
1895
1893
|
break;
|
@@ -1923,7 +1921,6 @@ class TaskMagicService {
|
|
1923
1921
|
ConvertValToNative(controlId, rowId, val) {
|
1924
1922
|
let properties;
|
1925
1923
|
properties = this.Records.list[0].getControlMetadata(controlId);
|
1926
|
-
let control = this.getFormControl(rowId.toString(), controlId);
|
1927
1924
|
switch (properties.dataType) {
|
1928
1925
|
case StorageAttribute.BOOLEAN: {
|
1929
1926
|
if (typeof val === 'string') {
|
@@ -1963,12 +1960,8 @@ class TaskMagicService {
|
|
1963
1960
|
else
|
1964
1961
|
return val;
|
1965
1962
|
}
|
1966
|
-
case StorageAttribute.NUMERIC:
|
1967
|
-
|
1968
|
-
return 0;
|
1969
|
-
else
|
1970
|
-
return val;
|
1971
|
-
}
|
1963
|
+
case StorageAttribute.NUMERIC:
|
1964
|
+
return +val;
|
1972
1965
|
default:
|
1973
1966
|
return val;
|
1974
1967
|
}
|
@@ -2346,9 +2339,9 @@ class AccessorMagicService {
|
|
2346
2339
|
let properties;
|
2347
2340
|
properties = this.task.Records.list[0].getControlMetadata(controlId);
|
2348
2341
|
if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)
|
2349
|
-
return false;
|
2350
|
-
else
|
2351
2342
|
return true;
|
2343
|
+
else
|
2344
|
+
return false;
|
2352
2345
|
}
|
2353
2346
|
getText(controlId, rowId) {
|
2354
2347
|
return this.task.getProperty(controlId, HtmlProperties.Text, rowId);
|
@@ -2378,6 +2371,29 @@ class AccessorMagicService {
|
|
2378
2371
|
let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
|
2379
2372
|
return vis ? 'visible' : 'hidden';
|
2380
2373
|
}
|
2374
|
+
getAlphaMask(controlId, rowId) {
|
2375
|
+
if (isNullOrUndefined(controlId))
|
2376
|
+
return null;
|
2377
|
+
let pic = this.task.GetControlPictureMask(controlId);
|
2378
|
+
let mask = pic.getMask();
|
2379
|
+
let valueStr = new StringBuilder();
|
2380
|
+
for (let i = 0; i < mask.length; i++) {
|
2381
|
+
switch (mask.charCodeAt(i)) {
|
2382
|
+
case PICInterface.PIC_N:
|
2383
|
+
valueStr.Append("0");
|
2384
|
+
break;
|
2385
|
+
case PICInterface.PIC_U:
|
2386
|
+
case PICInterface.PIC_L:
|
2387
|
+
case PICInterface.PIC_X:
|
2388
|
+
valueStr.Append("A");
|
2389
|
+
break;
|
2390
|
+
default:
|
2391
|
+
valueStr.Append(mask.charAt(i));
|
2392
|
+
break;
|
2393
|
+
}
|
2394
|
+
}
|
2395
|
+
return (pic != null) ? valueStr.toString() : null;
|
2396
|
+
}
|
2381
2397
|
getNumericPicture(picture) {
|
2382
2398
|
var obj = {};
|
2383
2399
|
if (isNullOrUndefined(picture))
|
@@ -2446,7 +2462,7 @@ class AccessorMagicService {
|
|
2446
2462
|
}
|
2447
2463
|
getFormattedValue(controlId, rowId) {
|
2448
2464
|
let val = this.task.getValue(controlId, rowId);
|
2449
|
-
val = this.task.getFormattedValue(controlId, val);
|
2465
|
+
val = this.task.getFormattedValue(controlId, val, rowId);
|
2450
2466
|
return val;
|
2451
2467
|
}
|
2452
2468
|
getPicture(controlId, rowId) {
|
@@ -2785,16 +2801,16 @@ class MagicDirective {
|
|
2785
2801
|
this.eventHandlers = {};
|
2786
2802
|
this.eventsOnlyVal = false;
|
2787
2803
|
this.htmlElement = this.element.nativeElement;
|
2788
|
-
if (!(typeof magicRow ===
|
2804
|
+
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2789
2805
|
this.rowId = magicRow.rowId;
|
2790
2806
|
}
|
2791
2807
|
set magic(val) {
|
2792
2808
|
this.id = val;
|
2793
|
-
this.selector =
|
2809
|
+
this.selector = "magic";
|
2794
2810
|
}
|
2795
2811
|
;
|
2796
2812
|
set eventsOnly(val) {
|
2797
|
-
console.log(
|
2813
|
+
console.log("eventsOnly");
|
2798
2814
|
this.eventsOnlyVal = true;
|
2799
2815
|
}
|
2800
2816
|
;
|
@@ -2802,11 +2818,11 @@ class MagicDirective {
|
|
2802
2818
|
return this._task;
|
2803
2819
|
}
|
2804
2820
|
regEvents() {
|
2805
|
-
this.eventHandlers[
|
2821
|
+
this.eventHandlers["focusin"] = this.OnFocus.bind(this);
|
2806
2822
|
Object.keys(this.eventHandlers).forEach((key) => {
|
2807
2823
|
this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);
|
2808
2824
|
});
|
2809
|
-
let events = [
|
2825
|
+
let events = ["click", "mousedown", "dblclick"];
|
2810
2826
|
events.forEach(event => {
|
2811
2827
|
this.renderer.listen(this.htmlElement, event, (e) => {
|
2812
2828
|
let fromButton = false;
|
@@ -2817,15 +2833,15 @@ class MagicDirective {
|
|
2817
2833
|
e.cancelBubble = true;
|
2818
2834
|
});
|
2819
2835
|
});
|
2820
|
-
this.renderer.listen(this.htmlElement,
|
2821
|
-
let guiEvent = getGuiEventObj(
|
2836
|
+
this.renderer.listen(this.htmlElement, "change", (e) => {
|
2837
|
+
let guiEvent = getGuiEventObj("selectionchanged", this.id, +this.rowId);
|
2822
2838
|
if ((event.target).selectedIndex !== undefined) {
|
2823
2839
|
guiEvent.Value = (event.target).selectedIndex.toString();
|
2824
2840
|
e.cancelBubble = true;
|
2825
2841
|
this.task.insertEvent(guiEvent);
|
2826
2842
|
}
|
2827
2843
|
});
|
2828
|
-
fromEvent(this.htmlElement,
|
2844
|
+
fromEvent(this.htmlElement, "input").pipe(map((event) => {
|
2829
2845
|
return event.target.value;
|
2830
2846
|
}), debounceTime(200)).subscribe((x) => {
|
2831
2847
|
if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {
|
@@ -2834,8 +2850,8 @@ class MagicDirective {
|
|
2834
2850
|
this.task.mgAccessorService.setValueToControl(this.id, x, true);
|
2835
2851
|
}
|
2836
2852
|
});
|
2837
|
-
this.renderer.listen(this.htmlElement,
|
2838
|
-
let guiEvent = getGuiEventObj(
|
2853
|
+
this.renderer.listen(this.htmlElement, "keydown", (e) => {
|
2854
|
+
let guiEvent = getGuiEventObj("keydown", this.id, +this.rowId);
|
2839
2855
|
guiEvent.modifiers = Modifiers.MODIFIER_NONE;
|
2840
2856
|
if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)
|
2841
2857
|
guiEvent.modifiers = Modifiers.MODIFIER_ALT;
|
@@ -2861,7 +2877,7 @@ class MagicDirective {
|
|
2861
2877
|
});
|
2862
2878
|
}
|
2863
2879
|
OnFocus() {
|
2864
|
-
this.task.insertEvent(getGuiEventObj(
|
2880
|
+
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2865
2881
|
event.cancelBubble = true;
|
2866
2882
|
}
|
2867
2883
|
IsSameElement(command) {
|
@@ -2881,7 +2897,7 @@ class MagicDirective {
|
|
2881
2897
|
.subscribe(a => {
|
2882
2898
|
let command = a;
|
2883
2899
|
if (isNullOrUndefined(this.rowId))
|
2884
|
-
this.rowId =
|
2900
|
+
this.rowId = "0";
|
2885
2901
|
try {
|
2886
2902
|
if (!this.eventsOnlyVal)
|
2887
2903
|
this.handleCommand(command);
|
@@ -2909,7 +2925,7 @@ class MagicDirective {
|
|
2909
2925
|
this.focusUnlistener();
|
2910
2926
|
if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
|
2911
2927
|
this.htmlElement.focus();
|
2912
|
-
this.focusUnlistener = this.renderer.listen(this.htmlElement,
|
2928
|
+
this.focusUnlistener = this.renderer.listen(this.htmlElement, "focusin", this.eventHandlers["focusin"]);
|
2913
2929
|
break;
|
2914
2930
|
}
|
2915
2931
|
}
|
@@ -2919,13 +2935,13 @@ class MagicDirective {
|
|
2919
2935
|
let methodName = command._str;
|
2920
2936
|
let args = command.arguments;
|
2921
2937
|
let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
|
2922
|
-
let resultString =
|
2938
|
+
let resultString = "";
|
2923
2939
|
try {
|
2924
2940
|
if (!isNullOrUndefined(magicComponent[methodName])) {
|
2925
2941
|
resultString = magicComponent[methodName].apply(magicComponent, args);
|
2926
2942
|
}
|
2927
2943
|
else
|
2928
|
-
console.error(
|
2944
|
+
console.error("Instance method " + methodName + " does not exists");
|
2929
2945
|
}
|
2930
2946
|
catch (e) {
|
2931
2947
|
console.error(e.message);
|
@@ -2937,10 +2953,13 @@ class MagicDirective {
|
|
2937
2953
|
handleSetProperty(command) {
|
2938
2954
|
switch (command.Operation) {
|
2939
2955
|
case HtmlProperties.ReadOnly:
|
2940
|
-
|
2941
|
-
|
2942
|
-
|
2943
|
-
|
2956
|
+
{
|
2957
|
+
if (command.obj.Type == MgControlType.CTRL_TYPE_TEXT)
|
2958
|
+
if (command.obj1 != true)
|
2959
|
+
this.renderer.removeAttribute(this.htmlElement, command.Operation);
|
2960
|
+
else
|
2961
|
+
this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);
|
2962
|
+
}
|
2944
2963
|
break;
|
2945
2964
|
}
|
2946
2965
|
}
|
@@ -2955,16 +2974,16 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
2955
2974
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
2956
2975
|
type: Directive,
|
2957
2976
|
args: [{
|
2958
|
-
selector:
|
2977
|
+
selector: "[magic]"
|
2959
2978
|
}]
|
2960
2979
|
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
2961
2980
|
type: Optional
|
2962
2981
|
}] }]; }, { magic: [{
|
2963
2982
|
type: Input,
|
2964
|
-
args: [
|
2983
|
+
args: ["magic"]
|
2965
2984
|
}], eventsOnly: [{
|
2966
2985
|
type: Input,
|
2967
|
-
args: [
|
2986
|
+
args: ["eventsOnly"]
|
2968
2987
|
}], rowId: [{
|
2969
2988
|
type: Input
|
2970
2989
|
}] }); })();
|
@@ -3262,6 +3281,25 @@ class MgformatMagicDirective {
|
|
3262
3281
|
}
|
3263
3282
|
}
|
3264
3283
|
onFocusEvent($event) {
|
3284
|
+
this.calculatePattern();
|
3285
|
+
}
|
3286
|
+
onInputEvent($event) {
|
3287
|
+
this.calculatePattern();
|
3288
|
+
}
|
3289
|
+
onChangeEvent($event) {
|
3290
|
+
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3291
|
+
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3292
|
+
switch (attr) {
|
3293
|
+
case StorageAttribute.ALPHA:
|
3294
|
+
case StorageAttribute.UNICODE:
|
3295
|
+
this.formatAlphaUnicode(control);
|
3296
|
+
break;
|
3297
|
+
case StorageAttribute.BOOLEAN:
|
3298
|
+
this.formatBoolean(control);
|
3299
|
+
break;
|
3300
|
+
}
|
3301
|
+
}
|
3302
|
+
calculatePattern() {
|
3265
3303
|
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3266
3304
|
if (control != null) {
|
3267
3305
|
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
@@ -3278,26 +3316,18 @@ class MgformatMagicDirective {
|
|
3278
3316
|
if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {
|
3279
3317
|
if (control.validator == null)
|
3280
3318
|
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3281
|
-
else
|
3282
|
-
control.setValidators(
|
3319
|
+
else {
|
3320
|
+
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3321
|
+
if (isUndefined(this.magicDir.rowId))
|
3322
|
+
this.magicDir.rowId = '0';
|
3323
|
+
control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);
|
3324
|
+
}
|
3325
|
+
control.updateValueAndValidity();
|
3283
3326
|
}
|
3284
3327
|
}
|
3285
3328
|
}
|
3286
3329
|
}
|
3287
3330
|
}
|
3288
|
-
onChangeEvent($event) {
|
3289
|
-
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3290
|
-
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3291
|
-
switch (attr) {
|
3292
|
-
case StorageAttribute.ALPHA:
|
3293
|
-
case StorageAttribute.UNICODE:
|
3294
|
-
this.formatAlphaUnicode(control);
|
3295
|
-
break;
|
3296
|
-
case StorageAttribute.BOOLEAN:
|
3297
|
-
this.formatBoolean(control);
|
3298
|
-
break;
|
3299
|
-
}
|
3300
|
-
}
|
3301
3331
|
formatDate(pic) {
|
3302
3332
|
let mgDateFormatter = new MgDateFormatter();
|
3303
3333
|
this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
|
@@ -3446,7 +3476,7 @@ class MgformatMagicDirective {
|
|
3446
3476
|
}
|
3447
3477
|
MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
|
3448
3478
|
MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
3449
|
-
i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
|
3479
|
+
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); });
|
3450
3480
|
} } });
|
3451
3481
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
|
3452
3482
|
type: Directive,
|
@@ -3456,6 +3486,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
|
|
3456
3486
|
}], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
|
3457
3487
|
type: HostListener,
|
3458
3488
|
args: ['focus', ['$event']]
|
3489
|
+
}], onInputEvent: [{
|
3490
|
+
type: HostListener,
|
3491
|
+
args: ['input', ['$event']]
|
3459
3492
|
}], onChangeEvent: [{
|
3460
3493
|
type: HostListener,
|
3461
3494
|
args: ['change', ['$event']]
|
@@ -3914,7 +3947,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
3914
3947
|
i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
|
3915
3948
|
i0.ɵɵadvance(3);
|
3916
3949
|
i0.ɵɵproperty("ngIf", ctx.showSpinner);
|
3917
|
-
} }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective, MagicViewContainerRef, i1.NgTemplateOutlet], styles: [".mgSpinnerClass[_ngcontent-%COMP%]{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;
|
3950
|
+
} }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective, MagicViewContainerRef, i1.NgTemplateOutlet], styles: [".mgSpinnerClass[_ngcontent-%COMP%]{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;inset:0;width:100px;height:100px;animation:spin 2s linear infinite}.spinner-background[_ngcontent-%COMP%]{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
|
3918
3951
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
3919
3952
|
type: Component,
|
3920
3953
|
args: [{
|
@@ -4309,11 +4342,13 @@ const MG_FORMATS = {
|
|
4309
4342
|
}
|
4310
4343
|
};
|
4311
4344
|
class MgDateAdapter extends NativeDateAdapter {
|
4312
|
-
constructor(platform, task) {
|
4313
|
-
super(
|
4345
|
+
constructor(platform, task, localeId) {
|
4346
|
+
super(localeId, platform);
|
4314
4347
|
this.platform = platform;
|
4315
4348
|
this.task = task;
|
4349
|
+
this.localeId = localeId;
|
4316
4350
|
this.mgdtfmt = null;
|
4351
|
+
this.setLocale(localeId);
|
4317
4352
|
}
|
4318
4353
|
parse(value) {
|
4319
4354
|
let valueStr = value;
|
@@ -4389,11 +4424,14 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4389
4424
|
}
|
4390
4425
|
}
|
4391
4426
|
}
|
4392
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
|
4427
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4393
4428
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4394
4429
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4395
4430
|
type: Injectable
|
4396
|
-
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }
|
4431
|
+
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4432
|
+
type: Inject,
|
4433
|
+
args: [MAT_DATE_LOCALE]
|
4434
|
+
}] }]; }, null); })();
|
4397
4435
|
|
4398
4436
|
const matDateProviders = [
|
4399
4437
|
{ provide: DateAdapter, useClass: MgDateAdapter },
|