@toolbox-web/grid 1.13.0 → 1.14.0

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.
Files changed (81) hide show
  1. package/all.js +1483 -1403
  2. package/all.js.map +1 -1
  3. package/index.js +11 -4
  4. package/index.js.map +1 -1
  5. package/lib/core/internal/row-animation.d.ts.map +1 -1
  6. package/lib/core/plugin/types.d.ts +1 -1
  7. package/lib/core/plugin/types.d.ts.map +1 -1
  8. package/lib/core/types.d.ts +44 -1
  9. package/lib/core/types.d.ts.map +1 -1
  10. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +69 -8
  11. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  12. package/lib/plugins/clipboard/index.d.ts +1 -1
  13. package/lib/plugins/clipboard/index.d.ts.map +1 -1
  14. package/lib/plugins/clipboard/index.js +257 -192
  15. package/lib/plugins/clipboard/index.js.map +1 -1
  16. package/lib/plugins/clipboard/types.d.ts +31 -0
  17. package/lib/plugins/clipboard/types.d.ts.map +1 -1
  18. package/lib/plugins/column-virtualization/index.js.map +1 -1
  19. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +8 -0
  20. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  21. package/lib/plugins/context-menu/index.js +75 -60
  22. package/lib/plugins/context-menu/index.js.map +1 -1
  23. package/lib/plugins/context-menu/types.d.ts +7 -0
  24. package/lib/plugins/context-menu/types.d.ts.map +1 -1
  25. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  26. package/lib/plugins/editing/editors.d.ts +2 -2
  27. package/lib/plugins/editing/editors.d.ts.map +1 -1
  28. package/lib/plugins/editing/index.js +420 -381
  29. package/lib/plugins/editing/index.js.map +1 -1
  30. package/lib/plugins/editing/types.d.ts +6 -23
  31. package/lib/plugins/editing/types.d.ts.map +1 -1
  32. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
  33. package/lib/plugins/export/index.js +75 -66
  34. package/lib/plugins/export/index.js.map +1 -1
  35. package/lib/plugins/filtering/index.d.ts +1 -1
  36. package/lib/plugins/filtering/index.d.ts.map +1 -1
  37. package/lib/plugins/filtering/index.js.map +1 -1
  38. package/lib/plugins/grouping-columns/index.js.map +1 -1
  39. package/lib/plugins/grouping-rows/index.js.map +1 -1
  40. package/lib/plugins/master-detail/index.js.map +1 -1
  41. package/lib/plugins/multi-sort/index.js.map +1 -1
  42. package/lib/plugins/pinned-columns/index.js.map +1 -1
  43. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +1 -0
  44. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
  45. package/lib/plugins/pinned-rows/index.js +118 -87
  46. package/lib/plugins/pinned-rows/index.js.map +1 -1
  47. package/lib/plugins/pinned-rows/pinned-rows.d.ts +2 -1
  48. package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +1 -1
  49. package/lib/plugins/pinned-rows/types.d.ts +23 -2
  50. package/lib/plugins/pinned-rows/types.d.ts.map +1 -1
  51. package/lib/plugins/pivot/index.js.map +1 -1
  52. package/lib/plugins/print/index.js.map +1 -1
  53. package/lib/plugins/reorder/index.js.map +1 -1
  54. package/lib/plugins/responsive/index.js.map +1 -1
  55. package/lib/plugins/row-reorder/index.js.map +1 -1
  56. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  57. package/lib/plugins/selection/index.js +147 -139
  58. package/lib/plugins/selection/index.js.map +1 -1
  59. package/lib/plugins/server-side/index.js.map +1 -1
  60. package/lib/plugins/shared/data-collection.d.ts +33 -0
  61. package/lib/plugins/shared/data-collection.d.ts.map +1 -0
  62. package/lib/plugins/tree/index.js.map +1 -1
  63. package/lib/plugins/undo-redo/index.js.map +1 -1
  64. package/lib/plugins/visibility/index.js.map +1 -1
  65. package/package.json +1 -1
  66. package/umd/grid.all.umd.js +23 -23
  67. package/umd/grid.all.umd.js.map +1 -1
  68. package/umd/grid.umd.js +2 -2
  69. package/umd/grid.umd.js.map +1 -1
  70. package/umd/plugins/clipboard.umd.js +5 -5
  71. package/umd/plugins/clipboard.umd.js.map +1 -1
  72. package/umd/plugins/context-menu.umd.js +1 -1
  73. package/umd/plugins/context-menu.umd.js.map +1 -1
  74. package/umd/plugins/editing.umd.js +1 -1
  75. package/umd/plugins/editing.umd.js.map +1 -1
  76. package/umd/plugins/export.umd.js +7 -7
  77. package/umd/plugins/export.umd.js.map +1 -1
  78. package/umd/plugins/pinned-rows.umd.js +1 -1
  79. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  80. package/umd/plugins/selection.umd.js +2 -2
  81. package/umd/plugins/selection.umd.js.map +1 -1
