Class: Avo::MediaLibrary::ListItemComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Avo::MediaLibrary::ListItemComponent
- Defined in:
- app/components/avo/media_library/list_item_component.rb
Constant Summary
Constants included from Concerns::FindAssociationField
Concerns::FindAssociationField::ASSOCIATIONS
Instance Method Summary collapse
Methods inherited from BaseComponent
#component_name, #hotkey_badge
Methods included from ApplicationHelper
#a_button, #a_link, #body_classes, #button_classes, #chart_color, #container_classes, #d, #decode_filter_params, #e, #editor_file_path, #editor_url, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #mount_path, #number_to_social, #possibly_rails_authentication?, #render_license_warning, #root_path_without_url, #rtl?, #text_direction, #ui, #wrap_in_modal
Methods included from ResourcesHelper
#field_wrapper, #filter_wrapper, #index_field_wrapper, #item_selector_data_attributes, #record_path, #record_title, #resource_for_record, #resource_grid, #resource_show_path, #resource_table
Methods included from Concerns::FindAssociationField
Instance Method Details
#data ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/components/avo/media_library/list_item_component.rb', line 13 def data { component: component_name, blob_id: blob.id, media_library_blob_param: blob.as_json, media_library_path_param: helpers.main_app.rails_blob_path(blob), media_library_url_param: helpers.main_app.url_for(blob), media_library_attaching_param: @attaching, media_library_multiple_param: @multiple, media_library_selected_item: params[:controller_selector], action: "click->media-library#selectItem" }.tap do |result| if @attaching result[:turbo_frame] = Avo::MEDIA_LIBRARY_ITEM_DETAILS_FRAME_ID result[:turbo_prefetch] = false else result[:turbo_prefetch] = true end end end |