@acorex/data-grid 6.5.60 → 6.5.61
Sign up to get free protection for your applications and to get access to all the features.
@@ -825,6 +825,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
825
825
|
}]
|
826
826
|
}] });
|
827
827
|
|
828
|
+
LicenseManager.prototype.isDisplayWatermark = () => {
|
829
|
+
return false;
|
830
|
+
};
|
828
831
|
LicenseManager.prototype.validateLicense = function () {
|
829
832
|
//console.info('Cracked by Arash Oshnoudi!');
|
830
833
|
};
|
@@ -861,8 +864,8 @@ class AXDataGridComponent {
|
|
861
864
|
this.paginationPageSize = 20;
|
862
865
|
this.cacheBlockSize = this.paginationPageSize;
|
863
866
|
this.remoteOperation = false;
|
864
|
-
this.rowMultiSelectWithClick =
|
865
|
-
this.suppressRowClickSelection =
|
867
|
+
this.rowMultiSelectWithClick = false;
|
868
|
+
this.suppressRowClickSelection = false;
|
866
869
|
this.suppressCellSelection = false;
|
867
870
|
this.sizeColumnsToFit = true;
|
868
871
|
this.showCheckBox = true;
|
@@ -870,7 +873,7 @@ class AXDataGridComponent {
|
|
870
873
|
// @Input()
|
871
874
|
// takeCount: number;
|
872
875
|
this.autoGroupColumnDef = {};
|
873
|
-
this.selectionMode = '
|
876
|
+
this.selectionMode = 'multiple';
|
874
877
|
// @Input()
|
875
878
|
// allowFiltering: boolean = false;
|
876
879
|
this.pagination = true;
|
@@ -885,7 +888,7 @@ class AXDataGridComponent {
|
|
885
888
|
this._columns = [];
|
886
889
|
this.defaultColDef = {
|
887
890
|
filter: true,
|
888
|
-
floatingFilter: true
|
891
|
+
floatingFilter: true,
|
889
892
|
};
|
890
893
|
this.groupHideOpenParents = false;
|
891
894
|
this.cellClick = new EventEmitter();
|
@@ -906,7 +909,7 @@ class AXDataGridComponent {
|
|
906
909
|
this.getCurrentPageNumber = () => {
|
907
910
|
return {
|
908
911
|
current: this.gridApi.paginationGetCurrentPage() + 1,
|
909
|
-
total: this.gridApi.paginationGetTotalPages()
|
912
|
+
total: this.gridApi.paginationGetTotalPages(),
|
910
913
|
};
|
911
914
|
};
|
912
915
|
this.getServerSideGroupKey = (e) => {
|
@@ -918,7 +921,7 @@ class AXDataGridComponent {
|
|
918
921
|
return this.rowClass({
|
919
922
|
rowIndex: p.node.rowIndex,
|
920
923
|
rowLevel: p.node.level,
|
921
|
-
data: p.data
|
924
|
+
data: p.data,
|
922
925
|
});
|
923
926
|
}
|
924
927
|
else {
|
@@ -956,13 +959,20 @@ class AXDataGridComponent {
|
|
956
959
|
}
|
957
960
|
}
|
958
961
|
get columns() {
|
959
|
-
return this._inlineColumns
|
962
|
+
return this._inlineColumns
|
963
|
+
? [...this._columns, ...this._inlineColumns.toArray()]
|
964
|
+
: this._columns;
|
960
965
|
}
|
961
966
|
set columns(val) {
|
962
967
|
if (val && val.length) {
|
963
968
|
let old = this._columns;
|
964
969
|
this._columns = val;
|
965
|
-
this.columnsChange.emit({
|
970
|
+
this.columnsChange.emit({
|
971
|
+
component: this,
|
972
|
+
value: val,
|
973
|
+
oldValue: old,
|
974
|
+
htmlElement: this.ref.nativeElement,
|
975
|
+
});
|
966
976
|
}
|
967
977
|
}
|
968
978
|
get dataSource() {
|
@@ -992,17 +1002,17 @@ class AXDataGridComponent {
|
|
992
1002
|
loadParams.sort = params.request.sortModel.map((c) => {
|
993
1003
|
return {
|
994
1004
|
field: c.colId,
|
995
|
-
dir: c.sort
|
1005
|
+
dir: c.sort,
|
996
1006
|
};
|
997
1007
|
});
|
998
1008
|
loadParams.group = {
|
999
1009
|
fields: params.request.rowGroupCols.map((r) => r.field),
|
1000
1010
|
keys: params.request.groupKeys,
|
1001
|
-
parentData: params.parentNode.data
|
1011
|
+
parentData: params.parentNode.data,
|
1002
1012
|
};
|
1003
1013
|
loadParams.filter = params.request.filterModel;
|
1004
1014
|
that.dataSource.fetch(loadParams);
|
1005
|
-
}
|
1015
|
+
},
|
1006
1016
|
};
|
1007
1017
|
}
|
1008
1018
|
getMainMenuItems(e) {
|
@@ -1019,7 +1029,8 @@ class AXDataGridComponent {
|
|
1019
1029
|
this.handlePageSize();
|
1020
1030
|
}
|
1021
1031
|
else {
|
1022
|
-
this.cacheBlockSize =
|
1032
|
+
this.cacheBlockSize =
|
1033
|
+
this.paginationPageSize > 20 ? this.paginationPageSize : 100;
|
1023
1034
|
}
|
1024
1035
|
this.gridApi = gridOptions.api;
|
1025
1036
|
this.mapColumns();
|
@@ -1046,7 +1057,8 @@ class AXDataGridComponent {
|
|
1046
1057
|
this.masterDetail = true;
|
1047
1058
|
this.detailCellRendererParams = this.gridDetailTemplate.params;
|
1048
1059
|
this.detailCellRenderer = 'detailRendererFramework';
|
1049
|
-
this.frameworkComponents.detailRendererFramework =
|
1060
|
+
this.frameworkComponents.detailRendererFramework =
|
1061
|
+
this.gridDetailTemplate.renderer;
|
1050
1062
|
this.detailRowHeight = this.gridDetailTemplate.height;
|
1051
1063
|
}
|
1052
1064
|
this.isFullWidthCell = () => {
|
@@ -1066,13 +1078,19 @@ class AXDataGridComponent {
|
|
1066
1078
|
}
|
1067
1079
|
//
|
1068
1080
|
if (this.rtl == null) {
|
1069
|
-
this.rtl =
|
1081
|
+
this.rtl =
|
1082
|
+
window
|
1083
|
+
.getComputedStyle(this.ref.nativeElement, null)
|
1084
|
+
.getPropertyValue('direction') === 'rtl';
|
1070
1085
|
}
|
1071
1086
|
//
|
1072
1087
|
}
|
1073
1088
|
gridSelectRow() {
|
1074
1089
|
if (this.gridApi) {
|
1075
|
-
if (this.selectRow &&
|
1090
|
+
if (this.selectRow &&
|
1091
|
+
this.selectRow.length > 0 &&
|
1092
|
+
this.gridApi !== undefined &&
|
1093
|
+
typeof this.selectRow[0] != 'object') {
|
1076
1094
|
this.gridApi.forEachNode((node) => {
|
1077
1095
|
if (node.data !== undefined) {
|
1078
1096
|
let select = false;
|
@@ -1123,7 +1141,7 @@ class AXDataGridComponent {
|
|
1123
1141
|
headerName: groupColumn.headerName,
|
1124
1142
|
width: groupColumn.width,
|
1125
1143
|
cellRendererParams: { checkbox: this.showCheckBox },
|
1126
|
-
field: groupColumn.field
|
1144
|
+
field: groupColumn.field,
|
1127
1145
|
};
|
1128
1146
|
this.columnDefs.forEach((elm) => {
|
1129
1147
|
if (elm.rowGroupIndex > -1) {
|
@@ -1177,7 +1195,8 @@ class AXDataGridComponent {
|
|
1177
1195
|
mapColumns() {
|
1178
1196
|
this.columnDefs = this.columns.map((c) => c.render());
|
1179
1197
|
if (this.gridDetailTemplate) {
|
1180
|
-
if (this.columnDefs[0].checkboxSelection === true &&
|
1198
|
+
if (this.columnDefs[0].checkboxSelection === true &&
|
1199
|
+
this.columnDefs[0].field === '') {
|
1181
1200
|
this.columnDefs[1].cellRenderer = 'agGroupCellRenderer';
|
1182
1201
|
}
|
1183
1202
|
else {
|
@@ -1191,7 +1210,7 @@ class AXDataGridComponent {
|
|
1191
1210
|
headerName: groupColumn.headerName,
|
1192
1211
|
width: groupColumn.width,
|
1193
1212
|
cellRendererParams: { checkbox: this.showCheckBox },
|
1194
|
-
field: groupColumn.field
|
1213
|
+
field: groupColumn.field,
|
1195
1214
|
};
|
1196
1215
|
}
|
1197
1216
|
}
|
@@ -1210,7 +1229,7 @@ class AXDataGridComponent {
|
|
1210
1229
|
headerName: eee.colDef.headerName,
|
1211
1230
|
width: eee.colDef.width,
|
1212
1231
|
cellRendererParams: { checkbox: this.showCheckBox },
|
1213
|
-
field: eee.colDef.field
|
1232
|
+
field: eee.colDef.field,
|
1214
1233
|
};
|
1215
1234
|
}
|
1216
1235
|
}
|
@@ -1225,22 +1244,42 @@ class AXDataGridComponent {
|
|
1225
1244
|
}
|
1226
1245
|
}
|
1227
1246
|
internalGridCellClicked(e) {
|
1228
|
-
this.cellClick.emit({
|
1247
|
+
this.cellClick.emit({
|
1248
|
+
data: this.mapCellEvent(e),
|
1249
|
+
component: this,
|
1250
|
+
htmlElement: this.ref.nativeElement,
|
1251
|
+
});
|
1229
1252
|
}
|
1230
1253
|
internalGridCellDoubleClicked(e) {
|
1231
|
-
this.cellDbClick.emit({
|
1254
|
+
this.cellDbClick.emit({
|
1255
|
+
data: this.mapCellEvent(e),
|
1256
|
+
component: this,
|
1257
|
+
htmlElement: this.ref.nativeElement,
|
1258
|
+
});
|
1232
1259
|
}
|
1233
1260
|
internalGridCellFocused(e) {
|
1234
|
-
this.cellFocuse.emit({
|
1261
|
+
this.cellFocuse.emit({
|
1262
|
+
data: this.mapCellEvent(e),
|
1263
|
+
htmlElement: this.ref.nativeElement,
|
1264
|
+
component: this,
|
1265
|
+
});
|
1235
1266
|
}
|
1236
1267
|
internalGridRowClicked(e) {
|
1237
1268
|
if (!e.node.group) {
|
1238
|
-
this.rowClick.emit({
|
1269
|
+
this.rowClick.emit({
|
1270
|
+
data: this.mapRowEvent(e),
|
1271
|
+
component: this,
|
1272
|
+
htmlElement: this.ref.nativeElement,
|
1273
|
+
});
|
1239
1274
|
}
|
1240
1275
|
}
|
1241
1276
|
internalGridRowDoubleClicked(e) {
|
1242
1277
|
if (!e.node.group) {
|
1243
|
-
this.rowDbClick.emit({
|
1278
|
+
this.rowDbClick.emit({
|
1279
|
+
data: this.mapRowEvent(e),
|
1280
|
+
htmlElement: this.ref.nativeElement,
|
1281
|
+
component: this,
|
1282
|
+
});
|
1244
1283
|
}
|
1245
1284
|
}
|
1246
1285
|
differenceOf2Arrays(array1, array2) {
|
@@ -1265,7 +1304,11 @@ class AXDataGridComponent {
|
|
1265
1304
|
else {
|
1266
1305
|
this.selectRow = this.selectRow.filter((c) => c[this.keyField] != e.data[this.keyField]);
|
1267
1306
|
}
|
1268
|
-
this.rowSelectionChange.emit({
|
1307
|
+
this.rowSelectionChange.emit({
|
1308
|
+
component: this,
|
1309
|
+
data: e,
|
1310
|
+
htmlElement: this.ref.nativeElement,
|
1311
|
+
});
|
1269
1312
|
}
|
1270
1313
|
internalGridSelectionChanged(e) {
|
1271
1314
|
const args = { items: [] };
|
@@ -1275,13 +1318,22 @@ class AXDataGridComponent {
|
|
1275
1318
|
args.items.push({
|
1276
1319
|
rowLevel: i.level,
|
1277
1320
|
rowIndex: i.rowIndex,
|
1278
|
-
data: i.data
|
1321
|
+
data: i.data,
|
1279
1322
|
});
|
1280
1323
|
});
|
1281
|
-
this.selectionChanged.emit({
|
1324
|
+
this.selectionChanged.emit({
|
1325
|
+
data: args,
|
1326
|
+
component: this,
|
1327
|
+
htmlElement: this.ref.nativeElement,
|
1328
|
+
});
|
1282
1329
|
let action = nodes.length > oldNodes.length ? true : false;
|
1283
1330
|
const node = this.differenceOf2Arrays(nodes, oldNodes);
|
1284
|
-
this.onRowSelectionChanged.emit({
|
1331
|
+
this.onRowSelectionChanged.emit({
|
1332
|
+
component: this,
|
1333
|
+
selected: action,
|
1334
|
+
data: node,
|
1335
|
+
htmlElement: this.ref.nativeElement,
|
1336
|
+
});
|
1285
1337
|
this.oldSelectionNodes = nodes;
|
1286
1338
|
}
|
1287
1339
|
mapCellEvent(e) {
|
@@ -1290,14 +1342,14 @@ class AXDataGridComponent {
|
|
1290
1342
|
column: e.column,
|
1291
1343
|
data: e.data,
|
1292
1344
|
rowIndex: e.rowIndex,
|
1293
|
-
value: e.value
|
1345
|
+
value: e.value,
|
1294
1346
|
};
|
1295
1347
|
}
|
1296
1348
|
mapRowEvent(e) {
|
1297
1349
|
return {
|
1298
1350
|
rowLevel: 0,
|
1299
1351
|
data: e.data,
|
1300
|
-
rowIndex: e.rowIndex
|
1352
|
+
rowIndex: e.rowIndex,
|
1301
1353
|
};
|
1302
1354
|
}
|
1303
1355
|
deselectAll() {
|