@magic-xpa/angular 4.1000.0-dev4100.30 → 4.1000.0-dev4100.302
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
@@ -596,6 +596,9 @@ SubformMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: SubformMagicServic
|
|
596
596
|
}], function () { return [{ type: TaskMagicService }, { type: i2.ActivatedRoute }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: i2.Router }, { type: RouterCommandsMagicService }, { type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.Compiler }]; }, null); })();
|
597
597
|
|
598
598
|
class RouterContainerMagicComponent {
|
599
|
+
static get LastRoute() {
|
600
|
+
return RouterContainerMagicComponent.lastRoute;
|
601
|
+
}
|
599
602
|
constructor(activatedRoute, router, magic, containerTaskService, componentFactoryResolver, viewContainerRef, componentList, pendingCommandsCollector, routerCommandsMagicService) {
|
600
603
|
this.activatedRoute = activatedRoute;
|
601
604
|
this.router = router;
|
@@ -609,9 +612,6 @@ class RouterContainerMagicComponent {
|
|
609
612
|
this.componentRef = null;
|
610
613
|
this.parentMgSubformService = null;
|
611
614
|
}
|
612
|
-
static get LastRoute() {
|
613
|
-
return RouterContainerMagicComponent.lastRoute;
|
614
|
-
}
|
615
615
|
ngOnInit() {
|
616
616
|
let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
|
617
617
|
let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
|
@@ -820,7 +820,7 @@ const _c1$1 = ["modalForeground"];
|
|
820
820
|
function MagicOverlayContainer_button_2_Template(rf, ctx) { if (rf & 1) {
|
821
821
|
const _r5 = i0.ɵɵgetCurrentView();
|
822
822
|
i0.ɵɵelementStart(0, "button", 8);
|
823
|
-
i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.OnClose(); });
|
823
|
+
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()); });
|
824
824
|
i0.ɵɵtext(1, "X");
|
825
825
|
i0.ɵɵelementEnd();
|
826
826
|
} }
|
@@ -829,7 +829,7 @@ function MagicOverlayContainer_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
829
829
|
i0.ɵɵelementStart(0, "div", 9, 10);
|
830
830
|
i0.ɵɵtext(2);
|
831
831
|
i0.ɵɵelementStart(3, "button", 11);
|
832
|
-
i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.OnClose(); });
|
832
|
+
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()); });
|
833
833
|
i0.ɵɵtext(4, "X");
|
834
834
|
i0.ɵɵelementEnd()();
|
835
835
|
} if (rf & 2) {
|
@@ -934,7 +934,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
934
934
|
i0.ɵɵproperty("ngIf", ctx.getShowTitleBar());
|
935
935
|
i0.ɵɵadvance(1);
|
936
936
|
i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
|
937
|
-
} },
|
937
|
+
} }, 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}"] });
|
938
938
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
|
939
939
|
type: Component,
|
940
940
|
args: [{ selector: 'app-magic-overlay-container', template: `
|
@@ -988,14 +988,10 @@ class BaseMagicConfirmComponent {
|
|
988
988
|
}
|
989
989
|
}
|
990
990
|
BaseMagicConfirmComponent.ɵfac = function BaseMagicConfirmComponent_Factory(t) { return new (t || BaseMagicConfirmComponent)(); };
|
991
|
-
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) { }
|
991
|
+
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) { } });
|
992
992
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicConfirmComponent, [{
|
993
993
|
type: Component,
|
994
|
-
args: [{
|
995
|
-
selector: 'mg-base-alert',
|
996
|
-
template: '',
|
997
|
-
styles: ['']
|
998
|
-
}]
|
994
|
+
args: [{ selector: 'mg-base-alert', template: '' }]
|
999
995
|
}], null, { title: [{
|
1000
996
|
type: Input
|
1001
997
|
}], message: [{
|
@@ -1013,14 +1009,10 @@ class BaseMagicAlertComponent {
|
|
1013
1009
|
}
|
1014
1010
|
}
|
1015
1011
|
BaseMagicAlertComponent.ɵfac = function BaseMagicAlertComponent_Factory(t) { return new (t || BaseMagicAlertComponent)(); };
|
1016
|
-
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) { }
|
1012
|
+
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) { } });
|
1017
1013
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicAlertComponent, [{
|
1018
1014
|
type: Component,
|
1019
|
-
args: [{
|
1020
|
-
selector: 'mg-base-alert',
|
1021
|
-
template: '',
|
1022
|
-
styles: ['']
|
1023
|
-
}]
|
1015
|
+
args: [{ selector: 'mg-base-alert', template: '' }]
|
1024
1016
|
}], null, { title: [{
|
1025
1017
|
type: Input
|
1026
1018
|
}], message: [{
|
@@ -1128,12 +1120,10 @@ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlay
|
|
1128
1120
|
i0.ɵɵelementEnd();
|
1129
1121
|
i0.ɵɵelement(6, "div", 5);
|
1130
1122
|
i0.ɵɵelementEnd();
|
1131
|
-
} },
|
1123
|
+
} }, dependencies: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;z-index:999;inset:0}"] });
|
1132
1124
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
|
1133
1125
|
type: Component,
|
1134
|
-
args: [{
|
1135
|
-
selector: 'app-magic-overlay-container-wrapper',
|
1136
|
-
template: `
|
1126
|
+
args: [{ selector: 'app-magic-overlay-container-wrapper', template: `
|
1137
1127
|
<div>
|
1138
1128
|
<div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" magicFocus></div>
|
1139
1129
|
<div class="overlay-container-wrapper-background" #overlayContainerWrapper>
|
@@ -1142,19 +1132,7 @@ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlay
|
|
1142
1132
|
</div>
|
1143
1133
|
<div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" ></div>
|
1144
1134
|
</div>
|
1145
|
-
`,
|
1146
|
-
styles: [`
|
1147
|
-
.overlay-container-wrapper-background {
|
1148
|
-
/* modal background fixed across whole screen */
|
1149
|
-
position: fixed;
|
1150
|
-
top: 0;
|
1151
|
-
z-index: 999;
|
1152
|
-
right: 0;
|
1153
|
-
bottom: 0;
|
1154
|
-
left: 0;
|
1155
|
-
}
|
1156
|
-
`]
|
1157
|
-
}]
|
1135
|
+
`, styles: [".overlay-container-wrapper-background{position:fixed;z-index:999;inset:0}\n"] }]
|
1158
1136
|
}], function () { return [{ type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.Compiler }]; }, { Component: [{
|
1159
1137
|
type: Input
|
1160
1138
|
}], Parameters: [{
|
@@ -1190,46 +1168,14 @@ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent,
|
|
1190
1168
|
} }, styles: [".mg-message-background[_ngcontent-%COMP%]{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[_ngcontent-%COMP%]{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}"] });
|
1191
1169
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAlertComponent, [{
|
1192
1170
|
type: Component,
|
1193
|
-
args: [{
|
1194
|
-
selector: 'sample-magic-alert-component',
|
1195
|
-
template: `<div>
|
1171
|
+
args: [{ selector: 'sample-magic-alert-component', template: `<div>
|
1196
1172
|
<div class="mg-message-background">
|
1197
1173
|
<h2> {{title}}</h2>
|
1198
1174
|
<p>{{message}} </p>
|
1199
1175
|
|
1200
1176
|
<button (click)="OnClose()">OK</button>
|
1201
1177
|
</div>
|
1202
|
-
</div>`,
|
1203
|
-
styles: [`
|
1204
|
-
.mg-message-background {
|
1205
|
-
background-color: #F5F5F5;
|
1206
|
-
text-align: center;
|
1207
|
-
width: 40%;
|
1208
|
-
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
1209
|
-
padding: 17px;
|
1210
|
-
border-radius: 5px;
|
1211
|
-
text-align: center;
|
1212
|
-
margin-top: 10% ;
|
1213
|
-
margin-left: auto;
|
1214
|
-
margin-right: auto;
|
1215
|
-
border: 1px solid gray;
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
button {
|
1219
|
-
background-color: #8CD4F5;
|
1220
|
-
color: white;
|
1221
|
-
border: none;
|
1222
|
-
box-shadow: none;
|
1223
|
-
font-size: 17px;
|
1224
|
-
font-weight: 500;
|
1225
|
-
-webkit-border-radius: 4px;
|
1226
|
-
border-radius: 5px;
|
1227
|
-
padding: 10px 32px;
|
1228
|
-
margin: 26px 5px 0 5px;
|
1229
|
-
cursor: pointer;
|
1230
|
-
}
|
1231
|
-
`]
|
1232
|
-
}]
|
1178
|
+
</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"] }]
|
1233
1179
|
}], null, null); })();
|
1234
1180
|
|
1235
1181
|
class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
|
@@ -1257,9 +1203,7 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
|
|
1257
1203
|
} }, styles: [".mg-message-background[_ngcontent-%COMP%]{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[_ngcontent-%COMP%]{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[_ngcontent-%COMP%]{background-color:#c1c1c1}"] });
|
1258
1204
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
|
1259
1205
|
type: Component,
|
1260
|
-
args: [{
|
1261
|
-
selector: 'sample-magic-confirmation-box',
|
1262
|
-
template: `<div>
|
1206
|
+
args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
|
1263
1207
|
<div class="mg-message-background">
|
1264
1208
|
<h2> {{title}}</h2>
|
1265
1209
|
{{message}}
|
@@ -1269,41 +1213,7 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
|
|
1269
1213
|
<button (click)="OnClose(true)">OK</button>
|
1270
1214
|
<button class="cancel" (click)="OnClose(false)">Cancel</button>
|
1271
1215
|
</div>
|
1272
|
-
</div>`,
|
1273
|
-
styles: [`
|
1274
|
-
.mg-message-background {
|
1275
|
-
background-color: #F5F5F5;
|
1276
|
-
text-align: center;
|
1277
|
-
width: 40%;
|
1278
|
-
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
1279
|
-
padding: 17px;
|
1280
|
-
border-radius: 5px;
|
1281
|
-
text-align: center;
|
1282
|
-
margin-top: 10% ;
|
1283
|
-
margin-left: auto;
|
1284
|
-
margin-right: auto;
|
1285
|
-
border: 1px solid gray;
|
1286
|
-
}
|
1287
|
-
|
1288
|
-
button {
|
1289
|
-
background-color: #8CD4F5;
|
1290
|
-
color: white;
|
1291
|
-
border: none;
|
1292
|
-
box-shadow: none;
|
1293
|
-
font-size: 17px;
|
1294
|
-
font-weight: 500;
|
1295
|
-
-webkit-border-radius: 4px;
|
1296
|
-
border-radius: 5px;
|
1297
|
-
padding: 10px 32px;
|
1298
|
-
margin: 26px 5px 0 5px;
|
1299
|
-
cursor: pointer;
|
1300
|
-
}
|
1301
|
-
|
1302
|
-
button.cancel {
|
1303
|
-
background-color: #C1C1C1;
|
1304
|
-
}
|
1305
|
-
`]
|
1306
|
-
}]
|
1216
|
+
</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"] }]
|
1307
1217
|
}], null, null); })();
|
1308
1218
|
|
1309
1219
|
class ConfirmationComponentsMagicProvider {
|
@@ -1569,6 +1479,7 @@ class TaskMagicService {
|
|
1569
1479
|
this.OnSelectedRowChanged = new EventEmitter();
|
1570
1480
|
this.customPropertiesSubject = new Subject();
|
1571
1481
|
this.recordsCountChangeSubject = new Subject();
|
1482
|
+
this.mgLoadSubject = new Subject();
|
1572
1483
|
this.oldPageSize = 0;
|
1573
1484
|
this.Records.setGuiTopIndex(0);
|
1574
1485
|
this.mgInputDateFormat = null;
|
@@ -1903,6 +1814,9 @@ class TaskMagicService {
|
|
1903
1814
|
case CommandType.SET_FOCUS:
|
1904
1815
|
this.refreshDom.next(command);
|
1905
1816
|
break;
|
1817
|
+
case CommandType.SET_WC_IDLE:
|
1818
|
+
this.mgLoadSubject.next();
|
1819
|
+
break;
|
1906
1820
|
}
|
1907
1821
|
}
|
1908
1822
|
customValidator(rowid, id) {
|
@@ -1961,7 +1875,10 @@ class TaskMagicService {
|
|
1961
1875
|
return val;
|
1962
1876
|
}
|
1963
1877
|
case StorageAttribute.NUMERIC:
|
1964
|
-
|
1878
|
+
if (isUndefined(val))
|
1879
|
+
return val;
|
1880
|
+
else
|
1881
|
+
return (val != null) ? +val : null;
|
1965
1882
|
default:
|
1966
1883
|
return val;
|
1967
1884
|
}
|
@@ -2098,10 +2015,10 @@ class TaskMagicService {
|
|
2098
2015
|
mgOnRadioSelectionChanged(idx) {
|
2099
2016
|
let result = this.getFormControl('0', idx);
|
2100
2017
|
let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
|
2101
|
-
if (typeof result.value !== '
|
2018
|
+
if (typeof result.value !== 'number')
|
2102
2019
|
guiEvent.Value = result.value.index;
|
2103
2020
|
else
|
2104
|
-
guiEvent.Value = result.value;
|
2021
|
+
guiEvent.Value = result.value.toString();
|
2105
2022
|
this.insertEvent(guiEvent);
|
2106
2023
|
}
|
2107
2024
|
close() {
|
@@ -2244,6 +2161,9 @@ const SYSTEM_BG = 4;
|
|
2244
2161
|
const SYSTEM_FG_AND_SYSTEM_BG = 6;
|
2245
2162
|
const TRANSPERENT_BG = 1;
|
2246
2163
|
class MagicColorService {
|
2164
|
+
getColorFilePath() {
|
2165
|
+
return 'assets/' + this.colorFileName;
|
2166
|
+
}
|
2247
2167
|
constructor(http, colorFile1 = 'clr_rnt.eng') {
|
2248
2168
|
this.http = http;
|
2249
2169
|
this.colorFileName = 'clr_rnt.eng';
|
@@ -2253,9 +2173,6 @@ class MagicColorService {
|
|
2253
2173
|
else
|
2254
2174
|
this.colorFileName = 'clr_rnt.eng';
|
2255
2175
|
}
|
2256
|
-
getColorFilePath() {
|
2257
|
-
return 'assets/' + this.colorFileName;
|
2258
|
-
}
|
2259
2176
|
getColorData() {
|
2260
2177
|
if (!this.colorsData) {
|
2261
2178
|
this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
|
@@ -2568,8 +2485,30 @@ class AccessorMagicService {
|
|
2568
2485
|
let c = this.task.getFormControl(rowId, id);
|
2569
2486
|
if (c.hasError('required'))
|
2570
2487
|
return 'Control must be updated.';
|
2571
|
-
if (c.hasError('pattern'))
|
2572
|
-
|
2488
|
+
if (c.hasError('pattern')) {
|
2489
|
+
if (c.errors.pattern.actualValue < 0 && !c.errors.pattern.requiredPattern.includes('-'))
|
2490
|
+
return 'Value must be non-negative';
|
2491
|
+
if (c.errors.pattern.requiredPattern.includes('.')) {
|
2492
|
+
const numericFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[0];
|
2493
|
+
const decimalFormat = Math.abs(c.errors.pattern.actualValue).toString().split('.')[1];
|
2494
|
+
const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\d+)/)[1];
|
2495
|
+
const actualDecimalLimit = c.errors.pattern.requiredPattern.match(/(?:[^,]+,){2}(\d+)/)[1];
|
2496
|
+
if (numericFormat.length > actualNumericLimit || decimalFormat.length > actualDecimalLimit) {
|
2497
|
+
return "Numeric format is limited to " + actualNumericLimit + "." + actualDecimalLimit + " digits";
|
2498
|
+
}
|
2499
|
+
}
|
2500
|
+
else if (!c.errors.pattern.requiredPattern.includes('.') && !Number.isInteger(c.errors.pattern.actualValue)) {
|
2501
|
+
const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\d+)/)[1];
|
2502
|
+
return "Numeric format is limited to " + actualNumericLimit + "." + 0 + " digits";
|
2503
|
+
}
|
2504
|
+
else {
|
2505
|
+
const numericFormat = Math.abs(c.errors.pattern.actualValue).toString();
|
2506
|
+
const actualNumericLimit = c.errors.pattern.requiredPattern.match(/,(\d+)/)[1];
|
2507
|
+
if (numericFormat.length > actualNumericLimit) {
|
2508
|
+
return "Numeric format is limited to " + actualNumericLimit + "." + 0 + " digits";
|
2509
|
+
}
|
2510
|
+
}
|
2511
|
+
}
|
2573
2512
|
if (c.hasError('rangevalidator'))
|
2574
2513
|
return c.errors.rangevalidator.errorMsg;
|
2575
2514
|
if (c.hasError('maxlength'))
|
@@ -2705,6 +2644,9 @@ class TaskBaseMagicComponent {
|
|
2705
2644
|
this.task.recordsCountChangeSubject.pipe().subscribe(value => {
|
2706
2645
|
this.RecordsCountChanged(value);
|
2707
2646
|
});
|
2647
|
+
this.task.mgLoadSubject.pipe().subscribe(value => {
|
2648
|
+
this.mgOnLoad();
|
2649
|
+
});
|
2708
2650
|
}
|
2709
2651
|
createFormControlsAccessor(formGroup) { }
|
2710
2652
|
setInputDateFormat() { }
|
@@ -2712,6 +2654,8 @@ class TaskBaseMagicComponent {
|
|
2712
2654
|
}
|
2713
2655
|
RecordsCountChanged(recordsCount) {
|
2714
2656
|
}
|
2657
|
+
mgOnLoad() {
|
2658
|
+
}
|
2715
2659
|
ngAfterViewInit() {
|
2716
2660
|
this.mgSub.init();
|
2717
2661
|
}
|
@@ -2792,6 +2736,16 @@ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, sele
|
|
2792
2736
|
}] }); })();
|
2793
2737
|
|
2794
2738
|
class MagicDirective {
|
2739
|
+
set magic(val) {
|
2740
|
+
this.id = val;
|
2741
|
+
this.selector = "magic";
|
2742
|
+
}
|
2743
|
+
;
|
2744
|
+
set eventsOnly(val) {
|
2745
|
+
console.log("eventsOnly");
|
2746
|
+
this.eventsOnlyVal = true;
|
2747
|
+
}
|
2748
|
+
;
|
2795
2749
|
constructor(_task, element, renderer, vcRef, magicRow) {
|
2796
2750
|
this._task = _task;
|
2797
2751
|
this.element = element;
|
@@ -2804,16 +2758,6 @@ class MagicDirective {
|
|
2804
2758
|
if (!(typeof magicRow === "undefined" || magicRow === null))
|
2805
2759
|
this.rowId = magicRow.rowId;
|
2806
2760
|
}
|
2807
|
-
set magic(val) {
|
2808
|
-
this.id = val;
|
2809
|
-
this.selector = "magic";
|
2810
|
-
}
|
2811
|
-
;
|
2812
|
-
set eventsOnly(val) {
|
2813
|
-
console.log("eventsOnly");
|
2814
|
-
this.eventsOnlyVal = true;
|
2815
|
-
}
|
2816
|
-
;
|
2817
2761
|
get task() {
|
2818
2762
|
return this._task;
|
2819
2763
|
}
|
@@ -2989,11 +2933,11 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
2989
2933
|
}] }); })();
|
2990
2934
|
|
2991
2935
|
class NoControlMagicDirective extends MagicDirective {
|
2936
|
+
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
2937
|
+
;
|
2992
2938
|
constructor(_task, element, renderer, vcRef, magicRow) {
|
2993
2939
|
super(_task, element, renderer, vcRef, magicRow);
|
2994
2940
|
}
|
2995
|
-
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
2996
|
-
;
|
2997
2941
|
regEvents() {
|
2998
2942
|
super.regEvents();
|
2999
2943
|
if (this.htmlElement instanceof HTMLSelectElement) {
|
@@ -3602,14 +3546,14 @@ function SubformMagicComponent_ndc_dynamic_0_Template(rf, ctx) { if (rf & 1) {
|
|
3602
3546
|
i0.ɵɵproperty("ndcDynamicComponent", ctx_r0.Component)("ndcDynamicInputs", ctx_r0.Parameters);
|
3603
3547
|
} }
|
3604
3548
|
class SubformMagicComponent {
|
3549
|
+
set magic(val) { this.id = val; }
|
3550
|
+
;
|
3605
3551
|
constructor(vcRef, mgSub) {
|
3606
3552
|
this.vcRef = vcRef;
|
3607
3553
|
this.mgSub = mgSub;
|
3608
3554
|
this.component = null;
|
3609
3555
|
this.component = (this.vcRef._hostLView).find(v => !isNullOrUndefined(v));
|
3610
3556
|
}
|
3611
|
-
set magic(val) { this.id = val; }
|
3612
|
-
;
|
3613
3557
|
get Component() {
|
3614
3558
|
return this.mgSub.mgGetComp(this.id);
|
3615
3559
|
}
|
@@ -3622,7 +3566,7 @@ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicCompone
|
|
3622
3566
|
i0.ɵɵtemplate(0, SubformMagicComponent_ndc_dynamic_0_Template, 1, 2, "ndc-dynamic", 0);
|
3623
3567
|
} if (rf & 2) {
|
3624
3568
|
i0.ɵɵproperty("ngIf", ctx.Component);
|
3625
|
-
} },
|
3569
|
+
} }, dependencies: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
|
3626
3570
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
|
3627
3571
|
type: Component,
|
3628
3572
|
args: [{
|
@@ -3663,13 +3607,6 @@ function ErrorMagicComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
3663
3607
|
} }
|
3664
3608
|
const _c1 = ["*"];
|
3665
3609
|
class ErrorMagicComponent {
|
3666
|
-
constructor(_task, mgService, changeDetectorRef) {
|
3667
|
-
this._task = _task;
|
3668
|
-
this.mgService = mgService;
|
3669
|
-
this.changeDetectorRef = changeDetectorRef;
|
3670
|
-
this.defaultDisplay = true;
|
3671
|
-
this.rowId = "0";
|
3672
|
-
}
|
3673
3610
|
set magic(val) {
|
3674
3611
|
this.id = val;
|
3675
3612
|
}
|
@@ -3683,6 +3620,13 @@ class ErrorMagicComponent {
|
|
3683
3620
|
this.changeDetectorRef.detectChanges();
|
3684
3621
|
}
|
3685
3622
|
;
|
3623
|
+
constructor(_task, mgService, changeDetectorRef) {
|
3624
|
+
this._task = _task;
|
3625
|
+
this.mgService = mgService;
|
3626
|
+
this.changeDetectorRef = changeDetectorRef;
|
3627
|
+
this.defaultDisplay = true;
|
3628
|
+
this.rowId = "0";
|
3629
|
+
}
|
3686
3630
|
isEmpty(element) {
|
3687
3631
|
const nodes = element.childNodes;
|
3688
3632
|
for (let i = 0; i < nodes.length; i++) {
|
@@ -3725,7 +3669,7 @@ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent,
|
|
3725
3669
|
i0.ɵɵtemplate(0, ErrorMagicComponent_div_0_Template, 5, 1, "div", 0);
|
3726
3670
|
} if (rf & 2) {
|
3727
3671
|
i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
|
3728
|
-
} },
|
3672
|
+
} }, dependencies: [i1.NgIf], encapsulation: 2 });
|
3729
3673
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMagicComponent, [{
|
3730
3674
|
type: Component,
|
3731
3675
|
args: [{
|
@@ -3951,13 +3895,10 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
3951
3895
|
i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
|
3952
3896
|
i0.ɵɵadvance(3);
|
3953
3897
|
i0.ɵɵproperty("ngIf", ctx.showSpinner);
|
3954
|
-
} },
|
3898
|
+
} }, 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)}}"] });
|
3955
3899
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
|
3956
3900
|
type: Component,
|
3957
|
-
args: [{
|
3958
|
-
selector: 'magic-root',
|
3959
|
-
providers: [],
|
3960
|
-
template: `
|
3901
|
+
args: [{ selector: 'magic-root', providers: [], template: `
|
3961
3902
|
<div #magicRoot>
|
3962
3903
|
<ndc-dynamic
|
3963
3904
|
*ngIf = "RootComponent !== null"
|
@@ -3976,38 +3917,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
|
|
3976
3917
|
<ng-template #defaultSpinner>
|
3977
3918
|
<div class="mgSpinnerClass"></div>
|
3978
3919
|
</ng-template>
|
3979
|
-
`,
|
3980
|
-
styles: [`
|
3981
|
-
.mgSpinnerClass {
|
3982
|
-
border: 10px solid #cccccc; /* Light grey */
|
3983
|
-
border-top: 10px solid black; /* Blue */
|
3984
|
-
border-radius: 50%;
|
3985
|
-
position: fixed;
|
3986
|
-
margin: auto;
|
3987
|
-
top: 0;
|
3988
|
-
right: 0;
|
3989
|
-
bottom: 0;
|
3990
|
-
left: 0;
|
3991
|
-
width: 100px;
|
3992
|
-
height: 100px;
|
3993
|
-
animation: spin 2s linear infinite;
|
3994
|
-
}
|
3995
|
-
.spinner-background {
|
3996
|
-
/* background fixed across whole screen */
|
3997
|
-
position: fixed;
|
3998
|
-
top: 0;
|
3999
|
-
right: 0;
|
4000
|
-
bottom: 0;
|
4001
|
-
z-index: 1000;
|
4002
|
-
left: 0;
|
4003
|
-
opacity: 0.5;
|
4004
|
-
}
|
4005
|
-
@keyframes spin {
|
4006
|
-
0% { transform: rotate(0deg); }
|
4007
|
-
100% { transform: rotate(360deg); }
|
4008
|
-
}
|
4009
|
-
`]
|
4010
|
-
}]
|
3920
|
+
`, 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"] }]
|
4011
3921
|
}], function () { return [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: i0.ChangeDetectorRef }, { type: i1$1.Title }, { type: OverlayWindowService }, { type: i1$2.HttpClient }, { type: CommandsCollectorMagicService }, { type: ExitMagicService, decorators: [{
|
4012
3922
|
type: Optional
|
4013
3923
|
}] }]; }, { rootMagicElementRef: [{
|
@@ -4173,6 +4083,11 @@ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, sele
|
|
4173
4083
|
}] }); })();
|
4174
4084
|
|
4175
4085
|
class NonMagicControlDirective {
|
4086
|
+
set magic(val) {
|
4087
|
+
this.id = val;
|
4088
|
+
this.selector = 'NonMagicControl';
|
4089
|
+
}
|
4090
|
+
;
|
4176
4091
|
constructor(_task, element, renderer, vcRef) {
|
4177
4092
|
this._task = _task;
|
4178
4093
|
this.element = element;
|
@@ -4182,11 +4097,6 @@ class NonMagicControlDirective {
|
|
4182
4097
|
this.eventsOnlyVal = false;
|
4183
4098
|
this.htmlElement = this.element.nativeElement;
|
4184
4099
|
}
|
4185
|
-
set magic(val) {
|
4186
|
-
this.id = val;
|
4187
|
-
this.selector = 'NonMagicControl';
|
4188
|
-
}
|
4189
|
-
;
|
4190
4100
|
get task() {
|
4191
4101
|
return this._task;
|
4192
4102
|
}
|
@@ -4250,14 +4160,12 @@ class MagicModule {
|
|
4250
4160
|
}
|
4251
4161
|
MagicModule.ɵfac = function MagicModule_Factory(t) { return new (t || MagicModule)(); };
|
4252
4162
|
MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
|
4253
|
-
MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [
|
4254
|
-
|
4255
|
-
|
4256
|
-
|
4257
|
-
|
4258
|
-
|
4259
|
-
HttpClientModule
|
4260
|
-
]] });
|
4163
|
+
MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [CommonModule,
|
4164
|
+
FormsModule,
|
4165
|
+
ReactiveFormsModule,
|
4166
|
+
RouterModule,
|
4167
|
+
DynamicModule,
|
4168
|
+
HttpClientModule] });
|
4261
4169
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicModule, [{
|
4262
4170
|
type: NgModule,
|
4263
4171
|
args: [{
|