@refinitiv-ui/efx-grid 6.0.40 → 6.0.42
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +2 -1
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +23 -7
- package/lib/core/dist/core.js +846 -881
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.d.ts +4 -0
- package/lib/core/es6/grid/Core.js +91 -27
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +3 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +26 -26
- package/lib/core/es6/grid/util/util.js +25 -9
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +2253 -1755
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +22 -0
- package/lib/rt-grid/es6/Grid.js +146 -11
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -2
- package/lib/rt-grid/es6/RowDefinition.js +37 -18
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +4 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +60 -59
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +9 -3
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +290 -364
- package/lib/tr-grid-util/es6/CellPainter.d.ts +2 -1
- package/lib/tr-grid-util/es6/CellPainter.js +6 -4
- package/lib/tr-grid-util/es6/DateTime.js +3 -3
- package/lib/tr-grid-util/es6/ExpressionParser.d.ts +10 -0
- package/lib/tr-grid-util/es6/ExpressionParser.js +366 -0
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +10 -6
- package/lib/tr-grid-util/es6/FilterBuilder.js +264 -234
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +3 -1
- package/lib/tr-grid-util/es6/FilterOperators.js +51 -2
- package/lib/tr-grid-util/es6/GridPlugin.js +1 -1
- package/lib/tr-grid-util/es6/Util.d.ts +0 -3
- package/lib/tr-grid-util/es6/Util.js +0 -53
- package/lib/tr-grid-util/es6/formula/Formula.js +3 -3
- package/lib/types/es6/ColumnDragging.d.ts +51 -0
- package/lib/types/es6/ColumnGrouping.d.ts +4 -0
- package/lib/types/es6/ColumnStack.d.ts +9 -3
- package/lib/types/es6/Core/grid/Core.d.ts +4 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +3 -2
- package/lib/types/es6/ExtensionOptions.d.ts +2 -0
- package/lib/types/es6/Extensions.d.ts +3 -1
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -2
- package/lib/types/es6/index.d.ts +1 -0
- package/lib/versions.json +4 -4
- package/package.json +1 -1
@@ -23,7 +23,8 @@ declare namespace ColumnSelectionDialog {
|
|
23
23
|
excludedRightColumns?: number|null,
|
24
24
|
unmovableColumns?: number|null,
|
25
25
|
descriptionBox?: boolean|null,
|
26
|
-
middleSeparator?: string|null
|
26
|
+
middleSeparator?: string|null,
|
27
|
+
collapseAll?: boolean|null
|
27
28
|
};
|
28
29
|
|
29
30
|
}
|
@@ -22,6 +22,7 @@ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
22
22
|
* @property {number=} unmovableColumns Depricated, Alias with stationary column option. Number of columns that is unmovable in Visible Columns.
|
23
23
|
* @property {boolean=} descriptionBox Show description box
|
24
24
|
* @property {string=} middleSeparator Field of column which used as middle separator to divide grid into two sides
|
25
|
+
* @property {boolean=} collapseAll=false Default collapse property applies to all groups
|
25
26
|
*/
|
26
27
|
|
27
28
|
/** Insert multiple items to the given array. This is an in-place modification.
|
@@ -256,10 +257,15 @@ const _getSelectedItemIndexes = function (list) {
|
|
256
257
|
* @private
|
257
258
|
* @param {Object} colObj
|
258
259
|
* @param {string} parent parent of this group
|
260
|
+
* @param {boolean} defaultExpanded default expand state for tree item
|
259
261
|
* @return {Object}
|
260
262
|
*/
|
261
|
-
const _toCoralTreeItem = function (colObj, parent) {
|
263
|
+
const _toCoralTreeItem = function (colObj, parent, defaultExpanded) {
|
262
264
|
var label = colObj.label || colObj.title || colObj.name || colObj.field;
|
265
|
+
var expanded = defaultExpanded;
|
266
|
+
if(colObj.expanded != null){
|
267
|
+
expanded = colObj.expanded;
|
268
|
+
}
|
263
269
|
var currentId;
|
264
270
|
if(parent) {
|
265
271
|
currentId = parent + '/' + label;
|
@@ -272,9 +278,9 @@ const _toCoralTreeItem = function (colObj, parent) {
|
|
272
278
|
rawValue: colObj.id,
|
273
279
|
value: colObj.id,
|
274
280
|
items: colObj.items.map(function (obj) {
|
275
|
-
return _toCoralTreeItem(obj, currentId);
|
281
|
+
return _toCoralTreeItem(obj, currentId, defaultExpanded);
|
276
282
|
}),
|
277
|
-
expanded:
|
283
|
+
expanded: expanded,
|
278
284
|
isGroup: true
|
279
285
|
};
|
280
286
|
} else {
|
@@ -494,6 +500,7 @@ class ColumnSelectionDialog extends BasicElement {
|
|
494
500
|
this._pendingTreeRefresh = false;
|
495
501
|
this._pendingResetSearchInput = false;
|
496
502
|
this._middleSeparator = "";
|
503
|
+
this._defaultExpanded = true;
|
497
504
|
|
498
505
|
this._allItemMapping = {};
|
499
506
|
this._filterItemMapping = {};
|
@@ -574,6 +581,10 @@ class ColumnSelectionDialog extends BasicElement {
|
|
574
581
|
this._descriptionBox = !!this.config.descriptionBox;
|
575
582
|
}
|
576
583
|
|
584
|
+
if (this.config.collapseAll != null) {
|
585
|
+
this._defaultExpanded = !this.config.collapseAll;
|
586
|
+
}
|
587
|
+
|
577
588
|
this._defaultItems = this.config.defaultItems;
|
578
589
|
}
|
579
590
|
}
|
@@ -766,7 +777,10 @@ class ColumnSelectionDialog extends BasicElement {
|
|
766
777
|
}
|
767
778
|
|
768
779
|
if(this._pendingScroll) {
|
769
|
-
|
780
|
+
var selectedIndexes = _getSelectedItemIndexes(this._visibleColumnList);
|
781
|
+
if (selectedIndexes.length) {
|
782
|
+
scrollToItem(this._visibleColumnsContainer, selectedIndexes[0]);
|
783
|
+
}
|
770
784
|
this._pendingScroll = false;
|
771
785
|
}
|
772
786
|
|
@@ -879,9 +893,11 @@ class ColumnSelectionDialog extends BasicElement {
|
|
879
893
|
|
880
894
|
}
|
881
895
|
|
882
|
-
this._allColumnList =
|
883
|
-
|
884
|
-
|
896
|
+
this._allColumnList = [];
|
897
|
+
for(i = 0; i < allItems.length; i++){
|
898
|
+
item = allItems[i];
|
899
|
+
this._allColumnList.push(_toCoralTreeItem(item, null, this._defaultExpanded));
|
900
|
+
}
|
885
901
|
this._allItemMapping = _createMapping(this._allColumnList, 'value');
|
886
902
|
|
887
903
|
this._visibleColumnList = [];
|