@magic-xpa/angular 4.1000.0-dev4100.405 → 4.1000.0-dev4100.408
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/README.md +5 -5
- package/esm2020/src/services/OverlayWindowService.mjs +9 -37
- package/esm2020/src/services/magic-color.service.mjs +1 -1
- package/esm2020/src/services/subform.magic.service.mjs +1 -1
- package/esm2020/src/services/table.magic.service.mjs +1 -1
- package/esm2020/src/ui/GuiInteractiveExecutor.mjs +1 -8
- package/esm2020/src/ui/components/base-magic-alert.component.mjs +1 -1
- package/esm2020/src/ui/components/base-magic-confirm.component.mjs +1 -1
- package/esm2020/src/ui/components/magic-alert.component.mjs +8 -8
- package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +11 -11
- package/esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs +6 -8
- package/esm2020/src/ui/directives/magic-focus.directive.mjs +1 -1
- package/esm2020/src/ui/directives/magic.directive.mjs +5 -10
- package/esm2020/src/ui/directives/magicViewContainerRef.directive.mjs +1 -1
- package/esm2020/src/ui/magic-root.component.mjs +2 -2
- package/fesm2015/magic-xpa-angular.mjs +32 -68
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +32 -68
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/src/services/OverlayWindowService.d.ts +3 -9
- package/src/ui/GuiInteractiveExecutor.d.ts +0 -1
- package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +2 -3
- package/src/ui/directives/magic.directive.d.ts +2 -4
@@ -18,9 +18,9 @@ import * as i1$1 from '@angular/platform-browser';
|
|
18
18
|
import { maskitoTimeOptionsGenerator } from '@maskito/kit';
|
19
19
|
import * as i1$2 from '@angular/common/http';
|
20
20
|
import { HttpClientModule } from '@angular/common/http';
|
21
|
-
import * as i2$1 from '@angular/cdk/platform';
|
22
21
|
import { MaskitoModule } from '@maskito/angular';
|
23
22
|
import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
23
|
+
import * as i1$3 from '@angular/cdk/platform';
|
24
24
|
|
25
25
|
class ControlMetadata {
|
26
26
|
constructor() {
|
@@ -734,9 +734,6 @@ class GuiInteractiveExecutor {
|
|
734
734
|
case InteractiveCommandType.GET_LAST_ROUTE:
|
735
735
|
this.OnGetLastRoute();
|
736
736
|
break;
|
737
|
-
case InteractiveCommandType.OPEN_FORM:
|
738
|
-
this.OnOpenForm();
|
739
|
-
break;
|
740
737
|
}
|
741
738
|
}
|
742
739
|
catch (ex) {
|
@@ -778,10 +775,6 @@ class GuiInteractiveExecutor {
|
|
778
775
|
OnMessageBox() {
|
779
776
|
this.overlayService.openConfirmationBox(this.command._mgValue.title, this.command._mgValue.str, this.command._mgValue.style);
|
780
777
|
}
|
781
|
-
OnOpenForm() {
|
782
|
-
if (this.command._boolVal)
|
783
|
-
this.overlayService.loadAndOpenModule(this.command.controlName, this.command._mgValue.str, this.command._mgValue.path);
|
784
|
-
}
|
785
778
|
OnSetTitle() {
|
786
779
|
this.task.setTitle(this.command._mgValue.title);
|
787
780
|
}
|
@@ -1273,13 +1266,13 @@ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent,
|
|
1273
1266
|
(function () {
|
1274
1267
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAlertComponent, [{
|
1275
1268
|
type: Component,
|
1276
|
-
args: [{ selector: 'sample-magic-alert-component', template: `<div>
|
1277
|
-
<div class="mg-message-background">
|
1278
|
-
<h2> {{title}}</h2>
|
1279
|
-
<p>{{message}} </p>
|
1280
|
-
|
1281
|
-
<button (click)="OnClose()">OK</button>
|
1282
|
-
</div>
|
1269
|
+
args: [{ selector: 'sample-magic-alert-component', template: `<div>
|
1270
|
+
<div class="mg-message-background">
|
1271
|
+
<h2> {{title}}</h2>
|
1272
|
+
<p>{{message}} </p>
|
1273
|
+
|
1274
|
+
<button (click)="OnClose()">OK</button>
|
1275
|
+
</div>
|
1283
1276
|
</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"] }]
|
1284
1277
|
}], null, null);
|
1285
1278
|
})();
|
@@ -1313,16 +1306,16 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
|
|
1313
1306
|
(function () {
|
1314
1307
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
|
1315
1308
|
type: Component,
|
1316
|
-
args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
|
1317
|
-
<div class="mg-message-background">
|
1318
|
-
<h2> {{title}}</h2>
|
1319
|
-
{{message}}
|
1320
|
-
<br>
|
1321
|
-
<br>
|
1322
|
-
|
1323
|
-
<button (click)="OnClose(true)">OK</button>
|
1324
|
-
<button class="cancel" (click)="OnClose(false)">Cancel</button>
|
1325
|
-
</div>
|
1309
|
+
args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
|
1310
|
+
<div class="mg-message-background">
|
1311
|
+
<h2> {{title}}</h2>
|
1312
|
+
{{message}}
|
1313
|
+
<br>
|
1314
|
+
<br>
|
1315
|
+
|
1316
|
+
<button (click)="OnClose(true)">OK</button>
|
1317
|
+
<button class="cancel" (click)="OnClose(false)">Cancel</button>
|
1318
|
+
</div>
|
1326
1319
|
</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"] }]
|
1327
1320
|
}], null, null);
|
1328
1321
|
})();
|
@@ -1347,42 +1340,17 @@ ConfirmationComponentsMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: Co
|
|
1347
1340
|
})();
|
1348
1341
|
|
1349
1342
|
class OverlayWindowService {
|
1350
|
-
constructor(componentFactoryResolver, componentList, engineMagicService,
|
1343
|
+
constructor(componentFactoryResolver, componentList, engineMagicService, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
|
1351
1344
|
this.componentFactoryResolver = componentFactoryResolver;
|
1352
1345
|
this.componentList = componentList;
|
1353
1346
|
this.engineMagicService = engineMagicService;
|
1354
|
-
this.magicLazyModuleLoader = magicLazyModuleLoader;
|
1355
|
-
this.injector = injector;
|
1356
|
-
this.compiler = compiler;
|
1357
1347
|
this.overlayContainerMagicProvider = overlayContainerMagicProvider;
|
1358
1348
|
this.confirmationComponentsMagicProvider = confirmationComponentsMagicProvider;
|
1359
1349
|
this.overlayWindowFocusManager = null;
|
1360
|
-
this.changeDetectorRef = null;
|
1361
1350
|
}
|
1362
|
-
init(overlayWindowsContainerViewRef, rootMagicElement
|
1351
|
+
init(overlayWindowsContainerViewRef, rootMagicElement) {
|
1363
1352
|
this.overlayWindowsContainerViewRef = overlayWindowsContainerViewRef;
|
1364
1353
|
this.overlayWindowFocusManager = new OverlayWindowFocusManager(rootMagicElement);
|
1365
|
-
this.changeDetectorRef = changeDetectorRef;
|
1366
|
-
}
|
1367
|
-
loadAndOpenModule(formName, taskId, taskDescription) {
|
1368
|
-
let moduleRef = this.componentList.getModuleRef(formName);
|
1369
|
-
if (moduleRef == null) {
|
1370
|
-
let lazyLoadModule = this.componentList.getLazyLoadModuleData(formName);
|
1371
|
-
if (lazyLoadModule != null) {
|
1372
|
-
let moduleName = lazyLoadModule.moduleName.replace("Magic", "");
|
1373
|
-
moduleName = moduleName.replace("Module", "");
|
1374
|
-
this.magicLazyModuleLoader.Load(moduleName).then(m => {
|
1375
|
-
const compiled = this.compiler.compileModuleAndAllComponentsSync(m[lazyLoadModule.moduleName]);
|
1376
|
-
moduleRef = compiled.ngModuleFactory.create(this.injector);
|
1377
|
-
this.open(formName, taskId, taskDescription);
|
1378
|
-
this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);
|
1379
|
-
});
|
1380
|
-
}
|
1381
|
-
}
|
1382
|
-
else {
|
1383
|
-
this.open(formName, taskId, taskDescription);
|
1384
|
-
this.finishConfirmation(Styles.MSGBOX_BUTTON_OK, true);
|
1385
|
-
}
|
1386
1354
|
}
|
1387
1355
|
open(formName, taskId, taskDescription) {
|
1388
1356
|
let comp = this.componentList.lazyLoadModulesMap != null && this.componentList.lazyLoadModulesMap.hasOwnProperty(formName) ? null : this.componentList.getComponent(formName);
|
@@ -1393,7 +1361,6 @@ class OverlayWindowService {
|
|
1393
1361
|
guiEvent.TaskID = taskId;
|
1394
1362
|
this.engineMagicService.insertEvent(guiEvent);
|
1395
1363
|
});
|
1396
|
-
this.changeDetectorRef.detectChanges();
|
1397
1364
|
}
|
1398
1365
|
close(commandStr) {
|
1399
1366
|
this.overlayWindowsContainerViewRef.remove();
|
@@ -1439,7 +1406,7 @@ class OverlayWindowService {
|
|
1439
1406
|
return componentRef;
|
1440
1407
|
}
|
1441
1408
|
}
|
1442
|
-
OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(
|
1409
|
+
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)); };
|
1443
1410
|
OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac, providedIn: 'root' });
|
1444
1411
|
(function () {
|
1445
1412
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayWindowService, [{
|
@@ -1447,7 +1414,7 @@ OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowServ
|
|
1447
1414
|
args: [{
|
1448
1415
|
providedIn: 'root'
|
1449
1416
|
}]
|
1450
|
-
}], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type:
|
1417
|
+
}], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null);
|
1451
1418
|
})();
|
1452
1419
|
class OverlayWindowFocusManager {
|
1453
1420
|
constructor(rootMagicElement) {
|
@@ -2888,12 +2855,11 @@ class MagicDirective {
|
|
2888
2855
|
this.eventsOnlyVal = true;
|
2889
2856
|
}
|
2890
2857
|
;
|
2891
|
-
constructor(_task, element, renderer, vcRef,
|
2858
|
+
constructor(_task, element, renderer, vcRef, magicRow) {
|
2892
2859
|
this._task = _task;
|
2893
2860
|
this.element = element;
|
2894
2861
|
this.renderer = renderer;
|
2895
2862
|
this.vcRef = vcRef;
|
2896
|
-
this.platform = platform;
|
2897
2863
|
this.magicRow = magicRow;
|
2898
2864
|
this.eventHandlers = {};
|
2899
2865
|
this.eventsOnlyVal = false;
|
@@ -2915,8 +2881,6 @@ class MagicDirective {
|
|
2915
2881
|
let fromButton = false;
|
2916
2882
|
if (this.htmlElement instanceof HTMLButtonElement)
|
2917
2883
|
fromButton = true;
|
2918
|
-
if (fromButton && (this.platform.IOS || this.platform.SAFARI))
|
2919
|
-
this.task.insertEvent(getGuiEventObj("focus", this.id, +this.rowId));
|
2920
2884
|
this.task.insertEvent(getGuiEventObj(event, this.id, +this.rowId, fromButton));
|
2921
2885
|
if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)
|
2922
2886
|
e.cancelBubble = true;
|
@@ -3058,7 +3022,7 @@ class MagicDirective {
|
|
3058
3022
|
}
|
3059
3023
|
MagicDirective.opened = false;
|
3060
3024
|
MagicDirective.noOfAutoCompleteBoxesOpened = 0;
|
3061
|
-
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(
|
3025
|
+
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)); };
|
3062
3026
|
MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
|
3063
3027
|
(function () {
|
3064
3028
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
|
@@ -3067,7 +3031,7 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3067
3031
|
selector: "[magic]"
|
3068
3032
|
}]
|
3069
3033
|
}], function () {
|
3070
|
-
return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type:
|
3034
|
+
return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
3071
3035
|
type: Optional
|
3072
3036
|
}] }];
|
3073
3037
|
}, { magic: [{
|
@@ -3084,8 +3048,8 @@ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors:
|
|
3084
3048
|
class NoControlMagicDirective extends MagicDirective {
|
3085
3049
|
set magic(val) { this.id = val; this.selector = 'magicnc'; }
|
3086
3050
|
;
|
3087
|
-
constructor(_task, element, renderer, vcRef,
|
3088
|
-
super(_task, element, renderer, vcRef,
|
3051
|
+
constructor(_task, element, renderer, vcRef, magicRow) {
|
3052
|
+
super(_task, element, renderer, vcRef, magicRow);
|
3089
3053
|
}
|
3090
3054
|
regEvents() {
|
3091
3055
|
super.regEvents();
|
@@ -3247,7 +3211,7 @@ class NoControlMagicDirective extends MagicDirective {
|
|
3247
3211
|
}
|
3248
3212
|
}
|
3249
3213
|
}
|
3250
|
-
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(
|
3214
|
+
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)); };
|
3251
3215
|
NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [i0.ɵɵInheritDefinitionFeature] });
|
3252
3216
|
(function () {
|
3253
3217
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoControlMagicDirective, [{
|
@@ -3256,7 +3220,7 @@ NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDir
|
|
3256
3220
|
selector: '[magicnc]'
|
3257
3221
|
}]
|
3258
3222
|
}], function () {
|
3259
|
-
return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type:
|
3223
|
+
return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
|
3260
3224
|
type: Optional
|
3261
3225
|
}] }];
|
3262
3226
|
}, { magic: [{
|
@@ -4242,7 +4206,7 @@ class MagicShellComponent {
|
|
4242
4206
|
this.engineMagicService.TerminateContextUsingFetchAPI();
|
4243
4207
|
}
|
4244
4208
|
ngAfterViewInit() {
|
4245
|
-
this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement
|
4209
|
+
this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement);
|
4246
4210
|
this.engineMagicService.startMagicEngine(this.httpClient);
|
4247
4211
|
}
|
4248
4212
|
setViewContainerRef(vcRef) {
|
@@ -4849,13 +4813,13 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4849
4813
|
}
|
4850
4814
|
}
|
4851
4815
|
}
|
4852
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(
|
4816
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4853
4817
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4854
4818
|
(function () {
|
4855
4819
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4856
4820
|
type: Injectable
|
4857
4821
|
}], function () {
|
4858
|
-
return [{ type:
|
4822
|
+
return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4859
4823
|
type: Inject,
|
4860
4824
|
args: [MAT_DATE_LOCALE]
|
4861
4825
|
}] }];
|