@magic-xpa/angular 4.1201.0 → 4.1300.0-dev4130.1

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 CHANGED
@@ -1,5 +1,5 @@
1
- # Magic-xpa/angular
2
-
3
- This package is part of Magic xpa Web Application Framework.
4
- It is used to easily create modern business apps powered by Angular to provide a rich user experience and meet the increasingly complex enterprise business expectations for digital transformation.
5
-
1
+ # Magic-xpa/angular
2
+
3
+ This package is part of Magic xpa Web Application Framework.
4
+ It is used to easily create modern business apps powered by Angular to provide a rich user experience and meet the increasingly complex enterprise business expectations for digital transformation.
5
+
@@ -11,7 +11,7 @@ import { DynamicModule } from 'ng-dynamic-component';
11
11
  import { InteractiveCommandType, HtmlProperties, OverlayType, Styles, GuiConstants, CommandType, PIC, GuiEnvironment, Events, Modifiers } from '@magic-xpa/gui';
12
12
  import { MagicBridge, getGuiEventObj, CookieService, Environment, LastFocusedManager } from '@magic-xpa/engine';
13
13
  import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, MsgInterface, BindingLevel, StorageAttributeType, MgControlType } from '@magic-xpa/utils';
14
- import { filter, map, debounceTime } from 'rxjs/operators';
14
+ import { filter, map, debounceTime, take } from 'rxjs/operators';
15
15
  import { Subject, EMPTY, fromEvent } from 'rxjs';
16
16
  import { __decorate, __metadata } from 'tslib';
17
17
  import * as i2$1 from '@angular/cdk/drag-drop';
@@ -1704,13 +1704,13 @@ class MagicAlertComponent extends BaseMagicAlertComponent {
1704
1704
  }
1705
1705
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAlertComponent, [{
1706
1706
  type: Component,
1707
- args: [{ selector: 'sample-magic-alert-component', template: `<div>
1708
- <div class="mg-message-background">
1709
- <h2> {{title}}</h2>
1710
- <p>{{message}} </p>
1711
-
1712
- <button (click)="OnClose()">OK</button>
1713
- </div>
1707
+ args: [{ selector: 'sample-magic-alert-component', template: `<div>
1708
+ <div class="mg-message-background">
1709
+ <h2> {{title}}</h2>
1710
+ <p>{{message}} </p>
1711
+
1712
+ <button (click)="OnClose()">OK</button>
1713
+ </div>
1714
1714
  </div>`, standalone: false, 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;-webkit-border-radius:4px;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}\n"] }]
1715
1715
  }], null, null); })();
1716
1716
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicAlertComponent, { className: "MagicAlertComponent", filePath: "src/ui/components/magic-alert.component.ts", lineNumber: 49 }); })();
@@ -1743,16 +1743,16 @@ class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
1743
1743
  }
1744
1744
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
1745
1745
  type: Component,
1746
- args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
1747
- <div class="mg-message-background">
1748
- <h2> {{title}}</h2>
1749
- {{message}}
1750
- <br>
1751
- <br>
1752
-
1753
- <button (click)="OnClose(true)">OK</button>
1754
- <button class="cancel" (click)="OnClose(false)">Cancel</button>
1755
- </div>
1746
+ args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
1747
+ <div class="mg-message-background">
1748
+ <h2> {{title}}</h2>
1749
+ {{message}}
1750
+ <br>
1751
+ <br>
1752
+
1753
+ <button (click)="OnClose(true)">OK</button>
1754
+ <button class="cancel" (click)="OnClose(false)">Cancel</button>
1755
+ </div>
1756
1756
  </div>`, standalone: false, 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;-webkit-border-radius:4px;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}button.cancel{background-color:#c1c1c1}\n"] }]
1757
1757
  }], null, null); })();
1758
1758
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicConfirmationBoxComponent, { className: "MagicConfirmationBoxComponent", filePath: "src/ui/components/magic-confirmation-box.component.ts", lineNumber: 55 }); })();
@@ -6085,22 +6085,29 @@ class MagicShellComponent {
6085
6085
  }
6086
6086
  ngAfterViewInit() {
6087
6087
  this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement, this.changeDetectorRef);
6088
- let subscription = this.router.events
6089
- .pipe(filter(e => e instanceof NavigationEnd))
6090
- .subscribe(e => {
6091
- if (this.router.navigated) {
6092
- const queryParams = this.route.snapshot.queryParams;
6093
- const queryParamsMap = new Map();
6094
- // Iterate over the queryParams object and populate the Map
6095
- for (const key in queryParams) {
6096
- if (queryParams.hasOwnProperty(key)) {
6097
- queryParamsMap.set(key, queryParams[key].toString());
6098
- }
6088
+ // Helper function to start the engine
6089
+ const startEngine = () => {
6090
+ const queryParams = this.route.snapshot.queryParams;
6091
+ const queryParamsMap = new Map();
6092
+ // Iterate over the queryParams object and populate the Map
6093
+ for (const key in queryParams) {
6094
+ if (queryParams.hasOwnProperty(key)) {
6095
+ queryParamsMap.set(key, queryParams[key].toString());
6099
6096
  }
6100
- this.engineMagicService.startMagicEngine(this.httpClient, queryParamsMap);
6101
- subscription.unsubscribe();
6102
6097
  }
6103
- });
6098
+ this.engineMagicService.startMagicEngine(this.httpClient, queryParamsMap);
6099
+ };
6100
+ // Check if navigation has already completed
6101
+ if (this.router.navigated) {
6102
+ // Navigation already happened, start the engine immediately
6103
+ startEngine();
6104
+ }
6105
+ else {
6106
+ // Navigation hasn't happened yet, wait for it
6107
+ this.router.events
6108
+ .pipe(filter(event => event instanceof NavigationEnd), take(1))
6109
+ .subscribe(() => startEngine());
6110
+ }
6104
6111
  }
6105
6112
  setViewContainerRef(vcRef) {
6106
6113
  this.overlayWindowsContainerViewRef = vcRef;