@refinitiv-ui/efx-grid 6.0.90 → 6.0.92
Sign up to get free protection for your applications and to get access to all the features.
- 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 +2446 -2625
- 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 +4 -0
- package/lib/core/es6/data/DataTable.js +219 -190
- package/lib/core/es6/data/DataView.d.ts +2 -0
- package/lib/core/es6/data/DataView.js +300 -292
- package/lib/core/es6/data/Segment.js +85 -83
- package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
- package/lib/core/es6/data/SegmentCollection.js +91 -80
- 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
package/lib/core/es6/index.d.ts
CHANGED
@@ -2,7 +2,6 @@ import Util from "./grid/util/util.js";
|
|
2
2
|
|
3
3
|
// Core
|
4
4
|
import EventDispatcher from "./grid/event/EventDispatcher.js";
|
5
|
-
import ElementFrameWork from "./grid/util/ElementFrameWork.js";
|
6
5
|
import ElementWrapper from "./grid/components/ElementWrapper.js";
|
7
6
|
import ILayoutGrid from "./grid/ILayoutGrid.js";
|
8
7
|
import LayoutGrid from "./grid/LayoutGrid.js";
|
@@ -44,7 +43,6 @@ export {
|
|
44
43
|
// Core
|
45
44
|
EventDispatcher,
|
46
45
|
ElementWrapper,
|
47
|
-
ElementFrameWork,
|
48
46
|
ILayoutGrid,
|
49
47
|
LayoutGrid,
|
50
48
|
Core,
|
package/lib/core/es6/index.js
CHANGED
@@ -2,7 +2,6 @@ import Util from "./grid/util/util.js";
|
|
2
2
|
|
3
3
|
// Core
|
4
4
|
import EventDispatcher from "./grid/event/EventDispatcher.js";
|
5
|
-
import ElementFrameWork from "./grid/util/ElementFrameWork.js";
|
6
5
|
import ElementWrapper from "./grid/components/ElementWrapper.js";
|
7
6
|
import ILayoutGrid from "./grid/ILayoutGrid.js";
|
8
7
|
import LayoutGrid from "./grid/LayoutGrid.js";
|
@@ -51,7 +50,6 @@ if(!grid) {
|
|
51
50
|
Object.assign(tr, Util);
|
52
51
|
tr.EventDispatcher = EventDispatcher;
|
53
52
|
tr.ElementWrapper = ElementWrapper;
|
54
|
-
tr.ElementFrameWork = ElementFrameWork;
|
55
53
|
tr.ILayoutGrid = ILayoutGrid;
|
56
54
|
tr.LayoutGrid = LayoutGrid;
|
57
55
|
tr.Grid = Core;
|
@@ -91,7 +89,6 @@ export {
|
|
91
89
|
// Core
|
92
90
|
EventDispatcher,
|
93
91
|
ElementWrapper,
|
94
|
-
ElementFrameWork,
|
95
92
|
ILayoutGrid,
|
96
93
|
LayoutGrid,
|
97
94
|
Core,
|
package/lib/grid/index.js
CHANGED
@@ -9969,10 +9969,12 @@ Segment.prototype.getSubSegmentIds = function(out_ary) {
|
|
9969
9969
|
Segment.prototype.addChild = function(rid, dataId) {
|
9970
9970
|
if(rid) {
|
9971
9971
|
this._shared.childToSegment[rid] = this._rid;
|
9972
|
-
if(this.
|
9973
|
-
this.
|
9974
|
-
}
|
9975
|
-
|
9972
|
+
if(this._children[rid]) {
|
9973
|
+
this._children[rid] = dataId || rid; // Update data id
|
9974
|
+
} else {
|
9975
|
+
if(this._collapsed) {
|
9976
|
+
this._shared.dirtyCollapsingState = true; // TODO: Check if we need to update this only when new child is added
|
9977
|
+
}
|
9976
9978
|
this._children[rid] = dataId || rid;
|
9977
9979
|
++this._childCount;
|
9978
9980
|
return true;
|
@@ -10750,6 +10752,17 @@ SegmentCollection.prototype.getSegment = function(rid) {
|
|
10750
10752
|
return this._segments[rid] || null;
|
10751
10753
|
};
|
10752
10754
|
/** @public
|
10755
|
+
* @param {string} rid
|
10756
|
+
* @return {Segment}
|
10757
|
+
*/
|
10758
|
+
SegmentCollection.prototype.getSegmentParent = function(rid) {
|
10759
|
+
var parentRowId = this.getParentRowId(rid);
|
10760
|
+
if(parentRowId) {
|
10761
|
+
return this.getSegment(parentRowId);
|
10762
|
+
}
|
10763
|
+
return null;
|
10764
|
+
};
|
10765
|
+
/** @public
|
10753
10766
|
* @return {Object.<string, Segment>}
|
10754
10767
|
*/
|
10755
10768
|
SegmentCollection.prototype.getSegments = function() {
|
@@ -11397,8 +11410,34 @@ DataTable.prototype.setData = function(rid, cid, value) { // Data changed event
|
|
11397
11410
|
values[cid] = value;
|
11398
11411
|
return this.setRowData(rid, values);
|
11399
11412
|
};
|
11413
|
+
/** @private
|
11414
|
+
* @param {string} rid Row Id
|
11415
|
+
* @returns {boolean}
|
11416
|
+
*/
|
11417
|
+
DataTable.prototype._removeRidFromSegments = function(rid) { // Data changed event may be dispatched
|
11418
|
+
if(this._segments) {
|
11419
|
+
var segment = this._segments.getSegment(rid);
|
11420
|
+
if(segment) {
|
11421
|
+
if(this._segments.removeSegment(rid)) {
|
11422
|
+
// TODO: Handle sub segment removal
|
11423
|
+
if(!this._segments.getSegmentCount()) {
|
11424
|
+
this._segments.dispose();
|
11425
|
+
this._segments = null;
|
11426
|
+
}
|
11427
|
+
return true;
|
11428
|
+
}
|
11429
|
+
} else {
|
11430
|
+
var segmentParentId = this._segments.getParentRowId(rid);
|
11431
|
+
if(segmentParentId) {
|
11432
|
+
this._segments.removeSegmentChild(segmentParentId, rid);
|
11433
|
+
}
|
11434
|
+
}
|
11435
|
+
}
|
11436
|
+
return false;
|
11437
|
+
};
|
11400
11438
|
/** Set data in row manner
|
11401
11439
|
* @override
|
11440
|
+
* @public
|
11402
11441
|
* @param {string} rid Row Id
|
11403
11442
|
* @param {Object.<string, *>=} values Object where the key is column Id and value is the data to be set
|
11404
11443
|
* @param {Object=} eventArg Additional arguments to be attached to the event fired
|
@@ -11455,18 +11494,7 @@ DataTable.prototype.setRowData = function(rid, values, eventArg) { // Data chang
|
|
11455
11494
|
// delete this._prevData[rid];
|
11456
11495
|
this._prevData[rid] = this._rows[rid]; // Move reference from the removed row to history
|
11457
11496
|
delete this._rows[rid];
|
11458
|
-
|
11459
|
-
var segment = this._segments.getSegment(rid);
|
11460
|
-
if(segment) {
|
11461
|
-
if(this._segments.removeSegment(rid)) {
|
11462
|
-
// TODO: Handle sub segment removal
|
11463
|
-
segmentChanged = true;
|
11464
|
-
if(!this._segments.getSegmentCount()) {
|
11465
|
-
this._segments = null;
|
11466
|
-
}
|
11467
|
-
}
|
11468
|
-
}
|
11469
|
-
}
|
11497
|
+
segmentChanged = this._removeRidFromSegments(rid);
|
11470
11498
|
DataTable._removeArrayItem(this._rids, rid);
|
11471
11499
|
dirty = true;
|
11472
11500
|
}
|
@@ -11770,7 +11798,7 @@ DataTable.prototype.removeRows = function(refs) {
|
|
11770
11798
|
this._prevData[rid] = this._rows[rid];
|
11771
11799
|
this._removedRows[rid] = 1;
|
11772
11800
|
delete this._rows[rid];
|
11773
|
-
|
11801
|
+
this._removeRidFromSegments(rid);
|
11774
11802
|
dirty = true;
|
11775
11803
|
}
|
11776
11804
|
}
|
@@ -11813,9 +11841,10 @@ DataTable._removeArrayItem = function(ary, item) {
|
|
11813
11841
|
DataTable.prototype.clearAllData = function(suppressEvent) {
|
11814
11842
|
DataTable.base(this, "clearAllData", true);
|
11815
11843
|
this._prevData = {};
|
11816
|
-
|
11844
|
+
|
11817
11845
|
if(this._segments) {
|
11818
|
-
this._segments.
|
11846
|
+
this._segments.dispose();
|
11847
|
+
this._segments = null;
|
11819
11848
|
}
|
11820
11849
|
|
11821
11850
|
if(this._rids.length) {
|
@@ -12189,6 +12218,7 @@ DataTable.prototype.setSegmentSeparator = function(rid, enabled) {
|
|
12189
12218
|
*/
|
12190
12219
|
DataTable.prototype.unsetAllSegmentSeparators = function() {
|
12191
12220
|
if(this._segments) {
|
12221
|
+
this._segments.dispose();
|
12192
12222
|
this._segments = null;
|
12193
12223
|
this.dispatchGlobalChange();
|
12194
12224
|
return true;
|
@@ -12216,7 +12246,7 @@ DataTable.prototype.isSegmentSeparator = function(rid) {
|
|
12216
12246
|
/** Get Segment object
|
12217
12247
|
* @public
|
12218
12248
|
* @param {string} rid Row id
|
12219
|
-
* @return {Segment}
|
12249
|
+
* @return {Segment} Returns null if a segment cannot be found
|
12220
12250
|
*/
|
12221
12251
|
DataTable.prototype.getSegment = function(rid) {
|
12222
12252
|
if(this._segments) {
|
@@ -12224,6 +12254,17 @@ DataTable.prototype.getSegment = function(rid) {
|
|
12224
12254
|
}
|
12225
12255
|
return null;
|
12226
12256
|
};
|
12257
|
+
/**
|
12258
|
+
* @public
|
12259
|
+
* @param {string} rid Row id of a segment child
|
12260
|
+
* @return {string} Returns null if a segment cannot be found
|
12261
|
+
*/
|
12262
|
+
DataTable.prototype.getSegmentParent = function(rid) {
|
12263
|
+
if(this._segments) {
|
12264
|
+
return this._segments.getSegmentParent(rid);
|
12265
|
+
}
|
12266
|
+
return null;
|
12267
|
+
};
|
12227
12268
|
/** Segment level starts from 1
|
12228
12269
|
* @public
|
12229
12270
|
* @param {string} rid
|
@@ -13217,6 +13258,7 @@ DataTable._proto = DataTable.prototype;
|
|
13217
13258
|
* @property {boolean=} hidden=true When this row is hidden
|
13218
13259
|
* @property {boolean=} realTime=true Realtime row, able to request for JET/RTK
|
13219
13260
|
* @property {Object=} info=null For storing any additional information to the row
|
13261
|
+
* @property {string=} rowId Row identifier used for referencing the row
|
13220
13262
|
*/
|
13221
13263
|
|
13222
13264
|
/** @typedef {Object} RowDefinition~RowTypes
|
@@ -13313,6 +13355,10 @@ RowDefinition.prototype._rowId = ""; // Row Id must be unique
|
|
13313
13355
|
* @private
|
13314
13356
|
*/
|
13315
13357
|
RowDefinition.prototype._dataId = ""; // Data id can be different from rowId for constituents of a chain
|
13358
|
+
/** @type {boolean}
|
13359
|
+
* @private
|
13360
|
+
*/
|
13361
|
+
RowDefinition.prototype._userId = false;
|
13316
13362
|
/** @type {DataCache}
|
13317
13363
|
* @private
|
13318
13364
|
*/
|
@@ -13407,6 +13453,7 @@ RowDefinition.prototype.dispose = function() {
|
|
13407
13453
|
this._view = null;
|
13408
13454
|
}
|
13409
13455
|
this._rowId = this._dataId = "";
|
13456
|
+
this._userId = false;
|
13410
13457
|
this._userModel = null;
|
13411
13458
|
};
|
13412
13459
|
/** @public
|
@@ -13423,6 +13470,14 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
13423
13470
|
return;
|
13424
13471
|
}
|
13425
13472
|
|
13473
|
+
if(!this._autoGenerated) {
|
13474
|
+
let userRowId = rowOptions["rowId"];
|
13475
|
+
if(userRowId && typeof userRowId === "string") {
|
13476
|
+
this._rowId = this._dataId = userRowId;
|
13477
|
+
this._userId = true;
|
13478
|
+
}
|
13479
|
+
}
|
13480
|
+
|
13426
13481
|
let extractedOptions = RowDefinition.extractRowOptions(rowOptions);
|
13427
13482
|
|
13428
13483
|
let val = rowOptions["permId"];
|
@@ -13546,28 +13601,36 @@ RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
|
13546
13601
|
} else {
|
13547
13602
|
this._ric = this._userInput;
|
13548
13603
|
}
|
13549
|
-
this._isChain = asChain;
|
13604
|
+
this._isChain = asChain != null ? asChain : null; // this could be null or undefined
|
13550
13605
|
this._chainRic = chainRic || "";
|
13551
13606
|
}
|
13552
13607
|
|
13608
|
+
let segmentId = "";
|
13553
13609
|
if(this._view) {
|
13554
|
-
|
13555
|
-
|
13556
|
-
let
|
13557
|
-
|
13558
|
-
|
13559
|
-
|
13610
|
+
segmentId = this._view.getSegmentParentRowId(this._rowId);
|
13611
|
+
if(this._isChain && segmentId){ // If the row was a normal row and has been changed to a chain, remove it from existing segment
|
13612
|
+
let targetRowId = _getEndOfSegmentRowId(this._view, this._rowId);
|
13613
|
+
this._view.removeSegmentChild(segmentId, this._rowId);
|
13614
|
+
this._view.moveRow(this._rowId, targetRowId);
|
13615
|
+
|
13616
|
+
segmentId = "";
|
13560
13617
|
}
|
13561
13618
|
this._view.setSegmentSeparator(this._rowId, !!this._isChain);
|
13562
|
-
if(this.
|
13563
|
-
this.
|
13564
|
-
|
13565
|
-
|
13619
|
+
if(this.isChainCollapsed()) {
|
13620
|
+
if(this._expanded){
|
13621
|
+
this.expandChain();
|
13622
|
+
}
|
13623
|
+
} else {
|
13624
|
+
if (!this._expanded) {
|
13625
|
+
this.collapseChain();
|
13626
|
+
}
|
13566
13627
|
}
|
13567
13628
|
}
|
13568
13629
|
|
13569
|
-
this._dataId = this._rowId + this.getSymbol(); // JET/RTK will generate data id to be rowId (given from this rowDef) + ric
|
13570
|
-
|
13630
|
+
this._dataId = this._rowId + this.getSymbol(); // JET/RTK will generate data id to be rowId (given from this rowDef) + ric
|
13631
|
+
if(segmentId) { // If data id is changed and the row is a child of a segment, then segment child data id must be updated
|
13632
|
+
this._view.addSegmentChild(segmentId, this._rowId, this._dataId);
|
13633
|
+
}
|
13571
13634
|
|
13572
13635
|
if(!this.subscribeForUpdates()) {
|
13573
13636
|
if(this._dc) {
|
@@ -13593,6 +13656,11 @@ RowDefinition.prototype.getRowId = function() {
|
|
13593
13656
|
*/
|
13594
13657
|
RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
13595
13658
|
let obj = rowOptions || {};
|
13659
|
+
|
13660
|
+
if(this._userId) {
|
13661
|
+
obj["rowId"] = this._rowId;
|
13662
|
+
}
|
13663
|
+
|
13596
13664
|
let val = this._ric;
|
13597
13665
|
if(val) {
|
13598
13666
|
obj["ric"] = val;
|
@@ -14070,6 +14138,22 @@ RowDefinition.prototype.resetUpdates = function() {
|
|
14070
14138
|
}
|
14071
14139
|
};
|
14072
14140
|
|
14141
|
+
/** @private
|
14142
|
+
* @param {DataView} view
|
14143
|
+
* @param {string} rowId
|
14144
|
+
* @returns {string}
|
14145
|
+
*/
|
14146
|
+
let _getEndOfSegmentRowId = function(view, rowId) {
|
14147
|
+
let rowIndex = view.getRowIndex(rowId);
|
14148
|
+
do {
|
14149
|
+
rowId = view.getRowId(++rowIndex);
|
14150
|
+
if(rowId && !view.getSegmentParentRowId(rowId)) {
|
14151
|
+
break;
|
14152
|
+
}
|
14153
|
+
} while(rowId);
|
14154
|
+
return rowId;
|
14155
|
+
};
|
14156
|
+
|
14073
14157
|
/** @public
|
14074
14158
|
* @param {DataView} view
|
14075
14159
|
* @param {string=} rowId
|
@@ -14092,14 +14176,29 @@ RowDefinition.prototype.registerToView = function(view, rowId) {
|
|
14092
14176
|
rowData = {};
|
14093
14177
|
rowData[ROW_DEF] = this;
|
14094
14178
|
|
14095
|
-
let
|
14096
|
-
|
14179
|
+
let parentRowId = "";
|
14180
|
+
if(rowId) {
|
14181
|
+
parentRowId = view.getSegmentParentRowId(rowId);
|
14182
|
+
if(parentRowId) {
|
14183
|
+
if(this._isChain) { // A chain cannot be put inside another segment
|
14184
|
+
rowId = _getEndOfSegmentRowId(view, rowId);
|
14185
|
+
} // else { // Normal row is inserted into a segment
|
14186
|
+
}
|
14187
|
+
}
|
14188
|
+
|
14189
|
+
let newRowId = view.insertRow(rowId, rowData, this.getRowId());
|
14190
|
+
if(newRowId !== this._rowId) {
|
14191
|
+
this._rowId = newRowId; // In case there is some duplicate row id
|
14192
|
+
this._userId = false;
|
14193
|
+
}
|
14097
14194
|
|
14098
14195
|
if(this._isChain) {
|
14099
14196
|
view.setSegmentSeparator(this._rowId);
|
14100
14197
|
if(!this._expanded) {
|
14101
14198
|
this.collapseChain();
|
14102
14199
|
}
|
14200
|
+
} else if(parentRowId) {
|
14201
|
+
view.addSegmentChild(parentRowId, this._rowId, this._dataId);
|
14103
14202
|
}
|
14104
14203
|
};
|
14105
14204
|
/** @private
|
@@ -14485,7 +14584,7 @@ RowDefinition.extractRowOptions = function(rowOptions) {
|
|
14485
14584
|
extractedOptions["collapsed"] = collapsed;
|
14486
14585
|
}
|
14487
14586
|
extractedOptions["ric"] = ric;
|
14488
|
-
extractedOptions["permId"] = permId;
|
14587
|
+
extractedOptions["permId"] = permId || "";
|
14489
14588
|
extractedOptions["chainRic"] = chainRic;
|
14490
14589
|
extractedOptions["asChain"] = asChain;
|
14491
14590
|
return extractedOptions;
|
@@ -31480,12 +31579,20 @@ DataView.prototype.isSegmentSeparator = function(rid) {
|
|
31480
31579
|
|
31481
31580
|
/** Get Segment object
|
31482
31581
|
* @public
|
31483
|
-
* @param {string} rid Row id
|
31484
|
-
* @return {Segment}
|
31582
|
+
* @param {string} rid Row id of a segment
|
31583
|
+
* @return {Segment} Returns null if a segment cannot be found
|
31485
31584
|
*/
|
31486
31585
|
DataView.prototype.getSegment = function(rid) {
|
31487
31586
|
return this._dt.getSegment(rid);
|
31488
31587
|
};
|
31588
|
+
/**
|
31589
|
+
* @public
|
31590
|
+
* @param {string} rid Row id of a segment child
|
31591
|
+
* @return {string} Returns null if a segment cannot be found
|
31592
|
+
*/
|
31593
|
+
DataView.prototype.getSegmentParent = function(rid) {
|
31594
|
+
return this._dt.getSegmentParent(rid);
|
31595
|
+
};
|
31489
31596
|
/** Segment level starts from 1
|
31490
31597
|
* @public
|
31491
31598
|
* @param {string} rid Row id
|
@@ -36332,7 +36439,7 @@ Core.prototype._hasPendingRowChange = false;
|
|
36332
36439
|
* @return {string}
|
36333
36440
|
*/
|
36334
36441
|
Core.getVersion = function () {
|
36335
|
-
return "5.1.
|
36442
|
+
return "5.1.95";
|
36336
36443
|
};
|
36337
36444
|
/** {@link ElementWrapper#dispose}
|
36338
36445
|
* @override
|
@@ -39622,7 +39729,7 @@ Core.prototype.requestRowRefresh = function() {
|
|
39622
39729
|
}
|
39623
39730
|
};
|
39624
39731
|
/** Set a timer to call updateScrollbarHeight only once to avoid performance issue due to multiple call of _updateScrollbarHeight()
|
39625
|
-
* @
|
39732
|
+
* @private
|
39626
39733
|
*/
|
39627
39734
|
Core.prototype._requestScrollbarUpdate = function() {
|
39628
39735
|
this._updateScrollbarHeight(true, true);
|
@@ -44632,7 +44739,7 @@ SortableTitlePlugin._proto = SortableTitlePlugin.prototype;
|
|
44632
44739
|
*/
|
44633
44740
|
|
44634
44741
|
/** @event Grid#beforeContentBinding
|
44635
|
-
* @property {Object} e Event of beforeContentBinding,
|
44742
|
+
* @property {Object} e Event of beforeContentBinding, we can use e.actualUpdate to check the actual data update, otherwise It will be empty when it is rendered by row virtualization or only the UI changes.
|
44636
44743
|
* @description Trigger before content binding.
|
44637
44744
|
*/
|
44638
44745
|
|
@@ -44719,33 +44826,33 @@ let compareNumber = function(rowDefA, rowDefB, sortOrder, fieldName) { // edit n
|
|
44719
44826
|
* @param {string} sortOrder
|
44720
44827
|
* @return {number} The outcome of the value comparison
|
44721
44828
|
*/
|
44722
|
-
let _sortChildrenOfChain =
|
44829
|
+
let _sortChildrenOfChain = function (rowDefA, rowDefB, sortOrder) {
|
44723
44830
|
let parentA = rowDefA.getParent();
|
44724
44831
|
|
44725
44832
|
if (!parentA) {
|
44726
|
-
|
44833
|
+
return 0;
|
44727
44834
|
}
|
44728
44835
|
|
44729
44836
|
let parentB = rowDefB.getParent();
|
44730
44837
|
|
44731
44838
|
if (!parentB) {
|
44732
|
-
|
44839
|
+
return 0;
|
44733
44840
|
}
|
44734
44841
|
|
44735
44842
|
if (parentA !== parentB) {
|
44736
|
-
|
44843
|
+
return 0;
|
44737
44844
|
}
|
44738
44845
|
|
44739
44846
|
let a = rowDefA.getData('CHILD_ORDER');
|
44740
44847
|
|
44741
44848
|
if (a == null) {
|
44742
|
-
|
44849
|
+
return 0;
|
44743
44850
|
}
|
44744
44851
|
|
44745
44852
|
let b = rowDefB.getData('CHILD_ORDER');
|
44746
44853
|
|
44747
44854
|
if (b == null) {
|
44748
|
-
|
44855
|
+
return 0;
|
44749
44856
|
}
|
44750
44857
|
|
44751
44858
|
return ( a - b ) * sortOrder;
|
@@ -45968,7 +46075,7 @@ Grid.prototype._populateTimeSeriesChildren = function (colDef) {
|
|
45968
46075
|
return;
|
45969
46076
|
}
|
45970
46077
|
|
45971
|
-
let colDefs
|
46078
|
+
let colDefs = this._timeSeriesChildConflator.popAllData();
|
45972
46079
|
let i, j, len, childField, idx;
|
45973
46080
|
|
45974
46081
|
for (i = 0; i < colDefs.length; i++) {
|
@@ -46078,7 +46185,7 @@ Grid.prototype.replaceColumn = function (columnOption, colRef) {
|
|
46078
46185
|
|
46079
46186
|
let colDef = this.getColumnDefinition(colIndex);
|
46080
46187
|
if(colDef && colConfig.id == null) {
|
46081
|
-
colConfig.id =
|
46188
|
+
colConfig.id = colDef.getId(); // retain ID
|
46082
46189
|
}
|
46083
46190
|
this._grid.startBatch("reset");
|
46084
46191
|
this.removeColumn(colIndex);
|
@@ -46849,7 +46956,7 @@ Grid.prototype.insertRows = function(rowOptions, rowRef, opt_fields) {
|
|
46849
46956
|
* ], ["field1", "field2", "field3"]); // 3 rows are appended
|
46850
46957
|
*
|
46851
46958
|
* grid.addStaticDataRows([ // Object format can also be used
|
46852
|
-
* {"field1": 40, "field2": "a",
|
46959
|
+
* {"field1": 40, "field2": "a", "field3": true},
|
46853
46960
|
* {"field1": 50, "field2": "b"}, // each row doesn't have to be the same
|
46854
46961
|
* {"field1": 60, "field4": "some thing"}
|
46855
46962
|
* ]); // 3 more rows are appended
|
@@ -47185,9 +47292,16 @@ Grid.prototype.setRic = function(rowRef, str, options) {
|
|
47185
47292
|
}
|
47186
47293
|
let rowDef = this._getRowDefinitionByRef(rowRef);
|
47187
47294
|
if(rowDef) {
|
47188
|
-
|
47189
|
-
|
47190
|
-
|
47295
|
+
var tempOpt = options || {};
|
47296
|
+
if(typeof str === "string") {
|
47297
|
+
tempOpt["ric"] = str;
|
47298
|
+
} else {
|
47299
|
+
if(str && !options) {
|
47300
|
+
tempOpt = str;
|
47301
|
+
}
|
47302
|
+
str = tempOpt["ric"] ? tempOpt["ric"] : "";
|
47303
|
+
}
|
47304
|
+
let extractedOptions = RowDefinition.extractRowOptions(tempOpt);
|
47191
47305
|
let oldRic = rowDef.getSymbol();
|
47192
47306
|
if(rowDef.setContent(str, extractedOptions)) { // The given string may not be a RIC
|
47193
47307
|
this._connector.removeRic(rowDef, oldRic);
|
@@ -47195,9 +47309,9 @@ Grid.prototype.setRic = function(rowRef, str, options) {
|
|
47195
47309
|
this._connector.addRic(rowDef);
|
47196
47310
|
}
|
47197
47311
|
|
47198
|
-
let values =
|
47312
|
+
let values = tempOpt["values"];
|
47199
47313
|
if(values != null) {
|
47200
|
-
rowDef.setStaticRowData(values,
|
47314
|
+
rowDef.setStaticRowData(values, tempOpt["fields"]);
|
47201
47315
|
}
|
47202
47316
|
}
|
47203
47317
|
};
|
@@ -48169,7 +48283,7 @@ Grid.prototype.isFocused = function() {
|
|
48169
48283
|
return this.contains(activeElement);
|
48170
48284
|
}
|
48171
48285
|
// For wrapper scenarios, such as atlas-blotter or efx-grid
|
48172
|
-
return
|
48286
|
+
return activeElement.shadowRoot === this._topNode.parentNode;
|
48173
48287
|
};
|
48174
48288
|
/** @description Focus grid element without moving window scrollbar
|
48175
48289
|
* @public
|
@@ -48463,26 +48577,35 @@ Grid.prototype._logData = function(rowDefs, options) {
|
|
48463
48577
|
};
|
48464
48578
|
|
48465
48579
|
/** @public
|
48466
|
-
* @description Replace existing row
|
48580
|
+
* @description Replace existing row by a new row. Row Id is always changed, after the row is replaced.
|
48467
48581
|
* @param {Grid~RowReference} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
|
48468
48582
|
* @param {(RowDefinition~Options|string)=} rowOption
|
48469
|
-
* @returns {RowDefinition}
|
48583
|
+
* @returns {RowDefinition} Returns null, if the row is not replaced. Otherwise, a newly created row is returned
|
48470
48584
|
*/
|
48471
48585
|
Grid.prototype.replaceRow = function(rowRef, rowOption) {
|
48472
|
-
let
|
48473
|
-
let rowDef = this.
|
48474
|
-
|
48475
|
-
|
48586
|
+
let insertPos = this._getRowId(rowRef);
|
48587
|
+
let rowDef = this._getRowDefinitionById(insertPos);
|
48588
|
+
|
48589
|
+
if(rowDef) {
|
48590
|
+
if(rowDef.isAutoGenerated()) {
|
48591
|
+
return null; // Users cannot replace an auto-generated row
|
48592
|
+
}
|
48593
|
+
|
48594
|
+
let configObj = rowDef.getConfigObject();
|
48595
|
+
if(rowDef.getRowId() === rowOption["rowId"]) {
|
48596
|
+
return null; // Cannot replace a row with the same row id
|
48597
|
+
}
|
48598
|
+
|
48599
|
+
if(deepEqual(configObj, rowOption)){
|
48600
|
+
return null;
|
48601
|
+
}
|
48476
48602
|
}
|
48477
|
-
let configObj = rowDef.getConfigObject();
|
48478
48603
|
|
48479
|
-
|
48480
|
-
|
48481
|
-
|
48482
|
-
let insertedRow = this.insertRow(rowOption, rowId);
|
48483
|
-
this.removeRow(rowId);
|
48484
|
-
return insertedRow;
|
48604
|
+
let newRow = this.insertRow(rowOption, insertPos);
|
48605
|
+
if(rowDef) {
|
48606
|
+
this.removeRow(insertPos);
|
48485
48607
|
}
|
48608
|
+
return newRow;
|
48486
48609
|
};
|
48487
48610
|
|
48488
48611
|
/** Scroll the view to the specified column. If the column is already in the view, nothing happens. If the column is outside of the view, the view will be moved to the column with some additional offsets
|
@@ -48526,7 +48649,7 @@ Grid.prototype.getScrollTop = function () {
|
|
48526
48649
|
Grid.prototype.setScrollLeft = function (pixels) {
|
48527
48650
|
this._grid.setScrollLeft(pixels);
|
48528
48651
|
};
|
48529
|
-
/**
|
48652
|
+
/** Set scroll value to the vertical scrollbar. This will move the scrollbar to specific position
|
48530
48653
|
* @public
|
48531
48654
|
* @param {number} pixels
|
48532
48655
|
* @see {@link Grid.scrollDown}
|