@refinitiv-ui/efx-grid 6.0.86 → 6.0.88
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-dragging/es6/ColumnDragging.js +55 -0
- package/lib/column-format-dialog/lib/column-format-dialog.js +5 -8
- package/lib/column-format-dialog/lib/preview-table.d.ts +1 -1
- package/lib/column-format-dialog/lib/preview-table.js +15 -15
- package/lib/column-selection-dialog/themes/base.less +0 -1
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/core/dist/core.js +8 -2
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.js +1 -1
- package/lib/core/es6/grid/Core.d.ts +2 -0
- package/lib/core/es6/grid/Core.js +7 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +789 -712
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +70 -70
- package/lib/rt-grid/es6/DataConnector.js +26 -26
- package/lib/rt-grid/es6/FieldDefinition.js +27 -27
- package/lib/rt-grid/es6/Grid.js +385 -376
- package/lib/rt-grid/es6/PredefinedFormula.js +1 -1
- package/lib/rt-grid/es6/ReferenceCounter.js +15 -15
- package/lib/rt-grid/es6/RowDefSorter.js +26 -26
- package/lib/rt-grid/es6/RowDefinition.d.ts +5 -2
- package/lib/rt-grid/es6/RowDefinition.js +106 -77
- package/lib/rt-grid/es6/SnapshotFiller.js +77 -77
- package/lib/rt-grid/es6/StyleLoader.js +1 -1
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +18 -18
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +4 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +4 -1
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +31 -19
- package/lib/tr-grid-util/es6/DragUI.js +2 -1
- package/lib/types/es6/Checkbox.d.ts +2 -0
- package/lib/types/es6/Core/grid/Core.d.ts +2 -0
- package/lib/types/es6/PercentBar.d.ts +18 -18
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +5 -2
- package/lib/types/es6/RowFiltering.d.ts +2 -0
- package/lib/versions.json +7 -7
- package/package.json +1 -1
@@ -16,6 +16,7 @@ import { DataTable } from "../../core/es6/data/DataTable.js";
|
|
16
16
|
* @property {(string|null)=} label=null
|
17
17
|
* @property {boolean=} hidden=true When this row is hidden
|
18
18
|
* @property {boolean=} realTime=true Realtime row, able to request for JET/RTK
|
19
|
+
* @property {Object=} info=null For storing any additional information to the row
|
19
20
|
*/
|
20
21
|
|
21
22
|
/** @typedef {Object} RowDefinition~RowTypes
|
@@ -31,13 +32,13 @@ import { DataTable } from "../../core/es6/data/DataTable.js";
|
|
31
32
|
* @public
|
32
33
|
* @const
|
33
34
|
*/
|
34
|
-
|
35
|
+
const ROW_DEF = "ROW_DEF";
|
35
36
|
|
36
37
|
/** @type {!RowDefinition~RowTypes}
|
37
38
|
* @public
|
38
39
|
* @const
|
39
40
|
*/
|
40
|
-
|
41
|
+
const ROW_TYPES = {
|
41
42
|
CONTENT: "CONTENT",
|
42
43
|
CHAIN: "CHAIN",
|
43
44
|
CONSTITUENT: "CONSTITUENT",
|
@@ -49,7 +50,7 @@ var ROW_TYPES = {
|
|
49
50
|
/** @constructor
|
50
51
|
* @param {RowDefinition~Options=} rowOptions
|
51
52
|
*/
|
52
|
-
|
53
|
+
let RowDefinition = function(rowOptions) {
|
53
54
|
this._changes = {};
|
54
55
|
if(rowOptions && rowOptions["segmentId"]) { // This row will be classification header row
|
55
56
|
this._dataId = this._rowId = rowOptions["segmentId"];
|
@@ -116,7 +117,7 @@ RowDefinition.prototype._dataId = ""; // Data id can be different from rowId for
|
|
116
117
|
* @private
|
117
118
|
*/
|
118
119
|
RowDefinition.prototype._dc = null;
|
119
|
-
/** @type {
|
120
|
+
/** @type {DataView}
|
120
121
|
* @private
|
121
122
|
*/
|
122
123
|
RowDefinition.prototype._view = null;
|
@@ -172,6 +173,11 @@ RowDefinition.prototype._depthLevel = 0;
|
|
172
173
|
* @private
|
173
174
|
*/
|
174
175
|
RowDefinition.prototype._userModel = null;
|
176
|
+
/** @type {Object}
|
177
|
+
* @private
|
178
|
+
*/
|
179
|
+
RowDefinition.prototype._info = null;
|
180
|
+
|
175
181
|
//#endregion Private Members
|
176
182
|
|
177
183
|
/** @public
|
@@ -191,7 +197,7 @@ RowDefinition.prototype.dispose = function() {
|
|
191
197
|
this._depthLevel = 0;
|
192
198
|
this.unsubscribeForUpdates();
|
193
199
|
if(this._dc) {
|
194
|
-
|
200
|
+
let rowData = this.getRowData();
|
195
201
|
if(rowData) {
|
196
202
|
rowData[ROW_DEF] = null;
|
197
203
|
}
|
@@ -217,9 +223,9 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
217
223
|
return;
|
218
224
|
}
|
219
225
|
|
220
|
-
|
226
|
+
let extractedOptions = RowDefinition.extractRowOptions(rowOptions);
|
221
227
|
|
222
|
-
|
228
|
+
let val = rowOptions["permId"];
|
223
229
|
if(val != null) {
|
224
230
|
this._permId = val;
|
225
231
|
}
|
@@ -248,7 +254,7 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
248
254
|
}
|
249
255
|
|
250
256
|
val = rowOptions["collapsed"];
|
251
|
-
|
257
|
+
let collapsed = extractedOptions["collapsed"];
|
252
258
|
if(val != null || !collapsed){
|
253
259
|
this._expanded = !collapsed;
|
254
260
|
}
|
@@ -256,8 +262,12 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
256
262
|
if(val) {
|
257
263
|
this._userModel = rowOptions;
|
258
264
|
}
|
265
|
+
val = rowOptions["info"];
|
266
|
+
if(val) {
|
267
|
+
this._info = val;
|
268
|
+
}
|
259
269
|
|
260
|
-
|
270
|
+
let symbol = this._ric || this._chainRic;
|
261
271
|
if(symbol || this._permId){
|
262
272
|
this.setContent(symbol, extractedOptions); // this._dataId is modified
|
263
273
|
}
|
@@ -273,19 +283,19 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
273
283
|
*/
|
274
284
|
RowDefinition.prototype._initializeAsConstituent = function(rowOptions) {
|
275
285
|
this._autoGenerated = true;
|
276
|
-
|
286
|
+
let parentDef = /** @type{RowDefinition} */(rowOptions["parent"]);
|
277
287
|
if(this.setParent(parentDef)) {
|
278
288
|
this._dataId = /** @type{string} */(rowOptions["dataId"]); // Constituent will have the same subId as its parent but with different ric
|
279
289
|
this._ric = /** @type{string} */(rowOptions["ric"]);
|
280
290
|
this._dc = parentDef._dc; // Parent chain must have data cache
|
281
291
|
if(this._dc) {
|
282
|
-
|
292
|
+
let rowData = this.getRowData(); // Do not trigger any data update
|
283
293
|
if(rowData) { // Row data from data cache must exist beforehand
|
284
294
|
rowData[ROW_DEF] = this; // This is for easy referencing from data streaming, also for preventing duplication
|
285
295
|
}
|
286
296
|
}
|
287
297
|
}
|
288
|
-
|
298
|
+
let val = rowOptions["values"];
|
289
299
|
// eslint-disable-next-line no-undefined
|
290
300
|
if(val !== undefined) {
|
291
301
|
this.setStaticRowData(val, rowOptions["fields"]);
|
@@ -308,8 +318,8 @@ RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
|
308
318
|
userInput += "";
|
309
319
|
}
|
310
320
|
|
311
|
-
|
312
|
-
|
321
|
+
let dirty = (this._userInput !== userInput);
|
322
|
+
let permId = extractedOptions["permId"];
|
313
323
|
if(this._permId !== permId){
|
314
324
|
this._permId = permId || "";
|
315
325
|
dirty = true;
|
@@ -327,9 +337,9 @@ RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
|
327
337
|
if(this._userInput.charAt(0) === "'") { // This is a row header
|
328
338
|
this._ric = this._chainRic = ""; // No ric for realtime request
|
329
339
|
} else {
|
330
|
-
|
331
|
-
|
332
|
-
|
340
|
+
let asChain = extractedOptions["asChain"];
|
341
|
+
let expanded = !extractedOptions["collapsed"];
|
342
|
+
let chainRic = extractedOptions["chainRic"];
|
333
343
|
if(asChain === true){
|
334
344
|
this._ric = expanded === false ? this._userInput : this._userInput.replace("0#", "");
|
335
345
|
this._expanded = expanded; // Only chain can be expanded by 0#
|
@@ -342,8 +352,8 @@ RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
|
342
352
|
|
343
353
|
if(this._view) {
|
344
354
|
if(this._isChain){
|
345
|
-
|
346
|
-
|
355
|
+
let rid = this.getRowId();
|
356
|
+
let segmentId = this._view.getSegmentParentRowId(rid);
|
347
357
|
if(segmentId){
|
348
358
|
this._view.removeSegmentChild(segmentId, rid);
|
349
359
|
}
|
@@ -363,7 +373,7 @@ RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
|
363
373
|
if(this._dc) {
|
364
374
|
// This will work for runtime ric modification, but not for first initilization.
|
365
375
|
// Avoid losing the ROW_DEF pointer.
|
366
|
-
|
376
|
+
let rowData = {};
|
367
377
|
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
368
378
|
rowData["X_RIC_NAME"] = this.getDisplayText();
|
369
379
|
this.setRowData(rowData);
|
@@ -382,8 +392,8 @@ RowDefinition.prototype.getRowId = function() {
|
|
382
392
|
* @return {RowDefinition~Options}
|
383
393
|
*/
|
384
394
|
RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
385
|
-
|
386
|
-
|
395
|
+
let obj = rowOptions || {};
|
396
|
+
let val = this._ric;
|
387
397
|
if(val) {
|
388
398
|
obj["ric"] = val;
|
389
399
|
}
|
@@ -394,8 +404,8 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
394
404
|
}
|
395
405
|
|
396
406
|
val = this._realTime;
|
397
|
-
if(val
|
398
|
-
obj["realTime"] =
|
407
|
+
if(!val) {
|
408
|
+
obj["realTime"] = false;
|
399
409
|
}
|
400
410
|
|
401
411
|
val = this._permId;
|
@@ -415,7 +425,7 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
415
425
|
|
416
426
|
val = this._userModel;
|
417
427
|
if(val) {
|
418
|
-
obj["keepModel"] = obj;
|
428
|
+
obj["keepModel"] = obj; // This is bad
|
419
429
|
}
|
420
430
|
|
421
431
|
val = this._isChain;
|
@@ -434,6 +444,11 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
434
444
|
obj["hidden"] = val;
|
435
445
|
}
|
436
446
|
|
447
|
+
val = this._info;
|
448
|
+
if(val) {
|
449
|
+
obj["info"] = this._info;
|
450
|
+
}
|
451
|
+
|
437
452
|
val = this._getStaticRowData();
|
438
453
|
if(val) {
|
439
454
|
obj["values"] = val;
|
@@ -441,15 +456,15 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
441
456
|
|
442
457
|
// obtain the static values of constituent rows
|
443
458
|
if(this.isChain()) {
|
444
|
-
|
459
|
+
let children = this.getChildren();
|
445
460
|
if(children) {
|
446
|
-
|
461
|
+
let childValues = val ? val[RowDefinition._childDataField] : {};
|
447
462
|
if(!childValues) {
|
448
463
|
childValues = {};
|
449
464
|
}
|
450
|
-
|
451
|
-
|
452
|
-
|
465
|
+
let dirty = false;
|
466
|
+
let len = children.length;
|
467
|
+
let i, rowDef, staticValues;
|
453
468
|
for(i = 0; i < len; i++) {
|
454
469
|
rowDef = children[i];
|
455
470
|
staticValues = rowDef._getStaticRowData();
|
@@ -486,11 +501,11 @@ RowDefinition.prototype.getType = function() {
|
|
486
501
|
} else if(this._parent) {
|
487
502
|
return ROW_TYPES.CONSTITUENT;
|
488
503
|
} else {
|
489
|
-
|
504
|
+
let dv = this._view;
|
490
505
|
if(dv) {
|
491
|
-
|
492
|
-
|
493
|
-
|
506
|
+
let rid = this.getRowId();
|
507
|
+
let separator = dv.isSegmentSeparator(rid);
|
508
|
+
let level = dv.getSegmentLevel(rid);
|
494
509
|
if(separator) {
|
495
510
|
if(level === 1) {
|
496
511
|
return ROW_TYPES.GROUP_HEADER;
|
@@ -518,7 +533,7 @@ RowDefinition.prototype.setDataSource = function(dataSource) {
|
|
518
533
|
return;
|
519
534
|
}
|
520
535
|
|
521
|
-
|
536
|
+
let rowData = this.getRowData();
|
522
537
|
if(!rowData) {
|
523
538
|
rowData = {};
|
524
539
|
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
@@ -624,7 +639,7 @@ RowDefinition.prototype.setData = function(field, value) {
|
|
624
639
|
*/
|
625
640
|
RowDefinition.prototype._clearStaticData = function() {
|
626
641
|
if(this._staticValues) {
|
627
|
-
for(
|
642
|
+
for(let key in this._staticValues) {
|
628
643
|
this._staticValues[key] = null;
|
629
644
|
}
|
630
645
|
if(this._dc) {
|
@@ -761,19 +776,19 @@ RowDefinition.prototype.subscribeForUpdates = function() {
|
|
761
776
|
return false;
|
762
777
|
}
|
763
778
|
|
764
|
-
|
779
|
+
let subs = this._dc ? this._dc.getSubscriptions() : null;
|
765
780
|
if(!subs) {
|
766
781
|
return false;
|
767
782
|
}
|
768
783
|
// TODO: Check if the same subscription is being made.
|
769
|
-
|
784
|
+
let prevRowData = this.unsubscribeForUpdates();
|
770
785
|
|
771
786
|
if(this.isChain()) {
|
772
|
-
|
787
|
+
let symbol = this._chainRic;
|
773
788
|
if(!symbol){
|
774
789
|
symbol = this._ric;
|
775
790
|
if(symbol.indexOf("0#") < 0){
|
776
|
-
|
791
|
+
let count = (symbol.match(/\./g) || []).length;
|
777
792
|
if(count < 2){
|
778
793
|
symbol = "0#" + symbol;
|
779
794
|
}
|
@@ -799,8 +814,8 @@ RowDefinition.prototype.unsubscribeForUpdates = function() {
|
|
799
814
|
return;
|
800
815
|
}
|
801
816
|
|
802
|
-
|
803
|
-
|
817
|
+
let subs = this._dc.getSubscriptions();
|
818
|
+
let prevRowData = this.getRowData();
|
804
819
|
|
805
820
|
subs["removeSubscription"](this._subId);
|
806
821
|
this._subId = "";
|
@@ -825,10 +840,10 @@ RowDefinition.prototype.isSubscribing = function() {
|
|
825
840
|
*/
|
826
841
|
RowDefinition.prototype.addUpdate = function(e) {
|
827
842
|
if(e) {
|
828
|
-
|
843
|
+
let changes = e["changes"];
|
829
844
|
if(changes) {
|
830
|
-
|
831
|
-
for(
|
845
|
+
let dirty = 0;
|
846
|
+
for(let field in changes) {
|
832
847
|
this._changes[field] = dirty = 1;
|
833
848
|
}
|
834
849
|
if(dirty) {
|
@@ -865,7 +880,7 @@ RowDefinition.prototype.registerToView = function(view, rowId) {
|
|
865
880
|
}
|
866
881
|
this._view = view;
|
867
882
|
|
868
|
-
|
883
|
+
let rowData = null;
|
869
884
|
if(this._subSegment) {
|
870
885
|
rowData = this._view.getRowData(this.getRowId());
|
871
886
|
if(rowData) {
|
@@ -877,7 +892,7 @@ RowDefinition.prototype.registerToView = function(view, rowId) {
|
|
877
892
|
rowData = {};
|
878
893
|
rowData[ROW_DEF] = this;
|
879
894
|
|
880
|
-
|
895
|
+
let newRowId = this._view.insertRow(rowId, rowData, this.getRowId());
|
881
896
|
this._rowId = newRowId; // In case there is some duplicate row id.
|
882
897
|
|
883
898
|
if(this._isChain) {
|
@@ -908,7 +923,7 @@ RowDefinition.prototype._deregisterFromView = function(rowIds) {
|
|
908
923
|
* @param {RowDefinition} rowDef
|
909
924
|
* @return {Array.<string>}
|
910
925
|
* @example
|
911
|
-
*
|
926
|
+
* let rowIds = descendants.reduce(RowDefinition.deregisterFromView, []);
|
912
927
|
*/
|
913
928
|
RowDefinition.deregisterFromView = function(rowIds, rowDef) {
|
914
929
|
rowDef._deregisterFromView(rowIds);
|
@@ -923,7 +938,7 @@ RowDefinition.prototype._getChildStaticRowData = function(ric) {
|
|
923
938
|
return null;
|
924
939
|
}
|
925
940
|
|
926
|
-
|
941
|
+
let childValues = this._staticValues[RowDefinition._childDataField];
|
927
942
|
if(!childValues) {
|
928
943
|
return null;
|
929
944
|
}
|
@@ -943,9 +958,9 @@ RowDefinition.prototype.addConstituent = function(ric) {
|
|
943
958
|
return null;
|
944
959
|
}
|
945
960
|
|
946
|
-
|
961
|
+
let childDef = null;
|
947
962
|
if(this._children) {
|
948
|
-
for(
|
963
|
+
for(let i = this._children.length; --i >= 0;) {
|
949
964
|
if(this._children[i]._ric === ric) {
|
950
965
|
childDef = this._children[i]; // Constituent has already been added
|
951
966
|
break;
|
@@ -955,16 +970,16 @@ RowDefinition.prototype.addConstituent = function(ric) {
|
|
955
970
|
this._children = [];
|
956
971
|
}
|
957
972
|
|
958
|
-
|
973
|
+
let newChild = !childDef;
|
959
974
|
if(newChild) {
|
960
|
-
|
975
|
+
let rowOptions = {
|
961
976
|
"asConstituent": true,
|
962
977
|
"dataId": this._subId + ric,
|
963
978
|
"ric": ric,
|
964
979
|
"parent": this
|
965
980
|
};
|
966
981
|
|
967
|
-
|
982
|
+
let staticData = this._getChildStaticRowData(ric);
|
968
983
|
if(staticData) {
|
969
984
|
rowOptions["values"] = staticData;
|
970
985
|
}
|
@@ -973,11 +988,11 @@ RowDefinition.prototype.addConstituent = function(ric) {
|
|
973
988
|
}
|
974
989
|
|
975
990
|
if(this._view) {
|
976
|
-
|
991
|
+
let rowId = this.getRowId();
|
977
992
|
// WARNING: insert position, we prioritize using CHILD_ORDER (From server) in dc first. If it does not exist, the last row of the segment will be pushed
|
978
|
-
|
979
|
-
|
980
|
-
|
993
|
+
let childOrder = childDef.getData("CHILD_ORDER");
|
994
|
+
let parentIndex = this._view.getRowIndex(rowId);
|
995
|
+
let position = parentIndex + this.getChildCount(); // push the last position
|
981
996
|
if(childOrder != null) {
|
982
997
|
// Warning: We need to carry a value of 1 because the CHILD_ORDER starts with 0, and it will be added to the parentIndex. In case the parent rowIndex is not included.
|
983
998
|
position = parentIndex + childOrder + 1; // insert between segment
|
@@ -1019,19 +1034,19 @@ RowDefinition.prototype.unlinkChain = function() {
|
|
1019
1034
|
}
|
1020
1035
|
|
1021
1036
|
if(this.isChainExpanded()) {
|
1022
|
-
|
1023
|
-
|
1024
|
-
for(
|
1037
|
+
let rowDefs = this.getDescendants();
|
1038
|
+
let len = rowDefs.length;
|
1039
|
+
for(let i = 0; i < len; i++) {
|
1025
1040
|
rowDefs[i]._toRealTimeRow();
|
1026
1041
|
}
|
1027
1042
|
}
|
1028
1043
|
|
1029
1044
|
this.unsubscribeForUpdates();
|
1030
1045
|
|
1031
|
-
|
1046
|
+
let view = this._view;
|
1032
1047
|
if(view) {
|
1033
|
-
|
1034
|
-
|
1048
|
+
let rid = this.getRowId();
|
1049
|
+
let segment = view.getSegment(rid);
|
1035
1050
|
if(segment) {
|
1036
1051
|
segment.setClassification(null);
|
1037
1052
|
}
|
@@ -1114,10 +1129,10 @@ RowDefinition.prototype.getDescendants = function(ary) {
|
|
1114
1129
|
ary = [];
|
1115
1130
|
}
|
1116
1131
|
if(this._children) {
|
1117
|
-
|
1118
|
-
|
1119
|
-
for(
|
1120
|
-
|
1132
|
+
let chdr = this._children;
|
1133
|
+
let len = chdr.length;
|
1134
|
+
for(let i = 0; i < len; ++i) {
|
1135
|
+
let ch = chdr[i];
|
1121
1136
|
ary.push(ch);
|
1122
1137
|
ch.getDescendants(ary);
|
1123
1138
|
}
|
@@ -1129,7 +1144,7 @@ RowDefinition.prototype.getDescendants = function(ary) {
|
|
1129
1144
|
* @return {Array.<string>} Null if there is no row Id
|
1130
1145
|
*/
|
1131
1146
|
RowDefinition.prototype.getAllDescendantIds = function() {
|
1132
|
-
|
1147
|
+
let descendants = this.getDescendants();
|
1133
1148
|
if(descendants.length) {
|
1134
1149
|
return descendants.map(RowDefinition.toRowId);
|
1135
1150
|
} else {
|
@@ -1158,7 +1173,7 @@ RowDefinition.prototype.setParent = function(parentDef) {
|
|
1158
1173
|
return false;
|
1159
1174
|
}
|
1160
1175
|
if(this._parent) { // Release from previous parent
|
1161
|
-
|
1176
|
+
let at = this._parent._children.lastIndexOf(this);
|
1162
1177
|
if(at >= 0) {
|
1163
1178
|
this._parent._children.splice(at, 1);
|
1164
1179
|
}
|
@@ -1210,12 +1225,26 @@ RowDefinition.prototype.setGroupOrder = function(num) {
|
|
1210
1225
|
};
|
1211
1226
|
|
1212
1227
|
/** @public
|
1228
|
+
* @ignore
|
1213
1229
|
* @return {Object}
|
1214
1230
|
*/
|
1215
1231
|
RowDefinition.prototype.getUserModel = function() {
|
1216
1232
|
return this._userModel;
|
1217
1233
|
};
|
1218
1234
|
|
1235
|
+
/** @public
|
1236
|
+
* @param {Object} obj
|
1237
|
+
*/
|
1238
|
+
RowDefinition.prototype.setRowInfo = function(obj) {
|
1239
|
+
this._info = obj;
|
1240
|
+
};
|
1241
|
+
/** @public
|
1242
|
+
* @return {Object}
|
1243
|
+
*/
|
1244
|
+
RowDefinition.prototype.getRowInfo = function() {
|
1245
|
+
return this._info;
|
1246
|
+
};
|
1247
|
+
|
1219
1248
|
/** For mapping row Id by Array.map()
|
1220
1249
|
* @public
|
1221
1250
|
* @function
|
@@ -1233,15 +1262,15 @@ RowDefinition.toRowId = function(rowDef) {
|
|
1233
1262
|
* @return {RowDefinition~Options}
|
1234
1263
|
*/
|
1235
1264
|
RowDefinition.extractRowOptions = function(rowOptions) {
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1265
|
+
let ric = rowOptions["ric"];
|
1266
|
+
let permId = rowOptions["permId"];
|
1267
|
+
let chainRic = rowOptions["chainRic"];
|
1268
|
+
let collapsed = rowOptions["collapsed"];
|
1269
|
+
let asChain = rowOptions["asChain"];
|
1241
1270
|
if(asChain == null && chainRic){
|
1242
1271
|
asChain = true;
|
1243
1272
|
}
|
1244
|
-
|
1273
|
+
let expanded = null;
|
1245
1274
|
if(ric && ric.indexOf("0#") >= 0){
|
1246
1275
|
if(asChain == null){
|
1247
1276
|
asChain = true;
|
@@ -1249,7 +1278,7 @@ RowDefinition.extractRowOptions = function(rowOptions) {
|
|
1249
1278
|
expanded = true;
|
1250
1279
|
}
|
1251
1280
|
|
1252
|
-
|
1281
|
+
let extractedOptions = {};
|
1253
1282
|
if(collapsed == null) {
|
1254
1283
|
extractedOptions["collapsed"] = !expanded;
|
1255
1284
|
} else {
|