@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.
Files changed (61) hide show
  1. package/README.md +43 -0
  2. package/all.d.ts +1680 -129
  3. package/all.js +440 -340
  4. package/all.js.map +1 -1
  5. package/custom-elements.json +1852 -0
  6. package/index.d.ts +133 -1
  7. package/index.js +726 -637
  8. package/index.js.map +1 -1
  9. package/lib/plugins/clipboard/index.js +62 -24
  10. package/lib/plugins/clipboard/index.js.map +1 -1
  11. package/lib/plugins/column-virtualization/index.js +82 -44
  12. package/lib/plugins/column-virtualization/index.js.map +1 -1
  13. package/lib/plugins/context-menu/index.js +141 -93
  14. package/lib/plugins/context-menu/index.js.map +1 -1
  15. package/lib/plugins/export/index.js +47 -9
  16. package/lib/plugins/export/index.js.map +1 -1
  17. package/lib/plugins/filtering/index.js +89 -51
  18. package/lib/plugins/filtering/index.js.map +1 -1
  19. package/lib/plugins/grouping-columns/index.js +71 -33
  20. package/lib/plugins/grouping-columns/index.js.map +1 -1
  21. package/lib/plugins/grouping-rows/index.js +91 -55
  22. package/lib/plugins/grouping-rows/index.js.map +1 -1
  23. package/lib/plugins/master-detail/index.js +176 -54
  24. package/lib/plugins/master-detail/index.js.map +1 -1
  25. package/lib/plugins/multi-sort/index.js +83 -45
  26. package/lib/plugins/multi-sort/index.js.map +1 -1
  27. package/lib/plugins/pinned-columns/index.js +54 -16
  28. package/lib/plugins/pinned-columns/index.js.map +1 -1
  29. package/lib/plugins/pinned-rows/index.js +45 -7
  30. package/lib/plugins/pinned-rows/index.js.map +1 -1
  31. package/lib/plugins/pivot/index.js +97 -59
  32. package/lib/plugins/pivot/index.js.map +1 -1
  33. package/lib/plugins/reorder/index.js +71 -33
  34. package/lib/plugins/reorder/index.js.map +1 -1
  35. package/lib/plugins/selection/index.js +132 -94
  36. package/lib/plugins/selection/index.js.map +1 -1
  37. package/lib/plugins/server-side/index.js +76 -38
  38. package/lib/plugins/server-side/index.js.map +1 -1
  39. package/lib/plugins/tree/index.js +76 -38
  40. package/lib/plugins/tree/index.js.map +1 -1
  41. package/lib/plugins/undo-redo/index.js +50 -12
  42. package/lib/plugins/undo-redo/index.js.map +1 -1
  43. package/lib/plugins/visibility/index.js +62 -24
  44. package/lib/plugins/visibility/index.js.map +1 -1
  45. package/package.json +1 -1
  46. package/umd/grid.all.umd.js +31 -31
  47. package/umd/grid.all.umd.js.map +1 -1
  48. package/umd/grid.umd.js +14 -14
  49. package/umd/grid.umd.js.map +1 -1
  50. package/umd/plugins/context-menu.umd.js +2 -2
  51. package/umd/plugins/context-menu.umd.js.map +1 -1
  52. package/umd/plugins/grouping-rows.umd.js +2 -2
  53. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  54. package/umd/plugins/master-detail.umd.js +2 -2
  55. package/umd/plugins/master-detail.umd.js.map +1 -1
  56. package/umd/plugins/multi-sort.umd.js +1 -1
  57. package/umd/plugins/multi-sort.umd.js.map +1 -1
  58. package/umd/plugins/tree.umd.js +2 -2
  59. package/umd/plugins/tree.umd.js.map +1 -1
  60. package/umd/plugins/visibility.umd.js +1 -1
  61. 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
+ [![npm](https://img.shields.io/npm/v/@toolbox-web/grid)](https://www.npmjs.com/package/@toolbox-web/grid)
4
+ [![GitHub Sponsors](https://img.shields.io/badge/Sponsor-❤-ea4aaa?logo=github)](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
+ [![GitHub Sponsors](https://img.shields.io/badge/Sponsor_on_GitHub-ea4aaa?style=for-the-badge&logo=github)](https://github.com/sponsors/OysteinAmundsen)
509
+ [![Patreon](https://img.shields.io/badge/Support_on_Patreon-f96854?style=for-the-badge&logo=patreon)](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