@toolbox-web/grid 2.4.0 → 2.5.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.
- package/all.js +2 -2
- package/all.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/lib/core/internal/aria.d.ts +13 -0
- package/lib/core/types.d.ts +26 -0
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/index.js +1 -1
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/editing/internal/helpers.d.ts +17 -0
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +15 -0
- package/lib/plugins/filtering/index.js +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder-columns/index.js.map +1 -1
- package/lib/plugins/reorder-rows/index.js +1 -1
- package/lib/plugins/reorder-rows/index.js.map +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-drag-drop/RowDragDropPlugin.d.ts +40 -0
- package/lib/plugins/row-drag-drop/index.js +1 -1
- package/lib/plugins/row-drag-drop/index.js.map +1 -1
- package/lib/plugins/row-drag-drop/types.d.ts +22 -1
- package/lib/plugins/selection/index.js +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tooltip/index.js.map +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- 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/editing.umd.js +1 -1
- package/umd/plugins/editing.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/reorder-rows.umd.js +1 -1
- package/umd/plugins/reorder-rows.umd.js.map +1 -1
- package/umd/plugins/row-drag-drop.umd.js +1 -1
- package/umd/plugins/row-drag-drop.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
|
@@ -12,6 +12,8 @@ export interface AriaState {
|
|
|
12
12
|
ariaLabel: string | undefined;
|
|
13
13
|
/** Last set aria-describedby */
|
|
14
14
|
ariaDescribedBy: string | undefined;
|
|
15
|
+
/** Last source row count announced via `dataLoaded`; used to suppress duplicate announcements */
|
|
16
|
+
lastAnnouncedSourceCount: number;
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* Create initial ARIA state.
|
|
@@ -69,3 +71,14 @@ export declare function announce(gridEl: HTMLElement, message: string): void;
|
|
|
69
71
|
* @param args - Arguments to pass to the message function
|
|
70
72
|
*/
|
|
71
73
|
export declare function getA11yMessage<K extends keyof A11yMessages>(gridEl: HTMLElement, key: K, ...args: Parameters<A11yMessages[K]>): string;
|
|
74
|
+
/**
|
|
75
|
+
* Announce a `dataLoaded` message — but only when the source row count has
|
|
76
|
+
* actually changed since the last announcement. This prevents announcement
|
|
77
|
+
* spam from internal `data-change` emits triggered by sort/filter/edit, which
|
|
78
|
+
* have their own dedicated announcements.
|
|
79
|
+
*
|
|
80
|
+
* @param gridEl - The grid host element
|
|
81
|
+
* @param state - ARIA state (tracks last announced count)
|
|
82
|
+
* @param sourceRowCount - Current source row count
|
|
83
|
+
*/
|
|
84
|
+
export declare function announceDataLoaded(gridEl: HTMLElement, state: AriaState, sourceRowCount: number): void;
|
package/lib/core/types.d.ts
CHANGED
|
@@ -1262,6 +1262,32 @@ export interface ColumnEditorContext<TRow = any, TValue = any> {
|
|
|
1262
1262
|
* ```
|
|
1263
1263
|
*/
|
|
1264
1264
|
onValueChange?: (callback: (newValue: TValue) => void) => void;
|
|
1265
|
+
/**
|
|
1266
|
+
* The grid element that owns this editor.
|
|
1267
|
+
*
|
|
1268
|
+
* Use to access public grid API from custom editors — e.g.
|
|
1269
|
+
* `grid.registerExternalFocusContainer(panel)` so the grid treats focus
|
|
1270
|
+
* inside a portal-rendered overlay (Autocomplete, date picker, color
|
|
1271
|
+
* picker) as "still inside the editor" and does not exit row edit on
|
|
1272
|
+
* click. Mirrors {@link CellRenderContext.grid} for renderers.
|
|
1273
|
+
*
|
|
1274
|
+
* Always populated when the editor is mounted via the grid's editing
|
|
1275
|
+
* pipeline. Optional in the type for backwards compatibility with
|
|
1276
|
+
* factory functions written against the original signature.
|
|
1277
|
+
*
|
|
1278
|
+
* @example
|
|
1279
|
+
* ```typescript
|
|
1280
|
+
* const editor: ColumnEditorSpec = (ctx: ColumnEditorContext) => {
|
|
1281
|
+
* const panel = document.createElement('div');
|
|
1282
|
+
* document.body.appendChild(panel);
|
|
1283
|
+
* ctx.grid?.registerExternalFocusContainer(panel);
|
|
1284
|
+
* // ...
|
|
1285
|
+
* };
|
|
1286
|
+
* ```
|
|
1287
|
+
*
|
|
1288
|
+
* @see {@link CellRenderContext.grid}
|
|
1289
|
+
*/
|
|
1290
|
+
grid?: DataGridElement;
|
|
1265
1291
|
}
|
|
1266
1292
|
/**
|
|
1267
1293
|
* Context passed to custom view renderers (pure display – no commit helpers).
|