// NOTE: This file is generated by the templates/template.rb script and should not
// be modified manually. See /home/runner/work/herb/herb/templates/javascript/packages/core/src/action-view-helpers.ts.erb
export enum HelperType {
ActionCableMetaTag = "action_cable_meta_tag",
ContentSecurityPolicyP = "content_security_policy?",
ContentSecurityPolicyNonce = "content_security_policy_nonce",
PolymorphicPath = "polymorphic_path",
PolymorphicUrl = "polymorphic_url",
FormAuthenticityToken = "form_authenticity_token",
ProtectAgainstForgeryP = "protect_against_forgery?",
RenderActionTextContent = "render_action_text_content",
SanitizeActionTextContent = "sanitize_action_text_content",
RichTextareaTag = "rich_textarea_tag",
ErrorMessage = "error_message",
ErrorWrapping = "error_wrapping",
Object = "object",
ApplyStylesheetMediaDefault = "apply_stylesheet_media_default",
AudioTag = "audio_tag",
AutoDiscoveryLinkTag = "auto_discovery_link_tag",
AutoIncludeNonce = "auto_include_nonce",
AutoIncludeNonceForScripts = "auto_include_nonce_for_scripts",
AutoIncludeNonceForStyles = "auto_include_nonce_for_styles",
FaviconLinkTag = "favicon_link_tag",
ImageDecoding = "image_decoding",
ImageLoading = "image_loading",
ImageTag = "image_tag",
JavascriptIncludeTag = "javascript_include_tag",
PictureTag = "picture_tag",
PreloadLinkTag = "preload_link_tag",
PreloadLinksHeader = "preload_links_header",
StylesheetLinkTag = "stylesheet_link_tag",
VideoTag = "video_tag",
AssetPath = "asset_path",
AssetUrl = "asset_url",
AudioPath = "audio_path",
AudioUrl = "audio_url",
ComputeAssetExtname = "compute_asset_extname",
ComputeAssetHost = "compute_asset_host",
ComputeAssetPath = "compute_asset_path",
FontPath = "font_path",
FontUrl = "font_url",
ImagePath = "image_path",
ImageUrl = "image_url",
JavascriptPath = "javascript_path",
JavascriptUrl = "javascript_url",
PublicComputeAssetPath = "public_compute_asset_path",
StylesheetPath = "stylesheet_path",
StylesheetUrl = "stylesheet_url",
VideoPath = "video_path",
VideoUrl = "video_url",
AtomFeed = "atom_feed",
Cache = "cache",
CacheFragmentName = "cache_fragment_name",
CacheIf = "cache_if",
CacheUnless = "cache_unless",
CachingP = "caching?",
DigestPathFromTemplate = "digest_path_from_template",
FragmentFor = "fragment_for",
FragmentNameWithDigest = "fragment_name_with_digest",
ReadFragmentFor = "read_fragment_for",
UncacheableBang = "uncacheable!",
WriteFragmentFor = "write_fragment_for",
Capture = "capture",
ContentFor = "content_for",
ContentForP = "content_for?",
Provide = "provide",
WithOutputBuffer = "with_output_buffer",
PrependContentExfiltrationPrevention = "prepend_content_exfiltration_prevention",
PreventContentExfiltration = "prevent_content_exfiltration",
ActionName = "action_name",
AssignController = "assign_controller",
Controller = "controller",
ControllerName = "controller_name",
ControllerPath = "controller_path",
Cookies = "cookies",
Flash = "flash",
Headers = "headers",
Logger = "logger",
Params = "params",
Request = "request",
RequestForgeryProtectionToken = "request_forgery_protection_token",
Response = "response",
Session = "session",
CspMetaTag = "csp_meta_tag",
CsrfMetaTags = "csrf_meta_tags",
DateSelect = "date_select",
DatetimeSelect = "datetime_select",
DistanceOfTimeInWords = "distance_of_time_in_words",
RelativeTimeInWords = "relative_time_in_words",
SelectDate = "select_date",
SelectDatetime = "select_datetime",
SelectDay = "select_day",
SelectHour = "select_hour",
SelectMinute = "select_minute",
SelectMonth = "select_month",
SelectSecond = "select_second",
SelectTime = "select_time",
SelectYear = "select_year",
TimeAgoInWords = "time_ago_in_words",
TimeSelect = "time_select",
TimeTag = "time_tag",
Debug = "debug",
ApplyFormForOptionsBang = "apply_form_for_options!",
Button = "button",
Checkbox = "checkbox",
ColorField = "color_field",
DateField = "date_field",
DatetimeField = "datetime_field",
EmailField = "email_field",
EmittedHiddenIdP = "emitted_hidden_id?",
Fields = "fields",
FieldsFor = "fields_for",
FileField = "file_field",
FormFor = "form_for",
FormWith = "form_with",
FormWithGeneratesIds = "form_with_generates_ids",
FormWithGeneratesRemoteForms = "form_with_generates_remote_forms",
HiddenField = "hidden_field",
Label = "label",
MonthField = "month_field",
Multipart = "multipart",
MultipleFileFieldIncludeHidden = "multiple_file_field_include_hidden",
NumberField = "number_field",
PasswordField = "password_field",
RadioButton = "radio_button",
RangeField = "range_field",
SearchField = "search_field",
Submit = "submit",
TelephoneField = "telephone_field",
TextField = "text_field",
Textarea = "textarea",
TimeField = "time_field",
UrlField = "url_field",
WeekField = "week_field",
CollectionCheckboxes = "collection_checkboxes",
CollectionRadioButtons = "collection_radio_buttons",
CollectionSelect = "collection_select",
GroupedCollectionSelect = "grouped_collection_select",
GroupedOptionsForSelect = "grouped_options_for_select",
OptionGroupsFromCollectionForSelect = "option_groups_from_collection_for_select",
OptionsForSelect = "options_for_select",
OptionsFromCollectionForSelect = "options_from_collection_for_select",
Select = "select",
TimeZoneOptionsForSelect = "time_zone_options_for_select",
TimeZoneSelect = "time_zone_select",
WeekdayOptionsForSelect = "weekday_options_for_select",
WeekdaySelect = "weekday_select",
ButtonTag = "button_tag",
CheckboxTag = "checkbox_tag",
ColorFieldTag = "color_field_tag",
DateFieldTag = "date_field_tag",
DatetimeFieldTag = "datetime_field_tag",
DefaultEnforceUtf8 = "default_enforce_utf8",
EmailFieldTag = "email_field_tag",
EmbedAuthenticityTokenInRemoteForms = "embed_authenticity_token_in_remote_forms",
FieldId = "field_id",
FieldName = "field_name",
FieldSetTag = "field_set_tag",
FileFieldTag = "file_field_tag",
FormTag = "form_tag",
HiddenFieldTag = "hidden_field_tag",
ImageSubmitTag = "image_submit_tag",
LabelTag = "label_tag",
MonthFieldTag = "month_field_tag",
NumberFieldTag = "number_field_tag",
PasswordFieldTag = "password_field_tag",
RadioButtonTag = "radio_button_tag",
RangeFieldTag = "range_field_tag",
SearchFieldTag = "search_field_tag",
SelectTag = "select_tag",
SubmitTag = "submit_tag",
TelephoneFieldTag = "telephone_field_tag",
TextFieldTag = "text_field_tag",
TextareaTag = "textarea_tag",
TimeFieldTag = "time_field_tag",
UrlFieldTag = "url_field_tag",
Utf8EnforcerTag = "utf8_enforcer_tag",
WeekFieldTag = "week_field_tag",
EscapeJavascript = "escape_javascript",
JavascriptCdataSection = "javascript_cdata_section",
JavascriptTag = "javascript_tag",
NumberToCurrency = "number_to_currency",
NumberToHuman = "number_to_human",
NumberToHumanSize = "number_to_human_size",
NumberToPercentage = "number_to_percentage",
NumberToPhone = "number_to_phone",
NumberWithDelimiter = "number_with_delimiter",
NumberWithPrecision = "number_with_precision",
Raw = "raw",
SafeJoin = "safe_join",
ToSentence = "to_sentence",
DomClass = "dom_class",
DomId = "dom_id",
DomTarget = "dom_target",
ModelNameFromRecordOrClass = "model_name_from_record_or_class",
Render = "render",
Sanitize = "sanitize",
SanitizeCss = "sanitize_css",
SanitizerVendor = "sanitizer_vendor",
StripLinks = "strip_links",
StripTags = "strip_tags",
CdataSection = "cdata_section",
ContentTag = "content_tag",
EscapeOnce = "escape_once",
Tag = "tag",
TokenList = "token_list",
Concat = "concat",
CurrentCycle = "current_cycle",
Cycle = "cycle",
Excerpt = "excerpt",
Highlight = "highlight",
Pluralize = "pluralize",
ResetCycle = "reset_cycle",
SafeConcat = "safe_concat",
SimpleFormat = "simple_format",
Truncate = "truncate",
WordWrap = "word_wrap",
DebugMissingTranslation = "debug_missing_translation",
Localize = "localize",
Translate = "translate",
ButtonTo = "button_to",
ButtonToGeneratesButtonTag = "button_to_generates_button_tag",
CurrentPageP = "current_page?",
LinkTo = "link_to",
LinkToIf = "link_to_if",
LinkToUnless = "link_to_unless",
LinkToUnlessCurrent = "link_to_unless_current",
MailTo = "mail_to",
PhoneTo = "phone_to",
SmsTo = "sms_to",
UrlFor = "url_for",
TurboExemptsPageFromCache = "turbo_exempts_page_from_cache",
TurboExemptsPageFromCacheTag = "turbo_exempts_page_from_cache_tag",
TurboExemptsPageFromPreview = "turbo_exempts_page_from_preview",
TurboExemptsPageFromPreviewTag = "turbo_exempts_page_from_preview_tag",
TurboPageRequiresReload = "turbo_page_requires_reload",
TurboPageRequiresReloadTag = "turbo_page_requires_reload_tag",
TurboRefreshMethodTag = "turbo_refresh_method_tag",
TurboRefreshScrollTag = "turbo_refresh_scroll_tag",
TurboRefreshesWith = "turbo_refreshes_with",
TurboFrameTag = "turbo_frame_tag",
TurboIncludeTags = "turbo_include_tags",
TurboStreamActionTag = "turbo_stream_action_tag",
TurboStreamRefreshTag = "turbo_stream_refresh_tag",
TurboStream = "turbo_stream",
TurboStreamFrom = "turbo_stream_from",
}
export type HelperDetectStyle = "call_name" | "receiver_call"
export type HelperOutput = "html" | "text" | "url" | "boolean" | "void" | "object"
export interface HelperArgument {
readonly name: string
readonly position: number
readonly type: string
readonly optional: boolean
readonly default: string | null
readonly splat: boolean
readonly description: string
}
export interface HelperOption {
readonly name: string
readonly type: string
readonly mapsTo: string | null
readonly description: string
}
export interface HelperImplicitAttribute {
readonly name: string
readonly source: string
readonly sourceWithBlock: string | null
readonly wrapper: string
readonly skipWrappingFor: string[]
}
export interface HelperEntry {
readonly name: string
readonly type: HelperType
readonly source: string
readonly gem: string
readonly output: HelperOutput
readonly visibility: "public" | "internal"
readonly tagName: string | null
readonly isVoid: boolean
readonly supportsBlock: boolean
readonly preferredForTag: boolean
readonly supported: boolean
readonly detectStyle: HelperDetectStyle
readonly description: string
readonly signature: string
readonly documentationURL: string
readonly implicitAttribute: HelperImplicitAttribute | null
readonly arguments: HelperArgument[]
readonly options: HelperOption[]
readonly specialBehaviors: string[]
readonly aliases: string[]
}
const actionCableMetaTagEntry: HelperEntry = {
name: "action_cable_meta_tag",
type: HelperType.ActionCableMetaTag,
source: "ActionCable::Helpers::ActionCableHelper#action_cable_meta_tag",
gem: "actioncable",
output: "html",
visibility: "public",
tagName: "meta",
isVoid: true,
supportsBlock: false,
preferredForTag: false,
supported: false,
detectStyle: "call_name",
description: "Returns an `\"action-cable-url\"` `` tag with the value of the URL specified in your configuration. Ensure this is above your JavaScript tag. Used by Action Cable to determine the URL of your WebSocket server.",
signature: "action_cable_meta_tag",
documentationURL: "https://api.rubyonrails.org/classes/ActionCable/Helpers/ActionCableHelper.html#method-i-action_cable_meta_tag",
implicitAttribute: null,
arguments: [
],
options: [
],
specialBehaviors: [],
aliases: [],
}
const contentSecurityPolicyPEntry: HelperEntry = {
name: "content_security_policy?",
type: HelperType.ContentSecurityPolicyP,
source: "ActionController::ContentSecurityPolicy#content_security_policy?",
gem: "actionpack",
output: "boolean",
visibility: "public",
tagName: null,
isVoid: false,
supportsBlock: false,
preferredForTag: false,
supported: false,
detectStyle: "call_name",
description: "Returns whether a Content-Security-Policy is present for the current request.",
signature: "content_security_policy?",
documentationURL: "",
implicitAttribute: null,
arguments: [
],
options: [
],
specialBehaviors: [],
aliases: [],
}
const contentSecurityPolicyNonceEntry: HelperEntry = {
name: "content_security_policy_nonce",
type: HelperType.ContentSecurityPolicyNonce,
source: "ActionController::ContentSecurityPolicy#content_security_policy_nonce",
gem: "actionpack",
output: "text",
visibility: "public",
tagName: null,
isVoid: false,
supportsBlock: false,
preferredForTag: false,
supported: false,
detectStyle: "call_name",
description: "Returns the Content-Security-Policy nonce for the current request. This nonce value is used in `