@churchillliving/se-ui-toolkit 6.53.498 → 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.
- package/bundles/churchillliving-se-ui-toolkit.umd.js +107 -89
- 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/grid/grid.component.js +25 -24
- package/esm2015/lib/components/base/sidebar/sidebar.component.js +21 -5
- package/esm2015/lib/models/sidebar.model.js +1 -1
- package/esm2015/lib/services/hyperlink.service.js +2 -2
- package/fesm2015/churchillliving-se-ui-toolkit.js +106 -89
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/sidebar/sidebar.component.d.ts +5 -4
- package/lib/models/sidebar.model.d.ts +1 -0
- package/package.json +1 -1
|
@@ -879,7 +879,7 @@
|
|
|
879
879
|
url.search(lowerKey) > 0 &&
|
|
880
880
|
paramValue &&
|
|
881
881
|
paramValue.length > 0) {
|
|
882
|
-
url = url.replace(
|
|
882
|
+
url = url.replace('{{' + lowerKey + '}}', params[paramKey]);
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
885
|
return url;
|
|
@@ -5988,29 +5988,30 @@
|
|
|
5988
5988
|
};
|
|
5989
5989
|
// Invoke onClick Event.
|
|
5990
5990
|
GridComponent.prototype.onClickEvent = function (column, row) {
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
5991
|
+
var _a, _b, _c, _d;
|
|
5992
|
+
if (column.type === exports.EGridColumnType.LINK && (column.editLink === false || column.editLink === undefined) && column.editable !== true && column.disabled !== true) {
|
|
5993
|
+
if (column && column.onClick && column.disabled !== true && ((_b = (_a = row[column.field + '_obj']) === null || _a === void 0 ? void 0 : _a.action) === null || _b === void 0 ? void 0 : _b.disabled) !== true) {
|
|
5994
|
+
column.onClick(row);
|
|
5995
|
+
}
|
|
5996
|
+
else {
|
|
5997
|
+
var a = document.createElement('a');
|
|
5998
|
+
a.href = (_c = row[column.field + '_obj']) === null || _c === void 0 ? void 0 : _c.hyperlink;
|
|
5999
|
+
a.target = column.target ? column.target : '_blank',
|
|
6000
|
+
a.click();
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
if (column.type === exports.EGridColumnType.DATE && row[column.field]) {
|
|
6004
|
+
this.calenderPreviousValue = row[column.field];
|
|
6005
|
+
}
|
|
6006
|
+
else if (!row[column.field] &&
|
|
6007
|
+
column.type === exports.EGridColumnType.DATE &&
|
|
6008
|
+
(column.showTime || column.timeOnly) &&
|
|
6009
|
+
column.minutesInterval) {
|
|
6010
|
+
this.defaultDate = new Date(setMinutesInterval(new Date()));
|
|
6011
|
+
}
|
|
6012
|
+
if (column && column.onClick && column.disabled !== true && ((_d = row[column.field + '_obj']) === null || _d === void 0 ? void 0 : _d.disabled) !== true) {
|
|
6013
|
+
column.onClick(row);
|
|
6014
|
+
}
|
|
6014
6015
|
};
|
|
6015
6016
|
// set the select value of multi-select
|
|
6016
6017
|
GridComponent.prototype.showOption = function (column, row) {
|
|
@@ -8413,70 +8414,8 @@
|
|
|
8413
8414
|
ESidebarAction["IFRAME"] = "_iframe";
|
|
8414
8415
|
})(exports.ESidebarAction || (exports.ESidebarAction = {}));
|
|
8415
8416
|
|
|
8416
|
-
var SideBarService = /** @class */ (function () {
|
|
8417
|
-
function SideBarService(injector, componentFactoryResolver, applicationRef) {
|
|
8418
|
-
this.injector = injector;
|
|
8419
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
8420
|
-
this.applicationRef = applicationRef;
|
|
8421
|
-
}
|
|
8422
|
-
/**
|
|
8423
|
-
* Checks parent menu and expands it if current route exists in its child menus.
|
|
8424
|
-
* @param menuLabel
|
|
8425
|
-
* @returns {boolean}
|
|
8426
|
-
*/
|
|
8427
|
-
SideBarService.prototype.isMenuExpanded = function (currentRoute, items, menuLabel) {
|
|
8428
|
-
var _a, _b;
|
|
8429
|
-
if (items && items.length) {
|
|
8430
|
-
// check currentRoute contains loadDataForEdit or not
|
|
8431
|
-
currentRoute = currentRoute.includes('?') ? currentRoute.split('?')[0] : currentRoute;
|
|
8432
|
-
var detailPage_1 = '';
|
|
8433
|
-
if ((_a = currentRoute === null || currentRoute === void 0 ? void 0 : currentRoute.toString()) === null || _a === void 0 ? void 0 : _a.includes("list")) {
|
|
8434
|
-
detailPage_1 = currentRoute.replace('list', 'detail');
|
|
8435
|
-
}
|
|
8436
|
-
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()); });
|
|
8437
|
-
var matchedItems = [];
|
|
8438
|
-
if (currentIndex > -1) {
|
|
8439
|
-
matchedItems = (_b = items[currentIndex]) === null || _b === void 0 ? void 0 : _b.items;
|
|
8440
|
-
}
|
|
8441
|
-
return matchedItems.length > 0 ? matchedItems.some(function (item) { return item.routerLink && (currentRoute === item.routerLink[0] || currentRoute === detailPage_1); }) : false;
|
|
8442
|
-
}
|
|
8443
|
-
return false;
|
|
8444
|
-
};
|
|
8445
|
-
SideBarService.prototype.setSidebarPropValues = function (sidebar, section, props) {
|
|
8446
|
-
sidebar.map(function (sidebarItem) {
|
|
8447
|
-
var _a;
|
|
8448
|
-
if (((_a = sidebarItem.section) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === section.toLowerCase()) {
|
|
8449
|
-
props.map(function (prop) {
|
|
8450
|
-
var _a, _b;
|
|
8451
|
-
if (((_a = prop.name) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'data' && ((_b = sidebarItem.data) === null || _b === void 0 ? void 0 : _b.data)) {
|
|
8452
|
-
sidebarItem.data.data = prop.value;
|
|
8453
|
-
}
|
|
8454
|
-
else {
|
|
8455
|
-
setPropValue(sidebarItem, prop);
|
|
8456
|
-
}
|
|
8457
|
-
});
|
|
8458
|
-
}
|
|
8459
|
-
});
|
|
8460
|
-
sidebar = __spreadArray([], __read(sidebar));
|
|
8461
|
-
return sidebar;
|
|
8462
|
-
};
|
|
8463
|
-
return SideBarService;
|
|
8464
|
-
}());
|
|
8465
|
-
/** @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" });
|
|
8466
|
-
SideBarService.decorators = [
|
|
8467
|
-
{ type: i0.Injectable, args: [{
|
|
8468
|
-
providedIn: 'root',
|
|
8469
|
-
},] }
|
|
8470
|
-
];
|
|
8471
|
-
/** @nocollapse */
|
|
8472
|
-
SideBarService.ctorParameters = function () { return [
|
|
8473
|
-
{ type: i0.Injector },
|
|
8474
|
-
{ type: i0.ComponentFactoryResolver },
|
|
8475
|
-
{ type: i0.ApplicationRef }
|
|
8476
|
-
]; };
|
|
8477
|
-
|
|
8478
8417
|
var SidebarComponent = /** @class */ (function () {
|
|
8479
|
-
function SidebarComponent(instance, authService, dialogService, router, route, pageLoggerService, hyperlinkService,
|
|
8418
|
+
function SidebarComponent(instance, authService, dialogService, router, route, pageLoggerService, hyperlinkService, alertService) {
|
|
8480
8419
|
this.instance = instance;
|
|
8481
8420
|
this.authService = authService;
|
|
8482
8421
|
this.dialogService = dialogService;
|
|
@@ -8484,7 +8423,7 @@
|
|
|
8484
8423
|
this.route = route;
|
|
8485
8424
|
this.pageLoggerService = pageLoggerService;
|
|
8486
8425
|
this.hyperlinkService = hyperlinkService;
|
|
8487
|
-
this.
|
|
8426
|
+
this.alertService = alertService;
|
|
8488
8427
|
this.toggleMenu = false;
|
|
8489
8428
|
this.loadComponentName = '';
|
|
8490
8429
|
this.openDialogs = [];
|
|
@@ -8580,6 +8519,23 @@
|
|
|
8580
8519
|
}); });
|
|
8581
8520
|
};
|
|
8582
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) {
|
|
8583
8539
|
var _this = this;
|
|
8584
8540
|
var _a, _b, _c, _d;
|
|
8585
8541
|
if (menu) {
|
|
@@ -8801,7 +8757,7 @@
|
|
|
8801
8757
|
{ type: i6.ActivatedRoute },
|
|
8802
8758
|
{ type: PageLoggerService },
|
|
8803
8759
|
{ type: HyperlinkService },
|
|
8804
|
-
{ type:
|
|
8760
|
+
{ type: AlertService }
|
|
8805
8761
|
]; };
|
|
8806
8762
|
SidebarComponent.propDecorators = {
|
|
8807
8763
|
navHidden: [{ type: i0.Input }],
|
|
@@ -10426,6 +10382,68 @@
|
|
|
10426
10382
|
EHeaderFormatType["DECIMAL"] = "decimal";
|
|
10427
10383
|
})(exports.EHeaderFormatType || (exports.EHeaderFormatType = {}));
|
|
10428
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
|
+
|
|
10429
10447
|
var HeaderService = /** @class */ (function () {
|
|
10430
10448
|
function HeaderService() {
|
|
10431
10449
|
}
|