@toolbox-web/grid 2.16.0 → 2.16.1
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.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/lib/plugins/shell/ShellPlugin.d.ts +26 -0
- package/lib/plugins/shell/index.js +1 -1
- package/lib/plugins/shell/index.js.map +1 -1
- package/lib/plugins/shell/shell-controller.d.ts +20 -0
- package/lib/plugins/shell/shell.d.ts +21 -0
- package/package.json +1 -1
- package/umd/grid.all.umd.js +1 -1
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +1 -1
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/shell.umd.js +1 -1
- package/umd/plugins/shell.umd.js.map +1 -1
|
@@ -32,6 +32,26 @@ export interface ShellController {
|
|
|
32
32
|
* when the panel is currently closed (e.g. `anchor` for dropdown mode).
|
|
33
33
|
*/
|
|
34
34
|
toggleToolPanel(options?: OpenToolPanelOptions): void;
|
|
35
|
+
/**
|
|
36
|
+
* Re-pair an open dropdown popover onto its (possibly recreated) trigger
|
|
37
|
+
* after a re-render (`mode: 'dropdown'` only). A column toggle / reorder may
|
|
38
|
+
* recreate the custom column-header button the popover was anchored to,
|
|
39
|
+
* leaving the popover's `position-anchor` dangling so the browser drops it to
|
|
40
|
+
* the corner.
|
|
41
|
+
*
|
|
42
|
+
* Behaviour:
|
|
43
|
+
* - intact pairing → no-op (cheap fast-path, safe to call every render);
|
|
44
|
+
* - a live `[data-panel-toggle]` exists → re-pair the existing anchor onto it
|
|
45
|
+
* IN PLACE (no popover re-show → no flash), or a fixed-coord re-show when
|
|
46
|
+
* CSS anchor positioning is unavailable;
|
|
47
|
+
* - corner-origin dropdown with no trigger → keep it pinned to the corner;
|
|
48
|
+
* - trigger-origin dropdown whose trigger is transiently absent → leave the
|
|
49
|
+
* popover at its last position (the shell's MutationObserver re-pairs it
|
|
50
|
+
* before paint once the trigger reappears), rather than flashing to corner.
|
|
51
|
+
*
|
|
52
|
+
* No-op when the panel is closed or the mode is not `'dropdown'`.
|
|
53
|
+
*/
|
|
54
|
+
reanchorOpenDropdown(): void;
|
|
35
55
|
/** Toggle an accordion section */
|
|
36
56
|
toggleToolPanelSection(sectionId: string): void;
|
|
37
57
|
/** Get registered tool panels */
|
|
@@ -259,6 +259,8 @@ export declare function updateToolbarActiveStates(renderRoot: Element, state: Sh
|
|
|
259
259
|
* Update tool panel open/close state.
|
|
260
260
|
*/
|
|
261
261
|
export declare function updatePanelState(renderRoot: Element, state: ShellState): void;
|
|
262
|
+
/** Whether the current environment supports CSS anchor positioning. */
|
|
263
|
+
export declare function supportsAnchorPositioning(): boolean;
|
|
262
264
|
/**
|
|
263
265
|
* Show the tool panel as an anchored dropdown popover (`mode: 'dropdown'`).
|
|
264
266
|
*
|
|
@@ -276,6 +278,25 @@ export declare function showToolPanelDropdown(renderRoot: Element, state: ShellS
|
|
|
276
278
|
* {@link showToolPanelDropdown}.
|
|
277
279
|
*/
|
|
278
280
|
export declare function hideToolPanelDropdown(renderRoot: Element, state: ShellState): void;
|
|
281
|
+
/**
|
|
282
|
+
* Re-pair an OPEN dropdown's existing anchor onto a freshly resolved trigger
|
|
283
|
+
* IN PLACE — reusing the already-minted `anchor-name` and leaving the popover
|
|
284
|
+
* shown — instead of hiding and re-showing it.
|
|
285
|
+
*
|
|
286
|
+
* WHY: when an outer framework (e.g. a React column `headerRenderer`) recreates
|
|
287
|
+
* the `[data-panel-toggle]` trigger on a column toggle, the new node lacks the
|
|
288
|
+
* `anchor-name`, so the popover's `position-anchor` no longer resolves and the
|
|
289
|
+
* browser drops it to the corner. Hiding + re-showing (the heavier
|
|
290
|
+
* {@link showToolPanelDropdown} path) mints a NEW name and re-enters the
|
|
291
|
+
* Popover API, which flashes the popover to the corner for a frame. Moving the
|
|
292
|
+
* SAME name to the new node keeps the popover visually anchored with no flash.
|
|
293
|
+
*
|
|
294
|
+
* Returns `true` when the re-pair was applied. The caller must ensure CSS
|
|
295
|
+
* anchor positioning is supported (see {@link supportsAnchorPositioning});
|
|
296
|
+
* otherwise the fixed-coordinate fallback in {@link showToolPanelDropdown} must
|
|
297
|
+
* be used instead.
|
|
298
|
+
*/
|
|
299
|
+
export declare function repairDropdownAnchor(renderRoot: Element, state: ShellState, trigger: HTMLElement): boolean;
|
|
279
300
|
/**
|
|
280
301
|
* Prepare shell state for a full re-render.
|
|
281
302
|
* Runs cleanup functions so content (toolbar buttons, panels, headers)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolbox-web/grid",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"description": "Zero-dependency, framework-agnostic data grid web component with virtualization, sorting, filtering, editing, and 20+ plugins. Works in vanilla JS, React, Vue, Angular, and any framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|