Class: StimulusPlumbers::Components::Combobox::Date

Inherits:
Plumber::Base
  • Object
show all
Defined in:
lib/stimulus_plumbers/components/combobox/date.rb,
lib/stimulus_plumbers/components/combobox/date/navigator.rb,
lib/stimulus_plumbers/components/combobox/date/navigation.rb

Defined Under Namespace

Modules: Metadata Classes: Navigation, Navigator

Constant Summary collapse

STIMULUS_CONTROLLER =
"combobox-date"
CALENDAR_MONTH_OUTLET =
"#{STIMULUS_CONTROLLER}-calendar-month-outlet".freeze
CALENDAR_YEAR_OUTLET =
"#{STIMULUS_CONTROLLER}-calendar-year-outlet".freeze
CALENDAR_DECADE_OUTLET =
"#{STIMULUS_CONTROLLER}-calendar-decade-outlet".freeze
STIMULUS_ACTION =
[
  "calendar-month:selected->#{STIMULUS_CONTROLLER}#onDaySelect",
  "calendar-year:selected->#{STIMULUS_CONTROLLER}#onMonthSelect",
  "calendar-decade:selected->#{STIMULUS_CONTROLLER}#onYearSelect",
  "#{STIMULUS_CONTROLLER}:selected->#{Combobox::STIMULUS_CONTROLLER}#onSelect",
  "#{STIMULUS_CONTROLLER}:selected->#{Components::Popover::STIMULUS_CONTROLLER}#closeOnSelect"
].join(" ").freeze

Instance Attribute Summary

Attributes inherited from Plumber::Base

#template

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Plumber::Base

#initialize, #theme

Methods included from Plumber::Renderer

#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?

Methods included from Plumber::Options::Aria

#labelled_aria

Methods included from Plumber::Options::Html

#merge_html_options

Constructor Details

This class inherits a constructor from StimulusPlumbers::Plumber::Base

Class Method Details

.decade_id_for(panel_id) ⇒ Object



21
# File 'lib/stimulus_plumbers/components/combobox/date.rb', line 21

def self.decade_id_for(panel_id)  = [panel_id, "calendar_decade"].compact.join("_")

.month_id_for(panel_id) ⇒ Object



19
# File 'lib/stimulus_plumbers/components/combobox/date.rb', line 19

def self.month_id_for(panel_id)   = [panel_id, "calendar_month"].compact.join("_")

.year_id_for(panel_id) ⇒ Object



20
# File 'lib/stimulus_plumbers/components/combobox/date.rb', line 20

def self.year_id_for(panel_id)    = [panel_id, "calendar_year"].compact.join("_")

Instance Method Details

#renderObject



33
# File 'lib/stimulus_plumbers/components/combobox/date.rb', line 33

def render(...) = render_date(...)