@refinitiv-ui/efx-grid 6.0.116 → 6.0.118
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 +214 -42
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +9 -2
- package/lib/grid/index.js +1 -1
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/row-segmenting/es6/RowSegmenting.js +74 -29
- package/lib/rt-grid/dist/rt-grid.js +324 -141
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +5 -2
- package/lib/rt-grid/es6/DataConnector.d.ts +2 -0
- package/lib/rt-grid/es6/DataConnector.js +8 -0
- package/lib/rt-grid/es6/Grid.d.ts +4 -0
- package/lib/rt-grid/es6/Grid.js +39 -1
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +2 -0
- package/lib/rt-grid/es6/ReferenceCounter.js +10 -0
- package/lib/rt-grid/es6/RowDefinition.js +28 -34
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +1 -0
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +200 -26
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +11 -0
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +1 -1
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +13 -8
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +3 -1
- package/lib/tr-grid-contextmenu/es6/MenuItem.js +75 -35
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +5 -1
- package/lib/tr-grid-contextmenu/es6/PopupMenu.js +70 -59
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +3 -0
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +115 -28
- package/lib/tr-grid-util/es6/GroupDefinitions.js +1 -1
- package/lib/types/es6/InCellEditing.d.ts +3 -0
- package/lib/types/es6/MenuEventAPI.d.ts +1 -1
- package/lib/types/es6/MenuItem.d.ts +3 -1
- package/lib/types/es6/PopupMenu.d.ts +5 -1
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +4 -0
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +2 -0
- package/lib/versions.json +5 -5
- package/package.json +2 -2
@@ -308,6 +308,17 @@ ContextMenuPlugin.prototype.getMenuModel = function () {
|
|
308
308
|
return this._contextMenu;
|
309
309
|
};
|
310
310
|
|
311
|
+
/** @public
|
312
|
+
* @ignore
|
313
|
+
* @returns {Object}
|
314
|
+
*/
|
315
|
+
ContextMenuPlugin.prototype._getEventHandlers = function() {
|
316
|
+
return {
|
317
|
+
contextmenu: this._rightClickedHandler
|
318
|
+
};
|
319
|
+
};
|
320
|
+
|
321
|
+
|
311
322
|
/** @private
|
312
323
|
* @param {Object} e
|
313
324
|
* @return {!Object} Mouse related information
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* @param {Array} legacyColumnGroups
|
8
8
|
*/
|
9
9
|
let MenuEventAPI = function (menuModel) {
|
10
|
-
this._model = menuModel;
|
10
|
+
this._model = menuModel || null; // for mapping string value
|
11
11
|
this._items = [];
|
12
12
|
this._runningId = 0;
|
13
13
|
};
|
@@ -48,8 +48,10 @@ MenuEventAPI.prototype._addItem = function (item, level) {
|
|
48
48
|
if (typeof item === "string") { // The item is referencing another item
|
49
49
|
if (item === "SEPARATOR" || item.match(/-{3,}/)) { // Special keyword
|
50
50
|
this.addSeparator();
|
51
|
-
} else {
|
52
|
-
|
51
|
+
} else if(this._model) {
|
52
|
+
if(this._model.items) {
|
53
|
+
this._addItem(this._model.items[item], level + 1);
|
54
|
+
}
|
53
55
|
}
|
54
56
|
} else if (Array.isArray(item)) { // The item is an item list
|
55
57
|
let len = item.length;
|
@@ -67,7 +69,8 @@ MenuEventAPI.prototype.addSeparator = function () {
|
|
67
69
|
this._items.push({ type: "separator" });
|
68
70
|
};
|
69
71
|
|
70
|
-
/**
|
72
|
+
/** Get immidiate child menu items
|
73
|
+
* @public
|
71
74
|
* @returns {Array}
|
72
75
|
*/
|
73
76
|
MenuEventAPI.prototype.getMenuItems = function () {
|
@@ -76,7 +79,7 @@ MenuEventAPI.prototype.getMenuItems = function () {
|
|
76
79
|
|
77
80
|
/** @public
|
78
81
|
* @param {number} id
|
79
|
-
* @returns {Array
|
82
|
+
* @returns {Array} Array of items (ordered by leaf node to root node)
|
80
83
|
*/
|
81
84
|
MenuEventAPI.prototype.findItem = function (id) { // For internal use
|
82
85
|
return this._findItem(id, this._items);
|
@@ -85,13 +88,15 @@ MenuEventAPI.prototype.findItem = function (id) { // For internal use
|
|
85
88
|
/** @private
|
86
89
|
* @param {number} id
|
87
90
|
* @param {Array.<string> | Object} item
|
88
|
-
* @returns {
|
91
|
+
* @returns {Array}
|
89
92
|
*/
|
90
93
|
MenuEventAPI.prototype._findItem = function (id, item) {
|
91
|
-
let foundItemPath;
|
92
94
|
if (!item) {
|
93
95
|
return null;
|
94
|
-
}
|
96
|
+
}
|
97
|
+
|
98
|
+
let foundItemPath;
|
99
|
+
if (Array.isArray(item)) {
|
95
100
|
let len = item.length;
|
96
101
|
for (let i = 0; i < len; ++i) {
|
97
102
|
foundItemPath = this._findItem(id, item[i]);
|
@@ -3,7 +3,7 @@ import Ext from "../../tr-grid-util/es6/Ext.js";
|
|
3
3
|
|
4
4
|
declare class MenuItem extends EventDispatcher {
|
5
5
|
|
6
|
-
constructor(options
|
6
|
+
constructor(options?: any);
|
7
7
|
|
8
8
|
public dispose(): void;
|
9
9
|
|
@@ -33,6 +33,8 @@ declare class MenuItem extends EventDispatcher {
|
|
33
33
|
|
34
34
|
public getElement(): Element|null;
|
35
35
|
|
36
|
+
public getOptions(): any;
|
37
|
+
|
36
38
|
}
|
37
39
|
|
38
40
|
export default MenuItem;
|
@@ -3,7 +3,7 @@ import Ext from "../../tr-grid-util/es6/Ext.js";
|
|
3
3
|
|
4
4
|
/** @constructor
|
5
5
|
* @extends {EventDispatcher}
|
6
|
-
* @param {Object} options
|
6
|
+
* @param {Object=} options
|
7
7
|
*/
|
8
8
|
let MenuItem = function (options) {
|
9
9
|
let t = this;
|
@@ -11,7 +11,12 @@ let MenuItem = function (options) {
|
|
11
11
|
t._onItemHovered = t._onItemHovered.bind(t);
|
12
12
|
t._onItemClicked = t._onItemClicked.bind(t);
|
13
13
|
|
14
|
-
|
14
|
+
let li = document.createElement("li");
|
15
|
+
li.className = "tr-contextmenu-item";
|
16
|
+
li.addEventListener("mouseover", t._onItemHovered);
|
17
|
+
li.addEventListener("click", t._onItemClicked);
|
18
|
+
t._elem = li;
|
19
|
+
|
15
20
|
t._config(options);
|
16
21
|
};
|
17
22
|
Ext.inherits(MenuItem, EventDispatcher);
|
@@ -23,25 +28,31 @@ MenuItem.prototype._elem;
|
|
23
28
|
/** @type {Object}
|
24
29
|
* @private
|
25
30
|
*/
|
26
|
-
MenuItem.prototype._options;
|
31
|
+
MenuItem.prototype._options = null;
|
27
32
|
/** @type {boolean}
|
28
33
|
* @private
|
29
34
|
*/
|
30
35
|
MenuItem.prototype._isSelectable = true;
|
31
|
-
|
32
|
-
|
33
|
-
* @param {Object} options
|
36
|
+
/** @type {string}
|
37
|
+
* @private
|
34
38
|
*/
|
35
|
-
MenuItem.prototype.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
39
|
+
MenuItem.prototype._id = "";
|
40
|
+
/** @type {string}
|
41
|
+
* @private
|
42
|
+
*/
|
43
|
+
MenuItem.prototype._type = "";
|
44
|
+
/** @type {string}
|
45
|
+
* @private
|
46
|
+
*/
|
47
|
+
MenuItem.prototype._text = "";
|
48
|
+
/** @type {*}
|
49
|
+
* @private
|
50
|
+
*/
|
51
|
+
MenuItem.prototype._value = null;
|
52
|
+
/** @type {Array}
|
53
|
+
* @private
|
54
|
+
*/
|
55
|
+
MenuItem.prototype._items = null;
|
45
56
|
|
46
57
|
/** @public */
|
47
58
|
MenuItem.prototype.dispose = function() {
|
@@ -49,40 +60,46 @@ MenuItem.prototype.dispose = function() {
|
|
49
60
|
t.removeAllEventListeners();
|
50
61
|
t._elem.removeEventListener("mouseover", t._onItemHovered);
|
51
62
|
t._elem.removeEventListener("click", t._onItemClicked);
|
52
|
-
|
63
|
+
|
64
|
+
let pn = t._elem.parentNode;
|
65
|
+
if(pn) {
|
66
|
+
pn.removeChild(t._elem);
|
67
|
+
}
|
68
|
+
t._elem = t._options = t._value = t._items = null;
|
53
69
|
};
|
54
70
|
|
55
71
|
/** @private
|
56
|
-
* @param {
|
72
|
+
* @param {*=} options
|
57
73
|
*/
|
58
|
-
MenuItem.prototype._config = function(
|
59
|
-
if (!
|
60
|
-
|
61
|
-
|
74
|
+
MenuItem.prototype._config = function(options) {
|
75
|
+
if (!options) {
|
76
|
+
options = {};
|
77
|
+
}
|
62
78
|
|
63
79
|
let t = this;
|
80
|
+
t._options = options;
|
64
81
|
|
65
|
-
pref =
|
82
|
+
let pref = options["id"];
|
66
83
|
if (pref) {
|
67
84
|
t.setId(pref);
|
68
85
|
}
|
69
86
|
|
70
|
-
pref =
|
87
|
+
pref = options["type"];
|
71
88
|
if (pref) {
|
72
89
|
t.setType(pref);
|
73
90
|
}
|
74
91
|
|
75
|
-
pref =
|
92
|
+
pref = options["text"];
|
76
93
|
if (pref) {
|
77
94
|
t.setText(pref);
|
78
95
|
}
|
79
96
|
|
80
|
-
pref =
|
81
|
-
if (pref) {
|
97
|
+
pref = options["value"];
|
98
|
+
if (pref != null) {
|
82
99
|
t.setValue(pref);
|
83
100
|
}
|
84
101
|
|
85
|
-
pref =
|
102
|
+
pref = options["isDisabled"];
|
86
103
|
if (pref != null) {
|
87
104
|
if (pref === true) {
|
88
105
|
t.setSelectable(false);
|
@@ -91,7 +108,7 @@ MenuItem.prototype._config = function(opt_model) {
|
|
91
108
|
}
|
92
109
|
}
|
93
110
|
|
94
|
-
pref =
|
111
|
+
pref = options["isSelectable"];
|
95
112
|
if (pref != null) {
|
96
113
|
if (pref === false) {
|
97
114
|
t.setSelectable(false);
|
@@ -100,7 +117,7 @@ MenuItem.prototype._config = function(opt_model) {
|
|
100
117
|
}
|
101
118
|
}
|
102
119
|
|
103
|
-
pref =
|
120
|
+
pref = options["items"];
|
104
121
|
if (Array.isArray(pref)) {
|
105
122
|
t.setItems(pref);
|
106
123
|
}
|
@@ -133,6 +150,17 @@ MenuItem.prototype._onItemClicked = function(e) {
|
|
133
150
|
t._dispatch("itemClicked", e);
|
134
151
|
};
|
135
152
|
|
153
|
+
/** @public
|
154
|
+
* @ignore
|
155
|
+
* @returns {Object}
|
156
|
+
*/
|
157
|
+
MenuItem.prototype._getEventHandlers = function() {
|
158
|
+
return {
|
159
|
+
mouseover: this._onItemHovered,
|
160
|
+
click: this._onItemClicked
|
161
|
+
};
|
162
|
+
};
|
163
|
+
|
136
164
|
/** @public
|
137
165
|
* @param {*} id
|
138
166
|
*/
|
@@ -146,7 +174,7 @@ MenuItem.prototype.setId = function(id) {
|
|
146
174
|
* @returns {*}
|
147
175
|
*/
|
148
176
|
MenuItem.prototype.getId = function() {
|
149
|
-
return this._id;
|
177
|
+
return this._id || "";
|
150
178
|
};
|
151
179
|
|
152
180
|
/** @public
|
@@ -162,7 +190,7 @@ MenuItem.prototype.setText = function(text) {
|
|
162
190
|
* @returns {string}
|
163
191
|
*/
|
164
192
|
MenuItem.prototype.getText = function() {
|
165
|
-
return this._text;
|
193
|
+
return this._text || "";
|
166
194
|
};
|
167
195
|
|
168
196
|
/** @public
|
@@ -206,8 +234,13 @@ MenuItem.prototype.isSelectable = function() {
|
|
206
234
|
*/
|
207
235
|
MenuItem.prototype.setItems = function(items) {
|
208
236
|
let t = this;
|
209
|
-
|
210
|
-
|
237
|
+
if(Array.isArray(items)) {
|
238
|
+
t._items = items;
|
239
|
+
t._elem.classList.add("has-child");
|
240
|
+
} else {
|
241
|
+
t._items = null;
|
242
|
+
t._elem.classList.remove("has-child");
|
243
|
+
}
|
211
244
|
};
|
212
245
|
|
213
246
|
/** @public
|
@@ -229,7 +262,7 @@ MenuItem.prototype.setType = function(type) {
|
|
229
262
|
* @returns {string}
|
230
263
|
*/
|
231
264
|
MenuItem.prototype.getType = function() {
|
232
|
-
return this._type;
|
265
|
+
return this._type || "";
|
233
266
|
};
|
234
267
|
|
235
268
|
/** @public
|
@@ -239,6 +272,13 @@ MenuItem.prototype.getElement = function() {
|
|
239
272
|
return this._elem;
|
240
273
|
};
|
241
274
|
|
275
|
+
/** @public
|
276
|
+
* @returns {Object}
|
277
|
+
*/
|
278
|
+
MenuItem.prototype.getOptions = function() {
|
279
|
+
return this._options;
|
280
|
+
};
|
281
|
+
|
242
282
|
|
243
283
|
|
244
284
|
export default MenuItem;
|
@@ -21,7 +21,11 @@ declare class PopupMenu extends EventDispatcher {
|
|
21
21
|
|
22
22
|
public addPopupChild(element: Element|null, popupMenu: PopupMenu|null): void;
|
23
23
|
|
24
|
-
public setMenu(
|
24
|
+
public setMenu(menuOptions: (any)[]|null): void;
|
25
|
+
|
26
|
+
public getMenuItems(): (MenuItem)[]|null;
|
27
|
+
|
28
|
+
public getChildPopups(): (PopupMenu)[]|null;
|
25
29
|
|
26
30
|
}
|
27
31
|
|
@@ -30,11 +30,11 @@ PopupMenu.prototype._evtArg;
|
|
30
30
|
/** @type {Array.<PopupMenu>}
|
31
31
|
* @private
|
32
32
|
*/
|
33
|
-
PopupMenu.prototype.
|
33
|
+
PopupMenu.prototype._nestedPopups;
|
34
34
|
/** @type {Array.<MenuItem>}
|
35
35
|
* @private
|
36
36
|
*/
|
37
|
-
PopupMenu.prototype.
|
37
|
+
PopupMenu.prototype._menuItems;
|
38
38
|
/** @type {Element}
|
39
39
|
* @private
|
40
40
|
*/
|
@@ -59,6 +59,10 @@ PopupMenu.prototype._ulElem;
|
|
59
59
|
* @private
|
60
60
|
*/
|
61
61
|
PopupMenu.prototype._isMounted;
|
62
|
+
/** @type {string}
|
63
|
+
* @private
|
64
|
+
*/
|
65
|
+
PopupMenu.prototype._id = "";
|
62
66
|
|
63
67
|
/** @private
|
64
68
|
* @param {Element} parentElement
|
@@ -76,8 +80,8 @@ PopupMenu.prototype._init = function(parentElement) {
|
|
76
80
|
t._popup.setPositioning("custom");
|
77
81
|
t._ulElem = ul;
|
78
82
|
|
79
|
-
t.
|
80
|
-
t.
|
83
|
+
t._nestedPopups = [];
|
84
|
+
t._menuItems = [];
|
81
85
|
t._x = 0;
|
82
86
|
t._y = 0;
|
83
87
|
t._isMounted = true;
|
@@ -107,21 +111,24 @@ PopupMenu.prototype.dispose = function () {
|
|
107
111
|
}
|
108
112
|
};
|
109
113
|
|
110
|
-
/** @private
|
114
|
+
/** @private
|
115
|
+
* @function
|
116
|
+
* @param {*} obj
|
117
|
+
*/
|
118
|
+
let _disposeObject = function(obj) {
|
119
|
+
if(obj) {
|
120
|
+
obj.dispose();
|
121
|
+
}
|
122
|
+
};
|
123
|
+
|
124
|
+
/** @private
|
125
|
+
*/
|
111
126
|
PopupMenu.prototype._disposeChildren = function () {
|
112
127
|
let t = this;
|
113
|
-
t.
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
});
|
118
|
-
t._childrenItem.forEach(function (child) {
|
119
|
-
if (child) {
|
120
|
-
child.dispose();
|
121
|
-
}
|
122
|
-
});
|
123
|
-
t._children.length = 0;
|
124
|
-
t._childrenItem.length = 0;
|
128
|
+
t._nestedPopups.forEach(_disposeObject);
|
129
|
+
t._menuItems.forEach(_disposeObject);
|
130
|
+
t._nestedPopups.length = 0;
|
131
|
+
t._menuItems.length = 0;
|
125
132
|
};
|
126
133
|
|
127
134
|
/** @public */
|
@@ -162,9 +169,11 @@ PopupMenu.prototype.setPosition = function(positioning, x, y) {
|
|
162
169
|
let sx = (window.scrollX != null) ? window.scrollX : window.pageXOffset;
|
163
170
|
let sy = (window.scrollY != null) ? window.scrollY : window.pageYOffset;
|
164
171
|
let rb = ww + sx; // view port right bound
|
165
|
-
let bb = wh + sy; // view port bottom
|
166
|
-
|
167
|
-
let
|
172
|
+
let bb = wh + sy; // view port bottom bound
|
173
|
+
|
174
|
+
let popupElem = t._popup.getElement();
|
175
|
+
let aw = popupElem.offsetWidth;
|
176
|
+
let ah = popupElem.offsetHeight;
|
168
177
|
|
169
178
|
if (x + aw > rb) { // Do not overflow right bound
|
170
179
|
x = rb - aw;
|
@@ -173,8 +182,8 @@ PopupMenu.prototype.setPosition = function(positioning, x, y) {
|
|
173
182
|
y = bb - ah;
|
174
183
|
}
|
175
184
|
|
176
|
-
|
177
|
-
|
185
|
+
popupElem.style.left = (x - sx) + "px"; // Due to fixed position we have to subtract window scrolling
|
186
|
+
popupElem.style.top = (y - sy) + "px";
|
178
187
|
}
|
179
188
|
};
|
180
189
|
|
@@ -186,32 +195,30 @@ PopupMenu.prototype.addPopupChild = function(element, popupMenu) {
|
|
186
195
|
if (popupMenu instanceof PopupMenu) {
|
187
196
|
popupMenu.attachTo(element, "right");
|
188
197
|
this._popup.addFocusElement(popupMenu._popup);
|
189
|
-
this.
|
198
|
+
this._nestedPopups.push(popupMenu);
|
190
199
|
}
|
191
200
|
};
|
192
201
|
|
193
202
|
/** @public
|
194
|
-
* @param {Array.<Object>}
|
203
|
+
* @param {Array.<Object>} menuOptions Array of MenuItem options
|
195
204
|
*/
|
196
|
-
PopupMenu.prototype.setMenu = function (
|
197
|
-
if (!menuItems || !Array.isArray(menuItems)) { return; }
|
198
|
-
|
205
|
+
PopupMenu.prototype.setMenu = function (menuOptions) {
|
199
206
|
let t = this;
|
200
207
|
|
201
|
-
// Clear existing before set a new items
|
202
|
-
if (
|
208
|
+
// Clear existing before set a new items
|
209
|
+
if (t._menuItems.length) {
|
203
210
|
t._disposeChildren();
|
204
211
|
}
|
205
212
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
let item = menuItems[i];
|
213
|
+
if (!menuOptions || !Array.isArray(menuOptions)) {
|
214
|
+
return;
|
215
|
+
}
|
210
216
|
|
211
|
-
|
217
|
+
for (let i = 0; i < menuOptions.length; i++) {
|
218
|
+
let menuItem = new MenuItem(menuOptions[i]);
|
212
219
|
menuItem.addEventListener("itemHovered", t._hoveredItem);
|
213
220
|
menuItem.addEventListener("itemClicked", t._clickedItem);
|
214
|
-
t.
|
221
|
+
t._menuItems.push(menuItem);
|
215
222
|
|
216
223
|
if (Array.isArray(menuItem.getItems())) {
|
217
224
|
let pm = new PopupMenu(t._parentElement);
|
@@ -225,22 +232,32 @@ PopupMenu.prototype.setMenu = function (menuItems) {
|
|
225
232
|
t._ulElem.appendChild(menuItem.getElement());
|
226
233
|
}
|
227
234
|
};
|
235
|
+
/** @public
|
236
|
+
* @returns {Array.<MenuItem>}
|
237
|
+
*/
|
238
|
+
PopupMenu.prototype.getMenuItems = function () {
|
239
|
+
return this._menuItems;
|
240
|
+
};
|
241
|
+
/** @public
|
242
|
+
* @returns {Array.<PopupMenu>}
|
243
|
+
*/
|
244
|
+
PopupMenu.prototype.getChildPopups = function () {
|
245
|
+
return this._nestedPopups;
|
246
|
+
};
|
228
247
|
|
229
248
|
/** @private
|
230
249
|
* @param {Event} e
|
231
250
|
*/
|
232
251
|
PopupMenu.prototype._hoveredChildItem = function (e) {
|
233
|
-
|
234
|
-
t._dispatch("itemHovered", e);
|
252
|
+
this._dispatch("itemHovered", e);
|
235
253
|
};
|
236
254
|
|
237
255
|
/** @private
|
238
256
|
* @param {Event} e
|
239
257
|
*/
|
240
258
|
PopupMenu.prototype._clickedChildItem = function (e) {
|
241
|
-
|
242
|
-
|
243
|
-
t.hide();
|
259
|
+
this._dispatch("itemClicked", e);
|
260
|
+
this.hide();
|
244
261
|
};
|
245
262
|
|
246
263
|
/** @private
|
@@ -249,18 +266,20 @@ PopupMenu.prototype._clickedChildItem = function (e) {
|
|
249
266
|
PopupMenu.prototype._hoveredItem = function (e) {
|
250
267
|
let t = this;
|
251
268
|
let evt = t._evtArg;
|
252
|
-
let
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
269
|
+
let elem = e.srcElement;
|
270
|
+
|
271
|
+
if (elem) {
|
272
|
+
let pms = t._nestedPopups;
|
273
|
+
let pmCount = pms.length;
|
274
|
+
let elemId = elem.getAttribute("id");
|
275
|
+
for (let i = 0; i < pmCount; i++) {
|
276
|
+
let pm = pms[i];
|
277
|
+
if (pm._id === elemId) {
|
278
|
+
pm.show();
|
260
279
|
} else {
|
261
|
-
|
280
|
+
pm.hide();
|
262
281
|
}
|
263
|
-
}
|
282
|
+
} // WARNING: evt or _evtArg is not customized to reflect the item that is hovered
|
264
283
|
} else {
|
265
284
|
evt = e;
|
266
285
|
}
|
@@ -273,15 +292,7 @@ PopupMenu.prototype._hoveredItem = function (e) {
|
|
273
292
|
*/
|
274
293
|
PopupMenu.prototype._clickedItem = function(e) {
|
275
294
|
let t = this;
|
276
|
-
|
277
|
-
for (let i = 0; i < t._menuItems.length; i++) {
|
278
|
-
let menuItem = t._menuItems[i];
|
279
|
-
if (menuItem.id === e.item.id) {
|
280
|
-
t._evtArg["item"] = menuItem;
|
281
|
-
break;
|
282
|
-
}
|
283
|
-
}
|
284
|
-
}
|
295
|
+
t._evtArg["item"] = e["item"];
|
285
296
|
t._dispatch("itemClicked", t._evtArg);
|
286
297
|
t.hide();
|
287
298
|
};
|
@@ -6,6 +6,7 @@ import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
|
6
6
|
import { isTouchDevice, injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
7
7
|
import { ElfDate } from "../../tr-grid-util/es6/ElfDate.js";
|
8
8
|
import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
|
9
|
+
import { Conflator } from "../../tr-grid-util/es6/Conflator.js";
|
9
10
|
|
10
11
|
declare namespace InCellEditingPlugin {
|
11
12
|
|
@@ -85,6 +86,8 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
85
86
|
|
86
87
|
public showStarterText(bool?: boolean|null): void;
|
87
88
|
|
89
|
+
public _requestUpdateStarterText(): void;
|
90
|
+
|
88
91
|
public isEditing(): boolean;
|
89
92
|
|
90
93
|
public getTextBox(columnIndex?: number|null, grid?: any): Element|null;
|