@toolbox-web/grid 2.0.0-rc.2 → 2.0.0-rc.4

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 (68) hide show
  1. package/all.js +2 -2
  2. package/all.js.map +1 -1
  3. package/index.js +1 -1
  4. package/index.js.map +1 -1
  5. package/lib/core/internal/diagnostics.d.ts +9 -1
  6. package/lib/features/registry.js.map +1 -1
  7. package/lib/plugins/clipboard/index.js.map +1 -1
  8. package/lib/plugins/column-virtualization/index.js.map +1 -1
  9. package/lib/plugins/context-menu/index.js.map +1 -1
  10. package/lib/plugins/editing/index.js.map +1 -1
  11. package/lib/plugins/export/index.js.map +1 -1
  12. package/lib/plugins/filtering/FilteringPlugin.d.ts +3 -1
  13. package/lib/plugins/filtering/index.js +1 -1
  14. package/lib/plugins/filtering/index.js.map +1 -1
  15. package/lib/plugins/grouping-columns/index.js.map +1 -1
  16. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +14 -22
  17. package/lib/plugins/grouping-rows/index.js +2 -2
  18. package/lib/plugins/grouping-rows/index.js.map +1 -1
  19. package/lib/plugins/grouping-rows/types.d.ts +7 -35
  20. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +30 -0
  21. package/lib/plugins/master-detail/index.js +1 -1
  22. package/lib/plugins/master-detail/index.js.map +1 -1
  23. package/lib/plugins/multi-sort/index.js.map +1 -1
  24. package/lib/plugins/pinned-columns/index.js.map +1 -1
  25. package/lib/plugins/pinned-rows/index.js.map +1 -1
  26. package/lib/plugins/pivot/index.js.map +1 -1
  27. package/lib/plugins/print/index.js.map +1 -1
  28. package/lib/plugins/reorder-columns/index.js.map +1 -1
  29. package/lib/plugins/reorder-rows/index.js.map +1 -1
  30. package/lib/plugins/responsive/index.js.map +1 -1
  31. package/lib/plugins/selection/index.js +1 -1
  32. package/lib/plugins/selection/index.js.map +1 -1
  33. package/lib/plugins/server-side/ServerSidePlugin.d.ts +48 -14
  34. package/lib/plugins/server-side/datasource-types.d.ts +189 -0
  35. package/lib/plugins/server-side/datasource.d.ts +5 -5
  36. package/lib/plugins/server-side/index.d.ts +1 -1
  37. package/lib/plugins/server-side/index.js +1 -1
  38. package/lib/plugins/server-side/index.js.map +1 -1
  39. package/lib/plugins/server-side/types.d.ts +8 -82
  40. package/lib/plugins/tooltip/index.js +1 -1
  41. package/lib/plugins/tooltip/index.js.map +1 -1
  42. package/lib/plugins/tree/TreePlugin.d.ts +10 -4
  43. package/lib/plugins/tree/index.js +1 -1
  44. package/lib/plugins/tree/index.js.map +1 -1
  45. package/lib/plugins/tree/tree-datasource.d.ts +13 -0
  46. package/lib/plugins/tree/types.d.ts +13 -0
  47. package/lib/plugins/undo-redo/index.js.map +1 -1
  48. package/lib/plugins/visibility/index.js.map +1 -1
  49. package/package.json +1 -1
  50. package/public.d.ts +3 -0
  51. package/umd/grid.all.umd.js +1 -1
  52. package/umd/grid.all.umd.js.map +1 -1
  53. package/umd/grid.umd.js +1 -1
  54. package/umd/grid.umd.js.map +1 -1
  55. package/umd/plugins/filtering.umd.js +1 -1
  56. package/umd/plugins/filtering.umd.js.map +1 -1
  57. package/umd/plugins/grouping-rows.umd.js +1 -1
  58. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  59. package/umd/plugins/master-detail.umd.js +1 -1
  60. package/umd/plugins/master-detail.umd.js.map +1 -1
  61. package/umd/plugins/selection.umd.js +1 -1
  62. package/umd/plugins/selection.umd.js.map +1 -1
  63. package/umd/plugins/server-side.umd.js +1 -1
  64. package/umd/plugins/server-side.umd.js.map +1 -1
  65. package/umd/plugins/tooltip.umd.js +1 -1
  66. package/umd/plugins/tooltip.umd.js.map +1 -1
  67. package/umd/plugins/tree.umd.js +1 -1
  68. package/umd/plugins/tree.umd.js.map +1 -1
@@ -0,0 +1,13 @@
1
+ import { FlattenedTreeRow } from './types';
2
+ /**
3
+ * Given a flat row index in the viewport, find the index of the
4
+ * top-level node (depth 0) that "owns" that row.
5
+ *
6
+ * Walk backwards from the row index until a depth-0 row is found,
7
+ * then return its position among all depth-0 rows.
8
+ */
9
+ export declare function getTopLevelNodeIndex(flattenedRows: FlattenedTreeRow[], flatRowIndex: number): number;
10
+ /**
11
+ * Count the number of top-level (depth 0) nodes in the flattened rows.
12
+ */
13
+ export declare function countTopLevelNodes(flattenedRows: FlattenedTreeRow[]): number;
@@ -80,11 +80,24 @@ export interface TreeExpandDetail<T = TreeRow> {
80
80
  expanded: boolean;
81
81
  /** Depth level of the row */
82
82
  depth: number;
83
+ /** All currently expanded keys after the operation */
84
+ expandedKeys?: string[];
83
85
  }
84
86
  declare module '../../core/types' {
85
87
  interface DataGridEventMap {
86
88
  /** Fired when a tree node is expanded or collapsed. Provides the node key, row data, and depth level. @group Tree Events */
87
89
  'tree-expand': TreeExpandDetail;
90
+ /** Fired when lazy tree data starts loading. @group Tree Events */
91
+ 'tree-load-start': void;
92
+ /** Fired when lazy tree data finishes loading. @group Tree Events */
93
+ 'tree-load-end': {
94
+ totalTopLevelCount: number;
95
+ loadedCount: number;
96
+ };
97
+ /** Fired when lazy tree data loading fails. @group Tree Events */
98
+ 'tree-load-error': {
99
+ error: unknown;
100
+ };
88
101
  }
89
102
  interface PluginNameMap {
90
103
  tree: import('./TreePlugin').TreePlugin;