@toolbox-web/grid 2.13.0 → 2.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 (75) hide show
  1. package/all.js +2 -2
  2. package/all.js.map +1 -1
  3. package/custom-elements.json +18 -0
  4. package/index.js +1 -1
  5. package/index.js.map +1 -1
  6. package/lib/core/grid.d.ts +23 -0
  7. package/lib/core/internal/style-injector.d.ts +0 -8
  8. package/lib/core/types.d.ts +32 -0
  9. package/lib/plugins/clipboard/index.js.map +1 -1
  10. package/lib/plugins/column-virtualization/index.js.map +1 -1
  11. package/lib/plugins/context-menu/index.js.map +1 -1
  12. package/lib/plugins/editing/index.js.map +1 -1
  13. package/lib/plugins/export/index.js.map +1 -1
  14. package/lib/plugins/filtering/index.js +1 -1
  15. package/lib/plugins/filtering/index.js.map +1 -1
  16. package/lib/plugins/filtering/types.d.ts +0 -28
  17. package/lib/plugins/grouping-columns/index.js.map +1 -1
  18. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +53 -2
  19. package/lib/plugins/grouping-rows/index.js +2 -2
  20. package/lib/plugins/grouping-rows/index.js.map +1 -1
  21. package/lib/plugins/grouping-rows/types.d.ts +10 -8
  22. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +0 -1
  23. package/lib/plugins/master-detail/index.js +1 -1
  24. package/lib/plugins/master-detail/index.js.map +1 -1
  25. package/lib/plugins/master-detail/types.d.ts +0 -2
  26. package/lib/plugins/multi-sort/index.js.map +1 -1
  27. package/lib/plugins/pinned-columns/index.js.map +1 -1
  28. package/lib/plugins/pinned-rows/index.js.map +1 -1
  29. package/lib/plugins/pivot/index.js.map +1 -1
  30. package/lib/plugins/print/index.js.map +1 -1
  31. package/lib/plugins/reorder-columns/index.js.map +1 -1
  32. package/lib/plugins/reorder-rows/index.js.map +1 -1
  33. package/lib/plugins/responsive/index.js +1 -1
  34. package/lib/plugins/responsive/index.js.map +1 -1
  35. package/lib/plugins/responsive/types.d.ts +11 -2
  36. package/lib/plugins/row-drag-drop/index.js.map +1 -1
  37. package/lib/plugins/selection/index.js.map +1 -1
  38. package/lib/plugins/server-side/datasource-types.d.ts +8 -0
  39. package/lib/plugins/server-side/index.js +1 -1
  40. package/lib/plugins/server-side/index.js.map +1 -1
  41. package/lib/plugins/server-side/types.d.ts +9 -10
  42. package/lib/plugins/sticky-rows/index.js.map +1 -1
  43. package/lib/plugins/tooltip/index.js +1 -1
  44. package/lib/plugins/tooltip/index.js.map +1 -1
  45. package/lib/plugins/tree/index.js.map +1 -1
  46. package/lib/plugins/undo-redo/index.js.map +1 -1
  47. package/lib/plugins/visibility/index.js +1 -1
  48. package/lib/plugins/visibility/index.js.map +1 -1
  49. package/lib/plugins/visibility/types.d.ts +5 -10
  50. package/lib/plugins/visibility/visibility.d.ts +5 -3
  51. package/package.json +1 -1
  52. package/themes/dg-theme-bootstrap.css +2 -2
  53. package/themes/dg-theme-contrast.css +1 -1
  54. package/themes/dg-theme-large.css +1 -1
  55. package/themes/dg-theme-material.css +2 -2
  56. package/themes/dg-theme-standard.css +1 -1
  57. package/themes/dg-theme-vibrant.css +1 -1
  58. package/umd/grid.all.umd.js +1 -1
  59. package/umd/grid.all.umd.js.map +1 -1
  60. package/umd/grid.umd.js +1 -1
  61. package/umd/grid.umd.js.map +1 -1
  62. package/umd/plugins/filtering.umd.js +1 -1
  63. package/umd/plugins/filtering.umd.js.map +1 -1
  64. package/umd/plugins/grouping-rows.umd.js +1 -1
  65. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  66. package/umd/plugins/master-detail.umd.js +1 -1
  67. package/umd/plugins/master-detail.umd.js.map +1 -1
  68. package/umd/plugins/responsive.umd.js +1 -1
  69. package/umd/plugins/responsive.umd.js.map +1 -1
  70. package/umd/plugins/server-side.umd.js +1 -1
  71. package/umd/plugins/server-side.umd.js.map +1 -1
  72. package/umd/plugins/tooltip.umd.js +1 -1
  73. package/umd/plugins/tooltip.umd.js.map +1 -1
  74. package/umd/plugins/visibility.umd.js +1 -1
  75. package/umd/plugins/visibility.umd.js.map +1 -1
