@churchillliving/se-ui-toolkit 6.53.189 → 6.53.191
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 +238 -243
- 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 +7 -19
- package/esm2015/lib/components/base/grid/grid.component.js +195 -192
- package/esm2015/lib/components/base/sidebar/sidebar.component.js +4 -1
- package/esm2015/lib/services/utilities.service.js +34 -32
- package/fesm2015/churchillliving-se-ui-toolkit.js +234 -239
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/grid/grid.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2048,37 +2048,39 @@
|
|
|
2048
2048
|
});
|
|
2049
2049
|
}
|
|
2050
2050
|
function draggableDialog(id) {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
document.getElementById(elmnt === null || elmnt === void 0 ? void 0 : elmnt.id)
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2051
|
+
setTimeout(function () {
|
|
2052
|
+
var _a;
|
|
2053
|
+
var dialogHeader = document.getElementsByClassName('p-dialog');
|
|
2054
|
+
(_a = dialogHeader[0]) === null || _a === void 0 ? void 0 : _a.setAttribute('id', "prefix_" + id);
|
|
2055
|
+
var elmnt = document.getElementById("prefix_" + id);
|
|
2056
|
+
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
|
|
2057
|
+
var dragMouseDown = function (e) {
|
|
2058
|
+
e = e || window.event;
|
|
2059
|
+
pos3 = e.clientX;
|
|
2060
|
+
pos4 = e.clientY;
|
|
2061
|
+
document.onmouseup = closeDragElement;
|
|
2062
|
+
document.onmousemove = elementDrag;
|
|
2063
|
+
};
|
|
2064
|
+
var elementDrag = function (e) {
|
|
2065
|
+
e = e || window.event;
|
|
2066
|
+
pos1 = pos3 - e.clientX;
|
|
2067
|
+
pos2 = pos4 - e.clientY;
|
|
2068
|
+
pos3 = e.clientX;
|
|
2069
|
+
pos4 = e.clientY;
|
|
2070
|
+
elmnt.style.top = (elmnt === null || elmnt === void 0 ? void 0 : elmnt.offsetTop) - pos2 + 'px';
|
|
2071
|
+
elmnt.style.left = (elmnt === null || elmnt === void 0 ? void 0 : elmnt.offsetLeft) - pos1 + 'px';
|
|
2072
|
+
};
|
|
2073
|
+
var closeDragElement = function () {
|
|
2074
|
+
document.onmouseup = null;
|
|
2075
|
+
document.onmousemove = null;
|
|
2076
|
+
};
|
|
2077
|
+
if (document.getElementById(elmnt === null || elmnt === void 0 ? void 0 : elmnt.id)) {
|
|
2078
|
+
document.getElementById(elmnt === null || elmnt === void 0 ? void 0 : elmnt.id).onmousedown = dragMouseDown;
|
|
2079
|
+
}
|
|
2080
|
+
else {
|
|
2081
|
+
elmnt.onmousedown = dragMouseDown;
|
|
2082
|
+
}
|
|
2083
|
+
}, 100);
|
|
2082
2084
|
}
|
|
2083
2085
|
function calenderMinMaxValue(item, value, index) {
|
|
2084
2086
|
var validation = 'equal';
|
|
@@ -3465,6 +3467,7 @@
|
|
|
3465
3467
|
this.inEditMode = false;
|
|
3466
3468
|
this.saveRecordArray = [];
|
|
3467
3469
|
this.disabledSaveBtn = false;
|
|
3470
|
+
this.isFilterApplied = false;
|
|
3468
3471
|
this.editModeChecked = true;
|
|
3469
3472
|
this.editModeunCkecked = false;
|
|
3470
3473
|
this.calendarFormat = 'mm/dd/y';
|
|
@@ -3623,35 +3626,41 @@
|
|
|
3623
3626
|
*/
|
|
3624
3627
|
set: function (data) {
|
|
3625
3628
|
var _this = this;
|
|
3629
|
+
var _a;
|
|
3626
3630
|
this.loading = false;
|
|
3627
|
-
if (
|
|
3628
|
-
if (
|
|
3629
|
-
this.
|
|
3631
|
+
if (!((_a = this.rowsData) === null || _a === void 0 ? void 0 : _a.length) || this.isFilterApplied) {
|
|
3632
|
+
if (this.isFilterApplied) {
|
|
3633
|
+
this.isFilterApplied = false;
|
|
3630
3634
|
}
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
// Cleaning the editing stack
|
|
3637
|
-
// this.editingRowKeys = {};
|
|
3638
|
-
this.editRowsRecords = {};
|
|
3639
|
-
setTimeout(function () {
|
|
3640
|
-
if (data && data.length > 0 && _this.selectedRows) {
|
|
3641
|
-
var selectedElementRef = _this.gridRow.find(function (x) { return x.nativeElement.id === _this.selectedRows[_this.dataKey]; });
|
|
3642
|
-
selectedElementRef &&
|
|
3643
|
-
selectedElementRef.nativeElement.scrollIntoView({ behavior: 'smooth' });
|
|
3635
|
+
if (data && data.length > 0) {
|
|
3636
|
+
if (!this.dataKey) {
|
|
3637
|
+
this.dataKey = 'id';
|
|
3638
|
+
}
|
|
3639
|
+
this.rowsData = this.gridService.setDataFields(data, this.dataKey);
|
|
3644
3640
|
}
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3641
|
+
else {
|
|
3642
|
+
this.rowsData = [];
|
|
3643
|
+
}
|
|
3644
|
+
// Cleaning the editing stack
|
|
3645
|
+
// this.editingRowKeys = {};
|
|
3646
|
+
this.editRowsRecords = {};
|
|
3647
|
+
setTimeout(function () {
|
|
3648
|
+
if (data && data.length > 0 && _this.selectedRows) {
|
|
3649
|
+
var selectedElementRef = _this.gridRow.find(function (x) { return x.nativeElement.id === _this.selectedRows[_this.dataKey]; });
|
|
3650
|
+
selectedElementRef &&
|
|
3651
|
+
selectedElementRef.nativeElement.scrollIntoView({ behavior: 'smooth' });
|
|
3650
3652
|
}
|
|
3651
|
-
});
|
|
3653
|
+
}, 0);
|
|
3654
|
+
if (this.columns && this.columns.length > 0) {
|
|
3655
|
+
this.columns.forEach(function (column) {
|
|
3656
|
+
if (column.type === exports.EGridColumnType.DROPDOWN && _this.setDropdowndataValue) {
|
|
3657
|
+
_this.setDropdownValue(column, {}, false);
|
|
3658
|
+
}
|
|
3659
|
+
});
|
|
3660
|
+
}
|
|
3661
|
+
//manipulate checkbox string value to true and false.
|
|
3662
|
+
this.changeCheckboxStringValue();
|
|
3652
3663
|
}
|
|
3653
|
-
//manipulate checkbox string value to true and false.
|
|
3654
|
-
this.changeCheckboxStringValue();
|
|
3655
3664
|
},
|
|
3656
3665
|
enumerable: false,
|
|
3657
3666
|
configurable: true
|
|
@@ -3708,6 +3717,7 @@
|
|
|
3708
3717
|
serverFilterValues.pageSize = _this.defaultRows;
|
|
3709
3718
|
}
|
|
3710
3719
|
if (_this.gridService.applyFilterEvent) {
|
|
3720
|
+
_this.isFilterApplied = true;
|
|
3711
3721
|
_this.onServerSideEventChange.emit(serverFilterValues);
|
|
3712
3722
|
}
|
|
3713
3723
|
localStorage.removeItem('applyFilter');
|
|
@@ -3861,151 +3871,164 @@
|
|
|
3861
3871
|
GridComponent.prototype.ngOnChanges = function (change) {
|
|
3862
3872
|
var _this = this;
|
|
3863
3873
|
var _a, _b, _c, _d, _e, _f;
|
|
3864
|
-
if (
|
|
3865
|
-
this.allowCaching
|
|
3866
|
-
|
|
3867
|
-
else if ((_a = this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id) {
|
|
3868
|
-
localStorage.removeItem('SetFilters-' + ((_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id) + currentUrl());
|
|
3869
|
-
}
|
|
3870
|
-
// add defaultRow in pagination array
|
|
3871
|
-
if (!this.setPaginationLength.includes(this.defaultRows)) {
|
|
3872
|
-
this.setPaginationLength.unshift(this.defaultRows);
|
|
3873
|
-
}
|
|
3874
|
-
var hasColumns = this.columns && this.columns.length > 0;
|
|
3875
|
-
if (hasColumns) {
|
|
3876
|
-
this.columns = this.gridService.setColumnFields(this.columns);
|
|
3877
|
-
}
|
|
3878
|
-
this.roles = this.authService.getUserRoles();
|
|
3879
|
-
// apply user role permissions on grid columns
|
|
3880
|
-
this.applyColumnsPermissions();
|
|
3881
|
-
// apply global permissions on entire grid
|
|
3882
|
-
this.applyGridPermissions();
|
|
3883
|
-
this._selectedColumns = (_c = this.columns) === null || _c === void 0 ? void 0 : _c.filter(function (x) { return !x.hidden; });
|
|
3884
|
-
this.cd.detectChanges();
|
|
3885
|
-
if (hasColumns) {
|
|
3886
|
-
this.columns = this.gridService.setColumnFields(this.columns);
|
|
3887
|
-
// checking filter exist or not
|
|
3888
|
-
var filter = this._selectedColumns.some(function (column) { return column.filtering === undefined || column.filtering === true; });
|
|
3889
|
-
if (filter === false) {
|
|
3890
|
-
this.hideFilter = true;
|
|
3874
|
+
if (change.columns) {
|
|
3875
|
+
if (this.allowCaching !== false && this.pagination) {
|
|
3876
|
+
this.allowCaching = this.pagination;
|
|
3891
3877
|
}
|
|
3892
|
-
this.
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3878
|
+
else if ((_a = this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id) {
|
|
3879
|
+
localStorage.removeItem('SetFilters-' + ((_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id) + currentUrl());
|
|
3880
|
+
}
|
|
3881
|
+
// add defaultRow in pagination array
|
|
3882
|
+
if (!this.setPaginationLength.includes(this.defaultRows)) {
|
|
3883
|
+
this.setPaginationLength.unshift(this.defaultRows);
|
|
3884
|
+
}
|
|
3885
|
+
var hasColumns = this.columns && this.columns.length > 0;
|
|
3886
|
+
if (hasColumns) {
|
|
3887
|
+
this.columns = this.gridService.setColumnFields(this.columns);
|
|
3888
|
+
}
|
|
3889
|
+
this.roles = this.authService.getUserRoles();
|
|
3890
|
+
// apply user role permissions on grid columns
|
|
3891
|
+
this.applyColumnsPermissions();
|
|
3892
|
+
// apply global permissions on entire grid
|
|
3893
|
+
this.applyGridPermissions();
|
|
3894
|
+
this._selectedColumns = (_c = this.columns) === null || _c === void 0 ? void 0 : _c.filter(function (x) { return !x.hidden; });
|
|
3895
|
+
this.cd.detectChanges();
|
|
3896
|
+
if (hasColumns) {
|
|
3897
|
+
this.columns = this.gridService.setColumnFields(this.columns);
|
|
3898
|
+
// checking filter exist or not
|
|
3899
|
+
var filter = this._selectedColumns.some(function (column) { return column.filtering === undefined || column.filtering === true; });
|
|
3900
|
+
if (filter === false) {
|
|
3901
|
+
this.hideFilter = true;
|
|
3905
3902
|
}
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3903
|
+
this.columns.forEach(function (column) {
|
|
3904
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3905
|
+
// set isRequired true for required column to show astric in column header
|
|
3906
|
+
if ((_a = column.validations) === null || _a === void 0 ? void 0 : _a.find(function (validation) { return validation.type == exports.EGridValidator.REQUIRED; })) {
|
|
3907
|
+
column.isRequired = true;
|
|
3908
|
+
}
|
|
3909
|
+
// set numeric null or undefine data default value
|
|
3910
|
+
if (column.type === exports.EGridColumnType.NUMERIC && column.value && ((_b = _this.rowsData) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
3909
3911
|
_this.rowsData.forEach(function (row) {
|
|
3910
|
-
if (row[column.field]
|
|
3911
|
-
|
|
3912
|
-
row[column.field].toString().includes('AM'))) {
|
|
3913
|
-
row[column.field] = setTimeInDate(row[column.field]);
|
|
3912
|
+
if (column.value && (row[column.field] === null || row[column.field] === undefined)) {
|
|
3913
|
+
row[column.field] = column.value;
|
|
3914
3914
|
}
|
|
3915
3915
|
});
|
|
3916
3916
|
}
|
|
3917
|
-
|
|
3918
|
-
|
|
3917
|
+
// convert string time into the date
|
|
3918
|
+
if (column.type === exports.EGridColumnType.DATE) {
|
|
3919
|
+
if (column.timeOnly === true) {
|
|
3920
|
+
_this.rowsData.forEach(function (row) {
|
|
3921
|
+
if (row[column.field] &&
|
|
3922
|
+
(row[column.field].toString().includes('PM') ||
|
|
3923
|
+
row[column.field].toString().includes('AM'))) {
|
|
3924
|
+
row[column.field] = setTimeInDate(row[column.field]);
|
|
3925
|
+
}
|
|
3926
|
+
});
|
|
3927
|
+
}
|
|
3928
|
+
else if (!column.minutesInterval) {
|
|
3929
|
+
_this.rowsData.forEach(function (row) {
|
|
3930
|
+
var _a;
|
|
3931
|
+
if (row[column.field] && row[column.field].action) {
|
|
3932
|
+
row[column.field] = new Date((_a = row[column.field]) === null || _a === void 0 ? void 0 : _a.text);
|
|
3933
|
+
}
|
|
3934
|
+
else if (row[column.field]) {
|
|
3935
|
+
row[column.field] = new Date(row[column.field]);
|
|
3936
|
+
}
|
|
3937
|
+
});
|
|
3938
|
+
}
|
|
3939
|
+
}
|
|
3940
|
+
// set filter value
|
|
3941
|
+
if (column.filter && column.value && column.filtering !== false) {
|
|
3942
|
+
_this.setFilterFocusOut(column);
|
|
3943
|
+
}
|
|
3944
|
+
// add "flex-shrink: 0" for flex-basis Style
|
|
3945
|
+
if (column.style && column.style.includes('flex-basis')) {
|
|
3946
|
+
var style = column.style + ' !important; flex-shrink: 0 !important';
|
|
3947
|
+
column.style = style.includes(';;')
|
|
3948
|
+
? style.replace(';;', ';')
|
|
3949
|
+
: style;
|
|
3950
|
+
}
|
|
3951
|
+
// set DisplayText when value is in curly brackets.
|
|
3952
|
+
_this.setDisplayTextValue(column);
|
|
3953
|
+
//Aggregate scenario
|
|
3954
|
+
if (column.aggregate && column.aggregate.length > 0) {
|
|
3955
|
+
_this.aggregateFooter = true;
|
|
3956
|
+
_this.setAggregateText(column);
|
|
3957
|
+
}
|
|
3958
|
+
var searchFilters;
|
|
3959
|
+
if (!_this.softCaching && ((_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id)) {
|
|
3960
|
+
searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + ((_d = _this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id) + currentUrl()));
|
|
3961
|
+
}
|
|
3962
|
+
else if ((_e = _this.componentTableRef) === null || _e === void 0 ? void 0 : _e.id) {
|
|
3963
|
+
searchFilters = _this.gridService.softCachingFilters[((_f = _this.componentTableRef) === null || _f === void 0 ? void 0 : _f.id) + currentUrl()];
|
|
3964
|
+
}
|
|
3965
|
+
if (!_this.hideFilter &&
|
|
3966
|
+
searchFilters &&
|
|
3967
|
+
searchFilters.filters &&
|
|
3968
|
+
searchFilters.filters.length > 0) {
|
|
3969
|
+
searchFilters.filters.forEach(function (x) {
|
|
3919
3970
|
var _a;
|
|
3920
|
-
if (
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3971
|
+
if (x.value && x.field === column.field) {
|
|
3972
|
+
if (((_a = column === null || column === void 0 ? void 0 : column.filter) === null || _a === void 0 ? void 0 : _a.type) === 'calendar') {
|
|
3973
|
+
column.value = new Date(_this.datePipe.transform(x.value, 'MM-dd-YY'));
|
|
3974
|
+
}
|
|
3975
|
+
else {
|
|
3976
|
+
column.value = x.value;
|
|
3977
|
+
}
|
|
3925
3978
|
}
|
|
3926
3979
|
});
|
|
3927
3980
|
}
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
}
|
|
3947
|
-
var searchFilters;
|
|
3948
|
-
if (!_this.softCaching && ((_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id)) {
|
|
3949
|
-
searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + ((_d = _this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id) + currentUrl()));
|
|
3950
|
-
}
|
|
3951
|
-
else if ((_e = _this.componentTableRef) === null || _e === void 0 ? void 0 : _e.id) {
|
|
3952
|
-
searchFilters = _this.gridService.softCachingFilters[((_f = _this.componentTableRef) === null || _f === void 0 ? void 0 : _f.id) + currentUrl()];
|
|
3953
|
-
}
|
|
3954
|
-
if (!_this.hideFilter &&
|
|
3955
|
-
searchFilters &&
|
|
3956
|
-
searchFilters.filters &&
|
|
3957
|
-
searchFilters.filters.length > 0) {
|
|
3958
|
-
searchFilters.filters.forEach(function (x) {
|
|
3959
|
-
var _a;
|
|
3960
|
-
if (x.value && x.field === column.field) {
|
|
3961
|
-
if (((_a = column === null || column === void 0 ? void 0 : column.filter) === null || _a === void 0 ? void 0 : _a.type) === 'calendar') {
|
|
3962
|
-
column.value = new Date(_this.datePipe.transform(x.value, 'MM-dd-YY'));
|
|
3981
|
+
// converting displayField toLowercase
|
|
3982
|
+
if (column.displayField) {
|
|
3983
|
+
column.displayField = column.displayField.toLowerCase();
|
|
3984
|
+
}
|
|
3985
|
+
// set AutoComplete Data
|
|
3986
|
+
if (column.type === exports.EGridColumnType.AUTOCOMPLETE &&
|
|
3987
|
+
_this.rowsData &&
|
|
3988
|
+
_this.rowsData.length > 0) {
|
|
3989
|
+
_this.rowsData.forEach(function (row) {
|
|
3990
|
+
var _3;
|
|
3991
|
+
var _a, _b, _c;
|
|
3992
|
+
// convert string that contains comma into arrays
|
|
3993
|
+
if (row[column.field] &&
|
|
3994
|
+
((_a = row[column.field]) === null || _a === void 0 ? void 0 : _a.toString().includes(','))) {
|
|
3995
|
+
row[column.field] = (_c = (_b = row[column.field]) === null || _b === void 0 ? void 0 : _b.toString().split(',')) === null || _c === void 0 ? void 0 : _c.map(function (value) {
|
|
3996
|
+
var _3;
|
|
3997
|
+
return (_3 = {}, _3[column.displayField] = value, _3);
|
|
3998
|
+
});
|
|
3963
3999
|
}
|
|
3964
|
-
|
|
3965
|
-
|
|
4000
|
+
var key = Object.keys(row).find(function (x) { return x === column.field.toLowerCase(); });
|
|
4001
|
+
// convert simple string into array
|
|
4002
|
+
if (!Array.isArray(row[key]) && row[key]) {
|
|
4003
|
+
row[key] = [(_3 = {}, _3[column.displayField] = row[key], _3)];
|
|
3966
4004
|
}
|
|
4005
|
+
});
|
|
4006
|
+
}
|
|
4007
|
+
//when we add a new row, it set the default value
|
|
4008
|
+
if (column.value && Object.keys(_this.newGridRow).length > 0) {
|
|
4009
|
+
var key = Object.keys(_this.newGridRow).find(function (x) { return x === column.field; });
|
|
4010
|
+
if (key && key.toLowerCase() === column.field.toLowerCase()) {
|
|
4011
|
+
_this.newGridRow[key] = column.value;
|
|
3967
4012
|
}
|
|
3968
|
-
}
|
|
3969
|
-
}
|
|
3970
|
-
//
|
|
3971
|
-
if (
|
|
3972
|
-
column.
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
row[column.field] = (_c = (_b = row[column.field]) === null || _b === void 0 ? void 0 : _b.toString().split(',')) === null || _c === void 0 ? void 0 : _c.map(function (value) {
|
|
3985
|
-
var _3;
|
|
3986
|
-
return (_3 = {}, _3[column.displayField] = value, _3);
|
|
3987
|
-
});
|
|
3988
|
-
}
|
|
3989
|
-
var key = Object.keys(row).find(function (x) { return x === column.field.toLowerCase(); });
|
|
3990
|
-
// convert simple string into array
|
|
3991
|
-
if (!Array.isArray(row[key]) && row[key]) {
|
|
3992
|
-
row[key] = [(_3 = {}, _3[column.displayField] = row[key], _3)];
|
|
3993
|
-
}
|
|
3994
|
-
});
|
|
3995
|
-
}
|
|
3996
|
-
//when we add a new row, it set the default value
|
|
3997
|
-
if (column.value && Object.keys(_this.newGridRow).length > 0) {
|
|
3998
|
-
var key = Object.keys(_this.newGridRow).find(function (x) { return x === column.field; });
|
|
3999
|
-
if (key && key.toLowerCase() === column.field.toLowerCase()) {
|
|
4000
|
-
_this.newGridRow[key] = column.value;
|
|
4013
|
+
}
|
|
4014
|
+
});
|
|
4015
|
+
// Searching scenario
|
|
4016
|
+
if (((_d = change.rows) === null || _d === void 0 ? void 0 : _d.currentValue) && ((_e = change.columns) === null || _e === void 0 ? void 0 : _e.currentValue)) {
|
|
4017
|
+
// Checks either column value is changes (i.e., column hidden scenario)
|
|
4018
|
+
if (JSON.stringify(change.columns.currentValue).toLowerCase() !==
|
|
4019
|
+
JSON.stringify(this.columns).toLowerCase()) {
|
|
4020
|
+
this._selectedColumns = [];
|
|
4021
|
+
this.columns.forEach(function (x, i) {
|
|
4022
|
+
if (!x.hidden) {
|
|
4023
|
+
if (_this.selectedColumns[i]) {
|
|
4024
|
+
x.value = _this.selectedColumns[i].value;
|
|
4025
|
+
}
|
|
4026
|
+
_this._selectedColumns.push(x);
|
|
4027
|
+
}
|
|
4028
|
+
});
|
|
4001
4029
|
}
|
|
4002
4030
|
}
|
|
4003
|
-
|
|
4004
|
-
// Searching scenario
|
|
4005
|
-
if (((_d = change.rows) === null || _d === void 0 ? void 0 : _d.currentValue) && ((_e = change.columns) === null || _e === void 0 ? void 0 : _e.currentValue)) {
|
|
4006
|
-
// Checks either column value is changes (i.e., column hidden scenario)
|
|
4007
|
-
if (JSON.stringify(change.columns.currentValue).toLowerCase() !==
|
|
4008
|
-
JSON.stringify(this.columns).toLowerCase()) {
|
|
4031
|
+
else {
|
|
4009
4032
|
this._selectedColumns = [];
|
|
4010
4033
|
this.columns.forEach(function (x, i) {
|
|
4011
4034
|
if (!x.hidden) {
|
|
@@ -4016,36 +4039,25 @@
|
|
|
4016
4039
|
}
|
|
4017
4040
|
});
|
|
4018
4041
|
}
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
if (_this.selectedColumns[i]) {
|
|
4025
|
-
x.value = _this.selectedColumns[i].value;
|
|
4026
|
-
}
|
|
4027
|
-
_this._selectedColumns.push(x);
|
|
4042
|
+
setTimeout(function () {
|
|
4043
|
+
var _a, _b;
|
|
4044
|
+
var classElement = document.getElementsByClassName('highlighted-row');
|
|
4045
|
+
if (classElement.length > 0) {
|
|
4046
|
+
classElement[0].scrollIntoView();
|
|
4028
4047
|
}
|
|
4029
|
-
|
|
4048
|
+
if (_this.editAllRows && ((_a = _this.rowsData) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((_b = _this.columns) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
4049
|
+
_this.editAllRowsAtOnce();
|
|
4050
|
+
}
|
|
4051
|
+
}, 500);
|
|
4052
|
+
}
|
|
4053
|
+
this.setDropdowndataValue = true;
|
|
4054
|
+
var globalSearchbtn = document.getElementById('globalSearchbtn');
|
|
4055
|
+
if (globalSearchbtn) {
|
|
4056
|
+
this.searchGridFilter = false;
|
|
4057
|
+
}
|
|
4058
|
+
if (((_f = this.rowsData) === null || _f === void 0 ? void 0 : _f.length) > 0) {
|
|
4059
|
+
this.rowsDataCopy = JSON.parse(JSON.stringify(this.rowsData));
|
|
4030
4060
|
}
|
|
4031
|
-
setTimeout(function () {
|
|
4032
|
-
var _a, _b;
|
|
4033
|
-
var classElement = document.getElementsByClassName('highlighted-row');
|
|
4034
|
-
if (classElement.length > 0) {
|
|
4035
|
-
classElement[0].scrollIntoView();
|
|
4036
|
-
}
|
|
4037
|
-
if (_this.editAllRows && ((_a = _this.rowsData) === null || _a === void 0 ? void 0 : _a.length) > 0 && ((_b = _this.columns) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
4038
|
-
_this.editAllRowsAtOnce();
|
|
4039
|
-
}
|
|
4040
|
-
}, 500);
|
|
4041
|
-
}
|
|
4042
|
-
this.setDropdowndataValue = true;
|
|
4043
|
-
var globalSearchbtn = document.getElementById('globalSearchbtn');
|
|
4044
|
-
if (globalSearchbtn) {
|
|
4045
|
-
this.searchGridFilter = false;
|
|
4046
|
-
}
|
|
4047
|
-
if (((_f = this.rowsData) === null || _f === void 0 ? void 0 : _f.length) > 0) {
|
|
4048
|
-
this.rowsDataCopy = JSON.parse(JSON.stringify(this.rowsData));
|
|
4049
4061
|
}
|
|
4050
4062
|
};
|
|
4051
4063
|
// set DisplayText when value is in curly brackets.
|
|
@@ -4267,9 +4279,7 @@
|
|
|
4267
4279
|
if (componentName) {
|
|
4268
4280
|
this.pageLoggerService.savePageLoggerInfo((_b = this.router.url) === null || _b === void 0 ? void 0 : _b.substring(1), componentName);
|
|
4269
4281
|
}
|
|
4270
|
-
|
|
4271
|
-
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
4272
|
-
}, 100);
|
|
4282
|
+
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
4273
4283
|
ref.onClose.subscribe(function (res) {
|
|
4274
4284
|
if (res && column.onReturn) {
|
|
4275
4285
|
column.onReturn(res);
|
|
@@ -4322,9 +4332,7 @@
|
|
|
4322
4332
|
if (componentName) {
|
|
4323
4333
|
_this.pageLoggerService.savePageLoggerInfo((_c = _this.router.url) === null || _c === void 0 ? void 0 : _c.substring(1), componentName);
|
|
4324
4334
|
}
|
|
4325
|
-
|
|
4326
|
-
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
4327
|
-
}, 100);
|
|
4335
|
+
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
4328
4336
|
ref.onClose.subscribe(function (data) {
|
|
4329
4337
|
if (data && column.onReturn) {
|
|
4330
4338
|
column.onReturn(data, _this.rowClickData);
|
|
@@ -4506,6 +4514,7 @@
|
|
|
4506
4514
|
}
|
|
4507
4515
|
var serverFilterValues = JSON.parse(JSON.stringify(_this.serverFilters));
|
|
4508
4516
|
serverFilterValues.filters = (_this.serverFilters.filters || []).concat(_this.globalData);
|
|
4517
|
+
_this.isFilterApplied = true;
|
|
4509
4518
|
_this.onServerSideEventChange.emit(serverFilterValues);
|
|
4510
4519
|
}, 950);
|
|
4511
4520
|
};
|
|
@@ -5254,9 +5263,7 @@
|
|
|
5254
5263
|
var obj = this.setLookupDialogConfig(row, column, (_a = column.data) === null || _a === void 0 ? void 0 : _a.data);
|
|
5255
5264
|
obj['component'] = column.component;
|
|
5256
5265
|
var ref = this.openLookupDialog(obj);
|
|
5257
|
-
|
|
5258
|
-
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
5259
|
-
}, 100);
|
|
5266
|
+
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
5260
5267
|
ref.onClose.subscribe(function (res) {
|
|
5261
5268
|
if (res && column.onReturn) {
|
|
5262
5269
|
column.onReturn(res);
|
|
@@ -5289,9 +5296,7 @@
|
|
|
5289
5296
|
var obj_2 = this.setLookupDialogConfig(row, column, (_a = column.lookupControl.data) === null || _a === void 0 ? void 0 : _a.data);
|
|
5290
5297
|
obj_2['component'] = column.lookupControl.component;
|
|
5291
5298
|
var ref = this.openLookupDialog(obj_2);
|
|
5292
|
-
|
|
5293
|
-
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
5294
|
-
}, 100);
|
|
5299
|
+
draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
|
|
5295
5300
|
ref.onClose.subscribe(function (res) {
|
|
5296
5301
|
if (column.onReturn) {
|
|
5297
5302
|
column.onReturn(res, row);
|
|
@@ -6813,9 +6818,7 @@
|
|
|
6813
6818
|
height: ((_b = formField.hyperlink) === null || _b === void 0 ? void 0 : _b.height) ? formField.hyperlink.height : '80%',
|
|
6814
6819
|
data: { value: (_c = formField.hyperlink) === null || _c === void 0 ? void 0 : _c.link, iFrameId: formField.label },
|
|
6815
6820
|
});
|
|
6816
|
-
|
|
6817
|
-
draggableDialog(formField === null || formField === void 0 ? void 0 : formField.field);
|
|
6818
|
-
}, 100);
|
|
6821
|
+
draggableDialog(formField === null || formField === void 0 ? void 0 : formField.field);
|
|
6819
6822
|
ref.onClose.subscribe(function (res) {
|
|
6820
6823
|
if (res) {
|
|
6821
6824
|
if (formField.onReturn) {
|
|
@@ -6850,9 +6853,7 @@
|
|
|
6850
6853
|
if (componentName) {
|
|
6851
6854
|
this.pageLoggerService.savePageLoggerInfo((_h = this.router.url) === null || _h === void 0 ? void 0 : _h.substring(1), componentName);
|
|
6852
6855
|
}
|
|
6853
|
-
|
|
6854
|
-
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
6855
|
-
}, 100);
|
|
6856
|
+
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
6856
6857
|
dialog.onClose.subscribe(function (res) {
|
|
6857
6858
|
if (res) {
|
|
6858
6859
|
if (formField.onReturn) {
|
|
@@ -6874,9 +6875,7 @@
|
|
|
6874
6875
|
data: { value: ((_b = formField.label.labelControl.hyperlink) === null || _b === void 0 ? void 0 : _b.link) ? formField.label.labelControl.hyperlink.link : '', iFrameId: formField.label.name },
|
|
6875
6876
|
});
|
|
6876
6877
|
this.pageLoggerService.savePageLoggerInfo((_c = this.router.url) === null || _c === void 0 ? void 0 : _c.substring(1), 'IframeComponent');
|
|
6877
|
-
|
|
6878
|
-
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
6879
|
-
}, 100);
|
|
6878
|
+
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
6880
6879
|
ref.onClose.subscribe(function (res) {
|
|
6881
6880
|
if (res) {
|
|
6882
6881
|
if (formField.onReturn) {
|
|
@@ -7129,9 +7128,7 @@
|
|
|
7129
7128
|
formField.label.labelControl &&
|
|
7130
7129
|
formField.label.labelControl.lookupControl) {
|
|
7131
7130
|
var ref = this.setDialogData(formField, formField.label.labelControl.lookupControl);
|
|
7132
|
-
|
|
7133
|
-
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
7134
|
-
}, 100);
|
|
7131
|
+
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
7135
7132
|
ref.onClose.subscribe(function (res) {
|
|
7136
7133
|
if (res) {
|
|
7137
7134
|
formField.value = setDialogResponse(formField, formField === null || formField === void 0 ? void 0 : formField.label.labelControl.lookupControl, res);
|
|
@@ -7155,9 +7152,7 @@
|
|
|
7155
7152
|
this.lookupFocusOut = true;
|
|
7156
7153
|
var value_1 = formField.value;
|
|
7157
7154
|
var ref = this.setDialogData(formField, formField.lookupControl);
|
|
7158
|
-
|
|
7159
|
-
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
7160
|
-
}, 100);
|
|
7155
|
+
draggableDialog((formField === null || formField === void 0 ? void 0 : formField.field) ? formField === null || formField === void 0 ? void 0 : formField.field : formField === null || formField === void 0 ? void 0 : formField.label);
|
|
7161
7156
|
ref.onClose.subscribe(function (res) {
|
|
7162
7157
|
var _a;
|
|
7163
7158
|
if (formField.field) {
|
|
@@ -7241,9 +7236,7 @@
|
|
|
7241
7236
|
disabledText: formfield.disabledText,
|
|
7242
7237
|
},
|
|
7243
7238
|
});
|
|
7244
|
-
|
|
7245
|
-
draggableDialog((formfield === null || formfield === void 0 ? void 0 : formfield.field) ? formfield === null || formfield === void 0 ? void 0 : formfield.field : formfield === null || formfield === void 0 ? void 0 : formfield.label);
|
|
7246
|
-
}, 100);
|
|
7239
|
+
draggableDialog((formfield === null || formfield === void 0 ? void 0 : formfield.field) ? formfield === null || formfield === void 0 ? void 0 : formfield.field : formfield === null || formfield === void 0 ? void 0 : formfield.label);
|
|
7247
7240
|
dialogRef.onClose.subscribe(function (data) {
|
|
7248
7241
|
if (data && formfield.onReturn) {
|
|
7249
7242
|
formfield.onReturn(data);
|
|
@@ -7793,6 +7786,7 @@
|
|
|
7793
7786
|
});
|
|
7794
7787
|
this.pageLoggerService.savePageLoggerInfo((_d = this.router.url) === null || _d === void 0 ? void 0 : _d.substring(1), 'IframeComponent');
|
|
7795
7788
|
this.handleActiveItem(item);
|
|
7789
|
+
draggableDialog(menu.label);
|
|
7796
7790
|
dialogRef.onClose.subscribe(function (data) {
|
|
7797
7791
|
_this.handleActiveItem(item, false);
|
|
7798
7792
|
if (data && menu.onReturn) {
|
|
@@ -7876,6 +7870,7 @@
|
|
|
7876
7870
|
this.openDialogs[0].close();
|
|
7877
7871
|
this.openDialogs.shift();
|
|
7878
7872
|
}
|
|
7873
|
+
draggableDialog(menu.label);
|
|
7879
7874
|
dialogRef.onClose.subscribe(function (data) {
|
|
7880
7875
|
_this.handleActiveItem(item, false);
|
|
7881
7876
|
if (data && menu.onReturn) {
|