@@ -93,6 +93,14 @@ export declare class ContextMenuPlugin extends BaseGridPlugin<ContextMenuConfig>
93
93
  attach(grid: import('../../core/plugin/base-plugin').GridElement): void;
94
94
  /** @internal */
95
95
  detach(): void;
96
+ /**
97
+ * Sync selection with the right-clicked row.
98
+ * If the right-clicked row is already selected, keeps the multi-selection.
99
+ * If not, selects only the right-clicked row (standard behavior in file managers / spreadsheets).
100
+ *
101
+ * @returns Sorted array of selected row indices after sync
102
+ */
103
+ private syncSelectionOnContextMenu;
96
104
  /**
97
105
  * CSS variables to copy from the grid element to the context menu.
98
106
  * Includes both base variables and context-menu specific overrides.
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/context-menu/ContextMenuPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,KAAK,EAAE,iBAAiB,EAAmB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAkCrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACtE,gBAAgB;IAChB,QAAQ,CAAC,IAAI,iBAAiB;IAE9B,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAIjE;IAGD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,WAAW,CAA4B;IAK/C,gBAAgB;IACP,MAAM,CAAC,IAAI,EAAE,OAAO,+BAA+B,EAAE,WAAW,GAAG,IAAI;IAMhF,gBAAgB;IACP,MAAM,IAAI,IAAI;IAavB;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAoCtC;IAEF;;;;OAIG;IACH,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,qBAAqB;IAqC7B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAsB/B,gBAAgB;IACP,WAAW,IAAI,IAAI;IA8F5B;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAoCxE;;OAEG;IACH,QAAQ,IAAI,IAAI;IAQhB;;;OAGG;IACH,UAAU,IAAI,OAAO;CAMtB"}
1
+ {"version":3,"file":"ContextMenuPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/context-menu/ContextMenuPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,KAAK,EAAE,iBAAiB,EAAmB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAkCrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACtE,gBAAgB;IAChB,QAAQ,CAAC,IAAI,iBAAiB;IAE9B,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAIjE;IAGD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,WAAW,CAA4B;IAK/C,gBAAgB;IACP,MAAM,CAAC,IAAI,EAAE,OAAO,+BAA+B,EAAE,WAAW,GAAG,IAAI;IAMhF,gBAAgB;IACP,MAAM,IAAI,IAAI;IAavB;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B;IAoBlC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAoCtC;IAEF;;;;OAIG;IACH,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,qBAAqB;IAqC7B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAsB/B,gBAAgB;IACP,WAAW,IAAI,IAAI;IAoG5B;;;;;OAKG;IACH,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAqCxE;;OAEG;IACH,QAAQ,IAAI,IAAI;IAQhB;;;OAGG;IACH,UAAU,IAAI,OAAO;CAMtB"}
@@ -1,4 +1,4 @@
1
- const y = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', I = {
1
+ const E = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', I = {
2
2
  expand: "▶",
3
3
  collapse: "▼",
4
4
  sortAsc: "▲",
@@ -7,11 +7,11 @@ const y = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentCo
7
7
  submenuArrow: "▶",
8
8
  dragHandle: "⋮⋮",
9
9
  toolPanel: "☰",
10
- filter: y,
11
- filterActive: y,
10
+ filter: E,
11
+ filterActive: E,
12
12
  print: "🖨️"
13
13
  };
14
- class S {
14
+ class R {
15
15
  /**
16
16
  * Plugin dependencies - declare other plugins this one requires.
17
17
  *
@@ -378,19 +378,19 @@ class S {
378
378
  // #endregion
379
379
  }
380
380
  const g = "@layer tbw-plugins{.tbw-context-menu{position:fixed;background:var(--tbw-context-menu-bg, var(--tbw-color-panel-bg));color:var(--tbw-context-menu-fg, var(--tbw-color-fg));border:1px solid var(--tbw-context-menu-border, var(--tbw-color-border));border-radius:var(--tbw-context-menu-radius, var(--tbw-border-radius));box-shadow:var(--tbw-context-menu-shadow, 0 2px 10px var(--tbw-color-shadow));min-width:var(--tbw-context-menu-min-width, var(--tbw-menu-min-width));padding:var(--tbw-spacing-xs) 0;z-index:10000;font-size:var(--tbw-context-menu-font-size, var(--tbw-font-size-sm));font-family:var(--tbw-context-menu-font-family, var(--tbw-font-family))}.tbw-context-menu-item{display:flex;align-items:center;padding:var(--tbw-context-menu-item-padding, var(--tbw-menu-item-padding));cursor:pointer;gap:var(--tbw-context-menu-item-gap, var(--tbw-menu-item-gap))}.tbw-context-menu-item:hover:not(.disabled){background:var(--tbw-context-menu-hover, var(--tbw-color-row-hover))}.tbw-context-menu-item.disabled{opacity:.5;cursor:default}.tbw-context-menu-item.danger{color:var(--tbw-context-menu-danger, var(--tbw-color-danger))}.tbw-context-menu-icon{width:var(--tbw-context-menu-icon-size, var(--tbw-icon-size));text-align:center}.tbw-context-menu-label{flex:1}.tbw-context-menu-shortcut{color:var(--tbw-context-menu-muted, var(--tbw-color-fg-muted));font-size:var(--tbw-context-menu-shortcut-size, var(--tbw-font-size-xs))}.tbw-context-menu-arrow{font-size:var(--tbw-context-menu-arrow-size, var(--tbw-font-size-2xs));color:var(--tbw-context-menu-muted, var(--tbw-color-fg-muted))}.tbw-context-menu-separator{height:1px;background:var(--tbw-context-menu-border, var(--tbw-color-border));margin:var(--tbw-spacing-xs) 0}}";
381
- function x(s, e) {
382
- return (typeof s == "function" ? s(e) : s).filter((n) => !(n.hidden === !0 || typeof n.hidden == "function" && n.hidden(e)));
381
+ function x(r, e) {
382
+ return (typeof r == "function" ? r(e) : r).filter((n) => !(n.hidden === !0 || typeof n.hidden == "function" && n.hidden(e)));
383
383
  }
384
- function z(s, e) {
385
- return s.disabled === !0 ? !0 : typeof s.disabled == "function" ? s.disabled(e) : !1;
384
+ function z(r, e) {
385
+ return r.disabled === !0 ? !0 : typeof r.disabled == "function" ? r.disabled(e) : !1;
386
386
  }
387
- function v(s, e, t, n = I.submenuArrow) {
388
- const r = document.createElement("div");
389
- r.className = "tbw-context-menu", r.setAttribute("role", "menu");
390
- for (const o of s) {
387
+ function v(r, e, t, n = I.submenuArrow) {
388
+ const s = document.createElement("div");
389
+ s.className = "tbw-context-menu", s.setAttribute("role", "menu");
390
+ for (const o of r) {
391
391
  if (o.separator) {
392
392
  const l = document.createElement("div");
393
- l.className = "tbw-context-menu-separator", l.setAttribute("role", "separator"), r.appendChild(l);
393
+ l.className = "tbw-context-menu-separator", l.setAttribute("role", "separator"), s.appendChild(l);
394
394
  continue;
395
395
  }
396
396
  const i = document.createElement("div");
@@ -400,8 +400,8 @@ function v(s, e, t, n = I.submenuArrow) {
400
400
  const l = document.createElement("span");
401
401
  l.className = "tbw-context-menu-icon", l.innerHTML = o.icon, i.appendChild(l);
402
402
  }
403
- const c = document.createElement("span");
404
- if (c.className = "tbw-context-menu-label", c.textContent = o.name, i.appendChild(c), o.shortcut) {
403
+ const a = document.createElement("span");
404
+ if (a.className = "tbw-context-menu-label", a.textContent = o.name, i.appendChild(a), o.shortcut) {
405
405
  const l = document.createElement("span");
406
406
  l.className = "tbw-context-menu-shortcut", l.textContent = o.shortcut, i.appendChild(l);
407
407
  }
@@ -412,21 +412,21 @@ function v(s, e, t, n = I.submenuArrow) {
412
412
  const b = x(o.subMenu, e), d = v(b, e, t, n);
413
413
  d.classList.add("tbw-context-submenu"), d.style.position = "absolute", d.style.left = "100%", d.style.top = "0", i.style.position = "relative", i.appendChild(d);
414
414
  }), i.addEventListener("mouseleave", () => {
415
- const a = i.querySelector(".tbw-context-menu");
416
- a && a.remove();
415
+ const c = i.querySelector(".tbw-context-menu");
416
+ c && c.remove();
417
417
  });
418
418
  }
419
419
  !u && o.action && !o.subMenu && i.addEventListener("click", (l) => {
420
420
  l.stopPropagation(), t(o);
421
- }), r.appendChild(i);
421
+ }), s.appendChild(i);
422
422
  }
423
- return r;
423
+ return s;
424
424
  }
425
- function C(s, e, t) {
426
- s.style.position = "fixed", s.style.left = `${e}px`, s.style.top = `${t}px`, s.style.visibility = "hidden", s.style.zIndex = "10000";
427
- const n = s.getBoundingClientRect(), r = window.innerWidth, o = window.innerHeight;
425
+ function C(r, e, t) {
426
+ r.style.position = "fixed", r.style.left = `${e}px`, r.style.top = `${t}px`, r.style.visibility = "hidden", r.style.zIndex = "10000";
427
+ const n = r.getBoundingClientRect(), s = window.innerWidth, o = window.innerHeight;
428
428
  let i = e, u = t;
429
- e + n.width > r && (i = e - n.width), t + n.height > o && (u = t - n.height), i = Math.max(0, i), u = Math.max(0, u), s.style.left = `${i}px`, s.style.top = `${u}px`, s.style.visibility = "visible";
429
+ e + n.width > s && (i = e - n.width), t + n.height > o && (u = t - n.height), i = Math.max(0, i), u = Math.max(0, u), r.style.left = `${i}px`, r.style.top = `${u}px`, r.style.visibility = "visible";
430
430
  }
431
431
  let h = null, f = null, m = null, w = 0;
432
432
  const p = [
@@ -434,20 +434,20 @@ const p = [
434
434
  id: "copy",
435
435
  name: "Copy",
436
436
  shortcut: "Ctrl+C",
437
- action: (s) => {
438
- s.grid?.plugins?.clipboard?.copy?.();
437
+ action: (r) => {
438
+ r.grid?.plugins?.clipboard?.copy?.();
439
439
  }
440
440
  },
441
441
  { separator: !0, id: "sep1", name: "" },
442
442
  {
443
443
  id: "export-csv",
444
444
  name: "Export CSV",
445
- action: (s) => {
446
- s.grid?.plugins?.export?.exportCsv?.();
445
+ action: (r) => {
446
+ r.grid?.plugins?.export?.exportCsv?.();
447
447
  }
448
448
  }
449
449
  ];
450
- class M extends S {
450
+ class S extends R {
451
451
  /** @internal */
