@refinitiv-ui/efx-grid 6.0.36 → 6.0.38
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +51 -4
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.d.ts +2 -0
- package/lib/core/es6/grid/Core.js +51 -4
- 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 +375 -131
- 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/Grid.d.ts +1 -1
- package/lib/rt-grid/es6/Grid.js +63 -29
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -2
- package/lib/rt-grid/es6/RowDefinition.js +103 -53
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +180 -421
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +159 -31
- 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/Core.d.ts +2 -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 +3 -3
- 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,
|
@@ -266,7 +266,7 @@ declare class Grid extends EventDispatcher {
|
|
266
266
|
|
267
267
|
public freezeColumn(colIndex?: number|null, pinnedRightColumns?: number|null): void;
|
268
268
|
|
269
|
-
public pinColumn(colRef: Grid.ColumnReference|(Grid.ColumnReference)[]|null): boolean;
|
269
|
+
public pinColumn(colRef: Grid.ColumnReference|(Grid.ColumnReference)[]|null, side?: string|null): boolean;
|
270
270
|
|
271
271
|
public unpinColumn(colRef: Grid.ColumnReference|(Grid.ColumnReference)[]|null, dest?: Grid.ColumnReference|null): boolean;
|
272
272
|
|
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -3101,50 +3101,72 @@ Grid.prototype.freezeColumn = function(colIndex, pinnedRightColumns) {
|
|
3101
3101
|
}
|
3102
3102
|
this._grid.freezeColumn(colIndex, pinnedRightColumns);
|
3103
3103
|
};
|
3104
|
+
|
3104
3105
|
/** Pin column to the left side by moving the specified column to the rightmost of the frozen columns. <br>
|
3105
3106
|
* The method will do nothing if the specified column is already pinned to the left side
|
3106
3107
|
* @public
|
3107
3108
|
* @param {Grid~ColumnReference|Array.<Grid~ColumnReference>} colRef
|
3109
|
+
* @param {string=} side Available values are: left|right. If no value is supplied, the column will be pinned to the left.
|
3108
3110
|
* @return {boolean}
|
3109
3111
|
*/
|
3110
|
-
Grid.prototype.pinColumn = function(colRef) {
|
3112
|
+
Grid.prototype.pinColumn = function(colRef, side) {
|
3111
3113
|
if(Array.isArray(colRef)) {
|
3112
3114
|
var ary = colRef;
|
3113
3115
|
var len = ary.length;
|
3114
3116
|
|
3115
3117
|
var dirty = 0;
|
3116
3118
|
for(var i = 0; i < len; ++i) {
|
3117
|
-
dirty |= this._pinColumn(ary[i]);
|
3119
|
+
dirty |= this._pinColumn(ary[i], side);
|
3118
3120
|
}
|
3119
3121
|
return dirty ? true : false;
|
3120
3122
|
}
|
3121
|
-
return this._pinColumn(colRef);
|
3123
|
+
return this._pinColumn(colRef, side);
|
3122
3124
|
};
|
3123
3125
|
/** @private
|
3124
3126
|
* @param {Grid~ColumnReference} colRef
|
3127
|
+
* @param {string=} side Available values are: left|right. If no value is supplied, the column will be pinned to the left.
|
3125
3128
|
* @return {boolean}
|
3126
3129
|
*/
|
3127
|
-
Grid.prototype._pinColumn = function(colRef) {
|
3130
|
+
Grid.prototype._pinColumn = function(colRef, side) {
|
3128
3131
|
var colIndex = this.getColumnIndex(colRef);
|
3129
|
-
|
3132
|
+
var colCount = this.getColumnCount();
|
3133
|
+
if(colIndex < 0 || colIndex > colCount) {
|
3130
3134
|
return false;
|
3131
3135
|
}
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
|
3136
|
+
|
3137
|
+
var leftPinnedCount = this._grid.getPinnedLeftColumnCount();
|
3138
|
+
var rightPinnedCount = this._grid.getPinnedRightColumnCount();
|
3139
|
+
var stationaryIdx = this._grid.getStationaryColumnIndex();
|
3140
|
+
|
3141
|
+
if(side && side.toLowerCase() === "right") {
|
3142
|
+
var rightPinnedIndex = this._grid.getFirstPinnedRightIndex();
|
3143
|
+
if(colIndex >= rightPinnedIndex) {
|
3144
|
+
return false; // The column is already pinned area
|
3145
|
+
}
|
3146
|
+
|
3147
|
+
if(stationaryIdx >= 0 && colIndex <= stationaryIdx) {
|
3148
|
+
return false;
|
3149
|
+
}
|
3150
|
+
|
3151
|
+
this.moveColumnById(colIndex, rightPinnedIndex);
|
3152
|
+
rightPinnedCount += 1;
|
3153
|
+
leftPinnedCount -= 1;
|
3154
|
+
} else {
|
3155
|
+
if(colIndex < leftPinnedCount) {
|
3156
|
+
return false; // The column is already pinned area
|
3157
|
+
}
|
3158
|
+
if(!leftPinnedCount) {
|
3159
|
+
if(stationaryIdx >= 0) {
|
3160
|
+
leftPinnedCount = stationaryIdx;
|
3161
|
+
if(colIndex > stationaryIdx) {
|
3162
|
+
leftPinnedCount++;
|
3163
|
+
}
|
3142
3164
|
}
|
3143
3165
|
}
|
3166
|
+
this.moveColumnById(colIndex, leftPinnedCount);
|
3144
3167
|
}
|
3145
3168
|
|
3146
|
-
this.
|
3147
|
-
this._grid.freezeColumn(pinnedCount);
|
3169
|
+
this._grid.freezeColumn(leftPinnedCount, rightPinnedCount);
|
3148
3170
|
return true;
|
3149
3171
|
};
|
3150
3172
|
/** Unpin column from the left side by moving the specified column to the end of the frozen columns. <br>
|
@@ -3177,13 +3199,16 @@ Grid.prototype._unpinColumn = function(colRef, dest) {
|
|
3177
3199
|
if(colIndex < 0) {
|
3178
3200
|
return false;
|
3179
3201
|
}
|
3180
|
-
|
3181
|
-
|
3202
|
+
|
3203
|
+
var leftPinnedCount = this._grid.getPinnedLeftColumnCount();
|
3204
|
+
var rightPinnedCount = this._grid.getPinnedRightColumnCount();
|
3205
|
+
var colCount = this.getColumnCount();
|
3206
|
+
var firstRightPinnedIndex = colCount - rightPinnedCount;
|
3207
|
+
|
3208
|
+
if(colIndex >= leftPinnedCount && colIndex < firstRightPinnedIndex) {
|
3182
3209
|
return false;
|
3183
3210
|
}
|
3184
|
-
|
3185
|
-
return false; // The column is outside of frozen area
|
3186
|
-
}
|
3211
|
+
|
3187
3212
|
var srcId = null;
|
3188
3213
|
var destId = null;
|
3189
3214
|
if(dest != null) {
|
@@ -3194,11 +3219,19 @@ Grid.prototype._unpinColumn = function(colRef, dest) {
|
|
3194
3219
|
|
3195
3220
|
var stationaryIdx = this._grid.getStationaryColumnIndex();
|
3196
3221
|
|
3197
|
-
if(colIndex
|
3198
|
-
|
3199
|
-
|
3222
|
+
if(colIndex < leftPinnedCount) {
|
3223
|
+
if(colIndex > stationaryIdx) {
|
3224
|
+
this.moveColumnById(colIndex, leftPinnedCount);
|
3225
|
+
}
|
3200
3226
|
|
3201
|
-
|
3227
|
+
this._grid.freezeColumn(leftPinnedCount - 2, rightPinnedCount); // Column index is used for freezing
|
3228
|
+
} else if(colIndex >= firstRightPinnedIndex) {
|
3229
|
+
if(colIndex > stationaryIdx) {
|
3230
|
+
this.moveColumnById(colIndex, firstRightPinnedIndex);
|
3231
|
+
}
|
3232
|
+
|
3233
|
+
this._grid.freezeColumn(leftPinnedCount - 1, rightPinnedCount - 1); // Column index is used for freezing
|
3234
|
+
}
|
3202
3235
|
|
3203
3236
|
if(colIndex > stationaryIdx) {
|
3204
3237
|
if(destId != null) {
|
@@ -3213,11 +3246,12 @@ Grid.prototype._unpinColumn = function(colRef, dest) {
|
|
3213
3246
|
* @return {boolean}
|
3214
3247
|
*/
|
3215
3248
|
Grid.prototype.unpinAllColumns = function() {
|
3216
|
-
var
|
3217
|
-
|
3249
|
+
var leftPinnedCount = this._grid.getPinnedLeftColumnCount();
|
3250
|
+
var rightPinnedCount = this._grid.getPinnedRightColumnCount();
|
3251
|
+
if(!leftPinnedCount && !rightPinnedCount) {
|
3218
3252
|
return false;
|
3219
3253
|
}
|
3220
|
-
this._grid.freezeColumn(-1); // Column index is used for freezing
|
3254
|
+
this._grid.freezeColumn(-1, 0); // Column index is used for left freezing and column count is used for right freezing
|
3221
3255
|
return true;
|
3222
3256
|
};
|
3223
3257
|
|
@@ -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
|
+
/** @type {string|null}
|
94
95
|
* @private
|
95
96
|
*/
|
96
|
-
RowDefinition.prototype.
|
97
|
-
/** @type {
|
97
|
+
RowDefinition.prototype._label = null; // Label overrides _ric and _permId
|
98
|
+
/** @type {boolean|null}
|
98
99
|
* @private
|
99
100
|
*/
|
100
|
-
RowDefinition.prototype.
|
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 = this._isChain || !!this._chainRic;
|
265
|
+
if(this._ric && this._ric.indexOf("0#") >= 0){
|
266
|
+
asChain = true;
|
267
|
+
expanded = true;
|
268
|
+
}
|
269
|
+
if(this._isChain === false){
|
270
|
+
asChain = false;
|
271
|
+
}
|
272
|
+
if(this._expanded === false){
|
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,8 +284,7 @@ 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.
|
272
|
-
|
287
|
+
this._ric = /** @type{string} */(rowOptions["ric"]);
|
273
288
|
this._dc = parentDef._dc; // Parent chain must have data cache
|
274
289
|
if(this._dc) {
|
275
290
|
var rowData = this.getRowData(); // Do not trigger any data update
|
@@ -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 === false ? this._userInput : this._userInput.replace("0#", "");
|
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
|
};
|