@toolbox-web/grid 1.16.0 → 1.17.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 (50) hide show
  1. package/all.js +13 -13
  2. package/all.js.map +1 -1
  3. package/index.js +384 -359
  4. package/index.js.map +1 -1
  5. package/lib/core/grid.d.ts +1 -1
  6. package/lib/core/grid.d.ts.map +1 -1
  7. package/lib/core/internal/event-delegation.d.ts.map +1 -1
  8. package/lib/core/internal/keyboard.d.ts.map +1 -1
  9. package/lib/core/internal/shell.d.ts +11 -0
  10. package/lib/core/internal/shell.d.ts.map +1 -1
  11. package/lib/core/plugin/types.d.ts +1 -0
  12. package/lib/core/plugin/types.d.ts.map +1 -1
  13. package/lib/core/types.d.ts +8 -1
  14. package/lib/core/types.d.ts.map +1 -1
  15. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  16. package/lib/plugins/clipboard/copy.d.ts.map +1 -1
  17. package/lib/plugins/clipboard/index.js +55 -55
  18. package/lib/plugins/clipboard/index.js.map +1 -1
  19. package/lib/plugins/column-virtualization/index.js.map +1 -1
  20. package/lib/plugins/context-menu/index.js.map +1 -1
  21. package/lib/plugins/editing/index.js.map +1 -1
  22. package/lib/plugins/export/index.js.map +1 -1
  23. package/lib/plugins/filtering/index.js.map +1 -1
  24. package/lib/plugins/grouping-columns/index.js.map +1 -1
  25. package/lib/plugins/grouping-rows/index.js.map +1 -1
  26. package/lib/plugins/master-detail/index.js.map +1 -1
  27. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
  28. package/lib/plugins/multi-sort/index.js +31 -31
  29. package/lib/plugins/multi-sort/index.js.map +1 -1
  30. package/lib/plugins/pinned-columns/index.js.map +1 -1
  31. package/lib/plugins/pinned-rows/index.js.map +1 -1
  32. package/lib/plugins/pivot/index.js.map +1 -1
  33. package/lib/plugins/print/index.js.map +1 -1
  34. package/lib/plugins/reorder/index.js.map +1 -1
  35. package/lib/plugins/responsive/index.js.map +1 -1
  36. package/lib/plugins/row-reorder/index.js.map +1 -1
  37. package/lib/plugins/selection/index.js.map +1 -1
  38. package/lib/plugins/server-side/index.js.map +1 -1
  39. package/lib/plugins/tree/index.js.map +1 -1
  40. package/lib/plugins/undo-redo/index.js.map +1 -1
  41. package/lib/plugins/visibility/index.js.map +1 -1
  42. package/package.json +1 -1
  43. package/umd/grid.all.umd.js +20 -20
  44. package/umd/grid.all.umd.js.map +1 -1
  45. package/umd/grid.umd.js +10 -10
  46. package/umd/grid.umd.js.map +1 -1
  47. package/umd/plugins/clipboard.umd.js +4 -4
  48. package/umd/plugins/clipboard.umd.js.map +1 -1
  49. package/umd/plugins/multi-sort.umd.js +1 -1
  50. package/umd/plugins/multi-sort.umd.js.map +1 -1
package/all.js CHANGED
@@ -17,11 +17,12 @@ function Rt(a) {
17
17
  async function St(a) {
18
18
  try {
19
19
  return await navigator.clipboard.writeText(a), !0;
20
- } catch {
21
- const e = document.createElement("textarea");
22
- e.value = a, e.style.position = "fixed", e.style.opacity = "0", e.style.pointerEvents = "none", document.body.appendChild(e), e.select();
23
- const t = document.execCommand("copy");
24
- return document.body.removeChild(e), t;
20
+ } catch (e) {
21
+ console.warn("[copyToClipboard] Clipboard API failed:", e);
22
+ const t = document.createElement("textarea");
23
+ t.value = a, t.style.position = "fixed", t.style.opacity = "0", t.style.pointerEvents = "none", document.body.appendChild(t), t.select();
24
+ const i = document.execCommand("copy");
25
+ return document.body.removeChild(t), i;
25
26
  }
26
27
  }
27
28
  function Ae(a, e) {
@@ -84,17 +85,15 @@ class _n extends I {
84
85
  }
85
86
  lastCopied = null;
86
87
  attach(e) {
87
- super.attach(e), e.addEventListener(
88
- "paste",
89
- (t) => this.#e(t),
90
- { signal: this.disconnectSignal }
91
- );
88
+ super.attach(e), e.addEventListener("paste", (i) => this.#e(i), {
89
+ signal: this.disconnectSignal
90
+ });
92
91
  }
93
92
  detach() {
94
93
  this.lastCopied = null;
95
94
  }
96
95
  onKeyDown(e) {
97
- return (e.ctrlKey || e.metaKey) && e.key === "c" ? (this.#t(e.target), !0) : !1;
96
+ return (e.ctrlKey || e.metaKey) && e.key === "c" ? (e.preventDefault(), this.#t(e.target), !0) : !1;
98
97
  }
99
98
  #t(e) {
100
99
  const t = this.#r();
@@ -182,7 +181,8 @@ class _n extends I {
182
181
  }
183
182
  async copy(e) {
184
183
  const { columns: t, rows: i } = this.#i(e);
185
- if (t.length === 0 || i.length === 0) return "";
184
+ if (t.length === 0 || i.length === 0)
185
+ return "";
186
186
  const n = this.#n(t, i, e);
187
187
  return await St(n), this.lastCopied = { text: n, timestamp: Date.now() }, this.emit("copy", {
188
188
  text: n,
@@ -3284,7 +3284,7 @@ class Dn extends I {
3284
3284
  g.className = "sort-index", g.textContent = String(o), c.nextSibling ? n.insertBefore(g, c.nextSibling) : n.appendChild(g);
3285
3285
  }
3286
3286
  } else
3287
- n.removeAttribute("data-sort");
3287
+ n.removeAttribute("data-sort"), n.querySelector('[part~="sort-indicator"], .sort-indicator')?.remove();
3288
3288
  });
3289
3289
  }
3290
3290
  getSortModel() {