@toolbox-web/grid 2.10.0 → 2.11.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 (44) hide show
  1. package/README.md +15 -15
  2. package/all.js +1 -1
  3. package/all.js.map +1 -1
  4. package/custom-elements.json +10 -0
  5. package/index.js +1 -1
  6. package/index.js.map +1 -1
  7. package/lib/core/grid.d.ts +13 -2
  8. package/lib/core/internal/shell-controller.d.ts +9 -2
  9. package/lib/core/internal/shell.d.ts +10 -0
  10. package/lib/core/plugin/types.d.ts +4 -1
  11. package/lib/core/types.d.ts +4 -1
  12. package/lib/plugins/clipboard/index.js.map +1 -1
  13. package/lib/plugins/column-virtualization/index.js.map +1 -1
  14. package/lib/plugins/context-menu/index.js.map +1 -1
  15. package/lib/plugins/editing/index.js.map +1 -1
  16. package/lib/plugins/export/index.js.map +1 -1
  17. package/lib/plugins/filtering/index.js.map +1 -1
  18. package/lib/plugins/grouping-columns/index.js.map +1 -1
  19. package/lib/plugins/grouping-rows/index.js.map +1 -1
  20. package/lib/plugins/master-detail/index.js.map +1 -1
  21. package/lib/plugins/multi-sort/index.js.map +1 -1
  22. package/lib/plugins/pinned-columns/index.js.map +1 -1
  23. package/lib/plugins/pinned-rows/index.js.map +1 -1
  24. package/lib/plugins/pivot/index.js.map +1 -1
  25. package/lib/plugins/print/index.js.map +1 -1
  26. package/lib/plugins/reorder-columns/index.js.map +1 -1
  27. package/lib/plugins/reorder-rows/index.js.map +1 -1
  28. package/lib/plugins/responsive/index.js.map +1 -1
  29. package/lib/plugins/row-drag-drop/index.js.map +1 -1
  30. package/lib/plugins/selection/index.js.map +1 -1
  31. package/lib/plugins/server-side/index.js.map +1 -1
  32. package/lib/plugins/sticky-rows/index.js.map +1 -1
  33. package/lib/plugins/tooltip/index.js.map +1 -1
  34. package/lib/plugins/tree/index.js.map +1 -1
  35. package/lib/plugins/undo-redo/index.js.map +1 -1
  36. package/lib/plugins/visibility/index.js +1 -1
  37. package/lib/plugins/visibility/index.js.map +1 -1
  38. package/package.json +1 -1
  39. package/umd/grid.all.umd.js +1 -1
  40. package/umd/grid.all.umd.js.map +1 -1
  41. package/umd/grid.umd.js +1 -1
  42. package/umd/grid.umd.js.map +1 -1
  43. package/umd/plugins/visibility.umd.js +1 -1
  44. package/umd/plugins/visibility.umd.js.map +1 -1
@@ -1372,15 +1372,26 @@ export declare class DataGridElement<T = any> extends HTMLElement implements Int
1372
1372
  * Each section can be expanded/collapsed independently.
1373
1373
  *
1374
1374
  * @group Tool Panel
1375
+ * @param panelId - Optional ID of the section to expand on open. When provided,
1376
+ * takes precedence over `shell.toolPanel.defaultOpen`. If the panel is already
1377
+ * open with a different section expanded, switches to the requested section.
1378
+ * If the panel ID is not registered, a warning is emitted and the call falls
1379
+ * back to default behavior (auto-expand `defaultOpen` or first registered panel).
1380
+ *
1375
1381
  * @example
1376
1382
  * ```typescript
1377
- * // Open the tool panel when a toolbar button is clicked
1383
+ * // Open the tool panel with the default / first section expanded.
1378
1384
  * settingsButton.addEventListener('click', () => {
1379
1385
  * grid.openToolPanel();
1380
1386
  * });
1387
+ *
1388
+ * // Open the tool panel and jump straight to a specific section.
1389
+ * filtersButton.addEventListener('click', () => {
1390
+ * grid.openToolPanel('filters');
1391
+ * });
1381
1392
  * ```
1382
1393
  */
1383
- openToolPanel(): void;
1394
+ openToolPanel(panelId?: string): void;
1384
1395
  /**
1385
1396
  * Close the tool panel sidebar.
1386
1397
  *
@@ -12,8 +12,15 @@ export interface ShellController {
12
12
  readonly isPanelOpen: boolean;
13
13
  /** Get IDs of expanded accordion sections */
14
14
  readonly expandedSections: string[];
15
- /** Open the tool panel */
16
- openToolPanel(): void;
15
+ /**
16
+ * Open the tool panel.
17
+ * @param panelId - Optional ID of the section to expand on open. When provided,
18
+ * takes precedence over `shell.toolPanel.defaultOpen`. If the panel is already
19
+ * open with a different section expanded, switches to the requested section.
20
+ * If the panel ID is not registered, a `TBW072` warning is emitted and the
21
+ * call falls back to default behavior (auto-expand `defaultOpen` or first by order).
22
+ */
23
+ openToolPanel(panelId?: string): void;
17
24
  /** Close the tool panel */
18
25
  closeToolPanel(): void;
19
26
  /** Toggle the tool panel */
@@ -21,6 +21,16 @@ export interface ShellState {
21
21
  lightDomTitle: string | null;
22
22
  /** IDs of tool panels registered from light DOM (to avoid re-parsing) */
23
23
  lightDomToolPanelIds: Set<string>;
24
+ /**
25
+ * IDs of light DOM tool panels whose `render` has already been bound to a
26
+ * framework-adapter renderer. Used by `parseLightDomToolPanels` to detect
27
+ * the FIRST adapter attach (which legitimately needs to swap the vanilla
28
+ * fallback for the real adapter renderer and tear down any in-progress
29
+ * render) vs. subsequent re-parses (which must NOT tear down — doing so
30
+ * unmounts the user's React/Vue/Angular component, losing local state and
31
+ * resetting scroll position inside the panel).
32
+ */
33
+ adapterBoundToolPanelIds: Set<string>;
24
34
  /** IDs of toolbar content registered from light DOM (to avoid re-parsing) */
25
35
  lightDomToolbarContentIds: Set<string>;
26
36
  /** IDs of tool panels registered via registerToolPanel API */
@@ -475,8 +475,11 @@ export interface GridElementRef {
475
475
  readonly expandedToolPanelSections: string[];
476
476
  /**
477
477
  * Open the tool panel sidebar (accordion view with all registered panels).
478
+ * @param panelId - Optional ID of the section to expand on open. Takes precedence
479
+ * over `shell.toolPanel.defaultOpen`. If the panel ID is unknown, the call
480
+ * falls back to default behavior with a `TBW072` warning.
478
481
  */
479
- openToolPanel(): void;
482
+ openToolPanel(panelId?: string): void;
480
483
  /**
481
484
  * Close the tool panel sidebar.
482
485
  */
@@ -167,8 +167,11 @@ export interface PublicGrid<T = any> {
167
167
  unregisterToolPanel?(panelId: string): void;
168
168
  /**
169
169
  * Open the tool panel sidebar.
170
+ * @param panelId - Optional ID of the section to expand on open. Takes precedence
171
+ * over `shell.toolPanel.defaultOpen`. Falls back to default behavior with a
172
+ * warning if the ID is not registered.
170
173
  */
171
- openToolPanel?(): void;
174
+ openToolPanel?(panelId?: string): void;
172
175
  /**
173
176
  * Close the tool panel sidebar.
174
177
  */