@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.
- package/all.js +2 -2
- package/all.js.map +1 -1
- package/custom-elements.json +18 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts +23 -0
- package/lib/core/internal/style-injector.d.ts +0 -8
- package/lib/core/types.d.ts +32 -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.map +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/filtering/types.d.ts +0 -28
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +53 -2
- package/lib/plugins/grouping-rows/index.js +2 -2
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/grouping-rows/types.d.ts +10 -8
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +0 -1
- package/lib/plugins/master-detail/index.js +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/master-detail/types.d.ts +0 -2
- 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.map +1 -1
- package/lib/plugins/responsive/index.js +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/responsive/types.d.ts +11 -2
- package/lib/plugins/row-drag-drop/index.js.map +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/datasource-types.d.ts +8 -0
- package/lib/plugins/server-side/index.js +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/server-side/types.d.ts +9 -10
- package/lib/plugins/sticky-rows/index.js.map +1 -1
- package/lib/plugins/tooltip/index.js +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 +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/lib/plugins/visibility/types.d.ts +5 -10
- package/lib/plugins/visibility/visibility.d.ts +5 -3
- package/package.json +1 -1
- package/themes/dg-theme-bootstrap.css +2 -2
- package/themes/dg-theme-contrast.css +1 -1
- package/themes/dg-theme-large.css +1 -1
- package/themes/dg-theme-material.css +2 -2
- package/themes/dg-theme-standard.css +1 -1
- package/themes/dg-theme-vibrant.css +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/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +1 -1
- package/umd/plugins/grouping-rows.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/responsive.umd.js +1 -1
- package/umd/plugins/responsive.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
- package/umd/plugins/tooltip.umd.js +1 -1
- package/umd/plugins/tooltip.umd.js.map +1 -1
- package/umd/plugins/visibility.umd.js +1 -1
- package/umd/plugins/visibility.umd.js.map +1 -1
|
@@ -9,19 +9,14 @@
|
|
|
9
9
|
* Controls the visibility sidebar panel that lets users show/hide individual columns.
|
|
10
10
|
* The sidebar is toggled via a button in the grid toolbar or programmatically.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* Currently has no configurable options — reserved as an extension point for
|
|
13
|
+
* future flags (e.g. default open state, panel title). The grid always keeps
|
|
14
|
+
* at least one column visible; columns flagged with `lockVisible: true` are
|
|
15
|
+
* un-hideable individually.
|
|
16
|
+
*
|
|
16
17
|
* @since 0.1.1
|
|
17
18
|
*/
|
|
18
19
|
export interface VisibilityConfig {
|
|
19
|
-
/**
|
|
20
|
-
* Whether users are allowed to hide every column.
|
|
21
|
-
* When `false`, the last visible column's toggle is disabled to prevent an empty grid.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
allowHideAll?: boolean;
|
|
25
20
|
}
|
|
26
21
|
/** Internal state managed by the visibility plugin */
|
|
27
22
|
export interface VisibilityState {
|
|
@@ -9,15 +9,17 @@ import { ColumnConfig } from '../../core/types';
|
|
|
9
9
|
export declare function filterVisibleColumns<TRow = unknown>(columns: ColumnConfig<TRow>[], hidden: Set<string>): ColumnConfig<TRow>[];
|
|
10
10
|
/**
|
|
11
11
|
* Check if a column can be hidden.
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
|
+
* Mirrors the invariant enforced by the grid core (`config-manager.setColumnVisible`):
|
|
14
|
+
* a column cannot be hidden if it is flagged `lockVisible`, or if hiding it would
|
|
15
|
+
* leave zero visible columns.
|
|
13
16
|
*
|
|
14
17
|
* @param columns - All column configurations
|
|
15
18
|
* @param field - Field to check
|
|
16
19
|
* @param hidden - Currently hidden field names
|
|
17
|
-
* @param allowHideAll - Whether hiding all columns is allowed
|
|
18
20
|
* @returns True if the column can be hidden
|
|
19
21
|
*/
|
|
20
|
-
export declare function canHideColumn<TRow = unknown>(columns: ColumnConfig<TRow>[], field: string, hidden: Set<string
|
|
22
|
+
export declare function canHideColumn<TRow = unknown>(columns: ColumnConfig<TRow>[], field: string, hidden: Set<string>): boolean;
|
|
21
23
|
/**
|
|
22
24
|
* Toggle column visibility state.
|
|
23
25
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolbox-web/grid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
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",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* https://getbootstrap.com/docs/5.3/content/tables/
|
|
5
5
|
*/
|
|
6
6
|
@layer tbw-theme {
|
|
7
|
-
tbw-grid {
|
|
7
|
+
[data-tbw-grid] {
|
|
8
8
|
/* ========== Core Palette ========== */
|
|
9
9
|
--tbw-color-bg: light-dark(#ffffff, #212529);
|
|
10
10
|
--tbw-color-panel-bg: light-dark(#f8f9fa, #2b3035);
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
tbw-grid,
|
|
157
|
+
[data-tbw-grid],
|
|
158
158
|
.tbw-filter-panel {
|
|
159
159
|
/* ========== Bootstrap 5 Checkboxes ========== */
|
|
160
160
|
/* Matches Bootstrap's .form-check-input styling */
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- Slightly higher contrast for muted fg & borders (within WCAG AA)
|
|
11
11
|
*/
|
|
12
12
|
@layer tbw-theme {
|
|
13
|
-
tbw-grid {
|
|
13
|
+
[data-tbw-grid] {
|
|
14
14
|
/* Reuse core color tokens from standard theme with a few tweaks */
|
|
15
15
|
--tbw-color-bg: light-dark(#ffffff, #1f2125);
|
|
16
16
|
--tbw-color-fg: light-dark(#1b1e23, #e7e9ed); /* a bit darker/lighter */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* https://m3.material.io/
|
|
6
6
|
*/
|
|
7
7
|
@layer tbw-theme {
|
|
8
|
-
tbw-grid {
|
|
8
|
+
[data-tbw-grid] {
|
|
9
9
|
/* ========== Core Palette ========== */
|
|
10
10
|
/* M3 surface colors with subtle tonal variation */
|
|
11
11
|
--tbw-color-bg: light-dark(#fffbff, #1c1b1f);
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
--tbw-editing-row-outline-width: 2px;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
tbw-grid,
|
|
183
|
+
[data-tbw-grid],
|
|
184
184
|
.tbw-filter-panel {
|
|
185
185
|
/* ========== M3 Checkboxes ========== */
|
|
186
186
|
/* Material Design 3 styled checkboxes for all grid & filter panel checkboxes */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Features subtle gradients, glowing accents, and polished transitions.
|
|
5
5
|
*/
|
|
6
6
|
@layer tbw-theme {
|
|
7
|
-
tbw-grid {
|
|
7
|
+
[data-tbw-grid] {
|
|
8
8
|
/* ========== Core Palette ========== */
|
|
9
9
|
--tbw-color-bg: light-dark(#fafaff, #12141c);
|
|
10
10
|
--tbw-color-panel-bg: light-dark(#f0f0ff, #1a1d28);
|