@refinitiv-ui/efx-grid 6.0.130 → 6.0.132

Sign up to get free protection for your applications and to get access to all the features.
@@ -73,6 +73,8 @@ declare class RowDraggingPlugin extends GridPlugin {
73
73
 
74
74
  public setJETDragContent(content: any): void;
75
75
 
76
+ public moveRows(srcRowIndices: (number)[]|null, destRowIndex: number, srcGrid?: any, destGrid?: any): number;
77
+
76
78
  }
77
79
 
78
80
  export default RowDraggingPlugin;
@@ -83,7 +83,12 @@ import { cloneObject, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util
83
83
  * @return {boolean}
84
84
  */
85
85
  let _isInContentSection = function (pos) {
86
- return (pos && pos["sectionType"] === "content") ? true : false;
86
+ if(pos) {
87
+ if(pos["sectionType"] === "content") {
88
+ return pos["sectionName"] !== "bottomPadding";
89
+ }
90
+ }
91
+ return false;
87
92
  };
88
93
 
89
94
  /** @private
@@ -107,6 +112,20 @@ let _isNormalRowType = function (rowType) {
107
112
  }
108
113
  };
109
114
 
115
+ /** @private
116
+ * @param {Object} api
117
+ * @param {number|string} rowRef
118
+ * @returns {string}
119
+ */
120
+ let _getRowType = function (api, rowRef) {
121
+ if(api) {
122
+ if(api.getRowType) {
123
+ return api.getRowType(rowRef);
124
+ }
125
+ }
126
+ return "CONTENT";
127
+ };
128
+
110
129
  /** @constructor
111
130
  * @param {RowDraggingPlugin.Options=} options
112
131
  * @extends {GridPlugin}
@@ -130,6 +149,7 @@ let RowDraggingPlugin = function (options) {
130
149
  t._onJETDrop = t._onJETDrop.bind(t);
131
150
  t._onJETDragOver = t._onJETDragOver.bind(t);
132
151
  t._delayStart = t._delayStart.bind(t);
152
+ t._onMouseOut = t._onMouseOut.bind(t);
133
153
 
134
154
  t._hosts = [];
135
155
 
@@ -261,7 +281,7 @@ RowDraggingPlugin.prototype._dragUI = null;
261
281
  /** @type {number}
262
282
  * @private
263
283
  */
264
- RowDraggingPlugin.prototype._timerId = -1;
284
+ RowDraggingPlugin.prototype._timerId = 0;
265
285
  /** @type {boolean}
266
286
  * @private
267
287
  */
@@ -378,6 +398,10 @@ RowDraggingPlugin.prototype.unload = function (host) {
378
398
 
379
399
  this._clearCache();
380
400
  }
401
+ if(this._timerId) {
402
+ clearTimeout(this._timerId);
403
+ this._timerId = 0;
404
+ }
381
405
  this._dispose();
382
406
  };
383
407
 
@@ -570,13 +594,10 @@ RowDraggingPlugin.prototype.startDrag = function (startRef) {
570
594
  };
571
595
  /** @public */