@@ -10,6 +10,29 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
10
10
  static readonly tagName = "tbw-grid";
11
11
  /** Version of the grid component, injected at build time from package.json */
12
12
  static readonly version: string;
13
+ /**
14
+ * Tag name this bundle should render and query for.
15
+ *
16
+ * In the common (single-version) case this equals {@link tagName}
17
+ * (`'tbw-grid'`).
18
+ *
19
+ * Resolution rules (see `registerDataGrid()` at the bottom of this file):
20
+ * - **No existing registration** → this class registers under `tbw-grid`;
21
+ * `activeTag === 'tbw-grid'`.
22
+ * - **Existing registration at the SAME version** → this class is NOT
23
+ * redefined (the first-loaded bundle's class keeps the registration),
24
+ * and `activeTag` still points at `'tbw-grid'` so adapters render the
25
+ * shared element. Note that in this branch `customElements.get(activeTag)`
26
+ * returns the OTHER bundle's class, not this one.
27
+ * - **Existing registration at a DIFFERENT version** → this class
28
+ * registers under a version-suffixed tag like `tbw-grid-v2-14-0` and
29
+ * `activeTag` reflects that suffixed name; the two implementations
30
+ * coexist on the page.
31
+ *
32
+ * Adapters and consumers that need to construct or query for the grid
33
+ * element MUST use this property, not the hard-coded `tagName` literal.
34
+ */
35
+ static activeTag: string;
13
36
  /**
14
37
  * Registry of framework adapters that handle converting light DOM elements
15
38
  * to functional renderers/editors. Framework libraries (Angular, React, Vue)
@@ -1,11 +1,3 @@
1
- /**
2
- * Style Injector Module
3
- *
4
- * Handles injection of grid and plugin styles into the document.
5
- * Uses a singleton pattern to avoid duplicate injection across multiple grid instances.
6
- *
7
- * @module internal/style-injector
8
- */
9
1
  /**
10
2
  * Add plugin styles to the accumulated plugin styles map.
11
3
  * Returns true if any new styles were added.
@@ -1607,6 +1607,38 @@ export interface FrameworkAdapter {
1607
1607
  * @param cellEl - The cell element whose content is being released
1608
1608
  */
1609
1609
  releaseCell?(cellEl: HTMLElement): void;
1610
+ /**
1611
+ * Open a teardown batch. Grid core wraps multi-cell teardown sequences
1612
+ * (e.g., `_clearRowPool`, row-pool shrink, full row rebuild) where every
1613
+ * affected cell will be detached from the DOM before the batch ends.
1614
+ *
1615
+ * Adapters that normally synchronously commit framework teardown per
1616
+ * `releaseCell` (React's `flushSync`) should defer those commits until
1617
+ * the matching {@link endBatch} call. Detached containers can then be
1618
+ * pruned without emitting per-cell render warnings.
1619
+ *
1620
+ * Calls may nest; adapters MUST track depth and only flush on the
1621
+ * outermost {@link endBatch}.
1622
+ *
1623
+ * @param gridEl - The grid element whose adapter-managed cells are
1624
+ * being torn down. Adapters that key state per grid (e.g. one
1625
+ * PortalManager per grid) should scope the batch to this element.
1626
+ * Omitted only by callers without a grid reference.
1627
+ *
1628
+ * @since 2.14.0
1629
+ */
1630
+ beginBatch?(gridEl?: HTMLElement): void;
1631
+ /**
1632
+ * Close a teardown batch opened by {@link beginBatch}. Adapters should
1633
+ * flush any deferred framework commits here (or rely on render-time
1634
+ * detached-container filtering for adapters that don't need a flush).
1635
+ *
1636
+ * @param gridEl - Must match the element passed to the paired
1637
+ * {@link beginBatch} call.
1638
+ *
1639
+ * @since 2.14.0
1640
+ */
1641
+ endBatch?(gridEl?: HTMLElement): void;
1610
1642
  /**
1611
1643
  * Unmount a specific framework container and free its resources.
1612
1644
  *