@refinitiv-ui/efx-grid 6.0.48 → 6.0.50
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +183 -88
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.d.ts +2 -0
- package/lib/core/es6/data/DataView.js +174 -82
- package/lib/core/es6/data/Segment.d.ts +2 -0
- package/lib/core/es6/data/Segment.js +6 -0
- package/lib/core/es6/grid/Core.js +2 -5
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +354 -105
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +15 -0
- package/lib/tr-grid-printer/es6/GridPrinter.js +5 -5
- package/lib/tr-grid-util/es6/CoralItems.js +2 -2
- package/lib/tr-grid-util/es6/ElfDate.js +1 -1
- package/lib/tr-grid-util/es6/ElfUtil.js +2 -2
- package/lib/tr-grid-util/es6/ExpanderIcon.js +1 -1
- package/lib/tr-grid-util/es6/GridPlugin.js +1 -1
- package/lib/tr-grid-util/es6/Icon.js +3 -3
- package/lib/tr-grid-util/es6/MultiTableManager.js +3 -3
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +5 -1
- package/lib/types/es6/Core/data/DataView.d.ts +0 -2
- package/lib/types/es6/Core/data/Segment.d.ts +0 -2
- package/lib/types/es6/Core/grid/Core.d.ts +4 -0
- package/lib/versions.json +2 -0
- package/package.json +1 -1
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -152,6 +152,12 @@ import { ElementWrapper } from "../../core/es6/grid/components/ElementWrapper.js
|
|
152
152
|
* @property {Grid} grid
|
153
153
|
* @property {RowDefinition} rowDef
|
154
154
|
*/
|
155
|
+
|
156
|
+
/** @event Grid#beforeContentBinding
|
157
|
+
* @property {Object} e Event of beforeContentBinding, We can use e.actualUpdate to check the actual data update, otherwise It will be empty when it is rendered by row virtualization or only the UI changes.
|
158
|
+
* @description Trigger before content binding.
|
159
|
+
*/
|
160
|
+
|
155
161
|
/** @event Grid#beforeRowRemoved
|
156
162
|
* @description Fired only when a row will be removed through Grid's API and before occurring of the actual removal
|
157
163
|
*/
|
@@ -302,6 +308,7 @@ var Grid = function(placeholder, config) {
|
|
302
308
|
t.updateColumnTitle = t.updateColumnTitle.bind(t);
|
303
309
|
t._populateTimeSeriesChildren = t._populateTimeSeriesChildren.bind(t);
|
304
310
|
|
311
|
+
t._onBeforeContentBinding = t._onBeforeContentBinding.bind(t);
|
305
312
|
t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
|
306
313
|
t._asyncClearDataUpdates = t._asyncClearDataUpdates.bind(t);
|
307
314
|
t._clearDataUpdates = t._clearDataUpdates.bind(t);
|
@@ -394,6 +401,7 @@ var Grid = function(placeholder, config) {
|
|
394
401
|
t._grid.loadPlugin(t._stp, config);
|
395
402
|
}
|
396
403
|
|
404
|
+
t._grid.listen("beforeContentBinding", t._onBeforeContentBinding);
|
397
405
|
t._grid.listen("preSectionRender", t._onColumnHeaderBinding);
|
398
406
|
t._grid.listen("postSectionDataBinding", t._onPostSectionDataBinding);
|
399
407
|
|
@@ -3513,6 +3521,13 @@ Grid.prototype._mainSorter = function (rowDefA, rowDefB, order) {
|
|
3513
3521
|
return this._columnSorter(rowDefA, rowDefB, order);
|
3514
3522
|
};
|
3515
3523
|
|
3524
|
+
/** @private
|
3525
|
+
* @param {Object} e
|
3526
|
+
*/
|
3527
|
+
Grid.prototype._onBeforeContentBinding = function(e) {
|
3528
|
+
this._dispatch("beforeContentBinding", e);
|
3529
|
+
};
|
3530
|
+
|
3516
3531
|
/** @private
|
3517
3532
|
* @param {Object} e
|
3518
3533
|
*/
|
@@ -114,13 +114,13 @@ var _setColumnAlignment = function (tbl, colIndex, alignment) {
|
|
114
114
|
};
|
115
115
|
|
116
116
|
/** @private
|
117
|
-
* @param {*} grid grid element, currently supports atlas-blotter,
|
117
|
+
* @param {*} grid grid element, currently supports atlas-blotter, ef-grid, tr.CompositeGrid, rt.Grid and Core
|
118
118
|
* @return {Object} core grid
|
119
119
|
*/
|
120
120
|
var _getCoreGrid = function (grid) {
|
121
121
|
var core = null;
|
122
122
|
try {
|
123
|
-
if (grid.api) { //
|
123
|
+
if (grid.api) { // ef-grid or atlas-blotter
|
124
124
|
core = grid.api.getCoreGrid();
|
125
125
|
} else if (grid.getCoreGrid) { // tr.CompositeGrid or rt.Grid
|
126
126
|
core = grid.getCoreGrid();
|
@@ -352,7 +352,7 @@ GridPrinter.getPreFlightInfo = function (grid, options) {
|
|
352
352
|
};
|
353
353
|
|
354
354
|
/** @public
|
355
|
-
* @param {*} grid grid element, currently supports atlas-blotter,
|
355
|
+
* @param {*} grid grid element, currently supports atlas-blotter, ef-grid, tr.CompositeGrid, rt.Grid and Core
|
356
356
|
* @param {Object=} options
|
357
357
|
* @return {Element}
|
358
358
|
*/
|
@@ -523,7 +523,7 @@ GridPrinter._applyCss = function () {
|
|
523
523
|
".tr-printing-root .tr-align-center", [
|
524
524
|
"text-align: center;"
|
525
525
|
],
|
526
|
-
".tr-printing-root .cell
|
526
|
+
".tr-printing-root .cell ef-icon", [
|
527
527
|
"margin-top: 3px;"
|
528
528
|
],
|
529
529
|
".tr-printing-root .cell .sort-symbol", [
|
@@ -647,7 +647,7 @@ GridPrinter._applyCss = function () {
|
|
647
647
|
};
|
648
648
|
|
649
649
|
/** @public
|
650
|
-
* @param {*} grid grid element, currently supports atlas-blotter,
|
650
|
+
* @param {*} grid grid element, currently supports atlas-blotter, ef-grid, tr.CompositeGrid, rt.Grid and Core
|
651
651
|
*/
|
652
652
|
GridPrinter.print = function (grid) {
|
653
653
|
var core = null;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
/** @namespace */
|
2
2
|
var CoralItems = {};
|
3
3
|
|
4
|
-
/** Create new array with valid object items to be consumed by
|
4
|
+
/** Create new array with valid object items to be consumed by ef-select's data property from the given input
|
5
5
|
* @public
|
6
6
|
* @function
|
7
7
|
* @param {Array} userItems This can be array of anything (e.g. texts, numbers, objects or etc.).
|
8
|
-
* @return {Array.<Object>} Valid data objects for generating
|
8
|
+
* @return {Array.<Object>} Valid data objects for generating ef-item by ef-select
|
9
9
|
* @example
|
10
10
|
* CoralItems.create(["a", "b"]); // [{label: "a", value: "a"}, {label: "b", value: "b"}]
|
11
11
|
* CoralItems.create([33]); // [{label: "33", value: 33}]
|
@@ -62,7 +62,7 @@ ElfDate.prefixSingleDigit = function (n) {
|
|
62
62
|
*/
|
63
63
|
ElfDate._ymdRe = /^\d{4}\-d{2}\-\d{2}/; // eslint-disable-line
|
64
64
|
|
65
|
-
/** Returns yyyy-MM-dd string format for
|
65
|
+
/** Returns yyyy-MM-dd string format for ef-datetime-picker.
|
66
66
|
* @public
|
67
67
|
* @function
|
68
68
|
* @param {string|Date} d
|
@@ -156,7 +156,7 @@ ElfUtil.getElfVersion = function () {
|
|
156
156
|
* @param {string} compName
|
157
157
|
* @return {number}
|
158
158
|
* @example
|
159
|
-
* ElfUtil.hasComponent("
|
159
|
+
* ElfUtil.hasComponent("ef-button"); // 1 or 3
|
160
160
|
* ElfUtil.hasComponent("unknown-button"); // 0
|
161
161
|
*/
|
162
162
|
ElfUtil.hasComponent = function (compName) {
|
@@ -329,7 +329,7 @@ ElfUtil.prepareIconPreloading = function() {
|
|
329
329
|
var iconList = ElfUtil.getIconList();
|
330
330
|
if(iconList.length) {
|
331
331
|
setTimeout(ElfUtil._onIconPreloaded, 10);
|
332
|
-
var dummyIcon = ElfUtil._dummyIcon = document.createElement("
|
332
|
+
var dummyIcon = ElfUtil._dummyIcon = document.createElement("ef-icon");
|
333
333
|
dummyIcon.style.transform = "scale(0)";
|
334
334
|
document.body.appendChild(dummyIcon);
|
335
335
|
return iconList;
|
@@ -11,7 +11,7 @@ import { ElfUtil } from "./ElfUtil.js";
|
|
11
11
|
var ExpanderIcon = function () {
|
12
12
|
var elem;
|
13
13
|
if (ExpanderIcon._iconName) {
|
14
|
-
elem = document.createElement("
|
14
|
+
elem = document.createElement("ef-icon");
|
15
15
|
elem.setAttribute("icon", ExpanderIcon._iconName);
|
16
16
|
} else {
|
17
17
|
elem = document.createElement("span");
|
@@ -419,7 +419,7 @@ GridPlugin.prototype._requestPlugin = function (host, pluginRef, configObj) {
|
|
419
419
|
};
|
420
420
|
/** Make a request to load a plugin/extension into the given core grid (tr-grid). Return a promise of plugin/extension instance
|
421
421
|
* @public
|
422
|
-
* @param {*} ref This can be
|
422
|
+
* @param {*} ref This can be ef-grid, atlas-blotter, composite grid, real-time grid, or core grid.
|
423
423
|
* @param {*} pluginRef Plugin/Extension name or instance
|
424
424
|
* @param {Object=} configObj
|
425
425
|
* @param {*=} compositeGrid
|
@@ -5,10 +5,10 @@ var Icon = {};
|
|
5
5
|
* @function
|
6
6
|
* @param {string=} iconName
|
7
7
|
* @param {string=} className
|
8
|
-
* @return {!Element}
|
8
|
+
* @return {!Element} ef-icon element
|
9
9
|
*/
|
10
10
|
Icon.create = function(iconName, className) {
|
11
|
-
var icon = document.createElement("
|
11
|
+
var icon = document.createElement("ef-icon");
|
12
12
|
if(className) {
|
13
13
|
icon.className = className;
|
14
14
|
}
|
@@ -47,7 +47,7 @@ Icon.box = function(iconName, className, boxRef) {
|
|
47
47
|
|
48
48
|
/** @public
|
49
49
|
* @function
|
50
|
-
* @param {Element} iconElem
|
50
|
+
* @param {Element} iconElem ef-icon element
|
51
51
|
* @param {string=} iconName
|
52
52
|
*/
|
53
53
|
Icon.change = function(iconElem, iconName) {
|
@@ -12,7 +12,7 @@ import { Dom } from "./Dom.js";
|
|
12
12
|
var GridElements = {
|
13
13
|
"EFX-GRID": 1,
|
14
14
|
"ATLAS-BLOTTER": 1,
|
15
|
-
"
|
15
|
+
"EF-GRID": 1
|
16
16
|
};
|
17
17
|
/** @type {Object.<string, number>}
|
18
18
|
* @private
|
@@ -23,7 +23,7 @@ var InvalidHostElements = {
|
|
23
23
|
"HTML": 1,
|
24
24
|
"EFX-GRID": 1,
|
25
25
|
"ATLAS-BLOTTER": 1,
|
26
|
-
"
|
26
|
+
"EF-GRID": 1
|
27
27
|
};
|
28
28
|
|
29
29
|
/** @private
|
@@ -76,7 +76,7 @@ var MultiTableManager = function (gridElem) {
|
|
76
76
|
|
77
77
|
this._tables = [];
|
78
78
|
if(gridElem) {
|
79
|
-
this._emeraldGrid = gridElem.tagName === "
|
79
|
+
this._emeraldGrid = gridElem.tagName === "EF-GRID";
|
80
80
|
this._tables.push(gridElem);
|
81
81
|
}
|
82
82
|
};
|
@@ -16,7 +16,11 @@ var _joinSubKeys = function(subA, subB) {
|
|
16
16
|
*/
|
17
17
|
var _isDynamicChain = function(ric) {
|
18
18
|
// Dynamic chain will be 2 . (dot) for example .PG.PA
|
19
|
-
|
19
|
+
var matching = ric.match(/\./g); // Can be null when doesn't found dot(.)
|
20
|
+
if(matching) {
|
21
|
+
return matching.length > 1;
|
22
|
+
}
|
23
|
+
return false;
|
20
24
|
};
|
21
25
|
|
22
26
|
/** @private
|
@@ -276,8 +276,6 @@ declare class DataView extends EventDispatcher {
|
|
276
276
|
|
277
277
|
public sortSegments(compare: ((...params: any[]) => any)|null): void;
|
278
278
|
|
279
|
-
public enableEmptySegmentFiltering(enabled?: boolean|null): void;
|
280
|
-
|
281
279
|
public setSegmentClassification(segmentRef: string|number|null, fields: string|(string)[]|null): boolean;
|
282
280
|
|
283
281
|
public getWrapSize(): number;
|
@@ -405,6 +405,10 @@ declare class Core extends ElementWrapper {
|
|
405
405
|
|
406
406
|
public getColumnGroupChildIds(groupId: string): (string)[]|null;
|
407
407
|
|
408
|
+
public getValidColumnList(colIds: (string)[]|null, columnMap?: any): (string)[];
|
409
|
+
|
410
|
+
public createColumnMap(colIds?: (string)[]|null): any;
|
411
|
+
|
408
412
|
public startBatch(batchType: string): boolean;
|
409
413
|
|
410
414
|
public stopBatch(batchType: string): boolean;
|
package/lib/versions.json
CHANGED
package/package.json
CHANGED