slick-components 17.0.46 → 17.0.48
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.
|
@@ -23,7 +23,7 @@ class SlickInitParams {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
class SlickInitService {
|
|
26
|
-
static { this.version = "17.0.
|
|
26
|
+
static { this.version = "17.0.48"; }
|
|
27
27
|
constructor() { }
|
|
28
28
|
static init(initParams) {
|
|
29
29
|
console.info(`Slick Components Version ${SlickInitService.version}`);
|
|
@@ -5768,7 +5768,7 @@ class SlickGridComponent {
|
|
|
5768
5768
|
this.requestModel.page = 1;
|
|
5769
5769
|
await this.resizeGrid();
|
|
5770
5770
|
this.requestModel.recordsPerPage = this.recordsPerPage;
|
|
5771
|
-
this.reload(
|
|
5771
|
+
this.reload();
|
|
5772
5772
|
}, 500);
|
|
5773
5773
|
}
|
|
5774
5774
|
}
|
|
@@ -5885,7 +5885,7 @@ class SlickGridComponent {
|
|
|
5885
5885
|
this.currentPage = 1;
|
|
5886
5886
|
this.requestModel.page = 1;
|
|
5887
5887
|
this.requestModel.recordsPerPage = this.recordsPerPage;
|
|
5888
|
-
await this.reload(
|
|
5888
|
+
await this.reload();
|
|
5889
5889
|
if (this.visibleData && this.visibleData.length > 0 && this.gridOptions.autoSelectFirstRow === true)
|
|
5890
5890
|
this.selectRow(0);
|
|
5891
5891
|
this.functionLockService.release("GRID_" + this.uuid + "_DATA_CHANGES");
|
|
@@ -5978,7 +5978,7 @@ class SlickGridComponent {
|
|
|
5978
5978
|
async onPageChange(pageNumber, selectRow = true) {
|
|
5979
5979
|
this.currentPage = pageNumber;
|
|
5980
5980
|
this.requestModel.page = pageNumber;
|
|
5981
|
-
await this.reload(
|
|
5981
|
+
await this.reload();
|
|
5982
5982
|
this.selectedIndex = (this.gridOptions.autoSelectFirstRow === true) ? 0 : null;
|
|
5983
5983
|
if (selectRow === true && this.gridOptions.autoSelectFirstRow === true) {
|
|
5984
5984
|
const rowData = this.visibleData[this.selectedIndex];
|
|
@@ -5995,7 +5995,7 @@ class SlickGridComponent {
|
|
|
5995
5995
|
this.requestModel.additionalParams = additionalParams;
|
|
5996
5996
|
this.requestModel.page = this.currentPage;
|
|
5997
5997
|
this.requestModel.recordsPerPage = this.recordsPerPage;
|
|
5998
|
-
let responseModel = await this.reload(
|
|
5998
|
+
let responseModel = await this.reload();
|
|
5999
5999
|
this.functionLockService.release("GRID_" + this.uuid + "_RELOADGRID");
|
|
6000
6000
|
return Promise.resolve(responseModel);
|
|
6001
6001
|
}
|
|
@@ -6011,7 +6011,14 @@ class SlickGridComponent {
|
|
|
6011
6011
|
this.requestModel = requestModel;
|
|
6012
6012
|
this.currentPage = 1;
|
|
6013
6013
|
this.requestModel.page = 1;
|
|
6014
|
-
let responseModel =
|
|
6014
|
+
let responseModel = null;
|
|
6015
|
+
if (requestModel.url)
|
|
6016
|
+
responseModel = await this.gridService.getDataFromServer(requestModel);
|
|
6017
|
+
else
|
|
6018
|
+
responseModel = await this.gridService.getDataFromDataObj(requestModel, this.data);
|
|
6019
|
+
this.loaded = true;
|
|
6020
|
+
this.totalRecords = responseModel.totalRecords;
|
|
6021
|
+
this.visibleData = responseModel.data;
|
|
6015
6022
|
this.functionLockService.release("GRID_" + this.uuid + "_RELOADGRIDWITHREQUESTMODEL");
|
|
6016
6023
|
return Promise.resolve(responseModel);
|
|
6017
6024
|
}
|
|
@@ -6020,10 +6027,10 @@ class SlickGridComponent {
|
|
|
6020
6027
|
return Promise.reject(error);
|
|
6021
6028
|
}
|
|
6022
6029
|
}
|
|
6023
|
-
async reload(
|
|
6030
|
+
async reload() {
|
|
6024
6031
|
try {
|
|
6025
6032
|
await this.functionLockService.lock("GRID_" + this.uuid + "_RELOAD");
|
|
6026
|
-
requestModel = this.getRequestModel(this.requestModel);
|
|
6033
|
+
const requestModel = this.getRequestModel(this.requestModel);
|
|
6027
6034
|
let responseModel = null;
|
|
6028
6035
|
if (requestModel.url)
|
|
6029
6036
|
responseModel = await this.gridService.getDataFromServer(requestModel);
|
|
@@ -6073,7 +6080,7 @@ class SlickGridComponent {
|
|
|
6073
6080
|
this.saveColumnsToLocalStorage();
|
|
6074
6081
|
this.currentPage = 1;
|
|
6075
6082
|
this.requestModel.page = 1;
|
|
6076
|
-
await this.reload(
|
|
6083
|
+
await this.reload();
|
|
6077
6084
|
if (this.visibleData && this.visibleData.length > 0 && this.gridOptions.autoSelectFirstRow === true)
|
|
6078
6085
|
this.selectRow(0);
|
|
6079
6086
|
}
|
|
@@ -6090,6 +6097,7 @@ class SlickGridComponent {
|
|
|
6090
6097
|
searchValueId: ddValue.id,
|
|
6091
6098
|
searchValueText: ddValue.text
|
|
6092
6099
|
});
|
|
6100
|
+
column.filterDropdownValue;
|
|
6093
6101
|
column.isFiltering = true;
|
|
6094
6102
|
}
|
|
6095
6103
|
else {
|
|
@@ -6101,7 +6109,7 @@ class SlickGridComponent {
|
|
|
6101
6109
|
return;
|
|
6102
6110
|
this.currentPage = 1;
|
|
6103
6111
|
this.requestModel.page = 1;
|
|
6104
|
-
await this.reload(
|
|
6112
|
+
await this.reload();
|
|
6105
6113
|
if (this.visibleData && this.visibleData.length > 0 && this.gridOptions.autoSelectFirstRow === true)
|
|
6106
6114
|
this.selectRow(0);
|
|
6107
6115
|
}
|
|
@@ -6133,7 +6141,7 @@ class SlickGridComponent {
|
|
|
6133
6141
|
return;
|
|
6134
6142
|
this.currentPage = 1;
|
|
6135
6143
|
this.requestModel.page = 1;
|
|
6136
|
-
await this.reload(
|
|
6144
|
+
await this.reload();
|
|
6137
6145
|
if (this.visibleData && this.visibleData.length > 0 && this.gridOptions.autoSelectFirstRow === true)
|
|
6138
6146
|
this.selectRow(0);
|
|
6139
6147
|
}, 250);
|
|
@@ -6156,7 +6164,7 @@ class SlickGridComponent {
|
|
|
6156
6164
|
return;
|
|
6157
6165
|
this.currentPage = 1;
|
|
6158
6166
|
this.requestModel.page = 1;
|
|
6159
|
-
await this.reload(
|
|
6167
|
+
await this.reload();
|
|
6160
6168
|
if (this.visibleData && this.visibleData.length > 0 && this.gridOptions.autoSelectFirstRow === true)
|
|
6161
6169
|
this.selectRow(0);
|
|
6162
6170
|
}
|
|
@@ -6273,7 +6281,7 @@ class SlickGridComponent {
|
|
|
6273
6281
|
this.currentPage = 1;
|
|
6274
6282
|
this.requestModel.page = 1;
|
|
6275
6283
|
this.requestModel.recordsPerPage = this.recordsPerPage;
|
|
6276
|
-
await this.reload(
|
|
6284
|
+
await this.reload();
|
|
6277
6285
|
}
|
|
6278
6286
|
onSaveColumns() {
|
|
6279
6287
|
this.saveDialogColumnsToLocalStorage();
|
|
@@ -6417,20 +6425,11 @@ class SlickGridComponent {
|
|
|
6417
6425
|
requestModel.columnSearchValues = [];
|
|
6418
6426
|
this.gridOptions.columns.forEach(c => {
|
|
6419
6427
|
if (c.visible) {
|
|
6420
|
-
if (c.filterType === SlickGridColumnFilterTypes.text && c.filterText) {
|
|
6421
|
-
c.filterText = c.filterText;
|
|
6422
|
-
requestModel.columnSearchValues.push({
|
|
6423
|
-
columnName: c.dataFieldName,
|
|
6424
|
-
searchValueId: null,
|
|
6425
|
-
searchValueText: c.filterText
|
|
6426
|
-
});
|
|
6427
|
-
}
|
|
6428
|
-
else if (c.filterType === SlickGridColumnFilterTypes.dropdown && c.filterDropdownValue) {
|
|
6429
|
-
c.filterDropdownValue = c.filterDropdownValue;
|
|
6428
|
+
if ((c.filterType === SlickGridColumnFilterTypes.text && c.filterText) || (c.filterType === SlickGridColumnFilterTypes.dropdown && c.filterDropdownValue)) {
|
|
6430
6429
|
requestModel.columnSearchValues.push({
|
|
6431
6430
|
columnName: c.dataFieldName,
|
|
6432
6431
|
searchValueId: c.filterDropdownValue,
|
|
6433
|
-
searchValueText:
|
|
6432
|
+
searchValueText: c.filterText
|
|
6434
6433
|
});
|
|
6435
6434
|
}
|
|
6436
6435
|
}
|