572
596
  RowDraggingPlugin.prototype.stopDrag = function () {
573
- if (!this._dragging) {
574
- this.cancelDrag(); // Cancel drag if this method is called on dragStart event
575
- return;
597
+ this.cancelDrag(); // Cancel drag if this method is called on dragStart event
598
+ if(this._dragging) {
599
+ this._onDragEnd();
576
600
  }
577
-
578
- this.cancelDrag();
579
- this._onDragEnd();
580
601
  };
581
602
  /** @public */
582
603
  RowDraggingPlugin.prototype.cancelDrag = function () {
@@ -764,6 +785,8 @@ RowDraggingPlugin.prototype._onMouseDown = function (e) {
764
785
  * @param {boolean=} fromJET
765
786
  */
766
787
  RowDraggingPlugin.prototype._onDragStart = function (e, fromJET) {
788
+ this._timerId = 0;
789
+
767
790
  if (this._dragging) { return; }
768
791
  if (!this._pos) { return; }
769
792
 
@@ -814,9 +837,7 @@ RowDraggingPlugin.prototype._onDragStart = function (e, fromJET) {
814
837
  let dv = grid.getDataSource();
815
838
  this._startingRid = dv.getRowId(rowIndex);
816
839
  this._startingGrid = grid;
817
- let api = this.getGridApi();
818
- let rowType = api.getRowType(rowIndex);
819
- this._startingRowType = rowType;
840
+ this._startingRowType = _getRowType(this.getGridApi(grid), rowIndex);
820
841
 
821
842
  if (this._dragBoxRenderer) { // For custom drag box rendering
822
843
  let arg = cloneObject(e); // TODO: Check if cloning is necessary
@@ -872,34 +893,36 @@ RowDraggingPlugin.prototype._onMouseMove = function (e) {
872
893
  Dom.preventDefault(e);
873
894
  }
874
895
 
875
- var prevPos = this._pos;
876
- this._pos = this._hitTest(e); // A new object is created
877
-
878
- if(this._pos["grid"] && prevPos) { // mouse is in grid area
879
- if(this._pos["sectionType"] !== "content") { // mouse is in title or footer section, or grid has no row
880
- this._pos = prevPos;
896
+ let newPos = this._hitTest(e); // A new object is created
897
+ if(newPos["grid"]) { //Mouse is in grid area
898
+ if(_isInContentSection(this._pos) && this._pos["grid"] === newPos["grid"]) {
899
+ if(!_isInContentSection(newPos) || !(newPos["rowIndex"] >= 0)) { // Mouse is on un-dropable area
900
+ newPos = null;
901
+ }
881
902
  }
882
903
  }
904
+ if(newPos) {
905
+ this._pos = newPos;
906
+ } else {
907
+ newPos = this._pos;
908
+ }
883
909
 
884
- this._pos["dragBox"] = this._dragBox; // assign dragBox for user determine valid target
910
+ newPos["dragBox"] = this._dragBox; // assign dragBox for user determine valid target
885
911
 
886
912
  // need to check grid properties because row can be move outside the grid
887
- if(this._pos["grid"] && this._shouldPreventDrop(this._pos["rowIndex"])) {
888
- this._pos.dragBoxIcon = "void";
913
+ if(this._shouldPreventDrop(newPos)) {
914
+ newPos.dragBoxIcon = "void";
889
915
  }
890
916
 
891
- let dropable = true;
892
- if(this._entryPoint === 'JET' && !this._jetContentHasRic) {
893
- dropable = false;
894
- }
917
+ let dropable = (this._entryPoint !== "JET" || this._jetContentHasRic);
895
918
  if(dropable) {
896
919
  this._updateGuidePosition(e);
897
920
  }
898
921
 
899
922
  // Dispatch drag event to let user determine valid drop target using allowDrag (allowDrop) method
900
- this._dispatch("drag", this._pos);
923
+ this._dispatch("drag", newPos);
901
924
  if(!this._uiDisabled && dropable) {
902
- e.dragBoxIcon = this._pos.dragBoxIcon; // access event object instread of element for prevent element persistence
925
+ e.dragBoxIcon = newPos.dragBoxIcon; // access event object instread of element for prevent element persistence
903
926
  let drop = this._dragUI.renderDragBox(e, this._startingGrid);
904
927
  if(!drop) { // can not be drop or not allow to drop or insertion
905
928
  this.cancelDrag();
@@ -973,11 +996,33 @@ RowDraggingPlugin.prototype._onDragEnd = function (e) {
973
996
  this._clearCache();
974
997
  this._jetDragContent = null;
975
998
  };
999
+
1000
+ /** Move multiple rows to the specified row index. The move results will be based on row type of the given rows. The behavior is the same as drag and drop operation from this extension.
1001
+ * @public
1002
+ * @param {Array.<number>} srcRowIndices Array of row indices from the source Grid (e.g., row index or row id)
1003
+ * @param {number} destRowIndex Destination row index
1004
+ * @param {Object=} srcGrid Core grid instance of the source rows
1005
+ * @param {Object=} destGrid Core grid instance of the destination
1006
+ * @return {number} Number of rows from the given rows that have been moved
1007
+ */
1008
+ RowDraggingPlugin.prototype.moveRows = function (srcRowIndices, destRowIndex, srcGrid, destGrid) {
1009
+ if(!srcGrid) {
1010
+ srcGrid = this._startingGrid || this._hosts[0];
1011
+ if(!srcGrid) {
1012
+ return 0;
1013
+ }
1014
+ }
1015
+ if(!destGrid) {
1016
+ destGrid = srcGrid;
1017
+ }
1018
+
1019
+ return this._moveRows(srcRowIndices, destRowIndex, srcGrid, destGrid, {});
1020
+ };
976
1021
  /** @private
977
1022
  * @param {Array.<number>|string} srcRowRef
978
1023
  * @param {number} destRowIndex
979
- * @param {Object} srcGrid core grid instance
980
- * @param {Object} destGrid core grid instance
1024
+ * @param {!Object} srcGrid core grid instance
1025
+ * @param {!Object} destGrid core grid instance
981
1026
  * @param {!Object} evtArg
982
1027
  * @return {number}
983
1028
  */
@@ -986,7 +1031,7 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
986
1031
  let srcDv = srcGrid.getDataSource();
987
1032
  let destDv = destGrid.getDataSource();
988
1033
  if(typeof srcRowRef === "string") {
989
- let srcRowIndex = srcDv.getRowIndex(this._startingRid);
1034
+ let srcRowIndex = srcDv.getRowIndex(srcRowRef);
990
1035
  if(srcRowIndex >= 0) {
991
1036
  srcRowIndices = [srcRowIndex];
992
1037
  }
@@ -1001,24 +1046,24 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
1001
1046
  }
1002
1047
 
1003
1048
  // Available row types are ["CONTENT", "CHAIN", "CONSTITUENT", "GROUP_HEADER", "SUBGROUP_HEADER", "GROUP_MEMBER"]
1004
- let i, len;
1049
+ let i;
1005
1050
  let srcCount = srcRowIndices.length;
1006
1051
  let srcRowIds = new Array(srcCount);
1007
1052
  let srcRowTypes = [];
1008
1053
  let conRowType = "";
1009
- let api = this.getGridApi();
1054
+ let api = this.getGridApi(srcGrid);
1010
1055
  if(api && !api.getRowType) {
1011
1056
  api = null;
1012
1057
  }
1013
1058
  for(i = 0; i < srcCount; ++i) {
1014
1059
  let srcIndex = srcRowIndices[i];
1015
- let rowType = api ? api.getRowType(srcIndex) : "CONTENT";
1060
+ let rowType = _getRowType(api, srcIndex);
1016
1061
  srcRowIds[i] = srcDv.getRowId(srcIndex);
1017
1062
  srcRowTypes[i] = rowType;
1018
1063
  if(conRowType) {
1019
1064
  if(conRowType !== rowType) {
1020
1065
  conRowType = "MIXED";
1021
- }
1066
+ } // TODO: Check if the GROUP_MEMBER coms from the same parent
1022
1067
  } else {
1023
1068
  conRowType = rowType;
1024
1069
  }
@@ -1026,9 +1071,9 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
1026
1071
  if(!conRowType) {
1027
1072
  conRowType = "CONTENT";
1028
1073
  }
1029
- let destRowType = api ? api.getRowType(destRowIndex) : ""; // TODO: this has to be get from destGrid
1074
+ let destRowType = _getRowType(api, destRowIndex); // TODO: this has to be get from destGrid
1030
1075
  let destRowId = destDv.getRowId(destRowIndex);
1031
- let parentRowId, childRowIds;
1076
+ let destParentRowId = destDv.getSegmentParentRowId(destRowId);
1032
1077
 
1033
1078
  evtArg["rowIndex"] = srcRowIndices[0];
1034
1079
  evtArg["srcRowIndices"] = srcRowIndices;
@@ -1043,25 +1088,22 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
1043
1088
  return 0;
1044
1089
  }
1045
1090
 
1046
- let rsp = srcGrid.getPlugin("RowSegmentingPlugin");
1047
1091
  let movedRowIds = null;
1048
1092
  if(srcGrid === destGrid) { // TODO: Support wrap mode
1049
1093
  if(conRowType === "MIXED") {
1050
- movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1094
+ movedRowIds = srcDv.moveRow(srcRowIds, destRowId); // TODO: Handle each row individually in this mixed case
1051
1095
  } else if(conRowType === "CONTENT") {
1052
1096
  if(destRowType === "GROUP_HEADER") {
1053
- childRowIds = rsp.getSegmentChildIds(destRowId);
1054
- if(childRowIds) {
1097
+ if(srcDv.getSegmentChildIds(destRowId)) {
1055
1098
  movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1056
1099
  } else { // Add content row as a new member only if there is no member
1057
- rsp.addSegmentChildren(destRowId, srcRowIds);
1100
+ srcDv.addSegmentChildren(destRowId, srcRowIds);
1058
1101
  movedRowIds = srcRowIds;
1059
1102
  }
1060
1103
  } else if(_isNormalRowType(destRowType)) {
1061
1104
  movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1062
1105
  } else if(destRowType === "GROUP_MEMBER") {
1063
- parentRowId = rsp.getSegmentParentRowId(destRowId);
1064
- rsp.addSegmentChildren(parentRowId, srcRowIds);
1106
+ srcDv.addSegmentChildren(destParentRowId, srcRowIds);
1065
1107
 
1066
1108
  srcDv.moveRow(srcRowIds, destRowId);
1067
1109
  movedRowIds = srcRowIds;
@@ -1071,58 +1113,53 @@ RowDraggingPlugin.prototype._moveRows = function (srcRowRef, destRowIndex, srcGr
1071
1113
  movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1072
1114
  }
1073
1115
  } else if(conRowType === "GROUP_MEMBER") {
1074
- if(srcCount === 1) {
1116
+ if(destRowType !== "CONSTITUENT" && destRowType !== "SUBGROUP_HEADER") {
1075
1117
  let srcRowId = srcRowIds[0];
1076
- parentRowId = rsp.getSegmentParentRowId(srcRowId);
1077
- childRowIds = rsp.getSegmentChildIds(parentRowId);
1078
- let childCount = childRowIds ? childRowIds.length : 0;
1079
- let endOfSegment = srcDv.getRowIndex(parentRowId) + childCount + 1;
1080
- if(destRowIndex === endOfSegment) {
1081
- movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1082
- } else if(destRowType === "GROUP_MEMBER") {
1083
- let destParentRowId = rsp.getSegmentParentRowId(destRowId);
1084
- if(parentRowId === destParentRowId) {
1085
- movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1086
- } else { // Moving row between two segments
1087
- rsp.removeSegmentChild(parentRowId, srcRowId);
1088
- rsp.addSegmentChild(destParentRowId, srcRowId);
1089
- movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1118
+ let parentRowId = srcDv.getSegmentParentRowId(srcRowId);
1119
+ let endOfSegment = -1;
1120
+ if(!srcDv.isSegmentCollapsed(parentRowId)) {
1121
+ let childRowIds = srcDv.getSegmentChildIds(parentRowId);
1122
+ let childCount = childRowIds ? childRowIds.length : 0;
1123
+ endOfSegment = srcDv.getRowIndex(parentRowId) + childCount + 1;
1124
+ }
1125
+ if(destRowIndex !== endOfSegment) {
1126
+ if(destRowType !== "GROUP_MEMBER" || parentRowId !== destParentRowId) {
1127
+ srcDv.removeSegmentChildren(parentRowId, srcRowIds); // move members out of existing segment
1128
+ if(destParentRowId) {
1129
+ srcDv.addSegmentChildren(destParentRowId, srcRowIds); // Moving row between two segments
1130
+ }
1090
1131
  }
1091
- } else if(_isNormalRowType(destRowType)) { // move member out of existing segment
1092
- rsp.removeSegmentChild(parentRowId, srcRowIds[0]);
1093
-
1094
- movedRowIds = srcDv.moveRow(srcRowIds[0], destRowId);
1095
1132
  }
1096
- } else {
1097
1133
  movedRowIds = srcDv.moveRow(srcRowIds, destRowId);
1098
- }
1099
- } // else CONSTITUENT, SUBGROUP_HEADER and other types cannot be moved
1134
+ } // CONSTITUENT and SUBGROUP_HEADER types are not valid destination
1135
+ } // CONSTITUENT and SUBGROUP_HEADER types cannot be moved
1100
1136
  } else {
1101
1137
  // TODO: Add support moving row based on row types
1102
- // TODO: Check if we support moving to last row for multi table
1103
- movedRowIds = srcRowIds;
1138
+ // TODO: Check if we support moving to last row for multi-table
1139
+
1104
1140
  evtArg["destGrid"] = destGrid;
1105
1141
 
1106
- let originalRows = [];
1107
- for(i = 0; i < srcCount; ++i) {
1108
- let rowData = srcDv.getRowData(srcRowIds[i]);
1109
- if(rowData) {
1110
- originalRows.push(rowData);
1111
- }
1112
- }
1113
- len = originalRows.length;
1114
- if(len) {
1115
- srcDv.removeRows(srcRowIndices);
1116
- if(this._realTimeGrid) {
1117
- for(i = 0; i < len; ++i) {
1118
- let rowDef = originalRows[i]["ROW_DEF"];
1119
- rowDef.registerToView(destDv, destRowId);
1142
+ if(api) { // This can only be Real-time Grid
1143
+ let destApi = this.getGridApi(destGrid);
1144
+ if(destApi) {
1145
+ movedRowIds = srcRowIds;
1146
+ for(i = 0; i < srcCount; ++i) {
1147
+ let rowDef = api.getRowDefinition(srcRowIds[i]);
1148
+ if(rowDef) {
1149
+ destApi.insertRow(rowDef.getConfigObject(), destRowId);
1150
+ }
1120
1151
  }
1121
- } else {
1122
- for(i = 0; i < len; ++i) {
1123
- destDv.insertRow(destRowId, originalRows[i]); // TODO: Update view data source and grid
1152
+ api.removeRows(srcRowIds);
1153
+ }
1154
+ } else {
1155
+ movedRowIds = srcRowIds;
1156
+ for(i = 0; i < srcCount; ++i) {
1157
+ let rowData = srcDv.getRowData(srcRowIds[i]);
1158
+ if(rowData) {
1159
+ destDv.insertRow(destRowId, rowData); // TODO: Update view data source and grid
1124
1160
  }
1125
1161
  }
1162
+ srcDv.removeRows(srcRowIndices);
1126
1163
  }
1127
1164
  }
1128
1165
 
@@ -1206,34 +1243,34 @@ RowDraggingPlugin.prototype._updateGuidePosition = function (e) {
1206
1243
 
1207
1244
 
1208
1245
  /** @private
1209
- * @param {string|number} destRowRef
1246
+ * @param {Object} posObj
1210
1247
  * @return {boolean}
1211
1248
  */
1212
- RowDraggingPlugin.prototype._shouldPreventDrop = function (destRowRef) {
1213
-
1214
- let api = this.getGridApi();
1215
- if(!api) { // It should not move the row if api doesn't initialize
1216
- return false;
1217
- }
1218
-
1249
+ RowDraggingPlugin.prototype._shouldPreventDrop = function (posObj) {
1219
1250
  if(this._startingRowType === "CONSTITUENT" || this._startingRowType === "SUBGROUP_HEADER") {
1220
1251
  return true;
1221
1252
  }
1222
1253
 
1223
- let grid = this._pos["grid"];
1224
- let rsp = grid.getPlugin("RowSegmentingPlugin");
1225
- if(!rsp) { // If row segment extension is not used, row drag and drop will not be protected by default.
1254
+ if(!posObj) {
1226
1255
  return false;
1227
1256
  }
1228
- let destParentId = rsp.getSegmentParentRowId(destRowRef);
1229
- let startingParentId = rsp.getSegmentParentRowId(this._startingRid);
1230
- let destParentType;
1231
- if(this._startingRowType === "GROUP_MEMBER") {
1232
- let startingParentType = api.getRowType(startingParentId);
1233
- if(startingParentType === "SUBGROUP_HEADER") {
1234
- destParentType = api.getRowType(destParentId);
1257
+ let grid = posObj["grid"];
1258
+ if(!grid) {
1259
+ return false;
1260
+ }
1261
+ let dv = grid.getDataSource();
1262
+ if(!dv) {
1263
+ return false; // Grid has been disposed
1264
+ }
1235
1265
 
1236
- if(!startingParentId || !destParentId) {
1266
+ let destApi = this.getGridApi(grid);
1267
+ let destRowId = dv.getRowId(posObj["rowIndex"]);
1268
+ let destParentId = dv.getSegmentParentRowId(destRowId);
1269
+ if(this._startingRowType === "GROUP_MEMBER") {
1270
+ let startingParentId = dv.getSegmentParentRowId(this._startingRid);
1271
+ let startingApi = this.getGridApi(this._startingGrid);
1272
+ if(_getRowType(startingApi, startingParentId) === "SUBGROUP_HEADER") {
1273
+ if(!destParentId) {
1237
1274
  return true;
1238
1275
  }
1239
1276
 
@@ -1243,25 +1280,23 @@ RowDraggingPlugin.prototype._shouldPreventDrop = function (destRowRef) {
1243
1280
  return true;
1244
1281
  }
1245
1282
  // else { } starting have GROUP_HEADER case, it can be move outside the group
1246
-
1247
1283
  } else if(this._startingRowType === "CHAIN" ) {
1248
1284
  if(destParentId) { // CHAIN can not move inside the member that have parent
1249
1285
  return true;
1250
1286
  }
1251
1287
  } else if (this._startingRowType === "GROUP_HEADER") {
1252
- if( destParentId !== startingParentId) { // GROUP_HEADER can't move inside another GROUP or SUBGROUP
1288
+ if(destParentId) { // GROUP_HEADER can't move inside another GROUP, SUBGROUP, or the same group
1253
1289
  return true;
1254
1290
  }
1255
1291
  }
1256
1292
 
1257
- let destRowType = api.getRowType(destRowRef);
1293
+ let destRowType = _getRowType(destApi, destRowId);
1258
1294
  if(destRowType === "CONSTITUENT" || destRowType === "SUBGROUP_HEADER") { // Do not allow dropping this type when starting with any row types
1259
1295
  return true;
1260
1296
  }
1261
1297
 
1262
1298
  if(destRowType === "GROUP_MEMBER") {
1263
- destParentType = api.getRowType(destParentId);
1264
- if(destParentType === "SUBGROUP_HEADER") { // Do not allow to drop group member that have parent is SUBGROUP_HEADER
1299
+ if(_getRowType(destApi, destParentId) === "SUBGROUP_HEADER") { // Do not allow to drop group member that have parent is SUBGROUP_HEADER
1265
1300
  return true;
1266
1301
  }
1267
1302
  }
@@ -1323,11 +1358,14 @@ RowDraggingPlugin.prototype._setEntryPoint = function (str) {
1323
1358
  * @param {Object} e
1324
1359
  */
1325
1360
  RowDraggingPlugin.prototype._onMouseOut = function (e) {
1326
- e = e ? e : window.event;
1361
+ if(!e) {
1362
+ e = window.event;
1363
+ if(!e) {
1364
+ return;
1365
+ }
1366
+ }
1327
1367
  let from = e.relatedTarget || e.toElement;
1328
1368
  if (!from || from.nodeName == "HTML") {
1329
- // window.console.warn("Left window");
1330
-
1331
1369
  /*
1332
1370
  * TRGRID-1493
1333
1371
  * The DragStart is delayed using a timer (_timerId created by _delayStart )
@@ -1337,9 +1375,9 @@ RowDraggingPlugin.prototype._onMouseOut = function (e) {
1337
1375
  */
1338
1376
 
1339
1377
  // cancel the timer - _onDragStart will not be called by the timer
1340
- if(this._timerId >= 0) {
1378
+ if(this._timerId) {
1341
1379
  clearTimeout(this._timerId);
1342
- this._timerId = -1;
1380
+ this._timerId = 0;
1343
1381
  }
1344
1382
 
1345
1383
  this._onDragStart();
@@ -1353,7 +1391,7 @@ RowDraggingPlugin.prototype._onMouseOut = function (e) {
1353
1391
  RowDraggingPlugin.prototype._delayStart = function (e) {
1354
1392
  this._startingGrid.unlisten("mousemove", this._delayStart);
1355
1393
 
1356
- if (this._timerId < 0) {
1394
+ if(!this._timerId) {
1357
1395
  this._timerId = window.setTimeout(this._onDragStart, 200);
1358
1396
  }
1359
1397
  if (this._jetDnD) {
@@ -1437,6 +1475,16 @@ RowDraggingPlugin.prototype._onJETDrop = function (jetObj) {
1437
1475
  this._onDragEnd(jetObj["mouse"]["srcEvent"]);
1438
1476
  };
1439
1477
 
1478
+ /** @public
1479
+ * @ignore
1480
+ * @return {!Object}
1481
+ */
1482
+ RowDraggingPlugin.prototype._getEventHandlers = function() {
1483
+ return {
1484
+ "mouseout": this._onMouseOut
1485
+ };
1486
+ };
1487
+
1440
1488
 
1441
1489
 
1442
1490
  export default RowDraggingPlugin;
@@ -282,6 +282,10 @@ RowFilteringPlugin.prototype._activeColFilters = null;
282
282
  * @private
283
283
  */
284
284
  RowFilteringPlugin.prototype._iconActivation = "onActiveFilter";
285
+ /** @type {string}
286
+ * @private
287
+ */
288
+ RowFilteringPlugin.prototype._iconTag = "";
285
289
  /** @type {number}
286
290
  * @private
287
291
  */
@@ -369,6 +373,9 @@ RowFilteringPlugin.prototype.initialize = function (host, options) {
369
373
  "color: var(--grid-header-txtcolor,inherit);"
370
374
  ],
371
375
  ".always-on-filter .active-filter .floating-panel .title-filter-icon", [
376
+ "color: var(--grid-title-icon-color,inherit);"
377
+ ],
378
+ ".always-on-filter .active-filter .floating-panel .title-filter-icon:hover", [
372
379
  "color: var(--grid-title-filter-icon-hover-color,inherit);"
373
380
  ],
374
381
  ".hovering-filter-icon .tiny-col .cell:hover, .tr-grid .tiny-col .cell.active-filter", [
@@ -445,6 +452,17 @@ RowFilteringPlugin.prototype.unload = function (host) {
445
452
  * @ignore
446
453
  */
447
454
  RowFilteringPlugin.prototype._afterInit = function() {
455
+ if(!this._iconTag) {
456
+ let tagName = "ef-icon";
457
+ if(ElfUtil.hasComponent(tagName) >= 3) {
458
+ this._iconTag = tagName;
459
+ } else if(ElfUtil.hasComponent("ef-icon")) {
460
+ this._iconTag = "ef-icon";
461
+ } else {
462
+ this._iconTag = "div";
463
+ }
464
+ this._updateAllColumnIcons();
465
+ }
448
466
  if(!this._filterDialog) {
449
467
  this._filterDialog = RowFilteringPlugin._createDialog();
450
468
  this._dialogInitialized = false;
@@ -1349,6 +1367,10 @@ RowFilteringPlugin.prototype.refresh = function() {
1349
1367
  * @param {number} colIndex
1350
1368
  */
1351
1369
  RowFilteringPlugin.prototype._updateColumnIcon = function(colIndex) {
1370
+ if(!this._initializedGrid) {
1371
+ return;
1372
+ }
1373
+
1352
1374
  let colSettings = this._getUserColumnSettings(colIndex); // colData["rowFiltering"]
1353
1375
  if(colSettings.hiddenIcon) {
1354
1376
  return;
@@ -1386,8 +1408,8 @@ RowFilteringPlugin.prototype._updateColumnIcon = function(colIndex) {
1386
1408
  if(!noFilterIcon) {
1387
1409
  if(!cell._filterIcon) {
1388
1410
  let filterIcon;
1389
- if(ElfUtil.hasComponent("ef-icon") >= 3) {
1390
- filterIcon = document.createElement("ef-icon");
1411
+ if(this._iconTag && this._iconTag !== "div") {
1412
+ filterIcon = document.createElement(this._iconTag);
1391
1413
  filterIcon.setAttribute("icon", "filter");
1392
1414
  } else {
1393
1415
  filterIcon = document.createElement("div");