@refinitiv-ui/efx-grid 6.0.36 → 6.0.37
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/grid/index.js +1 -1
- package/lib/grid/themes/base.less +1 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +2 -0
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +278 -101
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/FieldDefinition.js +0 -41
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -2
- package/lib/rt-grid/es6/RowDefinition.js +102 -52
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +54 -27
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +7 -0
- package/lib/types/es6/ColumnStack.d.ts +1 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +4 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -2
- package/lib/versions.json +2 -2
- package/package.json +1 -1
@@ -14,40 +14,6 @@ var SYNAPSE_URL =
|
|
14
14
|
+ 'hits=1' // search only 1 result
|
15
15
|
+ '&profile=' + encodeURIComponent('Field Selector');
|
16
16
|
|
17
|
-
/** @function
|
18
|
-
* @private
|
19
|
-
* @param {Object} e
|
20
|
-
*/
|
21
|
-
function xRicNameRenderer(e) {
|
22
|
-
e.cell.setContent(e.rowDef.getDisplayText());
|
23
|
-
}
|
24
|
-
/** @function
|
25
|
-
* @private
|
26
|
-
* @param {RowDefinition} rowA
|
27
|
-
* @param {RowDefinition} rowB
|
28
|
-
* @param {number} order
|
29
|
-
* @returns {number}
|
30
|
-
*/
|
31
|
-
function xRicNameSorter(rowA, rowB, order) {
|
32
|
-
var A = rowA.getDisplayText();
|
33
|
-
var B = rowB.getDisplayText();
|
34
|
-
if(A === B) {
|
35
|
-
return 0;
|
36
|
-
}
|
37
|
-
if(!A) {
|
38
|
-
return 1;
|
39
|
-
}
|
40
|
-
if(!B) {
|
41
|
-
return -1;
|
42
|
-
}
|
43
|
-
if(A < B) {
|
44
|
-
return -order;
|
45
|
-
}
|
46
|
-
|
47
|
-
return order;
|
48
|
-
}
|
49
|
-
|
50
|
-
|
51
17
|
/* @namespace */
|
52
18
|
var FieldDefinition = {};
|
53
19
|
|
@@ -55,13 +21,6 @@ var FieldDefinition = {};
|
|
55
21
|
* @private
|
56
22
|
*/
|
57
23
|
FieldDefinition._defs = {
|
58
|
-
"X_RIC_NAME": {
|
59
|
-
name: "RIC",
|
60
|
-
IsRealtimeField: false,
|
61
|
-
width: 100,
|
62
|
-
binding: xRicNameRenderer,
|
63
|
-
sortLogic: xRicNameSorter
|
64
|
-
},
|
65
24
|
"CF_NAME": {
|
66
25
|
name: "Name",
|
67
26
|
rank: 2800003,
|
@@ -37,7 +37,7 @@ declare class RowDefinition {
|
|
37
37
|
|
38
38
|
public initialize(rowOptions?: RowDefinition.Options|null): void;
|
39
39
|
|
40
|
-
public setContent(userInput: string, permId?: string|null): boolean;
|
40
|
+
public setContent(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null, realTime?: boolean|null): boolean;
|
41
41
|
|
42
42
|
public getRowId(): string;
|
43
43
|
|
@@ -143,7 +143,7 @@ declare const ROW_DEF: string;
|
|
143
143
|
|
144
144
|
declare const ROW_TYPES: RowDefinition.RowTypes;
|
145
145
|
|
146
|
-
declare function rowData(userInput: string, permId?: string|null): boolean;
|
146
|
+
declare function rowData(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null, realTime?: boolean|null): boolean;
|
147
147
|
|
148
148
|
export {RowDefinition, ROW_DEF, ROW_TYPES};
|
149
149
|
export default RowDefinition;
|
@@ -12,9 +12,10 @@ import { DataTable } from "../../core/es6/data/DataTable.js";
|
|
12
12
|
* @property {Array.<string>=} fields=null Field that corresponds to the given static values
|
13
13
|
* @property {boolean=} asChain=false The given ric will be treated as a chain
|
14
14
|
* @property {string=} chainRic="" RIC to be used for chain request (overiding ric property)
|
15
|
-
* @property {boolean=} collapsed=
|
15
|
+
* @property {boolean=} collapsed=true Chain is collapsed by default
|
16
16
|
* @property {(string|null)=} label=null
|
17
17
|
* @property {boolean=} hidden=true When this row is hidden
|
18
|
+
* @pro // realTime
|
18
19
|
*/
|
19
20
|
|
20
21
|
/** @typedef {Object} RowDefinition~RowTypes
|
@@ -90,18 +91,18 @@ RowDefinition.prototype._ric = ""; // Contains no 0#
|
|
90
91
|
* @private
|
91
92
|
*/
|
92
93
|
RowDefinition.prototype._permId = "";
|
93
|
-
/** @type {string}
|
94
|
-
* @private
|
95
|
-
*/
|
96
|
-
RowDefinition.prototype._displayText = "";
|
97
94
|
/** @type {string|null}
|
98
95
|
* @private
|
99
96
|
*/
|
100
97
|
RowDefinition.prototype._label = null; // Label overrides _ric and _displayText
|
98
|
+
/** @type {boolean|null}
|
99
|
+
* @private
|
100
|
+
*/
|
101
|
+
RowDefinition.prototype._isChain = null;
|
101
102
|
/** @type {boolean}
|
102
103
|
* @private
|
103
104
|
*/
|
104
|
-
RowDefinition.prototype.
|
105
|
+
RowDefinition.prototype._realTime = true;
|
105
106
|
|
106
107
|
/** @type {string}
|
107
108
|
* @private
|
@@ -125,10 +126,10 @@ RowDefinition.prototype._view = null;
|
|
125
126
|
*/
|
126
127
|
RowDefinition.prototype._subId = "";
|
127
128
|
|
128
|
-
/** @type {boolean}
|
129
|
+
/** @type {boolean|null}
|
129
130
|
* @private
|
130
131
|
*/
|
131
|
-
RowDefinition.prototype._expanded =
|
132
|
+
RowDefinition.prototype._expanded = null;
|
132
133
|
/** @type {boolean}
|
133
134
|
* @private
|
134
135
|
*/
|
@@ -216,18 +217,19 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
216
217
|
return;
|
217
218
|
}
|
218
219
|
|
219
|
-
var val = rowOptions["
|
220
|
+
var val = rowOptions["permId"];
|
220
221
|
if(val != null) {
|
221
|
-
this.
|
222
|
+
this._permId = val;
|
222
223
|
}
|
223
|
-
val = rowOptions["
|
224
|
+
val = rowOptions["ric"];
|
224
225
|
if(val != null) {
|
225
|
-
this.
|
226
|
+
this._ric = val;
|
226
227
|
}
|
227
|
-
|
228
|
-
|
228
|
+
val = rowOptions["label"];
|
229
|
+
// eslint-disable-next-line no-undefined
|
230
|
+
if(val !== undefined) { // Empty string and null are allowed
|
231
|
+
this._label = val;
|
229
232
|
}
|
230
|
-
|
231
233
|
val = rowOptions["chainRic"];
|
232
234
|
if(val != null) {
|
233
235
|
this._chainRic = val;
|
@@ -239,26 +241,40 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
239
241
|
}
|
240
242
|
|
241
243
|
val = rowOptions["asChain"];
|
242
|
-
if(val) {
|
243
|
-
this._isChain =
|
244
|
-
this._expanded = !rowOptions["collapsed"];
|
245
|
-
} else if(this._isChain) {
|
246
|
-
var collapsed = rowOptions["collapsed"];
|
247
|
-
if(collapsed != null) {
|
248
|
-
this._expanded = !collapsed;
|
249
|
-
}
|
244
|
+
if(val !== null) {
|
245
|
+
this._isChain = val;
|
250
246
|
}
|
251
247
|
|
252
|
-
val = rowOptions["
|
253
|
-
|
254
|
-
|
255
|
-
this._label = val;
|
248
|
+
val = rowOptions["realTime"];
|
249
|
+
if(val != null) {
|
250
|
+
this._realTime = val;
|
256
251
|
}
|
257
252
|
|
253
|
+
val = rowOptions["collapsed"];
|
254
|
+
if(val != null){
|
255
|
+
this._expanded = !val;
|
256
|
+
}
|
258
257
|
val = rowOptions["keepModel"];
|
259
258
|
if(val) {
|
260
259
|
this._userModel = rowOptions;
|
261
260
|
}
|
261
|
+
|
262
|
+
var expanded = this._expanded;
|
263
|
+
var symbol = this._ric || this._chainRic;
|
264
|
+
var asChain = rowOptions["asChain"] || !!this._chainRic;
|
265
|
+
if(this._ric && this._ric.indexOf("0#") >= 0){
|
266
|
+
asChain = true;
|
267
|
+
expanded = true;
|
268
|
+
}
|
269
|
+
if(rowOptions["asChain"] === false){
|
270
|
+
asChain = false;
|
271
|
+
}
|
272
|
+
if(rowOptions["collapsed"] === true){
|
273
|
+
expanded = false;
|
274
|
+
}
|
275
|
+
if(symbol || this._permId){
|
276
|
+
this.setContent(symbol, this._permId, asChain, expanded); // this._dataId is modified
|
277
|
+
}
|
262
278
|
};
|
263
279
|
/** @private
|
264
280
|
* @param {!Object} rowOptions
|
@@ -268,7 +284,6 @@ RowDefinition.prototype._initializeAsConstituent = function(rowOptions) {
|
|
268
284
|
var parentDef = /** @type{RowDefinition} */(rowOptions["parent"]);
|
269
285
|
if(this.setParent(parentDef)) {
|
270
286
|
this._dataId = /** @type{string} */(rowOptions["dataId"]); // Constituent will have the same subId as its parent but with different ric
|
271
|
-
this._displayText = this._ric = /** @type{string} */(rowOptions["ric"]);
|
272
287
|
|
273
288
|
this._dc = parentDef._dc; // Parent chain must have data cache
|
274
289
|
if(this._dc) {
|
@@ -287,9 +302,12 @@ RowDefinition.prototype._initializeAsConstituent = function(rowOptions) {
|
|
287
302
|
/** @public
|
288
303
|
* @param {string} userInput RIC
|
289
304
|
* @param {string=} permId=null Organization PermId, which use for getting ADC data for private company
|
305
|
+
* @param {boolean=} asChain
|
306
|
+
* @param {boolean=} expanded
|
307
|
+
* @param {boolean=} realTime
|
290
308
|
* @return {boolean} True if there is any change otherwise false
|
291
309
|
*/
|
292
|
-
RowDefinition.prototype.setContent = function(userInput, permId) {
|
310
|
+
RowDefinition.prototype.setContent = function(userInput, permId, asChain, expanded) {
|
293
311
|
if(this._autoGenerated) { // AutoGenerated RowDefinition cannot be changed by user input
|
294
312
|
return false;
|
295
313
|
}
|
@@ -303,10 +321,7 @@ RowDefinition.prototype.setContent = function(userInput, permId) {
|
|
303
321
|
var dirty = (this._userInput !== userInput);
|
304
322
|
if(this._permId !== permId){
|
305
323
|
this._permId = permId || "";
|
306
|
-
|
307
|
-
this._displayText = this._permId;
|
308
|
-
dirty = true;
|
309
|
-
}
|
324
|
+
dirty = true;
|
310
325
|
}
|
311
326
|
if(!dirty) {
|
312
327
|
return false;
|
@@ -315,34 +330,44 @@ RowDefinition.prototype.setContent = function(userInput, permId) {
|
|
315
330
|
this.unsubscribeForUpdates();
|
316
331
|
this.resetUpdates(); // Remove all previous data updates because a new content is just entered
|
317
332
|
|
333
|
+
// TODO: handle changing between chain and ric row
|
318
334
|
this._userInput = userInput;
|
319
335
|
if(this._userInput.charAt(0) === "'") { // This is a row header
|
320
|
-
this._displayText = this._userInput.substr(1);
|
321
336
|
this._ric = this._chainRic = ""; // No ric for realtime request
|
322
337
|
} else {
|
323
338
|
if(this._userInput.indexOf("0#") >= 0) {
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
this.
|
329
|
-
this.
|
339
|
+
if(asChain === false){
|
340
|
+
this._ric = this._userInput;
|
341
|
+
} else {
|
342
|
+
this._ric = expanded ? this._userInput.replace("0#", "") : this._userInput;
|
343
|
+
this._expanded = expanded;
|
344
|
+
this._isChain = true; // Only chain can be expanded by 0#
|
345
|
+
this._chainRic = this._userInput;
|
346
|
+
if(this._view) {
|
347
|
+
this._view.setSegmentSeparator(this._rowId);
|
348
|
+
this.expandChain();
|
349
|
+
}
|
330
350
|
}
|
331
351
|
} else {
|
332
352
|
this._ric = this._userInput;
|
333
|
-
|
353
|
+
if(asChain){
|
354
|
+
this._isChain = true;
|
355
|
+
}
|
334
356
|
}
|
335
|
-
this._displayText = this._ric; // No 0#
|
336
357
|
}
|
337
358
|
|
338
359
|
this._dataId = this._rowId + this.getSymbol(); // JET/RTK will generate data id to be rowId (given from this rowDef) + ric;
|
339
360
|
|
340
|
-
|
361
|
+
|
341
362
|
if(!this.subscribeForUpdates()) {
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
363
|
+
if(this._dc) {
|
364
|
+
// This will work for runtime ric modification, but not for first initilization.
|
365
|
+
// Avoid losing the ROW_DEF pointer.
|
366
|
+
var rowData = {};
|
367
|
+
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
368
|
+
rowData["X_RIC_NAME"] = this.getDisplayText();
|
369
|
+
this.setRowData(rowData);
|
370
|
+
}
|
346
371
|
}
|
347
372
|
return true;
|
348
373
|
};
|
@@ -363,6 +388,16 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
363
388
|
obj["ric"] = val;
|
364
389
|
}
|
365
390
|
|
391
|
+
// The user passed a single quote (') case
|
392
|
+
if(!this._ric && this._userInput.charAt(0) === "'") {
|
393
|
+
obj["ric"] = this._userInput;
|
394
|
+
}
|
395
|
+
|
396
|
+
val = this._realTime;
|
397
|
+
if(val !== true) {
|
398
|
+
obj["realTime"] = val;
|
399
|
+
}
|
400
|
+
|
366
401
|
val = this._permId;
|
367
402
|
if(val) {
|
368
403
|
obj["permId"] = val;
|
@@ -384,12 +419,12 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
384
419
|
}
|
385
420
|
|
386
421
|
val = this._isChain;
|
387
|
-
if(val) {
|
422
|
+
if(val != null) {
|
388
423
|
obj["asChain"] = val;
|
389
424
|
}
|
390
425
|
|
391
426
|
val = this._expanded;
|
392
|
-
if(val) {
|
427
|
+
if(val != null) {
|
393
428
|
obj["collapsed"] = !val;
|
394
429
|
}
|
395
430
|
|
@@ -487,6 +522,7 @@ RowDefinition.prototype.setDataSource = function(dataSource) {
|
|
487
522
|
if(!rowData) {
|
488
523
|
rowData = {};
|
489
524
|
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
525
|
+
rowData["X_RIC_NAME"] = this.getDisplayText();
|
490
526
|
this.setRowData(rowData); // TODO: This will dispatch dataChanged event and caused update to be added, which should not happen
|
491
527
|
}
|
492
528
|
|
@@ -629,7 +665,16 @@ RowDefinition.prototype.getDisplayText = function() {
|
|
629
665
|
if(this._label != null) { // Empty string is allowed
|
630
666
|
return this._label;
|
631
667
|
}
|
632
|
-
|
668
|
+
|
669
|
+
if(this._ric) {
|
670
|
+
return this._ric;
|
671
|
+
}
|
672
|
+
|
673
|
+
if(this._permId) {
|
674
|
+
return this._permId;
|
675
|
+
}
|
676
|
+
|
677
|
+
return this._userInput;
|
633
678
|
};
|
634
679
|
/** @public
|
635
680
|
* @return {string|null}
|
@@ -693,13 +738,18 @@ RowDefinition.prototype.isRealTimeRow = function() {
|
|
693
738
|
if(!this.getRic()) { // Empty row
|
694
739
|
return false;
|
695
740
|
}
|
696
|
-
if(this.
|
741
|
+
if(!this._realTime) {
|
697
742
|
return false;
|
698
743
|
}
|
744
|
+
|
699
745
|
if(this._autoGenerated) { // Constituents in chain are not real-time row
|
700
746
|
return false;
|
701
747
|
}
|
702
748
|
|
749
|
+
if(this.isRowHeader()) {
|
750
|
+
return false;
|
751
|
+
}
|
752
|
+
|
703
753
|
return true;
|
704
754
|
};
|
705
755
|
|
@@ -728,7 +778,7 @@ RowDefinition.prototype.subscribeForUpdates = function() {
|
|
728
778
|
if(prevRowData) {
|
729
779
|
this._dc.setRowData(this._dataId, prevRowData); // TODO: We may need to create a new object instead of prevRowData for data correctness
|
730
780
|
} else {
|
731
|
-
this._dc.setRowData(this._dataId, {"X_RIC_NAME": this.
|
781
|
+
this._dc.setRowData(this._dataId, {"X_RIC_NAME": this.getDisplayText(), "ROW_DEF": this}); // Trigger data update immediately
|
732
782
|
}
|
733
783
|
return true;
|
734
784
|
};
|
@@ -44,7 +44,7 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
|
44
44
|
* @description Available options describing grouped column displaying
|
45
45
|
* @property {boolean=} spreading=false If specified true, this group will be running in collapsing mode
|
46
46
|
* @property {boolean=} collapsed=true If disabled, this group will be expanded at the first time
|
47
|
-
* @property {string=} activeColumn="" Column index or field for set as active column
|
47
|
+
* @property {string=} activeColumn="" Column index, column id, or field for set as active column
|
48
48
|
*/
|
49
49
|
|
50
50
|
/** @event ColumnStackPlugin#clicked
|
@@ -95,6 +95,7 @@ var _resolveActiveColumn = function(stackOpt) {
|
|
95
95
|
var children = stackOpt.children;
|
96
96
|
if(children && children.length) {
|
97
97
|
var activeColumn = stackOpt.activeColumn;
|
98
|
+
// TODO: If columns are stored as column id and activeColumn is a field, active index could not be found
|
98
99
|
if(!activeColumn || children.indexOf(activeColumn) < 0) {
|
99
100
|
stackOpt.activeColumn = stackOpt.spreading ? children[children.length - 1] : children[0];
|
100
101
|
return true;
|
@@ -547,6 +548,34 @@ ColumnStackPlugin.prototype._getSelectedColumns = function() {
|
|
547
548
|
var csp = this._getPlugin("ColumnSelectionPlugin");
|
548
549
|
return (csp && csp.isEnabled()) ? csp.getSelectedColumns() : [];
|
549
550
|
};
|
551
|
+
/** Hide the specified column to prevent it from flashing when it is added as a member of the stack
|
552
|
+
* @private
|
553
|
+
* @param {Object} stack
|
554
|
+
* @param {(number|Array.<number>)=} colRefs
|
555
|
+
* @param {number=} activeRef
|
556
|
+
*/
|
557
|
+
ColumnStackPlugin.prototype._hideStackedColumns = function(stack, colRefs, activeRef) {
|
558
|
+
if(stack.spreading && !stack.collapsed) {
|
559
|
+
return; // In spreading mode, columns in an expanded stack don't need to be hiden
|
560
|
+
}
|
561
|
+
// WARNING: activeIndex may not be valid
|
562
|
+
var activeIndex = (typeof activeRef === "number") ? activeRef : this.getColumnIndex(stack.activeColumn);
|
563
|
+
var colIndices = null;
|
564
|
+
if(typeof colRefs === "number") {
|
565
|
+
colIndices = [colRefs];
|
566
|
+
} else if(colIndices == null) {
|
567
|
+
colIndices = this.getColumnIndices(stack.children);
|
568
|
+
} else {
|
569
|
+
colIndices = colRefs;
|
570
|
+
}
|
571
|
+
var validCount = colIndices.length;
|
572
|
+
for(var i = 0; i < validCount; ++i) {
|
573
|
+
var colIndex = colIndices[i];
|
574
|
+
if(colIndex !== activeIndex) {
|
575
|
+
this._setColumnVisibility(colIndex, false); // Hide a column
|
576
|
+
}
|
577
|
+
}
|
578
|
+
};
|
550
579
|
/** @private
|
551
580
|
* @param {number} colIndex
|
552
581
|
* @param {boolean} shown
|
@@ -1009,20 +1038,28 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
|
|
1009
1038
|
return false;
|
1010
1039
|
}
|
1011
1040
|
|
1041
|
+
// TODO: If columns are stored as column id and activeColumn is a field, active index could not be found
|
1012
1042
|
stack.children = children;
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
if(colIndex !== activeIndex) {
|
1021
|
-
this._setColumnVisibility(colIndex, false); // Hide a column
|
1043
|
+
var activeIndex = -1;
|
1044
|
+
if(activeColumn && typeof activeColumn === "string") {
|
1045
|
+
activeIndex = this.getColumnIndex(activeColumn);
|
1046
|
+
if(children.indexOf(activeColumn) < 0) { // children and activeColumn may have different type
|
1047
|
+
var field = this._getField(activeIndex);
|
1048
|
+
if(field === activeColumn) {
|
1049
|
+
stack.activeColumn = activeColumn = this.getColumnId(activeIndex);
|
1022
1050
|
}
|
1023
1051
|
}
|
1052
|
+
} else if(typeof activeColumn === "number"){
|
1053
|
+
activeIndex = activeColumn;
|
1024
1054
|
}
|
1025
1055
|
|
1056
|
+
if(_resolveActiveColumn(stack)) {
|
1057
|
+
activeColumn = stack.activeColumn;
|
1058
|
+
activeIndex = this.getColumnIndex(activeColumn);
|
1059
|
+
}
|
1060
|
+
|
1061
|
+
this._hideStackedColumns(stack, colIndices, activeIndex);
|
1062
|
+
|
1026
1063
|
// Make sure that all columns stay packed together
|
1027
1064
|
this.reorderColumns(colIndices, colIndices[0]);
|
1028
1065
|
|
@@ -1376,11 +1413,14 @@ ColumnStackPlugin.prototype._onBeforeBatchOperation = function (e) {
|
|
1376
1413
|
ColumnStackPlugin.prototype._onAfterBatchOperation = function (e) {
|
1377
1414
|
if(e.batchType === "reset") {
|
1378
1415
|
this._inResetting = false;
|
1379
|
-
// TODO:
|
1416
|
+
// TODO: Revalidate members in stacks
|
1417
|
+
// TODO: Reposition members and stacks
|
1380
1418
|
var groups = this._groupDefs.getGroups();
|
1381
1419
|
var groupCount = groups.length;
|
1382
1420
|
for(var i = 0; i < groupCount; ++i) {
|
1383
|
-
|
1421
|
+
var group = groups[i];
|
1422
|
+
this._updateActiveColumn(group);
|
1423
|
+
this._hideStackedColumns(group);
|
1384
1424
|
}
|
1385
1425
|
} else if(e.batchType === "move") {
|
1386
1426
|
this._inReordering = false;
|
@@ -1410,13 +1450,7 @@ ColumnStackPlugin.prototype._isWithinStack = function (colIndex) {
|
|
1410
1450
|
ColumnStackPlugin.prototype._addRefToStack = function (stackOption, colIndex) {
|
1411
1451
|
var colId = this._toIdOrField(colIndex);
|
1412
1452
|
|
1413
|
-
|
1414
|
-
if(!stackOption.spreading || !stackOption.collapsed) {
|
1415
|
-
var activeIndex = this.getColumnIndex(stackOption.activeColumn);
|
1416
|
-
if(colIndex >= 0 && colIndex !== activeIndex) {
|
1417
|
-
this._setColumnVisibility(colIndex, false); // Hide a column
|
1418
|
-
}
|
1419
|
-
}
|
1453
|
+
this._hideStackedColumns(stackOption, colIndex);
|
1420
1454
|
|
1421
1455
|
// Find a position to be placed in the stack
|
1422
1456
|
var rightColRef = this._toIdOrField(colIndex + 1);
|
@@ -1631,14 +1665,7 @@ ColumnStackPlugin.prototype.addColumnToStack = function(colRef, stackId) {
|
|
1631
1665
|
return;
|
1632
1666
|
}
|
1633
1667
|
|
1634
|
-
|
1635
|
-
if(!stack.spreading || !stack.collapsed) {
|
1636
|
-
var activeIndex = this.getColumnIndex(stack.activeColumn);
|
1637
|
-
var colIndex = this.getColumnIndex(colId);
|
1638
|
-
if(colIndex >= 0 && colIndex !== activeIndex) {
|
1639
|
-
this._setColumnVisibility(colIndex, false); // Hide a column
|
1640
|
-
}
|
1641
|
-
}
|
1668
|
+
this._hideStackedColumns(stack, this.getColumnIndex(colId));
|
1642
1669
|
|
1643
1670
|
// apply stacking
|
1644
1671
|
this._groupDefs.addGroupChild(stackId, colId);
|
@@ -556,6 +556,13 @@ MockSubscriptions.prototype._generateQuoteData = function(sub, fields) {
|
|
556
556
|
values[field] = data.value;
|
557
557
|
values[formattedField] = data.formattedValue;
|
558
558
|
}
|
559
|
+
|
560
|
+
// The delay symbol for X_RIC_NAME will depend on the INDICATOR field.
|
561
|
+
if(values["X_RIC_NAME"] != null && values["INDICATOR"] != null) {
|
562
|
+
if(values["INDICATOR"] > 0) {
|
563
|
+
values["X_RIC_NAME"] = "/" + values["X_RIC_NAME"];
|
564
|
+
}
|
565
|
+
}
|
559
566
|
return values;
|
560
567
|
};
|
561
568
|
|
@@ -3,6 +3,7 @@ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
3
3
|
import { Conflator } from "../../tr-grid-util/es6/Conflator.js";
|
4
4
|
import { Icon } from "../../tr-grid-util/es6/Icon.js";
|
5
5
|
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
6
|
+
import { GroupDefinitions } from "../../tr-grid-util/es6/GroupDefinitions.js";
|
6
7
|
import { Dom } from "../../tr-grid-util/es6/Dom.js";
|
7
8
|
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
8
9
|
import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
|
@@ -26,7 +26,11 @@ declare class LayoutGrid extends ElementWrapper {
|
|
26
26
|
|
27
27
|
public setCellBounds(colIndex: number, rowIndex: number, width: number, height: number): void;
|
28
28
|
|
29
|
+
public updateColumnSeparators(): void;
|
30
|
+
|
29
31
|
}
|
30
32
|
|
33
|
+
declare function rgtPx(): void;
|
34
|
+
|
31
35
|
export default LayoutGrid;
|
32
36
|
export { LayoutGrid };
|
@@ -37,7 +37,7 @@ declare class RowDefinition {
|
|
37
37
|
|
38
38
|
public initialize(rowOptions?: RowDefinition.Options|null): void;
|
39
39
|
|
40
|
-
public setContent(userInput: string, permId?: string|null): boolean;
|
40
|
+
public setContent(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null): boolean;
|
41
41
|
|
42
42
|
public getRowId(): string;
|
43
43
|
|
@@ -143,7 +143,7 @@ declare const ROW_DEF: string;
|
|
143
143
|
|
144
144
|
declare const ROW_TYPES: RowDefinition.RowTypes;
|
145
145
|
|
146
|
-
declare function rowData(userInput: string, permId?: string|null): boolean;
|
146
|
+
declare function rowData(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null): boolean;
|
147
147
|
|
148
148
|
export {RowDefinition, ROW_DEF, ROW_TYPES};
|
149
149
|
export default RowDefinition;
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.104",
|
3
3
|
"@grid/column-dragging": "1.0.13",
|
4
4
|
"@grid/row-segmenting": "1.0.23",
|
5
5
|
"@grid/statistics-row": "1.0.14",
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"tr-grid-column-grouping": "1.0.47",
|
13
13
|
"tr-grid-column-resizing": "1.0.28",
|
14
14
|
"tr-grid-column-selection": "1.0.28",
|
15
|
-
"tr-grid-column-stack": "1.0.
|
15
|
+
"tr-grid-column-stack": "1.0.59",
|
16
16
|
"tr-grid-conditional-coloring": "1.0.61",
|
17
17
|
"tr-grid-content-wrap": "1.0.20",
|
18
18
|
"tr-grid-contextmenu": "1.0.38",
|
package/package.json
CHANGED