@refinitiv-ui/efx-grid 6.0.39 → 6.0.40
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +15 -3
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +10 -1
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +5 -2
- package/lib/grid/index.js +1 -1
- package/lib/row-segmenting/es6/RowSegmenting.js +4 -4
- package/lib/rt-grid/dist/rt-grid.js +168 -87
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +1 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +7 -8
- package/lib/rt-grid/es6/Grid.d.ts +2 -0
- package/lib/rt-grid/es6/Grid.js +43 -30
- package/lib/rt-grid/es6/RowDefinition.d.ts +3 -4
- package/lib/rt-grid/es6/RowDefinition.js +72 -40
- package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +27 -27
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +97 -93
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +3 -3
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +2 -2
- package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +5 -5
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +30 -12
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +2 -1
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +50 -18
- package/lib/types/es6/ContextMenu.d.ts +27 -27
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +3 -0
- package/lib/types/es6/MenuEventAPI.d.ts +3 -3
- package/lib/types/es6/MenuItem.d.ts +2 -2
- package/lib/types/es6/PopupMenu.d.ts +5 -5
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +1 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +3 -4
- package/lib/versions.json +8 -8
- package/package.json +1 -1
@@ -154,11 +154,13 @@ ContextMenuPlugin.prototype.initialize = function (host, options) {
|
|
154
154
|
|
155
155
|
t.config(options);
|
156
156
|
|
157
|
-
if(ContextMenuPlugin.
|
157
|
+
if(ContextMenuPlugin._styles) { // Theme has been loaded
|
158
158
|
ContextMenuPlugin._applyThemeColor(host);
|
159
|
-
} else {
|
160
|
-
ContextMenuPlugin._stylePromise
|
161
|
-
|
159
|
+
} else { // Theme has NOT been loaded. Wait for the theme to be loaded
|
160
|
+
if(!ContextMenuPlugin._stylePromise) {
|
161
|
+
ContextMenuPlugin._stylePromise = ElfUtil.getThemeColors();
|
162
|
+
}
|
163
|
+
ContextMenuPlugin._stylePromise.then(t._onThemeLoaded).catch(t._onThemeLoaded);
|
162
164
|
}
|
163
165
|
};
|
164
166
|
|
@@ -357,96 +359,98 @@ ContextMenuPlugin.prototype._onItemClicked = function (e) {
|
|
357
359
|
/** @private
|
358
360
|
*/
|
359
361
|
ContextMenuPlugin.prototype._onThemeLoaded = function () {
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
"
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
"
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
"
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
"
|
392
|
-
|
393
|
-
|
394
|
-
"
|
395
|
-
|
396
|
-
|
397
|
-
"
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
"
|
402
|
-
|
403
|
-
|
404
|
-
"
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
"
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
362
|
+
if(!ContextMenuPlugin._styles) { // Theme can be loaded only once
|
363
|
+
var colors = ElfUtil.getColors();
|
364
|
+
var css = prettifyCss([
|
365
|
+
".tr-contextmenu", [
|
366
|
+
"outline: none;",
|
367
|
+
"box-sizing: border-box;",
|
368
|
+
"-moz-box-sizing: border-box;",
|
369
|
+
"border-style: solid;",
|
370
|
+
"border-width: 1px;",
|
371
|
+
"overflow: hidden;",
|
372
|
+
"padding: 1px;",
|
373
|
+
"margin: 0;",
|
374
|
+
"user-select: none;",
|
375
|
+
"list-style-type: none;",
|
376
|
+
"background-color: backgroundColor;",
|
377
|
+
"color: fontColor;",
|
378
|
+
"border-color: borderColor;"
|
379
|
+
],
|
380
|
+
".tr-contextmenu-item", [
|
381
|
+
"list-style: none;",
|
382
|
+
"padding: 3px 7px;",
|
383
|
+
"margin: 0;",
|
384
|
+
"vertical-align: middle;",
|
385
|
+
"white-space: nowrap;",
|
386
|
+
"cursor: pointer;",
|
387
|
+
"line-height: 20px;"
|
388
|
+
],
|
389
|
+
".tr-contextmenu-item[disabled]", [
|
390
|
+
"color: disabledColor;",
|
391
|
+
"cursor: default;"
|
392
|
+
],
|
393
|
+
".tr-contextmenu-item", [
|
394
|
+
"padding-right: 20px;"
|
395
|
+
],
|
396
|
+
".tr-contextmenu-item:hover:not([disabled])", [
|
397
|
+
"background-color: hoveredColor;"
|
398
|
+
],
|
399
|
+
".tr-contextmenu-popup", [
|
400
|
+
"box-shadow: 0 0 10px rgba(0,0,0,0.5);",
|
401
|
+
"z-index: 10;"
|
402
|
+
],
|
403
|
+
".tr-contextmenu-item.has-child", [
|
404
|
+
"position: relative;"
|
405
|
+
],
|
406
|
+
".tr-contextmenu-item.has-child:after", [
|
407
|
+
"box-sizing: border-box;",
|
408
|
+
"-moz-box-sizing: border-box;",
|
409
|
+
"display: inline-block;",
|
410
|
+
"width: 7px;",
|
411
|
+
"height: 7px;",
|
412
|
+
"border-style: solid;",
|
413
|
+
"border-width: 1px;",
|
414
|
+
"content: \"\";",
|
415
|
+
"-webkit-transform: rotate(45deg);",
|
416
|
+
"transform: rotate(45deg);",
|
417
|
+
"border-left-width: 0;",
|
418
|
+
"border-bottom-width: 0;",
|
419
|
+
"position: absolute;",
|
420
|
+
"right: 8px;",
|
421
|
+
"top: -webkit-calc(50% - 4px);",
|
422
|
+
"top: -moz-calc(50% - 4px);",
|
423
|
+
"top: calc(50% - 4px);",
|
424
|
+
"border-color: fontColor;"
|
425
|
+
],
|
426
|
+
".tr-contextmenu-item[data-type=\"separator\"]", [
|
427
|
+
"padding: 0;",
|
428
|
+
"border: none;",
|
429
|
+
"border-bottom-style: solid;",
|
430
|
+
"border-bottom-width: 1px;",
|
431
|
+
"border-bottom-color: disabledColor;"
|
432
|
+
]
|
433
|
+
]);
|
434
|
+
|
435
|
+
var hex = CellPainter.rgb2Hex(colors.tableBg);
|
436
|
+
var triplet = CellPainter.hex2Num(hex);
|
437
|
+
var bw = CellPainter.blackAndWhite(triplet);
|
438
|
+
var blendRatio;
|
439
|
+
if (bw === "#000000") { // Light theme
|
440
|
+
blendRatio = 0.1;
|
441
|
+
css = css.replace(/disabledColor/g, "lightgrey");
|
442
|
+
} else { // Dark theme
|
443
|
+
blendRatio = 0.2;
|
444
|
+
css = css.replace(/disabledColor/g, "gray");
|
445
|
+
}
|
446
|
+
var hoverd = CellPainter.num2Hex(CellPainter.blendColor(hex, bw, blendRatio));
|
447
|
+
css = css.replace(/hoveredColor/g, hoverd);
|
448
|
+
css = css.replace(/backgroundColor/g, colors.tableBg);
|
449
|
+
css = css.replace(/fontColor/g, colors.tableText);
|
450
|
+
css = css.replace(/borderColor/g, colors.tableBorder);
|
448
451
|
|
449
|
-
|
452
|
+
ContextMenuPlugin._styles = css;
|
453
|
+
}
|
450
454
|
|
451
455
|
for(var i = this._hosts.length; --i >= 0;) {
|
452
456
|
ContextMenuPlugin._applyThemeColor(this._hosts[i]);
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
declare class MenuEventAPI {
|
4
4
|
|
5
|
-
constructor(menuModel: any, columns: any[], columnGroups: any[], legacyColumnGroups: any[]);
|
5
|
+
constructor(menuModel: any, columns: any[]|null, columnGroups: any[]|null, legacyColumnGroups: any[]|null);
|
6
6
|
|
7
7
|
public clear(): void;
|
8
8
|
|
9
|
-
public addItem(item: (string)[] | any | string): void;
|
9
|
+
public addItem(item: (string)[] | any | string|null): void;
|
10
10
|
|
11
|
-
public addItems(item: (string)[] | any | string): void;
|
11
|
+
public addItems(item: (string)[] | any | string|null): void;
|
12
12
|
|
13
13
|
public addSeparator(): void;
|
14
14
|
|
@@ -19,11 +19,11 @@ declare class MenuItem extends EventDispatcher {
|
|
19
19
|
|
20
20
|
public getValue(): any;
|
21
21
|
|
22
|
-
public setSelectable(selectable?: boolean): void;
|
22
|
+
public setSelectable(selectable?: boolean|null): void;
|
23
23
|
|
24
24
|
public isSelectable(): boolean;
|
25
25
|
|
26
|
-
public setItems(items: any[]): void;
|
26
|
+
public setItems(items: any[]|null): void;
|
27
27
|
|
28
28
|
public getItems(): any[]|null;
|
29
29
|
|
@@ -5,7 +5,7 @@ import Ext from "../../tr-grid-util/es6/Ext.js";
|
|
5
5
|
|
6
6
|
declare class PopupMenu extends EventDispatcher {
|
7
7
|
|
8
|
-
constructor(parentElement: Element);
|
8
|
+
constructor(parentElement: Element|null);
|
9
9
|
|
10
10
|
public isDisposed(): boolean;
|
11
11
|
|
@@ -15,13 +15,13 @@ declare class PopupMenu extends EventDispatcher {
|
|
15
15
|
|
16
16
|
public hide(): void;
|
17
17
|
|
18
|
-
public attachTo(elem: Element, positioning: Popup.Positioning): void;
|
18
|
+
public attachTo(elem: Element|null, positioning: Popup.Positioning|null): void;
|
19
19
|
|
20
|
-
public setPosition(positioning: Popup.Positioning, x: number, y: number): void;
|
20
|
+
public setPosition(positioning: Popup.Positioning|null, x: number, y: number): void;
|
21
21
|
|
22
|
-
public addPopupChild(element: Element, popupMenu: PopupMenu): void;
|
22
|
+
public addPopupChild(element: Element|null, popupMenu: PopupMenu|null): void;
|
23
23
|
|
24
|
-
public setMenu(menuItems: (any)[]): void;
|
24
|
+
public setMenu(menuItems: (any)[]|null): void;
|
25
25
|
|
26
26
|
}
|
27
27
|
|
@@ -1590,20 +1590,38 @@ InCellEditingPlugin.prototype._commitText = function (committed, suggestionDetai
|
|
1590
1590
|
var sectionType = sectionSettings.getType();
|
1591
1591
|
// case edit content
|
1592
1592
|
if ("content" === sectionType) {
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1593
|
+
if (this._realTimeGrid && arg["field"] === "X_RIC_NAME") {
|
1594
|
+
var ricOpt = null;
|
1595
|
+
if (suggestionDetail) {
|
1596
|
+
var suggestionVal = suggestionDetail["value"];
|
1597
|
+
if (suggestionVal["p"]) {
|
1598
|
+
var permId = suggestionVal["p"]["PermId"];
|
1599
|
+
if (permId) {
|
1600
|
+
ricOpt = {
|
1601
|
+
permId: permId
|
1602
|
+
};
|
1603
|
+
}
|
1604
|
+
}
|
1605
|
+
}
|
1606
|
+
this._realTimeGrid.setRic(arg["rowId"], enteredValue, ricOpt);
|
1607
|
+
} else {
|
1608
|
+
var dv = sectionSettings.getDataSource();
|
1609
|
+
if (dv) {
|
1610
|
+
if (this._realTimeGrid) {
|
1611
|
+
t._setStaticData(dv, arg["rowIndex"], arg["field"], enteredValue);
|
1612
|
+
} else {
|
1613
|
+
t._setData(dv, arg["rowIndex"], arg["field"], enteredValue);
|
1614
|
+
}
|
1599
1615
|
}
|
1600
1616
|
}
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1617
|
+
if (!t._prevContent || t._prevContent.classList.contains("text")) {
|
1618
|
+
// Bind data only if previous content is a build in text
|
1619
|
+
t._activeCell.setContent(enteredValue);
|
1620
|
+
}
|
1621
|
+
} else if ("title" === sectionType) {
|
1622
|
+
var gridApi = this.getGridApi();
|
1623
|
+
if (gridApi) {
|
1624
|
+
gridApi.setColumnName(arg["colIndex"], enteredValue);
|
1607
1625
|
}
|
1608
1626
|
} else {
|
1609
1627
|
t._activeCell.setContent(enteredValue);
|
@@ -279,7 +279,8 @@ RowDraggingPlugin.prototype._jetContentHasField = false;
|
|
279
279
|
*/
|
280
280
|
RowDraggingPlugin.prototype._entryPoint = "";
|
281
281
|
|
282
|
-
/**
|
282
|
+
/** Applied theme color in row dragging and dragUI
|
283
|
+
* @private
|
283
284
|
* @param {Object} host core grid instance
|
284
285
|
*/
|
285
286
|
var _applyStyles = function(host) {
|
@@ -99,7 +99,7 @@ RowColoringPlugin.prototype.initialize = function (host, options) {
|
|
99
99
|
return;
|
100
100
|
}
|
101
101
|
this._hosts.push(host);
|
102
|
-
host.listen("
|
102
|
+
host.listen("postSectionDataBinding", this._onSectionBinding);
|
103
103
|
this.config(options);
|
104
104
|
this._updateTimer = setTimeout(this._updateRowColor, 100); // For lazy loading
|
105
105
|
};
|
@@ -111,7 +111,7 @@ RowColoringPlugin.prototype.unload = function (host) {
|
|
111
111
|
if (at < 0) {
|
112
112
|
return;
|
113
113
|
}
|
114
|
-
host.unlisten("
|
114
|
+
host.unlisten("postSectionDataBinding", this._onSectionBinding);
|
115
115
|
this._hosts.splice(at, 1);
|
116
116
|
if (!this._hosts.length) {
|
117
117
|
if (this._updateTimer) {
|
@@ -453,7 +453,7 @@ RowColoringPlugin.prototype._updateRowColor = function (fromR, toR) {
|
|
453
453
|
var cssField = this._cssField;
|
454
454
|
var altCssField = this._altCssField;
|
455
455
|
var rangeField = this._cssRangeField;
|
456
|
-
var className, el, start, end, altCssClass, range, colorSelected;
|
456
|
+
var className, el, start, end, altCssClass, range, colorSelected, stretchedCell;
|
457
457
|
for (r = fromR; r < toR; ++r) {
|
458
458
|
className = altCssClass = "";
|
459
459
|
start = end = range = null;
|
@@ -468,6 +468,20 @@ RowColoringPlugin.prototype._updateRowColor = function (fromR, toR) {
|
|
468
468
|
}
|
469
469
|
}
|
470
470
|
|
471
|
+
stretchedCell = section.getStretchedCell(null, r);
|
472
|
+
if (stretchedCell) {
|
473
|
+
el = stretchedCell.getElement();
|
474
|
+
if (el._coloringClass !== className) {
|
475
|
+
if (el._coloringClass) {
|
476
|
+
el.classList.remove(el._coloringClass);
|
477
|
+
el._coloringClass = "";
|
478
|
+
}
|
479
|
+
if (className) {
|
480
|
+
el.classList.add(className);
|
481
|
+
el._coloringClass = className;
|
482
|
+
}
|
483
|
+
}
|
484
|
+
}
|
471
485
|
for (c = 0; c < colCount; ++c) {
|
472
486
|
cell = section.getCell(c, r, false);
|
473
487
|
if (!cell) {
|
@@ -512,23 +526,41 @@ RowColoringPlugin.prototype._updateRowColor = function (fromR, toR) {
|
|
512
526
|
bgColor = rowData[this._bgField] || "";
|
513
527
|
}
|
514
528
|
}
|
529
|
+
stretchedCell = section.getStretchedCell(null, r);
|
530
|
+
if (stretchedCell) {
|
531
|
+
el = stretchedCell.getElement();
|
532
|
+
if (textColor || el._textColor) {
|
533
|
+
if (el._textColor !== textColor) {
|
534
|
+
stretchedCell.setStyle("color", textColor);
|
535
|
+
el._textColor = textColor;
|
536
|
+
}
|
537
|
+
}
|
538
|
+
if (bgColor || el._bgColor) {
|
539
|
+
if (el._bgColor !== bgColor) {
|
540
|
+
stretchedCell.setStyle("backgroundColor", bgColor);
|
541
|
+
el._bgColor = bgColor;
|
542
|
+
}
|
543
|
+
}
|
544
|
+
}
|
515
545
|
for (c = 0; c < colCount; ++c) {
|
516
546
|
cell = section.getCell(c, r, false);
|
517
|
-
if (cell) {
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
547
|
+
if (!cell) {
|
548
|
+
continue;
|
549
|
+
}
|
550
|
+
el = cell.getElement();
|
551
|
+
if (!el) {
|
552
|
+
continue;
|
553
|
+
}
|
554
|
+
if (textColor || el._textColor) {
|
555
|
+
if (el._textColor !== textColor) {
|
556
|
+
cell.setStyle("color", textColor);
|
557
|
+
el._textColor = textColor;
|
558
|
+
}
|
559
|
+
}
|
560
|
+
if (bgColor || el._bgColor) {
|
561
|
+
if (el._bgColor !== bgColor) {
|
562
|
+
cell.setStyle("backgroundColor", bgColor);
|
563
|
+
el._bgColor = bgColor;
|
532
564
|
}
|
533
565
|
}
|
534
566
|
}
|
@@ -8,39 +8,39 @@ import CellPainter from "../../tr-grid-util/es6/CellPainter.js";
|
|
8
8
|
|
9
9
|
declare namespace ContextMenuPlugin {
|
10
10
|
|
11
|
-
type MenuItemEventCallback = (e: ContextMenuPlugin.MenuItemEvent) => void;
|
11
|
+
type MenuItemEventCallback = (e: ContextMenuPlugin.MenuItemEvent|null) => void;
|
12
12
|
|
13
|
-
type OnMenuEventCallback = (e: ContextMenuPlugin.OnMenuEvent) => void;
|
13
|
+
type OnMenuEventCallback = (e: ContextMenuPlugin.OnMenuEvent|null) => void;
|
14
14
|
|
15
|
-
type Context = "header" | "content" | "footer" | "filterRow";
|
15
|
+
type Context = "header" | "content" | "footer" | "filterRow"|null;
|
16
16
|
|
17
17
|
type Options = {
|
18
|
-
items: { [key: string]: ContextMenuPlugin.MenuItem },
|
19
|
-
onMenu?: ContextMenuPlugin.OnMenuEventCallback,
|
20
|
-
contextmenu?: ((...params: any[]) => any)
|
18
|
+
items: { [key: string]: ContextMenuPlugin.MenuItem }|null,
|
19
|
+
onMenu?: ContextMenuPlugin.OnMenuEventCallback|null,
|
20
|
+
contextmenu?: ((...params: any[]) => any)|null
|
21
21
|
};
|
22
22
|
|
23
23
|
type MenuItem = {
|
24
|
-
text?: string,
|
25
|
-
value?: (string|number),
|
26
|
-
isDisabled?: boolean,
|
27
|
-
isVisible?: boolean,
|
28
|
-
isSeparator?: boolean,
|
29
|
-
items?: (ContextMenuPlugin.MenuItem)[],
|
30
|
-
renderer?: ((...params: any[]) => any),
|
31
|
-
callback?: ContextMenuPlugin.MenuItemEventCallback
|
24
|
+
text?: string|null,
|
25
|
+
value?: (string|number)|null,
|
26
|
+
isDisabled?: boolean|null,
|
27
|
+
isVisible?: boolean|null,
|
28
|
+
isSeparator?: boolean|null,
|
29
|
+
items?: (ContextMenuPlugin.MenuItem)[]|null,
|
30
|
+
renderer?: ((...params: any[]) => any)|null,
|
31
|
+
callback?: ContextMenuPlugin.MenuItemEventCallback|null
|
32
32
|
};
|
33
33
|
|
34
34
|
type MenuItemEvent = {
|
35
35
|
altKey: boolean,
|
36
36
|
cell: any,
|
37
37
|
colIndex: number,
|
38
|
-
columnDef: object,
|
39
|
-
context: ContextMenuPlugin.Context,
|
38
|
+
columnDef: object|null,
|
39
|
+
context: ContextMenuPlugin.Context|null,
|
40
40
|
ctrlKey: boolean,
|
41
|
-
item: ContextMenuPlugin.MenuItem,
|
42
|
-
items: { [key: string]: ContextMenuPlugin.MenuItem },
|
43
|
-
menu: MenuEventAPI,
|
41
|
+
item: ContextMenuPlugin.MenuItem|null,
|
42
|
+
items: { [key: string]: ContextMenuPlugin.MenuItem }|null,
|
43
|
+
menu: MenuEventAPI|null,
|
44
44
|
rowIndex: number,
|
45
45
|
section: any,
|
46
46
|
shiftKey: boolean
|
@@ -49,21 +49,21 @@ declare namespace ContextMenuPlugin {
|
|
49
49
|
type OnMenuEvent = {
|
50
50
|
cell: any,
|
51
51
|
colIndex: number,
|
52
|
-
columnDef: object,
|
53
|
-
context: ContextMenuPlugin.Context,
|
54
|
-
items: object,
|
55
|
-
menu: MenuEventAPI,
|
52
|
+
columnDef: object|null,
|
53
|
+
context: ContextMenuPlugin.Context|null,
|
54
|
+
items: object|null,
|
55
|
+
menu: MenuEventAPI|null,
|
56
56
|
rowIndex: number,
|
57
57
|
section: any,
|
58
|
-
selectedColumns: (number)[],
|
59
|
-
selectedRows: (number)[]
|
58
|
+
selectedColumns: (number)[]|null,
|
59
|
+
selectedRows: (number)[]|null
|
60
60
|
};
|
61
61
|
|
62
62
|
}
|
63
63
|
|
64
64
|
declare class ContextMenuPlugin extends GridPlugin {
|
65
65
|
|
66
|
-
constructor(options?: (ContextMenuPlugin.Options|ContextMenuPlugin.OnMenuEvent));
|
66
|
+
constructor(options?: (ContextMenuPlugin.Options|ContextMenuPlugin.OnMenuEvent)|null);
|
67
67
|
|
68
68
|
public getName(): string;
|
69
69
|
|
@@ -71,7 +71,7 @@ declare class ContextMenuPlugin extends GridPlugin {
|
|
71
71
|
|
72
72
|
public unload(host: any): void;
|
73
73
|
|
74
|
-
public config(options?: ContextMenuPlugin.Options): void;
|
74
|
+
public config(options?: ContextMenuPlugin.Options|null): void;
|
75
75
|
|
76
76
|
public getConfigObject(gridOptions?: any): any;
|
77
77
|
|
@@ -12,6 +12,7 @@ declare namespace SortableTitlePlugin {
|
|
12
12
|
|
13
13
|
type InitialSort = {
|
14
14
|
colIndex: number,
|
15
|
+
field: string,
|
15
16
|
sortOrder?: SortableTitlePlugin.SortOrder|null,
|
16
17
|
order?: SortableTitlePlugin.SortOrder|null
|
17
18
|
};
|
@@ -19,6 +20,8 @@ declare namespace SortableTitlePlugin {
|
|
19
20
|
type ColumnOptions = {
|
20
21
|
sortable?: boolean|null,
|
21
22
|
sortBy?: string|null,
|
23
|
+
sort?: string|null,
|
24
|
+
sortOrder?: string|null,
|
22
25
|
sortLogic?: DataTable.SortLogic|null,
|
23
26
|
sortingLogic?: DataTable.SortLogic|null,
|
24
27
|
sorter?: DataTable.SortLogic|null,
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
declare class MenuEventAPI {
|
4
4
|
|
5
|
-
constructor(menuModel: any, columns: any[], columnGroups: any[], legacyColumnGroups: any[]);
|
5
|
+
constructor(menuModel: any, columns: any[]|null, columnGroups: any[]|null, legacyColumnGroups: any[]|null);
|
6
6
|
|
7
7
|
public clear(): void;
|
8
8
|
|
9
|
-
public addItem(item: (string)[] | any | string): void;
|
9
|
+
public addItem(item: (string)[] | any | string|null): void;
|
10
10
|
|
11
|
-
public addItems(item: (string)[] | any | string): void;
|
11
|
+
public addItems(item: (string)[] | any | string|null): void;
|
12
12
|
|
13
13
|
public addSeparator(): void;
|
14
14
|
|
@@ -19,11 +19,11 @@ declare class MenuItem extends EventDispatcher {
|
|
19
19
|
|
20
20
|
public getValue(): any;
|
21
21
|
|
22
|
-
public setSelectable(selectable?: boolean): void;
|
22
|
+
public setSelectable(selectable?: boolean|null): void;
|
23
23
|
|
24
24
|
public isSelectable(): boolean;
|
25
25
|
|
26
|
-
public setItems(items: any[]): void;
|
26
|
+
public setItems(items: any[]|null): void;
|
27
27
|
|
28
28
|
public getItems(): any[]|null;
|
29
29
|
|
@@ -5,7 +5,7 @@ import Ext from "../../tr-grid-util/es6/Ext.js";
|
|
5
5
|
|
6
6
|
declare class PopupMenu extends EventDispatcher {
|
7
7
|
|
8
|
-
constructor(parentElement: Element);
|
8
|
+
constructor(parentElement: Element|null);
|
9
9
|
|
10
10
|
public isDisposed(): boolean;
|
11
11
|
|
@@ -15,13 +15,13 @@ declare class PopupMenu extends EventDispatcher {
|
|
15
15
|
|
16
16
|
public hide(): void;
|
17
17
|
|
18
|
-
public attachTo(elem: Element, positioning: Popup.Positioning): void;
|
18
|
+
public attachTo(elem: Element|null, positioning: Popup.Positioning|null): void;
|
19
19
|
|
20
|
-
public setPosition(positioning: Popup.Positioning, x: number, y: number): void;
|
20
|
+
public setPosition(positioning: Popup.Positioning|null, x: number, y: number): void;
|
21
21
|
|
22
|
-
public addPopupChild(element: Element, popupMenu: PopupMenu): void;
|
22
|
+
public addPopupChild(element: Element|null, popupMenu: PopupMenu|null): void;
|
23
23
|
|
24
|
-
public setMenu(menuItems: (any)[]): void;
|
24
|
+
public setMenu(menuItems: (any)[]|null): void;
|
25
25
|
|
26
26
|
}
|
27
27
|
|
@@ -13,7 +13,8 @@ declare namespace RowDefinition {
|
|
13
13
|
chainRic?: string|null,
|
14
14
|
collapsed?: boolean|null,
|
15
15
|
label?: (string|null)|null,
|
16
|
-
hidden?: boolean|null
|
16
|
+
hidden?: boolean|null,
|
17
|
+
realTime?: boolean|null
|
17
18
|
};
|
18
19
|
|
19
20
|
type RowTypes = {
|
@@ -37,8 +38,6 @@ declare class RowDefinition {
|
|
37
38
|
|
38
39
|
public initialize(rowOptions?: RowDefinition.Options|null): void;
|
39
40
|
|
40
|
-
public setContent(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null, realTime?: boolean|null): boolean;
|
41
|
-
|
42
41
|
public getRowId(): string;
|
43
42
|
|
44
43
|
public getConfigObject(rowOptions?: RowDefinition.Options|null): RowDefinition.Options|null;
|
@@ -143,7 +142,7 @@ declare const ROW_DEF: string;
|
|
143
142
|
|
144
143
|
declare const ROW_TYPES: RowDefinition.RowTypes;
|
145
144
|
|
146
|
-
declare function rowData(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null
|
145
|
+
declare function rowData(userInput: string, permId?: string|null, asChain?: boolean|null, expanded?: boolean|null): boolean;
|
147
146
|
|
148
147
|
export {RowDefinition, ROW_DEF, ROW_TYPES};
|
149
148
|
export default RowDefinition;
|