@refinitiv-ui/efx-grid 6.0.77 → 6.0.79
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/core/dist/core.js +20 -2
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.d.ts +4 -0
- package/lib/core/es6/data/DataView.js +19 -1
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/filter-dialog/lib/filter-dialog.js +4 -2
- package/lib/formatters/es6/TextFormatter.js +6 -1
- package/lib/grid/index.js +1 -1
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +6 -0
- package/lib/tr-grid-checkbox/es6/Checkbox.js +319 -234
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +2 -0
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +18 -1
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +8 -0
- package/lib/tr-grid-util/es6/GridPlugin.js +95 -0
- package/lib/types/es6/Checkbox.d.ts +6 -0
- package/lib/types/es6/Core/data/DataView.d.ts +4 -0
- package/lib/types/es6/RowGrouping.d.ts +2 -0
- package/lib/versions.json +5 -5
- package/package.json +1 -1
@@ -650,7 +650,7 @@ RowGroupingPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
650
650
|
extOptions.headerSpanning = this._headerSpanning;
|
651
651
|
}
|
652
652
|
if(this._footerSpanning) {
|
653
|
-
extOptions.
|
653
|
+
extOptions.footerSpanning = this._footerSpanning;
|
654
654
|
}
|
655
655
|
if(this._autoGroupSorting) {
|
656
656
|
extOptions.autoGroupSorting = this._autoGroupSorting;
|
@@ -1165,6 +1165,13 @@ RowGroupingPlugin.prototype._onGroupAdded = function (e) {
|
|
1165
1165
|
if (this._footerRows) {
|
1166
1166
|
e.newGroup.addFooter(this._footerRows);
|
1167
1167
|
}
|
1168
|
+
var newGroup = e.newGroup;
|
1169
|
+
// WARNING: contentAsHeader mode is overwrite arrow hidden to boolean
|
1170
|
+
if(!this._contentAsHeader && newGroup.disableCollapsing) {
|
1171
|
+
if(this._isArrowHidden(newGroup)) {
|
1172
|
+
newGroup.disableCollapsing();
|
1173
|
+
}
|
1174
|
+
}
|
1168
1175
|
this._dispatch("groupAdded", e);
|
1169
1176
|
|
1170
1177
|
if (this._autoGroupSorting) {
|
@@ -1502,6 +1509,9 @@ RowGroupingPlugin.prototype._onCellClicked = function (e) {
|
|
1502
1509
|
var grpView = dv.getGroupByRowId(rowId);
|
1503
1510
|
if (grpView) {
|
1504
1511
|
changed = true;
|
1512
|
+
if(grpView.isCollapsible && !grpView.isCollapsible()) { // Prevent applied styles
|
1513
|
+
return;
|
1514
|
+
}
|
1505
1515
|
grpView.collapse(!collapsed);
|
1506
1516
|
} else if (this._contentAsHeader) {
|
1507
1517
|
changed = true;
|
@@ -1656,6 +1666,13 @@ RowGroupingPlugin.prototype.enableFooterRow = function (opt_num) {
|
|
1656
1666
|
this._footerRows = /** @type{number} */(opt_num);
|
1657
1667
|
};
|
1658
1668
|
|
1669
|
+
/** @public
|
1670
|
+
* @return {number}
|
1671
|
+
*/
|
1672
|
+
RowGroupingPlugin.prototype.getFooterRowCount = function () {
|
1673
|
+
return this._footerRows;
|
1674
|
+
};
|
1675
|
+
|
1659
1676
|
/** @function
|
1660
1677
|
* @param {Object} obj
|
1661
1678
|
* @return {boolean}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import {Ext} from "./Ext.js";
|
2
2
|
import {EventDispatcher} from "./EventDispatcher.js";
|
3
3
|
import {Deferred} from "./Deferred.js";
|
4
|
+
import {injectCss} from "./Util.js";
|
5
|
+
import {ElfUtil} from "./ElfUtil.js";
|
4
6
|
|
5
7
|
declare class GridPlugin extends EventDispatcher {
|
6
8
|
|
@@ -44,6 +46,12 @@ declare class GridPlugin extends EventDispatcher {
|
|
44
46
|
|
45
47
|
public static requestPlugin(ref: any, pluginRef: any, configObj?: any, compositeGrid?: any, realTimeGrid?: any): Promise<any>|null;
|
46
48
|
|
49
|
+
public applyStaticStyles(styleCalculator: ((...params: any[]) => any)|null): void;
|
50
|
+
|
51
|
+
public applyStyles(cssString: string, nameSpace?: string|null, replaceable?: boolean|null): void;
|
52
|
+
|
53
|
+
public revokeStyles(host: any, nameSpace: string): void;
|
54
|
+
|
47
55
|
}
|
48
56
|
|
49
57
|
declare function gridAPI(gridType: string, wrapperInstance: any): void;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import {Ext} from "./Ext.js";
|
2
2
|
import {EventDispatcher} from "./EventDispatcher.js";
|
3
3
|
import {Deferred} from "./Deferred.js";
|
4
|
+
import {injectCss} from "./Util.js";
|
5
|
+
import {ElfUtil} from "./ElfUtil.js";
|
4
6
|
|
5
7
|
/** This class is designed to be a base class for other tr.Grid plug-ins. It provide commonly used functionalities by the plug-ins.
|
6
8
|
* @constructor
|
@@ -816,6 +818,99 @@ GridPlugin.prototype._mockKeyboardEvent = function(keyCode, context) {
|
|
816
818
|
|
817
819
|
return evt;
|
818
820
|
};
|
821
|
+
|
822
|
+
/** @type {Object}
|
823
|
+
* @private
|
824
|
+
*/
|
825
|
+
GridPlugin._staticStyles = {};
|
826
|
+
|
827
|
+
/** @type {Object}
|
828
|
+
* @private
|
829
|
+
*/
|
830
|
+
GridPlugin._themeLoaders = {};
|
831
|
+
|
832
|
+
/** @private
|
833
|
+
* @param {Function} styleCalculator
|
834
|
+
* @param {Object} colors
|
835
|
+
*/
|
836
|
+
GridPlugin._themeLoadSuccess = function(styleCalculator, colors) {
|
837
|
+
var extName = this.getName();
|
838
|
+
var styles = GridPlugin._staticStyles[extName] = styleCalculator(colors);
|
839
|
+
this.applyStyles(styles, extName);
|
840
|
+
};
|
841
|
+
|
842
|
+
/** @public
|
843
|
+
* @param {Function} styleCalculator
|
844
|
+
*/
|
845
|
+
GridPlugin.prototype.applyStaticStyles = function(styleCalculator) {
|
846
|
+
var extName = this.getName();
|
847
|
+
var styles = GridPlugin._staticStyles[extName];
|
848
|
+
if (!styles) {
|
849
|
+
if (styleCalculator) {
|
850
|
+
if (!GridPlugin._themeLoaders[extName]) {
|
851
|
+
GridPlugin._themeLoaders[extName] = ElfUtil.getThemeColors();
|
852
|
+
}
|
853
|
+
GridPlugin._themeLoaders[extName]
|
854
|
+
.then(GridPlugin._themeLoadSuccess.bind(this, styleCalculator));
|
855
|
+
}
|
856
|
+
} else {
|
857
|
+
this.applyStyles(styles, extName);
|
858
|
+
}
|
859
|
+
};
|
860
|
+
|
861
|
+
/** @public
|
862
|
+
* @param {string} cssString
|
863
|
+
* @param {string=} nameSpace
|
864
|
+
* @param {boolean=} replaceable
|
865
|
+
*/
|
866
|
+
GridPlugin.prototype.applyStyles = function(cssString, nameSpace, replaceable) {
|
867
|
+
if (!nameSpace) {
|
868
|
+
nameSpace = this.getName();
|
869
|
+
}
|
870
|
+
|
871
|
+
var intNameSpace = "_style" + nameSpace;
|
872
|
+
|
873
|
+
var hosts = this._hosts;
|
874
|
+
var len = hosts.length;
|
875
|
+
if (!len) {
|
876
|
+
return;
|
877
|
+
}
|
878
|
+
|
879
|
+
var i, host;
|
880
|
+
if (!replaceable) {
|
881
|
+
for (i = 0; i < len; i++) {
|
882
|
+
host = hosts[i];
|
883
|
+
if (!host[intNameSpace]) {
|
884
|
+
injectCss(cssString, host.getElement());
|
885
|
+
host[intNameSpace] = true;
|
886
|
+
}
|
887
|
+
}
|
888
|
+
} else {
|
889
|
+
for (i = 0; i < len; i++) {
|
890
|
+
host = hosts[i];
|
891
|
+
this.revokeStyles(host, nameSpace);
|
892
|
+
host[intNameSpace] = injectCss(cssString, host.getElement());
|
893
|
+
}
|
894
|
+
}
|
895
|
+
};
|
896
|
+
|
897
|
+
/** @public
|
898
|
+
* @param {Object} host
|
899
|
+
* @param {string} nameSpace
|
900
|
+
*/
|
901
|
+
GridPlugin.prototype.revokeStyles = function(host, nameSpace) {
|
902
|
+
if (!host || !nameSpace) {
|
903
|
+
return;
|
904
|
+
}
|
905
|
+
|
906
|
+
nameSpace = "_style" + nameSpace;
|
907
|
+
var styleTag = host[nameSpace];
|
908
|
+
if (styleTag && styleTag.nodeType === 1) {
|
909
|
+
styleTag.parentNode.removeChild(styleTag);
|
910
|
+
host[nameSpace] = null;
|
911
|
+
}
|
912
|
+
};
|
913
|
+
|
819
914
|
/** Export the plugin to the given object by attaching it to tr and tr.grid namespaces
|
820
915
|
* @public
|
821
916
|
* @function
|
@@ -48,6 +48,12 @@ declare class CheckboxPlugin extends GridPlugin {
|
|
48
48
|
|
49
49
|
public deselectAll(check: boolean): void;
|
50
50
|
|
51
|
+
public selectCheckboxes(rowRefs: (number|string)[]|null, checked: boolean): void;
|
52
|
+
|
53
|
+
public deselectCheckboxes(rowRefs: (number|string)[]|null, checked: boolean): void;
|
54
|
+
|
55
|
+
public setCheckStates(rowRefs: (number|string)[]|null, checked: boolean): void;
|
56
|
+
|
51
57
|
public checkAll(checked: boolean): void;
|
52
58
|
|
53
59
|
public setAllCheckStates(checked: boolean): void;
|
@@ -194,6 +194,10 @@ declare class DataView extends EventDispatcher {
|
|
194
194
|
|
195
195
|
public getDefaultCollapse(): boolean;
|
196
196
|
|
197
|
+
public isCollapsible(): boolean;
|
198
|
+
|
199
|
+
public disableCollapsing(bool?: boolean|null): void;
|
200
|
+
|
197
201
|
public getVisibleRowCount(): number;
|
198
202
|
|
199
203
|
public isRowDataInGroup(rowData: any, groupID?: string|null): boolean;
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.135",
|
3
3
|
"tr-grid-printer": "1.0.17",
|
4
4
|
"@grid/column-dragging": "1.0.15",
|
5
5
|
"@grid/row-segmenting": "1.0.30",
|
@@ -7,7 +7,7 @@
|
|
7
7
|
"@grid/zoom": "1.0.11",
|
8
8
|
"tr-grid-auto-tooltip": "1.1.6",
|
9
9
|
"tr-grid-cell-selection": "1.0.34",
|
10
|
-
"tr-grid-checkbox": "1.0.
|
10
|
+
"tr-grid-checkbox": "1.0.62",
|
11
11
|
"tr-grid-column-fitter": "1.0.39",
|
12
12
|
"tr-grid-column-formatting": "0.9.35",
|
13
13
|
"tr-grid-column-grouping": "1.0.57",
|
@@ -25,13 +25,13 @@
|
|
25
25
|
"tr-grid-range-bar": "2.0.6",
|
26
26
|
"tr-grid-row-dragging": "1.0.31",
|
27
27
|
"tr-grid-row-filtering": "1.0.65",
|
28
|
-
"tr-grid-row-grouping": "1.0.
|
28
|
+
"tr-grid-row-grouping": "1.0.84",
|
29
29
|
"tr-grid-row-selection": "1.0.25",
|
30
30
|
"tr-grid-rowcoloring": "1.0.25",
|
31
31
|
"tr-grid-textformatting": "1.0.46",
|
32
32
|
"tr-grid-titlewrap": "1.0.20",
|
33
|
-
"@grid/formatters": "1.0.
|
33
|
+
"@grid/formatters": "1.0.51",
|
34
34
|
"@grid/column-selection-dialog": "4.0.55",
|
35
|
-
"@grid/filter-dialog": "4.0.
|
35
|
+
"@grid/filter-dialog": "4.0.61",
|
36
36
|
"@grid/column-format-dialog": "4.0.44"
|
37
37
|
}
|
package/package.json
CHANGED