@magic-xpa/angular 4.901.0-dev491.323 → 4.901.0-dev491.324

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.
@@ -17,8 +17,8 @@ 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 * as i2$1 from '@angular/cdk/platform';
21
20
  import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
21
+ import * as i1$3 from '@angular/cdk/platform';
22
22
 
23
23
  class ControlMetadata {
24
24
  constructor() {
@@ -716,9 +716,6 @@ class GuiInteractiveExecutor {
716
716
  case InteractiveCommandType.GET_LAST_ROUTE:
717
717
  this.OnGetLastRoute();
718
718
  break;
719
- case InteractiveCommandType.OPEN_FORM:
720
- this.OnOpenForm();
721
- break;
722
719
  }
723
720
  }
724
721
  catch (ex) {
@@ -755,10 +752,6 @@ class GuiInteractiveExecutor {
755
752
  OnMessageBox() {
756
753
  this.overlayService.openConfirmationBox(this.command._mgValue.title, this.command._mgValue.str, this.command._mgValue.style);
757
754
  }
758
- OnOpenForm() {
759
- if (this.command._boolVal)
760
- this.overlayService.loadAndOpenModule(this.command.controlName, this.command._mgValue.str, this.command._mgValue.path);
761
- }
762
755
  OnSetTitle() {
763
756
  this.task.setTitle(this.command._mgValue.title);
764
757
  }
@@ -1199,42 +1192,42 @@ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent,
1199
1192
  type: Component,
1200
1193
  args: [{
1201
1194
  selector: 'sample-magic-alert-component',
1202
- template: `<div>
1203
- <div class="mg-message-background">
1204
- <h2> {{title}}</h2>
1205
- <p>{{message}} </p>
1206
-
1207
- <button (click)="OnClose()">OK</button>
1208
- </div>
1195
+ template: `<div>
1196
+ <div class="mg-message-background">
1197
+ <h2> {{title}}</h2>
1198
+ <p>{{message}} </p>
1199
+
1200
+ <button (click)="OnClose()">OK</button>
1201
+ </div>
1209
1202
  </div>`,
1210
- styles: [`
1211
- .mg-message-background {
1212
- background-color: #F5F5F5;
1213
- text-align: center;
1214
- width: 40%;
1215
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
1216
- padding: 17px;
1217
- border-radius: 5px;
1218
- text-align: center;
1219
- margin-top: 10% ;
1220
- margin-left: auto;
1221
- margin-right: auto;
1222
- border: 1px solid gray;
1223
- }
1224
-
1225
- button {
1226
- background-color: #8CD4F5;
1227
- color: white;
1228
- border: none;
1229
- box-shadow: none;
1230
- font-size: 17px;
1231
- font-weight: 500;
1232
- -webkit-border-radius: 4px;
1233
- border-radius: 5px;
1234
- padding: 10px 32px;
1235
- margin: 26px 5px 0 5px;
1236
- cursor: pointer;
1237
- }
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
+ }
1238
1231
  `]
1239
1232
  }]
1240
1233
  }], null, null); })();
@@ -1266,49 +1259,49 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
1266
1259
  type: Component,
1267
1260
  args: [{
1268
1261
  selector: 'sample-magic-confirmation-box',
1269
- template: `<div>
1270
- <div class="mg-message-background">
1271
- <h2> {{title}}</h2>
1272
- {{message}}
1273
- <br>
1274
- <br>
1275
-
1276
- <button (click)="OnClose(true)">OK</button>
1277
- <button class="cancel" (click)="OnClose(false)">Cancel</button>
1278
- </div>
1262
+ template: `<div>
1263
+ <div class="mg-message-background">
1264
+ <h2> {{title}}</h2>
1265
+ {{message}}
1266
+ <br>
1267
+ <br>
1268
+
1269
+ <button (click)="OnClose(true)">OK</button>
1270
+ <button class="cancel" (click)="OnClose(false)">Cancel</button>
1271
+ </div>
1279
1272
  </div>`,
1280
- styles: [`
1281
- .mg-message-background {
1282
- background-color: #F5F5F5;
1283
- text-align: center;
1284
- width: 40%;
1285
- font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
1286
- padding: 17px;
1287
- border-radius: 5px;
1288
- text-align: center;
1289
- margin-top: 10% ;
1290
- margin-left: auto;
1291
- margin-right: auto;
1292
- border: 1px solid gray;
1293
- }
1294
-
1295
- button {
1296
- background-color: #8CD4F5;
1297
- color: white;
1298
- border: none;
1299
- box-shadow: none;
1300
- font-size: 17px;
1301
- font-weight: 500;
1302
- -webkit-border-radius: 4px;
1303
- border-radius: 5px;
1304
- padding: 10px 32px;
1305
- margin: 26px 5px 0 5px;
1306
- cursor: pointer;
1307
- }
1308
-
1309
- button.cancel {
1310
- background-color: #C1C1C1;
1311
- }
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
+ }
1312
1305
  `]
1313
1306
  }]
1314
1307
  }], null, null); })();
