@refinitiv-ui/efx-grid 6.0.15 → 6.0.17
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +661 -84
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +10 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +110 -1
- package/lib/rt-grid/es6/FieldDefinition.d.ts +6 -0
- package/lib/rt-grid/es6/FieldDefinition.js +43 -0
- package/lib/rt-grid/es6/Grid.js +184 -8
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +1 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +125 -17
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +4 -4
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +273 -143
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +7 -1
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +167 -146
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +44 -43
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +202 -497
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +30 -29
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +176 -98
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +40 -40
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +17 -15
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +89 -159
- package/lib/types/es6/ColumnStack.d.ts +7 -1
- package/lib/types/es6/Core/data/Segment.d.ts +3 -3
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +1 -1
- package/lib/types/es6/InCellEditing.d.ts +44 -43
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +10 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +6 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +4 -0
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +1 -0
- package/lib/types/es6/RowColoring.d.ts +17 -15
- package/lib/types/es6/RowFiltering.d.ts +30 -29
- package/lib/types/es6/RowGrouping.d.ts +40 -40
- package/lib/versions.json +7 -7
- package/package.json +1 -1
@@ -11,6 +11,7 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
11
11
|
* @description Available options describing `columnStack` object specified in grid's option
|
12
12
|
* @property {Array.<string>} fields Fields for stacking. The minimum is 2 fields.
|
13
13
|
* @property {Array.<ColumnStackPlugin~StackDefinition>} stacks List of stacking configuration
|
14
|
+
* @property {boolean=} autoStacking=false If enabled, columns will be auto stacked when new inserted column field match in stack
|
14
15
|
*/
|
15
16
|
|
16
17
|
/** @typedef {Object} ColumnStackPlugin~ColumnOptions
|
@@ -31,9 +32,10 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
31
32
|
* @property {string} id Group ID
|
32
33
|
* @property {boolean=} spreading=false If specified true, this group will be running in collapsing mode
|
33
34
|
* @property {boolean=} collapsed=true If disabled, this group will be expanded at the first time
|
34
|
-
* @property {Array.<string>} children Children column ID
|
35
|
+
* @property {Array.<string>} children Children column ID. Used when autoStacking is disabled
|
36
|
+
* @property {Array.<string>} fields Children fiields. Used when autoStacking is enabled
|
35
37
|
* @property {string=} name="" Name defined for specific stack
|
36
|
-
* @property {string=} activeColumn=""
|
38
|
+
* @property {string=} activeColumn="" If enable autoStacking, field of active column in stack. Else, column Id of active column in stack.
|
37
39
|
*/
|
38
40
|
|
39
41
|
/** @typedef {Object} ColumnStackPlugin~StackConfiguration
|
@@ -79,6 +81,10 @@ ColumnStackPlugin.prototype._columnStack = null;
|
|
79
81
|
* @private
|
80
82
|
*/
|
81
83
|
ColumnStackPlugin.prototype._updating = false;
|
84
|
+
/** @type {boolean}
|
85
|
+
* @private
|
86
|
+
*/
|
87
|
+
ColumnStackPlugin.prototype._autoStacking = false;
|
82
88
|
|
83
89
|
|
84
90
|
/** @type {number}
|
@@ -215,8 +221,12 @@ ColumnStackPlugin.prototype.config = function (options) {
|
|
215
221
|
var sid, stacks = {};
|
216
222
|
var columnStack = options.columnStack;
|
217
223
|
if(columnStack != null) {
|
224
|
+
if(columnStack.autoStacking != null) {
|
225
|
+
this._autoStacking = columnStack.autoStacking;
|
226
|
+
}
|
227
|
+
|
218
228
|
if(columnStack.fields && columnStack.fields.length > 1) {
|
219
|
-
this._columnStack =
|
229
|
+
this._columnStack = columnStack.fields;
|
220
230
|
sid = this._generateStackId();
|
221
231
|
stacks[sid] = {
|
222
232
|
colRefs: columnStack.fields,
|
@@ -289,39 +299,69 @@ ColumnStackPlugin.prototype.config = function (options) {
|
|
289
299
|
ColumnStackPlugin.prototype.getConfigObject = function (gridOptions) {
|
290
300
|
var obj = gridOptions || {};
|
291
301
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
}
|
315
|
-
if (spreading !== false) {
|
316
|
-
stackConfigObj.spreading = spreading;
|
302
|
+
var columnOptions = obj["columns"];
|
303
|
+
|
304
|
+
var stacks = this._stacks;
|
305
|
+
var stackOptions = [];
|
306
|
+
|
307
|
+
for (var stackKey in stacks) {
|
308
|
+
var stackOption = stacks[stackKey];
|
309
|
+
var activeColIndex = this._getColumnIndex(stackOption.activeColumn);
|
310
|
+
|
311
|
+
if(columnOptions && columnOptions.length){
|
312
|
+
var memberIndices = this.getStackMemberIndices(stackOption.stackId);
|
313
|
+
for(var i = 0; i < memberIndices.length; i++){
|
314
|
+
var colOption = columnOptions[memberIndices[i]];
|
315
|
+
if(colOption){
|
316
|
+
if(memberIndices[i] == activeColIndex){
|
317
|
+
if(colOption["hidden"]) {
|
318
|
+
delete colOption["hidden"];
|
319
|
+
}
|
320
|
+
} else {
|
321
|
+
colOption.hidden = true;
|
322
|
+
}
|
323
|
+
}
|
317
324
|
}
|
318
|
-
stackOptions.push(stackConfigObj);
|
319
325
|
}
|
320
326
|
|
321
|
-
|
322
|
-
|
327
|
+
var stackConfigObj = {
|
328
|
+
id: stackOption.stackId
|
329
|
+
};
|
330
|
+
var name = stackOption.name;
|
331
|
+
var collapsed = stackOption.collapsed;
|
332
|
+
var spreading = stackOption.spreading;
|
333
|
+
|
334
|
+
if (name) {
|
335
|
+
stackConfigObj.name = name;
|
336
|
+
}
|
337
|
+
if (collapsed !== true) {
|
338
|
+
stackConfigObj.collapsed = collapsed;
|
339
|
+
}
|
340
|
+
if (spreading !== false) {
|
341
|
+
stackConfigObj.spreading = spreading;
|
342
|
+
}
|
343
|
+
|
344
|
+
if (this._autoStacking) {
|
345
|
+
var fields = this._columnStack[stackOption.stackId];
|
346
|
+
var activeColumnField = this._getField(activeColIndex);
|
347
|
+
|
348
|
+
stackConfigObj.fields = fields;
|
349
|
+
stackConfigObj.activeColumn = activeColumnField;
|
350
|
+
|
351
|
+
} else {
|
352
|
+
var children = this.getStackMemberIds(stackOption.stackId);
|
353
|
+
var activeColumn = this.getColumnId(activeColIndex);
|
354
|
+
|
355
|
+
stackConfigObj.children = children;
|
356
|
+
stackConfigObj.activeColumn = activeColumn;
|
357
|
+
}
|
358
|
+
stackOptions.push(stackConfigObj);
|
323
359
|
}
|
324
360
|
|
361
|
+
obj.columnStack = {};
|
362
|
+
obj.columnStack.stacks = stackOptions;
|
363
|
+
obj.columnStack.autoStacking = this._autoStacking;
|
364
|
+
|
325
365
|
return obj;
|
326
366
|
};
|
327
367
|
|
@@ -390,6 +430,7 @@ ColumnStackPlugin.prototype._setColumnStackOptions = function(colIndex, stackOpt
|
|
390
430
|
ColumnStackPlugin.prototype._transformStackConfig = function(stackConfig) {
|
391
431
|
stackConfig.colRefs = [];
|
392
432
|
var children = stackConfig.children;
|
433
|
+
var fields = stackConfig.fields;
|
393
434
|
var activeColumn = stackConfig.activeColumn;
|
394
435
|
var field;
|
395
436
|
if(children){
|
@@ -401,15 +442,16 @@ ColumnStackPlugin.prototype._transformStackConfig = function(stackConfig) {
|
|
401
442
|
stackConfig.colRefs.push(field);
|
402
443
|
}
|
403
444
|
}
|
445
|
+
} else if(fields) {
|
446
|
+
stackConfig.colRefs = fields;
|
404
447
|
}
|
405
|
-
if(activeColumn){
|
448
|
+
if(activeColumn && !this._autoStacking){
|
406
449
|
var activeColIndex = this.getColumnIndex(activeColumn);
|
407
450
|
if(activeColIndex !== -1){
|
408
451
|
field = this._getField(colIndex);
|
409
452
|
if(field){
|
410
453
|
stackConfig.activeColumn;
|
411
454
|
}
|
412
|
-
|
413
455
|
}
|
414
456
|
}
|
415
457
|
return stackConfig;
|
@@ -859,21 +901,54 @@ ColumnStackPlugin.prototype.getStackId = function(colIndex) {
|
|
859
901
|
* @return {boolean} Return true if all of the given columns is stacked together
|
860
902
|
*/
|
861
903
|
ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
|
862
|
-
var
|
904
|
+
var fields = [];
|
905
|
+
var i, colIndex, sid;
|
906
|
+
options = options || {};
|
907
|
+
|
908
|
+
if(stackId) {
|
909
|
+
if(this._stacks[stackId]) {
|
910
|
+
return false; // Cannot store the same stack Id
|
911
|
+
}
|
912
|
+
sid = stackId;
|
913
|
+
} else {
|
914
|
+
sid = this._generateStackId();
|
915
|
+
}
|
916
|
+
|
917
|
+
// If grid is not initialize, add setting to pending stacks
|
918
|
+
if(!this._initializedGrid) {
|
919
|
+
var pendingStacks = this._pendingStacks || {};
|
920
|
+
pendingStacks[sid] = {
|
921
|
+
colRefs: colRefs,
|
922
|
+
spreading: false,
|
923
|
+
collapsed: false,
|
924
|
+
activeColumn: options.activeColumn || colRefs[0]
|
925
|
+
};
|
926
|
+
this._pendingStacks = pendingStacks;
|
927
|
+
return false;
|
928
|
+
}
|
863
929
|
|
864
930
|
if(!colRefs) {
|
865
931
|
colRefs = this._getSelectedColumns();
|
866
932
|
}
|
867
933
|
|
868
934
|
if(colRefs.length) {
|
869
|
-
if(typeof colRefs[0] === "string") {
|
870
|
-
|
935
|
+
if(typeof colRefs[0] === "string") {
|
936
|
+
fields = colRefs.slice();
|
937
|
+
} else {
|
938
|
+
colRefs.sort(function(a, b) { return a - b; }); // Only sort in the case of column index stack
|
939
|
+
for(i = 0; i < colRefs.length; i++){
|
940
|
+
var field = this._getField(colRefs[i]);
|
941
|
+
fields.push(field);
|
942
|
+
}
|
871
943
|
}
|
872
944
|
colRefs = this.getColumnIndices(colRefs);
|
873
945
|
}
|
874
946
|
|
875
|
-
|
876
|
-
|
947
|
+
// Save stack fields for
|
948
|
+
if(this._autoStacking){
|
949
|
+
var columnStack = this._columnStack || {};
|
950
|
+
columnStack[sid] = fields;
|
951
|
+
this._columnStack = columnStack;
|
877
952
|
}
|
878
953
|
|
879
954
|
var len = colRefs.length;
|
@@ -883,17 +958,6 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
|
|
883
958
|
if(!this.isColumnStackable(colRefs)) {
|
884
959
|
return false;
|
885
960
|
}
|
886
|
-
var sid;
|
887
|
-
if(stackId) {
|
888
|
-
if(this._stacks[stackId]) {
|
889
|
-
return false; // Cannot store the same stack Id
|
890
|
-
}
|
891
|
-
sid = stackId;
|
892
|
-
} else {
|
893
|
-
sid = this._generateStackId();
|
894
|
-
}
|
895
|
-
|
896
|
-
options = options || {};
|
897
961
|
|
898
962
|
var activeIndex = options.activeColumn ? this.getColumnIndices(options.activeColumn) : colRefs[0];
|
899
963
|
if (activeIndex.length){
|
@@ -912,7 +976,6 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
|
|
912
976
|
}
|
913
977
|
stack.collapsed = options.collapsed !== false;
|
914
978
|
stack.stackRefs = new Array(len);
|
915
|
-
var i, colIndex;
|
916
979
|
for(i = 0; i < len; ++i) {
|
917
980
|
colIndex = colRefs[i];
|
918
981
|
this._setColumnStackOptions(colIndex, stack);
|
@@ -960,99 +1023,18 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
|
|
960
1023
|
* @return {boolean} If the stack has been updated, return true.
|
961
1024
|
*/
|
962
1025
|
ColumnStackPlugin.prototype.setStack = function(colRefs, activeColRef) {
|
963
|
-
// Keep state
|
964
|
-
var i, colRef, type;
|
965
|
-
var fields = [];
|
966
|
-
if(Array.isArray(colRefs)) {
|
967
|
-
for (i = 0; i < colRefs.length; i++) {
|
968
|
-
colRef = colRefs[i];
|
969
|
-
type = typeof colRef;
|
970
|
-
if(type === "number") {
|
971
|
-
fields.push(this._getField(colRef));
|
972
|
-
} else if (type === "string") {
|
973
|
-
fields.push(colRef);
|
974
|
-
}
|
975
|
-
}
|
976
|
-
}
|
977
|
-
if(activeColRef && typeof activeColRef === "number") {
|
978
|
-
activeColRef = this._getField(activeColRef);
|
979
|
-
}
|
980
1026
|
|
981
|
-
if(fields.length > 1) {
|
982
|
-
if(!this._columnStack) {
|
983
|
-
this._columnStack = {
|
984
|
-
spreading: false,
|
985
|
-
collapsed: false
|
986
|
-
};
|
987
|
-
}
|
988
|
-
this._columnStack.fields = fields;
|
989
|
-
} else {
|
990
|
-
this._columnStack = null;
|
991
|
-
}
|
992
|
-
|
993
|
-
// Update UI
|
994
1027
|
var sid = "_uniqueStack"; // WARNING : This hardcode for assign uniqe stacking id
|
995
|
-
if(!this._initializedGrid) {
|
996
|
-
if(this._columnStack) {
|
997
|
-
var pendingStacks = {};
|
998
|
-
pendingStacks[sid] = {
|
999
|
-
colRefs: fields,
|
1000
|
-
spreading: false,
|
1001
|
-
collapsed: false
|
1002
|
-
};
|
1003
|
-
this._pendingStacks = pendingStacks;
|
1004
|
-
}
|
1005
|
-
return false;
|
1006
|
-
}
|
1007
1028
|
|
1008
|
-
|
1009
|
-
if(colRefs.length <= 1) { // When the array is empty or contains only one element, all stacking is removed
|
1010
|
-
return this.removeAllStacks();
|
1011
|
-
}
|
1029
|
+
this.removeAllStacks();
|
1012
1030
|
|
1013
|
-
var
|
1014
|
-
if(activeColRef){
|
1015
|
-
var indices = this.getColumnIndices(activeColRef);
|
1016
|
-
if(indices.length){
|
1017
|
-
var index = indices[0];
|
1018
|
-
if(colRefs.indexOf(index) !== -1){
|
1019
|
-
activeIndex = indices[0];
|
1020
|
-
}
|
1021
|
-
}
|
1022
|
-
}
|
1023
|
-
|
1024
|
-
this.removeAllStacks(false); // Remove the stack without updating the UI (UI will only update when column is stacked)
|
1031
|
+
var stackOptions = {};
|
1025
1032
|
|
1026
|
-
|
1027
|
-
|
1028
|
-
stack.stackId = sid;
|
1029
|
-
stack.spreading = false;
|
1030
|
-
stack.stackRefs = new Array(colRefs.length);
|
1031
|
-
for(i = 0; i < colRefs.length; ++i) {
|
1032
|
-
var colIndex = colRefs[i];
|
1033
|
-
stack.stackRefs[i] = this._getColumnStacking(colIndex);
|
1034
|
-
this._setColumnStackOptions(colIndex, stack);
|
1035
|
-
|
1036
|
-
if(colIndex == activeIndex){
|
1037
|
-
stack.activeColumn = stack.stackRefs[i];
|
1038
|
-
}
|
1039
|
-
|
1040
|
-
// Prevent from flashing in stack mode
|
1041
|
-
if(colIndex !== activeIndex && stack.collapsed !== false) {
|
1042
|
-
this._setColumnVisibility(colIndex, false);
|
1043
|
-
}
|
1033
|
+
if(activeColRef) {
|
1034
|
+
stackOptions.activeColumn = activeColRef;
|
1044
1035
|
}
|
1036
|
+
this.stackColumns(colRefs, sid, stackOptions);
|
1045
1037
|
|
1046
|
-
// Make sure that all columns stay packed together
|
1047
|
-
this._moveStackedColumns(stack.stackRefs);
|
1048
|
-
|
1049
|
-
// stack.activeColumn = stack.stackRefs[0]; // The first stacking (the first given columns) is the active column
|
1050
|
-
this._stacks[sid] = stack;
|
1051
|
-
var cfp = this._getPlugin("ColumnFilterPlugin");
|
1052
|
-
if(cfp) {
|
1053
|
-
cfp["refresh"]();
|
1054
|
-
}
|
1055
|
-
this._updateUI(); // asyncronuos
|
1056
1038
|
return true;
|
1057
1039
|
};
|
1058
1040
|
/** @public
|
@@ -1095,11 +1077,7 @@ ColumnStackPlugin.prototype.unstackColumns = function(colIndices) {
|
|
1095
1077
|
|
1096
1078
|
var stackRefs = stack.stackRefs;
|
1097
1079
|
len = stackRefs.length;
|
1098
|
-
|
1099
|
-
selFrom = this._getColumnIndex(stack.stackRefs[0]);
|
1100
|
-
} else {
|
1101
|
-
selFrom = this._getColumnIndex(stack.activeColumn);
|
1102
|
-
}
|
1080
|
+
selFrom = this._getColumnIndex(stack.stackRefs[0]);
|
1103
1081
|
selLen = len - 1;
|
1104
1082
|
|
1105
1083
|
for(i = 0; i < len; ++i) {
|
@@ -1109,6 +1087,9 @@ ColumnStackPlugin.prototype.unstackColumns = function(colIndices) {
|
|
1109
1087
|
this._setColumnVisibility(colIndex, true);
|
1110
1088
|
}
|
1111
1089
|
|
1090
|
+
if(this._autoStacking) {
|
1091
|
+
delete this._columnStack[sid];
|
1092
|
+
}
|
1112
1093
|
delete this._stacks[sid]; // Remove all reference to the stack
|
1113
1094
|
}
|
1114
1095
|
if(dirty) {
|
@@ -1150,6 +1131,7 @@ ColumnStackPlugin.prototype.removeAllStacks = function(enableUpdateUI) {
|
|
1150
1131
|
}
|
1151
1132
|
}
|
1152
1133
|
if(dirty) {
|
1134
|
+
this._columnStack = {};
|
1153
1135
|
this._stacks = {};
|
1154
1136
|
if(!disableUpdateUI) {
|
1155
1137
|
this._updateUI(); // asyncronous
|
@@ -1390,7 +1372,7 @@ ColumnStackPlugin.prototype._onColumnAdded = function (e) {
|
|
1390
1372
|
|
1391
1373
|
var columnStack = this._columnStack;
|
1392
1374
|
if (columnStack) {
|
1393
|
-
this._setStack();
|
1375
|
+
this._setStack(); //asynchronous
|
1394
1376
|
} else {
|
1395
1377
|
// add to group
|
1396
1378
|
var leftStackOpt = this._getColumnStackOptions(colIndex - 1);
|
@@ -1464,10 +1446,13 @@ ColumnStackPlugin.prototype._setStack = function() {
|
|
1464
1446
|
|
1465
1447
|
var columnStack = this._columnStack;
|
1466
1448
|
if(columnStack){
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
this.
|
1449
|
+
this.removeAllStacks(false);
|
1450
|
+
for(var sid in columnStack){
|
1451
|
+
var fields = columnStack[sid];
|
1452
|
+
var colIndices = this.getColumnIndices(fields);
|
1453
|
+
if (colIndices.length > 1) {
|
1454
|
+
this.stackColumns(fields, sid);
|
1455
|
+
}
|
1471
1456
|
}
|
1472
1457
|
}
|
1473
1458
|
};
|
@@ -1543,6 +1528,25 @@ ColumnStackPlugin.prototype.getColumnIndicesByColumnIds = function(columnId) {
|
|
1543
1528
|
return colIndices;
|
1544
1529
|
};
|
1545
1530
|
|
1531
|
+
/** @public
|
1532
|
+
* @description Get column ids by fields
|
1533
|
+
* @param {string|Array<string>} field
|
1534
|
+
* @return {!Array.<string>} Column indices
|
1535
|
+
*/
|
1536
|
+
ColumnStackPlugin.prototype.getColumnIdsByFields = function(field) {
|
1537
|
+
var colIndices = [];
|
1538
|
+
var fields = [];
|
1539
|
+
if(Array.isArray(field)){
|
1540
|
+
fields = field;
|
1541
|
+
} else {
|
1542
|
+
fields.push(field);
|
1543
|
+
}
|
1544
|
+
|
1545
|
+
colIndices = this.getColumnIndices(field);
|
1546
|
+
|
1547
|
+
return this.getColumnIdsByIndex(colIndices);
|
1548
|
+
};
|
1549
|
+
|
1546
1550
|
/** @public
|
1547
1551
|
* @description Add specific column to a stack
|
1548
1552
|
* @param {number|string} colRef column field or column index
|
@@ -1731,6 +1735,23 @@ ColumnStackPlugin.prototype.getStackName = function(stackId) {
|
|
1731
1735
|
return stackName;
|
1732
1736
|
};
|
1733
1737
|
|
1738
|
+
/** @public
|
1739
|
+
* @description Get active column field of specific stack
|
1740
|
+
* @param {string} stackId
|
1741
|
+
* @return {string} active column field
|
1742
|
+
*/
|
1743
|
+
ColumnStackPlugin.prototype.getActiveColumnField = function(stackId) {
|
1744
|
+
var field = "";
|
1745
|
+
if(stackId !== null) {
|
1746
|
+
var stack = this._stacks[stackId];
|
1747
|
+
if(stack){
|
1748
|
+
var activeColIndex = this._getColumnIndex(stack.activeColumn);
|
1749
|
+
field = this._getField(activeColIndex);
|
1750
|
+
}
|
1751
|
+
}
|
1752
|
+
return field;
|
1753
|
+
};
|
1754
|
+
|
1734
1755
|
|
1735
1756
|
export default ColumnStackPlugin;
|
1736
1757
|
export { ColumnStackPlugin, ColumnStackPlugin as ColumnStack, ColumnStackPlugin as ColumnStackExtension };
|
@@ -10,50 +10,51 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
|
|
10
10
|
declare namespace InCellEditingPlugin {
|
11
11
|
|
12
12
|
type Options = {
|
13
|
-
balloonMode?: boolean,
|
14
|
-
editableTitle?: boolean,
|
15
|
-
editableContent?: boolean,
|
16
|
-
autoCommitText?: boolean,
|
17
|
-
dataBinding?: boolean,
|
18
|
-
popupElement?: Element,
|
19
|
-
doubleClick?: boolean,
|
20
|
-
tabToMove?: boolean,
|
21
|
-
contentSource?: boolean,
|
22
|
-
inlineStyling?: boolean,
|
23
|
-
disablingScroll?: boolean,
|
24
|
-
uiBlocking?: boolean,
|
25
|
-
preEditorOpening?: ((...params: any[]) => any),
|
26
|
-
editorOpened?: ((...params: any[]) => any),
|
27
|
-
beforeCommit?: ((...params: any[]) => any),
|
28
|
-
editorClosed?: ((...params: any[]) => any),
|
29
|
-
keyUp?: ((...params: any[]) => any),
|
30
|
-
beforeRowCommit?: ((...params: any[]) => any),
|
31
|
-
rowEditorClosed?: ((...params: any[]) => any),
|
32
|
-
autoSuggest?: Element,
|
33
|
-
closingOnScroll?: boolean
|
13
|
+
balloonMode?: boolean|null,
|
14
|
+
editableTitle?: boolean|null,
|
15
|
+
editableContent?: boolean|null,
|
16
|
+
autoCommitText?: boolean|null,
|
17
|
+
dataBinding?: boolean|null,
|
18
|
+
popupElement?: Element|null,
|
19
|
+
doubleClick?: boolean|null,
|
20
|
+
tabToMove?: boolean|null,
|
21
|
+
contentSource?: boolean|null,
|
22
|
+
inlineStyling?: boolean|null,
|
23
|
+
disablingScroll?: boolean|null,
|
24
|
+
uiBlocking?: boolean|null,
|
25
|
+
preEditorOpening?: ((...params: any[]) => any)|null,
|
26
|
+
editorOpened?: ((...params: any[]) => any)|null,
|
27
|
+
beforeCommit?: ((...params: any[]) => any)|null,
|
28
|
+
editorClosed?: ((...params: any[]) => any)|null,
|
29
|
+
keyUp?: ((...params: any[]) => any)|null,
|
30
|
+
beforeRowCommit?: ((...params: any[]) => any)|null,
|
31
|
+
rowEditorClosed?: ((...params: any[]) => any)|null,
|
32
|
+
autoSuggest?: Element|null,
|
33
|
+
closingOnScroll?: boolean|null
|
34
34
|
};
|
35
35
|
|
36
36
|
type Cache = {
|
37
|
-
editor: Element,
|
38
|
-
balloonPopup: Element,
|
39
|
-
inputElement: Element
|
37
|
+
editor: Element|null,
|
38
|
+
balloonPopup: Element|null,
|
39
|
+
inputElement: Element|null
|
40
40
|
};
|
41
41
|
|
42
42
|
type EditorOptions = {
|
43
|
-
type?: string,
|
44
|
-
entries?: any[]
|
43
|
+
type?: string|null,
|
44
|
+
entries?: any[]|null,
|
45
|
+
attributes?: any
|
45
46
|
};
|
46
47
|
|
47
48
|
type ColumnOptions = {
|
48
|
-
editableContent?: boolean,
|
49
|
-
inCellEditing?: InCellEditingPlugin.EditorOptions
|
49
|
+
editableContent?: boolean|null,
|
50
|
+
inCellEditing?: InCellEditingPlugin.EditorOptions|null
|
50
51
|
};
|
51
52
|
|
52
53
|
}
|
53
54
|
|
54
55
|
declare class InCellEditingPlugin extends GridPlugin {
|
55
56
|
|
56
|
-
constructor(options?: InCellEditingPlugin.Options);
|
57
|
+
constructor(options?: InCellEditingPlugin.Options|null);
|
57
58
|
|
58
59
|
public initialize(host: any, options: any): void;
|
59
60
|
|
@@ -65,23 +66,23 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
65
66
|
|
66
67
|
public openEditor(colIndex: number, rowIndex: number, sectionRef?: any, grid?: any): void;
|
67
68
|
|
68
|
-
public closeCellEditor(opt_forceCommit?: boolean): void;
|
69
|
+
public closeCellEditor(opt_forceCommit?: boolean|null): void;
|
69
70
|
|
70
|
-
public enableBalloonMode(opt_enabled?: boolean): void;
|
71
|
+
public enableBalloonMode(opt_enabled?: boolean|null): void;
|
71
72
|
|
72
|
-
public enableTitleEditing(opt_enabled?: boolean): void;
|
73
|
+
public enableTitleEditing(opt_enabled?: boolean|null): void;
|
73
74
|
|
74
|
-
public disableTitleEditing(opt_disabled?: boolean): void;
|
75
|
+
public disableTitleEditing(opt_disabled?: boolean|null): void;
|
75
76
|
|
76
|
-
public disableCellEditing(cell: any, opt_disabled?: boolean): void;
|
77
|
+
public disableCellEditing(cell: any, opt_disabled?: boolean|null): void;
|
77
78
|
|
78
|
-
public disableDataBinding(opt_disabled?: boolean): void;
|
79
|
+
public disableDataBinding(opt_disabled?: boolean|null): void;
|
79
80
|
|
80
|
-
public disableDblClick(opt_disabled?: boolean): void;
|
81
|
+
public disableDblClick(opt_disabled?: boolean|null): void;
|
81
82
|
|
82
83
|
public isEditing(): boolean;
|
83
84
|
|
84
|
-
public getTextBox(columnIndex?: number, grid?: any): Element|null;
|
85
|
+
public getTextBox(columnIndex?: number|null, grid?: any): Element|null;
|
85
86
|
|
86
87
|
public getInitialText(): string;
|
87
88
|
|
@@ -97,17 +98,17 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
97
98
|
|
98
99
|
public getInputElementPosition(): any;
|
99
100
|
|
100
|
-
public enableAutoCommitText(opt_enable?: boolean): void;
|
101
|
+
public enableAutoCommitText(opt_enable?: boolean|null): void;
|
101
102
|
|
102
103
|
public isColumnEditable(colIndex: number): boolean;
|
103
104
|
|
104
105
|
public openRowEditor(rowIndex: number, grid?: any): void;
|
105
106
|
|
106
|
-
public closeRowEditor(isCommit?: boolean): void;
|
107
|
+
public closeRowEditor(isCommit?: boolean|null): void;
|
107
108
|
|
108
|
-
public toggleRowEditor(rowIndex: number, isCommit?: boolean, grid?: any): void;
|
109
|
+
public toggleRowEditor(rowIndex: number, isCommit?: boolean|null, grid?: any): void;
|
109
110
|
|
110
|
-
public setPopupElement(elm: Element): void;
|
111
|
+
public setPopupElement(elm: Element|null): void;
|
111
112
|
|
112
113
|
public setText(content: any): void;
|
113
114
|
|
@@ -119,13 +120,13 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
119
120
|
|
120
121
|
public appendText(word: string): void;
|
121
122
|
|
122
|
-
public commitText(word?: string): void;
|
123
|
+
public commitText(word?: string|null): void;
|
123
124
|
|
124
125
|
public getBalloonPopup(): Popup|null|null;
|
125
126
|
|
126
127
|
public getAutoSuggest(): Element|null;
|
127
128
|
|
128
|
-
public setDisablingScroll(disabled?: boolean): boolean;
|
129
|
+
public setDisablingScroll(disabled?: boolean|null): boolean;
|
129
130
|
|
130
131
|
public requestShowEditorPopup(): void;
|
131
132
|
|