@magic-xpa/angular 4.900.0-dev491.7 → 4.1000.0-dev000.0
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 +13 -8
- package/esm2020/src/services/table.magic.service.mjs +2 -2
- package/esm2020/src/services/task.magics.service.mjs +4 -4
- package/esm2020/src/ui/directives/magic.directive.mjs +36 -33
- package/esm2020/src/ui/directives/mgformat.magic.directive.mjs +36 -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 +109 -58
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +107 -58
- 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/table.magic.service.d.ts +1 -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);
|
@@ -1961,7 +1961,7 @@ class TaskMagicService {
|
|
1961
1961
|
return val;
|
1962
1962
|
}
|
1963
1963
|
case StorageAttribute.NUMERIC:
|
1964
|
-
return
|
1964
|
+
return +val;
|
1965
1965
|
default:
|
1966
1966
|
return val;
|
1967
1967
|
}
|
@@ -2190,7 +2190,7 @@ class TableMagicService {
|
|
2190
2190
|
this.task.onScrollDown();
|
2191
2191
|
}
|
2192
2192
|
sortData(e) { }
|
2193
|
-
mgOnPaginateChange(e) { }
|
2193
|
+
mgOnPaginateChange(e, changeSelectedRow) { }
|
2194
2194
|
mgOptionChanged(e) { }
|
2195
2195
|
updateTableSize(size) {
|
2196
2196
|
if (size === 0) {
|
@@ -2339,9 +2339,9 @@ class AccessorMagicService {
|
|
2339
2339
|
let properties;
|
2340
2340
|
properties = this.task.Records.list[0].getControlMetadata(controlId);
|
2341
2341
|
if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)
|
2342
|
-
return false;
|
2343
|
-
else
|
2344
2342
|
return true;
|
2343
|
+
else
|
2344
|
+
return false;
|
2345
2345
|
}
|
2346
2346
|
getText(controlId, rowId) {
|
2347
2347
|
return this.task.getProperty(controlId, HtmlProperties.Text, rowId);
|
@@ -2371,6 +2371,29 @@ class AccessorMagicService {
|
|
2371
2371
|
let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
|
2372
2372
|
return vis ? 'visible' : 'hidden';
|
2373
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
|
+
}
|
2374
2397
|
getNumericPicture(picture) {
|
2375
2398
|
var obj = {};
|
2376
2399
|
if (isNullOrUndefined(picture))
|
@@ -2439,7 +2462,7 @@ class AccessorMagicService {
|
|
2439
2462
|
}
|
2440
2463
|
getFormattedValue(controlId, rowId) {
|
2441
2464
|
let val = this.task.getValue(controlId, rowId);
|
2442
|
-
val = this.task.getFormattedValue(controlId, val);
|
2465
|
+
val = this.task.getFormattedValue(controlId, val, rowId);
|
2443
2466
|
return val;
|
2444
2467
|
}
|
2445
2468
|
getPicture(controlId, rowId) {
|
@@ -2778,16 +2801,16 @@ class MagicDirective {
|
|
2778
2801
|
this.eventHandlers = {};
|
2779
2802
|
this.eventsOnlyVal = false;
|
2780
2803
|
this.htmlElement = this.element.nativeElement;
|
2781
|
-
if (!(typeof magicRow ===
|
2804
|
+
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2782
2805
|
this.rowId = magicRow.rowId;
|
2783
2806
|
}
|
2784
2807
|
set magic(val) {
|
2785
2808
|
this.id = val;
|
2786
|
-
this.selector =
|
2809
|
+
this.selector = "magic";
|
2787
2810
|
}
|
2788
2811
|
;
|
2789
2812
|
set eventsOnly(val) {
|
2790
|
-
console.log(
|
2813
|
+
console.log("eventsOnly");
|
2791
2814
|
this.eventsOnlyVal = true;
|
2792
2815
|
}
|
2793
2816
|
;
|
@@ -2795,11 +2818,11 @@ class MagicDirective {
|
|
2795
2818
|
return this._task;
|
2796
2819
|
}
|
2797
2820
|
regEvents() {
|
2798
|
-
this.eventHandlers[
|
2821
|
+
this.eventHandlers["focusin"] = this.OnFocus.bind(this);
|
2799
2822
|
Object.keys(this.eventHandlers).forEach((key) => {
|
2800
2823
|
this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);
|
2801
2824
|
});
|
2802
|
-
let events = [
|
2825
|
+
let events = ["click", "mousedown", "dblclick"];
|
2803
2826
|
events.forEach(event => {
|
2804
2827
|
this.renderer.listen(this.htmlElement, event, (e) => {
|
2805
2828
|
let fromButton = false;
|
@@ -2810,15 +2833,15 @@ class MagicDirective {
|
|
2810
2833
|
e.cancelBubble = true;
|
2811
2834
|
});
|
2812
2835
|
});
|
2813
|
-
this.renderer.listen(this.htmlElement,
|
2814
|
-
let guiEvent = getGuiEventObj(
|
2836
|
+
this.renderer.listen(this.htmlElement, "change", (e) => {
|
2837
|
+
let guiEvent = getGuiEventObj("selectionchanged", this.id, +this.rowId);
|
2815
2838
|
if ((event.target).selectedIndex !== undefined) {
|
2816
2839
|
guiEvent.Value = (event.target).selectedIndex.toString();
|
2817
2840
|
e.cancelBubble = true;
|
2818
2841
|
this.task.insertEvent(guiEvent);
|
2819
2842
|
}
|
2820
2843
|
});
|
2821
|
-
fromEvent(this.htmlElement,
|
2844
|
+
fromEvent(this.htmlElement, "input").pipe(map((event) => {
|
2822
2845
|
return event.target.value;
|
2823
2846
|
}), debounceTime(200)).subscribe((x) => {
|
2824
2847
|
if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {
|
@@ -2827,8 +2850,8 @@ class MagicDirective {
|
|
2827
2850
|
this.task.mgAccessorService.setValueToControl(this.id, x, true);
|
2828
2851
|
}
|
2829
2852
|
});
|
2830
|
-
this.renderer.listen(this.htmlElement,
|
2831
|
-
let guiEvent = getGuiEventObj(
|
2853
|
+
this.renderer.listen(this.htmlElement, "keydown", (e) => {
|
2854
|
+
let guiEvent = getGuiEventObj("keydown", this.id, +this.rowId);
|
2832
2855
|
guiEvent.modifiers = Modifiers.MODIFIER_NONE;
|
2833
2856
|
if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)
|
2834
2857
|
guiEvent.modifiers = Modifiers.MODIFIER_ALT;
|
@@ -2854,7 +2877,7 @@ class MagicDirective {
|
|
2854
2877
|
});
|
2855
2878
|
}
|
2856
2879
|
OnFocus() {
|
2857
|
-
this.task.insertEvent(getGuiEventObj(
|
2880
|
+
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2858
2881
|
event.cancelBubble = true;
|
2859
2882
|
}
|
2860
2883
|
IsSameElement(command) {
|
@@ -2874,7 +2897,7 @@ class MagicDirective {
|
|
2874
2897
|
.subscribe(a => {
|
2875
2898
|
let command = a;
|
2876
2899
|
if (isNullOrUndefined(this.rowId))
|
2877
|
-
this.rowId =
|
2900
|
+
this.rowId = "0";
|
2878
2901
|
try {
|
2879
2902
|
if (!this.eventsOnlyVal)
|
2880
2903
|
this.handleCommand(command);
|
@@ -2902,7 +2925,7 @@ class MagicDirective {
|
|
2902
2925
|
this.focusUnlistener();
|
2903
2926
|
if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
|
2904
2927
|
this.htmlElement.focus();
|
2905
|
-
this.focusUnlistener = this.renderer.listen(this.htmlElement,
|
2928
|
+
this.focusUnlistener = this.renderer.listen(this.htmlElement, "focusin", this.eventHandlers["focusin"]);
|
2906
2929
|
break;
|
2907
2930
|
}
|
2908
2931
|
}
|
@@ -2912,13 +2935,13 @@ class MagicDirective {
|
|
2912
2935
|
let methodName = command._str;
|
2913
2936
|
let args = command.arguments;
|
2914
2937
|
let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
|
2915
|
-
let resultString =
|
2938
|
+
let resultString = "";
|
2916
2939
|
try {
|
2917
2940
|
if (!isNullOrUndefined(magicComponent[methodName])) {
|
2918
2941
|
resultString = magicComponent[methodName].apply(magicComponent, args);
|
2919
2942
|
}
|
2920
2943
|
else
|
2921
|
-
console.error(
|
2944
|
+
console.error("Instance method " + methodName + " does not exists");
|
2922
2945
|
}
|
2923
2946
|
catch (e) {
|
2924
2947
|
console.error(e.message);
|
@@ -2930,10 +2953,13 @@ class MagicDirective {
|
|
2930
2953
|
handleSetProperty(command) {
|
2931
2954
|
switch (command.Operation) {
|
2932
2955
|
case HtmlProperties.ReadOnly:
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
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
|
+
}
|
2937
2963
|
break;
|
2938
2964
|
}
|
2939
2965
|
}
|
@@ -2948,16 +2974,16 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
2948
2974
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
2949
2975
|
type: Directive,
|
2950
2976
|
args: [{
|
2951
|
-
selector:
|
2977
|
+
selector: "[magic]"
|
2952
2978
|
}]
|
2953
2979
|
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
2954
2980
|
type: Optional
|
2955
2981
|
}] }]; }, { magic: [{
|
2956
2982
|
type: Input,
|
2957
|
-
args: [
|
2983
|
+
args: ["magic"]
|
2958
2984
|
}], eventsOnly: [{
|
2959
2985
|
type: Input,
|
2960
|
-
args: [
|
2986
|
+
args: ["eventsOnly"]
|
2961
2987
|
}], rowId: [{
|
2962
2988
|
type: Input
|
2963
2989
|
}] }); })();
|
@@ -3255,6 +3281,25 @@ class MgformatMagicDirective {
|
|
3255
3281
|
}
|
3256
3282
|
}
|
3257
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() {
|
3258
3303
|
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3259
3304
|
if (control != null) {
|
3260
3305
|
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
@@ -3271,26 +3316,22 @@ class MgformatMagicDirective {
|
|
3271
3316
|
if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {
|
3272
3317
|
if (control.validator == null)
|
3273
3318
|
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3274
|
-
else
|
3275
|
-
|
3319
|
+
else {
|
3320
|
+
if (pic.isFormatExp()) {
|
3321
|
+
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3322
|
+
if (isUndefined(this.magicDir.rowId))
|
3323
|
+
this.magicDir.rowId = '0';
|
3324
|
+
control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);
|
3325
|
+
}
|
3326
|
+
else
|
3327
|
+
control.setValidators([control.validator, Validators.maxLength(pic.getMaskLength())]);
|
3328
|
+
}
|
3329
|
+
control.updateValueAndValidity();
|
3276
3330
|
}
|
3277
3331
|
}
|
3278
3332
|
}
|
3279
3333
|
}
|
3280
3334
|
}
|
3281
|
-
onChangeEvent($event) {
|
3282
|
-
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3283
|
-
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3284
|
-
switch (attr) {
|
3285
|
-
case StorageAttribute.ALPHA:
|
3286
|
-
case StorageAttribute.UNICODE:
|
3287
|
-
this.formatAlphaUnicode(control);
|
3288
|
-
break;
|
3289
|
-
case StorageAttribute.BOOLEAN:
|
3290
|
-
this.formatBoolean(control);
|
3291
|
-
break;
|
3292
|
-
}
|
3293
|
-
}
|
3294
3335
|
formatDate(pic) {
|
3295
3336
|
let mgDateFormatter = new MgDateFormatter();
|
3296
3337
|
this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
|
@@ -3439,7 +3480,7 @@ class MgformatMagicDirective {
|
|
3439
3480
|
}
|
3440
3481
|
MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
|
3441
3482
|
MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
3442
|
-
i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
|
3483
|
+
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); });
|
3443
3484
|
} } });
|
3444
3485
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
|
3445
3486
|
type: Directive,
|
@@ -3449,6 +3490,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
|
|
3449
3490
|
}], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
|
3450
3491
|
type: HostListener,
|
3451
3492
|
args: ['focus', ['$event']]
|
3493
|
+
}], onInputEvent: [{
|
3494
|
+
type: HostListener,
|
3495
|
+
args: ['input', ['$event']]
|
3452
3496
|
}], onChangeEvent: [{
|
3453
3497
|
type: HostListener,
|
3454
3498
|
args: ['change', ['$event']]
|
@@ -3907,7 +3951,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
3907
3951
|
i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
|
3908
3952
|
i0.ɵɵadvance(3);
|
3909
3953
|
i0.ɵɵproperty("ngIf", ctx.showSpinner);
|
3910
|
-
} }, 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;
|
3954
|
+
} }, 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)}}"] });
|
3911
3955
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
3912
3956
|
type: Component,
|
3913
3957
|
args: [{
|
@@ -4302,11 +4346,13 @@ const MG_FORMATS = {
|
|
4302
4346
|
}
|
4303
4347
|
};
|
4304
4348
|
class MgDateAdapter extends NativeDateAdapter {
|
4305
|
-
constructor(platform, task) {
|
4306
|
-
super(
|
4349
|
+
constructor(platform, task, localeId) {
|
4350
|
+
super(localeId, platform);
|
4307
4351
|
this.platform = platform;
|
4308
4352
|
this.task = task;
|
4353
|
+
this.localeId = localeId;
|
4309
4354
|
this.mgdtfmt = null;
|
4355
|
+
this.setLocale(localeId);
|
4310
4356
|
}
|
4311
4357
|
parse(value) {
|
4312
4358
|
let valueStr = value;
|
@@ -4366,7 +4412,7 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4366
4412
|
}
|
4367
4413
|
if (month == 0 && year == 0 && date == 0)
|
4368
4414
|
return null;
|
4369
|
-
return new Date(
|
4415
|
+
return new Date(year, month, date);
|
4370
4416
|
}
|
4371
4417
|
}
|
4372
4418
|
format(date, displayFormat) {
|
@@ -4382,11 +4428,14 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4382
4428
|
}
|
4383
4429
|
}
|
4384
4430
|
}
|
4385
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
|
4431
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4386
4432
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4387
4433
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4388
4434
|
type: Injectable
|
4389
|
-
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }
|
4435
|
+
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4436
|
+
type: Inject,
|
4437
|
+
args: [MAT_DATE_LOCALE]
|
4438
|
+
}] }]; }, null); })();
|
4390
4439
|
|
4391
4440
|
const matDateProviders = [
|
4392
4441
|
{ provide: DateAdapter, useClass: MgDateAdapter },
|