@churchillliving/se-ui-toolkit 6.53.499 → 6.53.500

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.
@@ -879,7 +879,7 @@
879
879
  url.search(lowerKey) > 0 &&
880
880
  paramValue &&
881
881
  paramValue.length > 0) {
882
- url = url.replace("{{" + /lowerKey/gi + "}}", params[paramKey]);
882
+ url = url.replace('{{' + lowerKey + '}}', params[paramKey]);
883
883
  }
884
884
  }
885
885
  return url;
@@ -8414,70 +8414,8 @@
8414
8414
  ESidebarAction["IFRAME"] = "_iframe";
8415
8415
  })(exports.ESidebarAction || (exports.ESidebarAction = {}));
8416
8416
 
8417
- var SideBarService = /** @class */ (function () {
8418
- function SideBarService(injector, componentFactoryResolver, applicationRef) {
8419
- this.injector = injector;
8420
- this.componentFactoryResolver = componentFactoryResolver;
8421
- this.applicationRef = applicationRef;
8422
- }
8423
- /**
8424
- * Checks parent menu and expands it if current route exists in its child menus.
8425
- * @param menuLabel
8426
- * @returns {boolean}
8427
- */
8428
- SideBarService.prototype.isMenuExpanded = function (currentRoute, items, menuLabel) {
8429
- var _a, _b;
8430
- if (items && items.length) {
8431
- // check currentRoute contains loadDataForEdit or not
8432
- currentRoute = currentRoute.includes('?') ? currentRoute.split('?')[0] : currentRoute;
8433
- var detailPage_1 = '';
8434
- if ((_a = currentRoute === null || currentRoute === void 0 ? void 0 : currentRoute.toString()) === null || _a === void 0 ? void 0 : _a.includes("list")) {
8435
- detailPage_1 = currentRoute.replace('list', 'detail');
8436
- }
8437
- var currentIndex = items.findIndex(function (menu) { var _a; return ((_a = menu.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (menuLabel === null || menuLabel === void 0 ? void 0 : menuLabel.toLowerCase()); });
8438
- var matchedItems = [];
8439
- if (currentIndex > -1) {
8440
- matchedItems = (_b = items[currentIndex]) === null || _b === void 0 ? void 0 : _b.items;
8441
- }
8442
- return matchedItems.length > 0 ? matchedItems.some(function (item) { return item.routerLink && (currentRoute === item.routerLink[0] || currentRoute === detailPage_1); }) : false;
8443
- }
8444
- return false;
8445
- };
8446
- SideBarService.prototype.setSidebarPropValues = function (sidebar, section, props) {
8447
- sidebar.map(function (sidebarItem) {
8448
- var _a;
8449
- if (((_a = sidebarItem.section) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === section.toLowerCase()) {
8450
- props.map(function (prop) {
8451
- var _a, _b;
8452
- if (((_a = prop.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'data' && ((_b = sidebarItem.data) === null || _b === void 0 ? void 0 : _b.data)) {
8453
- sidebarItem.data.data = prop.value;
8454
- }
8455
- else {
8456
- setPropValue(sidebarItem, prop);
8457
- }
8458
- });
8459
- }
8460
- });
8461
- sidebar = __spreadArray([], __read(sidebar));
8462
- return sidebar;
8463
- };
8464
- return SideBarService;
8465
- }());
8466
- /** @nocollapse */ SideBarService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SideBarService_Factory() { return new SideBarService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵinject(i0__namespace.ApplicationRef)); }, token: SideBarService, providedIn: "root" });
8467
- SideBarService.decorators = [
8468
- { type: i0.Injectable, args: [{
8469
- providedIn: 'root',
8470
- },] }
8471
- ];
8472
- /** @nocollapse */
8473
- SideBarService.ctorParameters = function () { return [
8474
- { type: i0.Injector },
8475
- { type: i0.ComponentFactoryResolver },
8476
- { type: i0.ApplicationRef }
8477
- ]; };
8478
-
8479
8417
  var SidebarComponent = /** @class */ (function () {
8480
- function SidebarComponent(instance, authService, dialogService, router, route, pageLoggerService, hyperlinkService, sidebarService) {
8418
+ function SidebarComponent(instance, authService, dialogService, router, route, pageLoggerService, hyperlinkService, alertService) {
8481
8419
  this.instance = instance;
8482
8420
  this.authService = authService;
8483
8421
  this.dialogService = dialogService;
@@ -8485,7 +8423,7 @@
8485
8423
  this.route = route;
8486
8424
  this.pageLoggerService = pageLoggerService;
8487
8425
  this.hyperlinkService = hyperlinkService;
8488
- this.sidebarService = sidebarService;
8426
+ this.alertService = alertService;
8489
8427
  this.toggleMenu = false;
8490
8428
  this.loadComponentName = '';
8491
8429
  this.openDialogs = [];
@@ -8581,6 +8519,23 @@
8581
8519
  }); });
8582
8520
  };
8583
8521
  SidebarComponent.prototype.loadIFrame = function (menu, item) {
8522
+ var _this = this;
8523
+ if (menu.iFrame.linkId) {
8524
+ this.hyperlinkService.buildUrl(menu.iFrame.linkId, menu === null || menu === void 0 ? void 0 : menu.params).then(function (res) {
8525
+ if (res) {
8526
+ menu.iFrame['link'] = res;
8527
+ _this.loadIFrameData(menu, item);
8528
+ }
8529
+ else {
8530
+ _this.alertService.error("No Link Found Against this linkId");
8531
+ }
8532
+ });
8533
+ }
8534
+ else {
8535
+ this.loadIFrameData(menu, item);
8536
+ }
8537
+ };
8538
+ SidebarComponent.prototype.loadIFrameData = function (menu, item) {
8584
8539
  var _this = this;
8585
8540
  var _a, _b, _c, _d;
8586
8541
  if (menu) {
@@ -8802,7 +8757,7 @@
8802
8757
  { type: i6.ActivatedRoute },
8803
8758
  { type: PageLoggerService },
8804
8759
  { type: HyperlinkService },
8805
- { type: SideBarService }
8760
+ { type: AlertService }
8806
8761
  ]; };
8807
8762
  SidebarComponent.propDecorators = {
8808
8763
  navHidden: [{ type: i0.Input }],
@@ -10427,6 +10382,68 @@
10427
10382
  EHeaderFormatType["DECIMAL"] = "decimal";
10428
10383
  })(exports.EHeaderFormatType || (exports.EHeaderFormatType = {}));
