@magic-xpa/angular 4.900.0-dev491.7 → 4.901.0-dev491.1
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 +7 -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 +112 -58
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +110 -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,10 @@ class TaskMagicService {
|
|
1961
1961
|
return val;
|
1962
1962
|
}
|
1963
1963
|
case StorageAttribute.NUMERIC:
|
1964
|
-
|
1964
|
+
if (isUndefined(val))
|
1965
|
+
return val;
|
1966
|
+
else
|
1967
|
+
return (val != null) ? +val : null;
|
1965
1968
|
default:
|
1966
1969
|
return val;
|
1967
1970
|
}
|
@@ -2190,7 +2193,7 @@ class TableMagicService {
|
|
2190
2193
|
this.task.onScrollDown();
|
2191
2194
|
}
|
2192
2195
|
sortData(e) { }
|
2193
|
-
mgOnPaginateChange(e) { }
|
2196
|
+
mgOnPaginateChange(e, changeSelectedRow) { }
|
2194
2197
|
mgOptionChanged(e) { }
|
2195
2198
|
updateTableSize(size) {
|
2196
2199
|
if (size === 0) {
|
@@ -2339,9 +2342,9 @@ class AccessorMagicService {
|
|
2339
2342
|
let properties;
|
2340
2343
|
properties = this.task.Records.list[0].getControlMetadata(controlId);
|
2341
2344
|
if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)
|
2342
|
-
return false;
|
2343
|
-
else
|
2344
2345
|
return true;
|
2346
|
+
else
|
2347
|
+
return false;
|
2345
2348
|
}
|
2346
2349
|
getText(controlId, rowId) {
|
2347
2350
|
return this.task.getProperty(controlId, HtmlProperties.Text, rowId);
|
@@ -2371,6 +2374,29 @@ class AccessorMagicService {
|
|
2371
2374
|
let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
|
2372
2375
|
return vis ? 'visible' : 'hidden';
|
2373
2376
|
}
|
2377
|
+
getAlphaMask(controlId, rowId) {
|
2378
|
+
if (isNullOrUndefined(controlId))
|
2379
|
+
return null;
|
2380
|
+
let pic = this.task.GetControlPictureMask(controlId);
|
2381
|
+
let mask = pic.getMask();
|
2382
|
+
let valueStr = new StringBuilder();
|
2383
|
+
for (let i = 0; i < mask.length; i++) {
|
2384
|
+
switch (mask.charCodeAt(i)) {
|
2385
|
+
case PICInterface.PIC_N:
|
2386
|
+
valueStr.Append("0");
|
2387
|
+
break;
|
2388
|
+
case PICInterface.PIC_U:
|
2389
|
+
case PICInterface.PIC_L:
|
2390
|
+
case PICInterface.PIC_X:
|
2391
|
+
valueStr.Append("A");
|
2392
|
+
break;
|
2393
|
+
default:
|
2394
|
+
valueStr.Append(mask.charAt(i));
|
2395
|
+
break;
|
2396
|
+
}
|
2397
|
+
}
|
2398
|
+
return (pic != null) ? valueStr.toString() : null;
|
2399
|
+
}
|
2374
2400
|
getNumericPicture(picture) {
|
2375
2401
|
var obj = {};
|
2376
2402
|
if (isNullOrUndefined(picture))
|
@@ -2439,7 +2465,7 @@ class AccessorMagicService {
|
|
2439
2465
|
}
|
2440
2466
|
getFormattedValue(controlId, rowId) {
|
2441
2467
|
let val = this.task.getValue(controlId, rowId);
|
2442
|
-
val = this.task.getFormattedValue(controlId, val);
|
2468
|
+
val = this.task.getFormattedValue(controlId, val, rowId);
|
2443
2469
|
return val;
|
2444
2470
|
}
|
2445
2471
|
getPicture(controlId, rowId) {
|
@@ -2778,16 +2804,16 @@ class MagicDirective {
|
|
2778
2804
|
this.eventHandlers = {};
|
2779
2805
|
this.eventsOnlyVal = false;
|
2780
2806
|
this.htmlElement = this.element.nativeElement;
|
2781
|
-
if (!(typeof magicRow ===
|
2807
|
+
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2782
2808
|
this.rowId = magicRow.rowId;
|
2783
2809
|
}
|
2784
2810
|
set magic(val) {
|
2785
2811
|
this.id = val;
|
2786
|
-
this.selector =
|
2812
|
+
this.selector = "magic";
|
2787
2813
|
}
|
2788
2814
|
;
|
2789
2815
|
set eventsOnly(val) {
|
2790
|
-
console.log(
|
2816
|
+
console.log("eventsOnly");
|
2791
2817
|
this.eventsOnlyVal = true;
|
2792
2818
|
}
|
2793
2819
|
;
|
@@ -2795,11 +2821,11 @@ class MagicDirective {
|
|
2795
2821
|
return this._task;
|
2796
2822
|
}
|
2797
2823
|
regEvents() {
|
2798
|
-
this.eventHandlers[
|
2824
|
+
this.eventHandlers["focusin"] = this.OnFocus.bind(this);
|
2799
2825
|
Object.keys(this.eventHandlers).forEach((key) => {
|
2800
2826
|
this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);
|
2801
2827
|
});
|
2802
|
-
let events = [
|
2828
|
+
let events = ["click", "mousedown", "dblclick"];
|
2803
2829
|
events.forEach(event => {
|
2804
2830
|
this.renderer.listen(this.htmlElement, event, (e) => {
|
2805
2831
|
let fromButton = false;
|
@@ -2810,15 +2836,15 @@ class MagicDirective {
|
|
2810
2836
|
e.cancelBubble = true;
|
2811
2837
|
});
|
2812
2838
|
});
|
2813
|
-
this.renderer.listen(this.htmlElement,
|
2814
|
-
let guiEvent = getGuiEventObj(
|
2839
|
+
this.renderer.listen(this.htmlElement, "change", (e) => {
|
2840
|
+
let guiEvent = getGuiEventObj("selectionchanged", this.id, +this.rowId);
|
2815
2841
|
if ((event.target).selectedIndex !== undefined) {
|
2816
2842
|
guiEvent.Value = (event.target).selectedIndex.toString();
|
2817
2843
|
e.cancelBubble = true;
|
2818
2844
|
this.task.insertEvent(guiEvent);
|
2819
2845
|
}
|
2820
2846
|
});
|
2821
|
-
fromEvent(this.htmlElement,
|
2847
|
+
fromEvent(this.htmlElement, "input").pipe(map((event) => {
|
2822
2848
|
return event.target.value;
|
2823
2849
|
}), debounceTime(200)).subscribe((x) => {
|
2824
2850
|
if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {
|
@@ -2827,8 +2853,8 @@ class MagicDirective {
|
|
2827
2853
|
this.task.mgAccessorService.setValueToControl(this.id, x, true);
|
2828
2854
|
}
|
2829
2855
|
});
|
2830
|
-
this.renderer.listen(this.htmlElement,
|
2831
|
-
let guiEvent = getGuiEventObj(
|
2856
|
+
this.renderer.listen(this.htmlElement, "keydown", (e) => {
|
2857
|
+
let guiEvent = getGuiEventObj("keydown", this.id, +this.rowId);
|
2832
2858
|
guiEvent.modifiers = Modifiers.MODIFIER_NONE;
|
2833
2859
|
if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)
|
2834
2860
|
guiEvent.modifiers = Modifiers.MODIFIER_ALT;
|
@@ -2854,7 +2880,7 @@ class MagicDirective {
|
|
2854
2880
|
});
|
2855
2881
|
}
|
2856
2882
|
OnFocus() {
|
2857
|
-
this.task.insertEvent(getGuiEventObj(
|
2883
|
+
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2858
2884
|
event.cancelBubble = true;
|
2859
2885
|
}
|
2860
2886
|
IsSameElement(command) {
|
@@ -2874,7 +2900,7 @@ class MagicDirective {
|
|
2874
2900
|
.subscribe(a => {
|
2875
2901
|
let command = a;
|
2876
2902
|
if (isNullOrUndefined(this.rowId))
|
2877
|
-
this.rowId =
|
2903
|
+
this.rowId = "0";
|
2878
2904
|
try {
|
2879
2905
|
if (!this.eventsOnlyVal)
|
2880
2906
|
this.handleCommand(command);
|
@@ -2902,7 +2928,7 @@ class MagicDirective {
|
|
2902
2928
|
this.focusUnlistener();
|
2903
2929
|
if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
|
2904
2930
|
this.htmlElement.focus();
|
2905
|
-
this.focusUnlistener = this.renderer.listen(this.htmlElement,
|
2931
|
+
this.focusUnlistener = this.renderer.listen(this.htmlElement, "focusin", this.eventHandlers["focusin"]);
|
2906
2932
|
break;
|
2907
2933
|
}
|
2908
2934
|
}
|
@@ -2912,13 +2938,13 @@ class MagicDirective {
|
|
2912
2938
|
let methodName = command._str;
|
2913
2939
|
let args = command.arguments;
|
2914
2940
|
let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
|
2915
|
-
let resultString =
|
2941
|
+
let resultString = "";
|
2916
2942
|
try {
|
2917
2943
|
if (!isNullOrUndefined(magicComponent[methodName])) {
|
2918
2944
|
resultString = magicComponent[methodName].apply(magicComponent, args);
|
2919
2945
|
}
|
2920
2946
|
else
|
2921
|
-
console.error(
|
2947
|
+
console.error("Instance method " + methodName + " does not exists");
|
2922
2948
|
}
|
2923
2949
|
catch (e) {
|
2924
2950
|
console.error(e.message);
|
@@ -2930,10 +2956,13 @@ class MagicDirective {
|
|
2930
2956
|
handleSetProperty(command) {
|
2931
2957
|
switch (command.Operation) {
|
2932
2958
|
case HtmlProperties.ReadOnly:
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2959
|
+
{
|
2960
|
+
if (command.obj.Type == MgControlType.CTRL_TYPE_TEXT)
|
2961
|
+
if (command.obj1 != true)
|
2962
|
+
this.renderer.removeAttribute(this.htmlElement, command.Operation);
|
2963
|
+
else
|
2964
|
+
this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);
|
2965
|
+
}
|
2937
2966
|
break;
|
2938
2967
|
}
|
2939
2968
|
}
|
@@ -2948,16 +2977,16 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
2948
2977
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
2949
2978
|
type: Directive,
|
2950
2979
|
args: [{
|
2951
|
-
selector:
|
2980
|
+
selector: "[magic]"
|
2952
2981
|
}]
|
2953
2982
|
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
2954
2983
|
type: Optional
|
2955
2984
|
}] }]; }, { magic: [{
|
2956
2985
|
type: Input,
|
2957
|
-
args: [
|
2986
|
+
args: ["magic"]
|
2958
2987
|
}], eventsOnly: [{
|
2959
2988
|
type: Input,
|
2960
|
-
args: [
|
2989
|
+
args: ["eventsOnly"]
|
2961
2990
|
}], rowId: [{
|
2962
2991
|
type: Input
|
2963
2992
|
}] }); })();
|
@@ -3255,6 +3284,25 @@ class MgformatMagicDirective {
|
|
3255
3284
|
}
|
3256
3285
|
}
|
3257
3286
|
onFocusEvent($event) {
|
3287
|
+
this.calculatePattern();
|
3288
|
+
}
|
3289
|
+
onInputEvent($event) {
|
3290
|
+
this.calculatePattern();
|
3291
|
+
}
|
3292
|
+
onChangeEvent($event) {
|
3293
|
+
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3294
|
+
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3295
|
+
switch (attr) {
|
3296
|
+
case StorageAttribute.ALPHA:
|
3297
|
+
case StorageAttribute.UNICODE:
|
3298
|
+
this.formatAlphaUnicode(control);
|
3299
|
+
break;
|
3300
|
+
case StorageAttribute.BOOLEAN:
|
3301
|
+
this.formatBoolean(control);
|
3302
|
+
break;
|
3303
|
+
}
|
3304
|
+
}
|
3305
|
+
calculatePattern() {
|
3258
3306
|
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3259
3307
|
if (control != null) {
|
3260
3308
|
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
@@ -3271,26 +3319,22 @@ class MgformatMagicDirective {
|
|
3271
3319
|
if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {
|
3272
3320
|
if (control.validator == null)
|
3273
3321
|
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3274
|
-
else
|
3275
|
-
|
3322
|
+
else {
|
3323
|
+
if (pic.isFormatExp()) {
|
3324
|
+
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3325
|
+
if (isUndefined(this.magicDir.rowId))
|
3326
|
+
this.magicDir.rowId = '0';
|
3327
|
+
control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);
|
3328
|
+
}
|
3329
|
+
else
|
3330
|
+
control.setValidators([control.validator, Validators.maxLength(pic.getMaskLength())]);
|
3331
|
+
}
|
3332
|
+
control.updateValueAndValidity();
|
3276
3333
|
}
|
3277
3334
|
}
|
3278
3335
|
}
|
3279
3336
|
}
|
3280
3337
|
}
|
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
3338
|
formatDate(pic) {
|
3295
3339
|
let mgDateFormatter = new MgDateFormatter();
|
3296
3340
|
this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
|
@@ -3439,7 +3483,7 @@ class MgformatMagicDirective {
|
|
3439
3483
|
}
|
3440
3484
|
MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
|
3441
3485
|
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); });
|
3486
|
+
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
3487
|
} } });
|
3444
3488
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
|
3445
3489
|
type: Directive,
|
@@ -3449,6 +3493,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
|
|
3449
3493
|
}], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
|
3450
3494
|
type: HostListener,
|
3451
3495
|
args: ['focus', ['$event']]
|
3496
|
+
}], onInputEvent: [{
|
3497
|
+
type: HostListener,
|
3498
|
+
args: ['input', ['$event']]
|
3452
3499
|
}], onChangeEvent: [{
|
3453
3500
|
type: HostListener,
|
3454
3501
|
args: ['change', ['$event']]
|
@@ -3907,7 +3954,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
3907
3954
|
i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
|
3908
3955
|
i0.ɵɵadvance(3);
|
3909
3956
|
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;
|
3957
|
+
} }, 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
3958
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
3912
3959
|
type: Component,
|
3913
3960
|
args: [{
|
@@ -4302,11 +4349,13 @@ const MG_FORMATS = {
|
|
4302
4349
|
}
|
4303
4350
|
};
|
4304
4351
|
class MgDateAdapter extends NativeDateAdapter {
|
4305
|
-
constructor(platform, task) {
|
4306
|
-
super(
|
4352
|
+
constructor(platform, task, localeId) {
|
4353
|
+
super(localeId, platform);
|
4307
4354
|
this.platform = platform;
|
4308
4355
|
this.task = task;
|
4356
|
+
this.localeId = localeId;
|
4309
4357
|
this.mgdtfmt = null;
|
4358
|
+
this.setLocale(localeId);
|
4310
4359
|
}
|
4311
4360
|
parse(value) {
|
4312
4361
|
let valueStr = value;
|
@@ -4366,7 +4415,7 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4366
4415
|
}
|
4367
4416
|
if (month == 0 && year == 0 && date == 0)
|
4368
4417
|
return null;
|
4369
|
-
return new Date(
|
4418
|
+
return new Date(year, month, date);
|
4370
4419
|
}
|
4371
4420
|
}
|
4372
4421
|
format(date, displayFormat) {
|
@@ -4382,11 +4431,14 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4382
4431
|
}
|
4383
4432
|
}
|
4384
4433
|
}
|
4385
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
|
4434
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4386
4435
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4387
4436
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4388
4437
|
type: Injectable
|
4389
|
-
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }
|
4438
|
+
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4439
|
+
type: Inject,
|
4440
|
+
args: [MAT_DATE_LOCALE]
|
4441
|
+
}] }]; }, null); })();
|
4390
4442
|
|
4391
4443
|
const matDateProviders = [
|
4392
4444
|
{ provide: DateAdapter, useClass: MgDateAdapter },
|