@churchillliving/se-ui-toolkit 6.53.409 → 6.53.411
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/bundles/churchillliving-se-ui-toolkit.umd.js +46 -9
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/churchillliving-se-ui-toolkit.metadata.json +1 -1
- package/esm2015/lib/components/base/sidebar/sidebar.component.js +44 -9
- package/esm2015/lib/services/sidebar.service.js +2 -2
- package/fesm2015/churchillliving-se-ui-toolkit.js +44 -9
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/sidebar/sidebar.component.d.ts +3 -1
- package/lib/services/sidebar.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8376,7 +8376,7 @@
|
|
|
8376
8376
|
SideBarService.prototype.attachComponentContainer = function (outlet, menu) {
|
|
8377
8377
|
var containerPortal = new portal.ComponentPortal(menu.component, null);
|
|
8378
8378
|
var containerRef = outlet.attach(containerPortal);
|
|
8379
|
-
|
|
8379
|
+
containerRef.instance.config = menu.data;
|
|
8380
8380
|
};
|
|
8381
8381
|
SideBarService.prototype.getStyleSheetElement = function () {
|
|
8382
8382
|
var styleSheetElement = document.createElement('link');
|
|
@@ -8414,6 +8414,7 @@
|
|
|
8414
8414
|
this.hyperlinkService = hyperlinkService;
|
|
8415
8415
|
this.sidebarService = sidebarService;
|
|
8416
8416
|
this.toggleMenu = false;
|
|
8417
|
+
this.loadComponentName = '';
|
|
8417
8418
|
this.openDialogs = [];
|
|
8418
8419
|
this.navHidden = false;
|
|
8419
8420
|
this.collapseSidebar = false;
|
|
@@ -8432,7 +8433,27 @@
|
|
|
8432
8433
|
enumerable: false,
|
|
8433
8434
|
configurable: true
|
|
8434
8435
|
});
|
|
8435
|
-
SidebarComponent.prototype.ngOnInit = function () {
|
|
8436
|
+
SidebarComponent.prototype.ngOnInit = function () {
|
|
8437
|
+
var _a, _b;
|
|
8438
|
+
if ((_a = this.router.url.toString()) === null || _a === void 0 ? void 0 : _a.includes('temp_comp=')) {
|
|
8439
|
+
var componentName = (_b = this.router.url) === null || _b === void 0 ? void 0 : _b.split('temp_comp=')[1];
|
|
8440
|
+
if (componentName) {
|
|
8441
|
+
this.loadComponentName = componentName;
|
|
8442
|
+
}
|
|
8443
|
+
}
|
|
8444
|
+
if (this.loadComponentName) {
|
|
8445
|
+
this.openDynamicComponetonLoad();
|
|
8446
|
+
}
|
|
8447
|
+
};
|
|
8448
|
+
SidebarComponent.prototype.openDynamicComponetonLoad = function () {
|
|
8449
|
+
var _this = this;
|
|
8450
|
+
var _a;
|
|
8451
|
+
(_a = this.sidebarItemsList) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
|
|
8452
|
+
if (item.action === exports.ESidebarAction.OPENDIALOG && exports.ESidebarTarget.BLANK && item.component.name === _this.loadComponentName) {
|
|
8453
|
+
_this.navigateComponentToNewTab(item, false);
|
|
8454
|
+
}
|
|
8455
|
+
});
|
|
8456
|
+
};
|
|
8436
8457
|
SidebarComponent.prototype.initializeSideBar = function () {
|
|
8437
8458
|
var _this = this;
|
|
8438
8459
|
this.roles = this.authService.getUserRoles();
|
|
@@ -8478,16 +8499,32 @@
|
|
|
8478
8499
|
console.log('menu items', this.menuItems);
|
|
8479
8500
|
};
|
|
8480
8501
|
//ref link: https://medium.com/@saranya.thangaraj/open-angular-component-in-a-new-tab-without-bootstrapping-the-whole-app-again-e329af460e92
|
|
8481
|
-
SidebarComponent.prototype.navigateComponentToNewTab = function (menu) {
|
|
8502
|
+
SidebarComponent.prototype.navigateComponentToNewTab = function (menu, onNewTab) {
|
|
8482
8503
|
var _this = this;
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8504
|
+
if (onNewTab === void 0) { onNewTab = true; }
|
|
8505
|
+
var _a, _b;
|
|
8506
|
+
var windowRef = window;
|
|
8507
|
+
var winRef;
|
|
8508
|
+
if (onNewTab) {
|
|
8509
|
+
winRef = window.open();
|
|
8510
|
+
if (winRef.location.href === 'about:blank') {
|
|
8511
|
+
if (this.router.url && ((_b = (_a = this.router.url) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.includes('?'))) {
|
|
8512
|
+
winRef.location.href = this.router.url + '&&temp_comp=' + menu.component.name;
|
|
8513
|
+
}
|
|
8514
|
+
else {
|
|
8515
|
+
winRef.location.href = this.router.url + "?temp_comp=" + menu.component.name;
|
|
8516
|
+
}
|
|
8517
|
+
}
|
|
8486
8518
|
}
|
|
8487
8519
|
// Wait for window instance to be created
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8520
|
+
if (onNewTab) {
|
|
8521
|
+
setTimeout(function () {
|
|
8522
|
+
_this.sidebarService.createWindowInstance(menu, winRef);
|
|
8523
|
+
}, 900);
|
|
8524
|
+
}
|
|
8525
|
+
else {
|
|
8526
|
+
this.sidebarService.createWindowInstance(menu, windowRef);
|
|
8527
|
+
}
|
|
8491
8528
|
};
|
|
8492
8529
|
SidebarComponent.prototype.setMenuTitle = function (x) {
|
|
8493
8530
|
return x.tooltip ? x.tooltip : !x.label ? x.section : '';
|