@refinitiv-ui/efx-grid 6.0.91 → 6.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +1 -1
  2. package/lib/column-dragging/es6/ColumnDragging.js +144 -34
  3. package/lib/core/dist/core.js +2410 -2621
  4. package/lib/core/dist/core.min.js +1 -1
  5. package/lib/core/es6/data/ColumnStats.js +14 -14
  6. package/lib/core/es6/data/DataCache.js +118 -118
  7. package/lib/core/es6/data/DataTable.d.ts +3 -1
  8. package/lib/core/es6/data/DataTable.js +208 -190
  9. package/lib/core/es6/data/DataView.d.ts +1 -1
  10. package/lib/core/es6/data/DataView.js +291 -291
  11. package/lib/core/es6/data/Segment.js +79 -79
  12. package/lib/core/es6/data/SegmentCollection.js +81 -81
  13. package/lib/core/es6/data/WrappedView.js +41 -41
  14. package/lib/core/es6/grid/Core.js +635 -635
  15. package/lib/core/es6/grid/ILayoutGrid.js +1 -1
  16. package/lib/core/es6/grid/LayoutGrid.js +183 -183
  17. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +91 -91
  18. package/lib/core/es6/grid/components/Cell.js +29 -29
  19. package/lib/core/es6/grid/components/CellFloatingPanel.js +11 -11
  20. package/lib/core/es6/grid/components/CellSpan.js +7 -7
  21. package/lib/core/es6/grid/components/CellSpans.js +36 -34
  22. package/lib/core/es6/grid/components/Column.js +40 -40
  23. package/lib/core/es6/grid/components/ElementWrapper.js +17 -17
  24. package/lib/core/es6/grid/components/HScrollbar.js +31 -31
  25. package/lib/core/es6/grid/components/Scrollbar.js +77 -77
  26. package/lib/core/es6/grid/components/StretchedCells.js +49 -49
  27. package/lib/core/es6/grid/components/VScrollbar.js +11 -11
  28. package/lib/core/es6/grid/components/VirtualItems.js +3 -3
  29. package/lib/core/es6/grid/event/EventDispatcher.js +9 -9
  30. package/lib/core/es6/grid/event/EventListeners.js +4 -4
  31. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +186 -186
  32. package/lib/core/es6/grid/util/Conflator.js +4 -4
  33. package/lib/core/es6/grid/util/Reverter.js +1 -1
  34. package/lib/core/es6/grid/util/SectionSettings.js +20 -20
  35. package/lib/core/es6/grid/util/SelectionList.js +23 -23
  36. package/lib/core/es6/grid/util/TrackLayout.js +74 -74
  37. package/lib/core/es6/grid/util/Virtualizer.js +15 -15
  38. package/lib/core/es6/grid/util/util.js +20 -20
  39. package/lib/core/es6/index.d.ts +0 -2
  40. package/lib/core/es6/index.js +0 -3
  41. package/lib/grid/index.js +1 -1
  42. package/lib/rt-grid/dist/rt-grid.js +193 -70
  43. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  44. package/lib/rt-grid/es6/Grid.js +46 -30
  45. package/lib/rt-grid/es6/RowDefinition.d.ts +2 -1
  46. package/lib/rt-grid/es6/RowDefinition.js +74 -16
  47. package/lib/tr-grid-cell-selection/es6/CellSelection.js +56 -1
  48. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -1
  49. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +29 -1
  50. package/lib/tr-grid-util/es6/CellPainter.js +94 -93
  51. package/lib/tr-grid-util/es6/Conflator.js +4 -4
  52. package/lib/tr-grid-util/es6/CoralItems.js +6 -6
  53. package/lib/tr-grid-util/es6/DateTime.js +39 -39
  54. package/lib/tr-grid-util/es6/Deferred.js +5 -5
  55. package/lib/tr-grid-util/es6/Delay.js +1 -1
  56. package/lib/tr-grid-util/es6/Dom.js +26 -26
  57. package/lib/tr-grid-util/es6/DragUI.js +17 -17
  58. package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
  59. package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
  60. package/lib/tr-grid-util/es6/ElfDate.js +4 -4
  61. package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
  62. package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
  63. package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
  64. package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
  65. package/lib/tr-grid-util/es6/Ext.js +6 -6
  66. package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
  67. package/lib/tr-grid-util/es6/FilterBuilder.js +57 -57
  68. package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
  69. package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
  70. package/lib/tr-grid-util/es6/GridPlugin.js +86 -86
  71. package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
  72. package/lib/tr-grid-util/es6/Icon.js +4 -4
  73. package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
  74. package/lib/tr-grid-util/es6/MultiTableManager.js +68 -68
  75. package/lib/tr-grid-util/es6/NumberFormatter.js +22 -22
  76. package/lib/tr-grid-util/es6/PercentBar.js +17 -17
  77. package/lib/tr-grid-util/es6/Perf.js +5 -5
  78. package/lib/tr-grid-util/es6/Popup.js +42 -42
  79. package/lib/tr-grid-util/es6/RangeBar.js +5 -5
  80. package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
  81. package/lib/tr-grid-util/es6/RowPainter.js +23 -23
  82. package/lib/tr-grid-util/es6/SubTable.js +94 -94
  83. package/lib/tr-grid-util/es6/Table.js +51 -51
  84. package/lib/tr-grid-util/es6/TextHighlighter.js +49 -49
  85. package/lib/tr-grid-util/es6/TickCodes.js +2 -2
  86. package/lib/tr-grid-util/es6/Timer.js +2 -2
  87. package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
  88. package/lib/tr-grid-util/es6/Util.js +50 -50
  89. package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
  90. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
  91. package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
  92. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
  93. package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
  94. package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
  95. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
  96. package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
  97. package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
  98. package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
  99. package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
  100. package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
  101. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
  102. package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
  103. package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
  104. package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
  105. package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
  106. package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
  107. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
  108. package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
  109. package/lib/tr-grid-util/es6/index.js +1 -1
  110. package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
  111. package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
  112. package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
  113. package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
  114. package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
  115. package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
  116. package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
  117. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
  118. package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
  119. package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
  120. package/lib/tr-grid-util/es6/jet/index.js +1 -1
  121. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
  122. package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
  123. package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
  124. package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
  125. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
  126. package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
  127. package/lib/tr-grid-util/es6/locale/translation.js +1 -1
  128. package/lib/types/es6/ColumnDragging.d.ts +1 -1
  129. package/lib/types/es6/ColumnGrouping.d.ts +3 -1
  130. package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
  131. package/lib/types/es6/Core/data/DataView.d.ts +2 -0
  132. package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
  133. package/lib/types/es6/Core/index.d.ts +0 -2
  134. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
  135. package/lib/versions.json +4 -4
  136. package/package.json +1 -1
  137. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
  138. package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
  139. package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
  140. package/lib/core/es6/grid/util/HttpRequest.js +0 -371
  141. package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
  142. package/lib/core/es6/grid/util/PercentBar.js +0 -390
  143. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
  144. package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
  145. package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
  146. package/lib/core/es6/grid/util/RangeBar.js +0 -255
  147. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
  148. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
  149. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
  150. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
  151. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
