diff --git a/cpp/types/core/drill_step.md b/cpp/types/core/drill_step.md new file mode 100644 index 00000000..1b54e157 --- /dev/null +++ b/cpp/types/core/drill_step.md @@ -0,0 +1,24 @@ +--- +name: DrillStep +lang: cpp +domain: core +version: "1.0.0" +algebraic: product +definition: | + struct DrillStep { + int target_stage; + int filter_pos; + int prev_active_stage; + Filter added; + }; +description: "Step de drill grabado para back/forward history (fase 10). apply_drill_step/undo_drill_step puras lo aplican/reversan." +tags: [tql, drill, history, undo, product-type] +uses_types: [Filter_cpp_core] +file_path: "cpp/functions/core/data_table_types.h" +--- + +## Notas + +UI mantiene `vector` back + forward stacks. Drill-down via click chart o tabla → push step a back, clear forward. Botones `<`/`>` en breadcrumb hacen pop+apply/undo. + +NO persistido en TQL — UI state efimero. Forward clear cuando hay nuevo drill (rama nueva). diff --git a/cpp/types/core/filter_preset.md b/cpp/types/core/filter_preset.md new file mode 100644 index 00000000..9267be88 --- /dev/null +++ b/cpp/types/core/filter_preset.md @@ -0,0 +1,23 @@ +--- +name: FilterPreset +lang: cpp +domain: core +version: "1.0.0" +algebraic: sum +definition: | + enum class FilterPreset { Last7d, Last30d, Last90d, ExcludeNulls, NonZero }; +description: "Preset rapido de filter para chip row UI (fase 10). Genera 1-2 Filters via build_preset_filters(preset, col, today_ymd)." +tags: [tql, filter, preset, sum-type] +uses_types: [] +file_path: "cpp/functions/core/data_table_types.h" +--- + +## Notas + +| Preset | Filters generados | +|---|---| +| Last7/30/90d | Gte sobre col Date con (today_ymd - N) | +| ExcludeNulls | Neq sobre col, value="" | +| NonZero | Neq "" + Neq "0" (2 filters) | + +UI auto-pickea col compatible (Date para Last*d, numeric para NonZero, any para ExcludeNulls).