452
452
  name = "contextMenu";
453
453
  /** @internal */
@@ -473,6 +473,18 @@ class M extends S {
473
473
  }
474
474
  // #endregion
475
475
  // #region Private Methods
476
+ /**
477
+ * Sync selection with the right-clicked row.
478
+ * If the right-clicked row is already selected, keeps the multi-selection.
479
+ * If not, selects only the right-clicked row (standard behavior in file managers / spreadsheets).
480
+ *
481
+ * @returns Sorted array of selected row indices after sync
482
+ */
483
+ syncSelectionOnContextMenu(e) {
484
+ if (e < 0) return [];
485
+ const n = this.grid?.query("getSelectedRowIndices")?.[0];
486
+ return n ? n.includes(e) ? n : (this.grid?.query("selectRows", [e]), [e]) : [e];
487
+ }
476
488
  /**
477
489
  * CSS variables to copy from the grid element to the context menu.
478
490
  * Includes both base variables and context-menu specific overrides.
@@ -522,15 +534,15 @@ class M extends S {
522
534
  copyGridStyles(e) {
523
535
  const t = this.gridElement;
524
536
  if (!t) return;
525
- const n = getComputedStyle(t), r = [], o = n.getPropertyValue("color-scheme").trim();
526
- o && r.push(`color-scheme: ${o}`);
527
- for (const i of M.CSS_VARS_TO_COPY) {
537
+ const n = getComputedStyle(t), s = [], o = n.getPropertyValue("color-scheme").trim();
538
+ o && s.push(`color-scheme: ${o}`);
539
+ for (const i of S.CSS_VARS_TO_COPY) {
528
540
  const u = n.getPropertyValue(i).trim();
529
- u && r.push(`${i}: ${u}`);
541
+ u && s.push(`${i}: ${u}`);
530
542
  }
531
- if (r.length > 0) {
543
+ if (s.length > 0) {
532
544
  const i = e.getAttribute("style") || "";
533
- e.setAttribute("style", i + r.join("; ") + ";");
545
+ e.setAttribute("style", i + s.join("; ") + ";");
534
546
  }
535
547
  }
536
548
  installGlobalHandlers() {
@@ -555,46 +567,48 @@ class M extends S {
555
567
  if (!e) return;
556
568
  const t = e.querySelector(".tbw-grid-root");
557
569
  t && t.getAttribute("data-context-menu-bound") !== "true" && (t.setAttribute("data-context-menu-bound", "true"), t.addEventListener("contextmenu", (n) => {
558
- const r = n;
559
- r.preventDefault();
560
- const o = r.target, i = o.closest("[data-row][data-col]"), u = o.closest(".header-cell");
561
- let c;
570
+ const s = n;
571
+ s.preventDefault();
572
+ const o = s.target, i = o.closest("[data-row][data-col]"), u = o.closest(".header-cell");
573
+ let a;
562
574
  if (i) {
563
- const a = parseInt(i.getAttribute("data-row") ?? "-1", 10), b = parseInt(i.getAttribute("data-col") ?? "-1", 10), d = this.columns[b], E = this.rows[a];
564
- c = {
565
- row: E,
566
- rowIndex: a,
575
+ const c = parseInt(i.getAttribute("data-row") ?? "-1", 10), b = parseInt(i.getAttribute("data-col") ?? "-1", 10), d = this.columns[b], y = this.rows[c], M = this.syncSelectionOnContextMenu(c);
576
+ a = {
577
+ row: y,
578
+ rowIndex: c,
567
579
  column: d,
568
580
  columnIndex: b,
569
581
  field: d?.field ?? "",
570
- value: E?.[d?.field] ?? null,
582
+ value: y?.[d?.field] ?? null,
571
583
  isHeader: !1,
572
- event: r
584
+ event: s,
585
+ selectedRows: M
573
586
  };
574
587
  } else if (u) {
575
- const a = parseInt(u.getAttribute("data-col") ?? "-1", 10), b = this.columns[a];
576
- c = {
588
+ const c = parseInt(u.getAttribute("data-col") ?? "-1", 10), b = this.columns[c];
589
+ a = {
577
590
  row: null,
578
591
  rowIndex: -1,
579
592
  column: b,
580
- columnIndex: a,
593
+ columnIndex: c,
581
594
  field: b?.field ?? "",
582
595
  value: null,
583
596
  isHeader: !0,
584
- event: r
597
+ event: s,
598
+ selectedRows: []
585
599
  };
586
600
  } else
587
601
  return;
588
- this.params = c, this.position = { x: r.clientX, y: r.clientY };
589
- const l = x(this.config.items ?? p, c);
602
+ this.params = a, this.position = { x: s.clientX, y: s.clientY };
603
+ const l = x(this.config.items ?? p, a);
590
604
  l.length && (this.menuElement && this.menuElement.remove(), this.menuElement = v(
591
605
  l,
592
- c,
593
- (a) => {
594
- a.action && a.action(c), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
606
+ a,
607
+ (c) => {
608
+ c.action && c.action(a), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
595
609
  },
596
610
  this.gridIcons.submenuArrow
597
- ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), C(this.menuElement, r.clientX, r.clientY), this.isOpen = !0, this.emit("context-menu-open", { params: c, items: l }));
611
+ ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), C(this.menuElement, s.clientX, s.clientY), this.isOpen = !0, this.emit("context-menu-open", { params: a, items: l }));
598
612
  }));
599
613
  }
600
614
  // #endregion
@@ -606,7 +620,7 @@ class M extends S {
606
620
  * @param params - Partial context menu parameters
607
621
  */
