PageSourceSearch

https://quasar.dev/a/useFilePicker.r.js

js quasar.dev collected 2026-10-02 03:48:43 UTC 1,816 bytes, 1 lines download raw bytes

1import{t as e}from"./rolldown-runtime.js";import{H as t,T as n,W as r,Z as i,b as a,ft as o,gt as s,m as c,v as l,w as u,x as d,y as f}from"./v.js";import{Ai as p,Gn as m,Pi as h,Rn as g,Si as _,Un as v,Wn as y,f as b}from"./q.js";var x={class:`q-pa-md q-gutter-md`},S={__name:`Basic`,setup(e){let l=h(),{acceptedPickerFiles:g,openFilePicker:S}=b({multiple:!0,accept:`image/*`,maxFileSize:1048576,onRejected(e){l.notify({type:`negative`,message:`${e.length} file(s) did not pass the validation`})}});async function C(){await S()===null&&l.notify({message:`The dialog was dismissed`})}return(e,l)=>(t(),d(`div`,x,[n(_,{color:`primary`,push:``,icon:`attach_file`,label:`Pick images (up to 1MB each)`,onClick:C}),o(g).length===0?a(``,!0):(t(),f(m,{key:0,bordered:``,separator:``,class:`rounded-borders`},{default:i(()=>[(t(!0),d(c,null,r(o(g),e=>(t(),f(v,{key:e.name},{default:i(()=>[n(y,null,{default:i(()=>[u(s(e.name),1)]),_:2},1024),n(y,{side:``},{default:i(()=>[u(s(o(p).humanStorageSize(e.size)),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}))]))}},C={class:`q-pa-md`},w={class:`q-gutter-sm`},T={key:0,class:`q-gutter-sm q-mt-md`},E={key:0},D={__name:`Overrides`,setup(e){let{acceptedPickerFiles:i,openFilePicker:u}=b({accept:`.pdf,.doc,.docx,.txt`});function f(){u()}function p(){u({directory:!0,accept:void 0})}return(e,u)=>(t(),d(`div`,C,[l(`div`,w,[n(_,{color:`primary`,push:``,label:`Pick a document`,onClick:f}),n(_,{color:`secondary`,push:``,label:`Pick a folder`,onClick:p})]),o(i).length===0?a(``,!0):(t(),d(`div`,T,[n(g,{label:`${o(i).length} file(s)`},null,8,[`label`]),(t(!0),d(c,null,r(o(i).slice(0,10),e=>(t(),d(`div`,{key:e.webkitRelativePath||e.name},s(e.webkitRelativePath||e.name),1))),128)),o(i).length>10?(t(),d(`div`,E,`...`)):a(``,!0)]))]))}},O=e({Basic:()=>S,Overrides:()=>D});export{O as t};

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.