10429
10384
 
10385
+ var SideBarService = /** @class */ (function () {
10386
+ function SideBarService(injector, componentFactoryResolver, applicationRef) {
10387
+ this.injector = injector;
10388
+ this.componentFactoryResolver = componentFactoryResolver;
10389
+ this.applicationRef = applicationRef;
10390
+ }
10391
+ /**
10392
+ * Checks parent menu and expands it if current route exists in its child menus.
10393
+ * @param menuLabel
10394
+ * @returns {boolean}
10395
+ */
10396
+ SideBarService.prototype.isMenuExpanded = function (currentRoute, items, menuLabel) {
10397
+ var _a, _b;
10398
+ if (items && items.length) {
10399
+ // check currentRoute contains loadDataForEdit or not
10400
+ currentRoute = currentRoute.includes('?') ? currentRoute.split('?')[0] : currentRoute;
10401
+ var detailPage_1 = '';
10402
+ if ((_a = currentRoute === null || currentRoute === void 0 ? void 0 : currentRoute.toString()) === null || _a === void 0 ? void 0 : _a.includes("list")) {
10403
+ detailPage_1 = currentRoute.replace('list', 'detail');
10404
+ }
10405
+ var currentIndex = items.findIndex(function (menu) { var _a; return ((_a = menu.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (menuLabel === null || menuLabel === void 0 ? void 0 : menuLabel.toLowerCase()); });
10406
+ var matchedItems = [];
10407
+ if (currentIndex > -1) {
10408
+ matchedItems = (_b = items[currentIndex]) === null || _b === void 0 ? void 0 : _b.items;
10409
+ }
10410
+ return matchedItems.length > 0 ? matchedItems.some(function (item) { return item.routerLink && (currentRoute === item.routerLink[0] || currentRoute === detailPage_1); }) : false;
10411
+ }
10412
+ return false;
10413
+ };
10414
+ SideBarService.prototype.setSidebarPropValues = function (sidebar, section, props) {
10415
+ sidebar.map(function (sidebarItem) {
10416
+ var _a;
10417
+ if (((_a = sidebarItem.section) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === section.toLowerCase()) {
10418
+ props.map(function (prop) {
10419
+ var _a, _b;
10420
+ if (((_a = prop.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'data' && ((_b = sidebarItem.data) === null || _b === void 0 ? void 0 : _b.data)) {
10421
+ sidebarItem.data.data = prop.value;
10422
+ }
10423
+ else {
10424
+ setPropValue(sidebarItem, prop);
10425
+ }
10426
+ });
10427
+ }
10428
+ });
10429
+ sidebar = __spreadArray([], __read(sidebar));
10430
+ return sidebar;
10431
+ };
10432
+ return SideBarService;
10433
+ }());
10434
+ /** @nocollapse */ SideBarService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SideBarService_Factory() { return new SideBarService(i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵinject(i0__namespace.ApplicationRef)); }, token: SideBarService, providedIn: "root" });
10435
+ SideBarService.decorators = [
10436
+ { type: i0.Injectable, args: [{
10437
+ providedIn: 'root',
10438
+ },] }
10439
+ ];
10440
+ /** @nocollapse */
10441
+ SideBarService.ctorParameters = function () { return [
10442
+ { type: i0.Injector },
10443
+ { type: i0.ComponentFactoryResolver },
10444
+ { type: i0.ApplicationRef }
10445
+ ]; };
10446
+
10430
10447
  var HeaderService = /** @class */ (function () {
10431
10448
  function HeaderService() {
10432
10449
  }