1import { Controller } from "@hotwired/stimulus" 2 3export default class extends Controller { 4 static targets = ["textConfig", "selectionConfig"] 5 6 connect() { 7 this.applyVisibility(this.fieldTypeSelect()) 8 } 9 10 toggle(event) { 11 this.applyVisibility(event.currentTarget) 12 } 13 14 fieldTypeSelect() { 15 return this.element.querySelector('select[name="option_form_field[field_type]"]') 16 } 17 18 applyVisibility(select) { 19 if (!select) return 20 const value = select.value 21 if (this.hasTextConfigTarget) { 22 this.textConfigTarget.classList.toggle("hidden", value !== "text") 23 } 24 if (this.hasSelectionConfigTarget) { 25 this.selectionConfigTarget.classList.toggle("hidden", value !== "selection") 26 } 27 } 28} 29;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.