@churchillliving/se-ui-toolkit 6.53.83 → 6.53.85
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 +36 -22
- 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/form/form.component.js +10 -3
- package/esm2015/lib/components/base/grid/grid.component.js +17 -11
- package/esm2015/lib/components/base/menu-bar/menu-bar.component.js +2 -2
- package/esm2015/lib/components/shared/global-filters/global-filters.component.js +7 -6
- package/esm2015/lib/services/grid.service.js +5 -5
- package/fesm2015/churchillliving-se-ui-toolkit.js +36 -22
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/package.json +1 -1
|
@@ -2249,7 +2249,7 @@
|
|
|
2249
2249
|
isValid =
|
|
2250
2250
|
row[item.field] && row[item.field].length > item.validations[i].expression
|
|
2251
2251
|
? true
|
|
2252
|
-
: _this.setErrorMessage(item, "Minimum " + item.validations[i].expression + " characters required");
|
|
2252
|
+
: _this.setErrorMessage(item, item.header + ", Minimum " + item.validations[i].expression + " characters required");
|
|
2253
2253
|
break;
|
|
2254
2254
|
}
|
|
2255
2255
|
else if (row[item.field] &&
|
|
@@ -2258,7 +2258,7 @@
|
|
|
2258
2258
|
isValid =
|
|
2259
2259
|
row[item.field] && row[item.field].length < item.validations[i].expression
|
|
2260
2260
|
? true
|
|
2261
|
-
: _this.setErrorMessage(item, "Maximum " + item.validations[i].expression + " characters required");
|
|
2261
|
+
: _this.setErrorMessage(item, item.header + ", Maximum " + item.validations[i].expression + " characters required");
|
|
2262
2262
|
break;
|
|
2263
2263
|
}
|
|
2264
2264
|
else if (row[item.field] &&
|
|
@@ -2271,7 +2271,7 @@
|
|
|
2271
2271
|
isValid =
|
|
2272
2272
|
row[item.field] && row[item.field].length > item.validations[i].expression
|
|
2273
2273
|
? true
|
|
2274
|
-
: _this.setErrorMessage(item, "Minimum " + valid + " " + item.validations[i].expression);
|
|
2274
|
+
: _this.setErrorMessage(item, item.header + ", Minimum " + valid + " " + item.validations[i].expression);
|
|
2275
2275
|
}
|
|
2276
2276
|
}
|
|
2277
2277
|
else if (row[item.field] &&
|
|
@@ -2284,7 +2284,7 @@
|
|
|
2284
2284
|
isValid =
|
|
2285
2285
|
row[item.field] && row[item.field].length < item.validations[i].expression
|
|
2286
2286
|
? true
|
|
2287
|
-
: _this.setErrorMessage(item, "Maximum " + valid + " " + item.validations[i].expression);
|
|
2287
|
+
: _this.setErrorMessage(item, item.header + ", Maximum " + valid + " " + item.validations[i].expression);
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
2290
|
else if (row[item.field] &&
|
|
@@ -4594,12 +4594,18 @@
|
|
|
4594
4594
|
// check the validation of the field
|
|
4595
4595
|
GridComponent.prototype.gridValidation = function (columns, row) {
|
|
4596
4596
|
if (!this.gridService.checkValidity(columns, row)) {
|
|
4597
|
+
var errorMessageDetails_1 = '';
|
|
4598
|
+
columns === null || columns === void 0 ? void 0 : columns.forEach(function (column) {
|
|
4599
|
+
if (column.errorMessage) {
|
|
4600
|
+
errorMessageDetails_1 = errorMessageDetails_1 ? errorMessageDetails_1 + ' , ' + column.errorMessage : column.errorMessage;
|
|
4601
|
+
}
|
|
4602
|
+
});
|
|
4597
4603
|
var isRequired = columns.some(function (column) { return column.errorMessage && !row[column.field]; });
|
|
4598
4604
|
if (isRequired) {
|
|
4599
|
-
this.alertService.error(
|
|
4605
|
+
this.alertService.error(errorMessageDetails_1, 'REQUIRED FIELD');
|
|
4600
4606
|
}
|
|
4601
4607
|
else {
|
|
4602
|
-
this.alertService.error(
|
|
4608
|
+
this.alertService.error(errorMessageDetails_1, 'INVALID FIELD');
|
|
4603
4609
|
}
|
|
4604
4610
|
return false;
|
|
4605
4611
|
}
|
|
@@ -5074,16 +5080,16 @@
|
|
|
5074
5080
|
};
|
|
5075
5081
|
GridComponent.prototype.setFilterFocusOut = function (col, filter, event) {
|
|
5076
5082
|
var _this = this;
|
|
5077
|
-
this.gridFilterObj = { column: col, filter: filter, event: event };
|
|
5078
|
-
var newColumn = Object.assign({}, col);
|
|
5079
|
-
//change filter calender format
|
|
5080
|
-
if (newColumn.type === 'date' && newColumn.value) {
|
|
5081
|
-
newColumn.value = this.datePipe.transform(col.value.toString().trim(), 'yyyy-MM-dd');
|
|
5082
|
-
}
|
|
5083
5083
|
setTimeout(function () {
|
|
5084
|
+
_this.gridFilterObj = { column: col, filter: filter, event: event };
|
|
5085
|
+
var newColumn = Object.assign({}, col);
|
|
5086
|
+
//change filter calender format
|
|
5087
|
+
if (newColumn.type === 'date' && newColumn.value) {
|
|
5088
|
+
newColumn.value = _this.datePipe.transform(col.value.toString().trim(), 'yyyy-MM-dd');
|
|
5089
|
+
}
|
|
5084
5090
|
_this.filterObj(newColumn);
|
|
5085
|
-
|
|
5086
|
-
|
|
5091
|
+
localStorage.setItem('applyFilter', JSON.stringify(false));
|
|
5092
|
+
}, col.type === exports.EGridColumnType.LOOKUP_INPUT ? 250 : 0);
|
|
5087
5093
|
};
|
|
5088
5094
|
GridComponent.prototype.filterObj = function (col) {
|
|
5089
5095
|
var obj = {
|
|
@@ -6461,15 +6467,22 @@
|
|
|
6461
6467
|
var _this = this;
|
|
6462
6468
|
var _a, _b, _c, _d, _e;
|
|
6463
6469
|
var validity = true;
|
|
6470
|
+
var errorMessageDetails = '';
|
|
6464
6471
|
(_a = this.form.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (formSection) {
|
|
6472
|
+
var _a;
|
|
6465
6473
|
if (formSection.fields) {
|
|
6466
6474
|
if (!_this.formService.checkValidity(formSection.fields)) {
|
|
6475
|
+
(_a = formSection.fields) === null || _a === void 0 ? void 0 : _a.forEach(function (formField) {
|
|
6476
|
+
if (formField.errorMessage) {
|
|
6477
|
+
errorMessageDetails = errorMessageDetails ? errorMessageDetails + " , " + formField.errorMessage : formField.errorMessage;
|
|
6478
|
+
}
|
|
6479
|
+
});
|
|
6467
6480
|
var field = formSection.fields.some(function (field) { return field.requiredField && field.errorMessage && !field.value; });
|
|
6468
6481
|
if (validity && field) {
|
|
6469
|
-
_this.alertService.error(
|
|
6482
|
+
_this.alertService.error(errorMessageDetails, 'REQUIRED FIELD');
|
|
6470
6483
|
}
|
|
6471
6484
|
else {
|
|
6472
|
-
_this.alertService.error(
|
|
6485
|
+
_this.alertService.error(errorMessageDetails, 'INVALID FIELD');
|
|
6473
6486
|
}
|
|
6474
6487
|
validity = false;
|
|
6475
6488
|
}
|
|
@@ -7166,7 +7179,7 @@
|
|
|
7166
7179
|
MenuBarComponent.decorators = [
|
|
7167
7180
|
{ type: i0.Component, args: [{
|
|
7168
7181
|
selector: 'se-menu-bar',
|
|
7169
|
-
template: "<div class=\"wrapper\" *ngIf=\"hiddenPanelMenu\">\n <div\n *ngIf=\"!isMenubarHidden\"\n class=\"p-p-0 sidebar\"\n [style]=\"{ backgroundColor: menuBackColor }\"\n [ngClass]=\"toggleMenu ? 'hide-nav' : ''\"\n >\n <div class=\"p-d-flex p-ai-center toggle-btn\">\n <p-avatar\n pBadge\n (click)=\"clickEvent()\"\n icon=\"pi pi-user\"\n size=\"xlarge\"\n shape=\"circle\"\n class=\"p-pr-3\"\n [title]=\"toolTip\"\n ></p-avatar>\n <button class=\"toggle-btn hover-scale\" (click)=\"toggleSidebar()\">\n <i\n class=\"pi pi-fw toggle-icon\"\n [pTooltip]=\"toggleMenu ? '
|
|
7182
|
+
template: "<div class=\"wrapper\" *ngIf=\"hiddenPanelMenu\">\n <div\n *ngIf=\"!isMenubarHidden\"\n class=\"p-p-0 sidebar\"\n [style]=\"{ backgroundColor: menuBackColor }\"\n [ngClass]=\"toggleMenu ? 'hide-nav' : ''\"\n >\n <div class=\"p-d-flex p-ai-center toggle-btn\">\n <p-avatar\n pBadge\n (click)=\"clickEvent()\"\n icon=\"pi pi-user\"\n size=\"xlarge\"\n shape=\"circle\"\n class=\"p-pr-3\"\n [title]=\"toolTip\"\n ></p-avatar>\n <button class=\"toggle-btn hover-scale\" (click)=\"toggleSidebar()\">\n <i\n class=\"pi pi-fw toggle-icon\"\n [pTooltip]=\"toggleMenu ? 'Expand' : 'Collapse'\"\n [ngClass]=\"toggleMenu ? 'pi-chevron-right' : 'pi-chevron-left'\"\n ></i>\n \n <span>{{ menuTitle }}</span>\n </button>\n </div>\n <nav\n class=\"navbar navbar-expand-lg navbar-light bg-light p-p-0 grow-1\"\n [ngClass]=\"toggleMenu ? 'hide-nav' : ''\"\n >\n <p-panelMenu [model]=\"menuBarItems\" class=\"menuSidebar\"></p-panelMenu>\n </nav>\n <div class=\"nav-footer p-m-2\" [innerHtml]=\"menuFooter\"></div>\n </div>\n</div>\n",
|
|
7170
7183
|
styles: ["@charset \"UTF-8\";.wrapper{position:relative;z-index:1}div.sidebar{height:100vh;overflow:visible;background:#f8f9fa;position:sticky;top:0;display:flex;flex-direction:column}.toggle-btn:hover button{background-color:#e9ecef}.grow-1{flex-grow:1}.p-panelmenu .p-panelmenu-header>a{border-left:0px!important;border-right:0px!important}.p-panelmenu .p-panelmenu-panel:first-child .p-panelmenu-header>a{padding-left:1.25rem!important;padding-right:1.25rem!important}.p-panelmenu .p-panelmenu-panel .p-panelmenu-header>a{border-left:0px!important;border-right:0px!important}.navbar-nav{flex-direction:row;flex-wrap:wrap}.navbar-nav .nav-item{padding:0 7.5px}.sidebar .navbar{width:260px;overflow:auto;transition:width .5s;-webkit-transition:width .5s}.sidebar .navbar.hide-nav{width:95px}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888}::-webkit-scrollbar-thumb:hover{background:#555}.toggle-btn{width:100%;padding:1rem;border:0px;color:#495057;background:#f8f9fa;font-weight:600;border-radius:3px;transition:box-shadow .2s;text-align:left;cursor:pointer;display:flex;align-items:center}.toggle-btn.hover-scale:hover i{font-size:18px!important}.toggle-btn i{margin-right:.5rem;font-size:9px;font-weight:bold;color:#262626}.toggle-btn:hover{background:#e9ecef;border-color:#dee2e6}.hide-nav .toggle-btn span{display:none}.hide-nav .toggle-btn{justify-content:center}:host ::ng-deep .p-menuitem-link-active{background:#eee!important}:host ::ng-deep .p-menuitem-link-active:focus{box-shadow:unset!important}:host ::ng-deep .p-menuitem{margin:3px}:host ::ng-deep .p-panelmenu .p-panelmenu-content .p-menuitem .p-menuitem-link:focus,:host ::ng-deep .p-panelmenu .p-panelmenu-header>a:focus{box-shadow:unset!important}:host ::ng-deep .p-panelmenu .p-panelmenu-panel:first-child .p-panelmenu-header>a{border-left:0px!important;border-right:0px!important}:host ::ng-deep .p-menuitem-icon{font-size:20px}:host ::ng-deep .p-menuitem-text{font-size:14px;white-space:nowrap}:host ::ng-deep .p-menuitem-text,:host ::ng-deep .p-panelmenu-icon,:host ::ng-deep .nav-footer{transition:opacity 1s;-webkit-transition:opacity 1s}:host ::ng-deep .hide-nav .p-menuitem-text,:host ::ng-deep .hide-nav .p-panelmenu-icon,:host ::ng-deep .hide-nav+.nav-footer{display:none;opacity:0}:host ::ng-deep .p-panelmenu-header-link{position:relative}:host ::ng-deep .p-panelmenu-header-link .p-panelmenu-icon{position:absolute;right:8px}:host ::ng-deep .p-panelmenu-header-link .pi-chevron-right:before{content:\"\\e902\"}:host ::ng-deep .p-panelmenu-header-link .pi-chevron-down:before{content:\"\\e901\"}.toggle-icon{position:absolute;top:48%;right:5px;color:#fff!important;z-index:9}\n"]
|
|
7171
7184
|
},] }
|
|
7172
7185
|
];
|
|
@@ -8361,11 +8374,8 @@
|
|
|
8361
8374
|
// change calendar format on run time if user type date on the calendar field.
|
|
8362
8375
|
SeGlobalFilterComponent.prototype.calendarFocusEvent = function (globalFilter, event) {
|
|
8363
8376
|
var _this = this;
|
|
8364
|
-
var _a, _b, _c;
|
|
8365
|
-
|
|
8366
|
-
this.setDateRangeValue(globalFilter, true);
|
|
8367
|
-
}
|
|
8368
|
-
(_c = document.getElementsByClassName(globalFilter.displayText)[0]) === null || _c === void 0 ? void 0 : _c.addEventListener('keyup', function (a) {
|
|
8377
|
+
var _a, _b, _c, _d, _e;
|
|
8378
|
+
(_a = document.getElementsByClassName(globalFilter.displayText)[0]) === null || _a === void 0 ? void 0 : _a.addEventListener('keyup', function (a) {
|
|
8369
8379
|
var _a, _b, _c;
|
|
8370
8380
|
var year = (_c = (_b = (_a = a === null || a === void 0 ? void 0 : a.target) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toString()) === null || _c === void 0 ? void 0 : _c.split('/')[2];
|
|
8371
8381
|
year = year === null || year === void 0 ? void 0 : year.toString().split(" ")[0];
|
|
@@ -8379,6 +8389,10 @@
|
|
|
8379
8389
|
_this.calendarFormat = 'mm/dd/y';
|
|
8380
8390
|
}
|
|
8381
8391
|
});
|
|
8392
|
+
var yearValue = (_d = (_c = (_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.toString()) === null || _d === void 0 ? void 0 : _d.split('/')[4];
|
|
8393
|
+
if ((!globalFilter.value || yearValue == undefined || ((_e = yearValue === null || yearValue === void 0 ? void 0 : yearValue.toString()) === null || _e === void 0 ? void 0 : _e.length) === 1) && globalFilter.type === exports.GridFilterControlType.DATE_RANGE) {
|
|
8394
|
+
this.setDateRangeValue(globalFilter, true);
|
|
8395
|
+
}
|
|
8382
8396
|
};
|
|
8383
8397
|
SeGlobalFilterComponent.prototype.checkFilterValidation = function (removeError) {
|
|
8384
8398
|
if (removeError === void 0) { removeError = false; }
|