@magic-xpa/angular 4.1000.0-dev4100.30 → 4.1000.0-dev4100.300
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 +25 -3
- package/esm2020/src/services/magic-color.service.mjs +4 -4
- package/esm2020/src/services/subform.magic.service.mjs +1 -1
- package/esm2020/src/services/task.magics.service.mjs +11 -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 +11 -11
- 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 +4 -4
- 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/esm2020/src/ui/task-base.magic.component.mjs +6 -1
- package/fesm2015/magic-xpa-angular.mjs +96 -188
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +96 -188
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +8 -8
- package/src/services/task.magics.service.d.ts +1 -0
- 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 +1 -1
- package/src/ui/directives/magicViewContainerRef.directive.d.ts +1 -1
- package/src/ui/directives/mgformat.magic.directive.d.ts +1 -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 +2 -1
- package/magic-xpa-angular.d.ts +0 -2
@@ -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,
|
@@ -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
|
|
@@ -1629,6 +1539,7 @@ class TaskMagicService {
|
|
1629
1539
|
this.OnSelectedRowChanged = new EventEmitter();
|
1630
1540
|
this.customPropertiesSubject = new Subject();
|
1631
1541
|
this.recordsCountChangeSubject = new Subject();
|
1542
|
+
this.mgLoadSubject = new Subject();
|
1632
1543
|
this.oldPageSize = 0;
|
1633
1544
|
this.Records.setGuiTopIndex(0);
|
1634
1545
|
this.mgInputDateFormat = null;
|
@@ -1963,6 +1874,9 @@ class TaskMagicService {
|
|
1963
1874
|
case CommandType.SET_FOCUS:
|
1964
1875
|
this.refreshDom.next(command);
|
1965
1876
|
break;
|
1877
|
+
case CommandType.SET_WC_IDLE:
|
1878
|
+
this.mgLoadSubject.next();
|
1879
|
+
break;
|
1966
1880
|
}
|
1967
1881
|
}
|
1968
1882
|
customValidator(rowid, id) {
|
@@ -2021,7 +1935,10 @@ class TaskMagicService {
|
|
2021
1935
|
return val;
|
2022
1936
|
}
|
2023
1937
|
case StorageAttribute.NUMERIC:
|
2024
|
-
|
1938
|
+
if (isUndefined(val))
|
1939
|
+
return val;
|
1940
|
+
else
|
1941
|
+
return (val != null) ? +val : null;
|
2025
1942
|
default:
|
2026
1943
|
return val;
|
2027
1944
|
}
|
@@ -2158,10 +2075,10 @@ class TaskMagicService {
|
|
2158
2075
|
mgOnRadioSelectionChanged(idx) {
|
2159
2076
|
let result = this.getFormControl('0', idx);
|
2160
2077
|
let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
|
2161
|
-
if (typeof result.value !== '
|
2078
|
+
if (typeof result.value !== 'number')
|
2162
2079
|
guiEvent.Value = result.value.index;
|
2163
2080
|
else
|
2164
|
-
guiEvent.Value = result.value;
|
2081
|
+
guiEvent.Value = result.value.toString();
|
2165
2082
|
this.insertEvent(guiEvent);
|
2166
2083
|
}
|
2167
2084
|
close() {
|
@@ -2310,6 +2227,9 @@ const SYSTEM_BG = 4;
|
|
2310
2227
|
const SYSTEM_FG_AND_SYSTEM_BG = 6;
|
2311
2228
|
const TRANSPERENT_BG = 1;
|
2312
2229
|
class MagicColorService {
|
2230
|
+
getColorFilePath() {
|
2231
|
+
return 'assets/' + this.colorFileName;
|
2232
|
+
}
|
2313
2233
|
constructor(http, colorFile1 = 'clr_rnt.eng') {
|
2314
2234
|
this.http = http;
|
2315
2235
|
this.colorFileName = 'clr_rnt.eng';
|
@@ -2319,9 +2239,6 @@ class MagicColorService {
|
|
2319
2239
|
else
|
2320
2240
|
this.colorFileName = 'clr_rnt.eng';
|
2321
2241
|
}
|
2322
|
-
getColorFilePath() {
|
2323
|
-
return 'assets/' + this.colorFileName;
|
2324
|
-
}
|
2325
2242
|
getColorData() {
|
2326
2243
|
if (!this.colorsData) {
|
2327
2244
|
this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
|
@@ -2638,8 +2555,30 @@ class AccessorMagicService {
|
|
2638
2555
|
let c = this.task.getFormControl(rowId, id);
|
2639
2556
|
if (c.hasError('required'))
|
2640
2557
|
return 'Control must be updated.';
|
2641
|
-
if (c.hasError('pattern'))
|
2642
|
-
|
2558
|
+
if (c.hasError('pattern')) {
|
2559
|
+
if (c.errors.pattern.actualValue < 0 && !c.errors.pattern.requiredPattern.includes('-'))
|
2560
|
+
return 'Value must be non-negative';
|
2561
|
+
if (c.errors.pattern.requiredPattern.includes('.')) {
|
2562
|
+
const numericFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[0];
|
2563
|
+
const decimalFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[1];
|
2564
|
+
const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\d+)/)[1];
|
2565
|
+
const actualDecimalLimit = c.errors.pattern.requiredPattern.match(/(?:[^,]+,){2}(\d+)/)[1];
|
2566
|
+
if (numericFormat.length > actualNumericLimit || decimalFormat.length > actualDecimalLimit) {
|
2567
|
+
return "Numeric format is limited to " + actualNumericLimit + "." + actualDecimalLimit + " digits";
|
2568
|
+
}
|
2569
|
+
}
|
2570
|
+
else if (!c.errors.pattern.requiredPattern.includes('.') && !Number.isInteger(c.errors.pattern.actualValue)) {
|
2571
|
+
const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\d+)/)[1];
|
2572
|
+
return "Numeric format is limited to " + actualNumericLimit + "." + 0 + " digits";
|
2573
|
+
}
|
2574
|
+
else {
|
2575
|
+
const numericFormat = Math.abs(c.errors.pattern.actualValue).toString();
|
2576
|
+
const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\d+)/)[1];
|
2577
|
+
if (numericFormat.length > actualNumericLimit) {
|
2578
|
+
return "Numeric format is limited to " + actualNumericLimit + "." + 0 + " digits";
|
2579
|
+
}
|
2580
|
+
}
|
2581
|
+
}
|
2643
2582
|
if (c.hasError('rangevalidator'))
|
2644
2583
|
return c.errors.rangevalidator.errorMsg;
|
2645
2584
|
if (c.hasError('maxlength'))
|
@@ -2779,6 +2718,9 @@ class TaskBaseMagicComponent {
|
|
2779
2718
|
this.task.recordsCountChangeSubject.pipe().subscribe(value => {
|
2780
2719
|
this.RecordsCountChanged(value);
|
2781
2720
|
});
|
2721
|
+
this.task.mgLoadSubject.pipe().subscribe(value => {
|
2722
|
+
this.mgOnLoad();
|
2723
|
+
});
|
2782
2724
|
}
|
2783
2725
|
createFormControlsAccessor(formGroup) { }
|
2784
2726
|
setInputDateFormat() { }
|
@@ -2786,6 +2728,8 @@ class TaskBaseMagicComponent {
|
|
2786
2728
|
}
|
2787
2729
|
RecordsCountChanged(recordsCount) {
|
2788
2730
|
}
|
2731
|
+
mgOnLoad() {
|
2732
|
+
}
|
2789
2733
|
ngAfterViewInit() {
|
2790
2734
|
this.mgSub.init();
|
2791
2735
|
}
|
@@ -2872,6 +2816,16 @@ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, sele
|
|
2872
2816
|
})();
|
2873
2817
|
|
2874
2818
|
class MagicDirective {
|
2819
|
+
set magic(val) {
|
2820
|
+
this.id = val;
|
2821
|
+
this.selector = "magic";
|
2822
|
+
}
|
2823
|
+
;
|
2824
|
+
set eventsOnly(val) {
|
2825
|
+
console.log("eventsOnly");
|
2826
|
+
this.eventsOnlyVal = true;
|
2827
|
+
}
|
2828
|
+
;
|
2875
2829
|
constructor(_task, element, renderer, vcRef, magicRow) {
|
2876
2830
|
this._task = _task;
|
2877
2831
|
this.element = element;
|
@@ -2884,16 +2838,6 @@ class MagicDirective {
|
|
2884
2838
|
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2885
2839
|
this.rowId = magicRow.rowId;
|
2886
2840
|
}
|
2887
|
-
set magic(val) {
|
2888
|
-
this.id = val;
|
2889
|
-
this.selector = "magic";
|
2890
|
-
}
|
2891
|
-
;
|
2892
|
-
set eventsOnly(val) {
|
2893
|
-
console.log("eventsOnly");
|
2894
|
-
this.eventsOnlyVal = true;
|
2895
|
-
}
|
2896
|
-
;
|
2897
2841
|
get task() {
|
2898
2842
|
return this._task;
|
2899
2843
|
}
|
@@ -3073,11 +3017,11 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3073
3017
|
})();
|
3074
3018
|
|
3075
3019
|
class NoControlMagicDirective extends MagicDirective {
|
3020
|
+
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
3021
|
+
;
|
3076
3022
|
constructor(_task, element, renderer, vcRef, magicRow) {
|
3077
3023
|
super(_task, element, renderer, vcRef, magicRow);
|
3078
3024
|
}
|
3079
|
-
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
3080
|
-
;
|
3081
3025
|
regEvents() {
|
3082
3026
|
super.regEvents();
|
3083
3027
|
if (this.htmlElement instanceof HTMLSelectElement) {
|
@@ -3703,14 +3647,14 @@ function SubformMagicComponent_ndc_dynamic_0_Template(rf, ctx) {
|
|
3703
3647
|
}
|
3704
3648
|
}
|
3705
3649
|
class SubformMagicComponent {
|
3650
|
+
set magic(val) { this.id = val; }
|
3651
|
+
;
|
3706
3652
|
constructor(vcRef, mgSub) {
|
3707
3653
|
this.vcRef = vcRef;
|
3708
3654
|
this.mgSub = mgSub;
|
3709
3655
|
this.component = null;
|
3710
3656
|
this.component = (this.vcRef._hostLView).find(v => !isNullOrUndefined(v));
|
3711
3657
|
}
|
3712
|
-
set magic(val) { this.id = val; }
|
3713
|
-
;
|
3714
3658
|
get Component() {
|
3715
3659
|
return this.mgSub.mgGetComp(this.id);
|
3716
3660
|
}
|
@@ -3726,7 +3670,7 @@ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicCompone
|
|
3726
3670
|
if (rf & 2) {
|
3727
3671
|
i0.ɵɵproperty("ngIf", ctx.Component);
|
3728
3672
|
}
|
3729
|
-
},
|
3673
|
+
}, dependencies: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
|
3730
3674
|
(function () {
|
3731
3675
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
|
3732
3676
|
type: Component,
|
@@ -3775,13 +3719,6 @@ function ErrorMagicComponent_div_0_Template(rf, ctx) {
|
|
3775
3719
|
}
|
3776
3720
|
const _c1 = ["*"];
|
3777
3721
|
class ErrorMagicComponent {
|
3778
|
-
constructor(_task, mgService, changeDetectorRef) {
|
3779
|
-
this._task = _task;
|
3780
|
-
this.mgService = mgService;
|
3781
|
-
this.changeDetectorRef = changeDetectorRef;
|
3782
|
-
this.defaultDisplay = true;
|
3783
|
-
this.rowId = "0";
|
3784
|
-
}
|
3785
3722
|
set magic(val) {
|
3786
3723
|
this.id = val;
|
3787
3724
|
}
|
@@ -3795,6 +3732,13 @@ class ErrorMagicComponent {
|
|
3795
3732
|
this.changeDetectorRef.detectChanges();
|
3796
3733
|
}
|
3797
3734
|
;
|
3735
|
+
constructor(_task, mgService, changeDetectorRef) {
|
3736
|
+
this._task = _task;
|
3737
|
+
this.mgService = mgService;
|
3738
|
+
this.changeDetectorRef = changeDetectorRef;
|
3739
|
+
this.defaultDisplay = true;
|
3740
|
+
this.rowId = "0";
|
3741
|
+
}
|
3798
3742
|
isEmpty(element) {
|
3799
3743
|
const nodes = element.childNodes;
|
3800
3744
|
for (let i = 0; i < nodes.length; i++) {
|
@@ -3843,7 +3787,7 @@ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent,
|
|
3843
3787
|
if (rf & 2) {
|
3844
3788
|
i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
|
3845
3789
|
}
|
3846
|
-
},
|
3790
|
+
}, dependencies: [i1.NgIf], encapsulation: 2 });
|
3847
3791
|
(function () {
|
3848
3792
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMagicComponent, [{
|
3849
3793
|
type: Component,
|
@@ -4097,14 +4041,11 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
4097
4041
|
i0.ɵɵadvance(3);
|
4098
4042
|
i0.ɵɵproperty("ngIf", ctx.showSpinner);
|
4099
4043
|
}
|
4100
|
-
},
|
4044
|
+
}, 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)}}"] });
|
4101
4045
|
(function () {
|
4102
4046
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
4103
4047
|
type: Component,
|
4104
|
-
args: [{
|
4105
|
-
selector: 'magic-root',
|
4106
|
-
providers: [],
|
4107
|
-
template: `
|
4048
|
+
args: [{ selector: 'magic-root', providers: [], template: `
|
4108
4049
|
<div #magicRoot>
|
4109
4050
|
<ndc-dynamic
|
4110
4051
|
*ngIf = "RootComponent !== null"
|
@@ -4123,38 +4064,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
4123
4064
|
<ng-template #defaultSpinner>
|
4124
4065
|
<div class="mgSpinnerClass"></div>
|
4125
4066
|
</ng-template>
|
4126
|
-
`,
|
4127
|
-
styles: [`
|
4128
|
-
.mgSpinnerClass {
|
4129
|
-
border: 10px solid #cccccc; /* Light grey */
|
4130
|
-
border-top: 10px solid black; /* Blue */
|
4131
|
-
border-radius: 50%;
|
4132
|
-
position: fixed;
|
4133
|
-
margin: auto;
|
4134
|
-
top: 0;
|
4135
|
-
right: 0;
|
4136
|
-
bottom: 0;
|
4137
|
-
left: 0;
|
4138
|
-
width: 100px;
|
4139
|
-
height: 100px;
|
4140
|
-
animation: spin 2s linear infinite;
|
4141
|
-
}
|
4142
|
-
.spinner-background {
|
4143
|
-
/* background fixed across whole screen */
|
4144
|
-
position: fixed;
|
4145
|
-
top: 0;
|
4146
|
-
right: 0;
|
4147
|
-
bottom: 0;
|
4148
|
-
z-index: 1000;
|
4149
|
-
left: 0;
|
4150
|
-
opacity: 0.5;
|
4151
|
-
}
|
4152
|
-
@keyframes spin {
|
4153
|
-
0% { transform: rotate(0deg); }
|
4154
|
-
100% { transform: rotate(360deg); }
|
4155
|
-
}
|
4156
|
-
`]
|
4157
|
-
}]
|
4067
|
+
`, 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"] }]
|
4158
4068
|
}], function () {
|
4159
4069
|
return [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: i0.ChangeDetectorRef }, { type: i1$1.Title }, { type: OverlayWindowService }, { type: i1$2.HttpClient }, { type: CommandsCollectorMagicService }, { type: ExitMagicService, decorators: [{
|
4160
4070
|
type: Optional
|
@@ -4343,6 +4253,11 @@ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, sele
|
|
4343
4253
|
})();
|
4344
4254
|
|
4345
4255
|
class NonMagicControlDirective {
|
4256
|
+
set magic(val) {
|
4257
|
+
this.id = val;
|
4258
|
+
this.selector = 'NonMagicControl';
|
4259
|
+
}
|
4260
|
+
;
|
4346
4261
|
constructor(_task, element, renderer, vcRef) {
|
4347
4262
|
this._task = _task;
|
4348
4263
|
this.element = element;
|
@@ -4352,11 +4267,6 @@ class NonMagicControlDirective {
|
|
4352
4267
|
this.eventsOnlyVal = false;
|
4353
4268
|
this.htmlElement = this.element.nativeElement;
|
4354
4269
|
}
|
4355
|
-
set magic(val) {
|
4356
|
-
this.id = val;
|
4357
|
-
this.selector = 'NonMagicControl';
|
4358
|
-
}
|
4359
|
-
;
|
4360
4270
|
get task() {
|
4361
4271
|
return this._task;
|
4362
4272
|
}
|
@@ -4422,14 +4332,12 @@ class MagicModule {
|
|
4422
4332
|
}
|
4423
4333
|
MagicModule.ɵfac = function MagicModule_Factory(t) { return new (t || MagicModule)(); };
|
4424
4334
|
MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
|
4425
|
-
MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [
|
4426
|
-
|
4427
|
-
|
4428
|
-
|
4429
|
-
|
4430
|
-
|
4431
|
-
HttpClientModule
|
4432
|
-
]] });
|
4335
|
+
MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [CommonModule,
|
4336
|
+
FormsModule,
|
4337
|
+
ReactiveFormsModule,
|
4338
|
+
RouterModule,
|
4339
|
+
DynamicModule,
|
4340
|
+
HttpClientModule] });
|
4433
4341
|
(function () {
|
4434
4342
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicModule, [{
|
4435
4343
|
type: NgModule,
|