jsl-ui 9.28.2 → 9.28.4
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/components/IntervalComponent.js +32 -35
- package/lib/components/auto-suggest/AutoSuggestComponent.js +19 -21
- package/lib/components/button/ButtonComponent.js +13 -30
- package/lib/components/checkbox/CheckBoxComponent.js +22 -39
- package/lib/components/date/DateComponent.js +29 -46
- package/lib/components/date-range/DateRangeComponent.js +48 -63
- package/lib/components/date-time/DateTimeComponent.js +17 -31
- package/lib/components/dialog/DialogComponent.js +75 -134
- package/lib/components/drop-down/DropDownComponent.js +23 -37
- package/lib/components/expander/ExpanderComponent.js +20 -23
- package/lib/components/form-field/FormComponent.js +9 -12
- package/lib/components/form-field/FormFieldComponent.js +28 -30
- package/lib/components/grid/GridComponent.js +46 -52
- package/lib/components/input/InputComponent.js +26 -47
- package/lib/components/loading/LoadingComponent.js +7 -9
- package/lib/components/navigation/NavigationComponent.js +20 -43
- package/lib/components/notification/Notification.js +18 -22
- package/lib/components/number/NumberComponent.js +28 -46
- package/lib/components/overlay/OverlayComponent.js +45 -60
- package/lib/components/progress/ProgressComponent.js +15 -17
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +9 -20
- package/lib/components/select/SelectComponent.js +105 -122
- package/lib/components/select/SelectDDAreaComponent.js +108 -122
- package/lib/components/slider/nouislider.js +1 -1
- package/lib/components/stack-panel/SplitterComponent.js +27 -29
- package/lib/components/stack-panel/StackPanelComponent.js +17 -31
- package/lib/components/tabs/TabsComponent.js +53 -66
- package/lib/components/time/TimeComponent.js +32 -43
- package/lib/components/tree-view/TreeViewComponent.js +13 -16
- package/lib/components/virtual-render/VirtualRenderComponent.js +30 -44
- package/lib/core/culture.js +2 -2
- package/lib/core/date.js +68 -72
- package/lib/core/helper.js +30 -34
- package/lib/core/jq.js +54 -63
- package/lib/core/lang.js +24 -28
- package/lib/core/numeric.js +35 -39
- package/lib/grid/filterDialogs/dateRangeFilter.js +98 -148
- package/lib/grid/filterDialogs/excelFilter.js +205 -271
- package/lib/grid/plugins/ext.overlay.js +9 -9
- package/lib/grid/plugins/slick.cellrangedecorator.js +2 -2
- package/lib/grid/plugins/slick.cellrangeselector.js +1 -1
- package/lib/grid/plugins/slick.cellselectionmodel.js +8 -8
- package/lib/grid/plugins/slick.headerbuttons.js +1 -1
- package/lib/grid/plugins/slick.headermenu.js +1 -1
- package/lib/grid/plugins/slick.rowmovemanager.js +2 -2
- package/lib/grid/plugins/slick.rowselectionmodel.js +1 -1
- package/lib/grid/slick.core.js +1 -1
- package/lib/grid/slick.creator.js +144 -144
- package/lib/grid/slick.dataview.js +127 -138
- package/lib/grid/slick.editors.core.js +1 -1
- package/lib/grid/slick.editors.date.js +2 -2
- package/lib/grid/slick.editors.lookup.js +36 -37
- package/lib/grid/slick.editors.nav.js +1 -1
- package/lib/grid/slick.formatters.js +26 -26
- package/lib/grid/slick.grid.js +163 -166
- package/lib/grid/slick.groupitemmetadataprovider.js +4 -4
- package/lib/grid/slick.tree.js +91 -103
- package/lib/index.js.map +1 -1
- package/lib/interaction/eventhandler.js +20 -23
- package/lib/interaction/moveable.js +76 -90
- package/lib/interaction/resizable.js +58 -72
- package/lib/ui/auto.suggest.js +13 -28
- package/lib/ui/date.picker/lib/fns.js +1 -5
- package/lib/ui/dialog.js +28 -43
- package/lib/ui/drop.down.js +4 -4
- package/lib/ui/number.input.js +8 -19
- package/package.json +1 -1
package/lib/grid/slick.grid.js
CHANGED
|
@@ -15,7 +15,7 @@ import "./slick-default-theme.css";
|
|
|
15
15
|
import { Resizable } from "../interaction/resizable";
|
|
16
16
|
import { EventHandler } from "../interaction/eventhandler";
|
|
17
17
|
import { helper } from "../core";
|
|
18
|
-
|
|
18
|
+
let $ = Slick.$;
|
|
19
19
|
$.deepExtend(Slick, { Grid: SlickGrid });
|
|
20
20
|
// shared across all grids on the page
|
|
21
21
|
var scrollbarDimensions;
|
|
@@ -262,7 +262,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
262
262
|
.addClass(uid)
|
|
263
263
|
.addClass("slickgrid")
|
|
264
264
|
.addClass("ui-widget");
|
|
265
|
-
|
|
265
|
+
const isTouch = helper.isTouchScreen();
|
|
266
266
|
if (isTouch) {
|
|
267
267
|
$container.addClass("js-touch");
|
|
268
268
|
}
|
|
@@ -496,49 +496,49 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
496
496
|
.on("dblclick", handleDblClick)
|
|
497
497
|
.on("contextmenu", handleContextMenu);
|
|
498
498
|
// ---- BEGIN
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
499
|
+
let dragStartX;
|
|
500
|
+
let dragStartY;
|
|
501
|
+
let isDown;
|
|
502
|
+
let dragStartedDD = null;
|
|
503
|
+
const delta = 3;
|
|
504
504
|
// $canvas.on("touchstart", function (e, dd) {
|
|
505
505
|
// handleDragInit(e, dd);
|
|
506
506
|
// // TODO
|
|
507
507
|
// });
|
|
508
|
-
|
|
508
|
+
let _down = function (e, dd) {
|
|
509
509
|
handleDragInit(e, dd); // TODO -> do something with result?
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
document.addEventListener("mouseup",
|
|
514
|
-
document.addEventListener("touchend",
|
|
510
|
+
dragStartX = e.pageX != null ? e.pageX : e.touches[0].pageX;
|
|
511
|
+
dragStartY = e.pageY != null ? e.pageY : e.touches[0].pageY;
|
|
512
|
+
isDown = true;
|
|
513
|
+
document.addEventListener("mouseup", handleUp);
|
|
514
|
+
document.addEventListener("touchend", handleUp);
|
|
515
515
|
};
|
|
516
516
|
$canvas.on("mousedown", _down);
|
|
517
517
|
$canvas.on("touchstart", _down);
|
|
518
|
-
|
|
519
|
-
if (
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
if (Math.abs(
|
|
523
|
-
&& Math.abs(
|
|
518
|
+
let _move = function (e, _dd) {
|
|
519
|
+
if (isDown) {
|
|
520
|
+
const pageX = e.pageX != null ? e.pageX : e.touches[0].pageX;
|
|
521
|
+
const pageY = e.pageY != null ? e.pageY : e.touches[0].pageY;
|
|
522
|
+
if (Math.abs(dragStartX - pageX) < delta
|
|
523
|
+
&& Math.abs(dragStartY - pageY) < delta) {
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
526
|
-
if (
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
526
|
+
if (dragStartedDD == null) {
|
|
527
|
+
dragStartedDD = {};
|
|
528
|
+
dragStartedDD.dragging = null;
|
|
529
|
+
dragStartedDD.propagates = 1;
|
|
530
|
+
dragStartedDD.target = e.target;
|
|
531
|
+
dragStartedDD.pageX = pageX;
|
|
532
|
+
dragStartedDD.pageY = pageY;
|
|
533
|
+
dragStartedDD.startX = dragStartedDD.pageX;
|
|
534
|
+
dragStartedDD.startY = dragStartedDD.pageY;
|
|
535
|
+
const res = handleDragStart(e, dragStartedDD); // TODO -> do something with result?
|
|
536
536
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
handleDrag(e,
|
|
537
|
+
dragStartedDD.pageX = pageX;
|
|
538
|
+
dragStartedDD.pageY = pageY;
|
|
539
|
+
dragStartedDD.startX = dragStartedDD.pageX;
|
|
540
|
+
dragStartedDD.startY = dragStartedDD.pageY;
|
|
541
|
+
handleDrag(e, dragStartedDD);
|
|
542
542
|
// e.stopImmediatePropagation();
|
|
543
543
|
// e.stopPropagation();
|
|
544
544
|
if (e.isImmediatePropagationStopped && e.isImmediatePropagationStopped()) {
|
|
@@ -548,14 +548,14 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
548
548
|
};
|
|
549
549
|
$canvas.on("mousemove", _move);
|
|
550
550
|
$canvas.on("touchmove", _move);
|
|
551
|
-
|
|
552
|
-
if (
|
|
553
|
-
handleDragEnd(e,
|
|
551
|
+
const handleUp = (e) => {
|
|
552
|
+
if (isDown && dragStartedDD != null) {
|
|
553
|
+
handleDragEnd(e, dragStartedDD);
|
|
554
554
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
document.removeEventListener("mouseup",
|
|
558
|
-
document.removeEventListener("touchend",
|
|
555
|
+
isDown = false;
|
|
556
|
+
dragStartedDD = null;
|
|
557
|
+
document.removeEventListener("mouseup", handleUp);
|
|
558
|
+
document.removeEventListener("touchend", handleUp);
|
|
559
559
|
};
|
|
560
560
|
// .on("draginit", handleDragInit) //TODO TODOFIX
|
|
561
561
|
// .on("dragstart", {distance: 3}, handleDragStart) //TODO TODOFIX
|
|
@@ -676,9 +676,9 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
676
676
|
}
|
|
677
677
|
function measureScrollbar() {
|
|
678
678
|
//var $outerdiv = $("<div style=\"position:absolute; top:-10000px; left:-10000px; overflow:auto; width:100px; height:100px;\"></div>").appendTo($viewport);
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
679
|
+
const $outerdiv = $("<div style=\"position:absolute; top:-10000px; left:-10000px; overflow:auto; width:100px; height:100px;\"></div>").appendTo($("body"));
|
|
680
|
+
const $innerdiv = $("<div style=\"width:200px; height:200px; overflow:auto;\"></div>").appendTo($outerdiv);
|
|
681
|
+
const dim = {
|
|
682
682
|
width: $outerdiv[0].offsetWidth - $outerdiv[0].clientWidth,
|
|
683
683
|
height: $outerdiv[0].offsetHeight - $outerdiv[0].clientHeight
|
|
684
684
|
};
|
|
@@ -1144,7 +1144,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1144
1144
|
div.style.width = (m.width - headerColumnWidthDiff) + "px";
|
|
1145
1145
|
div.id = "" + uid + m.id;
|
|
1146
1146
|
div.title = m.toolTip || "";
|
|
1147
|
-
|
|
1147
|
+
let html = "<span class='slick-column-name'>" + m.name + "</span>";
|
|
1148
1148
|
if (m.resizable) {
|
|
1149
1149
|
html += "<span class='rs-r'" + (options.resizeHandleWidth ? "style='width:" + options.resizeHandleWidth + "'" : "") + "></span>";
|
|
1150
1150
|
div.className += " resizable";
|
|
@@ -1224,7 +1224,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
function setupColumnSort() {
|
|
1226
1226
|
$headers.on("click", function (e) {
|
|
1227
|
-
|
|
1227
|
+
let ctrlPressed = e.metaKey || e.ctrlKey;
|
|
1228
1228
|
if ($(e.target).hasClass("rs-r")) {
|
|
1229
1229
|
return;
|
|
1230
1230
|
}
|
|
@@ -1439,17 +1439,16 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1439
1439
|
return impactedColumns;
|
|
1440
1440
|
}
|
|
1441
1441
|
function setupColumnMoveAndResize() {
|
|
1442
|
-
for (
|
|
1443
|
-
var c = _a[_i];
|
|
1442
|
+
for (const c of $container.find(".slick-header-columns")) {
|
|
1444
1443
|
Resizable(c, {
|
|
1445
1444
|
resizeDelta: options.resizeDelta,
|
|
1446
|
-
onResize: new EventHandler(
|
|
1445
|
+
onResize: new EventHandler((evt) => {
|
|
1447
1446
|
processColumnResize(evt.target, evt.x);
|
|
1448
1447
|
}),
|
|
1449
|
-
onStart: new EventHandler(
|
|
1448
|
+
onStart: new EventHandler((evt) => {
|
|
1450
1449
|
startColumnResize(evt.target, evt.x);
|
|
1451
1450
|
}),
|
|
1452
|
-
onStop: new EventHandler(
|
|
1451
|
+
onStop: new EventHandler((evt) => {
|
|
1453
1452
|
finishColumnResize();
|
|
1454
1453
|
})
|
|
1455
1454
|
});
|
|
@@ -1463,9 +1462,9 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1463
1462
|
// finishColumnResize();
|
|
1464
1463
|
// });
|
|
1465
1464
|
}
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1465
|
+
const mouseDownFnc = function (e) {
|
|
1466
|
+
let arg = e;
|
|
1467
|
+
let $target = $(e.target).closestClass("slick-header-column");
|
|
1469
1468
|
if ($target.length === 0) {
|
|
1470
1469
|
// special case for last column
|
|
1471
1470
|
if (e.target.classList.contains("slick-header-columns")) {
|
|
@@ -1475,8 +1474,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1475
1474
|
return;
|
|
1476
1475
|
}
|
|
1477
1476
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1477
|
+
const x = arg.pageX != null ? arg.pageX : arg.touches[0].pageX;
|
|
1478
|
+
let columnInfo = $target.data("column");
|
|
1480
1479
|
if (options.enableColumnReorder) {
|
|
1481
1480
|
startColumnDragging($target, x);
|
|
1482
1481
|
}
|
|
@@ -1500,7 +1499,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1500
1499
|
dragGhost.style.left = draggedEl.offsetLeft + "px";
|
|
1501
1500
|
dragGhost.style.height = draggedEl.clientHeight + "px";
|
|
1502
1501
|
dragGhost.style.width = draggedEl.clientWidth + "px";
|
|
1503
|
-
|
|
1502
|
+
let ghostContent = document.createElement("div");
|
|
1504
1503
|
ghostContent.className = "slick-ghost-content";
|
|
1505
1504
|
ghostContent.style.height = draggedEl.clientHeight + "px";
|
|
1506
1505
|
dragGhost.appendChild(ghostContent);
|
|
@@ -1512,12 +1511,12 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1512
1511
|
window.addEventListener("touchend", finishColumnDrag);
|
|
1513
1512
|
}
|
|
1514
1513
|
function processColumnDrag(evt) {
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1514
|
+
const x = evt.pageX != null ? evt.pageX : evt.touches[0].pageX;
|
|
1515
|
+
let prevEl = draggedEl.previousElementSibling;
|
|
1516
|
+
let nextEl = draggedEl.nextElementSibling;
|
|
1517
|
+
let prevWidth = prevEl != null ? prevEl.offsetWidth : -1;
|
|
1518
|
+
let nextWidth = nextEl != null ? nextEl.offsetWidth : -1;
|
|
1519
|
+
let draggedDistance = x - dragColCurrentX;
|
|
1521
1520
|
dragGhost.style.left = (draggedEl.offsetLeft + draggedDistance) + "px";
|
|
1522
1521
|
if (prevWidth >= 0 && draggedDistance < -prevWidth) {
|
|
1523
1522
|
if (prevEl != null) {
|
|
@@ -1538,19 +1537,19 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1538
1537
|
if (!getEditorLock().commitCurrentEdit()) {
|
|
1539
1538
|
return;
|
|
1540
1539
|
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
reorderedIds = reorderedIds.concat($colsR.map(
|
|
1545
|
-
|
|
1546
|
-
for (
|
|
1540
|
+
let $colsL = $headerL.find(".slick-header-column");
|
|
1541
|
+
let $colsR = $headerR.find(".slick-header-column");
|
|
1542
|
+
let reorderedIds = $colsL.map((e) => e.id);
|
|
1543
|
+
reorderedIds = reorderedIds.concat($colsR.map((e) => e.id));
|
|
1544
|
+
let reorderedColumns = [];
|
|
1545
|
+
for (let i = 0; i < reorderedIds.length; i++) {
|
|
1547
1546
|
reorderedColumns.push(columns[getColumnIndex(reorderedIds[i].replace(uid, ""))]);
|
|
1548
1547
|
}
|
|
1549
1548
|
setColumns(reorderedColumns);
|
|
1550
1549
|
trigger(self.onColumnsReordered, { impactedColumns: getImpactedColumns(0 /*limit*/) }); // tODO limit
|
|
1551
1550
|
}
|
|
1552
1551
|
function finishColumnDrag(arg) {
|
|
1553
|
-
|
|
1552
|
+
const x = arg.pageX != null ? arg.pageX : (arg.touches.length > 0 ? arg.touches : arg.changedTouches)[0].pageX;
|
|
1554
1553
|
window.removeEventListener("mousemove", processColumnDrag);
|
|
1555
1554
|
window.removeEventListener("mouseup", finishColumnDrag);
|
|
1556
1555
|
window.removeEventListener("touchmove", processColumnDrag);
|
|
@@ -1567,17 +1566,17 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1567
1566
|
//sort
|
|
1568
1567
|
}
|
|
1569
1568
|
}
|
|
1570
|
-
|
|
1569
|
+
let pageX, minPageX, maxPageX;
|
|
1571
1570
|
function startColumnResize(target, x) {
|
|
1572
|
-
|
|
1571
|
+
const $target = $(target);
|
|
1573
1572
|
// columnResizeDragging = true;
|
|
1574
1573
|
if (!getEditorLock().commitCurrentEdit()) {
|
|
1575
1574
|
return false;
|
|
1576
1575
|
}
|
|
1577
1576
|
pageX = x;
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1577
|
+
let colIdx = $target.index();
|
|
1578
|
+
let columnElements = $headers.children();
|
|
1579
|
+
let shrinkLeewayOnRight = null, stretchLeewayOnRight = null;
|
|
1581
1580
|
$target.addClass("slick-header-column-active");
|
|
1582
1581
|
// lock each column's width option to current width
|
|
1583
1582
|
$.each(columnElements, function (i, e) {
|
|
@@ -1590,8 +1589,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1590
1589
|
shrinkLeewayOnRight = 0;
|
|
1591
1590
|
stretchLeewayOnRight = 0;
|
|
1592
1591
|
// colums on right affect maxPageX/minPageX
|
|
1593
|
-
for (
|
|
1594
|
-
|
|
1592
|
+
for (let j = colIdx + 1; j < columns.length; j++) {
|
|
1593
|
+
let c = columns[j];
|
|
1595
1594
|
if (c.resizable) {
|
|
1596
1595
|
if (stretchLeewayOnRight !== null) {
|
|
1597
1596
|
if (c.maxWidth) {
|
|
@@ -1605,10 +1604,10 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1605
1604
|
}
|
|
1606
1605
|
}
|
|
1607
1606
|
}
|
|
1608
|
-
|
|
1609
|
-
for (
|
|
1607
|
+
let shrinkLeewayOnLeft = 0, stretchLeewayOnLeft = 0;
|
|
1608
|
+
for (let j = 0; j <= colIdx; j++) {
|
|
1610
1609
|
// columns on left only affect minPageX
|
|
1611
|
-
|
|
1610
|
+
let c = columns[j];
|
|
1612
1611
|
if (c.resizable) {
|
|
1613
1612
|
if (stretchLeewayOnLeft !== null) {
|
|
1614
1613
|
if (c.maxWidth) {
|
|
@@ -1640,19 +1639,19 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1640
1639
|
function processColumnResize(target, currentX) {
|
|
1641
1640
|
// if (options.resizeDelta && Math.abs(oldResizeX - newx) <= options.resizeDelta)
|
|
1642
1641
|
// return;
|
|
1643
|
-
|
|
1642
|
+
let $target = $(target);
|
|
1644
1643
|
// const width = $target.width() as number;
|
|
1645
1644
|
// oldResizeX = newx;
|
|
1646
|
-
|
|
1645
|
+
let colIdx = $target.index();
|
|
1647
1646
|
if (hasFrozenColumns() && $target.closestClass("slick-header-columns").hasClass("slick-header-columns-right")) {
|
|
1648
1647
|
colIdx += options.frozenColumn + 1;
|
|
1649
1648
|
}
|
|
1650
|
-
|
|
1649
|
+
let actualMinWidth, d = Math.min(maxPageX, Math.max(minPageX, currentX)) - pageX, x;
|
|
1651
1650
|
if (d < 0) { // shrink column
|
|
1652
1651
|
x = d;
|
|
1653
1652
|
var newCanvasWidthL = 0, newCanvasWidthR = 0;
|
|
1654
|
-
for (
|
|
1655
|
-
|
|
1653
|
+
for (let j = colIdx; j >= 0; j--) {
|
|
1654
|
+
let c = columns[j];
|
|
1656
1655
|
if (c.resizable) {
|
|
1657
1656
|
actualMinWidth = Math.max(c.minWidth || 0, absoluteColumnMinWidth);
|
|
1658
1657
|
if (x && c.previousWidth + x < actualMinWidth) {
|
|
@@ -1666,8 +1665,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1666
1665
|
}
|
|
1667
1666
|
}
|
|
1668
1667
|
// return;
|
|
1669
|
-
for (
|
|
1670
|
-
|
|
1668
|
+
for (let k = 0; k <= colIdx; k++) {
|
|
1669
|
+
let c = columns[k];
|
|
1671
1670
|
if (hasFrozenColumns() && (k > options.frozenColumn)) {
|
|
1672
1671
|
newCanvasWidthR += c.width;
|
|
1673
1672
|
}
|
|
@@ -1677,8 +1676,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1677
1676
|
}
|
|
1678
1677
|
if (options.forceFitColumns) {
|
|
1679
1678
|
x = -d;
|
|
1680
|
-
for (
|
|
1681
|
-
|
|
1679
|
+
for (let j = colIdx + 1; j < columns.length; j++) {
|
|
1680
|
+
let c = columns[j];
|
|
1682
1681
|
if (c.resizable) {
|
|
1683
1682
|
if (x && c.maxWidth && (c.maxWidth - c.previousWidth < x)) {
|
|
1684
1683
|
x -= c.maxWidth - c.previousWidth;
|
|
@@ -1698,8 +1697,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1698
1697
|
}
|
|
1699
1698
|
}
|
|
1700
1699
|
else {
|
|
1701
|
-
for (
|
|
1702
|
-
|
|
1700
|
+
for (let j = colIdx + 1; j < columns.length; j++) {
|
|
1701
|
+
let c = columns[j];
|
|
1703
1702
|
if (hasFrozenColumns() && (j > options.frozenColumn)) {
|
|
1704
1703
|
newCanvasWidthR += c.width;
|
|
1705
1704
|
}
|
|
@@ -1710,8 +1709,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1710
1709
|
}
|
|
1711
1710
|
if (options.forceFitColumns) {
|
|
1712
1711
|
x = -d;
|
|
1713
|
-
for (
|
|
1714
|
-
|
|
1712
|
+
for (let j = colIdx + 1; j < columns.length; j++) {
|
|
1713
|
+
let c = columns[j];
|
|
1715
1714
|
if (c.resizable) {
|
|
1716
1715
|
if (x && c.maxWidth && (c.maxWidth - c.previousWidth < x)) {
|
|
1717
1716
|
x -= c.maxWidth - c.previousWidth;
|
|
@@ -1728,8 +1727,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1728
1727
|
else { // stretch column
|
|
1729
1728
|
x = d;
|
|
1730
1729
|
var newCanvasWidthL = 0, newCanvasWidthR = 0;
|
|
1731
|
-
for (
|
|
1732
|
-
|
|
1730
|
+
for (let j = colIdx; j >= 0; j--) {
|
|
1731
|
+
let c = columns[j];
|
|
1733
1732
|
if (c.resizable) {
|
|
1734
1733
|
if (x && c.maxWidth && (c.maxWidth - c.previousWidth < x)) {
|
|
1735
1734
|
x -= c.maxWidth - c.previousWidth;
|
|
@@ -1741,8 +1740,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1741
1740
|
}
|
|
1742
1741
|
}
|
|
1743
1742
|
}
|
|
1744
|
-
for (
|
|
1745
|
-
|
|
1743
|
+
for (let k = 0; k <= colIdx; k++) {
|
|
1744
|
+
let c = columns[k];
|
|
1746
1745
|
if (hasFrozenColumns() && (k > options.frozenColumn)) {
|
|
1747
1746
|
newCanvasWidthR += c.width;
|
|
1748
1747
|
}
|
|
@@ -1752,8 +1751,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1752
1751
|
}
|
|
1753
1752
|
if (options.forceFitColumns) {
|
|
1754
1753
|
x = -d;
|
|
1755
|
-
for (
|
|
1756
|
-
|
|
1754
|
+
for (let j = colIdx + 1; j < columns.length; j++) {
|
|
1755
|
+
let c = columns[j];
|
|
1757
1756
|
if (c.resizable) {
|
|
1758
1757
|
actualMinWidth = Math.max(c.minWidth || 0, absoluteColumnMinWidth);
|
|
1759
1758
|
if (x && c.previousWidth + x < actualMinWidth) {
|
|
@@ -1774,8 +1773,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1774
1773
|
}
|
|
1775
1774
|
}
|
|
1776
1775
|
else {
|
|
1777
|
-
for (
|
|
1778
|
-
|
|
1776
|
+
for (let j = colIdx + 1; j < columns.length; j++) {
|
|
1777
|
+
let c = columns[j];
|
|
1779
1778
|
if (hasFrozenColumns() && (j > options.frozenColumn)) {
|
|
1780
1779
|
newCanvasWidthR += c.width;
|
|
1781
1780
|
}
|
|
@@ -1796,12 +1795,12 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
1796
1795
|
}
|
|
1797
1796
|
}
|
|
1798
1797
|
function finishColumnResize() {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1798
|
+
const changedColumns = [];
|
|
1799
|
+
let newWidth;
|
|
1800
|
+
let columnElements = $headers.children();
|
|
1802
1801
|
$headers.find(".slick-header-column-active").removeClass("slick-header-column-active");
|
|
1803
|
-
for (
|
|
1804
|
-
|
|
1802
|
+
for (let j = 0; j < columns.length; j++) {
|
|
1803
|
+
let c = columns[j];
|
|
1805
1804
|
newWidth = $(columnElements[j]).width();
|
|
1806
1805
|
if (c.previousWidth !== newWidth) {
|
|
1807
1806
|
changedColumns.push({
|
|
@@ -2200,7 +2199,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2200
2199
|
absoluteColumnMinWidth = Math.max(headerColumnWidthDiff, cellWidthDiff);
|
|
2201
2200
|
}
|
|
2202
2201
|
function createCssRules() {
|
|
2203
|
-
|
|
2202
|
+
let style = document.createElement("style");
|
|
2204
2203
|
style.type = "text/css";
|
|
2205
2204
|
$("head").append(style);
|
|
2206
2205
|
$style = $(style);
|
|
@@ -2287,9 +2286,9 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2287
2286
|
// }
|
|
2288
2287
|
e = e || new Slick.EventData();
|
|
2289
2288
|
if (e.stopImmediatePropagation) {
|
|
2290
|
-
|
|
2289
|
+
let tmp_fnc = e.stopImmediatePropagation;
|
|
2291
2290
|
e.stopImmediatePropagation = function () {
|
|
2292
|
-
|
|
2291
|
+
tmp_fnc.apply(e);
|
|
2293
2292
|
e._isImmediatePropagationStopped = true;
|
|
2294
2293
|
};
|
|
2295
2294
|
if (!e.isImmediatePropagationStopped) {
|
|
@@ -2299,9 +2298,9 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2299
2298
|
}
|
|
2300
2299
|
}
|
|
2301
2300
|
if (e.stopPropagation) {
|
|
2302
|
-
|
|
2301
|
+
let tmp_fnc = e.stopPropagation;
|
|
2303
2302
|
e.stopPropagation = function () {
|
|
2304
|
-
|
|
2303
|
+
tmp_fnc.apply(e);
|
|
2305
2304
|
e._isPropagationStopped = true;
|
|
2306
2305
|
};
|
|
2307
2306
|
if (!e.isPropagationStopped) {
|
|
@@ -2688,7 +2687,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2688
2687
|
//////////////////////////////////////////////////////////////////////////////////////////////
|
|
2689
2688
|
// rendering / Scrolling
|
|
2690
2689
|
function getRowTop(row) {
|
|
2691
|
-
|
|
2690
|
+
let result;
|
|
2692
2691
|
if (options.variableRowHeight) {
|
|
2693
2692
|
result = rowPositionCache[row].top - offset;
|
|
2694
2693
|
}
|
|
@@ -2710,13 +2709,13 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2710
2709
|
if (!options.variableRowHeight) {
|
|
2711
2710
|
return Math.floor((y + offset) / options.rowHeight);
|
|
2712
2711
|
}
|
|
2713
|
-
|
|
2712
|
+
let rowsInPosCache = getDataLength();
|
|
2714
2713
|
if (!rowsInPosCache) {
|
|
2715
2714
|
return 0;
|
|
2716
2715
|
}
|
|
2717
2716
|
// loop through the row position cache and break when
|
|
2718
2717
|
// the row is found
|
|
2719
|
-
|
|
2718
|
+
let row = Math.max(0, binarySearch(rowPositionCache, y + offset, function (pos, cacheEntry) {
|
|
2720
2719
|
if (cacheEntry.top <= pos) {
|
|
2721
2720
|
if (cacheEntry.bottom > pos) {
|
|
2722
2721
|
return 0;
|
|
@@ -2839,9 +2838,9 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2839
2838
|
return undefined;
|
|
2840
2839
|
}
|
|
2841
2840
|
if (columnDef.field && columnDef.field.indexOf(".") > 0) {
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
for (
|
|
2841
|
+
const fields = columnDef.field.split(".");
|
|
2842
|
+
let result = item;
|
|
2843
|
+
for (let i = 0; i < fields.length; i++) {
|
|
2845
2844
|
result = result[fields[i]];
|
|
2846
2845
|
}
|
|
2847
2846
|
return result;
|
|
@@ -2968,7 +2967,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2968
2967
|
}
|
|
2969
2968
|
function cleanupRows(rangeToKeep) {
|
|
2970
2969
|
for (var i in rowsCache) {
|
|
2971
|
-
|
|
2970
|
+
let idx = parseInt(i, 10);
|
|
2972
2971
|
var removeFrozenRow = true;
|
|
2973
2972
|
if (hasFrozenRows
|
|
2974
2973
|
&& ((options.frozenBottom && idx >= actualFrozenRow) // frozen bottom rows
|
|
@@ -2987,7 +2986,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2987
2986
|
}
|
|
2988
2987
|
}
|
|
2989
2988
|
function invalidate() {
|
|
2990
|
-
|
|
2989
|
+
let currentActiveCell = null;
|
|
2991
2990
|
if (currentEditor) {
|
|
2992
2991
|
currentActiveCell = getActiveCell();
|
|
2993
2992
|
}
|
|
@@ -3014,7 +3013,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3014
3013
|
// store and detach node for later async cleanup
|
|
3015
3014
|
for (var column in postProcessedRow) {
|
|
3016
3015
|
if (postProcessedRow.hasOwnProperty(column)) {
|
|
3017
|
-
|
|
3016
|
+
let columnIdx = parseInt(column, 10) | 0;
|
|
3018
3017
|
postProcessedCleanupQueue.push({
|
|
3019
3018
|
actionType: "C",
|
|
3020
3019
|
groupId: postProcessgroupId,
|
|
@@ -3029,7 +3028,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3029
3028
|
groupId: postProcessgroupId,
|
|
3030
3029
|
node: cacheEntry.rowNode
|
|
3031
3030
|
});
|
|
3032
|
-
cacheEntry.rowNode.forEach(
|
|
3031
|
+
cacheEntry.rowNode.forEach(x => x.parent.removeChild(x)); // $(cacheEntry.rowNode).detach();
|
|
3033
3032
|
}
|
|
3034
3033
|
function initializeRowPositions() {
|
|
3035
3034
|
rowPositionCache = [{
|
|
@@ -3062,7 +3061,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3062
3061
|
return;
|
|
3063
3062
|
}
|
|
3064
3063
|
trigger(self.onBeforeRemoveRow, { row: row, dom: cacheEntry.rowNode });
|
|
3065
|
-
cacheEntry.rowNode.forEach(
|
|
3064
|
+
cacheEntry.rowNode.forEach(x => {
|
|
3066
3065
|
x.parentElement.removeChild(x);
|
|
3067
3066
|
});
|
|
3068
3067
|
delete rowsCache[row];
|
|
@@ -3103,15 +3102,13 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3103
3102
|
else {
|
|
3104
3103
|
cellNode.innerHTML = formatterResult.text;
|
|
3105
3104
|
if (formatterResult.removeClasses && !suppressRemove) {
|
|
3106
|
-
for (
|
|
3107
|
-
var c = _a[_i];
|
|
3105
|
+
for (const c of formatterResult.removeClasses) {
|
|
3108
3106
|
cellNode.classList.remove(c);
|
|
3109
3107
|
}
|
|
3110
3108
|
// $(cellNode).removeClass(formatterResult.removeClasses);
|
|
3111
3109
|
}
|
|
3112
3110
|
if (formatterResult.addClasses) {
|
|
3113
|
-
for (
|
|
3114
|
-
var c = _c[_b];
|
|
3111
|
+
for (const c of formatterResult.addClasses) {
|
|
3115
3112
|
cellNode.classList.add(c);
|
|
3116
3113
|
}
|
|
3117
3114
|
// $(cellNode).addClass(formatterResult.addClasses);
|
|
@@ -3134,8 +3131,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3134
3131
|
var formatterResult = d ? getFormatter(row, m)(row, cell, getDataItemValueForColumn(d, m), m, d, self) : "";
|
|
3135
3132
|
applyFormatResultToCellNode(formatterResult, cellNode);
|
|
3136
3133
|
if (self.onAppendCell.countHandlers() > 0) {
|
|
3137
|
-
|
|
3138
|
-
|
|
3134
|
+
let item = getDataItem(activeRow);
|
|
3135
|
+
let value = getDataItemValueForColumn(item, columns[activeCell]);
|
|
3139
3136
|
trigger(self.onAppendCell, {
|
|
3140
3137
|
row: row, cell: cell,
|
|
3141
3138
|
value: value, item: item,
|
|
@@ -3161,7 +3158,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3161
3158
|
if (!cacheEntry.cellNodesByColumnIdx.hasOwnProperty(column)) {
|
|
3162
3159
|
continue;
|
|
3163
3160
|
}
|
|
3164
|
-
|
|
3161
|
+
let columnIdx = parseInt(column, 10) | 0;
|
|
3165
3162
|
var m = columns[columnIdx], node = cacheEntry.cellNodesByColumnIdx[columnIdx];
|
|
3166
3163
|
if (row === activeRow && columnIdx === activeCell && currentEditor) {
|
|
3167
3164
|
currentEditor.loadValue(d);
|
|
@@ -3170,8 +3167,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3170
3167
|
formatterResult = getFormatter(row, m)(row, columnIdx, getDataItemValueForColumn(d, m), m, d, self);
|
|
3171
3168
|
applyFormatResultToCellNode(formatterResult, node);
|
|
3172
3169
|
if (self.onAppendCell.countHandlers() > 0) {
|
|
3173
|
-
|
|
3174
|
-
|
|
3170
|
+
let item = getDataItem(row);
|
|
3171
|
+
let value = getDataItemValueForColumn(item, columns[columnIdx]);
|
|
3175
3172
|
trigger(self.onAppendCell, {
|
|
3176
3173
|
row: row, cell: columnIdx,
|
|
3177
3174
|
value: value, item: item,
|
|
@@ -3187,7 +3184,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3187
3184
|
}
|
|
3188
3185
|
function getViewportHeight() {
|
|
3189
3186
|
if (options.autoHeight) {
|
|
3190
|
-
|
|
3187
|
+
let fullHeight = $paneHeaderL.height();
|
|
3191
3188
|
fullHeight += (options.showHeaderRow) ? options.headerRowHeight + getVBoxDelta($headerRowScroller) : 0;
|
|
3192
3189
|
fullHeight += (options.showFooterRow) ? options.footerRowHeight + getVBoxDelta($footerRowScroller) : 0;
|
|
3193
3190
|
fullHeight += (getCanvasWidth() > viewportW) ? scrollbarDimensions.height : 0;
|
|
@@ -3204,7 +3201,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3204
3201
|
topPanelH = (options.showTopPanel) ? options.topPanelHeight + getVBoxDelta($topPanelScroller) : 0;
|
|
3205
3202
|
headerRowH = (options.showHeaderRow) ? options.headerRowHeight + getVBoxDelta($headerRowScroller) : 0;
|
|
3206
3203
|
footerRowH = (options.showFooterRow) ? options.footerRowHeight + getVBoxDelta($footerRowScroller) : 0;
|
|
3207
|
-
|
|
3204
|
+
let preHeaderH = (options.createPreHeaderPanel && options.showPreHeaderPanel) ? options.preHeaderPanelHeight + getVBoxDelta($preHeaderPanelScroller) : 0;
|
|
3208
3205
|
viewportH = $container[0].clientHeight
|
|
3209
3206
|
- $headerScroller[0].clientHeight
|
|
3210
3207
|
- getVBoxDelta($headerScroller)
|
|
@@ -3479,7 +3476,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3479
3476
|
continue;
|
|
3480
3477
|
}
|
|
3481
3478
|
// this is a string, so it needs to be cast back to a number.
|
|
3482
|
-
|
|
3479
|
+
let i = parseInt(idx, 10) | 0;
|
|
3483
3480
|
// ignore frozen columns
|
|
3484
3481
|
if (i <= options.frozenColumn) {
|
|
3485
3482
|
continue;
|
|
@@ -3575,8 +3572,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3575
3572
|
cacheEntry.rowNode[0].appendChild(node);
|
|
3576
3573
|
}
|
|
3577
3574
|
if (self.onAppendCell.countHandlers() > 0) {
|
|
3578
|
-
|
|
3579
|
-
|
|
3575
|
+
let item = getDataItem(processedRow);
|
|
3576
|
+
let value = getDataItemValueForColumn(item, columns[columnIdx]);
|
|
3580
3577
|
trigger(self.onAppendCell, {
|
|
3581
3578
|
row: processedRow, cell: columnIdx,
|
|
3582
3579
|
value: value, item: item,
|
|
@@ -3589,7 +3586,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3589
3586
|
}
|
|
3590
3587
|
function renderRows(range) {
|
|
3591
3588
|
var html = { L: "", R: "" }, rows = [], needToReselectCell = false, dataLength = getDataLength();
|
|
3592
|
-
for (
|
|
3589
|
+
for (let i = range.top, ii = range.bottom; i <= ii; i++) {
|
|
3593
3590
|
if (rowsCache[i] || (hasFrozenRows && options.frozenBottom && i == getDataLength())) {
|
|
3594
3591
|
continue;
|
|
3595
3592
|
}
|
|
@@ -3617,19 +3614,19 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3617
3614
|
if (!rows.length) {
|
|
3618
3615
|
return;
|
|
3619
3616
|
}
|
|
3620
|
-
|
|
3617
|
+
let x;
|
|
3621
3618
|
if (html.L.length > 0) {
|
|
3622
3619
|
x = document.createElement("div");
|
|
3623
3620
|
x.innerHTML = html.L;
|
|
3624
3621
|
}
|
|
3625
|
-
|
|
3622
|
+
let xRight;
|
|
3626
3623
|
if (html.R.length > 0) {
|
|
3627
3624
|
xRight = document.createElement("div");
|
|
3628
3625
|
xRight.innerHTML = html.R;
|
|
3629
3626
|
}
|
|
3630
|
-
for (
|
|
3631
|
-
|
|
3632
|
-
|
|
3627
|
+
for (let i = 0, ii = rows.length; i < ii; i++) {
|
|
3628
|
+
let xChild;
|
|
3629
|
+
let xChildRight;
|
|
3633
3630
|
rowsCache[rows[i]].rowNode = [];
|
|
3634
3631
|
if (x && x.children.length > 0) {
|
|
3635
3632
|
xChild = x.children[0];
|
|
@@ -3653,18 +3650,18 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3653
3650
|
$canvasTopL[0].appendChild(xChild);
|
|
3654
3651
|
}
|
|
3655
3652
|
if (self.onAppendCell.countHandlers() > 0) {
|
|
3656
|
-
|
|
3657
|
-
for (
|
|
3653
|
+
const nodes = [];
|
|
3654
|
+
for (let idx = 0; idx < xChild.childNodes.length; idx++) {
|
|
3658
3655
|
nodes.push(xChild.childNodes[idx]);
|
|
3659
3656
|
}
|
|
3660
3657
|
if (xChildRight) {
|
|
3661
|
-
for (
|
|
3658
|
+
for (let idx = 0; idx < xChildRight.childNodes.length; idx++) {
|
|
3662
3659
|
nodes.push(xChildRight.childNodes[idx]);
|
|
3663
3660
|
}
|
|
3664
3661
|
}
|
|
3665
|
-
for (
|
|
3666
|
-
|
|
3667
|
-
|
|
3662
|
+
for (let cIdx = 0; cIdx < nodes.length; cIdx++) {
|
|
3663
|
+
let item = getDataItem(rows[i]);
|
|
3664
|
+
let value = getDataItemValueForColumn(item, columns[cIdx]);
|
|
3668
3665
|
trigger(self.onAppendCell, {
|
|
3669
3666
|
row: rows[i], cell: cIdx,
|
|
3670
3667
|
value: value, item: item,
|
|
@@ -3704,7 +3701,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3704
3701
|
}
|
|
3705
3702
|
function updateRowPositions() {
|
|
3706
3703
|
for (var row in rowsCache) {
|
|
3707
|
-
rowsCache[row].rowNode.forEach(
|
|
3704
|
+
rowsCache[row].rowNode.forEach(x => x.style.top = getRowTop(row) + "px");
|
|
3708
3705
|
}
|
|
3709
3706
|
}
|
|
3710
3707
|
function render() {
|
|
@@ -3804,19 +3801,19 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3804
3801
|
// programmaticScrollingTimeout = null;
|
|
3805
3802
|
// }, 600);
|
|
3806
3803
|
// ceiling the max scroll values
|
|
3807
|
-
|
|
3804
|
+
let vScrollDist = 0;
|
|
3808
3805
|
if (!options.autoHeight) {
|
|
3809
|
-
|
|
3806
|
+
let maxScrollDistanceY = $viewportScrollContainerY[0].scrollHeight - $viewportScrollContainerY[0].clientHeight;
|
|
3810
3807
|
if (scrollTop > maxScrollDistanceY) {
|
|
3811
3808
|
scrollTop = maxScrollDistanceY;
|
|
3812
3809
|
}
|
|
3813
3810
|
vScrollDist = Math.abs(scrollTop - prevScrollTop);
|
|
3814
3811
|
}
|
|
3815
|
-
|
|
3812
|
+
let maxScrollDistanceX = $viewportScrollContainerY[0].scrollWidth - $viewportScrollContainerY[0].clientWidth;
|
|
3816
3813
|
if (scrollLeft > maxScrollDistanceX) {
|
|
3817
3814
|
scrollLeft = maxScrollDistanceX;
|
|
3818
3815
|
}
|
|
3819
|
-
|
|
3816
|
+
let hScrollDist = Math.abs(scrollLeft - prevScrollLeft);
|
|
3820
3817
|
if (hScrollDist) {
|
|
3821
3818
|
prevScrollLeft = scrollLeft;
|
|
3822
3819
|
$viewportScrollContainerX[0].scrollLeft = scrollLeft;
|
|
@@ -3952,7 +3949,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
3952
3949
|
if (!cacheEntry.cellNodesByColumnIdx.hasOwnProperty(column)) {
|
|
3953
3950
|
continue;
|
|
3954
3951
|
}
|
|
3955
|
-
|
|
3952
|
+
let columnIdx = parseInt(column, 10) | 0;
|
|
3956
3953
|
var m = columns[columnIdx];
|
|
3957
3954
|
var processedStatus = postProcessedRows[row][columnIdx]; // c=cleanup and re-render, R=rendered
|
|
3958
3955
|
if (m.asyncPostRender && processedStatus !== "R") {
|
|
@@ -4043,17 +4040,17 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
4043
4040
|
function flashCell(row, cell, speed, times) {
|
|
4044
4041
|
speed = speed || 100;
|
|
4045
4042
|
if (rowsCache[row]) {
|
|
4046
|
-
|
|
4047
|
-
|
|
4043
|
+
let $cell = $(getCellNode(row, cell));
|
|
4044
|
+
let toggleCellClass = (remaining) => {
|
|
4048
4045
|
if (!remaining) {
|
|
4049
4046
|
return;
|
|
4050
4047
|
}
|
|
4051
|
-
$
|
|
4052
|
-
setTimeout(
|
|
4053
|
-
|
|
4048
|
+
$cell.toggleClass(options.cellFlashingCssClass);
|
|
4049
|
+
setTimeout(() => {
|
|
4050
|
+
toggleCellClass(remaining - 1);
|
|
4054
4051
|
}, speed);
|
|
4055
4052
|
};
|
|
4056
|
-
|
|
4053
|
+
toggleCellClass((times || 4) * 2);
|
|
4057
4054
|
}
|
|
4058
4055
|
}
|
|
4059
4056
|
function handleDragInit(e, dd) {
|
|
@@ -4421,7 +4418,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
4421
4418
|
makeActiveCellNormal();
|
|
4422
4419
|
$(activeCellNode).removeClass("active");
|
|
4423
4420
|
if (rowsCache[activeRow]) {
|
|
4424
|
-
rowsCache[activeRow].rowNode.forEach(
|
|
4421
|
+
rowsCache[activeRow].rowNode.forEach(x => x.classList.remove("active")); // $(rowsCache[activeRow].rowNode).removeClass("active");
|
|
4425
4422
|
}
|
|
4426
4423
|
}
|
|
4427
4424
|
var activeCellChanged = (activeCellNode !== newCell);
|
|
@@ -4436,19 +4433,19 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
4436
4433
|
? $canvasTopL.height()
|
|
4437
4434
|
: frozenRowsHeight;
|
|
4438
4435
|
}
|
|
4439
|
-
|
|
4436
|
+
let cell = getCellFromPoint($activeCellOffset.left, Math.ceil($activeCellOffset.top) - rowOffset);
|
|
4440
4437
|
activeRow = cell.row;
|
|
4441
4438
|
activeCell = activePosX = activeCell = activePosX = getCellFromNode(activeCellNode);
|
|
4442
4439
|
$activeCellNode.addClass("active");
|
|
4443
4440
|
if (rowsCache[activeRow]) {
|
|
4444
|
-
rowsCache[activeRow].rowNode.forEach(
|
|
4441
|
+
rowsCache[activeRow].rowNode.forEach(x => x.classList.add("active")); // $(rowsCache[activeRow].rowNode).addClass('active');
|
|
4445
4442
|
}
|
|
4446
4443
|
if (opt_editMode == null) {
|
|
4447
4444
|
opt_editMode = (activeRow == getDataLength()) || options.autoEdit;
|
|
4448
4445
|
}
|
|
4449
4446
|
if (options.showCellSelection) {
|
|
4450
4447
|
$(activeCellNode).addClass("active");
|
|
4451
|
-
rowsCache[activeRow].rowNode.forEach(
|
|
4448
|
+
rowsCache[activeRow].rowNode.forEach(x => x.classList.add("active")); // $(rowsCache[activeRow].rowNode).addClass("active");
|
|
4452
4449
|
}
|
|
4453
4450
|
if (options.editable && opt_editMode && isCellPotentiallyEditable(activeRow, activeCell)) {
|
|
4454
4451
|
clearTimeout(h_editorLoader);
|
|
@@ -4519,8 +4516,8 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
4519
4516
|
var formatterResult = formatter(activeRow, activeCell, getDataItemValueForColumn(d, column), column, d, self);
|
|
4520
4517
|
applyFormatResultToCellNode(formatterResult, activeCellNode);
|
|
4521
4518
|
if (self.onAppendCell.countHandlers() > 0) {
|
|
4522
|
-
|
|
4523
|
-
|
|
4519
|
+
let item = getDataItem(activeRow);
|
|
4520
|
+
let value = getDataItemValueForColumn(item, columns[activeCell]);
|
|
4524
4521
|
trigger(self.onAppendCell, {
|
|
4525
4522
|
row: activeRow, cell: activeCell,
|
|
4526
4523
|
value: value, item: item,
|