@toolbox-web/grid 1.3.0 → 1.4.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 (82) hide show
  1. package/all.d.ts +1 -0
  2. package/all.d.ts.map +1 -1
  3. package/all.js +997 -710
  4. package/all.js.map +1 -1
  5. package/index.js +642 -599
  6. package/index.js.map +1 -1
  7. package/lib/core/grid.d.ts.map +1 -1
  8. package/lib/core/internal/header.d.ts +7 -0
  9. package/lib/core/internal/header.d.ts.map +1 -1
  10. package/lib/core/types.d.ts +151 -0
  11. package/lib/core/types.d.ts.map +1 -1
  12. package/lib/plugins/clipboard/index.js +19 -16
  13. package/lib/plugins/clipboard/index.js.map +1 -1
  14. package/lib/plugins/column-virtualization/index.js +42 -39
  15. package/lib/plugins/column-virtualization/index.js.map +1 -1
  16. package/lib/plugins/context-menu/index.js +25 -22
  17. package/lib/plugins/context-menu/index.js.map +1 -1
  18. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  19. package/lib/plugins/editing/index.js +53 -48
  20. package/lib/plugins/editing/index.js.map +1 -1
  21. package/lib/plugins/export/index.js +23 -20
  22. package/lib/plugins/export/index.js.map +1 -1
  23. package/lib/plugins/filtering/FilteringPlugin.d.ts +11 -1
  24. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  25. package/lib/plugins/filtering/index.js +186 -150
  26. package/lib/plugins/filtering/index.js.map +1 -1
  27. package/lib/plugins/grouping-columns/index.js +21 -18
  28. package/lib/plugins/grouping-columns/index.js.map +1 -1
  29. package/lib/plugins/grouping-rows/index.js +67 -64
  30. package/lib/plugins/grouping-rows/index.js.map +1 -1
  31. package/lib/plugins/master-detail/index.js +52 -49
  32. package/lib/plugins/master-detail/index.js.map +1 -1
  33. package/lib/plugins/multi-sort/index.js +18 -15
  34. package/lib/plugins/multi-sort/index.js.map +1 -1
  35. package/lib/plugins/pinned-columns/index.js +25 -22
  36. package/lib/plugins/pinned-columns/index.js.map +1 -1
  37. package/lib/plugins/pinned-rows/index.js +26 -23
  38. package/lib/plugins/pinned-rows/index.js.map +1 -1
  39. package/lib/plugins/pivot/index.js +50 -47
  40. package/lib/plugins/pivot/index.js.map +1 -1
  41. package/lib/plugins/print/PrintPlugin.d.ts +98 -0
  42. package/lib/plugins/print/PrintPlugin.d.ts.map +1 -0
  43. package/lib/plugins/print/index.d.ts +10 -0
  44. package/lib/plugins/print/index.d.ts.map +1 -0
  45. package/lib/plugins/print/index.js +626 -0
  46. package/lib/plugins/print/index.js.map +1 -0
  47. package/lib/plugins/print/print-isolated.d.ts +26 -0
  48. package/lib/plugins/print/print-isolated.d.ts.map +1 -0
  49. package/lib/plugins/print/types.d.ts +147 -0
  50. package/lib/plugins/print/types.d.ts.map +1 -0
  51. package/lib/plugins/reorder/index.js +25 -22
  52. package/lib/plugins/reorder/index.js.map +1 -1
  53. package/lib/plugins/responsive/index.js +20 -17
  54. package/lib/plugins/responsive/index.js.map +1 -1
  55. package/lib/plugins/row-reorder/index.js +39 -36
  56. package/lib/plugins/row-reorder/index.js.map +1 -1
  57. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  58. package/lib/plugins/selection/index.js +115 -101
  59. package/lib/plugins/selection/index.js.map +1 -1
  60. package/lib/plugins/server-side/index.js +35 -32
  61. package/lib/plugins/server-side/index.js.map +1 -1
  62. package/lib/plugins/tree/index.js +26 -23
  63. package/lib/plugins/tree/index.js.map +1 -1
  64. package/lib/plugins/undo-redo/index.js +23 -20
  65. package/lib/plugins/undo-redo/index.js.map +1 -1
  66. package/lib/plugins/visibility/index.js +22 -19
  67. package/lib/plugins/visibility/index.js.map +1 -1
  68. package/package.json +1 -1
  69. package/public.d.ts +1 -1
  70. package/public.d.ts.map +1 -1
  71. package/umd/grid.all.umd.js +98 -24
  72. package/umd/grid.all.umd.js.map +1 -1
  73. package/umd/grid.umd.js +11 -11
  74. package/umd/grid.umd.js.map +1 -1
  75. package/umd/plugins/editing.umd.js +1 -1
  76. package/umd/plugins/editing.umd.js.map +1 -1
  77. package/umd/plugins/filtering.umd.js +1 -1
  78. package/umd/plugins/filtering.umd.js.map +1 -1
  79. package/umd/plugins/print.umd.js +76 -0
  80. package/umd/plugins/print.umd.js.map +1 -0
  81. package/umd/plugins/selection.umd.js +2 -2
  82. package/umd/plugins/selection.umd.js.map +1 -1
