PageSourceSearch

https://css.jgbsmart.com/dist/chunks/ChoiceButtons-cff460d4.js

js jgbsmart.com collected 2026-10-08 04:51:00 UTC 4,058 bytes, 1 lines download raw bytes

1import{Y as a,Z as i,E as h,N as u,$ as d,X as s,a0 as k,a1 as r,a3 as o,F as _,a4 as b}from"./index-dcf885d4.js";import{_ as g}from"./_plugin-vue_export-helper-c27b6911.js";const y={props:{form_id:{type:String},input_type:{type:String,required:!0},input_name:{type:String,default:""},input_name_prefix:{type:String},checked:{type:[String,Array]},color_theme:{type:String,default:"landlord"},options:{type:Array},toggle_radio:{type:Number,default:0},all_button:{type:Object,default:()=>({})},clear_button:{type:Object,default:()=>({})}},emits:{change:null},computed:{hasCustomBtn(){return this.$scopedSlots.custom_btn},allButtonIsChecked(){return this.options.filter((t,e)=>this.checked.indexOf(t.key)<0).length===0}},methods:{pickThis:function(c){switch(this.input_type){case"radio":this.toggle_radio?this.checked===c?this.$emit("change",{checked:""}):this.$emit("change",{checked:c}):this.checked!==c&&this.$emit("change",{checked:c});break;case"checkbox":Array.isArray(this.checked)&&(this.checked.indexOf(c)>-1?this.$emit("change",{checked:this.checked.filter((t,e)=>t!==c)}):this.$emit("change",{checked:[...this.checked,c]}));break}},allButtonToggle(){this.options.filter((t,e)=>this.checked.indexOf(t.key)<0).length>0?this.$emit("change",{checked:this.options.map(t=>t.key)}):this.$emit("change",{checked:[]})}}},x={key:0,class:"row row-gap-10"},C={class:"col-auto mb-2"},v=["form","name","value","checked"],B={key:1,class:"row row-gap-10"},S={class:"col-auto mb-2"},O=["form","name","value","checked"];function w(c,t,e,T,A,n){return a(),i(_,null,[e.input_type==="radio"?(a(),i("div",x,[e.clear_button&&e.clear_button.display?(a(),i("div",{key:0,class:"col-auto mb-2",onClick:t[0]||(t[0]=l=>c.$emit("change",{checked:""}))},[h(d("div",{class:k(`btn btn-grey-ghost text-[13px] theme-${e.color_theme} ${e.checked?"":"active"}`)},s(e.clear_button.label),3),[[u,!n.hasCustomBtn]]),r(c.$slots,"custom_btn",{checked:!!e.checked,label:e.clear_button.label},void 0,!0)])):o("",!0),(a(!0),i(_,null,b(e.options,(l,f)=>(a(),i("label",C,[d("input",{class:"hidden",type:"radio",form:e.form_id,name:`${e.input_name_prefix?e.input_name_prefix+"_":""}${e.input_name}`,value:l.key,checked:e.checked===l.key,onClick:t[1]||(t[1]=m=>{n.pickThis(m.target.value)})},null,8,v),h(d("div",{class:k(`btn btn-grey-ghost text-[13px] theme-${e.color_theme} ${e.checked===l.key?"checked":""}`)},s(l.label),3),[[u,!n.hasCustomBtn]]),r(c.$slots,"custom_btn",{checked:e.checked===l.key,label:l.label},void 0,!0)]))),256))])):o("",!0),e.input_type==="checkbox"?(a(),i("div",B,[e.all_button&&e.all_button.display?(a(),i("div",{key:0,class:"col-auto mb-2",onClick:t[2]||(t[2]=(...l)=>n.allButtonToggle&&n.allButtonToggle(...l))},[h(d("div",{class:k(`btn btn-grey-ghost text-[13px] theme-${e.color_theme} ${n.allButtonIsChecked?"active":""}`)},s(e.all_button.label),3),[[u,!n.hasCustomBtn]]),r(c.$slots,"custom_btn",{checked:n.allButtonIsChecked,label:e.all_button.label},void 0,!0)])):o("",!0),e.clear_button&&e.clear_button.display?(a(),i("div",{key:1,class:"col-auto mb-2",onClick:t[3]||(t[3]=l=>c.$emit("change",{checked:[]}))},[h(d("div",{class:k(`btn btn-grey-ghost text-[13px] theme-${e.color_theme} ${e.checked.length===0?"active":""}`)},s(e.clear_button.label),3),[[u,!n.hasCustomBtn]]),r(c.$slots,"custom_btn",{checked:e.checked.length===0,label:e.clear_button.label},void 0,!0)])):o("",!0),(a(!0),i(_,null,b(e.options,(l,f)=>(a(),i("label",S,[d("input",{class:"hidden",type:"checkbox",form:e.form_id,name:`${e.input_name_prefix?e.input_name_prefix+"_":""}${e.input_name}[]`,value:l.key,checked:e.checked?e.checked.indexOf(l.key)>-1:!1,onChange:t[4]||(t[4]=m=>{n.pickThis(m.target.value)})},null,40,O),h(d("div",{class:k(`btn btn-grey-ghost text-[13px] theme-${e.color_theme} ${e.checked&&e.checked.indexOf(l.key)>-1?"checked":""}`)},s(l.label),3),[[u,!n.hasCustomBtn]]),r(c.$slots,"custom_btn",{checked:e.checked&&e.checked.indexOf(l.key)>-1,label:l.label},void 0,!0)]))),256))])):o("",!0)],64)}const j=g(y,[["render",w],["__scopeId","data-v-783a65df"]]);export{j as default};

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.