Class: StimulusPlumbers::MCP::ComponentSchemaLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/stimulus_plumbers/mcp/loaders/component_schema_loader.rb

Constant Summary collapse

FIELD_AS_CONTROLLERS =

Not derivable from Form::Fields::Renderer's method names (search: renders via render_combobox_typeahead, but wires up "combobox-dropdown", not "combobox-typeahead") — hand-maintained; keep in sync with form.md's "backed by" notes.

{
  date:                      "combobox-date",
  time:                      "combobox-time",
  select:                    "combobox-dropdown",
  search:                    "combobox-dropdown",
  collection_select:         "combobox-dropdown",
  grouped_collection_select: "combobox-dropdown"
}.freeze

Class Method Summary collapse

Class Method Details

.callObject



19
20
21
22
23
24
25
26
# File 'lib/stimulus_plumbers/mcp/loaders/component_schema_loader.rb', line 19

def call
  {
    components:           extract_schema,
    field_as:             extract_field_as,
    field_as_controllers: FIELD_AS_CONTROLLERS,
    controllers:          ComponentRequirements.call
  }
end