608
622
  showMenu(e, t, n) {
609
- const r = {
623
+ const s = {
610
624
  row: n.row ?? null,
611
625
  rowIndex: n.rowIndex ?? -1,
612
626
  column: n.column ?? null,
@@ -614,13 +628,14 @@ class M extends S {
614
628
  field: n.field ?? "",
615
629
  value: n.value ?? null,
616
630
  isHeader: n.isHeader ?? !1,
617
- event: n.event ?? new MouseEvent("contextmenu")
618
- }, o = x(this.config.items ?? p, r);
631
+ event: n.event ?? new MouseEvent("contextmenu"),
632
+ selectedRows: n.selectedRows ?? []
633
+ }, o = x(this.config.items ?? p, s);
619
634
  this.menuElement && this.menuElement.remove(), this.menuElement = v(
620
635
  o,
621
- r,
636
+ s,
622
637
  (i) => {
623
- i.action && i.action(r), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
638
+ i.action && i.action(s), this.menuElement?.remove(), this.menuElement = null, this.isOpen = !1;
624
639
  },
625
640
  this.gridIcons.submenuArrow
626
641
  ), document.body.appendChild(this.menuElement), this.copyGridStyles(this.menuElement), C(this.menuElement, e, t), this.isOpen = !0;
@@ -642,6 +657,6 @@ class M extends S {
642
657
  // Styles are injected globally via installGlobalHandlers() since menu renders in document.body
643
658
  }
644
659
  export {
645
- M as ContextMenuPlugin
660
+ S as ContextMenuPlugin
646
661
  };
647
662
  //# sourceMappingURL=index.js.map