@@ -1372,42 +1365,17 @@ class confirmationBox {
1372
1365
  }
1373
1366
 
1374
1367
  class OverlayWindowService {
1375
- constructor(componentFactoryResolver, componentList, engineMagicService, magicLazyModuleLoader, injector, compiler, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
1368
+ constructor(componentFactoryResolver, componentList, engineMagicService, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
1376
1369
  this.componentFactoryResolver = componentFactoryResolver;
1377
1370
  this.componentList = componentList;
1378
1371
  this.engineMagicService = engineMagicService;
1379
- this.magicLazyModuleLoader = magicLazyModuleLoader;
1380
- this.injector = injector;
1381
- this.compiler = compiler;
1382
1372
  this.overlayContainerMagicProvider = overlayContainerMagicProvider;
1383
1373
  this.confirmationComponentsMagicProvider = confirmationComponentsMagicProvider;
1384
1374
  this.overlayWindowFocusManager = null;
1385
- this.changeDetectorRef = null;
1386
1375
  }
1387
- init(overlayWindowsContainerViewRef, rootMagicElement, changeDetectorRef) {
1376
+ init(overlayWindowsContainerViewRef, rootMagicElement) {
1388
1377
  this.overlayWindowsContainerViewRef = overlayWindowsContainerViewRef;
1389
1378
  this.overlayWindowFocusManager = new OverlayWindowFocusManager(rootMagicElement);
1390
- this.changeDetectorRef = changeDetectorRef;
1391
- }
1392
- loadAndOpenModule(formName, taskId, taskDescription) {
1393
- let moduleRef = this.componentList.getModuleRef(formName);
1394
- if (moduleRef == null) {
1395
- let lazyLoadModule = this.componentList.getLazyLoadModuleData(formName);
1396
- if (lazyLoadModule != null) {
1397
- let moduleName = lazyLoadModule.moduleName.replace("Magic", "");
1398
- moduleName = moduleName.replace("Module", "");
1399
- this.magicLazyModuleLoader.Load(moduleName).then(m => {
1400
- const compiled = this.compiler.compileModuleAndAllComponentsSync(m[lazyLoadModule.moduleName]);
1401
- moduleRef = compiled.ngModuleFactory.create(this.injector);
1402
- this.open(formName, taskId, taskDescription);
1403
- this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);
1404
- });
1405
- }
1406
- }
1407
- else {
1408
- this.open(formName, taskId, taskDescription);
1409
- this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);
1410
- }
1411
1379
  }
1412
1380
  open(formName, taskId, taskDescription) {
1413
1381
  let comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null : this.componentList.getComponent(formName);
@@ -1418,7 +1386,6 @@ class OverlayWindowService {
1418
1386
  guiEvent.TaskID = taskId;
1419
1387
  this.engineMagicService.insertEvent(guiEvent);
1420
1388
  });
1421
- this.changeDetectorRef.detectChanges();
1422
1389
  }
1423
1390
  close(commandStr) {
1424
1391
  this.overlayWindowsContainerViewRef.remove();
@@ -1464,14 +1431,14 @@ class OverlayWindowService {
1464
1431
  return componentRef;
1465
1432
  }
1466
1433
  }
1467
- OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(MagicLazyLoaderService), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i0.Compiler), i0.ɵɵinject(OverlayContainerMagicProvider), i0.ɵɵinject(ConfirmationComponentsMagicProvider)); };
1434
+ OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayContainerMagicProvider), i0.ɵɵinject(ConfirmationComponentsMagicProvider)); };
1468
1435
  OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac, providedIn: 'root' });
1469
1436
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayWindowService, [{
1470
1437
  type: Injectable,
1471
1438
  args: [{
1472
1439
  providedIn: 'root'
1473
1440
  }]
1474
- }], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.Compiler }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null); })();
1441
+ }], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null); })();
1475
1442
  class OverlayWindowFocusManager {
1476
1443
  constructor(rootMagicElement) {
1477
1444
  this.rootMagicElement = null;
@@ -1997,7 +1964,7 @@ class TaskMagicService {
1997
1964
  if (isUndefined(val))
1998
1965
  return val;
1999
1966
  else
2000
- return (val != null) ? (typeof val === 'string') ? val : +val : null;
1967
+ return (val != null) ? +val : null;
2001
1968
  default:
2002
1969
  return val;
2003
1970
  }
@@ -2828,12 +2795,11 @@ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, sele
2828
2795
  }] }); })();
2829
2796
 
2830
2797
  class MagicDirective {
2831
- constructor(_task, element, renderer, vcRef, platform, magicRow) {
2798
+ constructor(_task, element, renderer, vcRef, magicRow) {
2832
2799
  this._task = _task;
2833
2800
  this.element = element;
2834
2801
  this.renderer = renderer;
2835
2802
  this.vcRef = vcRef;
2836
- this.platform = platform;
2837
2803
  this.magicRow = magicRow;
2838
2804
  this.eventHandlers = {};
2839
2805
  this.eventsOnlyVal = false;
@@ -2865,8 +2831,6 @@ class MagicDirective {
2865
2831
  let fromButton = false;
2866
2832
  if (this.htmlElement instanceof HTMLButtonElement)
2867
2833
  fromButton = true;
2868
- if (fromButton && (this.platform.IOS || this.platform.SAFARI))
2869
- this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
2870
2834
  this.task.insertEvent(getGuiEventObj(event, this.id, +this.rowId, fromButton));
2871
2835
  if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)
2872
2836
  e.cancelBubble = true;
@@ -3008,14 +2972,14 @@ class MagicDirective {
3008
2972
  }
3009
2973
  MagicDirective.opened = false;
3010
2974
  MagicDirective.noOfAutoCompleteBoxesOpened = 0;
3011
- MagicDirective.ɵfac = function MagicDirective_Factory(t) { return new (t || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$1.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
2975
+ MagicDirective.ɵfac = function MagicDirective_Factory(t) { return new (t || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
3012
2976
  MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
3013
2977
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
3014
2978
  type: Directive,
3015
2979
  args: [{
3016
2980
  selector: "[magic]"
3017
2981
  }]
3018
- }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$1.Platform }, { type: RowMagicDirective, decorators: [{
2982
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
3019
2983
  type: Optional
3020
2984
  }] }]; }, { magic: [{
3021
2985
  type: Input,
@@ -3028,8 +2992,8 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
3028
2992
  }] }); })();
3029
2993
 
3030
2994
  class NoControlMagicDirective extends MagicDirective {
3031
- constructor(_task, element, renderer, vcRef, platform, magicRow) {
3032
- super(_task, element, renderer, vcRef, platform, magicRow);
2995
+ constructor(_task, element, renderer, vcRef, magicRow) {
2996
+ super(_task, element, renderer, vcRef, magicRow);
3033
2997
  }
3034
2998
  set magic(val) { this.id = val; this.selector = 'magicnc'; }
3035
2999
  ;
@@ -3193,14 +3157,14 @@ class NoControlMagicDirective extends MagicDirective {
3193
3157
  }
3194
3158
  }
3195
3159
  }
3196
- NoControlMagicDirective.ɵfac = function NoControlMagicDirective_Factory(t) { return new (t || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$1.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
3160
+ NoControlMagicDirective.ɵfac = function NoControlMagicDirective_Factory(t) { return new (t || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
3197
3161
  NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [i0.ɵɵInheritDefinitionFeature] });
3198
3162
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoControlMagicDirective, [{
3199
3163
  type: Directive,
3200
3164
  args: [{
3201
3165
  selector: '[magicnc]'
3202
3166
  }]
3203
- }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$1.Platform }, { type: RowMagicDirective, decorators: [{
3167
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
3204
3168
  type: Optional
3205
3169
  }] }]; }, { magic: [{
3206
3170
  type: Input,
@@ -3897,7 +3861,7 @@ class MagicShellComponent {
3897
3861
  this.engineMagicService.TerminateContextUsingFetchAPI();
3898
3862
  }
3899
3863
  ngAfterViewInit() {
3900
- this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement, this.changeDetectorRef);
3864
+ this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement);
3901
3865
  this.engineMagicService.startMagicEngine(this.httpClient);
3902
3866
  }
3903
3867
  setViewContainerRef(vcRef) {
@@ -4467,11 +4431,11 @@ class MgDateAdapter extends NativeDateAdapter {
4467
4431
  }
4468
4432
  }
4469
4433
  }
4470
- MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i2$1.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
4434
+ MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
4471
4435
  MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
4472
4436
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
4473
4437
  type: Injectable
4474
- }], function () { return [{ type: i2$1.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
4438
+ }], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
4475
4439
  type: Inject,
4476
4440
  args: [MAT_DATE_LOCALE]
4477
4441
  }] }]; }, null); })();