From a94abd6e6ca3de6abf13329c922f2fdec54493f1 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Tue, 14 Apr 2026 00:03:27 -0700 Subject: [PATCH] chore: add TAGS --- TAGS | 2030 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2030 insertions(+) create mode 100644 TAGS diff --git a/TAGS b/TAGS new file mode 100644 index 0000000..40e1640 --- /dev/null +++ b/TAGS @@ -0,0 +1,2030 @@ + +examples/gen-grammar.rs,1493 +const GRAMMAR: &str = include_str!("../src/persistence/improv.pest");GRAMMAR24,822 +fn load_grammar() -> HashMap {load_grammar26,893 +const BARE_WORDS: &[&str] = &[BARE_WORDS38,1428 +const QUOTED_WORDS: &[&str] = &[QUOTED_WORDS69,1828 +const MODEL_NAMES: &[&str] = &[MODEL_NAMES84,2086 +const VIEW_NAMES: &[&str] = &["Default", "Summary", "Detail", "By Region", "Monthly"];VIEW_NAMES93,2250 +const FORMULA_EXPRS: &[&str] = &[FORMULA_EXPRS95,2338 +const FORMAT_STRINGS: &[&str] = &[",.0", ",.2f", ",.1f", ".0%"];FORMAT_STRINGS103,2529 +struct Xs64(u64);Xs64107,2816 +impl Xs64 {Xs64109,2835 + fn new(seed: u64) -> Self {new110,2847 + fn next(&mut self) -> u64 {next113,2911 + fn byte(&mut self) -> u8 {byte119,3059 + fn pick_from<'a>(&mut self, pool: &[&'a str]) -> &'a str {pick_from122,3131 +struct Gen<'g> {Gen129,3462 + rules: &'g HashMap,rules130,3479 + rng: Xs64,rng131,3529 +impl<'g> Gen<'g> {Gen134,3547 + fn new(rules: &'g HashMap, seed: u64) -> Self {new135,3566 + fn pick(&mut self) -> u8 {pick142,3729 + fn try_override(&mut self, rule_name: &str, out: &mut String) -> bool {try_override147,3854 + fn emit(&mut self, expr: &Expr, out: &mut String) {emit220,6422 + fn generate(&mut self, rule_name: &str) -> Option {generate290,9018 +fn print_rules(rules: &HashMap) {print_rules302,9400 +fn main() {main310,9593 + +examples/pretty-print.rs,23 +fn main() {main9,250 + +src/format.rs,2444 +pub fn format_value(v: Option<&CellValue>, comma: bool, decimals: u8) -> String {format_value4,103 +pub fn parse_number_format(fmt: &str) -> (bool, u8) {parse_number_format14,493 +fn round_half_away(n: f64, decimals: u8) -> f64 {round_half_away24,797 +pub fn format_f64(n: f64, comma: bool, decimals: u8) -> String {format_f6430,1017 +mod tests {tests61,1935 + fn parse_comma_and_zero_decimals() {parse_comma_and_zero_decimals67,2146 + fn parse_comma_and_two_decimals() {parse_comma_and_two_decimals72,2265 + fn parse_no_comma_two_decimals() {parse_no_comma_two_decimals77,2383 + fn parse_comma_only() {parse_comma_only82,2500 + fn parse_empty_string() {parse_empty_string87,2604 + fn parse_dot_no_digits_after() {parse_dot_no_digits_after92,2710 + fn parse_multiple_dots_uses_last() {parse_multiple_dots_uses_last98,2901 + fn format_no_comma_zero_decimals() {format_no_comma_zero_decimals106,3232 + fn format_no_comma_two_decimals() {format_no_comma_two_decimals111,3350 + fn format_comma_zero_decimals() {format_comma_zero_decimals116,3470 + fn format_comma_two_decimals() {format_comma_two_decimals121,3585 + fn format_comma_exactly_three_digits() {format_comma_exactly_three_digits128,3857 + fn format_comma_four_digits() {format_comma_four_digits133,3976 + fn format_comma_seven_digits() {format_comma_seven_digits138,4089 + fn format_comma_millions_with_decimals() {format_comma_millions_with_decimals143,4210 + fn format_negative_with_comma() {format_negative_with_comma150,4519 + fn format_negative_with_comma_and_decimals() {format_negative_with_comma_and_decimals155,4636 + fn format_negative_no_comma() {format_negative_no_comma160,4777 + fn format_zero() {format_zero167,5074 + fn format_small_fraction() {format_small_fraction172,5170 + fn format_negative_small_fraction() {format_negative_small_fraction177,5278 + fn round_half_up_positive() {round_half_up_positive184,5539 + fn round_half_down_negative() {round_half_down_negative190,5696 + fn round_half_at_one_decimal() {round_half_at_one_decimal196,5853 + fn round_below_half_truncates() {round_below_half_truncates202,5988 + fn round_above_half_rounds_up() {round_above_half_rounds_up207,6100 + fn format_value_number() {format_value_number214,6376 + fn format_value_text() {format_value_text220,6531 + fn format_value_none() {format_value_none226,6690 + +src/ui/formula_panel.rs,856 +pub struct FormulaContent<'a> {FormulaContent11,185 + pub model: &'a Model,model12,217 + pub mode: &'a AppMode,mode13,243 +impl<'a> FormulaContent<'a> {FormulaContent16,273 + pub fn new(model: &'a Model, mode: &'a AppMode) -> Self {new17,303 +impl PanelContent for FormulaContent<'_> {FormulaContent22,403 + fn is_active(&self, mode: &AppMode) -> bool {is_active23,446 + fn active_color(&self) -> Color {active_color27,579 + fn title(&self) -> &str {title31,646 + fn item_count(&self) -> usize {item_count35,719 + fn empty_message(&self) -> &str {empty_message39,798 + fn render_item(&self, index: usize, is_selected: bool, inner: Rect, buf: &mut Buffer) {render_item43,888 + fn footer_height(&self) -> u16 {footer_height62,1592 + fn render_footer(&self, inner: Rect, buf: &mut Buffer) {render_footer70,1753 + +src/ui/view_panel.rs,808 +pub struct ViewContent<'a> {ViewContent12,208 + view_names: Vec,view_names13,237 + active_view: String,active_view14,266 + model: &'a Model,model15,291 +impl<'a> ViewContent<'a> {ViewContent18,316 + pub fn new(model: &'a Model) -> Self {new19,343 + fn axis_summary(&self, view_name: &str) -> String {axis_summary30,696 +impl PanelContent for ViewContent<'_> {ViewContent53,1523 + fn is_active(&self, mode: &AppMode) -> bool {is_active54,1563 + fn active_color(&self) -> Color {active_color58,1663 + fn title(&self) -> &str {title62,1728 + fn item_count(&self) -> usize {item_count66,1783 + fn empty_message(&self) -> &str {empty_message70,1856 + fn render_item(&self, index: usize, is_selected: bool, inner: Rect, buf: &mut Buffer) {render_item74,1922 + +src/ui/tile_bar.rs,493 +pub struct TileBar<'a> {TileBar13,229 + pub model: &'a Model,model14,254 + pub mode: &'a AppMode,mode15,280 + pub tile_cat_idx: usize,tile_cat_idx16,307 +impl<'a> TileBar<'a> {TileBar19,339 + pub fn new(model: &'a Model, mode: &'a AppMode, tile_cat_idx: usize) -> Self {new20,362 + fn axis_display(axis: Axis) -> (&'static str, Color) {axis_display27,539 +impl<'a> Widget for TileBar<'a> {TileBar37,838 + fn render(self, area: Rect, buf: &mut Buffer) {render38,872 + +src/ui/which_key.rs,358 +pub struct WhichKeyWidget<'a> {WhichKeyWidget10,241 + hints: &'a [(String, &'static str)],hints11,273 +impl<'a> WhichKeyWidget<'a> {WhichKeyWidget14,317 + pub fn new(hints: &'a [(String, &'static str)]) -> Self {new15,347 +impl Widget for WhichKeyWidget<'_> {WhichKeyWidget20,441 + fn render(self, area: Rect, buf: &mut Buffer) {render21,478 + +src/ui/grid.rs,2852 +const MIN_COL_WIDTH: u16 = 5;MIN_COL_WIDTH14,341 +const MAX_COL_WIDTH: u16 = 32;MAX_COL_WIDTH15,371 +const MIN_ROW_HEADER_W: u16 = 4;MIN_ROW_HEADER_W16,402 +const MAX_ROW_HEADER_W: u16 = 24;MAX_ROW_HEADER_W17,435 +const ROW_HIGHLIGHT_BG: Color = Color::Indexed(237);ROW_HIGHLIGHT_BG19,550 +const GROUP_EXPANDED: &str = "▼";GROUP_EXPANDED20,603 +const GROUP_COLLAPSED: &str = "▶";GROUP_COLLAPSED21,639 +pub struct GridWidget<'a> {GridWidget23,677 + pub model: &'a Model,model24,705 + pub layout: &'a GridLayout,layout25,731 + pub mode: &'a AppMode,mode26,763 + pub search_query: &'a str,search_query27,790 + pub buffers: &'a std::collections::HashMap,buffers28,821 + pub drill_state: Option<&'a crate::ui::app::DrillState>,drill_state29,885 +impl<'a> GridWidget<'a> {GridWidget32,949 + pub fn new(new33,975 + fn render_grid(&self, area: Rect, buf: &mut Buffer) {render_grid51,1409 +impl<'a> Widget for GridWidget<'a> {GridWidget495,19504 + fn render(self, area: Rect, buf: &mut Buffer) {render496,19541 +pub fn compute_col_widths(compute_col_widths536,20954 +pub fn compute_row_header_width(layout: &GridLayout) -> u16 {compute_row_header_width595,22937 +pub fn compute_visible_cols(compute_visible_cols623,23814 +fn truncate(s: &str, max_width: usize) -> String {truncate649,24444 +mod tests {tests672,25033 + fn render(model: &mut Model, width: u16, height: u16) -> Buffer {render685,25604 + fn buf_text(buf: &Buffer) -> String {buf_text702,26336 + fn coord(pairs: &[(&str, &str)]) -> CellKey {coord717,26744 + fn two_cat_model() -> Model {two_cat_model728,27079 + fn column_headers_appear() {column_headers_appear752,27991 + fn row_headers_appear() {row_headers_appear762,28477 + fn cell_value_appears_in_correct_position() {cell_value_appears_in_correct_position772,28972 + fn multiple_cell_values_all_appear() {multiple_cell_values_all_appear783,29328 + fn unset_cells_show_no_value() {unset_cells_show_no_value804,30070 + fn total_row_label_appears() {total_row_label_appears824,31022 + fn total_row_sums_column_correctly() {total_row_sums_column_correctly831,31240 + fn page_filter_bar_shows_category_and_selection() {page_filter_bar_shows_category_and_selection852,32016 + fn page_filter_defaults_to_first_item() {page_filter_defaults_to_first_item876,32839 + fn formula_cell_renders_computed_value() {formula_cell_renders_computed_value902,33812 + fn two_row_categories_produce_cross_product_labels() {two_row_categories_produce_cross_product_labels934,35199 + fn two_row_categories_include_all_coords_in_cell_lookup() {two_row_categories_include_all_coords_in_cell_lookup980,37011 + fn two_column_categories_produce_cross_product_headers() {two_column_categories_produce_cross_product_headers1007,37984 + +src/ui/cat_tree.rs,1011 +pub enum CatTreeEntry {CatTreeEntry6,131 + Category {Category8,212 + Item { cat_name: String, item_name: String },Item14,341 +impl CatTreeEntry {CatTreeEntry17,394 + pub fn cat_name(&self) -> &str {cat_name19,458 +pub fn build_cat_tree(model: &Model, expanded: &HashSet) -> Vec {build_cat_tree28,713 +mod tests {tests53,1580 + fn make_model_with_categories(cats: &[(&str, &[&str])]) -> Model {make_model_with_categories56,1611 + fn empty_model_has_only_virtual_categories() {empty_model_has_only_virtual_categories69,1989 + fn collapsed_category_shows_header_only() {collapsed_category_shows_header_only79,2372 + fn expanded_category_shows_items() {expanded_category_shows_items95,2939 + fn mixed_expanded_and_collapsed() {mixed_expanded_and_collapsed112,3662 + fn cat_name_works_for_both_variants() {cat_name_works_for_both_variants134,4487 + fn expanding_nonexistent_category_is_harmless() {expanding_nonexistent_category_is_harmless149,4923 + +src/ui/import_wizard_ui.rs,433 +pub struct ImportWizardWidget<'a> {ImportWizardWidget11,253 + pub wizard: &'a ImportWizard,wizard12,289 +impl<'a> ImportWizardWidget<'a> {ImportWizardWidget15,326 + pub fn new(wizard: &'a ImportWizard) -> Self {new16,360 +impl<'a> Widget for ImportWizardWidget<'a> {ImportWizardWidget21,444 + fn render(self, area: Rect, buf: &mut Buffer) {render22,489 +fn truncate(s: &str, max: usize) -> String {truncate339,13390 + +src/ui/effect.rs,13895 +pub trait Effect: Debug {Effect11,253 + fn apply(&self, app: &mut App);apply12,279 + fn changes_mode(&self) -> bool {changes_mode14,365 +pub struct AddCategory(pub String);AddCategory22,644 +impl Effect for AddCategory {AddCategory23,680 + fn apply(&self, app: &mut App) {apply24,710 +pub struct AddItem {AddItem30,822 + pub category: String,category31,843 + pub item: String,item32,869 +impl Effect for AddItem {AddItem34,893 + fn apply(&self, app: &mut App) {apply35,919 +pub struct AddItemInGroup {AddItemInGroup45,1193 + pub category: String,category46,1221 + pub item: String,item47,1247 + pub group: String,group48,1269 +impl Effect for AddItemInGroup {AddItemInGroup50,1294 + fn apply(&self, app: &mut App) {apply51,1327 +pub struct SetCell(pub CellKey, pub CellValue);SetCell61,1623 +impl Effect for SetCell {SetCell62,1671 + fn apply(&self, app: &mut App) {apply63,1697 +pub struct ClearCell(pub CellKey);ClearCell69,1820 +impl Effect for ClearCell {ClearCell70,1855 + fn apply(&self, app: &mut App) {apply71,1883 +pub struct AddFormula {AddFormula77,1985 + pub raw: String,raw78,2009 + pub target_category: String,target_category79,2030 +impl Effect for AddFormula {AddFormula81,2065 + fn apply(&self, app: &mut App) {apply82,2094 +pub struct RemoveFormula {RemoveFormula102,2878 + pub target: String,target103,2905 + pub target_category: String,target_category104,2929 +impl Effect for RemoveFormula {RemoveFormula106,2964 + fn apply(&self, app: &mut App) {apply107,2996 +pub struct EnterEditAtCursor;EnterEditAtCursor116,3269 +impl Effect for EnterEditAtCursor {EnterEditAtCursor117,3299 + fn apply(&self, app: &mut App) {apply118,3335 +pub struct TogglePruneEmpty;TogglePruneEmpty132,3729 +impl Effect for TogglePruneEmpty {TogglePruneEmpty133,3758 + fn apply(&self, app: &mut App) {apply134,3793 +pub struct ToggleCatExpand(pub String);ToggleCatExpand141,3941 +impl Effect for ToggleCatExpand {ToggleCatExpand142,3981 + fn apply(&self, app: &mut App) {apply143,4015 +pub struct RemoveItem {RemoveItem151,4190 + pub category: String,category152,4214 + pub item: String,item153,4240 +impl Effect for RemoveItem {RemoveItem155,4264 + fn apply(&self, app: &mut App) {apply156,4293 +pub struct RemoveCategory(pub String);RemoveCategory162,4415 +impl Effect for RemoveCategory {RemoveCategory163,4454 + fn apply(&self, app: &mut App) {apply164,4487 +pub struct CreateView(pub String);CreateView172,4798 +impl Effect for CreateView {CreateView173,4833 + fn apply(&self, app: &mut App) {apply174,4862 +pub struct DeleteView(pub String);DeleteView180,4965 +impl Effect for DeleteView {DeleteView181,5000 + fn apply(&self, app: &mut App) {apply182,5029 +pub struct SwitchView(pub String);SwitchView188,5140 +impl Effect for SwitchView {SwitchView189,5175 + fn apply(&self, app: &mut App) {apply190,5204 +pub struct ViewBack;ViewBack202,5577 +impl Effect for ViewBack {ViewBack203,5598 + fn apply(&self, app: &mut App) {apply204,5625 +pub struct ViewForward;ViewForward215,5991 +impl Effect for ViewForward {ViewForward216,6015 + fn apply(&self, app: &mut App) {apply217,6045 +pub struct SetAxis {SetAxis227,6331 + pub category: String,category228,6352 + pub axis: Axis,axis229,6378 +impl Effect for SetAxis {SetAxis231,6400 + fn apply(&self, app: &mut App) {apply232,6426 +pub struct SetPageSelection {SetPageSelection240,6588 + pub category: String,category241,6618 + pub item: String,item242,6644 +impl Effect for SetPageSelection {SetPageSelection244,6668 + fn apply(&self, app: &mut App) {apply245,6703 +pub struct ToggleGroup {ToggleGroup253,6876 + pub category: String,category254,6901 + pub group: String,group255,6927 +impl Effect for ToggleGroup {ToggleGroup257,6952 + fn apply(&self, app: &mut App) {apply258,6982 +pub struct HideItem {HideItem266,7159 + pub category: String,category267,7181 + pub item: String,item268,7207 +impl Effect for HideItem {HideItem270,7231 + fn apply(&self, app: &mut App) {apply271,7258 +pub struct ShowItem {ShowItem279,7422 + pub category: String,category280,7444 + pub item: String,item281,7470 +impl Effect for ShowItem {ShowItem283,7494 + fn apply(&self, app: &mut App) {apply284,7521 +pub struct TransposeAxes;TransposeAxes292,7685 +impl Effect for TransposeAxes {TransposeAxes293,7711 + fn apply(&self, app: &mut App) {apply294,7743 +pub struct CycleAxis(pub String);CycleAxis300,7860 +impl Effect for CycleAxis {CycleAxis301,7894 + fn apply(&self, app: &mut App) {apply302,7922 +pub struct SetNumberFormat(pub String);SetNumberFormat308,8042 +impl Effect for SetNumberFormat {SetNumberFormat309,8082 + fn apply(&self, app: &mut App) {apply310,8116 +pub struct SetSelected(pub usize, pub usize);SetSelected318,8459 +impl Effect for SetSelected {SetSelected319,8505 + fn apply(&self, app: &mut App) {apply320,8535 +pub struct SetRowOffset(pub usize);SetRowOffset326,8663 +impl Effect for SetRowOffset {SetRowOffset327,8699 + fn apply(&self, app: &mut App) {apply328,8730 +pub struct SetColOffset(pub usize);SetColOffset334,8850 +impl Effect for SetColOffset {SetColOffset335,8886 + fn apply(&self, app: &mut App) {apply336,8917 +pub struct ChangeMode(pub AppMode);ChangeMode344,9251 +impl Effect for ChangeMode {ChangeMode345,9287 + fn apply(&self, app: &mut App) {apply346,9316 + fn changes_mode(&self) -> bool {changes_mode349,9394 +pub struct SetStatus(pub String);SetStatus355,9470 +impl Effect for SetStatus {SetStatus356,9504 + fn apply(&self, app: &mut App) {apply357,9532 +pub struct MarkDirty;MarkDirty363,9636 +impl Effect for MarkDirty {MarkDirty364,9658 + fn apply(&self, app: &mut App) {apply365,9686 +pub struct SetYanked(pub Option);SetYanked371,9775 +impl Effect for SetYanked {SetYanked372,9820 + fn apply(&self, app: &mut App) {apply373,9848 +pub struct SetSearchQuery(pub String);SetSearchQuery379,9948 +impl Effect for SetSearchQuery {SetSearchQuery380,9987 + fn apply(&self, app: &mut App) {apply381,10020 +pub struct SetSearchMode(pub bool);SetSearchMode387,10126 +impl Effect for SetSearchMode {SetSearchMode388,10162 + fn apply(&self, app: &mut App) {apply389,10194 +pub struct SetBuffer {SetBuffer396,10326 + pub name: String,name397,10349 + pub value: String,value398,10371 +impl Effect for SetBuffer {SetBuffer400,10396 + fn apply(&self, app: &mut App) {apply401,10424 +pub struct SetTileCatIdx(pub usize);SetTileCatIdx412,10752 +impl Effect for SetTileCatIdx {SetTileCatIdx413,10789 + fn apply(&self, app: &mut App) {apply414,10821 +pub struct StartDrill(pub Vec<(CellKey, CellValue)>);StartDrill422,11020 +impl Effect for StartDrill {StartDrill423,11074 + fn apply(&self, app: &mut App) {apply424,11103 +pub struct ApplyAndClearDrill;ApplyAndClearDrill434,11418 +impl Effect for ApplyAndClearDrill {ApplyAndClearDrill435,11449 + fn apply(&self, app: &mut App) {apply436,11486 +pub struct SetDrillPendingEdit {SetDrillPendingEdit492,13635 + pub record_idx: usize,record_idx493,13668 + pub col_name: String,col_name494,13695 + pub new_value: String,new_value495,13721 +impl Effect for SetDrillPendingEdit {SetDrillPendingEdit497,13750 + fn apply(&self, app: &mut App) {apply498,13788 +pub struct Save;Save511,14274 +impl Effect for Save {Save512,14291 + fn apply(&self, app: &mut App) {apply513,14314 +pub struct SaveAs(pub PathBuf);SaveAs531,14877 +impl Effect for SaveAs {SaveAs532,14909 + fn apply(&self, app: &mut App) {apply533,14934 +pub struct WizardKey {WizardKey551,15548 + pub key_code: crossterm::event::KeyCode,key_code552,15571 +impl Effect for WizardKey {WizardKey554,15618 + fn apply(&self, app: &mut App) {apply555,15646 +pub struct StartImportWizard(pub String);StartImportWizard681,21286 +impl Effect for StartImportWizard {StartImportWizard682,21328 + fn apply(&self, app: &mut App) {apply683,21364 +pub struct ExportCsv(pub PathBuf);ExportCsv702,21999 +impl Effect for ExportCsv {ExportCsv703,22034 + fn apply(&self, app: &mut App) {apply704,22062 +pub struct LoadModel(pub PathBuf);LoadModel719,22544 +impl Effect for LoadModel {LoadModel720,22579 + fn apply(&self, app: &mut App) {apply721,22607 +pub struct ImportJsonHeadless {ImportJsonHeadless737,23116 + pub path: PathBuf,path738,23148 + pub model_name: Option,model_name739,23171 + pub array_path: Option,array_path740,23207 +impl Effect for ImportJsonHeadless {ImportJsonHeadless742,23245 + fn apply(&self, app: &mut App) {apply743,23282 +pub struct SetPanelOpen {SetPanelOpen847,26844 + pub panel: Panel,panel848,26870 + pub open: bool,open849,26892 +pub enum Panel {Panel853,26945 + Formula,Formula854,26962 + Category,Category855,26975 + View,View856,26989 +impl Panel {Panel859,27002 + pub fn mode(self) -> AppMode {mode860,27015 +impl Effect for SetPanelOpen {SetPanelOpen869,27245 + fn apply(&self, app: &mut App) {apply870,27276 +pub struct SetPanelCursor {SetPanelCursor880,27570 + pub panel: Panel,panel881,27598 + pub cursor: usize,cursor882,27620 +impl Effect for SetPanelCursor {SetPanelCursor884,27645 + fn apply(&self, app: &mut App) {apply885,27678 +pub fn mark_dirty() -> Box {mark_dirty896,28140 +pub fn set_status(msg: impl Into) -> Box {set_status900,28208 +pub fn change_mode(mode: AppMode) -> Box {change_mode904,28310 +pub fn set_selected(row: usize, col: usize) -> Box {set_selected908,28399 +pub struct HelpPageNext;HelpPageNext915,28709 +impl Effect for HelpPageNext {HelpPageNext916,28734 + fn apply(&self, app: &mut App) {apply917,28765 +pub struct HelpPagePrev;HelpPagePrev924,28964 +impl Effect for HelpPagePrev {HelpPagePrev925,28989 + fn apply(&self, app: &mut App) {apply926,29020 +pub struct HelpPageSet(pub usize);HelpPageSet932,29140 +impl Effect for HelpPageSet {HelpPageSet933,29175 + fn apply(&self, app: &mut App) {apply934,29205 +pub fn help_page_next() -> Box {help_page_next939,29283 +pub fn help_page_prev() -> Box {help_page_prev943,29358 +pub fn help_page_set(page: usize) -> Box {help_page_set947,29433 +mod tests {tests952,29536 + fn test_app() -> App {test_app957,29646 + fn add_category_effect() {add_category_effect971,30242 + fn add_item_to_existing_category() {add_item_to_existing_category978,30442 + fn add_item_to_nonexistent_category_sets_status() {add_item_to_nonexistent_category_sets_status996,30915 + fn set_cell_and_clear_cell() {set_cell_and_clear_cell1007,31224 + fn add_formula_valid() {add_formula_valid1021,31699 + fn add_formula_adds_target_item_to_category() {add_formula_adds_target_item_to_category1035,32231 + fn add_formula_to_measure_shows_in_effective_items() {add_formula_to_measure_shows_in_effective_items1067,33271 + fn add_formula_invalid_sets_error_status() {add_formula_invalid_sets_error_status1093,34203 + fn remove_formula_effect() {remove_formula_effect1104,34520 + fn switch_view_pushes_to_back_stack() {switch_view_pushes_to_back_stack1123,35203 + fn switch_view_to_same_does_not_push_stack() {switch_view_to_same_does_not_push_stack1136,35676 + fn view_back_and_forward() {view_back_and_forward1143,35888 + fn view_back_with_empty_stack_is_noop() {view_back_with_empty_stack_is_noop1163,36617 + fn create_and_delete_view() {create_and_delete_view1171,36853 + fn set_axis_effect() {set_axis_effect1181,37172 + fn transpose_axes_effect() {transpose_axes_effect1192,37451 + fn set_selected_effect() {set_selected_effect1230,38663 + fn set_row_and_col_offset() {set_row_and_col_offset1237,38852 + fn change_mode_effect() {change_mode_effect1248,39316 + fn set_buffer_empty_clears() {set_buffer_empty_clears1258,39680 + fn set_status_effect() {set_status_effect1271,40066 + fn mark_dirty_effect() {mark_dirty_effect1278,40249 + fn set_yanked_effect() {set_yanked_effect1286,40423 + fn set_search_query_and_mode() {set_search_query_and_mode1293,40634 + fn set_buffer_normal_key() {set_buffer_normal_key1306,41145 + fn set_buffer_search_writes_to_search_query() {set_buffer_search_writes_to_search_query1317,41428 + fn set_panel_open_and_cursor() {set_panel_open_and_cursor1331,41968 + fn set_tile_cat_idx_effect() {set_tile_cat_idx_effect1363,42696 + fn help_page_navigation() {help_page_navigation1372,43042 + fn help_page_prev_clamps_at_zero() {help_page_prev_clamps_at_zero1386,43471 + fn start_drill_and_apply_clear_drill_with_no_edits() {start_drill_and_apply_clear_drill_with_no_edits1395,43824 + fn apply_and_clear_drill_with_value_edit() {apply_and_clear_drill_with_value_edit1412,44433 + fn apply_and_clear_drill_with_coord_rename() {apply_and_clear_drill_with_coord_rename1439,45312 + fn apply_and_clear_drill_empty_value_clears_cell() {apply_and_clear_drill_empty_value_clears_cell1480,46669 + fn toggle_prune_empty_effect() {toggle_prune_empty_effect1506,47610 + fn toggle_cat_expand_effect() {toggle_cat_expand_effect1516,47972 + fn remove_item_and_category() {remove_item_and_category1526,48344 + fn set_number_format_effect() {set_number_format_effect1549,49103 + fn set_page_selection_effect() {set_page_selection_effect1558,49501 + fn hide_and_show_item_effects() {hide_and_show_item_effects1571,49995 + fn toggle_group_effect() {toggle_group_effect1591,50679 + fn cycle_axis_effect() {cycle_axis_effect1618,51509 + fn save_without_file_path_shows_status() {save_without_file_path_shows_status1629,51969 + fn panel_mode_mapping() {panel_mode_mapping1638,52332 + +src/ui/mod.rs,400 +pub mod app;app1,0 +pub mod cat_tree;cat_tree2,13 +pub mod category_panel;category_panel3,31 +pub mod effect;effect4,55 +pub mod formula_panel;formula_panel5,71 +pub mod grid;grid6,94 +pub mod help;help7,108 +pub mod import_wizard_ui;import_wizard_ui8,122 +pub mod panel;panel9,148 +pub mod tile_bar;tile_bar10,163 +pub mod view_panel;view_panel11,181 +pub mod which_key;which_key12,201 + +src/ui/category_panel.rs,828 +fn axis_display(axis: Axis) -> (&'static str, Color) {axis_display13,265 +pub struct CategoryContent<'a> {CategoryContent22,549 + model: &'a Model,model23,582 + tree: Vec,tree24,604 +impl<'a> CategoryContent<'a> {CategoryContent27,636 + pub fn new(model: &'a Model, expanded: &'a std::collections::HashSet) -> Self {new28,667 +impl PanelContent for CategoryContent<'_> {CategoryContent34,849 + fn is_active(&self, mode: &AppMode) -> bool {is_active35,893 + fn active_color(&self) -> Color {active_color42,1087 + fn title(&self) -> &str {title46,1152 + fn item_count(&self) -> usize {item_count50,1212 + fn empty_message(&self) -> &str {empty_message54,1279 + fn render_item(&self, index: usize, is_selected: bool, inner: Rect, buf: &mut Buffer) {render_item58,1374 + +src/ui/help.rs,2063 +pub const HELP_PAGE_COUNT: usize = 5;HELP_PAGE_COUNT9,176 +struct HelpStyles {HelpStyles12,261 + heading: Style,heading13,281 + key: Style,key14,301 + dim: Style,dim15,317 + normal: Style,normal16,333 + accent: Style,accent17,352 + banner: Style,banner18,371 +impl HelpStyles {HelpStyles21,393 + fn new() -> Self {new22,411 +struct HelpLine {HelpLine40,1046 + key: &'static str,key41,1064 + desc: &'static str,desc42,1087 + style: Style,style43,1111 +impl HelpLine {HelpLine46,1132 + fn heading(text: &'static str, styles: &HelpStyles) -> Self {heading47,1148 + fn key(k: &'static str, d: &'static str, styles: &HelpStyles) -> Self {key55,1326 + fn dim(k: &'static str, d: &'static str, styles: &HelpStyles) -> Self {dim63,1506 + fn text(t: &'static str, styles: &HelpStyles) -> Self {text71,1686 + fn accent(t: &'static str, styles: &HelpStyles) -> Self {accent79,1854 + fn banner(t: &'static str, styles: &HelpStyles) -> Self {banner87,2024 + fn blank() -> Self {blank95,2194 +const PAGE_TITLES: [&str; HELP_PAGE_COUNT] = [PAGE_TITLES105,2375 +fn page_welcome(s: &HelpStyles) -> Vec {page_welcome115,2699 +fn page_navigation(s: &HelpStyles) -> Vec {page_navigation188,5348 +fn page_editing(s: &HelpStyles) -> Vec {page_editing235,7304 +fn page_panels(s: &HelpStyles) -> Vec {page_panels292,9521 +fn page_commands(s: &HelpStyles) -> Vec {page_commands341,11854 +fn page_content(page: usize) -> Vec {page_content393,14082 +pub struct HelpWidget {HelpWidget407,14628 + page: usize,page408,14652 +impl HelpWidget {HelpWidget411,14672 + pub fn new(page: usize) -> Self {new412,14690 +impl Widget for HelpWidget {HelpWidget419,14841 + fn render(self, area: Rect, buf: &mut Buffer) {render420,14870 +fn render_tab_bar(buf: &mut Buffer, x: u16, y: u16, width: u16, active_page: usize) {render_tab_bar500,18484 +fn render_footer(buf: &mut Buffer, x: u16, y: u16, width: u16, page: usize) {render_footer542,19631 + +src/ui/panel.rs,999 +pub trait PanelContent {PanelContent11,234 + fn is_active(&self, mode: &AppMode) -> bool;is_active13,330 + fn active_color(&self) -> Color;active_color15,460 + fn title(&self) -> &str;title17,566 + fn item_count(&self) -> usize;item_count19,630 + fn empty_message(&self) -> &str;empty_message21,718 + fn render_item(&self, index: usize, is_selected: bool, inner: Rect, buf: &mut Buffer);render_item24,892 + fn footer_height(&self) -> u16 {footer_height26,1052 + fn render_footer(&self, _inner: Rect, _buf: &mut Buffer) {}render_footer30,1175 +pub struct Panel<'a, C: PanelContent> {Panel34,1331 + content: C,content35,1371 + mode: &'a AppMode,mode36,1387 + cursor: usize,cursor37,1410 +impl<'a, C: PanelContent> Panel<'a, C> {Panel40,1432 + pub fn new(content: C, mode: &'a AppMode, cursor: usize) -> Self {new41,1473 +impl Widget for Panel<'_, C> {Panel50,1637 + fn render(self, area: Rect, buf: &mut Buffer) {render51,1685 + +src/ui/app.rs,6779 +pub struct DrillState {DrillState26,738 + pub records: Rc>,records28,845 + pub pending_edits: std::collections::HashMap<(usize, String), String>,pending_edits31,1070 +pub struct MinibufferConfig {MinibufferConfig37,1299 + pub buffer_key: &'static str,buffer_key38,1329 + pub prompt: String,prompt39,1363 + pub color: Color,color40,1387 +pub enum AppMode {AppMode44,1447 + Normal,Normal45,1466 + Editing {Editing46,1478 + FormulaEdit {FormulaEdit49,1534 + FormulaPanel,FormulaPanel52,1594 + CategoryPanel,CategoryPanel53,1612 + CategoryAdd {CategoryAdd55,1704 + ItemAdd {ItemAdd59,1842 + ViewPanel,ViewPanel63,1924 + TileSelect,TileSelect64,1939 + ImportWizard,ImportWizard65,1955 + ExportPrompt {ExportPrompt66,1973 + CommandMode {CommandMode70,2069 + Help,Help73,2129 + Quit,Quit74,2139 +impl AppMode {AppMode77,2152 + pub fn minibuffer(&self) -> Option<&MinibufferConfig> {minibuffer79,2240 + pub fn editing() -> Self {editing91,2658 + pub fn formula_edit() -> Self {formula_edit101,2899 + pub fn command_mode() -> Self {command_mode111,3154 + pub fn category_add() -> Self {category_add121,3403 + pub fn item_add(category: String) -> Self {item_add131,3666 + pub fn export_prompt() -> Self {export_prompt143,3987 +pub struct App {App154,4251 + pub model: Model,model155,4268 + pub file_path: Option,file_path156,4290 + pub mode: AppMode,mode157,4326 + pub status_msg: String,status_msg158,4349 + pub wizard: Option,wizard159,4377 + pub last_autosave: Instant,last_autosave160,4415 + pub search_query: String,search_query161,4447 + pub search_mode: bool,search_mode162,4477 + pub formula_panel_open: bool,formula_panel_open163,4504 + pub category_panel_open: bool,category_panel_open164,4538 + pub view_panel_open: bool,view_panel_open165,4573 + pub cat_panel_cursor: usize,cat_panel_cursor166,4604 + pub view_panel_cursor: usize,view_panel_cursor167,4637 + pub formula_cursor: usize,formula_cursor168,4671 + pub dirty: bool,dirty169,4702 + pub yanked: Option,yanked171,4763 + pub tile_cat_idx: usize,tile_cat_idx173,4863 + pub view_back_stack: Vec,view_back_stack176,5015 + pub view_forward_stack: Vec,view_forward_stack178,5133 + pub drill_state: Option,drill_state183,5455 + pub help_page: usize,help_page185,5553 + pub term_width: u16,term_width187,5643 + pub term_height: u16,term_height188,5668 + pub expanded_cats: std::collections::HashSet,expanded_cats190,5755 + pub buffers: HashMap,buffers192,5861 + pub transient_keymap: Option>,transient_keymap194,5988 + pub layout: GridLayout,layout197,6165 + keymap_set: KeymapSet,keymap_set198,6193 +impl App {App201,6223 + pub fn new(mut model: Model, file_path: Option) -> Self {new202,6234 + pub fn rebuild_layout(&mut self) {rebuild_layout250,8084 + pub fn cmd_context(&self, key: KeyCode, _mods: KeyModifiers) -> CmdContext<'_> {cmd_context265,8683 + pub fn apply_effects(&mut self, effects: Vec>) {apply_effects327,11324 + pub fn is_empty_model(&self) -> bool {is_empty_model336,11688 + pub fn handle_key(&mut self, key: KeyEvent) -> Result<()> {handle_key348,12049 + pub fn autosave_if_needed(&mut self) {autosave_if_needed376,13064 + pub fn start_import_wizard(&mut self, json: serde_json::Value) {start_import_wizard385,13439 + pub fn hint_text(&self) -> &'static str {hint_text391,13668 +mod tests {tests421,15079 + fn two_col_model() -> App {two_col_model425,15139 + fn run_cmd(app: &mut App, cmd: &dyn crate::command::cmd::Cmd) {run_cmd437,15626 + fn enter_advance_cmd(app: &App) -> crate::command::cmd::navigation::EnterAdvance {enter_advance_cmd444,15867 + fn enter_advance_moves_down_within_column() {enter_advance_moves_down_within_column461,16419 + fn enter_advance_wraps_to_top_of_next_column() {enter_advance_wraps_to_top_of_next_column470,16720 + fn enter_advance_stays_at_bottom_right() {enter_advance_stays_at_bottom_right480,17088 + fn import_command_switches_to_import_wizard_mode() {import_command_switches_to_import_wizard_mode489,17386 + fn execute_import_command_leaves_mode_as_import_wizard() {execute_import_command_leaves_mode_as_import_wizard502,17921 + fn command_mode_typing_appends_to_buffer() {command_mode_typing_appends_to_buffer514,18395 + fn col_offset_scrolls_when_cursor_moves_past_visible_columns() {col_offset_scrolls_when_cursor_moves_past_visible_columns530,19027 + fn home_jumps_to_first_col() {home_jumps_to_first_col577,21043 + fn end_jumps_to_last_col() {end_jumps_to_last_col586,21349 + fn page_down_scrolls_by_three_quarters_visible() {page_down_scrolls_by_three_quarters_visible595,21652 + fn page_up_scrolls_backward() {page_up_scrolls_backward618,22468 + fn jump_last_row_scrolls_with_small_terminal() {jump_last_row_scrolls_with_small_terminal634,22970 + fn ctrl_d_scrolls_viewport_with_small_terminal() {ctrl_d_scrolls_viewport_with_small_terminal660,24015 + fn tab_in_edit_mode_commits_and_moves_right() {tab_in_edit_mode_commits_and_moves_right687,25111 + fn command_mode_buffer_cleared_on_reentry() {command_mode_buffer_cleared_on_reentry714,26113 + fn fresh_model_is_empty() {fresh_model_is_empty735,27114 + fn model_with_user_category_is_not_empty() {model_with_user_category_is_not_empty744,27355 + fn help_page_next_advances_page() {help_page_next_advances_page757,27842 + fn help_page_prev_goes_back() {help_page_prev_goes_back768,28187 + fn help_page_clamps_at_zero() {help_page_clamps_at_zero779,28528 + fn help_page_clamps_at_max() {help_page_clamps_at_max790,28869 + fn help_q_returns_to_normal() {help_q_returns_to_normal809,29527 + fn help_esc_returns_to_normal() {help_esc_returns_to_normal822,29895 + fn help_colon_enters_command_mode() {help_colon_enters_command_mode835,30261 + fn add_item_to_nonexistent_category_sets_status() {add_item_to_nonexistent_category_sets_status851,30859 + fn add_formula_with_bad_syntax_sets_status() {add_formula_with_bad_syntax_sets_status867,31374 + fn tile_axis_change_stays_in_tile_select() {tile_axis_change_stays_in_tile_select885,32045 + fn category_panel_colon_enters_command_mode() {category_panel_colon_enters_command_mode907,32862 + fn view_panel_colon_enters_command_mode() {view_panel_colon_enters_command_mode921,33300 + fn tile_select_colon_enters_command_mode() {tile_select_colon_enters_command_mode935,33726 + +src/lib.rs,249 +pub mod command;command1,0 +pub mod draw;draw2,17 +pub mod format;format3,31 +pub mod formula;formula4,47 +pub mod import;import5,64 +pub mod model;model6,80 +pub mod persistence;persistence7,95 +pub mod ui;ui8,116 +pub mod view;view9,128 + +src/draw.rs,1274 +struct TuiContext<'a> {TuiContext31,881 + terminal: Terminal>,terminal32,905 +impl<'a> TuiContext<'a> {TuiContext35,966 + fn enter(out: &'a mut Stdout) -> Result {enter36,992 +impl<'a> Drop for TuiContext<'a> {TuiContext46,1256 + fn drop(&mut self) {drop47,1291 +pub fn run_tui(run_tui53,1438 +fn fill_line(left: String, right: &str, width: u16) -> String {fill_line96,2656 +fn centered_popup(area: Rect, width: u16, height: u16) -> Rect {centered_popup101,2842 +fn draw_popup_frame(f: &mut Frame, popup: Rect, title: &str, border_color: Color) -> Rect {draw_popup_frame109,3119 +fn mode_name(mode: &AppMode) -> &'static str {mode_name120,3474 +fn mode_style(mode: &AppMode) -> Style {mode_style139,4163 +fn draw(f: &mut Frame, app: &App) {draw148,4562 +fn draw_title(f: &mut Frame, area: Rect, app: &App) {draw_title186,5907 +fn draw_content(f: &mut Frame, area: Rect, app: &App) {draw_content209,6613 +fn draw_tile_bar(f: &mut Frame, area: Rect, app: &App) {draw_tile_bar268,8484 +fn draw_bottom_bar(f: &mut Frame, area: Rect, app: &App) {draw_bottom_bar272,8626 +fn draw_status(f: &mut Frame, area: Rect, app: &App) {draw_status294,9251 +fn draw_welcome(f: &mut Frame, area: Rect) {draw_welcome316,9932 + +src/formula/mod.rs,49 +pub mod ast;ast1,0 +pub mod parser;parser2,13 + +src/formula/ast.rs,1076 +pub enum AggFunc {AggFunc4,86 + Sum,Sum5,105 + Avg,Avg6,114 + Min,Min7,123 + Max,Max8,132 + Count,Count9,141 +pub enum BinOp {BinOp17,488 + Add,Add18,505 + Sub,Sub19,514 + Mul,Mul20,523 + Div,Div21,532 + Pow,Pow22,541 + Eq,Eq23,550 + Ne,Ne24,558 + Lt,Lt25,566 + Gt,Gt26,574 + Le,Le27,582 + Ge,Ge28,590 +pub struct Filter {Filter32,649 + pub category: String,category33,669 + pub item: String,item34,695 +pub enum Expr {Expr38,768 + Number(f64),Number39,784 + Ref(String),Ref40,801 + BinOp(BinOp, Box, Box),BinOp41,818 + UnaryMinus(Box),UnaryMinus42,858 + Agg(AggFunc, Box, Option),Agg43,885 + If(Box, Box, Box),If44,930 +pub struct Formula {Formula48,1022 + pub raw: String,raw50,1104 + pub target: String,target52,1194 + pub target_category: String,target_category54,1266 + pub expr: Expr,expr56,1334 + pub filter: Option,filter58,1384 +impl Formula {Formula61,1419 + pub fn new(new62,1434 + +src/formula/parser.rs,4182 +pub fn parse_formula(raw: &str, target_category: &str) -> Result {parse_formula7,201 +fn split_where(s: &str) -> (&str, Option<&str>) {split_where26,820 +fn unquote(s: &str) -> String {unquote64,1950 +fn parse_where(s: &str) -> Result {parse_where73,2180 +pub fn parse_expr(s: &str) -> Result {parse_expr84,2576 +enum Token {Token98,2928 + Number(f64),Number99,2941 + Ident(String),Ident100,2958 + Str(String),Str101,2977 + Plus,Plus102,2994 + Minus,Minus103,3004 + Star,Star104,3015 + Slash,Slash105,3025 + Caret,Caret106,3036 + LParen,LParen107,3047 + RParen,RParen108,3059 + Comma,Comma109,3071 + Eq,Eq110,3082 + Ne,Ne111,3090 + Lt,Lt112,3098 + Gt,Gt113,3106 + Le,Le114,3114 + Ge,Ge115,3122 +fn tokenize(s: &str) -> Result> {tokenize118,3133 +fn parse_add_sub(tokens: &[Token], pos: &mut usize) -> Result {parse_add_sub277,8753 +fn parse_mul_div(tokens: &[Token], pos: &mut usize) -> Result {parse_mul_div292,9211 +fn parse_pow(tokens: &[Token], pos: &mut usize) -> Result {parse_pow307,9661 +fn parse_unary(tokens: &[Token], pos: &mut usize) -> Result {parse_unary317,9991 +fn parse_primary(tokens: &[Token], pos: &mut usize) -> Result {parse_primary326,10274 +fn parse_comparison(tokens: &[Token], pos: &mut usize) -> Result {parse_comparison441,15475 +mod tests {tests461,16050 + fn parse_simple_subtraction() {parse_simple_subtraction466,16153 + fn parse_where_clause() {parse_where_clause474,16434 + fn parse_sum_aggregation() {parse_sum_aggregation483,16753 + fn parse_avg_aggregation() {parse_avg_aggregation489,16942 + fn parse_if_expression() {parse_if_expression495,17129 + fn parse_numeric_literal() {parse_numeric_literal501,17326 + fn parse_chained_arithmetic() {parse_chained_arithmetic507,17519 + fn parse_missing_equals_returns_error() {parse_missing_equals_returns_error512,17638 + fn parse_min_aggregation() {parse_min_aggregation519,17949 + fn parse_max_aggregation() {parse_max_aggregation525,18135 + fn parse_count_aggregation() {parse_count_aggregation531,18321 + fn parse_sum_with_top_level_where_works() {parse_sum_with_top_level_where_works539,18667 + fn parse_sum_with_inline_where_filter() {parse_sum_with_inline_where_filter550,19190 + fn parse_if_with_comparison_operators() {parse_if_with_comparison_operators564,19852 + fn parse_where_with_quoted_string_inside_expression() {parse_where_with_quoted_string_inside_expression585,20774 + fn parse_power_operator() {parse_power_operator595,21275 + fn parse_unary_minus() {parse_unary_minus603,21640 + fn parse_multiplication() {parse_multiplication611,21964 + fn parse_division() {parse_division617,22152 + fn parse_nested_parens() {parse_nested_parens625,22493 + fn parse_aggregate_name_without_parens_is_ref() {parse_aggregate_name_without_parens_is_ref633,22788 + fn parse_if_without_parens_is_ref() {parse_if_without_parens_is_ref643,23182 + fn parse_quoted_string_in_where() {parse_quoted_string_in_where656,23725 + fn parse_unexpected_token_error() {parse_unexpected_token_error666,24205 + fn parse_unexpected_character_error() {parse_unexpected_character_error673,24393 + fn parse_empty_expression_error() {parse_empty_expression_error679,24537 + fn tokenizer_breaks_at_where_keyword() {tokenizer_breaks_at_where_keyword685,24669 + fn parse_multi_word_identifier() {parse_multi_word_identifier695,25152 + fn split_where_ignores_where_inside_quotes() {split_where_ignores_where_inside_quotes703,25485 + fn pipe_quoted_identifier_in_expression() {pipe_quoted_identifier_in_expression713,25962 + fn pipe_quoted_keyword_as_identifier() {pipe_quoted_keyword_as_identifier725,26463 + fn pipe_quoted_identifier_with_special_chars() {pipe_quoted_identifier_with_special_chars737,26947 + fn pipe_quoted_in_aggregate() {pipe_quoted_in_aggregate749,27477 + fn pipe_quoted_in_where_filter_value() {pipe_quoted_in_where_filter_value759,27841 + fn pipe_quoted_in_inline_where() {pipe_quoted_in_inline_where766,28091 + +src/persistence/mod.rs,4159 +struct ImprovParser;ImprovParser18,466 +fn is_bare_name(name: &str) -> bool {is_bare_name23,707 +fn escape_pipe(s: &str) -> String {escape_pipe33,1040 + fn text_value_is_empty_string() {text_value_is_empty_string1290,46916 + fn text_value_with_newline() {text_value_with_newline1306,47424 + fn text_value_looks_like_number() {text_value_looks_like_number1322,47956 + fn text_value_with_hash_prefix() {text_value_with_hash_prefix1338,48488 + fn item_name_with_brackets_misinterpreted_as_group() {item_name_with_brackets_misinterpreted_as_group1354,49030 + fn category_name_with_comma_space_in_data() {category_name_with_comma_space_in_data1373,49788 + fn item_name_with_equals_sign_in_data() {item_name_with_equals_sign_in_data1394,50558 + fn view_name_with_parentheses() {view_name_with_parentheses1415,51280 + fn multiple_tricky_text_cells() {multiple_tricky_text_cells1431,51797 +mod parser_prop_tests {parser_prop_tests1468,53153 + fn coord(pairs: &[(&str, &str)]) -> CellKey {coord1474,53325 + fn safe_ident() -> impl Strategy {safe_ident1484,53606 + fn tricky_text() -> impl Strategy {tricky_text1489,53764 + fn cell_value() -> impl Strategy {cell_value1506,54317 + fn arbitrary_model() -> impl Strategy {arbitrary_model1516,54677 +mod parser_edge_cases {parser_edge_cases1736,63478 + fn coord(pairs: &[(&str, &str)]) -> CellKey {coord1742,63659 + fn backtick_in_category_name() {backtick_in_category_name1754,64039 + fn item_name_with_both_equals_and_comma() {item_name_with_both_equals_and_comma1775,64738 + fn hidden_item_with_slash_in_name() {hidden_item_with_slash_in_name1798,65621 + fn collapsed_group_with_slash_in_name() {collapsed_group_with_slash_in_name1815,66239 + fn view_name_ending_with_active_string() {view_name_ending_with_active_string1829,66703 + fn group_name_with_brackets() {group_name_with_brackets1848,67484 + fn item_in_group_where_item_has_brackets() {item_in_group_where_item_has_brackets1871,68294 + fn parse_empty_string() {parse_empty_string1898,69358 + fn parse_just_model_name() {parse_just_model_name1907,69603 + fn parse_data_without_value() {parse_data_without_value1913,69757 + fn parse_data_with_empty_coords() {parse_data_with_empty_coords1920,69989 + fn parse_duplicate_categories() {parse_duplicate_categories1927,70223 + fn parse_category_with_no_items() {parse_category_with_no_items1936,70592 + fn number_negative_zero_roundtrips() {number_negative_zero_roundtrips1947,71110 + fn number_very_large_roundtrips() {number_very_large_roundtrips1965,71788 + fn number_very_small_roundtrips() {number_very_small_roundtrips1987,72512 + fn number_pi_roundtrips() {number_pi_roundtrips2009,73242 + fn model_name_with_leading_trailing_spaces() {model_name_with_leading_trailing_spaces2033,74115 + fn category_name_with_trailing_spaces() {category_name_with_trailing_spaces2041,74406 + fn data_line_with_extra_whitespace() {data_line_with_extra_whitespace2049,74714 + fn three_categories_round_trip() {three_categories_round_trip2059,75254 + fn text_value_with_backslash() {text_value_with_backslash2089,76386 + fn text_value_with_backslash_n_literal() {text_value_with_backslash_n_literal2110,77096 +mod generator {generator2138,78240 + fn load_grammar() -> HashMap {load_grammar2145,78454 + struct Gen<'g> {Gen2161,79179 + rules: &'g HashMap,rules2162,79200 + choices: Vec,choices2163,79254 + pos: usize,pos2164,79280 + impl<'g> Gen<'g> {Gen2167,79307 + fn new(rules: &'g HashMap, choices: Vec) -> Self {new2168,79330 + fn pick(&mut self) -> u8 {pick2177,79593 + fn emit(&mut self, expr: &Expr, out: &mut String) {emit2183,79750 + fn generate(&mut self, rule_name: &str) -> String {generate2259,82798 + pub fn improv_file() -> impl Strategy {improv_file2269,83149 +mod grammar_prop_tests {grammar_prop_tests2280,83509 + +src/model/symbol.rs,879 +pub struct Symbol(u64);Symbol5,171 +pub struct SymbolTable {SymbolTable9,274 + to_id: HashMap,to_id10,299 + to_str: Vec,to_str11,335 +impl SymbolTable {SymbolTable14,363 + pub fn new() -> Self {new16,406 + pub fn intern(&mut self, s: &str) -> Symbol {intern22,564 + pub fn get(&self, s: &str) -> Option {get33,909 + pub fn resolve(&self, sym: Symbol) -> &str {resolve38,1047 + pub fn intern_pair(&mut self, cat: &str, item: &str) -> (Symbol, Symbol) {intern_pair43,1180 + pub fn intern_coords(&mut self, coords: &[(String, String)]) -> Vec<(Symbol, Symbol)> {intern_coords48,1351 +mod tests {tests54,1534 + fn intern_returns_same_id() {intern_returns_same_id58,1577 + fn different_strings_different_ids() {different_strings_different_ids66,1766 + fn resolve_roundtrips() {resolve_roundtrips74,1964 + +src/model/types.rs,10437 +const MAX_CATEGORIES: usize = 12;MAX_CATEGORIES12,283 +pub struct Model {Model15,366 + pub name: String,name16,385 + pub categories: IndexMap,categories17,407 + pub data: DataStore,data18,455 + formulas: Vec,formulas19,480 + pub views: IndexMap,views20,508 + pub active_view: String,active_view21,547 + next_category_id: CategoryId,next_category_id22,576 + pub measure_agg: HashMap,measure_agg26,781 + formula_cache: HashMap,formula_cache29,926 +impl Model {Model32,977 + pub fn new(name: impl Into) -> Self {new33,990 + pub fn add_category(&mut self, name: impl Into) -> Result {add_category77,2687 + pub fn add_label_category(&mut self, name: impl Into) -> Result {add_label_category105,3777 + pub fn remove_category(&mut self, name: &str) {remove_category124,4524 + pub fn remove_item(&mut self, cat_name: &str, item_name: &str) {remove_item148,5347 + pub fn category_mut(&mut self, name: &str) -> Option<&mut Category> {category_mut163,5814 + pub fn category(&self, name: &str) -> Option<&Category> {category167,5933 + pub fn set_cell(&mut self, key: CellKey, value: CellValue) {set_cell171,6036 + pub fn clear_cell(&mut self, key: &CellKey) {clear_cell175,6143 + pub fn get_cell(&self, key: &CellKey) -> Option<&CellValue> {get_cell179,6231 + pub fn add_formula(&mut self, formula: Formula) {add_formula183,6331 + pub fn remove_formula(&mut self, target: &str, target_category: &str) {remove_formula201,7115 + pub fn formulas(&self) -> &[Formula] {formulas206,7308 + pub fn active_view(&self) -> &View {active_view210,7381 + pub fn active_view_mut(&mut self) -> &mut View {active_view_mut216,7549 + pub fn create_view(&mut self, name: impl Into) -> &mut View {create_view222,7733 + pub fn switch_view(&mut self, name: &str) -> Result<()> {switch_view233,8146 + pub fn delete_view(&mut self, name: &str) -> Result<()> {delete_view242,8405 + pub fn normalize_view_state(&mut self) {normalize_view_state256,8930 + pub fn category_names(&self) -> Vec<&str> {category_names265,9196 + pub fn measure_item_names(&self) -> Vec {measure_item_names273,9593 + pub fn effective_item_names(&self, cat_name: &str) -> Vec {effective_item_names294,10325 + pub fn regular_category_names(&self) -> Vec<&str> {regular_category_names310,10850 + const MAX_EVAL_DEPTH: u8 = 16;MAX_EVAL_DEPTH322,11344 + pub fn evaluate(&self, key: &CellKey) -> Option {evaluate324,11380 + fn evaluate_depth(&self, key: &CellKey, depth: u8) -> Option {evaluate_depth328,11507 + pub fn evaluate_aggregated(&self, key: &CellKey, none_cats: &[String]) -> Option evaluate_aggregated345,12257 + pub fn evaluate_aggregated_f64(&self, key: &CellKey, none_cats: &[String]) -> f64 {evaluate_aggregated_f64384,13586 + pub fn recompute_formulas(&mut self, none_cats: &[String]) {recompute_formulas398,14232 + fn evaluate_formula_cell(&self, key: &CellKey, none_cats: &[String]) -> Option {evaluate_formula_cell456,16547 + fn eval_formula_with_cache(eval_formula_with_cache468,17058 + fn find_item_category<'a>(model: &'a Model, item_name: &str) -> Option<&'a str> {find_item_category487,17627 + fn eval_expr_cached(eval_expr_cached503,18256 + fn eval_bool_cached(eval_bool_cached608,23043 + fn aggregate_raw(&self, key: &CellKey, none_cats: &[String]) -> Option {aggregate_raw647,24430 + fn eval_formula_depth(eval_formula_depth674,25406 + fn find_item_category<'a>(model: &'a Model, item_name: &str) -> Option<&'a str> {find_item_category693,25947 + fn eval_expr(eval_expr712,26781 + fn eval_bool(eval_bool801,30819 +mod model_tests {model_tests843,32220 + fn coord(pairs: &[(&str, &str)]) -> CellKey {coord848,32338 + fn new_model_has_default_view() {new_model_has_default_view858,32571 + fn add_category_creates_entry() {add_category_creates_entry865,32781 + fn add_category_duplicate_is_idempotent() {add_category_duplicate_is_idempotent872,32970 + fn add_category_max_limit() {add_category_max_limit882,33318 + fn add_category_notifies_existing_views() {add_category_notifies_existing_views891,33555 + fn set_and_get_cell_roundtrip() {set_and_get_cell_roundtrip899,33852 + fn get_unset_cell_returns_empty() {get_unset_cell_returns_empty909,34234 + fn overwrite_cell() {overwrite_cell916,34417 + fn three_category_model_independent_cells() {three_category_model_independent_cells925,34725 + fn remove_category_deletes_category_and_cells() {remove_category_deletes_category_and_cells961,36040 + fn create_view_copies_category_structure() {create_view_copies_category_structure986,37012 + fn switch_view_changes_active_view() {switch_view_changes_active_view998,37469 + fn switch_view_unknown_returns_error() {switch_view_unknown_returns_error1006,37688 + fn delete_view_removes_it() {delete_view_removes_it1012,37847 + fn delete_last_view_returns_error() {delete_last_view_returns_error1020,38062 + fn delete_active_view_switches_to_another() {delete_active_view_switches_to_another1026,38215 + fn first_category_goes_to_row_second_to_column_rest_to_page() {first_category_goes_to_row_second_to_column_rest_to_page1035,38482 + fn data_is_shared_across_views() {data_is_shared_across_views1047,38929 + fn evaluate_aggregated_sums_over_hidden_dimension() {evaluate_aggregated_sums_over_hidden_dimension1056,39230 + fn measure_item_names_includes_formula_targets() {measure_item_names_includes_formula_targets1097,40789 + fn evaluate_aggregated_no_hidden_delegates_to_evaluate() {evaluate_aggregated_no_hidden_delegates_to_evaluate1128,41900 + fn evaluate_aggregated_respects_measure_agg() {evaluate_aggregated_respects_measure_agg1141,42367 +mod formula_tests {formula_tests1172,43506 + fn coord(pairs: &[(&str, &str)]) -> CellKey {coord1177,43638 + fn approx_eq(a: f64, b: f64) -> bool {approx_eq1186,43859 + fn revenue_cost_model() -> Model {revenue_cost_model1190,43938 + fn profit_equals_revenue_minus_cost() {profit_equals_revenue_minus_cost1223,44978 + fn formula_evaluates_per_region() {formula_evaluates_per_region1231,45307 + fn formula_multiplication() {formula_multiplication1241,45782 + fn formula_division() {formula_division1255,46253 + fn division_by_zero_yields_empty() {division_by_zero_yields_empty1271,46850 + fn unary_minus() {unary_minus1297,47802 + fn power_operator() {power_operator1308,48220 + fn formula_with_missing_ref_returns_empty() {formula_with_missing_ref_returns_empty1324,48777 + fn circular_formula_returns_error() {circular_formula_returns_error1340,49408 + fn self_referencing_formula_returns_error() {self_referencing_formula_returns_error1359,50118 + fn formula_where_applied_to_matching_region() {formula_where_applied_to_matching_region1375,50673 + fn formula_where_not_applied_to_non_matching_region() {formula_where_not_applied_to_non_matching_region1391,51219 + fn add_formula_replaces_same_target() {add_formula_replaces_same_target1406,51701 + fn remove_formula() {remove_formula1416,52163 + fn sum_aggregation_across_region() {sum_aggregation_across_region1426,52536 + fn count_aggregation() {count_aggregation1441,53077 + fn if_true_branch() {if_true_branch1464,53868 + fn if_false_branch() {if_false_branch1480,54423 + fn where_filter_absent_category_does_not_apply_formula() {where_filter_absent_category_does_not_apply_formula1505,55663 + fn sum_inner_expression_constrains_which_cells_are_summed() {sum_inner_expression_constrains_which_cells_are_summed1530,56928 + fn add_formula_same_target_name_different_category_both_coexist() {add_formula_same_target_name_different_category_both_coexist1564,58308 + fn add_formula_same_target_name_different_category_evaluates_independently() {add_formula_same_target_name_different_category_evaluates_independently1586,59187 + fn formula_chain_preserves_full_precision() {formula_chain_preserves_full_precision1618,60420 + fn remove_formula_only_removes_specified_target_category() {remove_formula_only_removes_specified_target_category1667,62470 +mod five_category {five_category1695,63384 + const DATA: &[(&str, &str, &str, &str, f64, f64)] = &[DATA1701,63543 + fn coord(region: &str, product: &str, channel: &str, time: &str, measure: &str) -> CellKey {coord1720,64534 + fn build_model() -> Model {build_model1730,64959 + fn approx(a: f64, b: f64) -> bool {approx1770,66494 + fn all_sixteen_revenue_cells_stored() {all_sixteen_revenue_cells_stored1775,66582 + fn all_sixteen_cost_cells_stored() {all_sixteen_cost_cells_stored1785,66871 + fn spot_check_raw_revenue() {spot_check_raw_revenue1795,67154 + fn distinct_cells_do_not_alias() {distinct_cells_do_not_alias1808,67543 + fn profit_formula_correct_at_every_intersection() {profit_formula_correct_at_every_intersection1820,67887 + fn margin_formula_correct_at_every_intersection() {margin_formula_correct_at_every_intersection1836,68530 + fn chained_formula_profit_feeds_margin() {chained_formula_profit_feeds_margin1852,69187 + fn update_revenue_updates_profit_and_margin() {update_revenue_updates_profit_and_margin1862,69510 + fn sum_revenue_for_east_region() {sum_revenue_for_east_region1881,70205 + fn sum_revenue_for_online_channel() {sum_revenue_for_online_channel1897,70783 + fn sum_revenue_for_shirts_q1() {sum_revenue_for_shirts_q11913,71371 + fn sum_all_revenue_equals_grand_total() {sum_all_revenue_equals_grand_total1930,72017 + fn default_view_first_two_on_axes_rest_on_page() {default_view_first_two_on_axes_rest_on_page1939,72428 + fn rearranging_axes_does_not_affect_data() {rearranging_axes_does_not_affect_data1950,72834 + fn two_views_have_independent_axis_assignments() {two_views_have_independent_axis_assignments1967,73385 + fn page_selections_are_per_view() {page_selections_are_per_view1987,74112 + fn five_categories_well_within_limit() {five_categories_well_within_limit2004,74606 +mod prop_tests {prop_tests2019,75118 + fn finite_f64() -> impl Strategy {finite_f642025,75277 + +src/model/cell.rs,4317 +pub struct CellKey(pub Vec<(String, String)>);CellKey9,311 +impl CellKey {CellKey11,359 + pub fn new(mut coords: Vec<(String, String)>) -> Self {new12,374 + pub fn get(&self, category: &str) -> Option<&str> {get17,508 + pub fn with(mut self, category: impl Into, item: impl Into) -> Self {with24,686 + pub fn without(&self, category: &str) -> Self {without36,1081 + pub fn matches_partial(&self, partial: &[(String, String)]) -> bool {matches_partial47,1333 +impl std::fmt::Display for CellKey {CellKey54,1521 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {fmt55,1558 +pub enum CellValue {CellValue62,1831 + Number(f64),Number63,1852 + Text(String),Text64,1869 + Error(String),Error66,1955 +impl CellValue {CellValue69,1977 + pub fn as_f64(&self) -> Option {as_f6470,1994 + pub fn is_error(&self) -> bool {is_error77,2143 +impl std::fmt::Display for CellValue {CellValue82,2233 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {fmt83,2272 +pub struct InternedKey(pub Vec<(Symbol, Symbol)>);InternedKey101,2919 +pub struct DataStore {DataStore106,3152 + cells: HashMap,cells108,3240 + pub symbols: SymbolTable,symbols110,3355 + index: HashMap<(Symbol, Symbol), HashSet>,index112,3462 +impl Serialize for DataStore {DataStore115,3525 + fn serialize(&self, s: S) -> Result {serialize116,3556 +impl<'de> Deserialize<'de> for DataStore {DataStore127,3912 + fn deserialize>(d: D) -> Result {deserialize128,3955 +impl DataStore {DataStore138,4260 + pub fn new() -> Self {new139,4277 + pub fn intern_key(&mut self, key: &CellKey) -> InternedKey {intern_key144,4381 + pub fn to_cell_key(&self, ikey: &InternedKey) -> CellKey {to_cell_key149,4573 + pub fn set(&mut self, key: CellKey, value: CellValue) {set163,4960 + pub fn get(&self, key: &CellKey) -> Option<&CellValue> {get172,5269 + fn lookup_key(&self, key: &CellKey) -> Option {lookup_key178,5485 + pub fn iter_cells(&self) -> impl Iterator {iter_cells188,5850 + pub fn remove(&mut self, key: &CellKey) {remove192,6000 + pub fn matching_values(&self, partial: &[(String, String)]) -> Vec<&CellValue> {matching_values207,6496 + pub fn matching_cells(&self, partial: &[(String, String)]) -> Vec<(CellKey, &CellValue)> {matching_cells246,7752 +mod cell_key {cell_key285,8872 + fn key(pairs: &[(&str, &str)]) -> CellKey {key288,8912 + fn coords_are_sorted_by_category_name() {coords_are_sorted_by_category_name298,9143 + fn get_returns_item_for_known_category() {get_returns_item_for_known_category310,9468 + fn get_returns_none_for_unknown_category() {get_returns_none_for_unknown_category317,9706 + fn with_adds_new_coordinate_in_sorted_order() {with_adds_new_coordinate_in_sorted_order323,9862 + fn with_replaces_existing_coordinate() {with_replaces_existing_coordinate332,10191 + fn without_removes_coordinate() {without_removes_coordinate339,10430 + fn without_missing_category_is_noop() {without_missing_category_is_noop347,10703 + fn matches_partial_full_match() {matches_partial_full_match353,10863 + fn matches_partial_empty_matches_all() {matches_partial_empty_matches_all360,11105 + fn matches_partial_wrong_item_no_match() {matches_partial_wrong_item_no_match366,11277 + fn matches_partial_missing_category_no_match() {matches_partial_missing_category_no_match373,11529 + fn display_format() {display_format380,11767 +mod data_store {data_store387,11911 + fn key(pairs: &[(&str, &str)]) -> CellKey {key390,11977 + fn get_missing_returns_empty() {get_missing_returns_empty400,12208 + fn set_and_get_roundtrip() {set_and_get_roundtrip406,12368 + fn overwrite_value() {overwrite_value414,12651 + fn remove_evicts_key() {remove_evicts_key423,12959 + fn matching_cells_returns_correct_subset() {matching_cells_returns_correct_subset432,13227 +mod prop_tests {prop_tests456,14067 + fn pairs_map() -> impl Strategy> {pairs_map461,14248 + fn finite_f64() -> impl Strategy {finite_f64467,14496 + +src/model/mod.rs,109 +pub mod category;category1,0 +pub mod cell;cell2,18 +pub mod symbol;symbol3,32 +pub mod types;types4,48 + +src/model/category.rs,2432 +pub type CategoryId = usize;CategoryId4,62 +pub type ItemId = usize;ItemId5,91 +pub struct Item {Item8,165 + pub id: ItemId,id9,183 + pub name: String,name10,203 + pub group: Option,group12,259 +impl Item {Item15,293 + pub fn new(id: ItemId, name: impl Into) -> Self {new16,305 + pub fn with_group(mut self, group: impl Into) -> Self {with_group24,471 +pub struct Group {Group31,650 + pub name: String,name32,669 + pub parent: Option,parent34,740 +impl Group {Group37,775 + pub fn new(name: impl Into) -> Self {new38,788 + pub fn with_parent(mut self, parent: impl Into) -> Self {with_parent45,927 +pub enum CategoryKind {CategoryKind55,1302 + Regular,Regular57,1341 + VirtualIndex,VirtualIndex59,1424 + VirtualDim,VirtualDim61,1507 + VirtualMeasure,VirtualMeasure67,1882 + Label,Label72,2156 +impl CategoryKind {CategoryKind75,2170 + pub fn is_regular(&self) -> bool {is_regular78,2312 +pub struct Category {Category84,2454 + pub id: CategoryId,id85,2476 + pub name: String,name86,2500 + pub items: IndexMap,items88,2555 + pub groups: Vec,groups90,2633 + next_item_id: ItemId,next_item_id92,2690 + pub kind: CategoryKind,kind95,2792 +impl Category {Category98,2823 + pub fn new(id: CategoryId, name: impl Into) -> Self {new99,2839 + pub fn with_kind(mut self, kind: CategoryKind) -> Self {with_kind110,3122 + pub fn add_item(&mut self, name: impl Into) -> ItemId {add_item115,3229 + pub fn remove_item(&mut self, name: &str) {remove_item126,3567 + pub fn add_item_in_group(add_item_in_group130,3661 + pub fn add_group(&mut self, group: Group) {add_group147,4130 + pub fn ordered_item_names(&self) -> Vec<&str> {ordered_item_names154,4355 +mod tests {tests160,4485 + fn cat() -> Category {cat163,4532 + fn add_item_returns_sequential_ids() {add_item_returns_sequential_ids168,4613 + fn add_item_duplicate_returns_same_id() {add_item_duplicate_returns_same_id177,4834 + fn add_item_in_group_sets_group() {add_item_in_group_sets_group186,5070 + fn add_item_in_group_duplicate_returns_same_id() {add_item_in_group_duplicate_returns_same_id196,5317 + fn add_group_deduplicates() {add_group_deduplicates205,5590 + fn item_index_reflects_insertion_order() {item_index_reflects_insertion_order213,5787 + +src/view/types.rs,3826 +fn default_prune() -> bool {default_prune7,128 +pub struct View {View12,217 + pub name: String,name13,235 + pub category_axes: IndexMap,category_axes15,299 + pub page_selections: HashMap,page_selections17,396 + pub hidden_items: HashMap>,hidden_items19,480 + pub collapsed_groups: HashMap>,collapsed_groups21,574 + pub number_format: String,number_format23,705 + pub prune_empty: bool,prune_empty26,843 + pub row_offset: usize,row_offset28,901 + pub col_offset: usize,col_offset29,928 + pub selected: (usize, usize),selected31,996 +impl View {View34,1033 + pub fn new(name: impl Into) -> Self {new35,1045 + pub fn on_category_added(&mut self, cat_name: &str) {on_category_added50,1497 + pub fn on_category_removed(&mut self, cat_name: &str) {on_category_removed102,3711 + pub fn set_axis(&mut self, cat_name: &str, axis: Axis) {set_axis108,3920 + pub fn axis_of(&self, cat_name: &str) -> Axis {axis_of114,4085 + pub fn categories_on(&self, axis: Axis) -> Vec<&str> {categories_on121,4293 + pub fn set_page_selection(&mut self, cat_name: &str, item: &str) {set_page_selection129,4509 + pub fn page_selection(&self, cat_name: &str) -> Option<&str> {page_selection134,4677 + pub fn toggle_group_collapse(&mut self, cat_name: &str, group_name: &str) {toggle_group_collapse138,4814 + pub fn is_group_collapsed(&self, cat_name: &str, group_name: &str) -> bool {is_group_collapsed150,5171 + pub fn hide_item(&mut self, cat_name: &str, item_name: &str) {hide_item157,5391 + pub fn show_item(&mut self, cat_name: &str, item_name: &str) {show_item164,5602 + pub fn is_hidden(&self, cat_name: &str, item_name: &str) -> bool {is_hidden170,5786 + pub fn transpose_axes(&mut self) {transpose_axes179,6107 + pub fn cycle_axis(&mut self, cat_name: &str) {cycle_axis202,6795 +mod tests {tests217,7212 + fn view_with_cats(cats: &[&str]) -> View {view_with_cats221,7273 + fn first_category_assigned_to_row() {first_category_assigned_to_row230,7459 + fn second_category_assigned_to_column() {second_category_assigned_to_column236,7617 + fn third_and_later_categories_assigned_to_page() {third_and_later_categories_assigned_to_page242,7794 + fn set_axis_changes_assignment() {set_axis_changes_assignment249,8050 + fn categories_on_returns_correct_list() {categories_on_returns_correct_list256,8267 + fn transpose_axes_swaps_row_and_column() {transpose_axes_swaps_row_and_column264,8591 + fn transpose_axes_leaves_page_categories_unchanged() {transpose_axes_leaves_page_categories_unchanged275,9008 + fn transpose_axes_is_its_own_inverse() {transpose_axes_is_its_own_inverse283,9291 + fn axis_of_unknown_category_panics() {axis_of_unknown_category_panics293,9656 + fn page_selection_set_and_get() {page_selection_set_and_get299,9781 + fn toggle_group_collapse_toggles_twice() {toggle_group_collapse_toggles_twice307,10062 + fn is_group_collapsed_isolated_across_categories() {is_group_collapsed_isolated_across_categories317,10422 + fn is_group_collapsed_isolated_across_groups() {is_group_collapsed_isolated_across_groups324,10638 + fn hide_and_show_item() {hide_and_show_item331,10850 + fn cycle_axis_row_to_column() {cycle_axis_row_to_column341,11162 + fn cycle_axis_column_to_page() {cycle_axis_column_to_page348,11364 + fn cycle_axis_page_to_none() {cycle_axis_page_to_none356,11612 + fn cycle_axis_none_to_row() {cycle_axis_none_to_row363,11815 + fn cycle_axis_resets_scroll_and_selection() {cycle_axis_resets_scroll_and_selection371,12056 +mod prop_tests {prop_tests384,12404 + fn unique_cat_names() -> impl Strategy> {unique_cat_names389,12500 + +src/view/layout.rs,4726 +pub fn synthetic_record_info(key: &CellKey) -> Option<(usize, String)> {synthetic_record_info9,242 +pub enum AxisEntry {AxisEntry21,739 + GroupHeader {GroupHeader22,760 + DataItem(Vec),DataItem26,839 +pub struct GridLayout {GridLayout34,1187 + pub row_cats: Vec,row_cats35,1211 + pub col_cats: Vec,col_cats36,1242 + pub page_coords: Vec<(String, String)>,page_coords37,1273 + pub row_items: Vec,row_items38,1317 + pub col_items: Vec,col_items39,1352 + pub none_cats: Vec,none_cats41,1457 + pub records: Option>>,records44,1610 +impl GridLayout {GridLayout47,1669 + pub fn with_frozen_records(with_frozen_records50,1833 + pub fn new(model: &Model, view: &View) -> Self {new70,2504 + fn build_records_mode(build_records_mode128,4479 + pub fn records_display(&self, row: usize, col: usize) -> Option {records_display184,6393 + pub fn prune_empty(&mut self, model: &Model) {prune_empty209,7362 + pub fn is_records_mode(&self) -> bool {is_records_mode301,10722 + pub fn row_count(&self) -> usize {row_count306,10858 + pub fn col_count(&self) -> usize {col_count314,11086 + pub fn row_label(&self, row: usize) -> String {row_label321,11257 + pub fn col_label(&self, col: usize) -> String {col_label336,11641 + pub fn resolve_display(&self, key: &CellKey) -> Option {resolve_display353,12151 + pub fn display_text(display_text367,12753 + pub fn cell_key(&self, row: usize, col: usize) -> Option {cell_key388,13537 + pub fn data_row_to_visual(&self, data_row: usize) -> Option {data_row_to_visual435,15049 + pub fn data_col_to_visual(&self, data_col: usize) -> Option {data_col_to_visual449,15500 + pub fn row_group_for(&self, data_row: usize) -> Option<(String, String)> {row_group_for464,16012 + pub fn col_group_for(&self, data_col: usize) -> Option<(String, String)> {col_group_for481,16600 +fn expand_category(expand_category500,17249 +fn cross_product(model: &Model, view: &View, cats: &[String]) -> Vec {cross_product550,18870 +mod tests {tests568,19464 + fn records_model() -> Model {records_model574,19646 + fn prune_empty_removes_all_empty_columns_in_pivot_mode() {prune_empty_removes_all_empty_columns_in_pivot_mode599,20462 + fn records_mode_activated_when_index_and_dim_on_axes() {records_mode_activated_when_index_and_dim_on_axes620,21304 + fn records_mode_cell_key_returns_synthetic_for_all_columns() {records_mode_cell_key_returns_synthetic_for_all_columns631,21697 + fn records_mode_resolve_display_returns_values() {records_mode_resolve_display_returns_values654,22680 + fn synthetic_record_info_returns_none_for_pivot_keys() {synthetic_record_info_returns_none_for_pivot_keys681,23765 + fn synthetic_record_info_extracts_index_and_dim() {synthetic_record_info_extracts_index_and_dim690,24064 + fn coord(pairs: &[(&str, &str)]) -> CellKey {coord700,24411 + fn two_cat_model() -> Model {two_cat_model709,24632 + fn row_and_col_counts_match_item_counts() {row_and_col_counts_match_item_counts723,25036 + fn cell_key_encodes_correct_coordinates() {cell_key_encodes_correct_coordinates731,25311 + fn cell_key_out_of_bounds_returns_none() {cell_key_out_of_bounds_returns_none740,25628 + fn cell_key_includes_page_coords() {cell_key_includes_page_coords748,25888 + fn cell_key_round_trips_through_model_evaluate() {cell_key_round_trips_through_model_evaluate764,26575 + fn labels_join_with_slash_for_multi_cat_axis() {labels_join_with_slash_for_multi_cat_axis777,27035 + fn row_count_excludes_group_headers() {row_count_excludes_group_headers792,27640 + fn group_header_emitted_at_group_boundary() {group_header_emitted_at_group_boundary811,28321 + fn collapsed_group_has_header_but_no_data_items() {collapsed_group_has_header_but_no_data_items838,29289 + fn ungrouped_items_produce_no_headers() {ungrouped_items_produce_no_headers869,30497 + fn cell_key_correct_with_grouped_items() {cell_key_correct_with_grouped_items887,30990 + fn data_row_to_visual_skips_headers() {data_row_to_visual_skips_headers909,31782 + fn data_col_to_visual_skips_headers() {data_col_to_visual_skips_headers928,32594 + fn row_group_for_finds_enclosing_group() {row_group_for_finds_enclosing_group947,33370 + fn row_group_for_returns_none_for_ungrouped() {row_group_for_returns_none_for_ungrouped970,34123 + fn col_group_for_finds_enclosing_group() {col_group_for_finds_enclosing_group981,34540 + fn col_group_for_returns_none_for_ungrouped() {col_group_for_returns_none_for_ungrouped1004,35310 + +src/view/axis.rs,243 +pub enum Axis {Axis5,142 + Row,Row6,158 + Column,Column7,167 + Page,Page8,179 + None,None9,189 +impl std::fmt::Display for Axis {Axis12,202 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {fmt13,236 + +src/view/mod.rs,77 +pub mod axis;axis1,0 +pub mod layout;layout2,14 +pub mod types;types3,30 + +src/main.rs,2923 +fn main() -> Result<()> {main21,391 +struct Cli {Cli29,628 + file: Option,file31,678 + command: Option,command34,733 +trait Runnable {Runnable38,784 + fn run(self, model_file: Option) -> Result<()>;run39,801 +enum Commands {Commands44,914 + Import(ImportArgs),Import46,1001 + Cmd(CmdArgs),Cmd48,1074 + Script(ScriptArgs),Script50,1141 + Open(OpenTui),Open52,1221 +struct ImportArgs {ImportArgs56,1265 + files: Vec,files58,1354 + category: Vec,category62,1451 + measure: Vec,measure66,1547 + time: Vec,time70,1645 + skip: Vec,skip74,1740 + extract: Vec,extract78,1844 + axis: Vec,axis82,1945 + formula: Vec,formula86,2051 + name: Option,name90,2142 + no_wizard: bool,no_wizard94,2222 + output: Option,output98,2312 +struct CmdArgs {CmdArgs102,2366 + json: Vec,json104,2412 + file: Option,file108,2492 +struct ScriptArgs {ScriptArgs112,2544 + path: PathBuf,path114,2624 + file: Option,file118,2700 +struct OpenTui;OpenTui122,2752 +impl Runnable for OpenTui {OpenTui123,2768 + fn run(self, model_file: Option) -> Result<()> {run124,2796 +impl Runnable for ImportArgs {ImportArgs130,2961 + fn run(self, model_file: Option) -> Result<()> {run131,2992 +impl Runnable for CmdArgs {CmdArgs157,3871 + fn run(self, _model_file: Option) -> Result<()> {run158,3899 +impl Runnable for ScriptArgs {ScriptArgs163,4025 + fn run(self, _model_file: Option) -> Result<()> {run164,4056 +struct ImportConfig {ImportConfig171,4386 + categories: Vec,categories172,4408 + measures: Vec,measures173,4437 + time_fields: Vec,time_fields174,4464 + skip_fields: Vec,skip_fields175,4494 + extractions: Vec<(String, String)>,extractions176,4524 + axes: Vec<(String, String)>,axes177,4564 + formulas: Vec,formulas178,4597 + name: Option,name179,4624 +fn parse_colon_pairs(args: &[String]) -> Vec<(String, String)> {parse_colon_pairs182,4653 +fn apply_config_to_pipeline(pipeline: &mut import::wizard::ImportPipeline, config: &ImportConfigapply_config_to_pipeline191,4887 +fn apply_axis_overrides(model: &mut Model, axes: &[(String, String)]) {apply_axis_overrides234,6322 +fn run_headless_import(run_headless_import249,6775 +fn run_wizard_import(run_wizard_import270,7450 +fn get_import_data(paths: &[PathBuf]) -> Option {get_import_data284,8053 +fn run_headless_commands(cmds: &[String], file: &Option) -> Result<()> {run_headless_commands331,9708 +fn run_headless_script(script_path: &PathBuf, file: &Option) -> Result<()> {run_headless_script363,10632 +fn get_initial_model(file_path: &Option) -> Result {get_initial_model371,11110 + +src/command/cmd/core.rs,4594 +pub struct CmdContext<'a> {CmdContext13,328 + pub model: &'a Model,model14,356 + pub layout: &'a GridLayout,layout15,382 + pub registry: &'a CmdRegistry,registry16,414 + pub mode: &'a AppMode,mode17,449 + pub selected: (usize, usize),selected18,476 + pub row_offset: usize,row_offset19,510 + pub col_offset: usize,col_offset20,537 + pub search_query: &'a str,search_query21,564 + pub yanked: &'a Option,yanked22,595 + pub dirty: bool,dirty23,634 + pub search_mode: bool,search_mode24,655 + pub formula_panel_open: bool,formula_panel_open25,682 + pub category_panel_open: bool,category_panel_open26,716 + pub view_panel_open: bool,view_panel_open27,751 + pub formula_cursor: usize,formula_cursor29,804 + pub cat_panel_cursor: usize,cat_panel_cursor30,835 + pub view_panel_cursor: usize,view_panel_cursor31,868 + pub tile_cat_idx: usize,tile_cat_idx33,958 + pub buffers: &'a HashMap,buffers35,1014 + pub view_back_stack: &'a [String],view_back_stack37,1116 + pub view_forward_stack: &'a [String],view_forward_stack38,1155 + pub display_value: String,display_value40,1281 + pub visible_rows: usize,visible_rows42,1384 + pub visible_cols: usize,visible_cols43,1413 + pub expanded_cats: &'a std::collections::HashSet,expanded_cats45,1488 + pub key_code: KeyCode,key_code47,1594 +impl<'a> CmdContext<'a> {CmdContext50,1624 + pub fn cell_key(&self) -> Option {cell_key51,1650 + pub fn row_count(&self) -> usize {row_count54,1767 + pub fn col_count(&self) -> usize {col_count57,1844 + pub fn none_cats(&self) -> &[String] {none_cats60,1921 +impl<'a> CmdContext<'a> {CmdContext65,2004 + pub fn cat_tree_entry(&self) -> Option {cat_tree_entry67,2099 + pub fn cat_at_cursor(&self) -> Option {cat_at_cursor74,2430 + pub fn cat_tree_len(&self) -> usize {cat_tree_len79,2607 +pub trait Cmd: Debug + Send + Sync {Cmd85,2793 + fn execute(&self, ctx: &CmdContext) -> Vec>;execute86,2830 + fn name(&self) -> &'static str;name90,3046 +pub type ParseFn = fn(&[String]) -> Result, String>;ParseFn94,3158 +pub type InteractiveFn = fn(&[String], &CmdContext) -> Result, String>;InteractiveFn100,3497 +type BoxParseFn = Box Result, String>>;BoxParseFn102,3583 +type BoxInteractiveFn = Box Result, String>>;BoxInteractiveFn103,3657 +struct CmdEntry {CmdEntry106,3827 + name: &'static str,name107,3845 + parse: BoxParseFn,parse108,3869 + interactive: BoxInteractiveFn,interactive109,3892 +pub struct CmdRegistry {CmdRegistry114,4027 + entries: Vec,entries115,4052 + aliases: Vec<(&'static str, &'static str)>,aliases116,4080 +impl CmdRegistry {CmdRegistry119,4131 + pub fn new() -> Self {new120,4150 + pub fn alias(&mut self, short: &'static str, canonical: &'static str) {alias128,4348 + fn resolve<'a>(&'a self, name: &'a str) -> &'a str {resolve133,4534 + pub fn register(&mut self, prototype: &dyn Cmd, parse: ParseFn, interactive: InteractiveFn) register144,4897 + pub fn register_pure(&mut self, prototype: &dyn Cmd, parse: ParseFn) {register_pure155,5368 + pub fn register_nullary(&mut self, f: fn() -> Box) {register_nullary171,5949 + pub fn parse(&self, name: &str, args: &[String]) -> Result, String> {parse181,6290 + pub fn interactive(interactive194,6812 + pub fn names(&self) -> impl Iterator + '_ {names210,7220 +pub(super) struct NamedCmd(pub(super) &'static str);NamedCmd218,7484 +impl Cmd for NamedCmd {NamedCmd219,7537 + fn name(&self) -> &'static str {name220,7561 + fn execute(&self, _: &CmdContext) -> Vec> {execute223,7619 +pub(super) fn require_args(word: &str, args: &[String], n: usize) -> Result<(), String> {require_args228,7707 +pub(super) fn parse_cell_key_from_args(args: &[String]) -> crate::model::cell::CellKey {parse_cell_key_from_args240,8019 +pub(super) fn read_buffer(ctx: &CmdContext, name: &str) -> String {read_buffer252,8437 +pub(super) fn parse_panel(s: &str) -> Result {parse_panel260,8649 +pub(super) fn parse_axis(s: &str) -> Result {parse_axis269,8910 +mod tests {tests280,9232 + fn parse_axis_recognizes_all_variants() {parse_axis_recognizes_all_variants284,9275 + fn parse_axis_rejects_unknown() {parse_axis_rejects_unknown294,9609 + +src/command/cmd/commit.rs,2493 +mod tests {tests9,235 + fn commit_formula_with_categories_adds_formula() {commit_formula_with_categories_adds_formula17,389 + fn commit_formula_without_regular_categories_targets_measure() {commit_formula_without_regular_categories_targets_measure40,1257 + fn commit_category_add_with_name_produces_add_effect() {commit_category_add_with_name_produces_add_effect61,1996 + fn commit_category_add_with_empty_buffer_returns_to_panel() {commit_category_add_with_empty_buffer_returns_to_panel78,2582 + fn commit_item_add_with_name_produces_add_item() {commit_item_add_with_name_produces_add_item95,3181 + fn commit_item_add_outside_item_add_mode_returns_empty() {commit_item_add_outside_item_add_mode_returns_empty111,3813 + fn commit_export_produces_export_and_normal_mode() {commit_export_produces_export_and_normal_mode121,4136 +fn commit_cell_value(key: &CellKey, value: &str, effects: &mut Vec>) {commit_cell_value141,5058 +pub enum AdvanceDir {AdvanceDir165,5992 + Down,Down167,6084 + Right,Right169,6143 +pub struct CommitAndAdvance {CommitAndAdvance175,6324 + pub key: CellKey,key176,6354 + pub value: String,value177,6376 + pub advance: AdvanceDir,advance178,6399 + pub cursor: CursorState,cursor179,6428 +impl Cmd for CommitAndAdvance {CommitAndAdvance181,6459 + fn name(&self) -> &'static str {name182,6491 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute188,6686 +pub struct CommitFormula;CommitFormula218,7766 +impl Cmd for CommitFormula {CommitFormula219,7792 + fn name(&self) -> &'static str {name220,7821 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute223,7889 +fn commit_add_from_buffer(commit_add_from_buffer242,8782 +pub struct CommitCategoryAdd;CommitCategoryAdd265,9489 +impl Cmd for CommitCategoryAdd {CommitCategoryAdd266,9519 + fn name(&self) -> &'static str {name267,9552 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute270,9625 +pub struct CommitItemAdd;CommitItemAdd282,10002 +impl Cmd for CommitItemAdd {CommitItemAdd283,10028 + fn name(&self) -> &'static str {name284,10057 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute287,10126 +pub struct CommitExport;CommitExport309,10747 +impl Cmd for CommitExport {CommitExport310,10772 + fn name(&self) -> &'static str {name311,10800 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute314,10867 + +src/command/cmd/cell.rs,1886 +mod tests {tests6,90 + fn clear_selected_cell_produces_clear_and_dirty() {clear_selected_cell_produces_clear_and_dirty12,229 + fn yank_cell_produces_set_yanked() {yank_cell_produces_set_yanked30,845 + fn paste_with_yanked_value_produces_set_cell() {paste_with_yanked_value_produces_set_cell48,1438 + fn paste_without_yanked_value_produces_nothing() {paste_without_yanked_value_produces_nothing74,2338 + fn transpose_produces_transpose_and_dirty() {transpose_produces_transpose_and_dirty89,2817 + fn save_produces_save_effect() {save_produces_save_effect104,3291 +pub struct ClearCellCommand {ClearCellCommand122,4073 + pub key: crate::model::cell::CellKey,key123,4103 +impl Cmd for ClearCellCommand {ClearCellCommand125,4147 + fn name(&self) -> &'static str {name126,4179 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute129,4243 +pub struct YankCell {YankCell139,4483 + pub key: crate::model::cell::CellKey,key140,4505 +impl Cmd for YankCell {YankCell142,4549 + fn name(&self) -> &'static str {name143,4573 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute146,4631 +pub struct PasteCell {PasteCell157,4956 + pub key: crate::model::cell::CellKey,key158,4979 +impl Cmd for PasteCell {PasteCell160,5023 + fn name(&self) -> &'static str {name161,5048 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute164,5107 +pub struct TransposeAxes;TransposeAxes179,5639 +impl Cmd for TransposeAxes {TransposeAxes180,5665 + fn name(&self) -> &'static str {name181,5694 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute184,5757 +pub struct SaveCmd;SaveCmd190,5918 +impl Cmd for SaveCmd {SaveCmd191,5938 + fn name(&self) -> &'static str {name192,5961 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute195,6019 + +src/command/cmd/registry.rs,113 +pub fn default_registry() -> CmdRegistry {default_registry19,459 + macro_rules! reg_jump {reg_jump105,4345 + +src/command/cmd/effect_cmds.rs,518 +mod tests {tests8,162 + fn add_category_cmd_produces_add_category_effect() {add_category_cmd_produces_add_category_effect13,251 + fn set_cell_cmd_parses_coords_correctly() {set_cell_cmd_parses_coords_correctly29,780 + fn set_axis_cmd_recognizes_column_alias() {set_axis_cmd_recognizes_column_alias46,1347 + fn write_cmd_without_args_saves() {write_cmd_without_args_saves59,1838 + fn write_cmd_with_path_saves_as() {write_cmd_with_path_saves_as72,2276 +macro_rules! effect_cmd {effect_cmd89,3051 + +src/command/cmd/tile.rs,1057 +mod tests {tests7,113 + fn tile_axis_cycle_produces_cycle_effect() {tile_axis_cycle_produces_cycle_effect12,202 + fn tile_axis_set_produces_set_axis_effect() {tile_axis_set_produces_set_axis_effect25,668 + fn tile_axis_with_out_of_bounds_cursor_returns_empty() {tile_axis_with_out_of_bounds_cursor_returns_empty40,1177 + fn move_tile_cursor_right() {move_tile_cursor_right52,1569 + fn move_tile_cursor_clamps_at_start() {move_tile_cursor_clamps_at_start68,2049 +pub struct MoveTileCursor(pub i32);MoveTileCursor88,2790 +impl Cmd for MoveTileCursor {MoveTileCursor89,2826 + fn name(&self) -> &'static str {name90,2856 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute93,2926 +pub struct TileAxisOp {TileAxisOp107,3465 + pub axis: Option,axis108,3489 +fn axis_label(axis: Axis) -> &'static str {axis_label111,3520 +impl Cmd for TileAxisOp {TileAxisOp120,3709 + fn name(&self) -> &'static str {name121,3735 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute128,3904 + +src/command/cmd/grid.rs,2719 +mod tests {tests8,153 + fn toggle_group_under_cursor_returns_empty_without_groups() {toggle_group_under_cursor_returns_empty_without_groups13,242 + fn law_toggle_group_involution() {law_toggle_group_involution24,614 + fn view_forward_with_empty_stack_shows_status() {view_forward_with_empty_stack_shows_status36,1071 + fn view_back_with_empty_stack_shows_status() {view_back_with_empty_stack_shows_status51,1554 + fn view_forward_with_stack_produces_effect() {view_forward_with_stack_produces_effect66,2036 + fn view_back_with_stack_produces_apply_and_back() {view_back_with_stack_produces_apply_and_back83,2610 + fn toggle_prune_empty_produces_toggle_and_dirty() {toggle_prune_empty_produces_toggle_and_dirty102,3318 + fn drill_into_formula_cell_returns_data_records() {drill_into_formula_cell_returns_data_records120,4053 +pub struct ToggleGroupAtCursor {ToggleGroupAtCursor171,5975 + pub is_row: bool,is_row172,6008 +impl Cmd for ToggleGroupAtCursor {ToggleGroupAtCursor174,6032 + fn name(&self) -> &'static str {name175,6067 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute182,6246 +pub struct HideSelectedRowItem;HideSelectedRowItem203,6803 +impl Cmd for HideSelectedRowItem {HideSelectedRowItem204,6835 + fn name(&self) -> &'static str {name205,6870 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute208,6946 +pub struct ViewNavigate {ViewNavigate241,7823 + pub forward: bool,forward242,7849 +impl Cmd for ViewNavigate {ViewNavigate244,7874 + fn name(&self) -> &'static str {name245,7902 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute252,8049 +pub struct DrillIntoCell {DrillIntoCell276,8878 + pub key: crate::model::cell::CellKey,key277,8905 +impl Cmd for DrillIntoCell {DrillIntoCell279,8949 + fn name(&self) -> &'static str {name280,8978 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute283,9047 +pub struct TogglePruneEmpty;TogglePruneEmpty373,12481 +impl Cmd for TogglePruneEmpty {TogglePruneEmpty374,12510 + fn name(&self) -> &'static str {name375,12542 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute378,12614 +pub struct ToggleRecordsMode;ToggleRecordsMode395,13218 +impl Cmd for ToggleRecordsMode {ToggleRecordsMode396,13248 + fn name(&self) -> &'static str {name397,13281 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute400,13354 +pub struct AddRecordRow;AddRecordRow440,14897 +impl Cmd for AddRecordRow {AddRecordRow441,14922 + fn name(&self) -> &'static str {name442,14950 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute445,15018 + +src/command/cmd/text_buffer.rs,1949 +mod tests {tests9,164 + fn command_mode_backspace_pops_char() {command_mode_backspace_pops_char16,289 + fn command_mode_backspace_on_empty_returns_to_normal() {command_mode_backspace_on_empty_returns_to_normal31,895 + fn quit_when_dirty_shows_warning() {quit_when_dirty_shows_warning48,1477 + fn quit_when_clean_produces_quit_mode() {quit_when_clean_produces_quit_mode64,2046 + fn execute_command_empty_returns_to_normal() {execute_command_empty_returns_to_normal81,2600 + fn execute_command_invalid_shows_error_status() {execute_command_invalid_shows_error_status95,3127 + fn execute_command_valid_runs_command() {execute_command_valid_runs_command112,3719 +pub struct AppendChar {AppendChar131,4365 + pub buffer: String,buffer132,4389 +impl Cmd for AppendChar {AppendChar134,4415 + fn name(&self) -> &'static str {name135,4441 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute138,4506 +pub struct PopChar {PopChar158,5109 + pub buffer: String,buffer159,5130 +impl Cmd for PopChar {PopChar161,5156 + fn name(&self) -> &'static str {name162,5179 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute165,5241 +pub struct CommandModeBackspace;CommandModeBackspace181,5739 +impl Cmd for CommandModeBackspace {CommandModeBackspace182,5772 + fn name(&self) -> &'static str {name183,5808 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute186,5884 +pub struct HandleWizardKey;HandleWizardKey205,6609 +impl Cmd for HandleWizardKey {HandleWizardKey206,6637 + fn name(&self) -> &'static str {name207,6668 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute210,6739 +pub struct ExecuteCommand;ExecuteCommand224,7365 +impl Cmd for ExecuteCommand {ExecuteCommand225,7392 + fn name(&self) -> &'static str {name226,7422 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute229,7491 + +src/command/cmd/mod.rs,1098 +pub mod cell;cell1,0 +pub mod commit;commit2,14 +pub mod core;core3,30 +pub mod effect_cmds;effect_cmds4,44 +pub mod grid;grid5,65 +pub mod mode;mode6,79 +pub mod navigation;navigation7,93 +pub mod panel;panel8,113 +pub mod registry;registry9,128 +pub mod search;search10,146 +pub mod text_buffer;text_buffer11,162 +pub mod tile;tile12,183 +pub(super) mod test_helpers {test_helpers19,341 + pub type CmdRegistry = super::core::CmdRegistry;CmdRegistry32,651 + pub static EMPTY_BUFFERS: std::sync::LazyLock> =EMPTY_BUFFERS34,705 + pub static EMPTY_EXPANDED: std::sync::LazyLock> =EMPTY_EXPANDED36,830 + pub fn make_layout(model: &Model) -> GridLayout {make_layout39,985 + pub fn make_ctx<'a>(make_ctx43,1098 + pub fn two_cat_model() -> Model {two_cat_model86,2450 + pub fn three_cat_model_with_page() -> Model {three_cat_model_with_page97,2864 + pub fn effects_debug(effects: &[Box]) -> String {effects_debug114,3613 + pub fn make_registry() -> CmdRegistry {make_registry118,3719 + +src/command/cmd/navigation.rs,2755 +pub struct CursorState {CursorState12,526 + pub row: usize,row13,551 + pub col: usize,col14,571 + pub row_count: usize,row_count15,591 + pub col_count: usize,col_count16,617 + pub row_offset: usize,row_offset17,643 + pub col_offset: usize,col_offset18,670 + pub visible_rows: usize,visible_rows19,697 + pub visible_cols: usize,visible_cols20,726 +impl CursorState {CursorState23,758 + pub fn from_ctx(ctx: &CmdContext) -> Self {from_ctx24,777 +pub(super) fn viewport_effects(viewport_effects39,1239 +pub enum MoveKind {MoveKind75,2232 + Relative(i32, i32),Relative77,2328 + ToStart(bool),ToStart79,2412 + ToEnd(bool),ToEnd81,2489 + Page(i32),Page83,2582 +pub struct Move {Move88,2693 + pub kind: MoveKind,kind89,2711 + pub cursor: CursorState,cursor90,2735 + pub cmd_name: &'static str,cmd_name91,2764 +impl Cmd for Move {Move94,2799 + fn name(&self) -> &'static str {name95,2819 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute99,2885 +pub struct EnterAdvance {EnterAdvance141,4438 + pub cursor: CursorState,cursor142,4464 +impl Cmd for EnterAdvance {EnterAdvance144,4495 + fn name(&self) -> &'static str {name145,4523 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute148,4590 +pub struct PageNext;PageNext174,5522 +impl Cmd for PageNext {PageNext175,5543 + fn name(&self) -> &'static str {name176,5567 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute179,5630 +pub struct PagePrev;PagePrev211,6589 +impl Cmd for PagePrev {PagePrev212,6610 + fn name(&self) -> &'static str {name213,6634 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute216,6697 +mod tests {tests247,7623 + fn move_selection_down_produces_set_selected() {move_selection_down_produces_set_selected252,7712 + fn move_selection_clamps_to_bounds() {move_selection_clamps_to_bounds267,8185 + fn enter_advance_moves_down() {enter_advance_moves_down282,8652 + fn law_move_to_start_idempotent() {law_move_to_start_idempotent300,9195 + fn law_sequence_associativity() {law_sequence_associativity324,9998 + fn law_move_to_end_reaches_last_col() {law_move_to_end_reaches_last_col372,11290 + fn page_next_with_no_page_cats_returns_empty() {page_next_with_no_page_cats_returns_empty392,11983 + fn page_prev_with_no_page_cats_returns_empty() {page_prev_with_no_page_cats_returns_empty402,12291 + fn page_next_cycles_through_page_items() {page_next_cycles_through_page_items412,12599 + fn page_prev_cycles_backward() {page_prev_cycles_backward427,13083 +pub(super) fn page_cat_data(ctx: &CmdContext) -> Vec<(String, Vec, usize)> {page_cat_data443,13615 + +src/command/cmd/panel.rs,5404 +mod tests {tests7,126 + fn toggle_panel_open_and_focus() {toggle_panel_open_and_focus13,242 + fn toggle_panel_close_and_unfocus() {toggle_panel_close_and_unfocus33,847 + fn cycle_panel_focus_with_no_panels_open() {cycle_panel_focus_with_no_panels_open48,1287 + fn cycle_panel_focus_with_formula_panel_open() {cycle_panel_focus_with_formula_panel_open63,1730 + fn cycle_panel_focus_with_multiple_panels() {cycle_panel_focus_with_multiple_panels84,2385 + fn move_panel_cursor_down_from_zero() {move_panel_cursor_down_from_zero106,3104 + fn move_panel_cursor_clamps_at_zero() {move_panel_cursor_clamps_at_zero127,3720 + fn move_panel_cursor_with_zero_max_produces_nothing() {move_panel_cursor_with_zero_max_produces_nothing143,4171 + fn delete_formula_at_cursor_with_formulas() {delete_formula_at_cursor_with_formulas159,4637 + fn switch_view_at_cursor_with_valid_cursor() {switch_view_at_cursor_with_valid_cursor180,5381 + fn switch_view_at_cursor_out_of_bounds_returns_empty() {switch_view_at_cursor_out_of_bounds_returns_empty195,5894 + fn create_and_switch_view_names_incrementally() {create_and_switch_view_names_incrementally206,6261 + fn delete_view_at_cursor_zero_does_not_adjust_cursor() {delete_view_at_cursor_zero_does_not_adjust_cursor228,6931 +pub struct TogglePanelAndFocus {TogglePanelAndFocus250,7789 + pub panel: Panel,panel251,7822 + pub open: bool,open252,7844 + pub focused: bool,focused253,7864 +impl Cmd for TogglePanelAndFocus {TogglePanelAndFocus255,7889 + fn name(&self) -> &'static str {name256,7924 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute259,8000 +pub struct TogglePanelVisibility {TogglePanelVisibility276,8533 + pub panel: Panel,panel277,8568 + pub currently_open: bool,currently_open278,8590 +impl Cmd for TogglePanelVisibility {TogglePanelVisibility280,8622 + fn name(&self) -> &'static str {name281,8659 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute284,8736 +pub struct CyclePanelFocus {CyclePanelFocus294,9024 + pub formula_open: bool,formula_open295,9053 + pub category_open: bool,category_open296,9081 + pub view_open: bool,view_open297,9110 +impl Cmd for CyclePanelFocus {CyclePanelFocus299,9137 + fn name(&self) -> &'static str {name300,9168 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute303,9239 +pub struct MovePanelCursor {MovePanelCursor320,9908 + pub panel: Panel,panel321,9937 + pub delta: i32,delta322,9959 + pub current: usize,current323,9979 + pub max: usize,max324,10003 +impl Cmd for MovePanelCursor {MovePanelCursor326,10025 + fn name(&self) -> &'static str {name327,10056 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute330,10127 +pub struct EnterFormulaEdit;EnterFormulaEdit353,10923 +impl Cmd for EnterFormulaEdit {EnterFormulaEdit354,10952 + fn name(&self) -> &'static str {name355,10984 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute358,11056 +pub struct DeleteFormulaAtCursor;DeleteFormulaAtCursor365,11263 +impl Cmd for DeleteFormulaAtCursor {DeleteFormulaAtCursor366,11297 + fn name(&self) -> &'static str {name367,11334 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute370,11412 +pub struct CycleAxisAtCursor;CycleAxisAtCursor399,12513 +impl Cmd for CycleAxisAtCursor {CycleAxisAtCursor400,12543 + fn name(&self) -> &'static str {name401,12576 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute404,12650 +pub struct OpenItemAddAtCursor;OpenItemAddAtCursor417,13071 +impl Cmd for OpenItemAddAtCursor {OpenItemAddAtCursor418,13103 + fn name(&self) -> &'static str {name419,13138 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute422,13215 +pub struct ToggleCatExpand;ToggleCatExpand435,13644 +impl Cmd for ToggleCatExpand {ToggleCatExpand436,13672 + fn name(&self) -> &'static str {name437,13703 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute440,13774 +pub struct FilterToItem;FilterToItem452,14133 +impl Cmd for FilterToItem {FilterToItem453,14158 + fn name(&self) -> &'static str {name454,14186 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute457,14254 +pub struct DeleteCategoryAtCursor;DeleteCategoryAtCursor489,15408 +impl Cmd for DeleteCategoryAtCursor {DeleteCategoryAtCursor490,15443 + fn name(&self) -> &'static str {name491,15481 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute494,15560 +pub struct SwitchViewAtCursor;SwitchViewAtCursor526,16858 +impl Cmd for SwitchViewAtCursor {SwitchViewAtCursor527,16889 + fn name(&self) -> &'static str {name528,16923 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute531,16998 +pub struct CreateAndSwitchView;CreateAndSwitchView546,17495 +impl Cmd for CreateAndSwitchView {CreateAndSwitchView547,17527 + fn name(&self) -> &'static str {name548,17562 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute551,17638 +pub struct DeleteViewAtCursor;DeleteViewAtCursor564,18049 +impl Cmd for DeleteViewAtCursor {DeleteViewAtCursor565,18080 + fn name(&self) -> &'static str {name566,18114 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute569,18189 + +src/command/cmd/search.rs,1198 +mod tests {tests8,161 + fn search_navigate_with_empty_query_returns_nothing() {search_navigate_with_empty_query_returns_nothing14,300 + fn search_or_category_add_without_query_opens_category_add() {search_or_category_add_without_query_opens_category_add25,650 + fn exit_search_mode_clears_flag() {exit_search_mode_clears_flag41,1170 + fn search_navigate_forward_with_matching_value() {search_navigate_forward_with_matching_value56,1644 +pub struct SearchNavigate(pub bool);SearchNavigate90,2699 +impl Cmd for SearchNavigate {SearchNavigate91,2736 + fn name(&self) -> &'static str {name92,2766 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute95,2835 +pub struct SearchOrCategoryAdd;SearchOrCategoryAdd172,5461 +impl Cmd for SearchOrCategoryAdd {SearchOrCategoryAdd173,5493 + fn name(&self) -> &'static str {name174,5528 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute177,5604 +pub struct ExitSearchMode;ExitSearchMode194,6098 +impl Cmd for ExitSearchMode {ExitSearchMode195,6125 + fn name(&self) -> &'static str {name196,6155 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute199,6225 + +src/command/cmd/mode.rs,3176 +mod tests {tests8,151 + fn enter_edit_mode_produces_editing_mode() {enter_edit_mode_produces_editing_mode14,269 + fn enter_tile_select_with_categories() {enter_tile_select_with_categories29,782 + fn enter_tile_select_no_categories() {enter_tile_select_no_categories45,1279 + fn enter_export_prompt_sets_mode() {enter_export_prompt_sets_mode56,1612 + fn force_quit_always_produces_quit_mode() {force_quit_always_produces_quit_mode70,2046 + fn save_and_quit_produces_save_then_quit() {save_and_quit_produces_save_then_quit83,2497 + fn edit_or_drill_without_aggregation_enters_edit() {edit_or_drill_without_aggregation_enters_edit96,2984 + fn enter_search_mode_sets_flag_and_clears_query() {enter_search_mode_sets_flag_and_clears_query107,3384 +pub struct EnterMode(pub AppMode);EnterMode129,4191 +impl Cmd for EnterMode {EnterMode130,4226 + fn name(&self) -> &'static str {name131,4251 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute134,4315 +pub struct ForceQuit;ForceQuit149,4833 +impl Cmd for ForceQuit {ForceQuit150,4855 + fn name(&self) -> &'static str {name151,4880 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute154,4944 +pub struct Quit;Quit161,5150 +impl Cmd for Quit {Quit162,5167 + fn name(&self) -> &'static str {name163,5187 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute166,5242 +pub struct SaveAndQuit;SaveAndQuit179,5588 +impl Cmd for SaveAndQuit {SaveAndQuit180,5612 + fn name(&self) -> &'static str {name181,5639 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute184,5695 +pub struct EnterEditMode {EnterEditMode193,6105 + pub initial_value: String,initial_value194,6132 +impl Cmd for EnterEditMode {EnterEditMode196,6165 + fn name(&self) -> &'static str {name197,6194 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute200,6263 +pub struct EditOrDrill;EditOrDrill215,6805 +impl Cmd for EditOrDrill {EditOrDrill216,6829 + fn name(&self) -> &'static str {name217,6856 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute220,6923 +pub struct EnterEditAtCursorCmd;EnterEditAtCursorCmd253,8202 +impl Cmd for EnterEditAtCursorCmd {EnterEditAtCursorCmd254,8235 + fn name(&self) -> &'static str {name255,8271 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute258,8345 +pub struct EnterExportPrompt;EnterExportPrompt265,8518 +impl Cmd for EnterExportPrompt {EnterExportPrompt266,8548 + fn name(&self) -> &'static str {name267,8581 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute270,8654 +pub struct EnterSearchMode;EnterSearchMode277,8830 +impl Cmd for EnterSearchMode {EnterSearchMode278,8858 + fn name(&self) -> &'static str {name279,8889 + fn execute(&self, _ctx: &CmdContext) -> Vec> {execute282,8949 +pub struct EnterTileSelect;EnterTileSelect292,9206 +impl Cmd for EnterTileSelect {EnterTileSelect293,9234 + fn name(&self) -> &'static str {name294,9265 + fn execute(&self, ctx: &CmdContext) -> Vec> {execute297,9336 + +src/command/keymap.rs,5000 +fn format_key_label(code: &KeyCode) -> String {format_key_label13,301 +pub enum KeyPattern {KeyPattern38,1303 + Key(KeyCode, KeyModifiers),Key40,1359 + AnyChar,AnyChar42,1444 + Any,Any44,1516 +pub enum ModeKey {ModeKey49,1621 + Normal,Normal50,1640 + Help,Help51,1652 + FormulaPanel,FormulaPanel52,1662 + CategoryPanel,CategoryPanel53,1680 + ViewPanel,ViewPanel54,1699 + TileSelect,TileSelect55,1714 + Editing,Editing56,1730 + FormulaEdit,FormulaEdit57,1743 + CategoryAdd,CategoryAdd58,1760 + ItemAdd,ItemAdd59,1777 + ExportPrompt,ExportPrompt60,1790 + CommandMode,CommandMode61,1808 + SearchMode,SearchMode62,1825 + ImportWizard,ImportWizard63,1841 +impl ModeKey {ModeKey66,1862 + pub fn from_app_mode(mode: &AppMode, search_mode: bool) -> Option {from_app_mode67,1877 +pub enum Binding {Binding90,2989 + Cmd {Cmd92,3088 + Prefix(Arc),Prefix97,3203 + Sequence(Vec<(&'static str, Vec)>),Sequence99,3307 +pub struct Keymap {Keymap106,3589 + bindings: HashMap,bindings107,3609 + parent: Option>,parent108,3653 +impl fmt::Debug for Keymap {Keymap111,3689 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {fmt112,3718 +impl Keymap {Keymap119,3903 + pub fn new() -> Self {new120,3917 + pub fn with_parent(parent: Arc) -> Self {with_parent129,4182 + pub fn bind(&mut self, key: KeyCode, mods: KeyModifiers, name: &'static str) {bind137,4388 + pub fn bind_args(bind_args145,4661 + pub fn bind_prefix(&mut self, key: KeyCode, mods: KeyModifiers, sub: Arc) {bind_prefix157,4977 + pub fn bind_seq(bind_seq163,5231 + pub fn bind_any_char(&mut self, name: &'static str, args: Vec) {bind_any_char174,5525 + pub fn bind_any(&mut self, name: &'static str) {bind_any180,5747 + pub fn binding_hints(&self) -> Vec<(String, &'static str)> {binding_hints187,6068 + let mut hints: Vec<(String, &'static str)> = selfstr188,6133 + fn lookup_local(&self, key: KeyCode, mods: KeyModifiers) -> Option<&Binding> {lookup_local215,7143 + pub fn lookup(&self, key: KeyCode, mods: KeyModifiers) -> Option<&Binding> {lookup237,8016 + pub fn dispatch(dispatch243,8304 +pub struct SetTransientKeymap(pub Arc);SetTransientKeymap271,9254 +impl Effect for SetTransientKeymap {SetTransientKeymap273,9303 + fn apply(&self, app: &mut crate::ui::app::App) {apply274,9340 +pub struct KeymapSet {KeymapSet280,9521 + mode_maps: HashMap>,mode_maps281,9544 + registry: CmdRegistry,registry282,9590 +impl KeymapSet {KeymapSet285,9620 + pub fn new(registry: CmdRegistry) -> Self {new286,9637 + pub fn registry(&self) -> &CmdRegistry {registry293,9778 + pub fn insert(&mut self, mode: ModeKey, keymap: Arc) {insert297,9853 + pub fn dispatch(dispatch302,10040 + pub fn dispatch_transient(dispatch_transient314,10458 + pub fn default_keymaps() -> Self {default_keymaps325,10764 +mod tests {tests908,32478 + fn lookup_exact_match() {lookup_exact_match914,32669 + fn lookup_exact_with_ctrl() {lookup_exact_with_ctrl922,32959 + fn lookup_char_falls_back_to_none_mods() {lookup_char_falls_back_to_none_mods930,33257 + fn lookup_non_char_does_not_fall_back_to_none_mods() {lookup_non_char_does_not_fall_back_to_none_mods940,33715 + fn lookup_char_falls_to_any_char() {lookup_char_falls_to_any_char950,34128 + fn lookup_non_char_skips_any_char() {lookup_non_char_skips_any_char964,34496 + fn lookup_any_matches_everything() {lookup_any_matches_everything973,34804 + fn lookup_exact_takes_priority_over_any_char() {lookup_exact_takes_priority_over_any_char987,35149 + fn lookup_any_char_takes_priority_over_any() {lookup_any_char_takes_priority_over_any1002,35591 + fn lookup_non_char_falls_to_any_not_any_char() {lookup_non_char_falls_to_any_not_any_char1017,36003 + fn lookup_ctrl_char_with_only_none_binding_falls_through() {lookup_ctrl_char_with_only_none_binding_falls_through1032,36412 + fn mode_key_normal_no_search() {mode_key_normal_no_search1043,36918 + fn mode_key_normal_with_search_overrides() {mode_key_normal_with_search_overrides1049,37087 + fn mode_key_help() {mode_key_help1055,37271 + fn mode_key_quit_returns_none() {mode_key_quit_returns_none1061,37424 + fn lookup_returns_prefix_binding() {lookup_returns_prefix_binding1069,37751 + fn lookup_returns_sequence_binding() {lookup_returns_sequence_binding1078,38082 + fn default_keymaps_has_all_modes() {default_keymaps_has_all_modes1092,38633 + fn normal_mode_has_basic_movement() {normal_mode_has_basic_movement1120,39445 + fn editing_mode_has_any_char_and_esc() {editing_mode_has_any_char_and_esc1144,40229 + fn search_mode_has_any_char_and_esc() {search_mode_has_any_char_and_esc1158,40705 + fn import_wizard_has_any_catchall() {import_wizard_has_any_catchall1170,41099 + +src/command/mod.rs,80 +pub mod cmd;cmd8,323 +pub mod keymap;keymap9,336 +pub mod parse;parse10,352 + +src/command/parse.rs,1793 +pub fn parse_line(line: &str) -> Result>, String> {parse_line11,345 +pub fn parse_line_with(registry: &CmdRegistry, line: &str) -> Result>, String> parse_line_with17,548 +fn split_on_dot(line: &str) -> Vec<&str> {split_on_dot42,1353 +fn tokenize(input: &str) -> Vec {tokenize67,2137 +mod tests {tests102,3018 + fn parse_add_category() {parse_add_category106,3061 + fn parse_add_item() {parse_add_item113,3260 + fn parse_set_cell_number() {parse_set_cell_number120,3452 + fn parse_set_cell_text() {parse_set_cell_text127,3671 + fn parse_multiple_commands_dot_separated() {parse_multiple_commands_dot_separated134,3874 + fn parse_quoted_string() {parse_quoted_string142,4163 + fn parse_set_axis() {parse_set_axis149,4391 + fn parse_set_axis_none() {parse_set_axis_none155,4546 + fn parse_clear_cell() {parse_clear_cell161,4706 + fn parse_comments_and_blank_lines() {parse_comments_and_blank_lines168,4920 + fn parse_unknown_command_errors() {parse_unknown_command_errors175,5159 + fn parse_missing_args_errors() {parse_missing_args_errors180,5274 + fn alias_add_cat_resolves_to_add_category() {alias_add_cat_resolves_to_add_category188,5615 + fn alias_formula_resolves_to_add_formula() {alias_formula_resolves_to_add_formula195,5829 + fn alias_add_view_resolves_to_create_view() {alias_add_view_resolves_to_create_view202,6061 + fn alias_q_bang_resolves_to_force_quit() {alias_q_bang_resolves_to_force_quit209,6275 + fn alias_does_not_interfere_with_canonical_q() {alias_does_not_interfere_with_canonical_q216,6472 + fn parse_add_items_multiple() {parse_add_items_multiple225,6840 + fn add_items_requires_at_least_two_args() {add_items_requires_at_least_two_args232,7056 + +src/import/analyzer.rs,2068 +pub enum FieldKind {FieldKind6,125 + Category,Category8,216 + Measure,Measure10,265 + TimeCategory,TimeCategory12,322 + Label,Label14,402 +pub enum DateComponent {DateComponent19,522 + Year,Year20,547 + Month,Month21,557 + Quarter,Quarter22,568 +pub struct FieldProposal {FieldProposal26,608 + pub field: String,field27,635 + pub kind: FieldKind,kind28,658 + pub distinct_values: Vec,distinct_values29,683 + pub accepted: bool,accepted30,721 + pub date_format: Option,date_format32,830 + pub date_components: Vec,date_components34,927 +impl FieldProposal {FieldProposal37,975 + pub fn kind_label(&self) -> &'static str {kind_label38,996 +const DATE_FORMATS: &[&str] = &[DATE_FORMATS49,1382 +pub fn detect_date_format(samples: &[&str]) -> Option {detect_date_format62,1806 +pub fn extract_date_component(extract_date_component81,2405 +const CATEGORY_THRESHOLD: usize = 20;CATEGORY_THRESHOLD97,2900 +pub fn analyze_records(records: &[Value]) -> Vec {analyze_records99,2939 +pub fn extract_array_at_path<'a>(value: &'a Value, path: &str) -> Option<&'a Vec> {extract_array_at_path190,5979 +pub fn find_array_paths(value: &Value) -> Vec {find_array_paths202,6310 +fn find_array_paths_inner(value: &Value, prefix: &str, paths: &mut Vec) {find_array_paths_inner208,6462 +mod tests {tests228,7006 + fn detect_iso_date_format() {detect_iso_date_format232,7049 + fn detect_us_date_format() {detect_us_date_format238,7252 + fn detect_short_year_format() {detect_short_year_format244,7454 + fn detect_no_date_format() {detect_no_date_format252,7779 + fn extract_year_component() {extract_year_component258,7933 + fn extract_month_component() {extract_month_component264,8132 + fn extract_quarter_component() {extract_quarter_component270,8336 + fn extract_quarter_q4() {extract_quarter_q4276,8544 + fn analyze_detects_time_category_with_format() {analyze_detects_time_category_with_format282,8745 + +src/import/csv_parser.rs,1361 +pub fn csv_path_p(path: &Path) -> bool {csv_path_p7,101 +pub fn parse_csv(path: &Path) -> Result> {parse_csv13,293 +pub fn merge_csvs(paths: &[impl AsRef]) -> Result> {merge_csvs61,1792 +fn parse_csv_field(field: &str) -> Value {parse_csv_field81,2406 +mod tests {tests102,2935 + fn create_temp_csv(content: &str) -> (PathBuf, tempfile::TempDir) {create_temp_csv107,3027 + fn parse_simple_csv() {parse_simple_csv115,3268 + fn parse_csv_with_floats() {parse_csv_with_floats130,3801 + fn parse_csv_with_quoted_fields() {parse_csv_with_quoted_fields144,4250 + fn parse_csv_with_empty_values() {parse_csv_with_empty_values158,4721 + fn parse_csv_mixed_types() {parse_csv_mixed_types168,5075 + fn merge_csvs_adds_file_field_from_stem() {merge_csvs_adds_file_field_from_stem184,5660 + fn merge_csvs_single_file_works() {merge_csvs_single_file_works206,6668 + fn rfc4180_embedded_comma_in_quoted_field() {rfc4180_embedded_comma_in_quoted_field220,7270 + fn rfc4180_escaped_quotes_in_field() {rfc4180_escaped_quotes_in_field233,7756 + fn rfc4180_newline_in_quoted_field() {rfc4180_newline_in_quoted_field246,8246 + fn rfc4180_embedded_comma_and_quotes_combined() {rfc4180_embedded_comma_and_quotes_combined258,8669 + fn parse_checking_csv_format() {parse_checking_csv_format274,9197 + +src/import/mod.rs,95 +pub mod analyzer;analyzer1,0 +pub mod csv_parser;csv_parser2,18 +pub mod wizard;wizard3,38 + +src/import/wizard.rs,6781 +pub struct ImportPipeline {ImportPipeline17,658 + pub raw: Value,raw18,686 + pub array_paths: Vec,array_paths19,706 + pub selected_path: String,selected_path20,740 + pub records: Vec,records21,771 + pub proposals: Vec,proposals22,800 + pub model_name: String,model_name23,839 + pub formulas: Vec,formulas25,950 +impl ImportPipeline {ImportPipeline28,984 + pub fn new(raw: Value) -> Self {new29,1006 + pub fn select_path(&mut self, path: &str) {select_path52,1713 + pub fn needs_path_selection(&self) -> bool {needs_path_selection60,1994 + pub fn preview_summary(&self) -> String {preview_summary64,2137 + pub fn build_model(&self) -> Result {build_model84,2916 +pub enum WizardStep {WizardStep245,9217 + Preview,Preview246,9239 + SelectArrayPath,SelectArrayPath247,9252 + ReviewProposals,ReviewProposals248,9273 + ConfigureDates,ConfigureDates249,9294 + DefineFormulas,DefineFormulas250,9314 + NameModel,NameModel251,9334 + Done,Done252,9349 +pub struct ImportWizard {ImportWizard259,9615 + pub pipeline: ImportPipeline,pipeline260,9641 + pub step: WizardStep,step261,9675 + pub cursor: usize,cursor263,9768 + pub message: Option,message265,9862 + pub formula_editing: bool,formula_editing267,9945 + pub formula_buffer: String,formula_buffer269,10020 +impl ImportWizard {ImportWizard272,10055 + pub fn new(raw: Value) -> Self {new273,10075 + pub fn advance(&mut self) {advance296,10803 + fn has_time_categories(&self) -> bool {has_time_categories322,11788 + pub fn time_category_proposals(&self) -> Vec<&FieldProposal> {time_category_proposals330,12072 + pub fn confirm_path(&mut self) {confirm_path338,12334 + pub fn move_cursor(&mut self, delta: i32) {move_cursor348,12789 + pub fn toggle_proposal(&mut self) {toggle_proposal368,13562 + pub fn cycle_proposal_kind(&mut self) {cycle_proposal_kind375,13800 + pub fn push_name_char(&mut self, c: char) {push_name_char389,14467 + pub fn pop_name_char(&mut self) {pop_name_char392,14563 + fn date_config_item_count(&self) -> usize {date_config_item_count400,14982 + pub fn date_config_at_cursor(&self) -> Option<(usize, DateComponent)> {date_config_at_cursor405,15160 + fn time_category_indices(&self) -> Vec {time_category_indices421,15754 + pub fn toggle_date_component(&mut self) {toggle_date_component434,16161 + pub fn push_formula_char(&mut self, c: char) {push_formula_char452,16928 + pub fn pop_formula_char(&mut self) {pop_formula_char460,17150 + pub fn confirm_formula(&mut self) {confirm_formula465,17307 + pub fn delete_formula(&mut self) {delete_formula476,17704 + pub fn start_formula_edit(&mut self) {start_formula_edit486,18037 + pub fn cancel_formula_edit(&mut self) {cancel_formula_edit492,18193 + pub fn sample_formulas(&self) -> Vec {sample_formulas498,18380 + pub fn build_model(&self) -> Result {build_model522,19259 +mod tests {tests528,19366 + fn flat_array_auto_selected() {flat_array_auto_selected534,19492 + fn numeric_field_proposed_as_measure() {numeric_field_proposed_as_measure546,19895 + fn low_cardinality_string_field_proposed_as_category() {low_cardinality_string_field_proposed_as_category554,20216 + fn nested_json_needs_path_selection_when_multiple_arrays() {nested_json_needs_path_selection_when_multiple_arrays566,20660 + fn single_nested_array_auto_selected() {single_nested_array_auto_selected576,20971 + fn select_path_populates_records_and_proposals() {select_path_populates_records_and_proposals589,21343 + fn build_model_fails_with_no_accepted_categories() {build_model_fails_with_no_accepted_categories601,21697 + fn build_model_creates_categories_and_measure_category() {build_model_creates_categories_and_measure_category611,22007 + fn label_fields_imported_as_label_category_coords() {label_fields_imported_as_label_category_coords623,22423 + fn label_category_defaults_to_none_axis() {label_category_defaults_to_none_axis650,23728 + fn build_model_cells_match_source_data() {build_model_cells_match_source_data663,24216 + fn model_name_defaults_to_imported_model() {model_name_defaults_to_imported_model690,25121 + fn build_model_adds_formulas_from_pipeline() {build_model_adds_formulas_from_pipeline697,25322 + fn build_model_extracts_date_month_component() {build_model_extracts_date_month_component716,26090 + fn sample_wizard() -> ImportWizard {sample_wizard745,27317 + fn wizard_starts_at_review_proposals_for_flat_array() {wizard_starts_at_review_proposals_for_flat_array754,27616 + fn wizard_starts_at_select_array_path_for_multi_path_object() {wizard_starts_at_select_array_path_for_multi_path_object760,27785 + fn wizard_advance_from_review_proposals_skips_dates_when_none() {wizard_advance_from_review_proposals_skips_dates_when_none770,28085 + fn wizard_advance_full_sequence() {wizard_advance_full_sequence779,28418 + fn wizard_move_cursor_clamps() {wizard_move_cursor_clamps794,28893 + fn wizard_toggle_proposal() {wizard_toggle_proposal809,29326 + fn wizard_cycle_proposal_kind() {wizard_cycle_proposal_kind819,29671 + fn wizard_model_name_editing() {wizard_model_name_editing832,30132 + fn wizard_confirm_path() {wizard_confirm_path843,30450 + fn wizard_formula_lifecycle() {wizard_formula_lifecycle859,31111 + fn wizard_delete_formula() {wizard_delete_formula897,32271 + fn wizard_delete_formula_at_zero() {wizard_delete_formula_at_zero909,32685 + fn wizard_confirm_empty_formula_is_noop() {wizard_confirm_empty_formula_is_noop919,32973 + fn sample_formulas_with_two_measures() {sample_formulas_with_two_measures929,33382 + fn sample_formulas_with_one_measure() {sample_formulas_with_one_measure939,33740 + fn sample_formulas_with_no_measures() {sample_formulas_with_no_measures951,34148 + fn preview_summary_for_array() {preview_summary_for_array963,34601 + fn preview_summary_for_object() {preview_summary_for_object974,34905 + fn wizard_date_config_toggle() {wizard_date_config_toggle988,35410 + fn wizard_date_config_at_cursor_mapping() {wizard_date_config_at_cursor_mapping1024,36707 + fn build_model_record_with_missing_category_value_skipped() {build_model_record_with_missing_category_value_skipped1048,37695 + fn build_model_with_integer_category_values() {build_model_with_integer_category_values1066,38390 + fn build_model_formulas_without_measure_category() {build_model_formulas_without_measure_category1084,39191 + fn build_model_date_components_appear_in_cell_keys() {build_model_date_components_appear_in_cell_keys1102,40030