@magic-xpa/angular 4.901.0-dev491.318 → 4.901.0-dev491.321
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/services/OverlayWindowService.mjs +37 -9
- package/esm2020/src/ui/GuiInteractiveExecutor.mjs +8 -1
- package/esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs +8 -6
- package/esm2020/src/ui/directives/magic.directive.mjs +10 -5
- package/esm2020/src/ui/magic-root.component.mjs +2 -2
- package/fesm2015/magic-xpa-angular.mjs +51 -15
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +51 -15
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/src/services/OverlayWindowService.d.ts +9 -3
- package/src/ui/GuiInteractiveExecutor.d.ts +1 -0
- package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +3 -2
- package/src/ui/directives/magic.directive.d.ts +4 -2
@@ -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';
|
20
21
|
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,6 +716,9 @@ 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;
|
719
722
|
}
|
720
723
|
}
|
721
724
|
catch (ex) {
|
@@ -752,6 +755,10 @@ class GuiInteractiveExecutor {
|
|
752
755
|
OnMessageBox() {
|
753
756
|
this.overlayService.openConfirmationBox(this.command._mgValue.title, this.command._mgValue.str, this.command._mgValue.style);
|
754
757
|
}
|
758
|
+
OnOpenForm() {
|
759
|
+
if (this.command._boolVal)
|
760
|
+
this.overlayService.loadAndOpenModule(this.command.controlName, this.command._mgValue.str, this.command._mgValue.path);
|
761
|
+
}
|
755
762
|
OnSetTitle() {
|
756
763
|
this.task.setTitle(this.command._mgValue.title);
|
757
764
|
}
|
@@ -1365,17 +1372,42 @@ class confirmationBox {
|
|
1365
1372
|
}
|
1366
1373
|
|
1367
1374
|
class OverlayWindowService {
|
1368
|
-
constructor(componentFactoryResolver, componentList, engineMagicService, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
|
1375
|
+
constructor(componentFactoryResolver, componentList, engineMagicService, magicLazyModuleLoader, injector, compiler, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
|
1369
1376
|
this.componentFactoryResolver = componentFactoryResolver;
|
1370
1377
|
this.componentList = componentList;
|
1371
1378
|
this.engineMagicService = engineMagicService;
|
1379
|
+
this.magicLazyModuleLoader = magicLazyModuleLoader;
|
1380
|
+
this.injector = injector;
|
1381
|
+
this.compiler = compiler;
|
1372
1382
|
this.overlayContainerMagicProvider = overlayContainerMagicProvider;
|
1373
1383
|
this.confirmationComponentsMagicProvider = confirmationComponentsMagicProvider;
|
1374
1384
|
this.overlayWindowFocusManager = null;
|
1385
|
+
this.changeDetectorRef = null;
|
1375
1386
|
}
|
1376
|
-
init(overlayWindowsContainerViewRef, rootMagicElement) {
|
1387
|
+
init(overlayWindowsContainerViewRef, rootMagicElement, changeDetectorRef) {
|
1377
1388
|
this.overlayWindowsContainerViewRef = overlayWindowsContainerViewRef;
|
1378
1389
|
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
|
+
}
|
1379
1411
|
}
|
1380
1412
|
open(formName, taskId, taskDescription) {
|
1381
1413
|
let comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null : this.componentList.getComponent(formName);
|
@@ -1386,6 +1418,7 @@ class OverlayWindowService {
|
|
1386
1418
|
guiEvent.TaskID = taskId;
|
1387
1419
|
this.engineMagicService.insertEvent(guiEvent);
|
1388
1420
|
});
|
1421
|
+
this.changeDetectorRef.detectChanges();
|
1389
1422
|
}
|
1390
1423
|
close(commandStr) {
|
1391
1424
|
this.overlayWindowsContainerViewRef.remove();
|
@@ -1431,14 +1464,14 @@ class OverlayWindowService {
|
|
1431
1464
|
return componentRef;
|
1432
1465
|
}
|
1433
1466
|
}
|
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)); };
|
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)); };
|
1435
1468
|
OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac, providedIn: 'root' });
|
1436
1469
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayWindowService, [{
|
1437
1470
|
type: Injectable,
|
1438
1471
|
args: [{
|
1439
1472
|
providedIn: 'root'
|
1440
1473
|
}]
|
1441
|
-
}], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null); })();
|
1474
|
+
}], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.Compiler }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null); })();
|
1442
1475
|
class OverlayWindowFocusManager {
|
1443
1476
|
constructor(rootMagicElement) {
|
1444
1477
|
this.rootMagicElement = null;
|
@@ -2795,11 +2828,12 @@ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, sele
|
|
2795
2828
|
}] }); })();
|
2796
2829
|
|
2797
2830
|
class MagicDirective {
|
2798
|
-
constructor(_task, element, renderer, vcRef, magicRow) {
|
2831
|
+
constructor(_task, element, renderer, vcRef, platform, magicRow) {
|
2799
2832
|
this._task = _task;
|
2800
2833
|
this.element = element;
|
2801
2834
|
this.renderer = renderer;
|
2802
2835
|
this.vcRef = vcRef;
|
2836
|
+
this.platform = platform;
|
2803
2837
|
this.magicRow = magicRow;
|
2804
2838
|
this.eventHandlers = {};
|
2805
2839
|
this.eventsOnlyVal = false;
|
@@ -2831,6 +2865,8 @@ class MagicDirective {
|
|
2831
2865
|
let fromButton = false;
|
2832
2866
|
if (this.htmlElement instanceof HTMLButtonElement)
|
2833
2867
|
fromButton = true;
|
2868
|
+
if (fromButton && (this.platform.IOS || this.platform.SAFARI))
|
2869
|
+
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2834
2870
|
this.task.insertEvent(getGuiEventObj(event, this.id, +this.rowId, fromButton));
|
2835
2871
|
if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)
|
2836
2872
|
e.cancelBubble = true;
|
@@ -2972,14 +3008,14 @@ class MagicDirective {
|
|
2972
3008
|
}
|
2973
3009
|
MagicDirective.opened = false;
|
2974
3010
|
MagicDirective.noOfAutoCompleteBoxesOpened = 0;
|
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)); };
|
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)); };
|
2976
3012
|
MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
|
2977
3013
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
2978
3014
|
type: Directive,
|
2979
3015
|
args: [{
|
2980
3016
|
selector: "[magic]"
|
2981
3017
|
}]
|
2982
|
-
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
3018
|
+
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$1.Platform }, { type: RowMagicDirective, decorators: [{
|
2983
3019
|
type: Optional
|
2984
3020
|
}] }]; }, { magic: [{
|
2985
3021
|
type: Input,
|
@@ -2992,8 +3028,8 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
2992
3028
|
}] }); })();
|
2993
3029
|
|
2994
3030
|
class NoControlMagicDirective extends MagicDirective {
|
2995
|
-
constructor(_task, element, renderer, vcRef, magicRow) {
|
2996
|
-
super(_task, element, renderer, vcRef, magicRow);
|
3031
|
+
constructor(_task, element, renderer, vcRef, platform, magicRow) {
|
3032
|
+
super(_task, element, renderer, vcRef, platform, magicRow);
|
2997
3033
|
}
|
2998
3034
|
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
2999
3035
|
;
|
@@ -3157,14 +3193,14 @@ class NoControlMagicDirective extends MagicDirective {
|
|
3157
3193
|
}
|
3158
3194
|
}
|
3159
3195
|
}
|
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)); };
|
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)); };
|
3161
3197
|
NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [i0.ɵɵInheritDefinitionFeature] });
|
3162
3198
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoControlMagicDirective, [{
|
3163
3199
|
type: Directive,
|
3164
3200
|
args: [{
|
3165
3201
|
selector: '[magicnc]'
|
3166
3202
|
}]
|
3167
|
-
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
3203
|
+
}], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$1.Platform }, { type: RowMagicDirective, decorators: [{
|
3168
3204
|
type: Optional
|
3169
3205
|
}] }]; }, { magic: [{
|
3170
3206
|
type: Input,
|
@@ -3861,7 +3897,7 @@ class MagicShellComponent {
|
|
3861
3897
|
this.engineMagicService.TerminateContextUsingFetchAPI();
|
3862
3898
|
}
|
3863
3899
|
ngAfterViewInit() {
|
3864
|
-
this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement);
|
3900
|
+
this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement, this.changeDetectorRef);
|
3865
3901
|
this.engineMagicService.startMagicEngine(this.httpClient);
|
3866
3902
|
}
|
3867
3903
|
setViewContainerRef(vcRef) {
|
@@ -4431,11 +4467,11 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4431
4467
|
}
|
4432
4468
|
}
|
4433
4469
|
}
|
4434
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(
|
4470
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i2$1.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4435
4471
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4436
4472
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4437
4473
|
type: Injectable
|
4438
|
-
}], function () { return [{ type:
|
4474
|
+
}], function () { return [{ type: i2$1.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4439
4475
|
type: Inject,
|
4440
4476
|
args: [MAT_DATE_LOCALE]
|
4441
4477
|
}] }]; }, null); })();
|