Sha256: c5bdf702ae89d86908668bd77b69c5d62676d63c54602abb1cdbb6ffb3210e7c
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
# frozen_string_literal: true module Katalyst module Navigation class EditorComponent < Editor::BaseComponent ACTIONS = <<~ACTIONS.gsub(/\s+/, " ").freeze submit->#{MENU_CONTROLLER}#reindex navigation:drop->#{MENU_CONTROLLER}#drop navigation:reindex->#{MENU_CONTROLLER}#reindex navigation:reset->#{MENU_CONTROLLER}#reset turbo:render@document->#{MENU_CONTROLLER}#connect ACTIONS def status_bar @status_bar ||= Editor::StatusBarComponent.new(menu:) end def new_items @new_items ||= Editor::NewItemsComponent.new(menu:) end def item_editor(item:) Editor::ItemEditorComponent.new(menu:, item:) end def item(item:) Editor::ItemComponent.new(menu:, item:) end def errors @errors ||= Katalyst::Navigation.config.errors_component.constantize.new(menu:) end private def default_html_attributes { id: menu_form_id, data: { controller: MENU_CONTROLLER, action: ACTIONS, "#{MENU_CONTROLLER}-max-depth-value": menu.depth, }, } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems