@toolbox-web/grid 1.12.0 → 1.13.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 +694 -525
- package/all.js.map +1 -1
- package/index.js +1468 -1449
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts +2 -1
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/sanitize.d.ts.map +1 -1
- package/lib/core/internal/validate-config.d.ts.map +1 -1
- package/lib/core/types.d.ts +9 -1
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
- package/lib/plugins/context-menu/index.js +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
- package/lib/plugins/editing/editors.d.ts.map +1 -1
- package/lib/plugins/editing/index.d.ts +1 -1
- package/lib/plugins/editing/index.d.ts.map +1 -1
- package/lib/plugins/editing/index.js +187 -170
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/editing/types.d.ts +44 -0
- package/lib/plugins/editing/types.d.ts.map +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +9 -9
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +8 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-columns/index.js +59 -60
- 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/MasterDetailPlugin.d.ts +7 -0
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
- package/lib/plugins/master-detail/index.js +185 -145
- 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/index.js.map +1 -1
- package/lib/plugins/responsive/index.js +40 -39
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts +51 -0
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +325 -131
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/selection/types.d.ts +18 -0
- package/lib/plugins/selection/types.d.ts.map +1 -1
- package/lib/plugins/server-side/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/public.d.ts +2 -0
- package/public.d.ts.map +1 -1
- package/themes/dg-theme-bootstrap.css +192 -8
- package/themes/dg-theme-material.css +243 -0
- package/umd/grid.all.umd.js +43 -43
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +19 -19
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +1 -1
- package/umd/plugins/context-menu.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/grouping-columns.umd.js +1 -1
- package/umd/plugins/grouping-columns.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +1 -1
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +2 -2
- package/umd/plugins/selection.umd.js.map +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GridElement, PluginManifest, PluginQuery, BaseGridPlugin, CellClickEvent, CellMouseEvent } from '../../core/plugin/base-plugin';
|
|
2
|
+
import { ColumnConfig } from '../../core/types';
|
|
2
3
|
import { CellRange, SelectionConfig, SelectionResult } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* Selection Plugin for tbw-grid
|
|
@@ -105,6 +106,12 @@ export declare class SelectionPlugin extends BaseGridPlugin<SelectionConfig> {
|
|
|
105
106
|
private pendingKeyboardUpdate;
|
|
106
107
|
/** Cell selection state (cell mode) */
|
|
107
108
|
private selectedCell;
|
|
109
|
+
/** Last synced focus row — used to detect when grid focus moves so selection follows */
|
|
110
|
+
private lastSyncedFocusRow;
|
|
111
|
+
/** Last synced focus col (cell mode) */
|
|
112
|
+
private lastSyncedFocusCol;
|
|
113
|
+
/** True when selection was explicitly set (click/keyboard) — prevents #syncSelectionToFocus from overwriting */
|
|
114
|
+
private explicitSelection;
|
|
108
115
|
/**
|
|
109
116
|
* Check if selection is enabled at the grid level.
|
|
110
117
|
* Grid-wide `selectable: false` or plugin's `enabled: false` disables all selection.
|
|
@@ -147,6 +154,11 @@ export declare class SelectionPlugin extends BaseGridPlugin<SelectionConfig> {
|
|
|
147
154
|
onCellMouseMove(event: CellMouseEvent): boolean | void;
|
|
148
155
|
/** @internal */
|
|
149
156
|
onCellMouseUp(_event: CellMouseEvent): boolean | void;
|
|
157
|
+
/**
|
|
158
|
+
* Inject checkbox column when `checkbox: true` and mode is `'row'`.
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
processColumns(columns: ColumnConfig[]): ColumnConfig[];
|
|
150
162
|
/** @internal */
|
|
151
163
|
afterRender(): void;
|
|
152
164
|
/**
|
|
@@ -182,6 +194,45 @@ export declare class SelectionPlugin extends BaseGridPlugin<SelectionConfig> {
|
|
|
182
194
|
* Check if a specific cell is in range selection.
|
|
183
195
|
*/
|
|
184
196
|
isCellSelected(row: number, col: number): boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Select all selectable rows (row mode) or all cells (range mode).
|
|
199
|
+
*
|
|
200
|
+
* In row mode, selects every row where `isSelectable` returns true (or all rows if no callback).
|
|
201
|
+
* In range mode, creates a single range spanning all rows and columns.
|
|
202
|
+
* Has no effect in cell mode.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* const plugin = grid.getPlugin(SelectionPlugin);
|
|
207
|
+
* plugin.selectAll(); // Selects everything in current mode
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
selectAll(): void;
|
|
211
|
+
/**
|
|
212
|
+
* Select specific rows by index (row mode only).
|
|
213
|
+
* Replaces the current selection with the provided row indices.
|
|
214
|
+
* Indices that are out of bounds or fail the `isSelectable` check are ignored.
|
|
215
|
+
*
|
|
216
|
+
* @param indices - Array of row indices to select
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```ts
|
|
220
|
+
* const plugin = grid.getPlugin(SelectionPlugin);
|
|
221
|
+
* plugin.selectRows([0, 2, 4]); // Select rows 0, 2, and 4
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
selectRows(indices: number[]): void;
|
|
225
|
+
/**
|
|
226
|
+
* Get the indices of all selected rows (convenience for row mode).
|
|
227
|
+
* Returns indices sorted in ascending order.
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts
|
|
231
|
+
* const plugin = grid.getPlugin(SelectionPlugin);
|
|
232
|
+
* const rows = plugin.getSelectedRowIndices(); // [0, 2, 4]
|
|
233
|
+
* ```
|
|
234
|
+
*/
|
|
235
|
+
getSelectedRowIndices(): number[];
|
|
185
236
|
/**
|
|
186
237
|
* Clear all selection.
|
|
187
238
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/selection/SelectionPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,W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