1import{f as m}from"./faUpload.6d6bdd25.js";import{_ as p,ag as u,bl as c}from"./index.474d7b13.js";import f from"./TmlTag.d83dee31.js";import{N as i,D as s,E as _,f as h,S as g,a1 as v,W as V,U as x,a4 as C,a0 as U,Q as k}from"./vue.00f7c436.js";import"./sentry.09480738.js";const y={name:"TmlFileUploader",components:{TmlButton:u,TmlTag:f},mixins:[c],props:{fieldName:{type:String,required:!0},accept:{type:String},validationRules:Object,text:{type:String}},data(){return{faUpload:m.faUpload,loaded:!1,files:[]}},created(){this.registerField(this.fieldName,{value:this.value||"",isValid:!1})},methods:{onChange(e){this.inputValue=e.target.files[0],this.$emit("on-upload",this.inputValue),this.loaded=!0},triggerUpload(){this.$refs.uploader&&this.$refs.uploader.click()},onRemove(){this.inputValue=null,this.$emit("on-remove",this.inputValue),this.loaded=!1}}},N={class:"flex flex-col items-start"},T=["id","name","accept"];function b(e,t,a,B,o,l){const n=i("tml-button"),r=i("tml-tag");return s(),_("div",N,[h(n,{icon:o.faUpload,href:"#",text:a.text,onClick:l.triggerUpload},null,8,["icon","text","onClick"]),g("input",{id:e.elementId,ref:"uploader",class:"hidden",type:"file",name:a.fieldName,accept:a.accept,onChange:t[0]||(t[0]=d=>l.onChange(d)),onClick:t[1]||(t[1]=v(()=>{},["stop"]))},null,40,T),e.inputValue&&o.loaded?(s(),V(r,{key:0,class:"mt-4",value:e.inputValue.name,onClose:l.onRemove},{default:x(()=>[C(U(e.inputValue.name),1)]),_:1},8,["value","onClose"])):k("",!0)])}const D=p(y,[["render",b],["__scopeId","data-v-5450bc11"]]);export{D as default}; 2//# sourceMappingURL=TmlFileUploader.66d6d983.js.map
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.