detect_component_type
is an internal function that attempts to automatically determine the type of
'shiny' output component based on common naming patterns in the component ID.
This function uses simple heuristics to classify components as either
"leaflet" (for maps) or "datatable" (for tables), with "datatable" as the
default fallback.
detect_component_type(component_id, data_reactive)
Character string indicating the detected component type:
"leaflet" - for IDs containing "map" or "leaflet"
"datatable" - for IDs containing "table" or "dt", or as default
Character string. The ID of the output component to classify.
Reactive data object (currently unused in the function logic).
The function uses case-insensitive pattern matching on the component ID:
IDs containing "map" or "leaflet" are classified as "leaflet"
IDs containing "table" or "dt" are classified as "datatable"
All other IDs default to "datatable" with a warning message