@toolbox-web/grid 0.0.5 → 0.0.7
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/README.md +43 -0
- package/all.d.ts +1680 -129
- package/all.js +440 -340
- package/all.js.map +1 -1
- package/custom-elements.json +1852 -0
- package/index.d.ts +133 -1
- package/index.js +726 -637
- package/index.js.map +1 -1
- package/lib/plugins/clipboard/index.js +62 -24
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js +82 -44
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js +141 -93
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/export/index.js +47 -9
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +89 -51
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +71 -33
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js +91 -55
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +176 -54
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +83 -45
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js +54 -16
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +45 -7
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +97 -59
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/index.js +71 -33
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js +132 -94
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js +76 -38
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js +76 -38
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js +50 -12
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +62 -24
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +31 -31
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +14 -14
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +2 -2
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +2 -2
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +2 -2
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/multi-sort.umd.js +1 -1
- package/umd/plugins/multi-sort.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +2 -2
- package/umd/plugins/tree.umd.js.map +1 -1
- package/umd/plugins/visibility.umd.js +1 -1
- package/umd/plugins/visibility.umd.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @toolbox-web/grid
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@toolbox-web/grid)
|
|
4
|
+
[](https://github.com/sponsors/OysteinAmundsen)
|
|
5
|
+
|
|
3
6
|
A high-performance, framework-agnostic data grid built with pure TypeScript and native Web Components. Zero runtime dependencies.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
@@ -224,9 +227,33 @@ interface GridConfig {
|
|
|
224
227
|
fitMode?: 'stretch' | 'fixed';
|
|
225
228
|
editOn?: 'click' | 'dblclick';
|
|
226
229
|
plugins?: BaseGridPlugin[]; // Array of plugin class instances
|
|
230
|
+
icons?: GridIcons; // Centralized icon configuration
|
|
231
|
+
shell?: ShellConfig; // Optional header bar and tool panels
|
|
227
232
|
}
|
|
228
233
|
```
|
|
229
234
|
|
|
235
|
+
### Icons Configuration
|
|
236
|
+
|
|
237
|
+
The grid provides a centralized icon system via `gridConfig.icons`. All plugins (tree, grouping, sorting, context menus, etc.) automatically use these icons, ensuring visual consistency across the entire grid.
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
import { DEFAULT_GRID_ICONS } from '@toolbox-web/grid';
|
|
241
|
+
|
|
242
|
+
grid.gridConfig = {
|
|
243
|
+
icons: {
|
|
244
|
+
expand: '▶', // Collapsed tree/group/detail icon
|
|
245
|
+
collapse: '▼', // Expanded tree/group/detail icon
|
|
246
|
+
sortAsc: '▲', // Sort ascending indicator
|
|
247
|
+
sortDesc: '▼', // Sort descending indicator
|
|
248
|
+
sortNone: '⇅', // Unsorted column indicator
|
|
249
|
+
submenuArrow: '▶', // Context menu submenu arrow
|
|
250
|
+
dragHandle: '⋮⋮', // Column reorder drag handle
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Icons can be strings (text or HTML) or `HTMLElement` instances. Plugins use grid-level icons by default but can override with their own config when needed.
|
|
256
|
+
|
|
230
257
|
### Plugin Configuration Example
|
|
231
258
|
|
|
232
259
|
Plugins are class instances that you import and instantiate with their configuration:
|
|
@@ -474,6 +501,22 @@ For architecture details, rendering pipeline, and plugin development, see [ARCHI
|
|
|
474
501
|
|
|
475
502
|
---
|
|
476
503
|
|
|
504
|
+
## Support This Project
|
|
505
|
+
|
|
506
|
+
This grid is built and maintained by a single developer in spare time. If it saves you time or money, consider sponsoring to keep development going:
|
|
507
|
+
|
|
508
|
+
[](https://github.com/sponsors/OysteinAmundsen)
|
|
509
|
+
[](https://patreon.com/user?u=40656340)
|
|
510
|
+
|
|
511
|
+
**What sponsorship enables:**
|
|
512
|
+
|
|
513
|
+
- 🚀 Faster feature development (see [ROADMAP](./ROADMAP.md))
|
|
514
|
+
- 🐛 Priority bug fixes and support
|
|
515
|
+
- 📚 Better documentation and examples
|
|
516
|
+
- 💼 Corporate sponsors get logo placement and priority support
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
477
520
|
## License
|
|
478
521
|
|
|
479
522
|
MIT
|