@magic-xpa/angular 4.900.0-dev491.7 → 4.901.0-ang15-dev491.310
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/magic.core.module.mjs +7 -9
- package/esm2020/src/services/accessor.magic.service.mjs +29 -6
- package/esm2020/src/services/engine.magic.service.mjs +3 -3
- package/esm2020/src/services/magic-color.service.mjs +4 -4
- package/esm2020/src/services/mg-date-adapter.mjs +13 -8
- package/esm2020/src/services/subform.magic.service.mjs +1 -1
- package/esm2020/src/services/table.magic.service.mjs +2 -2
- package/esm2020/src/services/task.magics.service.mjs +7 -4
- package/esm2020/src/ui/components/base-magic-alert.component.mjs +3 -7
- package/esm2020/src/ui/components/base-magic-confirm.component.mjs +3 -7
- package/esm2020/src/ui/components/magic-alert.component.mjs +3 -35
- package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +3 -39
- package/esm2020/src/ui/directives/NonMagicControlDirective.mjs +6 -6
- package/esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs +3 -3
- package/esm2020/src/ui/directives/magic.directive.mjs +44 -41
- package/esm2020/src/ui/directives/mgformat.magic.directive.mjs +36 -17
- package/esm2020/src/ui/magic-modal/base-magic-overlay-container.mjs +1 -1
- package/esm2020/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +4 -18
- package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +5 -5
- package/esm2020/src/ui/magic-root.component.mjs +4 -38
- package/esm2020/src/ui/mgerror.magic.component.mjs +9 -9
- package/esm2020/src/ui/router-container.magic.component.mjs +4 -4
- package/esm2020/src/ui/subform.magic.component.mjs +4 -4
- package/fesm2015/magic-xpa-angular.mjs +164 -236
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +162 -236
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +8 -8
- 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/components/base-magic-alert.component.d.ts +1 -1
- package/src/ui/components/base-magic-confirm.component.d.ts +1 -1
- package/src/ui/components/magic-alert.component.d.ts +1 -1
- package/src/ui/components/magic-confirmation-box.component.d.ts +1 -1
- package/src/ui/directives/NonMagicControlDirective.d.ts +1 -1
- package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +1 -1
- package/src/ui/directives/magic/checkbox.magic.directive.d.ts +1 -1
- package/src/ui/directives/magic/combobox.magic.directive.d.ts +1 -1
- package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +1 -1
- package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +1 -1
- package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +1 -1
- package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +1 -1
- package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +1 -1
- package/src/ui/directives/magic/row.magic.directive.d.ts +1 -1
- package/src/ui/directives/magic-focus.directive.d.ts +1 -1
- package/src/ui/directives/magic.directive.d.ts +7 -7
- package/src/ui/directives/magicViewContainerRef.directive.d.ts +1 -1
- package/src/ui/directives/mgformat.magic.directive.d.ts +3 -1
- package/src/ui/directives/range-validator.magic.directive.d.ts +1 -1
- package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +1 -1
- package/src/ui/magic-modal/magic-overlay-container.d.ts +1 -1
- package/src/ui/magic-root.component.d.ts +1 -1
- package/src/ui/mgerror.magic.component.d.ts +1 -1
- package/src/ui/pipes/date.magic.pipe.d.ts +1 -1
- package/src/ui/pipes/time.magic.pipe.d.ts +1 -1
- package/src/ui/router-container.magic.component.d.ts +1 -1
- package/src/ui/subform.magic.component.d.ts +1 -1
- package/src/ui/task-base.magic.component.d.ts +1 -1
- package/magic-xpa-angular.d.ts +0 -2
@@ -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);
|
@@ -610,6 +610,9 @@ SubformMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: SubformMagicServic
|
|
610
610
|
})();
|
611
611
|
|
612
612
|
class RouterContainerMagicComponent {
|
613
|
+
static get LastRoute() {
|
614
|
+
return RouterContainerMagicComponent.lastRoute;
|
615
|
+
}
|
613
616
|
constructor(activatedRoute, router, magic, containerTaskService, componentFactoryResolver, viewContainerRef, componentList, pendingCommandsCollector, routerCommandsMagicService) {
|
614
617
|
this.activatedRoute = activatedRoute;
|
615
618
|
this.router = router;
|
@@ -623,9 +626,6 @@ class RouterContainerMagicComponent {
|
|
623
626
|
this.componentRef = null;
|
624
627
|
this.parentMgSubformService = null;
|
625
628
|
}
|
626
|
-
static get LastRoute() {
|
627
|
-
return RouterContainerMagicComponent.lastRoute;
|
628
|
-
}
|
629
629
|
ngOnInit() {
|
630
630
|
let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
|
631
631
|
let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
|
@@ -824,15 +824,11 @@ class BaseMagicConfirmComponent {
|
|
824
824
|
}
|
825
825
|
}
|
826
826
|
BaseMagicConfirmComponent.ɵfac = function BaseMagicConfirmComponent_Factory(t) { return new (t || BaseMagicConfirmComponent)(); };
|
827
|
-
BaseMagicConfirmComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }
|
827
|
+
BaseMagicConfirmComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { } });
|
828
828
|
(function () {
|
829
829
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicConfirmComponent, [{
|
830
830
|
type: Component,
|
831
|
-
args: [{
|
832
|
-
selector: 'mg-base-alert',
|
833
|
-
template: '',
|
834
|
-
styles: ['']
|
835
|
-
}]
|
831
|
+
args: [{ selector: 'mg-base-alert', template: '' }]
|
836
832
|
}], null, { title: [{
|
837
833
|
type: Input
|
838
834
|
}], message: [{
|
@@ -851,15 +847,11 @@ class BaseMagicAlertComponent {
|
|
851
847
|
}
|
852
848
|
}
|
853
849
|
BaseMagicAlertComponent.ɵfac = function BaseMagicAlertComponent_Factory(t) { return new (t || BaseMagicAlertComponent)(); };
|
854
|
-
BaseMagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }
|
850
|
+
BaseMagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { } });
|
855
851
|
(function () {
|
856
852
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicAlertComponent, [{
|
857
853
|
type: Component,
|
858
|
-
args: [{
|
859
|
-
selector: 'mg-base-alert',
|
860
|
-
template: '',
|
861
|
-
styles: ['']
|
862
|
-
}]
|
854
|
+
args: [{ selector: 'mg-base-alert', template: '' }]
|
863
855
|
}], null, { title: [{
|
864
856
|
type: Input
|
865
857
|
}], message: [{
|
@@ -993,13 +985,11 @@ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlay
|
|
993
985
|
i0.ɵɵelement(6, "div", 5);
|
994
986
|
i0.ɵɵelementEnd();
|
995
987
|
}
|
996
|
-
},
|
988
|
+
}, dependencies: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;z-index:999;inset:0}"] });
|
997
989
|
(function () {
|
998
990
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
|
999
991
|
type: Component,
|
1000
|
-
args: [{
|
1001
|
-
selector: 'app-magic-overlay-container-wrapper',
|
1002
|
-
template: `
|
992
|
+
args: [{ selector: 'app-magic-overlay-container-wrapper', template: `
|
1003
993
|
<div>
|
1004
994
|
<div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" magicFocus></div>
|
1005
995
|
<div class="overlay-container-wrapper-background" #overlayContainerWrapper>
|
@@ -1008,19 +998,7 @@ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlay
|
|
1008
998
|
</div>
|
1009
999
|
<div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" ></div>
|
1010
1000
|
</div>
|
1011
|
-
`,
|
1012
|
-
styles: [`
|
1013
|
-
.overlay-container-wrapper-background {
|
1014
|
-
/* modal background fixed across whole screen */
|
1015
|
-
position: fixed;
|
1016
|
-
top: 0;
|
1017
|
-
z-index: 999;
|
1018
|
-
right: 0;
|
1019
|
-
bottom: 0;
|
1020
|
-
left: 0;
|
1021
|
-
}
|
1022
|
-
`]
|
1023
|
-
}]
|
1001
|
+
`, styles: [".overlay-container-wrapper-background{position:fixed;z-index:999;inset:0}\n"] }]
|
1024
1002
|
}], function () { return [{ type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.Compiler }]; }, { Component: [{
|
1025
1003
|
type: Input
|
1026
1004
|
}], Parameters: [{
|
@@ -1082,7 +1060,7 @@ function MagicOverlayContainer_button_2_Template(rf, ctx) {
|
|
1082
1060
|
if (rf & 1) {
|
1083
1061
|
const _r5 = i0.ɵɵgetCurrentView();
|
1084
1062
|
i0.ɵɵelementStart(0, "button", 8);
|
1085
|
-
i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.OnClose(); });
|
1063
|
+
i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.OnClose()); });
|
1086
1064
|
i0.ɵɵtext(1, "X");
|
1087
1065
|
i0.ɵɵelementEnd();
|
1088
1066
|
}
|
@@ -1093,7 +1071,7 @@ function MagicOverlayContainer_div_5_Template(rf, ctx) {
|
|
1093
1071
|
i0.ɵɵelementStart(0, "div", 9, 10);
|
1094
1072
|
i0.ɵɵtext(2);
|
1095
1073
|
i0.ɵɵelementStart(3, "button", 11);
|
1096
|
-
i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.OnClose(); });
|
1074
|
+
i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.OnClose()); });
|
1097
1075
|
i0.ɵɵtext(4, "X");
|
1098
1076
|
i0.ɵɵelementEnd()();
|
1099
1077
|
}
|
@@ -1206,7 +1184,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
1206
1184
|
i0.ɵɵadvance(1);
|
1207
1185
|
i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
|
1208
1186
|
}
|
1209
|
-
},
|
1187
|
+
}, dependencies: [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
1188
|
(function () {
|
1211
1189
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
|
1212
1190
|
type: Component,
|
@@ -1226,7 +1204,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
1226
1204
|
</div>
|
1227
1205
|
</div>
|
1228
1206
|
</div>
|
1229
|
-
`, styles: [".modal-foreground{position:fixed;
|
1207
|
+
`, 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
1208
|
}], function () { return [{ type: i0.ComponentFactoryResolver }]; }, { headerElementRef: [{
|
1231
1209
|
type: ViewChild,
|
1232
1210
|
args: ['modalheader', { static: false }]
|
@@ -1281,46 +1259,14 @@ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent,
|
|
1281
1259
|
(function () {
|
1282
1260
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAlertComponent, [{
|
1283
1261
|
type: Component,
|
1284
|
-
args: [{
|
1285
|
-
selector: 'sample-magic-alert-component',
|
1286
|
-
template: `<div>
|
1262
|
+
args: [{ selector: 'sample-magic-alert-component', template: `<div>
|
1287
1263
|
<div class="mg-message-background">
|
1288
1264
|
<h2> {{title}}</h2>
|
1289
1265
|
<p>{{message}} </p>
|
1290
1266
|
|
1291
1267
|
<button (click)="OnClose()">OK</button>
|
1292
1268
|
</div>
|
1293
|
-
</div>`,
|
1294
|
-
styles: [`
|
1295
|
-
.mg-message-background {
|
1296
|
-
background-color: #F5F5F5;
|
1297
|
-
text-align: center;
|
1298
|
-
width: 40%;
|
1299
|
-
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
1300
|
-
padding: 17px;
|
1301
|
-
border-radius: 5px;
|
1302
|
-
text-align: center;
|
1303
|
-
margin-top: 10% ;
|
1304
|
-
margin-left: auto;
|
1305
|
-
margin-right: auto;
|
1306
|
-
border: 1px solid gray;
|
1307
|
-
}
|
1308
|
-
|
1309
|
-
button {
|
1310
|
-
background-color: #8CD4F5;
|
1311
|
-
color: white;
|
1312
|
-
border: none;
|
1313
|
-
box-shadow: none;
|
1314
|
-
font-size: 17px;
|
1315
|
-
font-weight: 500;
|
1316
|
-
-webkit-border-radius: 4px;
|
1317
|
-
border-radius: 5px;
|
1318
|
-
padding: 10px 32px;
|
1319
|
-
margin: 26px 5px 0 5px;
|
1320
|
-
cursor: pointer;
|
1321
|
-
}
|
1322
|
-
`]
|
1323
|
-
}]
|
1269
|
+
</div>`, styles: [".mg-message-background{background-color:#f5f5f5;width:40%;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;padding:17px;border-radius:5px;text-align:center;margin-top:10%;margin-left:auto;margin-right:auto;border:1px solid gray}button{background-color:#8cd4f5;color:#fff;border:none;box-shadow:none;font-size:17px;font-weight:500;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}\n"] }]
|
1324
1270
|
}], null, null);
|
1325
1271
|
})();
|
1326
1272
|
|
@@ -1353,9 +1299,7 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
|
|
1353
1299
|
(function () {
|
1354
1300
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
|
1355
1301
|
type: Component,
|
1356
|
-
args: [{
|
1357
|
-
selector: 'sample-magic-confirmation-box',
|
1358
|
-
template: `<div>
|
1302
|
+
args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
|
1359
1303
|
<div class="mg-message-background">
|
1360
1304
|
<h2> {{title}}</h2>
|
1361
1305
|
{{message}}
|
@@ -1365,41 +1309,7 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
|
|
1365
1309
|
<button (click)="OnClose(true)">OK</button>
|
1366
1310
|
<button class="cancel" (click)="OnClose(false)">Cancel</button>
|
1367
1311
|
</div>
|
1368
|
-
</div>`,
|
1369
|
-
styles: [`
|
1370
|
-
.mg-message-background {
|
1371
|
-
background-color: #F5F5F5;
|
1372
|
-
text-align: center;
|
1373
|
-
width: 40%;
|
1374
|
-
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
1375
|
-
padding: 17px;
|
1376
|
-
border-radius: 5px;
|
1377
|
-
text-align: center;
|
1378
|
-
margin-top: 10% ;
|
1379
|
-
margin-left: auto;
|
1380
|
-
margin-right: auto;
|
1381
|
-
border: 1px solid gray;
|
1382
|
-
}
|
1383
|
-
|
1384
|
-
button {
|
1385
|
-
background-color: #8CD4F5;
|
1386
|
-
color: white;
|
1387
|
-
border: none;
|
1388
|
-
box-shadow: none;
|
1389
|
-
font-size: 17px;
|
1390
|
-
font-weight: 500;
|
1391
|
-
-webkit-border-radius: 4px;
|
1392
|
-
border-radius: 5px;
|
1393
|
-
padding: 10px 32px;
|
1394
|
-
margin: 26px 5px 0 5px;
|
1395
|
-
cursor: pointer;
|
1396
|
-
}
|
1397
|
-
|
1398
|
-
button.cancel {
|
1399
|
-
background-color: #C1C1C1;
|
1400
|
-
}
|
1401
|
-
`]
|
1402
|
-
}]
|
1312
|
+
</div>`, styles: [".mg-message-background{background-color:#f5f5f5;width:40%;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;padding:17px;border-radius:5px;text-align:center;margin-top:10%;margin-left:auto;margin-right:auto;border:1px solid gray}button{background-color:#8cd4f5;color:#fff;border:none;box-shadow:none;font-size:17px;font-weight:500;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}button.cancel{background-color:#c1c1c1}\n"] }]
|
1403
1313
|
}], null, null);
|
1404
1314
|
})();
|
1405
1315
|
|
@@ -1812,8 +1722,8 @@ class TaskMagicService {
|
|
1812
1722
|
guiRowId = '0';
|
1813
1723
|
return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';
|
1814
1724
|
}
|
1815
|
-
getFormattedValue(controlName, val) {
|
1816
|
-
return this.magic.GetFormattedValue(this.taskId, controlName, val);
|
1725
|
+
getFormattedValue(controlName, val, rowId) {
|
1726
|
+
return this.magic.GetFormattedValue(this.taskId, controlName, val, rowId);
|
1817
1727
|
}
|
1818
1728
|
setValue(controlId, guiRowId, value) {
|
1819
1729
|
return this.Records.list[guiRowId].setValue(controlId, value);
|
@@ -2021,7 +1931,10 @@ class TaskMagicService {
|
|
2021
1931
|
return val;
|
2022
1932
|
}
|
2023
1933
|
case StorageAttribute.NUMERIC:
|
2024
|
-
|
1934
|
+
if (isUndefined(val))
|
1935
|
+
return val;
|
1936
|
+
else
|
1937
|
+
return (val != null) ? +val : null;
|
2025
1938
|
default:
|
2026
1939
|
return val;
|
2027
1940
|
}
|
@@ -2252,7 +2165,7 @@ class TableMagicService {
|
|
2252
2165
|
this.task.onScrollDown();
|
2253
2166
|
}
|
2254
2167
|
sortData(e) { }
|
2255
|
-
mgOnPaginateChange(e) { }
|
2168
|
+
mgOnPaginateChange(e, changeSelectedRow) { }
|
2256
2169
|
mgOptionChanged(e) { }
|
2257
2170
|
updateTableSize(size) {
|
2258
2171
|
if (size === 0) {
|
@@ -2310,6 +2223,9 @@ const SYSTEM_BG = 4;
|
|
2310
2223
|
const SYSTEM_FG_AND_SYSTEM_BG = 6;
|
2311
2224
|
const TRANSPERENT_BG = 1;
|
2312
2225
|
class MagicColorService {
|
2226
|
+
getColorFilePath() {
|
2227
|
+
return 'assets/' + this.colorFileName;
|
2228
|
+
}
|
2313
2229
|
constructor(http, colorFile1 = 'clr_rnt.eng') {
|
2314
2230
|
this.http = http;
|
2315
2231
|
this.colorFileName = 'clr_rnt.eng';
|
@@ -2319,9 +2235,6 @@ class MagicColorService {
|
|
2319
2235
|
else
|
2320
2236
|
this.colorFileName = 'clr_rnt.eng';
|
2321
2237
|
}
|
2322
|
-
getColorFilePath() {
|
2323
|
-
return 'assets/' + this.colorFileName;
|
2324
|
-
}
|
2325
2238
|
getColorData() {
|
2326
2239
|
if (!this.colorsData) {
|
2327
2240
|
this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
|
@@ -2409,9 +2322,9 @@ class AccessorMagicService {
|
|
2409
2322
|
let properties;
|
2410
2323
|
properties = this.task.Records.list[0].getControlMetadata(controlId);
|
2411
2324
|
if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)
|
2412
|
-
return false;
|
2413
|
-
else
|
2414
2325
|
return true;
|
2326
|
+
else
|
2327
|
+
return false;
|
2415
2328
|
}
|
2416
2329
|
getText(controlId, rowId) {
|
2417
2330
|
return this.task.getProperty(controlId, HtmlProperties.Text, rowId);
|
@@ -2441,6 +2354,29 @@ class AccessorMagicService {
|
|
2441
2354
|
let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
|
2442
2355
|
return vis ? 'visible' : 'hidden';
|
2443
2356
|
}
|
2357
|
+
getAlphaMask(controlId, rowId) {
|
2358
|
+
if (isNullOrUndefined(controlId))
|
2359
|
+
return null;
|
2360
|
+
let pic = this.task.GetControlPictureMask(controlId);
|
2361
|
+
let mask = pic.getMask();
|
2362
|
+
let valueStr = new StringBuilder();
|
2363
|
+
for (let i = 0; i < mask.length; i++) {
|
2364
|
+
switch (mask.charCodeAt(i)) {
|
2365
|
+
case PICInterface.PIC_N:
|
2366
|
+
valueStr.Append("0");
|
2367
|
+
break;
|
2368
|
+
case PICInterface.PIC_U:
|
2369
|
+
case PICInterface.PIC_L:
|
2370
|
+
case PICInterface.PIC_X:
|
2371
|
+
valueStr.Append("A");
|
2372
|
+
break;
|
2373
|
+
default:
|
2374
|
+
valueStr.Append(mask.charAt(i));
|
2375
|
+
break;
|
2376
|
+
}
|
2377
|
+
}
|
2378
|
+
return (pic != null) ? valueStr.toString() : null;
|
2379
|
+
}
|
2444
2380
|
getNumericPicture(picture) {
|
2445
2381
|
var obj = {};
|
2446
2382
|
if (isNullOrUndefined(picture))
|
@@ -2509,7 +2445,7 @@ class AccessorMagicService {
|
|
2509
2445
|
}
|
2510
2446
|
getFormattedValue(controlId, rowId) {
|
2511
2447
|
let val = this.task.getValue(controlId, rowId);
|
2512
|
-
val = this.task.getFormattedValue(controlId, val);
|
2448
|
+
val = this.task.getFormattedValue(controlId, val, rowId);
|
2513
2449
|
return val;
|
2514
2450
|
}
|
2515
2451
|
getPicture(controlId, rowId) {
|
@@ -2849,6 +2785,16 @@ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, sele
|
|
2849
2785
|
})();
|
2850
2786
|
|
2851
2787
|
class MagicDirective {
|
2788
|
+
set magic(val) {
|
2789
|
+
this.id = val;
|
2790
|
+
this.selector = "magic";
|
2791
|
+
}
|
2792
|
+
;
|
2793
|
+
set eventsOnly(val) {
|
2794
|
+
console.log("eventsOnly");
|
2795
|
+
this.eventsOnlyVal = true;
|
2796
|
+
}
|
2797
|
+
;
|
2852
2798
|
constructor(_task, element, renderer, vcRef, magicRow) {
|
2853
2799
|
this._task = _task;
|
2854
2800
|
this.element = element;
|
@@ -2858,28 +2804,18 @@ class MagicDirective {
|
|
2858
2804
|
this.eventHandlers = {};
|
2859
2805
|
this.eventsOnlyVal = false;
|
2860
2806
|
this.htmlElement = this.element.nativeElement;
|
2861
|
-
if (!(typeof magicRow ===
|
2807
|
+
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2862
2808
|
this.rowId = magicRow.rowId;
|
2863
2809
|
}
|
2864
|
-
set magic(val) {
|
2865
|
-
this.id = val;
|
2866
|
-
this.selector = 'magic';
|
2867
|
-
}
|
2868
|
-
;
|
2869
|
-
set eventsOnly(val) {
|
2870
|
-
console.log('eventsOnly');
|
2871
|
-
this.eventsOnlyVal = true;
|
2872
|
-
}
|
2873
|
-
;
|
2874
2810
|
get task() {
|
2875
2811
|
return this._task;
|
2876
2812
|
}
|
2877
2813
|
regEvents() {
|
2878
|
-
this.eventHandlers[
|
2814
|
+
this.eventHandlers["focusin"] = this.OnFocus.bind(this);
|
2879
2815
|
Object.keys(this.eventHandlers).forEach((key) => {
|
2880
2816
|
this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);
|
2881
2817
|
});
|
2882
|
-
let events = [
|
2818
|
+
let events = ["click", "mousedown", "dblclick"];
|
2883
2819
|
events.forEach(event => {
|
2884
2820
|
this.renderer.listen(this.htmlElement, event, (e) => {
|
2885
2821
|
let fromButton = false;
|
@@ -2890,15 +2826,15 @@ class MagicDirective {
|
|
2890
2826
|
e.cancelBubble = true;
|
2891
2827
|
});
|
2892
2828
|
});
|
2893
|
-
this.renderer.listen(this.htmlElement,
|
2894
|
-
let guiEvent = getGuiEventObj(
|
2829
|
+
this.renderer.listen(this.htmlElement, "change", (e) => {
|
2830
|
+
let guiEvent = getGuiEventObj("selectionchanged", this.id, +this.rowId);
|
2895
2831
|
if ((event.target).selectedIndex !== undefined) {
|
2896
2832
|
guiEvent.Value = (event.target).selectedIndex.toString();
|
2897
2833
|
e.cancelBubble = true;
|
2898
2834
|
this.task.insertEvent(guiEvent);
|
2899
2835
|
}
|
2900
2836
|
});
|
2901
|
-
fromEvent(this.htmlElement,
|
2837
|
+
fromEvent(this.htmlElement, "input").pipe(map((event) => {
|
2902
2838
|
return event.target.value;
|
2903
2839
|
}), debounceTime(200)).subscribe((x) => {
|
2904
2840
|
if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {
|
@@ -2907,8 +2843,8 @@ class MagicDirective {
|
|
2907
2843
|
this.task.mgAccessorService.setValueToControl(this.id, x, true);
|
2908
2844
|
}
|
2909
2845
|
});
|
2910
|
-
this.renderer.listen(this.htmlElement,
|
2911
|
-
let guiEvent = getGuiEventObj(
|
2846
|
+
this.renderer.listen(this.htmlElement, "keydown", (e) => {
|
2847
|
+
let guiEvent = getGuiEventObj("keydown", this.id, +this.rowId);
|
2912
2848
|
guiEvent.modifiers = Modifiers.MODIFIER_NONE;
|
2913
2849
|
if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)
|
2914
2850
|
guiEvent.modifiers = Modifiers.MODIFIER_ALT;
|
@@ -2934,7 +2870,7 @@ class MagicDirective {
|
|
2934
2870
|
});
|
2935
2871
|
}
|
2936
2872
|
OnFocus() {
|
2937
|
-
this.task.insertEvent(getGuiEventObj(
|
2873
|
+
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2938
2874
|
event.cancelBubble = true;
|
2939
2875
|
}
|
2940
2876
|
IsSameElement(command) {
|
@@ -2954,7 +2890,7 @@ class MagicDirective {
|
|
2954
2890
|
.subscribe(a => {
|
2955
2891
|
let command = a;
|
2956
2892
|
if (isNullOrUndefined(this.rowId))
|
2957
|
-
this.rowId =
|
2893
|
+
this.rowId = "0";
|
2958
2894
|
try {
|
2959
2895
|
if (!this.eventsOnlyVal)
|
2960
2896
|
this.handleCommand(command);
|
@@ -2982,7 +2918,7 @@ class MagicDirective {
|
|
2982
2918
|
this.focusUnlistener();
|
2983
2919
|
if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
|
2984
2920
|
this.htmlElement.focus();
|
2985
|
-
this.focusUnlistener = this.renderer.listen(this.htmlElement,
|
2921
|
+
this.focusUnlistener = this.renderer.listen(this.htmlElement, "focusin", this.eventHandlers["focusin"]);
|
2986
2922
|
break;
|
2987
2923
|
}
|
2988
2924
|
}
|
@@ -2992,13 +2928,13 @@ class MagicDirective {
|
|
2992
2928
|
let methodName = command._str;
|
2993
2929
|
let args = command.arguments;
|
2994
2930
|
let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
|
2995
|
-
let resultString =
|
2931
|
+
let resultString = "";
|
2996
2932
|
try {
|
2997
2933
|
if (!isNullOrUndefined(magicComponent[methodName])) {
|
2998
2934
|
resultString = magicComponent[methodName].apply(magicComponent, args);
|
2999
2935
|
}
|
3000
2936
|
else
|
3001
|
-
console.error(
|
2937
|
+
console.error("Instance method " + methodName + " does not exists");
|
3002
2938
|
}
|
3003
2939
|
catch (e) {
|
3004
2940
|
console.error(e.message);
|
@@ -3010,10 +2946,13 @@ class MagicDirective {
|
|
3010
2946
|
handleSetProperty(command) {
|
3011
2947
|
switch (command.Operation) {
|
3012
2948
|
case HtmlProperties.ReadOnly:
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3016
|
-
|
2949
|
+
{
|
2950
|
+
if (command.obj.Type == MgControlType.CTRL_TYPE_TEXT)
|
2951
|
+
if (command.obj1 != true)
|
2952
|
+
this.renderer.removeAttribute(this.htmlElement, command.Operation);
|
2953
|
+
else
|
2954
|
+
this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);
|
2955
|
+
}
|
3017
2956
|
break;
|
3018
2957
|
}
|
3019
2958
|
}
|
@@ -3029,7 +2968,7 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3029
2968
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
3030
2969
|
type: Directive,
|
3031
2970
|
args: [{
|
3032
|
-
selector:
|
2971
|
+
selector: "[magic]"
|
3033
2972
|
}]
|
3034
2973
|
}], function () {
|
3035
2974
|
return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
@@ -3037,21 +2976,21 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3037
2976
|
}] }];
|
3038
2977
|
}, { magic: [{
|
3039
2978
|
type: Input,
|
3040
|
-
args: [
|
2979
|
+
args: ["magic"]
|
3041
2980
|
}], eventsOnly: [{
|
3042
2981
|
type: Input,
|
3043
|
-
args: [
|
2982
|
+
args: ["eventsOnly"]
|
3044
2983
|
}], rowId: [{
|
3045
2984
|
type: Input
|
3046
2985
|
}] });
|
3047
2986
|
})();
|
3048
2987
|
|
3049
2988
|
class NoControlMagicDirective extends MagicDirective {
|
2989
|
+
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
2990
|
+
;
|
3050
2991
|
constructor(_task, element, renderer, vcRef, magicRow) {
|
3051
2992
|
super(_task, element, renderer, vcRef, magicRow);
|
3052
2993
|
}
|
3053
|
-
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
3054
|
-
;
|
3055
2994
|
regEvents() {
|
3056
2995
|
super.regEvents();
|
3057
2996
|
if (this.htmlElement instanceof HTMLSelectElement) {
|
@@ -3345,6 +3284,25 @@ class MgformatMagicDirective {
|
|
3345
3284
|
}
|
3346
3285
|
}
|
3347
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() {
|
3348
3306
|
let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
|
3349
3307
|
if (control != null) {
|
3350
3308
|
let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
|
@@ -3361,26 +3319,22 @@ class MgformatMagicDirective {
|
|
3361
3319
|
if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {
|
3362
3320
|
if (control.validator == null)
|
3363
3321
|
control.setValidators(Validators.maxLength(pic.getMaskLength()));
|
3364
|
-
else
|
3365
|
-
|
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();
|
3366
3333
|
}
|
3367
3334
|
}
|
3368
3335
|
}
|
3369
3336
|
}
|
3370
3337
|
}
|
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
3338
|
formatDate(pic) {
|
3385
3339
|
let mgDateFormatter = new MgDateFormatter();
|
3386
3340
|
this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
|
@@ -3530,7 +3484,7 @@ class MgformatMagicDirective {
|
|
3530
3484
|
MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
|
3531
3485
|
MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) {
|
3532
3486
|
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); });
|
3487
|
+
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
3488
|
}
|
3535
3489
|
} });
|
3536
3490
|
(function () {
|
@@ -3542,6 +3496,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
|
|
3542
3496
|
}], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
|
3543
3497
|
type: HostListener,
|
3544
3498
|
args: ['focus', ['$event']]
|
3499
|
+
}], onInputEvent: [{
|
3500
|
+
type: HostListener,
|
3501
|
+
args: ['input', ['$event']]
|
3545
3502
|
}], onChangeEvent: [{
|
3546
3503
|
type: HostListener,
|
3547
3504
|
args: ['change', ['$event']]
|
@@ -3659,14 +3616,14 @@ function SubformMagicComponent_ndc_dynamic_0_Template(rf, ctx) {
|
|
3659
3616
|
}
|
3660
3617
|
}
|
3661
3618
|
class SubformMagicComponent {
|
3619
|
+
set magic(val) { this.id = val; }
|
3620
|
+
;
|
3662
3621
|
constructor(vcRef, mgSub) {
|
3663
3622
|
this.vcRef = vcRef;
|
3664
3623
|
this.mgSub = mgSub;
|
3665
3624
|
this.component = null;
|
3666
3625
|
this.component = (this.vcRef._hostLView).find(v => !isNullOrUndefined(v));
|
3667
3626
|
}
|
3668
|
-
set magic(val) { this.id = val; }
|
3669
|
-
;
|
3670
3627
|
get Component() {
|
3671
3628
|
return this.mgSub.mgGetComp(this.id);
|
3672
3629
|
}
|
@@ -3682,7 +3639,7 @@ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicCompone
|
|
3682
3639
|
if (rf & 2) {
|
3683
3640
|
i0.ɵɵproperty("ngIf", ctx.Component);
|
3684
3641
|
}
|
3685
|
-
},
|
3642
|
+
}, dependencies: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
|
3686
3643
|
(function () {
|
3687
3644
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
|
3688
3645
|
type: Component,
|
@@ -3731,13 +3688,6 @@ function ErrorMagicComponent_div_0_Template(rf, ctx) {
|
|
3731
3688
|
}
|
3732
3689
|
const _c1 = ["*"];
|
3733
3690
|
class ErrorMagicComponent {
|
3734
|
-
constructor(_task, mgService, changeDetectorRef) {
|
3735
|
-
this._task = _task;
|
3736
|
-
this.mgService = mgService;
|
3737
|
-
this.changeDetectorRef = changeDetectorRef;
|
3738
|
-
this.defaultDisplay = true;
|
3739
|
-
this.rowId = "0";
|
3740
|
-
}
|
3741
3691
|
set magic(val) {
|
3742
3692
|
this.id = val;
|
3743
3693
|
}
|
@@ -3751,6 +3701,13 @@ class ErrorMagicComponent {
|
|
3751
3701
|
this.changeDetectorRef.detectChanges();
|
3752
3702
|
}
|
3753
3703
|
;
|
3704
|
+
constructor(_task, mgService, changeDetectorRef) {
|
3705
|
+
this._task = _task;
|
3706
|
+
this.mgService = mgService;
|
3707
|
+
this.changeDetectorRef = changeDetectorRef;
|
3708
|
+
this.defaultDisplay = true;
|
3709
|
+
this.rowId = "0";
|
3710
|
+
}
|
3754
3711
|
isEmpty(element) {
|
3755
3712
|
const nodes = element.childNodes;
|
3756
3713
|
for (let i = 0; i < nodes.length; i++) {
|
@@ -3799,7 +3756,7 @@ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent,
|
|
3799
3756
|
if (rf & 2) {
|
3800
3757
|
i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
|
3801
3758
|
}
|
3802
|
-
},
|
3759
|
+
}, dependencies: [i1.NgIf], encapsulation: 2 });
|
3803
3760
|
(function () {
|
3804
3761
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMagicComponent, [{
|
3805
3762
|
type: Component,
|
@@ -4053,14 +4010,11 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
4053
4010
|
i0.ɵɵadvance(3);
|
4054
4011
|
i0.ɵɵproperty("ngIf", ctx.showSpinner);
|
4055
4012
|
}
|
4056
|
-
},
|
4013
|
+
}, dependencies: [i1.NgIf, i1.NgTemplateOutlet, i3.DynamicComponent, i3.DynamicIoDirective, MagicViewContainerRef], 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:_ngcontent-%COMP%_spin 2s linear infinite}.spinner-background[_ngcontent-%COMP%]{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
|
4057
4014
|
(function () {
|
4058
4015
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
4059
4016
|
type: Component,
|
4060
|
-
args: [{
|
4061
|
-
selector: 'magic-root',
|
4062
|
-
providers: [],
|
4063
|
-
template: `
|
4017
|
+
args: [{ selector: 'magic-root', providers: [], template: `
|
4064
4018
|
<div #magicRoot>
|
4065
4019
|
<ndc-dynamic
|
4066
4020
|
*ngIf = "RootComponent !== null"
|
@@ -4079,38 +4033,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
4079
4033
|
<ng-template #defaultSpinner>
|
4080
4034
|
<div class="mgSpinnerClass"></div>
|
4081
4035
|
</ng-template>
|
4082
|
-
`,
|
4083
|
-
styles: [`
|
4084
|
-
.mgSpinnerClass {
|
4085
|
-
border: 10px solid #cccccc; /* Light grey */
|
4086
|
-
border-top: 10px solid black; /* Blue */
|
4087
|
-
border-radius: 50%;
|
4088
|
-
position: fixed;
|
4089
|
-
margin: auto;
|
4090
|
-
top: 0;
|
4091
|
-
right: 0;
|
4092
|
-
bottom: 0;
|
4093
|
-
left: 0;
|
4094
|
-
width: 100px;
|
4095
|
-
height: 100px;
|
4096
|
-
animation: spin 2s linear infinite;
|
4097
|
-
}
|
4098
|
-
.spinner-background {
|
4099
|
-
/* background fixed across whole screen */
|
4100
|
-
position: fixed;
|
4101
|
-
top: 0;
|
4102
|
-
right: 0;
|
4103
|
-
bottom: 0;
|
4104
|
-
z-index: 1000;
|
4105
|
-
left: 0;
|
4106
|
-
opacity: 0.5;
|
4107
|
-
}
|
4108
|
-
@keyframes spin {
|
4109
|
-
0% { transform: rotate(0deg); }
|
4110
|
-
100% { transform: rotate(360deg); }
|
4111
|
-
}
|
4112
|
-
`]
|
4113
|
-
}]
|
4036
|
+
`, styles: [".mgSpinnerClass{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{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
4114
4037
|
}], function () {
|
4115
4038
|
return [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: i0.ChangeDetectorRef }, { type: i1$1.Title }, { type: OverlayWindowService }, { type: i1$2.HttpClient }, { type: CommandsCollectorMagicService }, { type: ExitMagicService, decorators: [{
|
4116
4039
|
type: Optional
|
@@ -4299,6 +4222,11 @@ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, sele
|
|
4299
4222
|
})();
|
4300
4223
|
|
4301
4224
|
class NonMagicControlDirective {
|
4225
|
+
set magic(val) {
|
4226
|
+
this.id = val;
|
4227
|
+
this.selector = 'NonMagicControl';
|
4228
|
+
}
|
4229
|
+
;
|
4302
4230
|
constructor(_task, element, renderer, vcRef) {
|
4303
4231
|
this._task = _task;
|
4304
4232
|
this.element = element;
|
@@ -4308,11 +4236,6 @@ class NonMagicControlDirective {
|
|
4308
4236
|
this.eventsOnlyVal = false;
|
4309
4237
|
this.htmlElement = this.element.nativeElement;
|
4310
4238
|
}
|
4311
|
-
set magic(val) {
|
4312
|
-
this.id = val;
|
4313
|
-
this.selector = 'NonMagicControl';
|
4314
|
-
}
|
4315
|
-
;
|
4316
4239
|
get task() {
|
4317
4240
|
return this._task;
|
4318
4241
|
}
|
@@ -4378,14 +4301,12 @@ class MagicModule {
|
|
4378
4301
|
}
|
4379
4302
|
MagicModule.ɵfac = function MagicModule_Factory(t) { return new (t || MagicModule)(); };
|
4380
4303
|
MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
|
4381
|
-
MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [
|
4382
|
-
|
4383
|
-
|
4384
|
-
|
4385
|
-
|
4386
|
-
|
4387
|
-
HttpClientModule
|
4388
|
-
]] });
|
4304
|
+
MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [CommonModule,
|
4305
|
+
FormsModule,
|
4306
|
+
ReactiveFormsModule,
|
4307
|
+
RouterModule,
|
4308
|
+
DynamicModule,
|
4309
|
+
HttpClientModule] });
|
4389
4310
|
(function () {
|
4390
4311
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicModule, [{
|
4391
4312
|
type: NgModule,
|
@@ -4478,11 +4399,13 @@ const MG_FORMATS = {
|
|
4478
4399
|
}
|
4479
4400
|
};
|
4480
4401
|
class MgDateAdapter extends NativeDateAdapter {
|
4481
|
-
constructor(platform, task) {
|
4482
|
-
super(
|
4402
|
+
constructor(platform, task, localeId) {
|
4403
|
+
super(localeId, platform);
|
4483
4404
|
this.platform = platform;
|
4484
4405
|
this.task = task;
|
4406
|
+
this.localeId = localeId;
|
4485
4407
|
this.mgdtfmt = null;
|
4408
|
+
this.setLocale(localeId);
|
4486
4409
|
}
|
4487
4410
|
parse(value) {
|
4488
4411
|
let valueStr = value;
|
@@ -4542,7 +4465,7 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4542
4465
|
}
|
4543
4466
|
if (month == 0 && year == 0 && date == 0)
|
4544
4467
|
return null;
|
4545
|
-
return new Date(
|
4468
|
+
return new Date(year, month, date);
|
4546
4469
|
}
|
4547
4470
|
}
|
4548
4471
|
format(date, displayFormat) {
|
@@ -4558,12 +4481,17 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4558
4481
|
}
|
4559
4482
|
}
|
4560
4483
|
}
|
4561
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
|
4484
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4562
4485
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4563
4486
|
(function () {
|
4564
4487
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4565
4488
|
type: Injectable
|
4566
|
-
}], function () {
|
4489
|
+
}], function () {
|
4490
|
+
return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4491
|
+
type: Inject,
|
4492
|
+
args: [MAT_DATE_LOCALE]
|
4493
|
+
}] }];
|
4494
|
+
}, null);
|
4567
4495
|
})();
|
4568
4496
|
|
4569
4497
|
const matDateProviders = [
|