@@ -1,4 +1,4 @@
1
- const h = {
1
+ const d = '<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>', g = {
2
2
  expand: "▶",
3
3
  collapse: "▼",
4
4
  sortAsc: "▲",
@@ -6,12 +6,15 @@ const h = {
6
6
  sortNone: "⇅",
7
7
  submenuArrow: "▶",
8
8
  dragHandle: "⋮⋮",
9
- toolPanel: "☰"
10
- }, g = {
9
+ toolPanel: "☰",
10
+ filter: d,
11
+ filterActive: d,
12
+ print: "🖨️"
13
+ }, y = {
11
14
  /** Ask if a column can be moved. Context: ColumnConfig. Response: boolean | undefined */
12
15
  CAN_MOVE_COLUMN: "canMoveColumn"
13
16
  };
14
- class y {
17
+ class m {
15
18
  /**
16
19
  * Plugin dependencies - declare other plugins this one requires.
17
20
  *
@@ -235,7 +238,7 @@ class y {
235
238
  */
236
239
  get gridIcons() {
237
240
  const t = this.grid?.gridConfig?.icons ?? {};
238
- return { ...h, ...t };
241
+ return { ...g, ...t };
239
242
  }
240
243
  // #region Animation Helpers
241
244
  /**
@@ -311,16 +314,16 @@ class y {
311
314
  }
312
315
  // #endregion
313
316
  }
314
- function m(r) {
317
+ function p(r) {
315
318
  return r.filter((t) => t.sticky === "left");
316
319
  }
317
- function p(r) {
320
+ function k(r) {
318
321
  return r.filter((t) => t.sticky === "right");
319
322
  }
320
- function d(r) {
323
+ function a(r) {
321
324
  return r.some((t) => t.sticky === "left" || t.sticky === "right");
322
325
  }
323
- function a(r, t) {
326
+ function u(r, t) {
324
327
  const e = Array.from(r.querySelectorAll(".header-row .cell"));
325
328
  if (!e.length) return;
326
329
  const s = /* @__PURE__ */ new Map();
@@ -344,12 +347,12 @@ function a(r, t) {
344
347
  }), f += i.offsetWidth);
345
348
  }
346
349
  }
347
- function u(r) {
350
+ function h(r) {
348
351
  r.querySelectorAll(".sticky-left, .sticky-right").forEach((e) => {
349
352
  e.classList.remove("sticky-left", "sticky-right"), e.style.position = "", e.style.left = "", e.style.right = "";
350
353
  });
351
354
  }
352
- class k extends y {
355
+ class C extends m {
353
356
  /**
354
357
  * Plugin manifest - declares owned properties for configuration validation.
355
358
  * @internal
@@ -387,25 +390,25 @@ class k extends y {
387
390
  */
388
391
  static detect(t, e) {
389
392
  const s = e?.columns;
390
- return Array.isArray(s) ? d(s) : !1;
393
+ return Array.isArray(s) ? a(s) : !1;
391
394
  }
392
395
  // #endregion
393
396
  // #region Hooks
394
397
  /** @internal */
395
398
  processColumns(t) {
396
- return this.isApplied = d([...t]), [...t];
399
+ return this.isApplied = a([...t]), [...t];
397
400
  }
398
401
  /** @internal */
399
402
  afterRender() {
400
403
  if (!this.isApplied)
401
404
  return;
402
405
  const t = this.grid, e = [...this.columns];
403
- if (!d(e)) {
404
- u(t), this.isApplied = !1;
406
+ if (!a(e)) {
407
+ h(t), this.isApplied = !1;
405
408
  return;
406
409
  }
407
410
  queueMicrotask(() => {
408
- a(t, e);
411
+ u(t, e);
409
412
  });
410
413
  }
411
414
  /**
@@ -414,7 +417,7 @@ class k extends y {
414
417
  */
415
418
  onPluginQuery(t) {
416
419
  switch (t.type) {
417
- case g.CAN_MOVE_COLUMN: {
420
+ case y.CAN_MOVE_COLUMN: {
418
421
  const e = t.context, s = e.sticky;
419
422
  if (s === "left" || s === "right")
420
423
  return !1;
@@ -432,27 +435,27 @@ class k extends y {
432
435
  */
433
436
  refreshStickyOffsets() {
434
437
  const t = [...this.columns];
435
- a(this.grid, t);
438
+ u(this.grid, t);
436
439
  }
437
440
  /**
438
441
  * Get columns pinned to the left.
439
442
  */
440
443
  getLeftPinnedColumns() {
441
444
  const t = [...this.columns];
442
- return m(t);
445
+ return p(t);
443
446
  }
444
447
  /**
445
448
  * Get columns pinned to the right.
446
449
  */
447
450
  getRightPinnedColumns() {
448
451
  const t = [...this.columns];
449
- return p(t);
452
+ return k(t);
450
453
  }
451
454
  /**
452
455
  * Clear all sticky positioning.
453
456
  */
454
457
  clearStickyPositions() {
455
- u(this.grid);
458
+ h(this.grid);
456
459
  }
457
460
  /**
458
461
  * Report horizontal scroll boundary offsets for pinned columns.
@@ -480,6 +483,6 @@ class k extends y {
480
483
  // #endregion
481
484
  }
482
485
  export {
483
- k as PinnedColumnsPlugin
486
+ C as PinnedColumnsPlugin
484
487
  };
485
488
  //# sourceMappingURL=index.js.map