@magic-xpa/angular 4.900.0-dev490.18 → 4.900.0-dev490.186
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 +4 -4
- 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 +103 -56
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +101 -56
- 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 { __awaiter, __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 {
|
@@ -318,8 +318,8 @@ class EngineMagicService {
|
|
318
318
|
GetControlPictureMask(taskId, controlName) {
|
319
319
|
return this.magicBridge.GetControlPictureMask(taskId, controlName);
|
320
320
|
}
|
321
|
-
GetFormattedValue(taskId, controlName, value) {
|
322
|
-
return this.magicBridge.GetFormattedValue(taskId, controlName, value);
|
321
|
+
GetFormattedValue(taskId, controlName, value, rowId) {
|
322
|
+
return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);
|
323
323
|
}
|
324
324
|
ValidateControlValue(taskId, controlName, value) {
|
325
325
|
return this.magicBridge.ValidateControlValue(taskId, controlName, value);
|
@@ -993,7 +993,7 @@ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlay
|
|
993
993
|
i0.ɵɵelement(6, "div", 5);
|
994
994
|
i0.ɵɵelementEnd();
|
995
995
|
}
|
996
|
-
}, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;
|
996
|
+
}, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;z-index:999;inset:0}"] });
|
997
997
|
(function () {
|
998
998
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
|
999
999
|
type: Component,
|
@@ -1206,7 +1206,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
1206
1206
|
i0.ɵɵadvance(1);
|
1207
1207
|
i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
|
1208
1208
|
}
|
1209
|
-
}, directives: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;
|
1209
|
+
}, 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}"] });
|
1210
1210
|
(function () {
|
1211
1211
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
|
1212
1212
|
type: Component,
|
@@ -1226,7 +1226,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
1226
1226
|
</div>
|
1227
1227
|
</div>
|
1228
1228
|
</div>
|
1229
|
-
`, styles: [".modal-foreground{position:fixed;
|
1229
|
+
`, 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"] }]
|
1230
1230
|
}], function () { return [{ type: i0.ComponentFactoryResolver }]; }, { headerElementRef: [{
|
1231
1231
|
type: ViewChild,
|
1232
1232
|
args: ['modalheader', { static: false }]
|
@@ -1812,8 +1812,8 @@ class TaskMagicService {
|
|
1812
1812
|
guiRowId = '0';
|
1813
1813
|
return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';
|
1814
1814
|
}
|
1815
|
-
getFormattedValue(controlName, val) {
|
1816
|
-
return this.magic.GetFormattedValue(this.taskId, controlName, val);
|
1815
|
+
getFormattedValue(controlName, val, rowId) {
|
1816
|
+
return this.magic.GetFormattedValue(this.taskId, controlName, val, rowId);
|
1817
1817
|
}
|
1818
1818
|
setValue(controlId, guiRowId, value) {
|
1819
1819
|
return this.Records.list[guiRowId].setValue(controlId, value);
|
@@ -2021,7 +2021,7 @@ class TaskMagicService {
|
|
2021
2021
|
return val;
|
2022
2022
|
}
|
2023
2023
|
case StorageAttribute.NUMERIC:
|
2024
|
-
return
|
2024
|
+
return +val;
|
2025
2025
|
default:
|
2026
2026
|
return val;
|
2027
2027
|
}
|
@@ -2409,9 +2409,9 @@ class AccessorMagicService {
|
|
2409
2409
|
let properties;
|
2410
2410
|
properties = this.task.Records.list[0].getControlMetadata(controlId);
|
2411
2411
|
if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)
|
2412
|
-
return false;
|
2413
|
-
else
|
2414
2412
|
return true;
|
2413
|
+
else
|
2414
|
+
return false;
|
2415
2415
|
}
|
2416
2416
|
getText(controlId, rowId) {
|
2417
2417
|
return this.task.getProperty(controlId, HtmlProperties.Text, rowId);
|
@@ -2441,6 +2441,29 @@ class AccessorMagicService {
|
|
2441
2441
|
let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
|
2442
2442
|
return vis ? 'visible' : 'hidden';
|
2443
2443
|
}
|
2444
|
+
getAlphaMask(controlId, rowId) {
|
2445
|
+
if (isNullOrUndefined(controlId))
|
2446
|
+
return null;
|
2447
|
+
let pic = this.task.GetControlPictureMask(controlId);
|
2448
|
+
let mask = pic.getMask();
|
2449
|
+
let valueStr = new StringBuilder();
|
2450
|
+
for (let i = 0; i < mask.length; i++) {
|
2451
|
+
switch (mask.charCodeAt(i)) {
|
2452
|
+
case PICInterface.PIC_N:
|
2453
|
+
valueStr.Append("0");
|
2454
|
+
break;
|
2455
|
+
case PICInterface.PIC_U:
|
2456
|
+
case PICInterface.PIC_L:
|
2457
|
+
case PICInterface.PIC_X:
|
2458
|
+
valueStr.Append("A");
|
2459
|
+
break;
|
2460
|
+
default:
|
2461
|
+
valueStr.Append(mask.charAt(i));
|
2462
|
+
break;
|
2463
|
+
}
|
2464
|
+
}
|
2465
|
+
return (pic != null) ? valueStr.toString() : null;
|
2466
|
+
}
|
2444
2467
|
getNumericPicture(picture) {
|
2445
2468
|
var obj = {};
|
2446
2469
|
if (isNullOrUndefined(picture))
|
@@ -2509,7 +2532,7 @@ class AccessorMagicService {
|
|
2509
2532
|
}
|
2510
2533
|
getFormattedValue(controlId, rowId) {
|
2511
2534
|
let val = this.task.getValue(controlId, rowId);
|
2512
|
-
val = this.task.getFormattedValue(controlId, val);
|
2535
|
+
val = this.task.getFormattedValue(controlId, val, rowId);
|
2513
2536
|
return val;
|
2514
2537
|
}
|
2515
2538
|
getPicture(controlId, rowId) {
|
@@ -2858,16 +2881,16 @@ class MagicDirective {
|
|
2858
2881
|
this.eventHandlers = {};
|
2859
2882
|
this.eventsOnlyVal = false;
|
2860
2883
|
this.htmlElement = this.element.nativeElement;
|
2861
|
-
if (!(typeof magicRow ===
|
2884
|
+
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2862
2885
|
this.rowId = magicRow.rowId;
|
2863
2886
|
}
|
2864
2887
|
set magic(val) {
|
2865
2888
|
this.id = val;
|
2866
|
-
this.selector =
|
2889
|
+
this.selector = "magic";
|
2867
2890
|
}
|
2868
2891
|
;
|
2869
2892
|
set eventsOnly(val) {
|
2870
|
-
console.log(
|
2893
|
+
console.log("eventsOnly");
|
2871
2894
|
this.eventsOnlyVal = true;
|
2872
2895
|
}
|
2873
2896
|
;
|
@@ -2875,11 +2898,11 @@ class MagicDirective {
|
|
2875
2898
|
return this._task;
|
2876
2899
|
}
|
2877
2900
|
regEvents() {
|
2878
|
-
this.eventHandlers[
|
2901
|
+
this.eventHandlers["focusin"] = this.OnFocus.bind(this);
|
2879
2902
|
Object.keys(this.eventHandlers).forEach((key) => {
|
2880
2903
|
this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);
|
2881
2904
|
});
|
2882
|
-
let events = [
|
2905
|
+
let events = ["click", "mousedown", "dblclick"];
|
2883
2906
|
events.forEach(event => {
|
2884
2907
|
this.renderer.listen(this.htmlElement, event, (e) => {
|
2885
2908
|
let fromButton = false;
|
@@ -2890,15 +2913,15 @@ class MagicDirective {
|
|
2890
2913
|
e.cancelBubble = true;
|
2891
2914
|
});
|
2892
2915
|
});
|
2893
|
-
this.renderer.listen(this.htmlElement,
|
2894
|
-
let guiEvent = getGuiEventObj(
|
2916
|
+
this.renderer.listen(this.htmlElement, "change", (e) => {
|
2917
|
+
let guiEvent = getGuiEventObj("selectionchanged", this.id, +this.rowId);
|
2895
2918
|
if ((event.target).selectedIndex !== undefined) {
|
2896
2919
|
guiEvent.Value = (event.target).selectedIndex.toString();
|
2897
2920
|
e.cancelBubble = true;
|
2898
2921
|
this.task.insertEvent(guiEvent);
|
2899
2922
|
}
|
2900
2923
|
});
|
2901
|
-
fromEvent(this.htmlElement,
|
2924
|
+
fromEvent(this.htmlElement, "input").pipe(map((event) => {
|
2902
2925
|
return event.target.value;
|
2903
2926
|
}), debounceTime(200)).subscribe((x) => {
|
2904
2927
|
if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {
|
@@ -2907,8 +2930,8 @@ class MagicDirective {
|
|
2907
2930
|
this.task.mgAccessorService.setValueToControl(this.id, x, true);
|
2908
2931
|
}
|
2909
2932
|
});
|
2910
|
-
this.renderer.listen(this.htmlElement,
|
2911
|
-
let guiEvent = getGuiEventObj(
|
2933
|
+
this.renderer.listen(this.htmlElement, "keydown", (e) => {
|
2934
|
+
let guiEvent = getGuiEventObj("keydown", this.id, +this.rowId);
|
2912
2935
|
guiEvent.modifiers = Modifiers.MODIFIER_NONE;
|
2913
2936
|
if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)
|
2914
2937
|
guiEvent.modifiers = Modifiers.MODIFIER_ALT;
|
@@ -2934,7 +2957,7 @@ class MagicDirective {
|
|
2934
2957
|
});
|
2935
2958
|
}
|
2936
2959
|
OnFocus() {
|
2937
|
-
this.task.insertEvent(getGuiEventObj(
|
2960
|
+
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2938
2961
|
event.cancelBubble = true;
|
2939
2962
|
}
|
2940
2963
|
IsSameElement(command) {
|
@@ -2954,7 +2977,7 @@ class MagicDirective {
|
|
2954
2977
|
.subscribe(a => {
|
2955
2978
|
let command = a;
|
2956
2979
|
if (isNullOrUndefined(this.rowId))
|
2957
|
-
this.rowId =
|
2980
|
+
this.rowId = "0";
|
2958
2981
|
try {
|
2959
2982
|
if (!this.eventsOnlyVal)
|
2960
2983
|
this.handleCommand(command);
|
@@ -2982,7 +3005,7 @@ class MagicDirective {
|
|
2982
3005
|
this.focusUnlistener();
|
2983
3006
|
if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
|
2984
3007
|
this.htmlElement.focus();
|
2985
|
-
this.focusUnlistener = this.renderer.listen(this.htmlElement,
|
3008
|
+
this.focusUnlistener = this.renderer.listen(this.htmlElement, "focusin", this.eventHandlers["focusin"]);
|
2986
3009
|
break;
|
2987
3010
|
}
|
2988
3011
|
}
|
@@ -2992,13 +3015,13 @@ class MagicDirective {
|
|
2992
3015
|
let methodName = command._str;
|
2993
3016
|
let args = command.arguments;
|
2994
3017
|
let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
|
2995
|
-
let resultString =
|
3018
|
+
let resultString = "";
|
2996
3019
|
try {
|
2997
3020
|
if (!isNullOrUndefined(magicComponent[methodName])) {
|
2998
3021
|
resultString = magicComponent[methodName].apply(magicComponent, args);
|
2999
3022
|
}
|
3000
3023
|
else
|
3001
|
-
console.error(
|
3024
|
+
console.error("Instance method " + methodName + " does not exists");
|
3002
3025
|
}
|
3003
3026
|
catch (e) {
|
3004
3027
|
console.error(e.message);
|
@@ -3010,10 +3033,13 @@ class MagicDirective {
|
|
3010
3033
|
handleSetProperty(command) {
|
3011
3034
|
switch (command.Operation) {
|
3012
3035
|
case HtmlProperties.ReadOnly:
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3016
|
-
|
3036
|
+
{
|
3037
|
+
if (command.obj.Type == MgControlType.CTRL_TYPE_TEXT)
|
3038
|
+
if (command.obj1 != true)
|
3039
|
+
this.renderer.removeAttribute(this.htmlElement, command.Operation);
|
3040
|
+
else
|
3041
|
+
this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);
|
3042
|
+
}
|
3017
3043
|
break;
|
3018
3044
|
}
|
3019
3045
|
}
|
@@ -3029,7 +3055,7 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3029
3055
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
3030
3056
|
type: Directive,
|
3031
3057
|
args: [{
|
3032
|
-
selector:
|
3058
|
+
selector: "[magic]"
|
3033
3059
|
}]
|
3034
3060
|
}], function () {
|
3035
3061
|
return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
@@ -3037,10 +3063,10 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3037
3063
|
}] }];
|
3038
3064
|
}, { magic: [{
|
3039
3065
|
type: Input,
|
3040
|
-
args: [
|
3066
|
+
args: ["magic"]
|
3041
3067
|
}], eventsOnly: [{
|
3042
3068
|
type: Input,
|
3043
|
-
args: [
|
3069
|
+
args: ["eventsOnly"]
|
3044
3070
|
}], rowId: [{
|
3045
3071
|
type: Input
|
3046
3072
|
}] });
|
@@ -3345,6 +3371,25 @@ class MgformatMagicDirective {
|
|
3345
3371
|
}
|
3346
3372
|
}
|
3347
3373
|
onFocusEvent($event) {
|
3374
|
+
this.calculatePattern();
|
3375
|
+
}
|
3376
|
+
onInputEvent($event) {
|
3377
|
+
this.calculatePattern();
|
3378
|
+
}
|
3379
|
+
onChangeEvent($event) {
|
3380
|
+
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3381
|
+
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3382
|
+
switch (attr) {
|
3383
|
+
case StorageAttribute.ALPHA:
|
3384
|
+
case StorageAttribute.UNICODE:
|
3385
|
+
this.formatAlphaUnicode(control);
|
3386
|
+
break;
|
3387
|
+
case StorageAttribute.BOOLEAN:
|
3388
|
+
this.formatBoolean(control);
|
3389
|
+
break;
|
3390
|
+
}
|
3391
|
+
}
|
3392
|
+
calculatePattern() {
|
3348
3393
|
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3349
3394
|
if (control != null) {
|
3350
3395
|
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
@@ -3361,26 +3406,18 @@ class MgformatMagicDirective {
|
|
3361
3406
|
if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {
|
3362
3407
|
if (control.validator == null)
|
3363
3408
|
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3364
|
-
else
|
3365
|
-
control.setValidators(
|
3409
|
+
else {
|
3410
|
+
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3411
|
+
if (isUndefined(this.magicDir.rowId))
|
3412
|
+
this.magicDir.rowId = '0';
|
3413
|
+
control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);
|
3414
|
+
}
|
3415
|
+
control.updateValueAndValidity();
|
3366
3416
|
}
|
3367
3417
|
}
|
3368
3418
|
}
|
3369
3419
|
}
|
3370
3420
|
}
|
3371
|
-
onChangeEvent($event) {
|
3372
|
-
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3373
|
-
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
3374
|
-
switch (attr) {
|
3375
|
-
case StorageAttribute.ALPHA:
|
3376
|
-
case StorageAttribute.UNICODE:
|
3377
|
-
this.formatAlphaUnicode(control);
|
3378
|
-
break;
|
3379
|
-
case StorageAttribute.BOOLEAN:
|
3380
|
-
this.formatBoolean(control);
|
3381
|
-
break;
|
3382
|
-
}
|
3383
|
-
}
|
3384
3421
|
formatDate(pic) {
|
3385
3422
|
let mgDateFormatter = new MgDateFormatter();
|
3386
3423
|
this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
|
@@ -3530,7 +3567,7 @@ class MgformatMagicDirective {
|
|
3530
3567
|
MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
|
3531
3568
|
MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) {
|
3532
3569
|
if (rf & 1) {
|
3533
|
-
i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
|
3570
|
+
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); });
|
3534
3571
|
}
|
3535
3572
|
} });
|
3536
3573
|
(function () {
|
@@ -3542,6 +3579,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
|
|
3542
3579
|
}], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
|
3543
3580
|
type: HostListener,
|
3544
3581
|
args: ['focus', ['$event']]
|
3582
|
+
}], onInputEvent: [{
|
3583
|
+
type: HostListener,
|
3584
|
+
args: ['input', ['$event']]
|
3545
3585
|
}], onChangeEvent: [{
|
3546
3586
|
type: HostListener,
|
3547
3587
|
args: ['change', ['$event']]
|
@@ -4053,7 +4093,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
4053
4093
|
i0.ɵɵadvance(3);
|
4054
4094
|
i0.ɵɵproperty("ngIf", ctx.showSpinner);
|
4055
4095
|
}
|
4056
|
-
}, 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;
|
4096
|
+
}, 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)}}"] });
|
4057
4097
|
(function () {
|
4058
4098
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
4059
4099
|
type: Component,
|
@@ -4478,11 +4518,13 @@ const MG_FORMATS = {
|
|
4478
4518
|
}
|
4479
4519
|
};
|
4480
4520
|
class MgDateAdapter extends NativeDateAdapter {
|
4481
|
-
constructor(platform, task) {
|
4482
|
-
super(
|
4521
|
+
constructor(platform, task, localeId) {
|
4522
|
+
super(localeId, platform);
|
4483
4523
|
this.platform = platform;
|
4484
4524
|
this.task = task;
|
4525
|
+
this.localeId = localeId;
|
4485
4526
|
this.mgdtfmt = null;
|
4527
|
+
this.setLocale(localeId);
|
4486
4528
|
}
|
4487
4529
|
parse(value) {
|
4488
4530
|
let valueStr = value;
|
@@ -4558,12 +4600,17 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4558
4600
|
}
|
4559
4601
|
}
|
4560
4602
|
}
|
4561
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
|
4603
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4562
4604
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4563
4605
|
(function () {
|
4564
4606
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4565
4607
|
type: Injectable
|
4566
|
-
}], function () {
|
4608
|
+
}], function () {
|
4609
|
+
return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4610
|
+
type: Inject,
|
4611
|
+
args: [MAT_DATE_LOCALE]
|
4612
|
+
}] }];
|
4613
|
+
}, null);
|
4567
4614
|
})();
|
4568
4615
|
|
4569
4616
|
const matDateProviders = [
|