PageSourceSearch

https://kfem.org/assets/controllers/base/input_presence_controller-988285a8.js

js kfem.org collected 2026-10-05 01:06:15 UTC 660 bytes, 21 lines download raw bytes

1import { Controller } from '@hotwired/stimulus';
2
3/**
4 * @domain UI 표시 상태
5 * @concern 입력 유무에 따른 클래스 토글
6 * @description input/textarea의 값 존재 여부에 따라 element에 active 클래스를 토글한다. data-input-presence-active-class로 토글할 클래스명을 지정한다.
7 */
8export default class extends Controller {
9  static targets = ['input'];
10  static classes = ['active'];
11
12  connect() {
13    this.update();
14  }
15
16  update() {
17    if (!this.hasInputTarget || !this.hasActiveClass) return;
18    const filled = this.inputTarget.value.length > 0;
19    this.element.classList.toggle(this.activeClass, filled);
20  }
21}

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.