@@ -6,7 +6,7 @@ import EventDispatcher from "../../../tr-grid-util/es6/EventDispatcher.js";
6
6
  * @param {string} rid
7
7
  * @param {!Object} sharedObj
8
8
  */
9
- var Segment = function(rid, sharedObj) {
9
+ let Segment = function(rid, sharedObj) {
10
10
  this._rid = rid;
11
11
  this._children = {};
12
12
  this._shared = sharedObj;
@@ -114,11 +114,11 @@ Segment.prototype.dispose = function() {
114
114
  this._disposed = true;
115
115
 
116
116
  this.removeAllEventListeners();
117
- var segmentNames = this._subSegNames;
117
+ let segmentNames = this._subSegNames;
118
118
  if(segmentNames) {
119
- var segmentCount = segmentNames.length;
120
- var segmentMap = this._subSegMap;
121
- for(var i = 0; i < segmentCount; ++i) {
119
+ let segmentCount = segmentNames.length;
120
+ let segmentMap = this._subSegMap;
121
+ for(let i = 0; i < segmentCount; ++i) {
122
122
  segmentMap[segmentNames[i]].dispose();
123
123
  }
124
124
  this._subSegMap = this._subSegNames = null;
@@ -150,16 +150,16 @@ Segment.prototype.getParentId = function() {
150
150
  * @return {Array.<string>}
151
151
  */
152
152
  Segment.prototype.getSubSegmentIds = function(out_ary) {
153
- var segmentNames = this._subSegNames;
153
+ let segmentNames = this._subSegNames;
154
154
  if(segmentNames) {
155
155
  if(!out_ary) {
156
156
  out_ary = [];
157
157
  }
158
- var segmentCount = segmentNames.length;
159
- var segmentMap = this._subSegMap;
160
- for(var i = 0; i < segmentCount; ++i) {
161
- var segmentName = segmentNames[i];
162
- var segment = segmentMap[segmentName];
158
+ let segmentCount = segmentNames.length;
159
+ let segmentMap = this._subSegMap;
160
+ for(let i = 0; i < segmentCount; ++i) {
161
+ let segmentName = segmentNames[i];
162
+ let segment = segmentMap[segmentName];
163
163
  out_ary.push(segment.getId());
164
164
  segment.getSubSegmentIds(out_ary);
165
165
  }
@@ -195,10 +195,10 @@ Segment.prototype.addChild = function(rid, dataId) {
195
195
  * @return {boolean}
196
196
  */
197
197
  Segment.prototype.addChildren = function(rids, dataIds) {
198
- var rowIds = Array.isArray(rids) ? rids : [rids];
199
- var rowCount = rowIds.length;
200
- var dirty = 0;
201
- var i;
198
+ let rowIds = Array.isArray(rids) ? rids : [rids];
199
+ let rowCount = rowIds.length;
200
+ let dirty = 0;
201
+ let i;
202
202
  if(dataIds != null) {
203
203
  dataIds = Array.isArray(dataIds) ? dataIds : [dataIds];
204
204
  for(i = 0; i < rowCount; ++i) {
@@ -233,7 +233,7 @@ Segment.prototype.removeChild = function(rid) {
233
233
  return false; // The specified rid is not a child of this segment
234
234
  }
235
235
 
236
- var objMap = this._shared.childToSegment;
236
+ let objMap = this._shared.childToSegment;
237
237
  delete objMap[rid];
238
238
  delete this._children[rid]; // Slow
239
239
  --this._childCount;
@@ -254,10 +254,10 @@ Segment.prototype.removeChildren = function(rids) {
254
254
  if(!this._childCount) {
255
255
  return false;
256
256
  }
257
- var rowIds = Array.isArray(rids) ? rids : [rids];
258
- var rowCount = rowIds.length;
259
- var dirty = 0;
260
- for(var i = 0; i < rowCount; ++i) {
257
+ let rowIds = Array.isArray(rids) ? rids : [rids];
258
+ let rowCount = rowIds.length;
259
+ let dirty = 0;
260
+ for(let i = 0; i < rowCount; ++i) {
261
261
  dirty |= this.removeChild(rowIds[i]);
262
262
  }
263
263
  return dirty ? true : false;
@@ -272,9 +272,9 @@ Segment.prototype.removeAllChildren = function() {
272
272
  if(!this._childCount) {
273
273
  return false;
274
274
  }
275
- var objMap = this._shared.childToSegment;
276
- var chdr = this._children;
277
- for(var rid in chdr) {
275
+ let objMap = this._shared.childToSegment;
276
+ let chdr = this._children;
277
+ for(let rid in chdr) {
278
278
  if(objMap[rid]) {
279
279
  delete objMap[rid]; // TODO: Check if we need to do this
280
280
  }
@@ -324,12 +324,12 @@ Segment.prototype.setClassification = function(fields) {
324
324
  if(this._subSegLevel) {
325
325
  return false; // non-root segment cannot be classified
326
326
  }
327
- var classifiers = null;
327
+ let classifiers = null;
328
328
  if(this._subSegDef) {
329
329
  classifiers = this._subSegDef.classifiers;
330
330
  }
331
331
 
332
- var newClassifiers = null;
332
+ let newClassifiers = null;
333
333
  if(fields) {
334
334
  if(typeof fields === "string") {
335
335
  newClassifiers = [fields];
@@ -337,11 +337,11 @@ Segment.prototype.setClassification = function(fields) {
337
337
  newClassifiers = fields;
338
338
  }
339
339
  }
340
- var i;
341
- var fieldCount = newClassifiers ? newClassifiers.length : 0;
340
+ let i;
341
+ let fieldCount = newClassifiers ? newClassifiers.length : 0;
342
342
 
343
343
  if(fieldCount) {
344
- var curCount = classifiers ? classifiers.length : 0;
344
+ let curCount = classifiers ? classifiers.length : 0;
345
345
  if(curCount === fieldCount) { // Check duplication
346
346
  for(i = 0; i < fieldCount; ++i) {
347
347
  if(newClassifiers[i] !== classifiers[i]) {
@@ -377,11 +377,11 @@ Segment.prototype.setClassification = function(fields) {
377
377
  * @return {boolean}
378
378
  */
379
379
  Segment.prototype.classify = function(rows) {
380
- var classifiers = this._subSegDef ? this._subSegDef.classifiers : null;
381
- var classifierCount = classifiers ? classifiers.length : 0;
380
+ let classifiers = this._subSegDef ? this._subSegDef.classifiers : null;
381
+ let classifierCount = classifiers ? classifiers.length : 0;
382
382
 
383
- var segmentNames = this._subSegNames;
384
- var segmentCount = segmentNames ? segmentNames.length : 0;
383
+ let segmentNames = this._subSegNames;
384
+ let segmentCount = segmentNames ? segmentNames.length : 0;
385
385
 
386
386
  if(!segmentCount) {
387
387
  if(this._subSegLevel >= classifierCount) {
@@ -389,18 +389,18 @@ Segment.prototype.classify = function(rows) {
389
389
  }
390
390
  }
391
391
 
392
- var sharedObj = this._shared;
392
+ let sharedObj = this._shared;
393
393
  if(this._collapsed) {
394
394
  sharedObj.dirtyCollapsingState = true;
395
395
  }
396
396
 
397
397
  // Prepare existing sub segments for checking change in its members
398
- var i;
399
- var segmentName = "";
400
- var nonExistenceGroups = {};
401
- var removalCount = 0;
402
- var segmentMap = this._subSegMap;
403
- var segment = null;
398
+ let i;
399
+ let segmentName = "";
400
+ let nonExistenceGroups = {};
401
+ let removalCount = 0;
402
+ let segmentMap = this._subSegMap;
403
+ let segment = null;
404
404
  if(segmentCount) {
405
405
  removalCount = segmentCount;
406
406
  for(i = 0; i < removalCount; ++i) {
@@ -419,21 +419,21 @@ Segment.prototype.classify = function(rows) {
419
419
  }
420
420
 
421
421
  // Loop through row children and assign them to their corresponding sub segment
422
- var isRootSegment = !this._subSegLevel;
423
- var rid;
424
- var children = this._children;
422
+ let isRootSegment = !this._subSegLevel;
423
+ let rid;
424
+ let children = this._children;
425
425
  if(this._subSegLevel < classifierCount && rows) {
426
426
  if(!segmentMap) {
427
427
  segmentMap = this._subSegMap = {};
428
428
  segmentNames = this._subSegNames = [];
429
429
  }
430
430
 
431
- var classifier = classifiers[this._subSegLevel];
431
+ let classifier = classifiers[this._subSegLevel];
432
432
 
433
433
  for(rid in children) {
434
- var dataId = children[rid];
435
- var record = rows[dataId];
436
- var val = record ? record[classifier] : null; // WARNING: row could already be removed
434
+ let dataId = children[rid];
435
+ let record = rows[dataId];
436
+ let val = record ? record[classifier] : null; // WARNING: row could already be removed
437
437
 
438
438
  sharedObj.childToSegment[rid] = this._rid; // Relocate child in case of it has been moved to a non existence group
439
439
 
@@ -482,7 +482,7 @@ Segment.prototype.classify = function(rows) {
482
482
  segment = segmentMap[segmentName];
483
483
  delete segmentMap[segmentName];
484
484
  // TODO: Slow
485
- var at = segmentNames.indexOf(segmentName);
485
+ let at = segmentNames.indexOf(segmentName);
486
486
  if(at >= 0) {
487
487
  segmentNames.splice(at, 1);
488
488
  }
@@ -514,7 +514,7 @@ Segment.prototype.classify = function(rows) {
514
514
  if(isRootSegment) { // If this is a root segment
515
515
  if(this._subSegDef) {
516
516
  if(segmentCount) {
517
- var subSegments = this._subSegDef.subSegments = [];
517
+ let subSegments = this._subSegDef.subSegments = [];
518
518
  this.getAllSubSegments(subSegments);
519
519
  subSegments.forEach(Segment._assignSubSegmentOrder);
520
520
  } else {
@@ -545,7 +545,7 @@ Segment.prototype.isSubSegment = function() {
545
545
  */
546
546
  Segment.prototype.getFirstAncestor = function() {
547
547
  if(this._subSegLevel && this._subSegDef) {
548
- var ancestor = this._subSegDef.root;
548
+ let ancestor = this._subSegDef.root;
549
549
  return /** @type{Segment} */(ancestor) || null;
550
550
  }
551
551
  return null;
@@ -555,15 +555,15 @@ Segment.prototype.getFirstAncestor = function() {
555
555
  * @return {Array.<Segment>}
556
556
  */
557
557
  Segment.prototype.getAllSubSegments = function(out_ary) {
558
- var segmentNames = this._subSegNames;
558
+ let segmentNames = this._subSegNames;
559
559
  if(segmentNames) {
560
560
  if(!out_ary) {
561
561
  out_ary = [];
562
562
  }
563
- var segmentMap = this._subSegMap;
564
- var segmentCount = segmentNames.length;
565
- for(var i = 0; i < segmentCount; ++i) {
566
- var segment = segmentMap[segmentNames[i]];
563
+ let segmentMap = this._subSegMap;
564
+ let segmentCount = segmentNames.length;
565
+ for(let i = 0; i < segmentCount; ++i) {
566
+ let segment = segmentMap[segmentNames[i]];
567
567
  out_ary.push(segment);
568
568
  segment.getAllSubSegments(out_ary);
569
569
  }
@@ -585,7 +585,7 @@ Segment.prototype.setRowData = function(rows, clsSource) {
585
585
  if(!rows) {
586
586
  return;
587
587
  }
588
- var row = rows[this._rid];
588
+ let row = rows[this._rid];
589
589
  if(!row) {
590
590
  row = rows[this._rid] = {};
591
591
  }
@@ -598,7 +598,7 @@ Segment.prototype.setRowData = function(rows, clsSource) {
598
598
  row = clsSource[this._rid] = {};
599
599
  }
600
600
 
601
- var segment = this;
601
+ let segment = this;
602
602
  while(segment && segment.isSubSegment()) {
603
603
  segment.getSubSegmentName(row);
604
604
  segment = segment._subSegParent;
@@ -610,8 +610,8 @@ Segment.prototype.setRowData = function(rows, clsSource) {
610
610
  */
611
611
  Segment.prototype.getSubSegmentName = function(row) {
612
612
  if(row && this._subSegLevel) {
613
- var classifiers = this.getClassification();
614
- var field = classifiers[this._subSegLevel - 1];
613
+ let classifiers = this.getClassification();
614
+ let field = classifiers[this._subSegLevel - 1];
615
615
  if(field) {
616
616
  row[field] = this._subSegName;
617
617
  }
@@ -651,7 +651,7 @@ Segment.prototype.isCollapsed = function() {
651
651
  * @return {boolean}
652
652
  */
653
653
  Segment.prototype.getCollapsingStates = function(objMap, parentState) {
654
- var segmentNames = this._subSegNames;
654
+ let segmentNames = this._subSegNames;
655
655
  if(!this._subSegLevel) { // Only root segment
656
656
  if(!segmentNames) { // No sub segment
657
657
  if(!this._collapsed) {
@@ -663,7 +663,7 @@ Segment.prototype.getCollapsingStates = function(objMap, parentState) {
663
663
  if(!objMap) {
664
664
  objMap = {};
665
665
  }
666
- var dirty = false;
666
+ let dirty = false;
667
667
  if(this._subSegLevel) { // Sub segments are also subjected to collapsing
668
668
  if(parentState) {
669
669
  objMap[this._rid] = true;
@@ -671,20 +671,20 @@ Segment.prototype.getCollapsingStates = function(objMap, parentState) {
671
671
  }
672
672
  }
673
673
  if(this._childCount) {
674
- var collapsed = parentState || this._collapsed;
674
+ let collapsed = parentState || this._collapsed;
675
675
  if(segmentNames) {
676
- var segmentMap = this._subSegMap;
677
- var segmentCount = segmentNames.length;
678
- for(var i = 0; i < segmentCount; ++i) {
679
- var segment = segmentMap[segmentNames[i]];
676
+ let segmentMap = this._subSegMap;
677
+ let segmentCount = segmentNames.length;
678
+ for(let i = 0; i < segmentCount; ++i) {
679
+ let segment = segmentMap[segmentNames[i]];
680
680
  objMap[segment.getId()] = !!parentState;
681
681
  if(segment.getCollapsingStates(objMap, collapsed)) {
682
682
  dirty = true;
683
683
  }
684
684
  }
685
685
  } else if(collapsed) {
686
- var chdr = this._children;
687
- for(var rid in chdr) {
686
+ let chdr = this._children;
687
+ for(let rid in chdr) {
688
688
  objMap[rid] = collapsed;
689
689
  }
690
690
  dirty = true;
@@ -698,7 +698,7 @@ Segment.prototype.getCollapsingStates = function(objMap, parentState) {
698
698
  */
699
699
  Segment.prototype.getOrder = function() {
700
700
  if(this._subSegLevel) {
701
- var ancestor = this.getFirstAncestor();
701
+ let ancestor = this.getFirstAncestor();
702
702
  if(ancestor) {
703
703
  // WARNING: this._order cannot be greater than 9999
704
704
  return ancestor.getOrder() + this._order;
@@ -712,9 +712,9 @@ Segment.prototype.getOrder = function() {
712
712
  */
713
713
  Segment.prototype.getLastOrder = function() {
714
714
  if(this._subSegDef) {
715
- var subSegments = this._subSegDef.subSegments;
715
+ let subSegments = this._subSegDef.subSegments;
716
716
  if(subSegments) {
717
- var lastSegment = subSegments[subSegments.length - 1];
717
+ let lastSegment = subSegments[subSegments.length - 1];
718
718
  if(lastSegment) {
719
719
  return lastSegment.getOrder();
720
720
  }
@@ -738,29 +738,29 @@ Segment._tabs = null;
738
738
  * @return {Array.<string>} lines
739
739
  */
740
740
  Segment.prototype.log = function(lines) {
741
- var i;
742
- var tabs = Segment._tabs;
741
+ let i;
742
+ let tabs = Segment._tabs;
743
743
  if(!tabs) {
744
744
  tabs = Segment._tabs = [];
745
- var tabCh = "";
745
+ let tabCh = "";
746
746
  for(i = 0; i < 11; ++i) {
747
747
  tabs[i] = tabCh;
748
748
  tabCh += " ";
749
749
  }
750
750
  }
751
- var collapsedCh = this._collapsed ? "+ " : "- ";
751
+ let collapsedCh = this._collapsed ? "+ " : "- ";
752
752
  lines.push(tabs[this._subSegLevel] + collapsedCh + this._rid);
753
753
 
754
- var segmentNames = this._subSegNames;
754
+ let segmentNames = this._subSegNames;
755
755
  if(segmentNames) {
756
- var segmentCount = segmentNames.length;
757
- var segmentMap = this._subSegMap;
756
+ let segmentCount = segmentNames.length;
757
+ let segmentMap = this._subSegMap;
758
758
  for(i = 0; i < segmentCount; ++i) {
759
759
  segmentMap[segmentNames[i]].log(lines);
760
760
  }
761
761
  } else if(this._childCount) {
762
- var indent = tabs[this._subSegLevel + 1];
763
- for(var rid in this._children) {
762
+ let indent = tabs[this._subSegLevel + 1];
763
+ for(let rid in this._children) {
764
764
  lines.push(indent + "- " + rid);
765
765
  }
766
766
  }