@refinitiv-ui/efx-grid 6.0.91 → 6.0.92
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/lib/column-dragging/es6/ColumnDragging.d.ts +1 -1
- package/lib/column-dragging/es6/ColumnDragging.js +144 -34
- package/lib/core/dist/core.js +2410 -2621
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.js +14 -14
- package/lib/core/es6/data/DataCache.js +118 -118
- package/lib/core/es6/data/DataTable.d.ts +3 -1
- package/lib/core/es6/data/DataTable.js +208 -190
- package/lib/core/es6/data/DataView.d.ts +1 -1
- package/lib/core/es6/data/DataView.js +291 -291
- package/lib/core/es6/data/Segment.js +79 -79
- package/lib/core/es6/data/SegmentCollection.js +81 -81
- package/lib/core/es6/data/WrappedView.js +41 -41
- package/lib/core/es6/grid/Core.js +635 -635
- package/lib/core/es6/grid/ILayoutGrid.js +1 -1
- package/lib/core/es6/grid/LayoutGrid.js +183 -183
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +91 -91
- package/lib/core/es6/grid/components/Cell.js +29 -29
- package/lib/core/es6/grid/components/CellFloatingPanel.js +11 -11
- package/lib/core/es6/grid/components/CellSpan.js +7 -7
- package/lib/core/es6/grid/components/CellSpans.js +36 -34
- package/lib/core/es6/grid/components/Column.js +40 -40
- package/lib/core/es6/grid/components/ElementWrapper.js +17 -17
- package/lib/core/es6/grid/components/HScrollbar.js +31 -31
- package/lib/core/es6/grid/components/Scrollbar.js +77 -77
- package/lib/core/es6/grid/components/StretchedCells.js +49 -49
- package/lib/core/es6/grid/components/VScrollbar.js +11 -11
- package/lib/core/es6/grid/components/VirtualItems.js +3 -3
- package/lib/core/es6/grid/event/EventDispatcher.js +9 -9
- package/lib/core/es6/grid/event/EventListeners.js +4 -4
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +186 -186
- package/lib/core/es6/grid/util/Conflator.js +4 -4
- package/lib/core/es6/grid/util/Reverter.js +1 -1
- package/lib/core/es6/grid/util/SectionSettings.js +20 -20
- package/lib/core/es6/grid/util/SelectionList.js +23 -23
- package/lib/core/es6/grid/util/TrackLayout.js +74 -74
- package/lib/core/es6/grid/util/Virtualizer.js +15 -15
- package/lib/core/es6/grid/util/util.js +20 -20
- package/lib/core/es6/index.d.ts +0 -2
- package/lib/core/es6/index.js +0 -3
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +193 -70
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +46 -30
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -1
- package/lib/rt-grid/es6/RowDefinition.js +74 -16
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +56 -1
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -1
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +29 -1
- package/lib/tr-grid-util/es6/CellPainter.js +94 -93
- package/lib/tr-grid-util/es6/Conflator.js +4 -4
- package/lib/tr-grid-util/es6/CoralItems.js +6 -6
- package/lib/tr-grid-util/es6/DateTime.js +39 -39
- package/lib/tr-grid-util/es6/Deferred.js +5 -5
- package/lib/tr-grid-util/es6/Delay.js +1 -1
- package/lib/tr-grid-util/es6/Dom.js +26 -26
- package/lib/tr-grid-util/es6/DragUI.js +17 -17
- package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
- package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
- package/lib/tr-grid-util/es6/ElfDate.js +4 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
- package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
- package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
- package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
- package/lib/tr-grid-util/es6/Ext.js +6 -6
- package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
- package/lib/tr-grid-util/es6/FilterBuilder.js +57 -57
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
- package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
- package/lib/tr-grid-util/es6/GridPlugin.js +86 -86
- package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
- package/lib/tr-grid-util/es6/Icon.js +4 -4
- package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
- package/lib/tr-grid-util/es6/MultiTableManager.js +68 -68
- package/lib/tr-grid-util/es6/NumberFormatter.js +22 -22
- package/lib/tr-grid-util/es6/PercentBar.js +17 -17
- package/lib/tr-grid-util/es6/Perf.js +5 -5
- package/lib/tr-grid-util/es6/Popup.js +42 -42
- package/lib/tr-grid-util/es6/RangeBar.js +5 -5
- package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
- package/lib/tr-grid-util/es6/RowPainter.js +23 -23
- package/lib/tr-grid-util/es6/SubTable.js +94 -94
- package/lib/tr-grid-util/es6/Table.js +51 -51
- package/lib/tr-grid-util/es6/TextHighlighter.js +49 -49
- package/lib/tr-grid-util/es6/TickCodes.js +2 -2
- package/lib/tr-grid-util/es6/Timer.js +2 -2
- package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
- package/lib/tr-grid-util/es6/Util.js +50 -50
- package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
- package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
- package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
- package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
- package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
- package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
- package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
- package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
- package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
- package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
- package/lib/tr-grid-util/es6/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
- package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
- package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
- package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
- package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
- package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
- package/lib/tr-grid-util/es6/jet/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
- package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation.js +1 -1
- package/lib/types/es6/ColumnDragging.d.ts +1 -1
- package/lib/types/es6/ColumnGrouping.d.ts +3 -1
- package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
- package/lib/types/es6/Core/data/DataView.d.ts +2 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
- package/lib/types/es6/Core/index.d.ts +0 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
- package/lib/versions.json +4 -4
- package/package.json +1 -1
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
- package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
- package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
- package/lib/core/es6/grid/util/HttpRequest.js +0 -371
- package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
- package/lib/core/es6/grid/util/PercentBar.js +0 -390
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
- package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
- package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
- package/lib/core/es6/grid/util/RangeBar.js +0 -255
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
|
@@ -2,7 +2,7 @@ import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
|
|
2
2
|
import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
3
3
|
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
4
4
|
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
|
5
|
-
import { cloneObject } from "../../tr-grid-util/es6/Util.js";
|
|
5
|
+
import { cloneObject, deepEqual, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
6
6
|
import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
|
7
7
|
|
|
8
8
|
declare namespace ColumnDraggingPlugin {
|
|
@@ -2,7 +2,7 @@ import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
|
|
2
2
|
import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
3
3
|
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
4
4
|
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
|
5
|
-
import { cloneObject } from "../../tr-grid-util/es6/Util.js";
|
|
5
|
+
import { cloneObject, deepEqual, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
6
6
|
import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
|
7
7
|
|
|
8
8
|
/** @typedef {Object} ColumnDraggingPlugin~Options
|
|
@@ -264,10 +264,40 @@ ColumnDraggingPlugin.prototype.unload = function (host) {
|
|
|
264
264
|
/** @private
|
|
265
265
|
*/
|
|
266
266
|
ColumnDraggingPlugin.prototype._onThemeLoaded = function() {
|
|
267
|
-
|
|
267
|
+
if(!ColumnDraggingPlugin._styles) {
|
|
268
|
+
let styles = [
|
|
269
|
+
".multi-column-drag-indicator .section.title .cover-layer .column-bound.selection-bound ", [
|
|
270
|
+
"border-top: var(--grid-drag-indicator);",
|
|
271
|
+
"border-right: var(--grid-drag-indicator);",
|
|
272
|
+
"border-left: var(--grid-drag-indicator);"
|
|
273
|
+
],
|
|
274
|
+
".multi-column-drag-indicator .sections .cover-layer .column-bound.selection-bound ", [
|
|
275
|
+
"border-right: var(--grid-drag-indicator);",
|
|
276
|
+
"border-left: var(--grid-drag-indicator);",
|
|
277
|
+
"border-bottom: var(--grid-drag-indicator);"
|
|
278
|
+
]
|
|
279
|
+
];
|
|
280
|
+
ColumnDraggingPlugin._styles = prettifyCss(styles);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
let colors = ElfUtil.getColors();
|
|
268
284
|
this._dragUI.onThemeLoaded(colors); // TODO : onThemeLoaded should be static function like DragUI.applyThemeColor
|
|
269
|
-
for(
|
|
270
|
-
|
|
285
|
+
for(let i = this._hosts.length; --i >= 0;) {
|
|
286
|
+
let host = this._hosts[i];
|
|
287
|
+
ColumnDraggingPlugin._applyThemeColor(host);
|
|
288
|
+
DragUI.applyThemeColor(host);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
/** @private
|
|
292
|
+
* @param {Object} grid core grid instance
|
|
293
|
+
*/
|
|
294
|
+
ColumnDraggingPlugin._applyThemeColor = function(grid) {
|
|
295
|
+
if(!grid || grid._columnDraggingStyles) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
if(ColumnDraggingPlugin._styles) {
|
|
299
|
+
grid._columnDraggingStyles = true; // Prevent loading the same style twice
|
|
300
|
+
injectCss(ColumnDraggingPlugin._styles, grid.getParent());
|
|
271
301
|
}
|
|
272
302
|
};
|
|
273
303
|
|
|
@@ -500,6 +530,38 @@ ColumnDraggingPlugin.prototype._onMouseUp = function (e) {
|
|
|
500
530
|
}
|
|
501
531
|
};
|
|
502
532
|
|
|
533
|
+
/** @private
|
|
534
|
+
* @return {number} 0 does not allow dragging, 1 allows single dragging, and 2 allows multiple dragging.
|
|
535
|
+
*/
|
|
536
|
+
ColumnDraggingPlugin.prototype._getDraggingStyle = function() {
|
|
537
|
+
let colSelExt = this._getPlugin("ColumnSelectionPlugin");
|
|
538
|
+
let cgp = this._getPlugin("ColumnGroupingPlugin");
|
|
539
|
+
if(!cgp) {
|
|
540
|
+
return 1;
|
|
541
|
+
}
|
|
542
|
+
let selectedCols = colSelExt.getSelectedColumns();
|
|
543
|
+
let dragOutSel = selectedCols.indexOf(this._startColumn) === -1;
|
|
544
|
+
if(dragOutSel) { // no column grouping, allow to drag
|
|
545
|
+
return 1;
|
|
546
|
+
}
|
|
547
|
+
let selectedColCount = selectedCols.length;
|
|
548
|
+
if(selectedColCount > 1) { // Multiple column drag
|
|
549
|
+
let currentGroup, prevGroup;
|
|
550
|
+
for (let i = 0; i < selectedColCount; i++) {
|
|
551
|
+
let colIndex = selectedCols[i];
|
|
552
|
+
currentGroup = cgp.getGroupIds(colIndex) || []; // empty array is root group
|
|
553
|
+
if(prevGroup && !deepEqual(currentGroup, prevGroup)) {
|
|
554
|
+
if(cgp.getMutualGroupId(selectedCols)) { // Dragging a group inside another group is permitted only when the group being dragged is the same parent group
|
|
555
|
+
return 2;
|
|
556
|
+
}
|
|
557
|
+
return 0; // Drag with difference group is not allowed
|
|
558
|
+
} // else {} // Drag with same group is allowed
|
|
559
|
+
prevGroup = currentGroup;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return 2;
|
|
563
|
+
};
|
|
564
|
+
|
|
503
565
|
/** @private
|
|
504
566
|
* @param {*} e
|
|
505
567
|
*/
|
|
@@ -509,7 +571,12 @@ ColumnDraggingPlugin.prototype._onDragStart = function (e) {
|
|
|
509
571
|
this._dispatch("dragStart", this._pos);
|
|
510
572
|
}
|
|
511
573
|
|
|
512
|
-
if (this._pos["cancel"]) {
|
|
574
|
+
if (this._pos["cancel"]) { // user cancel drag start
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
let dragStyles = this._getDraggingStyle();
|
|
579
|
+
if (!dragStyles) { // not allow to drag
|
|
513
580
|
return;
|
|
514
581
|
}
|
|
515
582
|
|
|
@@ -557,7 +624,11 @@ ColumnDraggingPlugin.prototype._onDragStart = function (e) {
|
|
|
557
624
|
};
|
|
558
625
|
this._dragBoxRenderer(arg);
|
|
559
626
|
}
|
|
560
|
-
|
|
627
|
+
if(dragStyles > 1 ) {
|
|
628
|
+
gridElem.parentNode.classList.add("multi-column-drag-indicator");
|
|
629
|
+
} else if(dragStyles === 1) {
|
|
630
|
+
this._dimCol(true); // Single drag
|
|
631
|
+
} // else {} // no need to handled drag 0 column
|
|
561
632
|
this._renderGuideline();
|
|
562
633
|
|
|
563
634
|
// For step scrolling // TODO: Merge this logic with DraggableContentPlugin
|
|
@@ -621,6 +692,7 @@ ColumnDraggingPlugin.prototype._onDragEnd = function (e) {
|
|
|
621
692
|
pn.removeChild(this._dragBox);
|
|
622
693
|
}
|
|
623
694
|
this._clickedGrid.getElement().parentNode.classList.remove("mouse-dragging"); // retain mouse cursor
|
|
695
|
+
this._clickedGrid.getElement().parentNode.classList.remove("multi-column-drag-indicator");
|
|
624
696
|
|
|
625
697
|
window.removeEventListener("mousemove", this._onDrag, false);
|
|
626
698
|
window.removeEventListener("mouseup", this._onDragEnd, true);
|
|
@@ -668,41 +740,24 @@ ColumnDraggingPlugin.prototype._onDragEnd = function (e) {
|
|
|
668
740
|
|
|
669
741
|
if (!operationCancelled) {
|
|
670
742
|
if (!this._noColumnMoving) {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
743
|
+
let colSelExt = this._getPlugin("ColumnSelectionPlugin");
|
|
744
|
+
let selectedCols;
|
|
745
|
+
if(colSelExt) {
|
|
746
|
+
selectedCols = colSelExt.getSelectedColumns();
|
|
747
|
+
}
|
|
748
|
+
if(!colSelExt || !selectedCols.length || selectedCols.indexOf(this._startColumn) === -1) {
|
|
749
|
+
// No selected column or move column outside selected column, tried to move only _startColumn
|
|
750
|
+
selectedCols = [this._startColumn];
|
|
751
|
+
}
|
|
752
|
+
let destIndex = this._destColumn;
|
|
676
753
|
// Move operation always move to the left of destination column
|
|
677
754
|
// When moving forward, destnation need to added by 1 to move correctly
|
|
678
755
|
if (this._startColumn < this._destColumn) {
|
|
679
756
|
destIndex = this._destColumn + 1;
|
|
680
757
|
}
|
|
681
758
|
|
|
682
|
-
|
|
683
|
-
if(csp) {
|
|
684
|
-
stackId = csp.getStackId(this._startColumn);
|
|
685
|
-
}
|
|
686
|
-
if(cgp){
|
|
687
|
-
var cellInfo = cgp.getCellInfo(this._startPos);
|
|
688
|
-
groupId = cellInfo["groupId"] || cellInfo["columnId"];
|
|
689
|
-
}
|
|
759
|
+
this._moveColumns(selectedCols, destIndex);
|
|
690
760
|
|
|
691
|
-
if(stackId && this._startColumn === this._endColumn){
|
|
692
|
-
csp.moveStack(stackId, destIndex);
|
|
693
|
-
} else if(groupId) {
|
|
694
|
-
cgp.moveGroup(groupId, destIndex);
|
|
695
|
-
} else {
|
|
696
|
-
var colList = [];
|
|
697
|
-
var i;
|
|
698
|
-
for(i = this._startColumn; i <= this._endColumn; i++){
|
|
699
|
-
colList.push(i);
|
|
700
|
-
}
|
|
701
|
-
for(i = this._hosts.length; --i >= 0;) {
|
|
702
|
-
var host = this._hosts[i];
|
|
703
|
-
host.reorderColumns(colList, destIndex);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
761
|
}
|
|
707
762
|
|
|
708
763
|
if (this.hasListener("columnMoved")) {
|
|
@@ -719,6 +774,61 @@ ColumnDraggingPlugin.prototype._onDragEnd = function (e) {
|
|
|
719
774
|
this._clearCache();
|
|
720
775
|
};
|
|
721
776
|
|
|
777
|
+
/** @private
|
|
778
|
+
* @param {Array<number>} srcColIndices
|
|
779
|
+
* @param {number} destColumnIndex
|
|
780
|
+
*/
|
|
781
|
+
ColumnDraggingPlugin.prototype._moveColumns = function (srcColIndices, destColumnIndex) {
|
|
782
|
+
let srcCount = srcColIndices.length;
|
|
783
|
+
let colList = [];
|
|
784
|
+
let csp = this._getPlugin("ColumnStackPlugin");
|
|
785
|
+
let stackId, groupId;
|
|
786
|
+
if(srcCount === 1) {
|
|
787
|
+
if(csp) {
|
|
788
|
+
stackId = csp.getStackId(this._startColumn);
|
|
789
|
+
}
|
|
790
|
+
let cgp = this._getPlugin("ColumnGroupingPlugin");
|
|
791
|
+
if(cgp){
|
|
792
|
+
var cellInfo = cgp.getCellInfo(this._startPos);
|
|
793
|
+
groupId = cellInfo["groupId"] || cellInfo["columnId"];
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
if(stackId && this._startColumn === this._endColumn){
|
|
797
|
+
csp.moveStack(stackId, destColumnIndex);
|
|
798
|
+
} else if(groupId) {
|
|
799
|
+
cgp.moveGroup(groupId, destColumnIndex);
|
|
800
|
+
} else {
|
|
801
|
+
for(let i = this._startColumn; i <= this._endColumn; i++){
|
|
802
|
+
colList.push(i);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
} else {
|
|
806
|
+
let stacking = {}; // Object to optimize call column stack api repeatly
|
|
807
|
+
for (let i = 0; i < srcCount; i++) {
|
|
808
|
+
let srcIdx = srcColIndices[i];
|
|
809
|
+
let srcId = this.getColumnId(srcIdx);
|
|
810
|
+
|
|
811
|
+
if(csp) {
|
|
812
|
+
stackId = csp.getStackId(srcIdx);
|
|
813
|
+
}
|
|
814
|
+
if(stackId && !stacking[stackId]) {
|
|
815
|
+
stacking[stackId] = true; // optimize column same stack
|
|
816
|
+
let stackMemberIds = csp.getStackMemberIds(stackId);
|
|
817
|
+
for (let j = 0; j < stackMemberIds.length; j++) {
|
|
818
|
+
let colId = stackMemberIds[j];
|
|
819
|
+
colList.push(colId);
|
|
820
|
+
}
|
|
821
|
+
} else {
|
|
822
|
+
colList.push(srcId); // Normal case
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
for(let i = this._hosts.length; --i >= 0;) {
|
|
827
|
+
var host = this._hosts[i];
|
|
828
|
+
host.reorderColumns(colList, destColumnIndex);
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
|
|
722
832
|
/** @private
|
|
723
833
|
*/
|
|
724
834
|
ColumnDraggingPlugin.prototype._onDragPulse = function() {
|