@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.
Files changed (62) hide show
  1. package/esm2020/src/magic.core.module.mjs +7 -9
  2. package/esm2020/src/services/accessor.magic.service.mjs +29 -6
  3. package/esm2020/src/services/engine.magic.service.mjs +3 -3
  4. package/esm2020/src/services/magic-color.service.mjs +4 -4
  5. package/esm2020/src/services/mg-date-adapter.mjs +13 -8
  6. package/esm2020/src/services/subform.magic.service.mjs +1 -1
  7. package/esm2020/src/services/table.magic.service.mjs +2 -2
  8. package/esm2020/src/services/task.magics.service.mjs +7 -4
  9. package/esm2020/src/ui/components/base-magic-alert.component.mjs +3 -7
  10. package/esm2020/src/ui/components/base-magic-confirm.component.mjs +3 -7
  11. package/esm2020/src/ui/components/magic-alert.component.mjs +3 -35
  12. package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +3 -39
  13. package/esm2020/src/ui/directives/NonMagicControlDirective.mjs +6 -6
  14. package/esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs +3 -3
  15. package/esm2020/src/ui/directives/magic.directive.mjs +44 -41
  16. package/esm2020/src/ui/directives/mgformat.magic.directive.mjs +36 -17
  17. package/esm2020/src/ui/magic-modal/base-magic-overlay-container.mjs +1 -1
  18. package/esm2020/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +4 -18
  19. package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +5 -5
  20. package/esm2020/src/ui/magic-root.component.mjs +4 -38
  21. package/esm2020/src/ui/mgerror.magic.component.mjs +9 -9
  22. package/esm2020/src/ui/router-container.magic.component.mjs +4 -4
  23. package/esm2020/src/ui/subform.magic.component.mjs +4 -4
  24. package/fesm2015/magic-xpa-angular.mjs +164 -236
  25. package/fesm2015/magic-xpa-angular.mjs.map +1 -1
  26. package/fesm2020/magic-xpa-angular.mjs +162 -236
  27. package/fesm2020/magic-xpa-angular.mjs.map +1 -1
  28. package/package.json +8 -8
  29. package/src/services/accessor.magic.service.d.ts +1 -0
  30. package/src/services/engine.magic.service.d.ts +1 -1
  31. package/src/services/mg-date-adapter.d.ts +2 -1
  32. package/src/services/table.magic.service.d.ts +1 -1
  33. package/src/services/task.magics.service.d.ts +1 -1
  34. package/src/ui/components/base-magic-alert.component.d.ts +1 -1
  35. package/src/ui/components/base-magic-confirm.component.d.ts +1 -1
  36. package/src/ui/components/magic-alert.component.d.ts +1 -1
  37. package/src/ui/components/magic-confirmation-box.component.d.ts +1 -1
  38. package/src/ui/directives/NonMagicControlDirective.d.ts +1 -1
  39. package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +1 -1
  40. package/src/ui/directives/magic/checkbox.magic.directive.d.ts +1 -1
  41. package/src/ui/directives/magic/combobox.magic.directive.d.ts +1 -1
  42. package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +1 -1
  43. package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +1 -1
  44. package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +1 -1
  45. package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +1 -1
  46. package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +1 -1
  47. package/src/ui/directives/magic/row.magic.directive.d.ts +1 -1
  48. package/src/ui/directives/magic-focus.directive.d.ts +1 -1
  49. package/src/ui/directives/magic.directive.d.ts +7 -7
  50. package/src/ui/directives/magicViewContainerRef.directive.d.ts +1 -1
  51. package/src/ui/directives/mgformat.magic.directive.d.ts +3 -1
  52. package/src/ui/directives/range-validator.magic.directive.d.ts +1 -1
  53. package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +1 -1
  54. package/src/ui/magic-modal/magic-overlay-container.d.ts +1 -1
  55. package/src/ui/magic-root.component.d.ts +1 -1
  56. package/src/ui/mgerror.magic.component.d.ts +1 -1
  57. package/src/ui/pipes/date.magic.pipe.d.ts +1 -1
  58. package/src/ui/pipes/time.magic.pipe.d.ts +1 -1
  59. package/src/ui/router-container.magic.component.d.ts +1 -1
  60. package/src/ui/subform.magic.component.d.ts +1 -1
  61. package/src/ui/task-base.magic.component.d.ts +1 -1
  62. 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, PICInterface } from '@magic-xpa/utils';
