PageSourceSearch

https://haslital.swiss/layout/of-combo-box.b54be967.js

js haslital.swiss collected 2026-10-02 19:41:55 UTC 1,863 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6817],{48280:(t,e,n)=>{n.r(e),n.d(e,{default:()=>h,initMultiple:()=>u});var o=n(67232),a=n(93537);function s(t){const e=[];for(const n of Object.values(t)){const t=this.getValue(n);t&&e.push(this.getSummary(n,t))}return e.join(", ")}const i={format:"function|undefined",target:"element|string|undefined"},r={format:void 0,target:void 0};class c extends o.A{constructor(t,e){super(t,e),this._config.format=this._config.format||s.bind(this),this._fields=[...this._element.querySelectorAll("input, select")].filter((t=>Boolean(t.name))),this._target=(0,a.V6)(this._config.target),this._initFields(),this._onChange(),this._element.dispatchEvent(new CustomEvent("initialized.of.combo_box"))}static get Default(){return r}static get DefaultType(){return i}static get NAME(){return"combo_box"}getData(){const t={};for(const e of this._fields)t[e.name]=e;return t}getSummary(t,e){return"checkbox"===t.type?t.labels[0].textContent:("select"===t.tagName.toLowerCase()&&(e=t.querySelector(`option[value="${e}"]`).textContent),`${t.labels[0].textContent||t.name}: ${e}`)}getValue(t){let{value:e}=t;return"number"===t.type?e=Number.parseInt(e,10):"checkbox"===t.type&&(e=t.checked),e}_initFields(){for(const t of this._fields)t.addEventListener("change",(()=>this._onChange())),"input"!==t.tagName.toLowerCase()&&"textarea"!==t.tagName.toLowerCase()||t.addEventListener("keyup",(()=>this._onChange()))}_onChange(){if(this._target){const t=this._config.format(this.getData());"input"===this._target.tagName.toLowerCase()||"textarea"===this._target.tagName.toLowerCase()?this._target.value=t:this._target.textContent=t}this._element.dispatchEvent(new CustomEvent("changed.of.combo_box"))}}function u(t){for(const e of t)c.getOrCreateInstance(e,e.dataset.ofComboBox?JSON.parse(e.dataset.ofComboBox):{})}const h=c}}]);

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.