Bonfire.UI.Common.SmartInput.LiveHandler (Bonfire v1.0.0-social-rc.2.3)

View Source

Summary

Functions

Open the composer by setting assigns

Cancel all pending uploads for the smart input This is useful when closing the composer or resetting it

Merges new opts with existing ones, maintaining important state Use this helper for consistent merging across functions

Set assigns in the smart input from anywhere in the app (whether using a live component or sticky live view)

Functions

active_smart_input_component(smart_input_component, create_object_type)

active_smart_input_components(smart_input_component, create_object_type)

activity_type_or_reply(assigns)

all_smart_input_components()

assign_open(context, assigns)

Open the composer by setting assigns

cancel_all_uploads(socket)

Cancel all pending uploads for the smart input This is useful when closing the composer or resetting it

close_smart_input(js \\ %JS{})

confirm_close_smart_input(js \\ %JS{}, reusable_modal_id)

handle_event(action, params, socket)

max_length()

maximize(js \\ %JS{})

maybe_from_json(json)

maybe_from_json_string(json)

merge_smart_input_opts(existing_opts, new_opts)

Merges new opts with existing ones, maintaining important state Use this helper for consistent merging across functions

minimize(js \\ %JS{})

open(js \\ %JS{}, opts \\ nil)

open_type(js \\ %JS{}, component, opts \\ nil)

open_with_text_suggestion(text, set_assigns, socket_or_context)

replace_input_next_time(socket_or_context)

reply_to_param(arg1)

reset_input(socket)

set(context, assigns)

Set assigns in the smart input from anywhere in the app (whether using a live component or sticky live view)

set_smart_input_text(socket_or_context, text \\ "\n")

should_disable_submit?(context_or_args)

show_expanded(js \\ %JS{}, target, btn, class)

show_main(js \\ %JS{})

sigil_p(route, extra)

(macro)

smart_input_name(component)

switch_smart_input_type(type, js \\ %JS{})

toggle_class(js \\ %JS{}, btn, class)

toggle_expanded(js \\ %JS{}, target, btn, class)