13
+ import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, BindingLevel, StorageAttributeType, MgControlType } from '@magic-xpa/utils';
14
14
  import { filter, map, debounceTime } from 'rxjs/operators';
15
15
  import { Subject, fromEvent } from 'rxjs';
16
16
  import { __decorate, __metadata } from 'tslib';
17
17
  import * as i1$1 from '@angular/platform-browser';
18
18
  import * as i1$2 from '@angular/common/http';
19
19
  import { HttpClientModule } from '@angular/common/http';
20
- import { NativeDateAdapter, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
20
+ import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
21
21
  import * as i1$3 from '@angular/cdk/platform';
22
22
 
23
23
  class ControlMetadata {
@@ -270,8 +270,8 @@ class EngineMagicService {
270
270
  GetControlPictureMask(taskId, controlName) {
271
271
  return this.magicBridge.GetControlPictureMask(taskId, controlName);
272
272
  }
273
- GetFormattedValue(taskId, controlName, value) {
274
- return this.magicBridge.GetFormattedValue(taskId, controlName, value);
273
+ GetFormattedValue(taskId, controlName, value, rowId) {
274
+ return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);
275
275
  }
276
276
  ValidateControlValue(taskId, controlName, value) {
277
277
  return this.magicBridge.ValidateControlValue(taskId, controlName, value);
@@ -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
- } }, directives: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
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: `
@@ -953,7 +953,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
953
953
  </div>
954
954
  </div>
955
955
  </div>
956
- `, styles: [".modal-foreground{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}\n"] }]
956
+ `, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}\n"] }]
957
957
  }], function () { return [{ type: i0.ComponentFactoryResolver }]; }, { headerElementRef: [{
958
958
  type: ViewChild,
959
959
  args: ['modalheader', { static: false }]
@@ -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) { }, styles: [""] });
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) { }, styles: [""] });
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
- } }, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;top:0;z-index:999;right:0;bottom:0;left:0}"] });
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 {
@@ -1752,8 +1662,8 @@ class TaskMagicService {
1752
1662
  guiRowId = '0';
1753
1663
  return this.Records.list.length > +guiRowId ? this.Records.list[guiRowId].values[controlId] : '';
1754
1664
  }
1755
- getFormattedValue(controlName, val) {
1756
- return this.magic.GetFormattedValue(this.taskId, controlName, val);
1665
+ getFormattedValue(controlName, val, rowId) {
1666
+ return this.magic.GetFormattedValue(this.taskId, controlName, val, rowId);
1757
1667
  }
1758
1668
  setValue(controlId, guiRowId, value) {
1759
1669
  return this.Records.list[guiRowId].setValue(controlId, value);
@@ -1961,7 +1871,10 @@ class TaskMagicService {
1961
1871
  return val;
1962
1872
  }
1963
1873
  case StorageAttribute.NUMERIC:
1964
- return (val === null) ? 0 : val;
1874
+ if (isUndefined(val))
1875
+ return val;
1876
+ else
1877
+ return (val != null) ? +val : null;
1965
1878
  default:
1966
1879
  return val;
1967
1880
  }
@@ -2190,7 +2103,7 @@ class TableMagicService {
2190
2103
  this.task.onScrollDown();
2191
2104
  }
2192
2105
  sortData(e) { }
2193
- mgOnPaginateChange(e) { }
2106
+ mgOnPaginateChange(e, changeSelectedRow) { }
2194
2107
  mgOptionChanged(e) { }
2195
2108
  updateTableSize(size) {
2196
2109
  if (size === 0) {
@@ -2244,6 +2157,9 @@ const SYSTEM_BG = 4;
2244
2157
  const SYSTEM_FG_AND_SYSTEM_BG = 6;
2245
2158
  const TRANSPERENT_BG = 1;
2246
2159
  class MagicColorService {
2160
+ getColorFilePath() {
2161
+ return 'assets/' + this.colorFileName;
2162
+ }
2247
2163
  constructor(http, colorFile1 = 'clr_rnt.eng') {
2248
2164
  this.http = http;
2249
2165
  this.colorFileName = 'clr_rnt.eng';
@@ -2253,9 +2169,6 @@ class MagicColorService {
2253
2169
  else
2254
2170
  this.colorFileName = 'clr_rnt.eng';
2255
2171
  }
2256
- getColorFilePath() {
2257
- return 'assets/' + this.colorFileName;
2258
- }
2259
2172
  getColorData() {
2260
2173
  if (!this.colorsData) {
2261
2174
  this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
@@ -2339,9 +2252,9 @@ class AccessorMagicService {
2339
2252
  let properties;
2340
2253
  properties = this.task.Records.list[0].getControlMetadata(controlId);
2341
2254
  if (properties.properties.get(HtmlProperties.ReadOnly) !== null && properties.properties.get(HtmlProperties.ReadOnly) === true)
2342
- return false;
2343
- else
2344
2255
  return true;
2256
+ else
2257
+ return false;
2345
2258
  }
2346
2259
  getText(controlId, rowId) {
2347
2260
  return this.task.getProperty(controlId, HtmlProperties.Text, rowId);
@@ -2371,6 +2284,29 @@ class AccessorMagicService {
2371
2284
  let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
2372
2285
  return vis ? 'visible' : 'hidden';
2373
2286
  }
2287
+ getAlphaMask(controlId, rowId) {
2288
+ if (isNullOrUndefined(controlId))
2289
+ return null;
2290
+ let pic = this.task.GetControlPictureMask(controlId);
2291
+ let mask = pic.getMask();
2292
+ let valueStr = new StringBuilder();
2293
+ for (let i = 0; i < mask.length; i++) {
2294
+ switch (mask.charCodeAt(i)) {
2295
+ case PICInterface.PIC_N:
2296
+ valueStr.Append("0");
2297
+ break;
2298
+ case PICInterface.PIC_U:
2299
+ case PICInterface.PIC_L:
2300
+ case PICInterface.PIC_X:
2301
+ valueStr.Append("A");
2302
+ break;
2303
+ default:
2304
+ valueStr.Append(mask.charAt(i));
2305
+ break;
2306
+ }
2307
+ }
2308
+ return (pic != null) ? valueStr.toString() : null;
2309
+ }
2374
2310
  getNumericPicture(picture) {
2375
2311
  var obj = {};
2376
2312
  if (isNullOrUndefined(picture))
@@ -2439,7 +2375,7 @@ class AccessorMagicService {
2439
2375
  }
2440
2376
  getFormattedValue(controlId, rowId) {
2441
2377
  let val = this.task.getValue(controlId, rowId);
2442
- val = this.task.getFormattedValue(controlId, val);
2378
+ val = this.task.getFormattedValue(controlId, val, rowId);
2443
2379
  return val;
2444
2380
  }
2445
2381
  getPicture(controlId, rowId) {
@@ -2769,6 +2705,16 @@ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, sele
2769
2705
  }] }); })();
2770
2706
 
2771
2707
  class MagicDirective {
2708
+ set magic(val) {
2709
+ this.id = val;
2710
+ this.selector = "magic";
2711
+ }
2712
+ ;
2713
+ set eventsOnly(val) {
2714
+ console.log("eventsOnly");
2715
+ this.eventsOnlyVal = true;
2716
+ }
2717
+ ;
2772
2718
  constructor(_task, element, renderer, vcRef, magicRow) {
2773
2719
  this._task = _task;
2774
2720
  this.element = element;
@@ -2778,28 +2724,18 @@ class MagicDirective {
2778
2724
  this.eventHandlers = {};
2779
2725
  this.eventsOnlyVal = false;
2780
2726
  this.htmlElement = this.element.nativeElement;
2781
- if (!(typeof magicRow === 'undefined' || magicRow === null))
2727
+ if (!(typeof magicRow === "undefined" || magicRow === null))
2782
2728
  this.rowId = magicRow.rowId;
2783
2729
  }
2784
- set magic(val) {
2785
- this.id = val;
2786
- this.selector = 'magic';
2787
- }
2788
- ;
2789
- set eventsOnly(val) {
2790
- console.log('eventsOnly');
2791
- this.eventsOnlyVal = true;
2792
- }
2793
- ;
2794
2730
  get task() {
2795
2731
  return this._task;
2796
2732
  }
2797
2733
  regEvents() {
2798
- this.eventHandlers['focusin'] = this.OnFocus.bind(this);
2734
+ this.eventHandlers["focusin"] = this.OnFocus.bind(this);
2799
2735
  Object.keys(this.eventHandlers).forEach((key) => {
2800
2736
  this.focusUnlistener = this.renderer.listen(this.htmlElement, key, this.eventHandlers[key]);
2801
2737
  });
2802
- let events = ['click', 'mousedown', 'dblclick'];
2738
+ let events = ["click", "mousedown", "dblclick"];
2803
2739
  events.forEach(event => {
2804
2740
  this.renderer.listen(this.htmlElement, event, (e) => {
2805
2741
  let fromButton = false;
@@ -2810,15 +2746,15 @@ class MagicDirective {
2810
2746
  e.cancelBubble = true;
2811
2747
  });
2812
2748
  });
2813
- this.renderer.listen(this.htmlElement, 'change', (e) => {
2814
- let guiEvent = getGuiEventObj('selectionchanged', this.id, +this.rowId);
2749
+ this.renderer.listen(this.htmlElement, "change", (e) => {
2750
+ let guiEvent = getGuiEventObj("selectionchanged", this.id, +this.rowId);
2815
2751
  if ((event.target).selectedIndex !== undefined) {
2816
2752
  guiEvent.Value = (event.target).selectedIndex.toString();
2817
2753
  e.cancelBubble = true;
2818
2754
  this.task.insertEvent(guiEvent);
2819
2755
  }
2820
2756
  });
2821
- fromEvent(this.htmlElement, 'input').pipe(map((event) => {
2757
+ fromEvent(this.htmlElement, "input").pipe(map((event) => {
2822
2758
  return event.target.value;
2823
2759
  }), debounceTime(200)).subscribe((x) => {
2824
2760
  if (this.task.getProperty(this.id, HtmlProperties.BindingLevel, this.rowId) === BindingLevel.Character) {
@@ -2827,8 +2763,8 @@ class MagicDirective {
2827
2763
  this.task.mgAccessorService.setValueToControl(this.id, x, true);
2828
2764
  }
2829
2765
  });
2830
- this.renderer.listen(this.htmlElement, 'keydown', (e) => {
2831
- let guiEvent = getGuiEventObj('keydown', this.id, +this.rowId);
2766
+ this.renderer.listen(this.htmlElement, "keydown", (e) => {
2767
+ let guiEvent = getGuiEventObj("keydown", this.id, +this.rowId);
2832
2768
  guiEvent.modifiers = Modifiers.MODIFIER_NONE;
2833
2769
  if (e.altKey && e.keyCode !== GuiConstants.KEY_ALT)
2834
2770
  guiEvent.modifiers = Modifiers.MODIFIER_ALT;
@@ -2854,7 +2790,7 @@ class MagicDirective {
2854
2790
  });
2855
2791
  }
2856
2792
  OnFocus() {
2857
- this.task.insertEvent(getGuiEventObj('focus', this.id, +this.rowId));
2793
+ this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
2858
2794
  event.cancelBubble = true;
2859
2795
  }
2860
2796
  IsSameElement(command) {
@@ -2874,7 +2810,7 @@ class MagicDirective {
2874
2810
  .subscribe(a => {
2875
2811
  let command = a;
2876
2812
  if (isNullOrUndefined(this.rowId))
2877
- this.rowId = '0';
2813
+ this.rowId = "0";
2878
2814
  try {
2879
2815
  if (!this.eventsOnlyVal)
2880
2816
  this.handleCommand(command);
@@ -2902,7 +2838,7 @@ class MagicDirective {
2902
2838
  this.focusUnlistener();
2903
2839
  if (!(command.obj.ConnectedControl && this.htmlElement instanceof HTMLButtonElement))
2904
2840
  this.htmlElement.focus();
2905
- this.focusUnlistener = this.renderer.listen(this.htmlElement, 'focusin', this.eventHandlers['focusin']);
2841
+ this.focusUnlistener = this.renderer.listen(this.htmlElement, "focusin", this.eventHandlers["focusin"]);
2906
2842
  break;
2907
2843
  }
2908
2844
  }
@@ -2912,13 +2848,13 @@ class MagicDirective {
2912
2848
  let methodName = command._str;
2913
2849
  let args = command.arguments;
2914
2850
  let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
2915
- let resultString = '';
2851
+ let resultString = "";
2916
2852
  try {
2917
2853
  if (!isNullOrUndefined(magicComponent[methodName])) {
2918
2854
  resultString = magicComponent[methodName].apply(magicComponent, args);
2919
2855
  }
2920
2856
  else
2921
- console.error('Instance method ' + methodName + ' does not exists');
2857
+ console.error("Instance method " + methodName + " does not exists");
2922
2858
  }
2923
2859
  catch (e) {
2924
2860
  console.error(e.message);
@@ -2930,10 +2866,13 @@ class MagicDirective {
2930
2866
  handleSetProperty(command) {
2931
2867
  switch (command.Operation) {
2932
2868
  case HtmlProperties.ReadOnly:
2933
- if (command.obj1 != true)
2934
- this.renderer.removeAttribute(this.htmlElement, command.Operation);
2935
- else
2936
- this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);
2869
+ {
2870
+ if (command.obj.Type == MgControlType.CTRL_TYPE_TEXT)
2871
+ if (command.obj1 != true)
2872
+ this.renderer.removeAttribute(this.htmlElement, command.Operation);
2873
+ else
2874
+ this.renderer.setAttribute(this.htmlElement, command.Operation, command.str);
2875
+ }
2937
2876
  break;
2938
2877
  }
2939
2878
  }
@@ -2948,26 +2887,26 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
2948
2887
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
2949
2888
  type: Directive,
2950
2889
  args: [{
2951
- selector: '[magic]'
2890
+ selector: "[magic]"
2952
2891
  }]
2953
2892
  }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
2954
2893
  type: Optional
2955
2894
  }] }]; }, { magic: [{
2956
2895
  type: Input,
2957
- args: ['magic']
2896
+ args: ["magic"]
2958
2897
  }], eventsOnly: [{
2959
2898
  type: Input,
2960
- args: ['eventsOnly']
2899
+ args: ["eventsOnly"]
2961
2900
  }], rowId: [{
2962
2901
  type: Input
2963
2902
  }] }); })();
2964
2903
 
2965
2904
  class NoControlMagicDirective extends MagicDirective {
2905
+ set magic(val) { this.id = val; this.selector = 'magicnc'; }
2906
+ ;
2966
2907
  constructor(_task, element, renderer, vcRef, magicRow) {
2967
2908
  super(_task, element, renderer, vcRef, magicRow);
2968
2909
  }
2969
- set magic(val) { this.id = val; this.selector = 'magicnc'; }
2970
- ;
2971
2910
  regEvents() {
2972
2911
  super.regEvents();
2973
2912
  if (this.htmlElement instanceof HTMLSelectElement) {
@@ -3255,6 +3194,25 @@ class MgformatMagicDirective {
3255
3194
  }
3256
3195
  }
3257
3196
  onFocusEvent($event) {
3197
+ this.calculatePattern();
3198
+ }
3199
+ onInputEvent($event) {
3200
+ this.calculatePattern();
3201
+ }
3202
+ onChangeEvent($event) {
3203
+ let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
3204
+ let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
3205
+ switch (attr) {
3206
+ case StorageAttribute.ALPHA:
3207
+ case StorageAttribute.UNICODE:
3208
+ this.formatAlphaUnicode(control);
3209
+ break;
3210
+ case StorageAttribute.BOOLEAN:
3211
+ this.formatBoolean(control);
3212
+ break;
3213
+ }
3214
+ }
3215
+ calculatePattern() {
3258
3216
  let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
3259
3217
  if (control != null) {
3260
3218
  let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
@@ -3271,26 +3229,22 @@ class MgformatMagicDirective {
3271
3229
  if (attr == StorageAttribute.ALPHA || attr == StorageAttribute.UNICODE) {
3272
3230
  if (control.validator == null)
3273
3231
  control.setValidators(Validators.maxLength(pic.getMaskLength()));
3274
- else
3275
- control.setValidators([control.validator, Validators.maxLength(pic.getMaskLength())]);
3232
+ else {
3233
+ if (pic.isFormatExp()) {
3234
+ control.setValidators(Validators.maxLength(pic.getMaskLength()));
3235
+ if (isUndefined(this.magicDir.rowId))
3236
+ this.magicDir.rowId = '0';
3237
+ control.setValidators([control.validator, this._task.customValidator(this.magicDir.rowId, this.magicDir.id)]);
3238
+ }
3239
+ else
3240
+ control.setValidators([control.validator, Validators.maxLength(pic.getMaskLength())]);
3241
+ }
3242
+ control.updateValueAndValidity();
3276
3243
  }
3277
3244
  }
3278
3245
  }
3279
3246
  }
3280
3247
  }
3281
- onChangeEvent($event) {
3282
- let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
3283
- let attr = this._task.Records.list[0].getControlMetadata(this.magicDir.id).dataType;
3284
- switch (attr) {
3285
- case StorageAttribute.ALPHA:
3286
- case StorageAttribute.UNICODE:
3287
- this.formatAlphaUnicode(control);
3288
- break;
3289
- case StorageAttribute.BOOLEAN:
3290
- this.formatBoolean(control);
3291
- break;
3292
- }
3293
- }
3294
3248
  formatDate(pic) {
3295
3249
  let mgDateFormatter = new MgDateFormatter();
3296
3250
  this._task.mgInputDateFormat = mgDateFormatter.ConvertMgDateFormatToAngular(pic.getMask());
@@ -3439,7 +3393,7 @@ class MgformatMagicDirective {
3439
3393
  }
3440
3394
  MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
3441
3395
  MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3442
- i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
3396
+ i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("input", function MgformatMagicDirective_input_HostBindingHandler($event) { return ctx.onInputEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
3443
3397
  } } });
3444
3398
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
3445
3399
  type: Directive,
@@ -3449,6 +3403,9 @@ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirec
3449
3403
  }], function () { return [{ type: MagicDirective }, { type: TaskMagicService }]; }, { onFocusEvent: [{
3450
3404
  type: HostListener,
3451
3405
  args: ['focus', ['$event']]
3406
+ }], onInputEvent: [{
3407
+ type: HostListener,
3408
+ args: ['input', ['$event']]
3452
3409
  }], onChangeEvent: [{
3453
3410
  type: HostListener,
3454
3411
  args: ['change', ['$event']]
@@ -3558,14 +3515,14 @@ function SubformMagicComponent_ndc_dynamic_0_Template(rf, ctx) { if (rf & 1) {
3558
3515
  i0.ɵɵproperty("ndcDynamicComponent", ctx_r0.Component)("ndcDynamicInputs", ctx_r0.Parameters);
3559
3516
  } }
3560
3517
  class SubformMagicComponent {
3518
+ set magic(val) { this.id = val; }
3519
+ ;
3561
3520
  constructor(vcRef, mgSub) {
3562
3521
  this.vcRef = vcRef;
3563
3522
  this.mgSub = mgSub;
3564
3523
  this.component = null;
3565
3524
  this.component = (this.vcRef._hostLView).find(v => !isNullOrUndefined(v));
3566
3525
  }
3567
- set magic(val) { this.id = val; }
3568
- ;
3569
3526
  get Component() {
3570
3527
  return this.mgSub.mgGetComp(this.id);
3571
3528
  }
@@ -3578,7 +3535,7 @@ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicCompone
3578
3535
  i0.ɵɵtemplate(0, SubformMagicComponent_ndc_dynamic_0_Template, 1, 2, "ndc-dynamic", 0);
3579
3536
  } if (rf & 2) {
3580
3537
  i0.ɵɵproperty("ngIf", ctx.Component);
3581
- } }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
3538
+ } }, dependencies: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
3582
3539
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
3583
3540
  type: Component,
3584
3541
  args: [{
@@ -3619,13 +3576,6 @@ function ErrorMagicComponent_div_0_Template(rf, ctx) { if (rf & 1) {
3619
3576
  } }
3620
3577
  const _c1 = ["*"];
3621
3578
  class ErrorMagicComponent {
3622
- constructor(_task, mgService, changeDetectorRef) {
3623
- this._task = _task;
3624
- this.mgService = mgService;
3625
- this.changeDetectorRef = changeDetectorRef;
3626
- this.defaultDisplay = true;
3627
- this.rowId = "0";
3628
- }
3629
3579
  set magic(val) {
3630
3580
  this.id = val;
3631
3581
  }
@@ -3639,6 +3589,13 @@ class ErrorMagicComponent {
3639
3589
  this.changeDetectorRef.detectChanges();
3640
3590
  }
3641
3591
  ;
3592
+ constructor(_task, mgService, changeDetectorRef) {
3593
+ this._task = _task;
3594
+ this.mgService = mgService;
3595
+ this.changeDetectorRef = changeDetectorRef;
3596
+ this.defaultDisplay = true;
3597
+ this.rowId = "0";
3598
+ }
3642
3599
  isEmpty(element) {
3643
3600
  const nodes = element.childNodes;
3644
3601
  for (let i = 0; i < nodes.length; i++) {
@@ -3681,7 +3638,7 @@ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent,
3681
3638
  i0.ɵɵtemplate(0, ErrorMagicComponent_div_0_Template, 5, 1, "div", 0);
3682
3639
  } if (rf & 2) {
3683
3640
  i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
3684
- } }, directives: [i1.NgIf], encapsulation: 2 });
3641
+ } }, dependencies: [i1.NgIf], encapsulation: 2 });
3685
3642
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMagicComponent, [{
3686
3643
  type: Component,
3687
3644
  args: [{
@@ -3907,13 +3864,10 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
3907
3864
  i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
3908
3865
  i0.ɵɵadvance(3);
3909
3866
  i0.ɵɵproperty("ngIf", ctx.showSpinner);
3910
- } }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective, MagicViewContainerRef, i1.NgTemplateOutlet], styles: [".mgSpinnerClass[_ngcontent-%COMP%]{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;top:0;right:0;bottom:0;left:0;width:100px;height:100px;animation:spin 2s linear infinite}.spinner-background[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;z-index:1000;left:0;opacity:.5}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
3867
+ } }, 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)}}"] });
3911
3868
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
3912
3869
  type: Component,
3913
- args: [{
3914
- selector: 'magic-root',
3915
- providers: [],
3916
- template: `
3870
+ args: [{ selector: 'magic-root', providers: [], template: `
3917
3871
  <div #magicRoot>
3918
3872
  <ndc-dynamic
3919
3873
  *ngIf = "RootComponent !== null"
@@ -3932,38 +3886,7 @@ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent,
3932
3886
  <ng-template #defaultSpinner>
3933
3887
  <div class="mgSpinnerClass"></div>
3934
3888
  </ng-template>
3935
- `,
3936
- styles: [`
3937
- .mgSpinnerClass {
3938
- border: 10px solid #cccccc; /* Light grey */
3939
- border-top: 10px solid black; /* Blue */
3940
- border-radius: 50%;
3941
- position: fixed;
3942
- margin: auto;
3943
- top: 0;
3944
- right: 0;
3945
- bottom: 0;
3946
- left: 0;
3947
- width: 100px;
3948
- height: 100px;
3949
- animation: spin 2s linear infinite;
3950
- }
3951
- .spinner-background {
3952
- /* background fixed across whole screen */
3953
- position: fixed;
3954
- top: 0;
3955
- right: 0;
3956
- bottom: 0;
3957
- z-index: 1000;
3958
- left: 0;
3959
- opacity: 0.5;
3960
- }
3961
- @keyframes spin {
3962
- 0% { transform: rotate(0deg); }
3963
- 100% { transform: rotate(360deg); }
3964
- }
3965
- `]
3966
- }]
3889
+ `, 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"] }]
3967
3890
  }], function () { return [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: i0.ChangeDetectorRef }, { type: i1$1.Title }, { type: OverlayWindowService }, { type: i1$2.HttpClient }, { type: CommandsCollectorMagicService }, { type: ExitMagicService, decorators: [{
3968
3891
  type: Optional
3969
3892
  }] }]; }, { rootMagicElementRef: [{
@@ -4129,6 +4052,11 @@ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, sele
4129
4052
  }] }); })();
4130
4053
 
4131
4054
  class NonMagicControlDirective {
4055
+ set magic(val) {
4056
+ this.id = val;
4057
+ this.selector = 'NonMagicControl';
4058
+ }
4059
+ ;
4132
4060
  constructor(_task, element, renderer, vcRef) {
4133
4061
  this._task = _task;
4134
4062
  this.element = element;
@@ -4138,11 +4066,6 @@ class NonMagicControlDirective {
4138
4066
  this.eventsOnlyVal = false;
4139
4067
  this.htmlElement = this.element.nativeElement;
4140
4068
  }
4141
- set magic(val) {
4142
- this.id = val;
4143
- this.selector = 'NonMagicControl';
4144
- }
4145
- ;
4146
4069
  get task() {
4147
4070
  return this._task;
4148
4071
  }
@@ -4206,14 +4129,12 @@ class MagicModule {
4206
4129
  }
4207
4130
  MagicModule.ɵfac = function MagicModule_Factory(t) { return new (t || MagicModule)(); };
4208
4131
  MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
4209
- MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [[
4210
- CommonModule,
4211
- FormsModule,
4212
- ReactiveFormsModule,
4213
- RouterModule,
4214
- DynamicModule,
4215
- HttpClientModule
4216
- ]] });
4132
+ MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [CommonModule,
4133
+ FormsModule,
4134
+ ReactiveFormsModule,
4135
+ RouterModule,
4136
+ DynamicModule,
4137
+ HttpClientModule] });
4217
4138
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicModule, [{
4218
4139
  type: NgModule,
4219
4140
  args: [{
@@ -4302,11 +4223,13 @@ const MG_FORMATS = {
4302
4223
  }
4303
4224
  };
4304
4225
  class MgDateAdapter extends NativeDateAdapter {
4305
- constructor(platform, task) {
4306
- super('en-US', platform);
4226
+ constructor(platform, task, localeId) {
4227
+ super(localeId, platform);
4307
4228
  this.platform = platform;
4308
4229
  this.task = task;
4230
+ this.localeId = localeId;
4309
4231
  this.mgdtfmt = null;
4232
+ this.setLocale(localeId);
4310
4233
  }
4311
4234
  parse(value) {
4312
4235
  let valueStr = value;
@@ -4366,7 +4289,7 @@ class MgDateAdapter extends NativeDateAdapter {
4366
4289
  }
4367
4290
  if (month == 0 && year == 0 && date == 0)
4368
4291
  return null;
4369
- return new Date(Date.UTC(year, month, date));
4292
+ return new Date(year, month, date);
4370
4293
  }
4371
4294
  }
4372
4295
  format(date, displayFormat) {
@@ -4382,11 +4305,14 @@ class MgDateAdapter extends NativeDateAdapter {
4382
4305
  }
4383
4306
  }
4384
4307
  }
4385
- MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
4308
+ MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
4386
4309
  MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
4387
4310
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
4388
4311
  type: Injectable
4389
- }], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }]; }, null); })();
4312
+ }], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
4313
+ type: Inject,
4314
+ args: [MAT_DATE_LOCALE]
4315
+ }] }]; }, null); })();
4390
4316
 
4391
4317
  const matDateProviders = [
4392
4318
  { provide: DateAdapter, useClass: MgDateAdapter },