1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Configurable virtualized data grid for the [GPUI] toolkit.
//!
//! `sqlly-datatable` provides a self-contained `Entity<GridState>` widget that
//! you can drop into a GPUI application. It supports:
//!
//! * Virtualized rendering for large datasets.
//! * Cell, row, column and rectangular drag selection.
//! * Sorting on column headers, with a cycle through ascending, descending,
//! and unsorted.
//! * Per-column filtering via a rich filter panel (operator predicates,
//! value checklist, search) opened from the built-in context menu.
//! * Configurable column resizing, mouse-driven scrollbars, and edge-scroll
//! during drag selection.
//! * Clipboard copy of any selection (with or without headers).
//!
//! The crate is intentionally GPUI-only on the UI side; the pure formatter in
//! [`mod@format`] is usable in any context (export pipelines, server-side preview,
//! etc.). All formatting is configurable per column by composing the
//! [`config::GridConfig`] defaults with [`config::ColumnOverride`] entries.
//!
//! # Quick start
//!
//! ```no_run
//! use gpui::App;
//! use sqlly_datatable::{
//! CellValue, Column, ColumnKind, GridConfig, GridData, SqllyDataTable,
//! };
//!
//! let data = GridData::new(
//! vec![Column { name: "id".into(), kind: ColumnKind::Integer, width: 80.0 }],
//! vec![vec![CellValue::Integer(1)], vec![CellValue::Integer(2)]],
//! ).expect("rectangular data");
//! let app = gpui::Application::new();
//! app.run(|cx: &mut App| {
//! let _view = SqllyDataTable::builder(data)
//! .config(GridConfig::default())
//! .build(cx);
//! });
//! ```
//!
//! See `crates/sqlly-datatable-sample` for a runnable demo.
//!
//! [GPUI]: https://github.com/zed-industries/gpui
// `missing_docs` is intentionally not enabled at the crate level. The public
// surfaces documented here are stable; private internals will get docs as the
// `grid::` modules mature. Run clippy with
// `#![warn(missing_docs)]` in scope when cleaning up a module.
pub use ;
pub use ;
pub use ;
pub use ;