@uploadista/vue 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components-PKZ6tZdQ.mjs +2 -0
- package/dist/components-PKZ6tZdQ.mjs.map +1 -0
- package/dist/composables/index.d.mts +1 -1
- package/dist/index-BmoqlSiN.d.mts.map +1 -1
- package/dist/{index-B2R7jtuE.d.mts → index-DWCWRN8W.d.mts} +2 -2
- package/dist/{index-B2R7jtuE.d.mts.map → index-DWCWRN8W.d.mts.map} +1 -1
- package/dist/{index-BxAfeZLx.d.mts → index-DclpVCup.d.mts} +54 -19
- package/dist/index-DclpVCup.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/providers/index.mjs +1 -1
- package/dist/{providers-BQhKoGMk.mjs → providers-W-v9skqN.mjs} +1 -1
- package/dist/providers-W-v9skqN.mjs.map +1 -0
- package/package.json +7 -7
- package/dist/components-DjgxUKKp.mjs +0 -2
- package/dist/components-DjgxUKKp.mjs.map +0 -1
- package/dist/index-BxAfeZLx.d.mts.map +0 -1
- package/dist/providers-BQhKoGMk.mjs.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "../index-
|
|
2
|
-
import "../index-
|
|
1
|
+
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "../index-DWCWRN8W.mjs";
|
|
2
|
+
import "../index-DclpVCup.mjs";
|
|
3
3
|
export { _default as FlowUploadList, _default$1 as FlowUploadZone, _default$2 as UploadList, _default$3 as UploadZone };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../utils-BSoozMHK.mjs";import{i as e,n as t,r as n,t as r}from"../components-
|
|
1
|
+
import"../utils-BSoozMHK.mjs";import{i as e,n as t,r as n,t as r}from"../components-PKZ6tZdQ.mjs";import"../plugin-HH1lTjcq.mjs";import"../composables-Biblh8X9.mjs";export{e as FlowUploadList,n as FlowUploadZone,t as UploadList,r as UploadZone};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{m as e}from"./utils-BSoozMHK.mjs";import{a as t,n,r,s as i}from"./composables-Biblh8X9.mjs";import{Fragment as a,computed as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,defineComponent as d,normalizeClass as f,normalizeStyle as p,openBlock as m,ref as h,renderList as g,renderSlot as _,toDisplayString as v,unref as y,withKeys as b,withModifiers as x}from"vue";var S=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};const C={class:`flow-upload-list`},w={class:`flow-upload-list__item-header`},T={class:`flow-upload-list__item-icon`},E={class:`flow-upload-list__item-name`},D={class:`flow-upload-list__item-details`},ee={class:`flow-upload-list__item-size`},O={key:0,class:`flow-upload-list__item-job`},k={key:0,class:`flow-upload-list__item-progress`},A={class:`flow-upload-list__progress-bar`},j={class:`flow-upload-list__progress-text`},M={key:1,class:`flow-upload-list__item-error`},N={key:2,class:`flow-upload-list__item-success`};var P=S(d({__name:`FlowUploadList`,props:{uploads:{},filter:{type:Function},sortBy:{type:Function}},setup(t){let n=t,r=o(()=>{let e=n.uploads;return n.filter&&(e=e.filter(n.filter)),n.sortBy&&(e=[...e].sort(n.sortBy)),e}),i=o(()=>({pending:r.value.filter(e=>e.status===`pending`),uploading:r.value.filter(e=>e.status===`uploading`),success:r.value.filter(e=>e.status===`success`),error:r.value.filter(e=>e.status===`error`),aborted:r.value.filter(e=>e.status===`aborted`)})),u=e=>{if(e===0)return`0 Bytes`;let t=1024,n=[`Bytes`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(2))} ${n[r]}`},d=e=>{switch(e){case`pending`:return`⏳`;case`uploading`:return`📤`;case`success`:return`✅`;case`error`:return`❌`;case`aborted`:return`⏹️`;default:return`❓`}},h=e=>{switch(e){case`pending`:return`#6c757d`;case`uploading`:return`#007bff`;case`success`:return`#28a745`;case`error`:return`#dc3545`;case`aborted`:return`#6c757d`;default:return`#6c757d`}};return(t,n)=>(m(),c(`div`,C,[_(t.$slots,`default`,{items:r.value,itemsByStatus:i.value},()=>[s(` Default rendering: simple list of flow upload items `),(m(!0),c(a,null,g(r.value,(n,r)=>(m(),c(`div`,{key:n.id,class:f([`flow-upload-list__item`,`flow-upload-list__item--${n.status}`])},[_(t.$slots,`item`,{item:n,index:r,isPending:n.status===`pending`,isUploading:n.status===`uploading`,isSuccess:n.status===`success`,isError:n.status===`error`,isAborted:n.status===`aborted`,formatFileSize:u},()=>[s(` Default item template `),l(`div`,w,[l(`span`,T,v(d(n.status)),1),l(`span`,E,v(y(e)(n.file)?n.file.name:`File`),1),l(`span`,{class:`flow-upload-list__item-status`,style:p({color:h(n.status)})},v(n.status.toUpperCase()),5)]),l(`div`,D,[l(`span`,ee,v(u(n.totalBytes)),1),n.jobId?(m(),c(`span`,O,` Job: `+v(n.jobId.slice(0,8))+`... `,1)):s(`v-if`,!0)]),n.status===`uploading`?(m(),c(`div`,k,[l(`div`,A,[l(`div`,{class:`flow-upload-list__progress-fill`,style:p({width:`${n.progress}%`})},null,4)]),l(`span`,j,v(n.progress)+`% • `+v(u(n.bytesUploaded))+` / `+v(u(n.totalBytes)),1)])):s(`v-if`,!0),n.status===`error`&&n.error?(m(),c(`div`,M,v(n.error.message),1)):s(`v-if`,!0),n.status===`success`?(m(),c(`div`,N,` Upload complete `)):s(`v-if`,!0)],!0)],2))),128))],!0)]))}}),[[`__scopeId`,`data-v-eabb787d`]]);const F=[`tabindex`,`aria-disabled`,`onKeydown`],I={class:`flow-upload-zone__content`},L={key:0},R={key:1},z={key:2},B={key:0},V={key:3},H={key:4,class:`flow-upload-zone__error`},U={key:5},te={key:6,class:`flow-upload-zone__progress`},W={class:`flow-upload-zone__progress-bar`},G={key:7,class:`flow-upload-zone__errors`},K=[`multiple`,`accept`,`disabled`];var q=S(d({__name:`FlowUploadZone`,props:{flowConfig:{},options:{},accept:{},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxFileSize:{}},emits:[`upload-complete`,`upload-error`,`upload-start`,`validation-error`],setup(e,{emit:n}){let r=e,d=n,S=t({...r.options,flowConfig:r.flowConfig,onFlowComplete:e=>{d(`upload-complete`,e),r.options?.onFlowComplete?.(e)},onError:e=>{d(`upload-error`,e),r.options?.onError?.(e)}}),C=i({accept:r.accept?[r.accept]:void 0,multiple:r.multiple,maxFileSize:r.maxFileSize,onFilesReceived:e=>{let t=e[0];t&&(d(`upload-start`,t),S.upload(t))},onValidationError:e=>{d(`validation-error`,e)}}),w=h(),T=()=>{r.disabled||w.value?.click()},E=o(()=>C.state.value.isDragging||C.state.value.isOver);return(t,n)=>(m(),c(`div`,{class:f([`flow-upload-zone`,{"flow-upload-zone--active":E.value,"flow-upload-zone--disabled":e.disabled,"flow-upload-zone--uploading":y(S).isUploading.value}]),onDragenter:n[1]||=t=>!e.disabled&&y(C).onDragEnter,onDragover:n[2]||=t=>!e.disabled&&y(C).onDragOver,onDragleave:n[3]||=t=>!e.disabled&&y(C).onDragLeave,onDrop:n[4]||=t=>!e.disabled&&y(C).onDrop,onClick:T,role:`button`,tabindex:e.disabled?-1:0,"aria-disabled":e.disabled,"aria-label":`Upload file with flow processing`,onKeydown:[b(T,[`enter`]),b(x(T,[`prevent`]),[`space`])]},[_(t.$slots,`default`,{isDragging:y(C).state.value.isDragging,isOver:y(C).state.value.isOver,isUploading:y(S).isUploading.value,isProcessing:y(S).isProcessing.value,progress:y(S).state.value.progress,status:y(S).state.value.status,errors:[...y(C).state.value.errors],openFilePicker:T},()=>[s(` Default slot content `),l(`div`,I,[y(C).state.value.isDragging?(m(),c(`p`,L,`Drop file here...`)):y(S).isUploading.value?(m(),c(`p`,R,` Uploading... `+v(y(S).state.value.progress)+`% `,1)):y(S).isProcessing.value?(m(),c(`p`,z,[n[5]||=u(` Processing... `,-1),y(S).state.value.currentNodeName?(m(),c(`span`,B,` (`+v(y(S).state.value.currentNodeName)+`) `,1)):s(`v-if`,!0)])):y(S).state.value.status===`success`?(m(),c(`p`,V,`Upload complete!`)):y(S).state.value.status===`error`?(m(),c(`p`,H,` Error: `+v(y(S).state.value.error?.message),1)):(m(),c(`p`,U,`Drag a file here or click to select`)),y(S).isUploading.value?(m(),c(`div`,te,[l(`div`,W,[l(`div`,{class:`flow-upload-zone__progress-fill`,style:p({width:`${y(S).state.value.progress}%`})},null,4)])])):s(`v-if`,!0),y(C).state.value.errors.length>0?(m(),c(`div`,G,[(m(!0),c(a,null,g(y(C).state.value.errors,(e,t)=>(m(),c(`p`,{key:t},v(e),1))),128))])):s(`v-if`,!0)])],!0),l(`input`,{ref_key:`fileInputRef`,ref:w,type:`file`,multiple:y(C).inputProps.value.multiple,accept:y(C).inputProps.value.accept,disabled:e.disabled,onChange:n[0]||=(...e)=>y(C).onInputChange&&y(C).onInputChange(...e),style:{display:`none`},"aria-hidden":`true`},null,40,K)],42,F))}}),[[`__scopeId`,`data-v-e6d6e2c2`]]);const J={class:`upload-list`},Y={class:`upload-list__item-header`},X={class:`upload-list__item-icon`},Z={class:`upload-list__item-name`},Q={key:0,class:`upload-list__item-size`},ne={key:1,class:`upload-list__item-progress`},re={class:`upload-list__progress-bar`},ie={class:`upload-list__progress-text`},ae={key:2,class:`upload-list__item-error`};var oe=S(d({__name:`UploadList`,props:{uploads:{},filter:{type:Function},sortBy:{type:Function}},setup(t){let n=t,r=o(()=>{let e=n.uploads;return n.filter&&(e=e.filter(n.filter)),n.sortBy&&(e=[...e].sort(n.sortBy)),e}),i=o(()=>({idle:r.value.filter(e=>e.state.status===`idle`),uploading:r.value.filter(e=>e.state.status===`uploading`),success:r.value.filter(e=>e.state.status===`success`),error:r.value.filter(e=>e.state.status===`error`),aborted:r.value.filter(e=>e.state.status===`aborted`)})),u=e=>{if(e===0)return`0 Bytes`;let t=1024,n=[`Bytes`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(2))} ${n[r]}`},d=e=>{switch(e){case`idle`:return`⏳`;case`uploading`:return`📤`;case`success`:return`✅`;case`error`:return`❌`;case`aborted`:return`⏹️`;default:return`❓`}},h=e=>{switch(e){case`idle`:return`#6c757d`;case`uploading`:return`#007bff`;case`success`:return`#28a745`;case`error`:return`#dc3545`;case`aborted`:return`#6c757d`;default:return`#6c757d`}};return(t,n)=>(m(),c(`div`,J,[_(t.$slots,`default`,{items:r.value,itemsByStatus:i.value},()=>[s(` Default rendering: simple list of upload items `),(m(!0),c(a,null,g(r.value,(n,r)=>(m(),c(`div`,{key:n.id,class:f([`upload-list__item`,`upload-list__item--${n.state.status}`])},[_(t.$slots,`item`,{item:n,index:r,isUploading:n.state.status===`uploading`,isSuccess:n.state.status===`success`,isError:n.state.status===`error`,formatFileSize:u},()=>[s(` Default item template `),l(`div`,Y,[l(`span`,X,v(d(n.state.status)),1),l(`span`,Z,v(y(e)(n.file)?n.file.name:`File`),1),l(`span`,{class:`upload-list__item-status`,style:p({color:h(n.state.status)})},v(n.state.status.toUpperCase()),5)]),n.state.totalBytes?(m(),c(`div`,Q,v(u(n.state.totalBytes)),1)):s(`v-if`,!0),n.state.status===`uploading`?(m(),c(`div`,ne,[l(`div`,re,[l(`div`,{class:`upload-list__progress-fill`,style:p({width:`${n.state.progress}%`})},null,4)]),l(`span`,ie,v(n.state.progress)+`%`,1)])):s(`v-if`,!0),n.state.status===`error`&&n.state.error?(m(),c(`div`,ae,v(n.state.error.message),1)):s(`v-if`,!0)],!0)],2))),128))],!0)]))}}),[[`__scopeId`,`data-v-70c8fe1a`]]);const $=[`tabindex`,`aria-disabled`,`aria-label`,`onKeydown`],se={class:`upload-zone__content`},ce={key:0},le={key:1},ue={key:2,class:`upload-zone__errors`},de=[`multiple`,`accept`,`disabled`];var fe=S(d({__name:`UploadZone`,props:{accept:{},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},maxFileSize:{},validator:{},multiUploadOptions:{},uploadOptions:{}},emits:[`file-select`,`upload-start`,`validation-error`],setup(e,{emit:t}){let u=e,d=t,p=u.multiple?null:n(u.uploadOptions||{}),S=u.multiple?r(u.multiUploadOptions||{}):null,C=i({accept:u.accept,multiple:u.multiple,maxFileSize:u.maxFileSize,validator:u.validator,onFilesReceived:e=>{d(`file-select`,e),d(`upload-start`,e),u.multiple&&S?(S.addFiles(e),setTimeout(()=>S.startAll(),0)):!u.multiple&&p&&e[0]&&p.upload(e[0])},onValidationError:e=>{d(`validation-error`,e)}}),w=h(),T=()=>{u.disabled||w.value?.click()},E=o(()=>C.state.value.isDragging||C.state.value.isOver),D=o(()=>u.multiple&&S?S.state.value.isUploading:!u.multiple&&p?p.state.value.status===`uploading`:!1);return(t,n)=>(m(),c(`div`,{class:f([`upload-zone`,{"upload-zone--active":E.value,"upload-zone--disabled":e.disabled}]),onDragenter:n[1]||=t=>!e.disabled&&y(C).onDragEnter,onDragover:n[2]||=t=>!e.disabled&&y(C).onDragOver,onDragleave:n[3]||=t=>!e.disabled&&y(C).onDragLeave,onDrop:n[4]||=t=>!e.disabled&&y(C).onDrop,onClick:T,role:`button`,tabindex:e.disabled?-1:0,"aria-disabled":e.disabled,"aria-label":e.multiple?`Upload multiple files`:`Upload a file`,onKeydown:[b(T,[`enter`]),b(x(T,[`prevent`]),[`space`])]},[_(t.$slots,`default`,{isDragging:y(C).state.value.isDragging,isOver:y(C).state.value.isOver,isUploading:D.value,errors:[...y(C).state.value.errors],openFilePicker:T},()=>[s(` Default slot content `),l(`div`,se,[y(C).state.value.isDragging?(m(),c(`p`,ce,v(e.multiple?`Drop files here...`:`Drop file here...`),1)):(m(),c(`p`,le,v(e.multiple?`Drag files here or click to select`:`Drag a file here or click to select`),1)),y(C).state.value.errors.length>0?(m(),c(`div`,ue,[(m(!0),c(a,null,g(y(C).state.value.errors,(e,t)=>(m(),c(`p`,{key:t},v(e),1))),128))])):s(`v-if`,!0)])],!0),l(`input`,{ref_key:`fileInputRef`,ref:w,type:`file`,multiple:y(C).inputProps.value.multiple,accept:y(C).inputProps.value.accept,disabled:e.disabled,onChange:n[0]||=(...e)=>y(C).onInputChange&&y(C).onInputChange(...e),style:{display:`none`},"aria-hidden":`true`},null,40,de)],42,$))}}),[[`__scopeId`,`data-v-8b709bef`]]);export{P as i,oe as n,q as r,fe as t};
|
|
2
|
+
//# sourceMappingURL=components-PKZ6tZdQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-PKZ6tZdQ.mjs","names":[],"sources":["../src/components/FlowUploadList.vue","../src/components/FlowUploadZone.vue","../src/components/UploadList.vue","../src/components/UploadZone.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * FlowUploadList - Display list of flow uploads with processing status\n *\n * Shows the progress and processing status of files being uploaded through flow pipelines.\n * Supports filtering, sorting, and status-based grouping. Provides flexible slot-based\n * customization for rendering each flow upload item.\n *\n * @component\n * @example\n * // Basic flow upload list\n * <FlowUploadList :uploads=\"flowUploads\" />\n *\n * @example\n * // Custom item rendering with flow status\n * <FlowUploadList :uploads=\"flowUploads\">\n * <template #item=\"{ item, isSuccess, isError, isUploading }\">\n * <div class=\"flow-item\">\n * <span>{{ item.filename }}</span>\n * <progress :value=\"item.uploadProgress\" max=\"100\"></progress>\n * <span v-if=\"isUploading\">Processing...</span>\n * <span v-else-if=\"isSuccess\">Complete</span>\n * <span v-else-if=\"isError\">Failed</span>\n * </div>\n * </template>\n * </FlowUploadList>\n *\n * @example\n * // With status grouping\n * <FlowUploadList :uploads=\"flowUploads\">\n * <template #default=\"{ itemsByStatus }\">\n * <div v-if=\"itemsByStatus.uploading.length\">\n * <h3>Uploading...</h3>\n * <div v-for=\"item of itemsByStatus.uploading\" :key=\"item.id\">\n * {{ item.filename }}\n * </div>\n * </div>\n * </template>\n * </FlowUploadList>\n */\nimport type {\n BrowserUploadInput,\n FlowUploadItem,\n} from \"@uploadista/client-browser\";\nimport { computed } from \"vue\";\nimport { isBrowserFile } from \"../utils\";\n\n/**\n * Props for the FlowUploadList component\n * @property {FlowUploadItem[]} uploads - Array of flow upload items to display\n * @property {Function} filter - Optional filter for which items to display\n * @property {Function} sortBy - Optional sorting function for items (a, b) => number\n */\nexport interface FlowUploadListProps {\n /**\n * Array of flow upload items to display\n */\n uploads: FlowUploadItem<BrowserUploadInput>[];\n\n /**\n * Optional filter for which items to display\n */\n filter?: (item: FlowUploadItem<BrowserUploadInput>) => boolean;\n\n /**\n * Optional sorting function for items\n */\n sortBy?: (\n a: FlowUploadItem<BrowserUploadInput>,\n b: FlowUploadItem<BrowserUploadInput>,\n ) => number;\n}\n\nconst props = defineProps<FlowUploadListProps>();\n\ndefineSlots<{\n item(props: {\n item: FlowUploadItem<BrowserUploadInput>;\n index: number;\n isPending: boolean;\n isUploading: boolean;\n isSuccess: boolean;\n isError: boolean;\n isAborted: boolean;\n formatFileSize: (bytes: number) => string;\n }): any;\n default?(props: {\n items: FlowUploadItem<BrowserUploadInput>[];\n itemsByStatus: {\n pending: FlowUploadItem<BrowserUploadInput>[];\n uploading: FlowUploadItem<BrowserUploadInput>[];\n success: FlowUploadItem<BrowserUploadInput>[];\n error: FlowUploadItem<BrowserUploadInput>[];\n aborted: FlowUploadItem<BrowserUploadInput>[];\n };\n }): any;\n}>();\n\n// Apply filtering and sorting\nconst filteredItems = computed(() => {\n let items = props.uploads;\n\n if (props.filter) {\n items = items.filter(props.filter);\n }\n\n if (props.sortBy) {\n items = [...items].sort(props.sortBy);\n }\n\n return items;\n});\n\n// Group items by status\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst itemsByStatus = computed(() => ({\n pending: filteredItems.value.filter((item) => item.status === \"pending\"),\n uploading: filteredItems.value.filter((item) => item.status === \"uploading\"),\n success: filteredItems.value.filter((item) => item.status === \"success\"),\n error: filteredItems.value.filter((item) => item.status === \"error\"),\n aborted: filteredItems.value.filter((item) => item.status === \"aborted\"),\n}));\n\n// Helper function to format file sizes\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\n// Helper function to get status icon\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusIcon = (status: string): string => {\n switch (status) {\n case \"pending\":\n return \"⏳\";\n case \"uploading\":\n return \"📤\";\n case \"success\":\n return \"✅\";\n case \"error\":\n return \"❌\";\n case \"aborted\":\n return \"⏹️\";\n default:\n return \"❓\";\n }\n};\n\n// Helper function to get status color\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusColor = (status: string): string => {\n switch (status) {\n case \"pending\":\n return \"#6c757d\";\n case \"uploading\":\n return \"#007bff\";\n case \"success\":\n return \"#28a745\";\n case \"error\":\n return \"#dc3545\";\n case \"aborted\":\n return \"#6c757d\";\n default:\n return \"#6c757d\";\n }\n};\n</script>\n\n<template>\n <div class=\"flow-upload-list\">\n <slot :items=\"filteredItems\" :items-by-status=\"itemsByStatus\">\n <!-- Default rendering: simple list of flow upload items -->\n <div\n v-for=\"(item, index) in filteredItems\"\n :key=\"item.id\"\n class=\"flow-upload-list__item\"\n :class=\"`flow-upload-list__item--${item.status}`\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :is-pending=\"item.status === 'pending'\"\n :is-uploading=\"item.status === 'uploading'\"\n :is-success=\"item.status === 'success'\"\n :is-error=\"item.status === 'error'\"\n :is-aborted=\"item.status === 'aborted'\"\n :format-file-size=\"formatFileSize\"\n >\n <!-- Default item template -->\n <div class=\"flow-upload-list__item-header\">\n <span class=\"flow-upload-list__item-icon\">\n {{ getStatusIcon(item.status) }}\n </span>\n <span class=\"flow-upload-list__item-name\">\n {{ isBrowserFile(item.file) ? item.file.name : 'File' }}\n </span>\n <span\n class=\"flow-upload-list__item-status\"\n :style=\"{ color: getStatusColor(item.status) }\"\n >\n {{ item.status.toUpperCase() }}\n </span>\n </div>\n\n <div class=\"flow-upload-list__item-details\">\n <span class=\"flow-upload-list__item-size\">\n {{ formatFileSize(item.totalBytes) }}\n </span>\n <span v-if=\"item.jobId\" class=\"flow-upload-list__item-job\">\n Job: {{ item.jobId.slice(0, 8) }}...\n </span>\n </div>\n\n <div v-if=\"item.status === 'uploading'\" class=\"flow-upload-list__item-progress\">\n <div class=\"flow-upload-list__progress-bar\">\n <div\n class=\"flow-upload-list__progress-fill\"\n :style=\"{ width: `${item.progress}%` }\"\n />\n </div>\n <span class=\"flow-upload-list__progress-text\">\n {{ item.progress }}% • {{ formatFileSize(item.bytesUploaded) }} / {{ formatFileSize(item.totalBytes) }}\n </span>\n </div>\n\n <div v-if=\"item.status === 'error' && item.error\" class=\"flow-upload-list__item-error\">\n {{ item.error.message }}\n </div>\n\n <div v-if=\"item.status === 'success'\" class=\"flow-upload-list__item-success\">\n Upload complete\n </div>\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.flow-upload-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.flow-upload-list__item {\n padding: 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 0.375rem;\n background-color: #fff;\n}\n\n.flow-upload-list__item-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.flow-upload-list__item-icon {\n font-size: 1rem;\n}\n\n.flow-upload-list__item-name {\n flex: 1;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.flow-upload-list__item-status {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.flow-upload-list__item-details {\n display: flex;\n gap: 1rem;\n font-size: 0.75rem;\n color: #666;\n margin-bottom: 0.5rem;\n}\n\n.flow-upload-list__item-size {\n font-weight: 500;\n}\n\n.flow-upload-list__item-job {\n color: #999;\n font-family: monospace;\n}\n\n.flow-upload-list__item-progress {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n.flow-upload-list__progress-bar {\n width: 100%;\n height: 0.375rem;\n background-color: #e0e0e0;\n border-radius: 0.1875rem;\n overflow: hidden;\n}\n\n.flow-upload-list__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.flow-upload-list__progress-text {\n font-size: 0.75rem;\n color: #666;\n}\n\n.flow-upload-list__item-error {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #f8d7da;\n color: #721c24;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n\n.flow-upload-list__item-success {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #d4edda;\n color: #155724;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * FlowUploadZone - Upload zone with flow processing pipeline\n *\n * Specialized upload component that uploads files through a flow pipeline for processing.\n * Supports drag-and-drop and file picker with flow configuration. Emits events for flow\n * completion, errors, and upload status changes.\n *\n * @component\n * @example\n * // Upload images through image processing flow\n * <FlowUploadZone\n * :flow-config=\"{ flowId: 'image-processor' }\"\n * accept=\"image/*\"\n * @upload-complete=\"handleFlowResult\"\n * @upload-error=\"handleError\"\n * />\n *\n * @example\n * // With custom slot content\n * <FlowUploadZone\n * :flow-config=\"{ flowId: 'image-processor' }\"\n * @upload-complete=\"handleResult\"\n * >\n * <template #default=\"{ isDragging, isProcessing, progress }\">\n * <div :class=\"{ processing: isProcessing }\">\n * <p v-if=\"isProcessing\">Processing... {{ progress }}%</p>\n * <p v-else-if=\"isDragging\">Drop file here</p>\n * <p v-else>Drag file here for processing</p>\n * </div>\n * </template>\n * </FlowUploadZone>\n *\n * @emits upload-complete - Flow processing completed with results\n * @emits upload-error - Upload or processing failed\n * @emits upload-start - File upload started\n * @emits validation-error - File validation failed\n */\nimport type {\n FlowUploadConfig,\n FlowUploadOptions,\n} from \"@uploadista/client-browser\";\nimport { computed, ref } from \"vue\";\nimport { useDragDrop, useFlowUpload } from \"../composables\";\n\n/**\n * Props for the FlowUploadZone component\n * @property {FlowUploadConfig} flowConfig - Flow configuration with flowId\n * @property {FlowUploadOptions} options - Additional flow upload options\n * @property {string} accept - Accepted file types (single MIME type or extension string)\n * @property {boolean} multiple - Allow multiple files (default: false, flow uploads are single-file)\n * @property {boolean} disabled - Disable the upload zone (default: false)\n * @property {number} maxFileSize - Maximum file size in bytes\n */\nexport interface FlowUploadZoneProps {\n /**\n * Flow configuration\n */\n flowConfig: FlowUploadConfig;\n\n /**\n * Additional flow upload options\n */\n options?: Omit<FlowUploadOptions, \"flowConfig\">;\n\n /**\n * Accepted file types (single MIME type or extension string)\n */\n accept?: string;\n\n /**\n * Whether to allow multiple files (currently only single file supported for flow uploads)\n */\n multiple?: boolean;\n\n /**\n * Whether the upload zone is disabled\n */\n disabled?: boolean;\n\n /**\n * Maximum file size in bytes\n */\n maxFileSize?: number;\n}\n\nconst props = withDefaults(defineProps<FlowUploadZoneProps>(), {\n multiple: false,\n disabled: false,\n});\n\n// biome-ignore lint/suspicious/noExplicitAny: Flow result can be any type\nconst emit = defineEmits<{\n // biome-ignore lint/suspicious/noExplicitAny: Flow result can be any type\n \"upload-complete\": [result: any];\n \"upload-error\": [error: Error];\n \"upload-start\": [file: File];\n \"validation-error\": [errors: string[]];\n}>();\n\n// biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\ndefineSlots<{\n // biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\n default(props: {\n isDragging: boolean;\n isOver: boolean;\n isUploading: boolean;\n isProcessing: boolean;\n progress: number;\n status: string;\n errors: string[];\n openFilePicker: () => void;\n }): any;\n}>();\n\n// Initialize flow upload\nconst flowUpload = useFlowUpload({\n ...props.options,\n flowConfig: props.flowConfig,\n onFlowComplete: (outputs) => {\n emit(\"upload-complete\", outputs);\n props.options?.onFlowComplete?.(outputs);\n },\n onError: (error) => {\n emit(\"upload-error\", error);\n props.options?.onError?.(error);\n },\n});\n\n// Handle files received from drag-drop or file picker\nconst handleFilesReceived = (files: File[]) => {\n const file = files[0];\n if (file) {\n emit(\"upload-start\", file);\n flowUpload.upload(file);\n }\n};\n\n// Handle validation errors\nconst handleValidationError = (errors: string[]) => {\n emit(\"validation-error\", errors);\n};\n\n// Initialize drag-drop\nconst dragDrop = useDragDrop({\n accept: props.accept ? [props.accept] : undefined,\n multiple: props.multiple,\n maxFileSize: props.maxFileSize,\n onFilesReceived: handleFilesReceived,\n onValidationError: handleValidationError,\n});\n\n// File input ref\nconst fileInputRef = ref<HTMLInputElement>();\n\n// Open file picker\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst openFilePicker = () => {\n if (!props.disabled) {\n fileInputRef.value?.click();\n }\n};\n\n// Computed states\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isActive = computed(\n () => dragDrop.state.value.isDragging || dragDrop.state.value.isOver,\n);\n</script>\n\n<template>\n <div\n class=\"flow-upload-zone\"\n :class=\"{\n 'flow-upload-zone--active': isActive,\n 'flow-upload-zone--disabled': disabled,\n 'flow-upload-zone--uploading': flowUpload.isUploading.value\n }\"\n @dragenter=\"!disabled && dragDrop.onDragEnter\"\n @dragover=\"!disabled && dragDrop.onDragOver\"\n @dragleave=\"!disabled && dragDrop.onDragLeave\"\n @drop=\"!disabled && dragDrop.onDrop\"\n @click=\"openFilePicker\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled\"\n aria-label=\"Upload file with flow processing\"\n @keydown.enter=\"openFilePicker\"\n @keydown.space.prevent=\"openFilePicker\"\n >\n <slot\n :is-dragging=\"dragDrop.state.value.isDragging\"\n :is-over=\"dragDrop.state.value.isOver\"\n :is-uploading=\"flowUpload.isUploading.value\"\n :is-processing=\"flowUpload.isProcessing.value\"\n :progress=\"flowUpload.state.value.progress\"\n :status=\"flowUpload.state.value.status\"\n :errors=\"[...dragDrop.state.value.errors]\"\n :open-file-picker=\"openFilePicker\"\n >\n <!-- Default slot content -->\n <div class=\"flow-upload-zone__content\">\n <p v-if=\"dragDrop.state.value.isDragging\">Drop file here...</p>\n <p v-else-if=\"flowUpload.isUploading.value\">\n Uploading... {{ flowUpload.state.value.progress }}%\n </p>\n <p v-else-if=\"flowUpload.isProcessing.value\">\n Processing...\n <span v-if=\"flowUpload.state.value.currentNodeName\">\n ({{ flowUpload.state.value.currentNodeName }})\n </span>\n </p>\n <p v-else-if=\"flowUpload.state.value.status === 'success'\">Upload complete!</p>\n <p v-else-if=\"flowUpload.state.value.status === 'error'\" class=\"flow-upload-zone__error\">\n Error: {{ flowUpload.state.value.error?.message }}\n </p>\n <p v-else>Drag a file here or click to select</p>\n\n <div v-if=\"flowUpload.isUploading.value\" class=\"flow-upload-zone__progress\">\n <div class=\"flow-upload-zone__progress-bar\">\n <div\n class=\"flow-upload-zone__progress-fill\"\n :style=\"{ width: `${flowUpload.state.value.progress}%` }\"\n />\n </div>\n </div>\n\n <div v-if=\"dragDrop.state.value.errors.length > 0\" class=\"flow-upload-zone__errors\">\n <p v-for=\"(error, index) in dragDrop.state.value.errors\" :key=\"index\">\n {{ error }}\n </p>\n </div>\n </div>\n </slot>\n\n <input\n ref=\"fileInputRef\"\n type=\"file\"\n :multiple=\"dragDrop.inputProps.value.multiple\"\n :accept=\"dragDrop.inputProps.value.accept\"\n :disabled=\"disabled\"\n @change=\"dragDrop.onInputChange\"\n style=\"display: none\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n\n<style scoped>\n.flow-upload-zone {\n cursor: pointer;\n user-select: none;\n}\n\n.flow-upload-zone--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.flow-upload-zone--uploading {\n pointer-events: none;\n}\n\n.flow-upload-zone__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n\n.flow-upload-zone__error {\n color: #dc3545;\n}\n\n.flow-upload-zone__progress {\n width: 100%;\n max-width: 300px;\n margin-top: 0.5rem;\n}\n\n.flow-upload-zone__progress-bar {\n width: 100%;\n height: 0.5rem;\n background-color: #e0e0e0;\n border-radius: 0.25rem;\n overflow: hidden;\n}\n\n.flow-upload-zone__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.flow-upload-zone__errors {\n margin-top: 0.5rem;\n color: #dc3545;\n font-size: 0.875rem;\n}\n\n.flow-upload-zone__errors p {\n margin: 0.25rem 0;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * UploadList - Display a list of uploads with customizable status grouping and sorting\n *\n * Shows the progress and status of multiple file uploads. Supports filtering, sorting,\n * and status-based grouping. Provides flexible slot-based customization for rendering each item.\n *\n * @component\n * @example\n * // Basic upload list\n * <UploadList :uploads=\"uploads\" />\n *\n * @example\n * // Custom item rendering with status indicators\n * <UploadList :uploads=\"uploads\">\n * <template #item=\"{ item, isSuccess, isError }\">\n * <div class=\"upload-item\">\n * <span>{{ item.filename }}</span>\n * <progress :value=\"item.progress\" max=\"100\"></progress>\n * <span :class=\"{ success: isSuccess, error: isError }\">\n * {{ item.state.status }}\n * </span>\n * </div>\n * </template>\n * </UploadList>\n *\n * @example\n * // With filtering and sorting\n * <UploadList\n * :uploads=\"uploads\"\n * :filter=\"item => item.state.status === 'success'\"\n * :sort-by=\"(a, b) => a.uploadedAt - b.uploadedAt\"\n * />\n */\nimport { computed } from \"vue\";\nimport type { UploadItem } from \"../composables\";\nimport { isBrowserFile } from \"../utils\";\n\n/**\n * Props for the UploadList component\n * @property {UploadItem[]} uploads - Array of upload items to display\n * @property {Function} filter - Optional filter for which items to display\n * @property {Function} sortBy - Optional sorting function for items (a, b) => number\n */\nexport interface UploadListProps {\n /**\n * Array of upload items to display\n */\n uploads: UploadItem[];\n\n /**\n * Optional filter for which items to display\n */\n filter?: (item: UploadItem) => boolean;\n\n /**\n * Optional sorting function for items\n */\n sortBy?: (a: UploadItem, b: UploadItem) => number;\n}\n\nconst props = defineProps<UploadListProps>();\n\ndefineSlots<{\n item(props: {\n item: UploadItem;\n index: number;\n isUploading: boolean;\n isSuccess: boolean;\n isError: boolean;\n formatFileSize: (bytes: number) => string;\n }): any;\n default?(props: {\n items: UploadItem[];\n itemsByStatus: {\n idle: UploadItem[];\n uploading: UploadItem[];\n success: UploadItem[];\n error: UploadItem[];\n aborted: UploadItem[];\n };\n }): any;\n}>();\n\n// Apply filtering and sorting\nconst filteredItems = computed(() => {\n let items = props.uploads;\n\n if (props.filter) {\n items = items.filter(props.filter);\n }\n\n if (props.sortBy) {\n items = [...items].sort(props.sortBy);\n }\n\n return items;\n});\n\n// Group items by status\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst itemsByStatus = computed(() => ({\n idle: filteredItems.value.filter((item) => item.state.status === \"idle\"),\n uploading: filteredItems.value.filter(\n (item) => item.state.status === \"uploading\",\n ),\n success: filteredItems.value.filter(\n (item) => item.state.status === \"success\",\n ),\n error: filteredItems.value.filter((item) => item.state.status === \"error\"),\n aborted: filteredItems.value.filter(\n (item) => item.state.status === \"aborted\",\n ),\n}));\n\n// Helper function to format file sizes\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\n// Helper function to get status icon\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusIcon = (status: string): string => {\n switch (status) {\n case \"idle\":\n return \"⏳\";\n case \"uploading\":\n return \"📤\";\n case \"success\":\n return \"✅\";\n case \"error\":\n return \"❌\";\n case \"aborted\":\n return \"⏹️\";\n default:\n return \"❓\";\n }\n};\n\n// Helper function to get status color\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusColor = (status: string): string => {\n switch (status) {\n case \"idle\":\n return \"#6c757d\";\n case \"uploading\":\n return \"#007bff\";\n case \"success\":\n return \"#28a745\";\n case \"error\":\n return \"#dc3545\";\n case \"aborted\":\n return \"#6c757d\";\n default:\n return \"#6c757d\";\n }\n};\n</script>\n\n<template>\n <div class=\"upload-list\">\n <slot :items=\"filteredItems\" :items-by-status=\"itemsByStatus\">\n <!-- Default rendering: simple list of upload items -->\n <div\n v-for=\"(item, index) in filteredItems\"\n :key=\"item.id\"\n class=\"upload-list__item\"\n :class=\"`upload-list__item--${item.state.status}`\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :is-uploading=\"item.state.status === 'uploading'\"\n :is-success=\"item.state.status === 'success'\"\n :is-error=\"item.state.status === 'error'\"\n :format-file-size=\"formatFileSize\"\n >\n <!-- Default item template -->\n <div class=\"upload-list__item-header\">\n <span class=\"upload-list__item-icon\">\n {{ getStatusIcon(item.state.status) }}\n </span>\n <span class=\"upload-list__item-name\">\n {{ isBrowserFile(item.file) ? item.file.name : 'File' }}\n </span>\n <span\n class=\"upload-list__item-status\"\n :style=\"{ color: getStatusColor(item.state.status) }\"\n >\n {{ item.state.status.toUpperCase() }}\n </span>\n </div>\n\n <div v-if=\"item.state.totalBytes\" class=\"upload-list__item-size\">\n {{ formatFileSize(item.state.totalBytes) }}\n </div>\n\n <div v-if=\"item.state.status === 'uploading'\" class=\"upload-list__item-progress\">\n <div class=\"upload-list__progress-bar\">\n <div\n class=\"upload-list__progress-fill\"\n :style=\"{ width: `${item.state.progress}%` }\"\n />\n </div>\n <span class=\"upload-list__progress-text\">{{ item.state.progress }}%</span>\n </div>\n\n <div v-if=\"item.state.status === 'error' && item.state.error\" class=\"upload-list__item-error\">\n {{ item.state.error.message }}\n </div>\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.upload-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.upload-list__item {\n padding: 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 0.375rem;\n background-color: #fff;\n}\n\n.upload-list__item-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.upload-list__item-icon {\n font-size: 1rem;\n}\n\n.upload-list__item-name {\n flex: 1;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.upload-list__item-status {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.upload-list__item-size {\n font-size: 0.75rem;\n color: #666;\n margin-bottom: 0.5rem;\n}\n\n.upload-list__item-progress {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.upload-list__progress-bar {\n flex: 1;\n height: 0.375rem;\n background-color: #e0e0e0;\n border-radius: 0.1875rem;\n overflow: hidden;\n}\n\n.upload-list__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.upload-list__progress-text {\n font-size: 0.75rem;\n color: #666;\n min-width: 3rem;\n text-align: right;\n}\n\n.upload-list__item-error {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #f8d7da;\n color: #721c24;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * UploadZone - A flexible file upload component with drag-and-drop support\n *\n * Provides a drag-and-drop zone and file picker for uploading files. Supports both single\n * and multiple file uploads with validation. Emits events for file selection and upload events.\n *\n * @component\n * @example\n * // Basic single file upload\n * <UploadZone @file-select=\"handleFiles\" />\n *\n * @example\n * // Multiple files with validation\n * <UploadZone\n * multiple\n * accept={[\"image/*\"]}\n * :max-file-size=\"10 * 1024 * 1024\"\n * @file-select=\"handleFiles\"\n * @validation-error=\"handleErrors\"\n * >\n * <template #default=\"{ isDragging, errors, openFilePicker }\">\n * <div :class=\"{ dragging: isDragging }\" @click=\"openFilePicker\">\n * <p>{{ isDragging ? 'Drop files here' : 'Click or drag files here' }}</p>\n * <div v-if=\"errors.length\">\n * <p v-for=\"error in errors\" :key=\"error\">{{ error }}</p>\n * </div>\n * </div>\n * </template>\n * </UploadZone>\n *\n * @emits file-select - When files are selected/dropped\n * @emits upload-start - When upload begins\n * @emits validation-error - When validation fails\n */\nimport type { UploadOptions } from \"@uploadista/client-browser\";\nimport { computed, ref } from \"vue\";\nimport type { MultiUploadOptions } from \"../composables\";\nimport { useDragDrop, useMultiUpload, useUpload } from \"../composables\";\n\n/**\n * Props for the UploadZone component\n * @property {string[]} accept - Accepted file types (MIME types or file extensions)\n * @property {boolean} multiple - Whether to allow multiple files (default: true)\n * @property {boolean} disabled - Whether the upload zone is disabled (default: false)\n * @property {number} maxFileSize - Maximum file size in bytes\n * @property {Function} validator - Custom validation function for files\n * @property {MultiUploadOptions} multiUploadOptions - Multi-upload options (only used when multiple=true)\n * @property {UploadOptions} uploadOptions - Single upload options (only used when multiple=false)\n */\nexport interface UploadZoneProps {\n /**\n * Accepted file types (MIME types or file extensions)\n */\n accept?: string[];\n\n /**\n * Whether to allow multiple files\n */\n multiple?: boolean;\n\n /**\n * Whether the upload zone is disabled\n */\n disabled?: boolean;\n\n /**\n * Maximum file size in bytes\n */\n maxFileSize?: number;\n\n /**\n * Custom validation function for files\n */\n validator?: (files: File[]) => string[] | null;\n\n /**\n * Multi-upload options (only used when multiple=true)\n */\n multiUploadOptions?: MultiUploadOptions;\n\n /**\n * Single upload options (only used when multiple=false)\n */\n uploadOptions?: UploadOptions;\n}\n\nconst props = withDefaults(defineProps<UploadZoneProps>(), {\n multiple: true,\n disabled: false,\n});\n\nconst emit = defineEmits<{\n \"file-select\": [files: File[]];\n \"upload-start\": [files: File[]];\n \"validation-error\": [errors: string[]];\n}>();\n\ndefineSlots<{\n // biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\n default(props: {\n isDragging: boolean;\n isOver: boolean;\n isUploading: boolean;\n errors: string[];\n openFilePicker: () => void;\n }): any;\n}>();\n\n// Initialize upload composables\nconst singleUpload = props.multiple\n ? null\n : useUpload(props.uploadOptions || {});\nconst multiUpload = props.multiple\n ? useMultiUpload(props.multiUploadOptions || {})\n : null;\n\n// Handle files received from drag-drop or file picker\nconst handleFilesReceived = (files: File[]) => {\n emit(\"file-select\", files);\n emit(\"upload-start\", files);\n\n if (props.multiple && multiUpload) {\n multiUpload.addFiles(files);\n setTimeout(() => multiUpload.startAll(), 0);\n } else if (!props.multiple && singleUpload && files[0]) {\n singleUpload.upload(files[0]);\n }\n};\n\n// Handle validation errors\nconst handleValidationError = (errors: string[]) => {\n emit(\"validation-error\", errors);\n};\n\n// Initialize drag-drop\nconst dragDrop = useDragDrop({\n accept: props.accept,\n multiple: props.multiple,\n maxFileSize: props.maxFileSize,\n validator: props.validator,\n onFilesReceived: handleFilesReceived,\n onValidationError: handleValidationError,\n});\n\n// File input ref\nconst fileInputRef = ref<HTMLInputElement>();\n\n// Open file picker\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst openFilePicker = () => {\n if (!props.disabled) {\n fileInputRef.value?.click();\n }\n};\n\n// Computed states\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isActive = computed(\n () => dragDrop.state.value.isDragging || dragDrop.state.value.isOver,\n);\n\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isUploading = computed(() => {\n if (props.multiple && multiUpload) {\n return multiUpload.state.value.isUploading;\n } else if (!props.multiple && singleUpload) {\n return singleUpload.state.value.status === \"uploading\";\n }\n return false;\n});\n</script>\n\n<template>\n <div\n class=\"upload-zone\"\n :class=\"{ 'upload-zone--active': isActive, 'upload-zone--disabled': disabled }\"\n @dragenter=\"!disabled && dragDrop.onDragEnter\"\n @dragover=\"!disabled && dragDrop.onDragOver\"\n @dragleave=\"!disabled && dragDrop.onDragLeave\"\n @drop=\"!disabled && dragDrop.onDrop\"\n @click=\"openFilePicker\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled\"\n :aria-label=\"multiple ? 'Upload multiple files' : 'Upload a file'\"\n @keydown.enter=\"openFilePicker\"\n @keydown.space.prevent=\"openFilePicker\"\n >\n <slot\n :is-dragging=\"dragDrop.state.value.isDragging\"\n :is-over=\"dragDrop.state.value.isOver\"\n :is-uploading=\"isUploading\"\n :errors=\"[...dragDrop.state.value.errors]\"\n :open-file-picker=\"openFilePicker\"\n >\n <!-- Default slot content -->\n <div class=\"upload-zone__content\">\n <p v-if=\"dragDrop.state.value.isDragging\">\n {{ multiple ? 'Drop files here...' : 'Drop file here...' }}\n </p>\n <p v-else>\n {{ multiple ? 'Drag files here or click to select' : 'Drag a file here or click to select' }}\n </p>\n\n <div v-if=\"dragDrop.state.value.errors.length > 0\" class=\"upload-zone__errors\">\n <p v-for=\"(error, index) in dragDrop.state.value.errors\" :key=\"index\">\n {{ error }}\n </p>\n </div>\n </div>\n </slot>\n\n <input\n ref=\"fileInputRef\"\n type=\"file\"\n :multiple=\"dragDrop.inputProps.value.multiple\"\n :accept=\"dragDrop.inputProps.value.accept\"\n :disabled=\"disabled\"\n @change=\"dragDrop.onInputChange\"\n style=\"display: none\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n\n<style scoped>\n.upload-zone {\n cursor: pointer;\n user-select: none;\n}\n\n.upload-zone--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.upload-zone__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.upload-zone__errors {\n margin-top: 0.5rem;\n color: #dc3545;\n font-size: 0.875rem;\n}\n\n.upload-zone__errors p {\n margin: 0.25rem 0;\n}\n</style>\n"],"mappings":"4lCAyEA,IAAM,EAAQ,EA0BR,EAAgB,MAAe,CACnC,IAAI,EAAQ,EAAM,QAUlB,OARI,EAAM,SACR,EAAQ,EAAM,OAAO,EAAM,OAAM,EAG/B,EAAM,SACR,EAAQ,CAAC,GAAG,EAAK,CAAE,KAAK,EAAM,OAAM,EAG/B,GACR,CAIK,EAAgB,OA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,eAAT,EAAA,EAAA,CAAS,cAAa,GAAA,EAAA,CAC/B,MAAA,CAAA,QAAA,OAAA,CACA,cAAY,OAAA,CAAA,KAAA,GAAA,GAAA,CAAA,CAAA,GAAA,EAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as DragDropState, D as UploadistaPluginOptions, O as createUploadistaPlugin, S as DragDropOptions, T as UPLOADISTA_CLIENT_KEY, _ as useUpload, a as useUploadistaClient, b as FlowUploadStatus, c as UploadItem, d as PerformanceInsights, f as UploadInput, g as UploadStatus, h as UploadState, i as UseUploadistaClientReturn, l as useMultiUpload, m as UploadSessionMetrics, n as UseUploadMetricsOptions, o as MultiUploadOptions, p as UploadMetrics, r as useUploadMetrics, s as MultiUploadState, t as FileUploadMetrics, u as ChunkMetrics, v as useMultiFlowUpload, w as useDragDrop, x as useFlowUpload, y as FlowUploadState } from "../index-
|
|
1
|
+
import { C as DragDropState, D as UploadistaPluginOptions, O as createUploadistaPlugin, S as DragDropOptions, T as UPLOADISTA_CLIENT_KEY, _ as useUpload, a as useUploadistaClient, b as FlowUploadStatus, c as UploadItem, d as PerformanceInsights, f as UploadInput, g as UploadStatus, h as UploadState, i as UseUploadistaClientReturn, l as useMultiUpload, m as UploadSessionMetrics, n as UseUploadMetricsOptions, o as MultiUploadOptions, p as UploadMetrics, r as useUploadMetrics, s as MultiUploadState, t as FileUploadMetrics, u as ChunkMetrics, v as useMultiFlowUpload, w as useDragDrop, x as useFlowUpload, y as FlowUploadState } from "../index-DclpVCup.mjs";
|
|
2
2
|
export { ChunkMetrics, DragDropOptions, DragDropState, FileUploadMetrics, FlowUploadState, FlowUploadStatus, MultiUploadOptions, MultiUploadState, PerformanceInsights, UPLOADISTA_CLIENT_KEY, UploadInput, UploadItem, UploadMetrics, UploadSessionMetrics, UploadState, UploadStatus, UploadistaPluginOptions, UseUploadMetricsOptions, UseUploadistaClientReturn, createUploadistaPlugin, useDragDrop, useFlowUpload, useMultiFlowUpload, useMultiUpload, useUpload, useUploadMetrics, useUploadistaClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BmoqlSiN.d.mts","names":[],"sources":["../src/providers/UploadistaProvider.vue"],"sourcesContent":[],"mappings":";;;;KAiFK,WAAA;;;EAAA,kBAAW,CAAA,EAAA,MAOM;
|
|
1
|
+
{"version":3,"file":"index-BmoqlSiN.d.mts","names":[],"sources":["../src/providers/UploadistaProvider.vue"],"sourcesContent":[],"mappings":";;;;KAiFK,WAAA;;;EAAA,kBAAW,CAAA,EAAA,MAOM;EA6ElB,SAAA,CAAkB,EAAA,MAAA;EACjB,eAAW,CAAA,EAAA,MAAA;EAKV,2BAIJ,CAAA,EAAA,OAAA;EAJc,OAAA,CAAA,EAAA,CAAA,KAAA,EAnFM,eAmFN,EAAA,GAAA,IAAA;CAAA;YANZ,OAMY,EAAA,CAAA,CAAA;KALX,WAAA;2BACwB;;cAIvB,kBAAU,gBAAA,6BAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA;;;;;EAAA,kBAAA,EAAA,MAAA;EAKV,SAAA,EAAA,MAAoE;EAAxB,SAAA,EAAA,MAAA;EAAY,eAAA,EAAA,MAAA;EAAnC,2BAAA,EAAA,OAAA;CAAe,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,iCAAA,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;AAAA,cAApC,YACkC,EADb,eACa,CAAA,OADU,UACV,EADsB,WACtB,CAAA;AAAxC,cAD0C,QAYtB,EAAA,OAXQ,YAajB;KAFN,wBAAwB;;YAEnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as UploadItem, o as MultiUploadOptions } from "./index-
|
|
1
|
+
import { c as UploadItem, o as MultiUploadOptions } from "./index-DclpVCup.mjs";
|
|
2
2
|
import * as vue28 from "vue";
|
|
3
3
|
import { BrowserUploadInput, FlowUploadConfig, FlowUploadItem, FlowUploadOptions, UploadOptions } from "@uploadista/client-browser";
|
|
4
4
|
|
|
@@ -251,4 +251,4 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
251
251
|
|
|
252
252
|
//#endregion
|
|
253
253
|
export { _default as i, _default$2 as n, _default$1 as r, _default$3 as t };
|
|
254
|
-
//# sourceMappingURL=index-
|
|
254
|
+
//# sourceMappingURL=index-DWCWRN8W.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DWCWRN8W.d.mts","names":[],"sources":["../src/components/FlowUploadList.vue","../src/components/FlowUploadZone.vue","../src/components/UploadList.vue","../src/components/UploadZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA+pBgB;;;;AAG0B,UAtRzB,mBAAA,CAsRyB;EAAA;AAC1C;;WAnRW,eAAe;;ACxC1B;;EASiB,MAAA,CAAA,EAAA,CAAA,IAAA,EDoCC,cCpCD,CDoCgB,kBCpChB,CAAA,EAAA,GAAA,OAAA;EAAL;;AAqBX;EA+RK,MAAA,CAAA,EAAA,CAAA,CAAA,ED1QC,cC8QL,CD9QoB,kBC8QpB,CAAA,EAAA,CAAA,ED7QK,cC6QL,CD7QoB,kBC6QpB,CAAA,EAAA,GAAA,MAAA;;KDtQG,aAAA,GCkQW;EAAA,IAAA,CAAA,KAAA,EAAA;UDhQN,eAAe;;;;;;;;;SCgQT,EAAA,KAAA,EAAA;IAAA,KAAA,EDtPL,cCsPK,CDtPU,kBCsPV,CAAA,EAAA;IAKV,aAAoE,EAAA;MAAxB,OAAA,EDzPnC,cCyPmC,CDzPpB,kBCyPoB,CAAA,EAAA;MAAY,SAAA,EDxP7C,cCwP6C,CDxP9B,kBCwP8B,CAAA,EAAA;MAAnC,OAAA,EDvPZ,cCuPY,CDvPG,kBCuPH,CAAA,EAAA;MAAe,KAAA,EDtP7B,cCsP6B,CDtPd,kBCsPc,CAAA,EAAA;MAAA,OACF,EDtPzB,cCsPa,CDtPE,k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GAAA,CAAA;cCuLT,YDvLmB,ECuLE,eDvLF,CAAA,OCuLyB,UDvLzB,ECuLqC,WDvLrC,CAAA;AAAA,cCuLiB,UDmCxC,EAAA,OClC0B,YDkC1B;KCvBG,eDqBW,CAAA,CAAA,EAAA,CAAA,CAAA,GCrBa,CDqBb,GAAA;EAAA,MAAA,EAAA;IAAA,MAAA,ECnBN,CDmBM;EAAA,CAAA;CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue1 from "vue";
|
|
2
2
|
import { App, InjectionKey, Ref } from "vue";
|
|
3
3
|
import * as _uploadista_client_browser0 from "@uploadista/client-browser";
|
|
4
4
|
import { BrowserUploadInput, FlowUploadConfig, MultiFlowUploadOptions, UploadOptions, UploadistaClientOptions, UploadistaEvent, createUploadistaClient } from "@uploadista/client-browser";
|
|
@@ -172,7 +172,7 @@ interface DragDropState {
|
|
|
172
172
|
* ```
|
|
173
173
|
*/
|
|
174
174
|
declare function useDragDrop(options?: DragDropOptions): {
|
|
175
|
-
state: Readonly<
|
|
175
|
+
state: Readonly<vue1.Ref<{
|
|
176
176
|
readonly isDragging: boolean;
|
|
177
177
|
readonly isOver: boolean;
|
|
178
178
|
readonly isValid: boolean;
|
|
@@ -188,7 +188,7 @@ declare function useDragDrop(options?: DragDropOptions): {
|
|
|
188
188
|
onDragLeave: (event: DragEvent) => void;
|
|
189
189
|
onDrop: (event: DragEvent) => void;
|
|
190
190
|
onInputChange: (event: Event) => void;
|
|
191
|
-
inputProps:
|
|
191
|
+
inputProps: vue1.ComputedRef<{
|
|
192
192
|
type: "file";
|
|
193
193
|
multiple: boolean;
|
|
194
194
|
accept: string | undefined;
|
|
@@ -287,13 +287,13 @@ interface UseFlowUploadOptions<TOutput = UploadFile> {
|
|
|
287
287
|
* ```
|
|
288
288
|
*/
|
|
289
289
|
declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptions<TOutput>): {
|
|
290
|
-
state: Readonly<
|
|
290
|
+
state: Readonly<vue1.Ref<{
|
|
291
291
|
readonly status: FlowUploadStatus;
|
|
292
292
|
readonly progress: number;
|
|
293
293
|
readonly bytesUploaded: number;
|
|
294
294
|
readonly totalBytes: number | null;
|
|
295
295
|
readonly error: Error | null;
|
|
296
|
-
readonly result:
|
|
296
|
+
readonly result: vue1.DeepReadonly<vue1.UnwrapRef<TOutput>> | null;
|
|
297
297
|
readonly jobId: string | null;
|
|
298
298
|
readonly flowStarted: boolean;
|
|
299
299
|
readonly currentNodeName: string | null;
|
|
@@ -307,7 +307,7 @@ declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptio
|
|
|
307
307
|
readonly bytesUploaded: number;
|
|
308
308
|
readonly totalBytes: number | null;
|
|
309
309
|
readonly error: Error | null;
|
|
310
|
-
readonly result:
|
|
310
|
+
readonly result: vue1.DeepReadonly<vue1.UnwrapRef<TOutput>> | null;
|
|
311
311
|
readonly jobId: string | null;
|
|
312
312
|
readonly flowStarted: boolean;
|
|
313
313
|
readonly currentNodeName: string | null;
|
|
@@ -319,9 +319,9 @@ declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptio
|
|
|
319
319
|
upload: (file: File | Blob) => Promise<void>;
|
|
320
320
|
abort: () => void;
|
|
321
321
|
reset: () => void;
|
|
322
|
-
isUploading:
|
|
323
|
-
isUploadingFile:
|
|
324
|
-
isProcessing:
|
|
322
|
+
isUploading: vue1.ComputedRef<boolean>;
|
|
323
|
+
isUploadingFile: vue1.ComputedRef<boolean>;
|
|
324
|
+
isProcessing: vue1.ComputedRef<boolean>;
|
|
325
325
|
};
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/composables/useMultiFlowUpload.d.ts
|
|
@@ -375,7 +375,7 @@ declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptio
|
|
|
375
375
|
* ```
|
|
376
376
|
*/
|
|
377
377
|
declare function useMultiFlowUpload(options: MultiFlowUploadOptions<BrowserUploadInput>): {
|
|
378
|
-
state: Readonly<
|
|
378
|
+
state: Readonly<vue1.Ref<{
|
|
379
379
|
readonly items: readonly {
|
|
380
380
|
readonly id: string;
|
|
381
381
|
readonly file: {
|
|
@@ -412,6 +412,11 @@ declare function useMultiFlowUpload(options: MultiFlowUploadOptions<BrowserUploa
|
|
|
412
412
|
readonly path?: string | undefined | undefined;
|
|
413
413
|
readonly uploadId?: string | undefined | undefined;
|
|
414
414
|
readonly bucket?: string | undefined | undefined;
|
|
415
|
+
readonly parts?: readonly {
|
|
416
|
+
readonly partNumber: number;
|
|
417
|
+
readonly etag: string;
|
|
418
|
+
readonly size: number;
|
|
419
|
+
}[] | undefined;
|
|
415
420
|
};
|
|
416
421
|
readonly flow?: {
|
|
417
422
|
readonly flowId: string;
|
|
@@ -471,6 +476,11 @@ declare function useMultiFlowUpload(options: MultiFlowUploadOptions<BrowserUploa
|
|
|
471
476
|
readonly path?: string | undefined | undefined;
|
|
472
477
|
readonly uploadId?: string | undefined | undefined;
|
|
473
478
|
readonly bucket?: string | undefined | undefined;
|
|
479
|
+
readonly parts?: readonly {
|
|
480
|
+
readonly partNumber: number;
|
|
481
|
+
readonly etag: string;
|
|
482
|
+
readonly size: number;
|
|
483
|
+
}[] | undefined;
|
|
474
484
|
};
|
|
475
485
|
readonly flow?: {
|
|
476
486
|
readonly flowId: string;
|
|
@@ -501,7 +511,7 @@ declare function useMultiFlowUpload(options: MultiFlowUploadOptions<BrowserUploa
|
|
|
501
511
|
abortAll: () => void;
|
|
502
512
|
clear: () => void;
|
|
503
513
|
retryUpload: (id: string) => void;
|
|
504
|
-
isUploading:
|
|
514
|
+
isUploading: vue1.ComputedRef<boolean>;
|
|
505
515
|
};
|
|
506
516
|
//#endregion
|
|
507
517
|
//#region src/composables/useUpload.d.ts
|
|
@@ -582,7 +592,7 @@ interface UploadMetrics {
|
|
|
582
592
|
* ```
|
|
583
593
|
*/
|
|
584
594
|
declare function useUpload(options?: UploadOptions): {
|
|
585
|
-
state: Readonly<
|
|
595
|
+
state: Readonly<vue1.Ref<{
|
|
586
596
|
readonly status: UploadStatus;
|
|
587
597
|
readonly progress: number;
|
|
588
598
|
readonly bytesUploaded: number;
|
|
@@ -597,6 +607,11 @@ declare function useUpload(options?: UploadOptions): {
|
|
|
597
607
|
readonly path?: string | undefined | undefined;
|
|
598
608
|
readonly uploadId?: string | undefined | undefined;
|
|
599
609
|
readonly bucket?: string | undefined | undefined;
|
|
610
|
+
readonly parts?: readonly {
|
|
611
|
+
readonly partNumber: number;
|
|
612
|
+
readonly etag: string;
|
|
613
|
+
readonly size: number;
|
|
614
|
+
}[] | undefined;
|
|
600
615
|
};
|
|
601
616
|
readonly flow?: {
|
|
602
617
|
readonly flowId: string;
|
|
@@ -628,6 +643,11 @@ declare function useUpload(options?: UploadOptions): {
|
|
|
628
643
|
readonly path?: string | undefined | undefined;
|
|
629
644
|
readonly uploadId?: string | undefined | undefined;
|
|
630
645
|
readonly bucket?: string | undefined | undefined;
|
|
646
|
+
readonly parts?: readonly {
|
|
647
|
+
readonly partNumber: number;
|
|
648
|
+
readonly etag: string;
|
|
649
|
+
readonly size: number;
|
|
650
|
+
}[] | undefined;
|
|
631
651
|
};
|
|
632
652
|
readonly flow?: {
|
|
633
653
|
readonly flowId: string;
|
|
@@ -649,8 +669,8 @@ declare function useUpload(options?: UploadOptions): {
|
|
|
649
669
|
abort: () => void;
|
|
650
670
|
reset: () => void;
|
|
651
671
|
retry: () => void;
|
|
652
|
-
isUploading:
|
|
653
|
-
canRetry:
|
|
672
|
+
isUploading: vue1.ComputedRef<boolean>;
|
|
673
|
+
canRetry: vue1.ComputedRef<boolean>;
|
|
654
674
|
metrics: UploadMetrics;
|
|
655
675
|
};
|
|
656
676
|
//#endregion
|
|
@@ -793,7 +813,7 @@ interface MultiUploadState {
|
|
|
793
813
|
* ```
|
|
794
814
|
*/
|
|
795
815
|
declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
796
|
-
state: Readonly<
|
|
816
|
+
state: Readonly<vue1.Ref<{
|
|
797
817
|
readonly total: number;
|
|
798
818
|
readonly completed: number;
|
|
799
819
|
readonly successful: number;
|
|
@@ -816,7 +836,7 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
816
836
|
readonly isUploading: boolean;
|
|
817
837
|
readonly isComplete: boolean;
|
|
818
838
|
}>>;
|
|
819
|
-
items: Readonly<
|
|
839
|
+
items: Readonly<vue1.Ref<readonly {
|
|
820
840
|
readonly id: string;
|
|
821
841
|
readonly file: {
|
|
822
842
|
readonly lastModified: number;
|
|
@@ -853,6 +873,11 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
853
873
|
readonly path?: string | undefined | undefined;
|
|
854
874
|
readonly uploadId?: string | undefined | undefined;
|
|
855
875
|
readonly bucket?: string | undefined | undefined;
|
|
876
|
+
readonly parts?: readonly {
|
|
877
|
+
readonly partNumber: number;
|
|
878
|
+
readonly etag: string;
|
|
879
|
+
readonly size: number;
|
|
880
|
+
}[] | undefined;
|
|
856
881
|
};
|
|
857
882
|
readonly flow?: {
|
|
858
883
|
readonly flowId: string;
|
|
@@ -907,6 +932,11 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
907
932
|
readonly path?: string | undefined | undefined;
|
|
908
933
|
readonly uploadId?: string | undefined | undefined;
|
|
909
934
|
readonly bucket?: string | undefined | undefined;
|
|
935
|
+
readonly parts?: readonly {
|
|
936
|
+
readonly partNumber: number;
|
|
937
|
+
readonly etag: string;
|
|
938
|
+
readonly size: number;
|
|
939
|
+
}[] | undefined;
|
|
910
940
|
};
|
|
911
941
|
readonly flow?: {
|
|
912
942
|
readonly flowId: string;
|
|
@@ -972,6 +1002,11 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
972
1002
|
path?: string | undefined | undefined;
|
|
973
1003
|
uploadId?: string | undefined | undefined;
|
|
974
1004
|
bucket?: string | undefined | undefined;
|
|
1005
|
+
parts?: {
|
|
1006
|
+
partNumber: number;
|
|
1007
|
+
etag: string;
|
|
1008
|
+
size: number;
|
|
1009
|
+
}[] | undefined;
|
|
975
1010
|
};
|
|
976
1011
|
flow?: {
|
|
977
1012
|
flowId: string;
|
|
@@ -1304,7 +1339,7 @@ interface UseUploadMetricsOptions {
|
|
|
1304
1339
|
* ```
|
|
1305
1340
|
*/
|
|
1306
1341
|
declare function useUploadMetrics(options?: UseUploadMetricsOptions): {
|
|
1307
|
-
metrics: Readonly<
|
|
1342
|
+
metrics: Readonly<vue1.Ref<{
|
|
1308
1343
|
readonly totalBytesUploaded: number;
|
|
1309
1344
|
readonly totalBytes: number;
|
|
1310
1345
|
readonly averageSpeed: number;
|
|
@@ -1343,7 +1378,7 @@ declare function useUploadMetrics(options?: UseUploadMetricsOptions): {
|
|
|
1343
1378
|
}[];
|
|
1344
1379
|
readonly chunkMetrics: readonly any[];
|
|
1345
1380
|
}>>;
|
|
1346
|
-
fileMetrics: Readonly<
|
|
1381
|
+
fileMetrics: Readonly<vue1.Ref<readonly {
|
|
1347
1382
|
readonly id: string;
|
|
1348
1383
|
readonly filename: string;
|
|
1349
1384
|
readonly size: number;
|
|
@@ -1419,4 +1454,4 @@ declare function useUploadMetrics(options?: UseUploadMetricsOptions): {
|
|
|
1419
1454
|
};
|
|
1420
1455
|
//#endregion
|
|
1421
1456
|
export { DragDropState as C, UploadistaPluginOptions as D, UPLOADISTA_EVENT_SUBSCRIBERS_KEY as E, createUploadistaPlugin as O, DragDropOptions as S, UPLOADISTA_CLIENT_KEY as T, useUpload as _, useUploadistaClient as a, FlowUploadStatus as b, UploadItem as c, PerformanceInsights as d, UploadInput as f, UploadStatus as g, UploadState as h, UseUploadistaClientReturn as i, useMultiUpload as l, UploadSessionMetrics as m, UseUploadMetricsOptions as n, MultiUploadOptions as o, UploadMetrics as p, useUploadMetrics as r, MultiUploadState as s, FileUploadMetrics as t, ChunkMetrics as u, useMultiFlowUpload as v, useDragDrop as w, useFlowUpload as x, FlowUploadState as y };
|
|
1422
|
-
//# sourceMappingURL=index-
|
|
1457
|
+
//# sourceMappingURL=index-DclpVCup.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DclpVCup.d.mts","names":[],"sources":["../src/composables/plugin.ts","../src/composables/useDragDrop.ts","../src/composables/useFlowUpload.ts","../src/composables/useMultiFlowUpload.ts","../src/composables/useUpload.ts","../src/composables/useMultiUpload.ts","../src/composables/useUploadistaClient.ts","../src/composables/useUploadMetrics.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAQiB,uBAAA,SAAgC;;;;YAIrC;;cAGC,uBAAuB,aAClC,kBAAkB;AARH,cAWJ,gCAPD,EAOmC,YAXE,CAY/C,GAZ+C,CAY3C,GAZ2C,CAAA,CAAA,KAAA,EAY/B,eAZsD,EAAA,GAAA,IAAA,CAAA,CAAA,CAAA;AAOxE;;;;;AAIA;;;;;;AAiCA;;;;AClDA;AA0CA;AAmGA;;;;;;;;;;;;iBD3FgB,sBAAA,UAAgC;eAE/B;;;;UCpDA,eAAA;;;;;;;;;EDMA;AAOjB;;EACE,WAAA,CAAA,EAAA,MAAA;EADkC;;AAIpC;EACkB,QAAA,CAAA,EAAA,OAAA;EAAZ;;;EADqD,SAAA,CAAA,EAAA,CAAA,KAAA,ECOrC,IDPqC,EAAA,EAAA,GAAA,MAAA,EAAA,GAAA,IAAA;EAiC3C;;;4BCrBY;EA7BX;AA0CjB;AAmGA;EAAqC,iBAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,EAAA,GAAA,IAAA;EAAoB;;;EAgI5B,iBAAA,CAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,GAAA,IAAA;;AAsBJ,UAzPR,aAAA,CAyPQ;EAgBO;;;EA1FG,UAAA,EAAA,OAAA;;;;EChMvB,MAAA,EAAA,OAAA;EAQK;;;EAKR,OAAA,EAAA,OAAA;EACC;;;EAUO,MAAA,EAAA,MAAA,EAAA;;;;;;;;AAwGjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChGA;;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,SAAA,YAAA,EAAA,MAAA;IApCF,SAAA,YAAA,EAAA,MAAA;IAAI,SAAA,sBAAA,EAAA,MAAA,GAAA,IAAA;IAyCG,SAAA,UAAgB,EAAA,MAAA;IAgHjB,SAAA,cAAc,EAAA,MAAA;IAAU,SAAA,aAAA,EAAA,MAAA;IAAuB,SAAA,QAAA,EAAA,MAAA;;;;;uBE3FnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IFwSe,QAAA,EAAA,MAAA,GAAA,IAAA;IA4IS,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;gBEpbxB;sBAKM,QAAQ;oBAKV;;;;;;;;;;MDzDA,OAAA,EAAA,MAAmB,GAAA,IAAA;MAAA,QAAA,EAAA,MAAA,GAAA,IAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "./index-
|
|
2
|
-
import { C as DragDropState, D as UploadistaPluginOptions, E as UPLOADISTA_EVENT_SUBSCRIBERS_KEY, O as createUploadistaPlugin, S as DragDropOptions, T as UPLOADISTA_CLIENT_KEY, _ as useUpload, a as useUploadistaClient, b as FlowUploadStatus, c as UploadItem, d as PerformanceInsights, f as UploadInput, g as UploadStatus, h as UploadState, i as UseUploadistaClientReturn, l as useMultiUpload, m as UploadSessionMetrics, n as UseUploadMetricsOptions, o as MultiUploadOptions, p as UploadMetrics, r as useUploadMetrics, s as MultiUploadState, t as FileUploadMetrics, u as ChunkMetrics, v as useMultiFlowUpload, w as useDragDrop, x as useFlowUpload, y as FlowUploadState } from "./index-
|
|
1
|
+
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "./index-DWCWRN8W.mjs";
|
|
2
|
+
import { C as DragDropState, D as UploadistaPluginOptions, E as UPLOADISTA_EVENT_SUBSCRIBERS_KEY, O as createUploadistaPlugin, S as DragDropOptions, T as UPLOADISTA_CLIENT_KEY, _ as useUpload, a as useUploadistaClient, b as FlowUploadStatus, c as UploadItem, d as PerformanceInsights, f as UploadInput, g as UploadStatus, h as UploadState, i as UseUploadistaClientReturn, l as useMultiUpload, m as UploadSessionMetrics, n as UseUploadMetricsOptions, o as MultiUploadOptions, p as UploadMetrics, r as useUploadMetrics, s as MultiUploadState, t as FileUploadMetrics, u as ChunkMetrics, v as useMultiFlowUpload, w as useDragDrop, x as useFlowUpload, y as FlowUploadState } from "./index-DclpVCup.mjs";
|
|
3
3
|
import { t as _default$4 } from "./index-BmoqlSiN.mjs";
|
|
4
4
|
import { a as formatSpeed, c as isAudioFile, d as isVideoFile, f as revokeFilePreview, i as formatFileSize, l as isDocumentFile, m as isBrowserFile, n as createFilePreview, o as generateUploadId, p as validateFileType, r as formatDuration, s as getFileExtension, t as calculateProgress, u as isImageFile } from "./index-CwuMGgQY.mjs";
|
|
5
5
|
export { ChunkMetrics, DragDropOptions, DragDropState, FileUploadMetrics, _default as FlowUploadList, FlowUploadState, FlowUploadStatus, _default$1 as FlowUploadZone, MultiUploadOptions, MultiUploadState, PerformanceInsights, UPLOADISTA_CLIENT_KEY, UPLOADISTA_EVENT_SUBSCRIBERS_KEY, UploadInput, UploadItem, _default$2 as UploadList, UploadMetrics, UploadSessionMetrics, UploadState, UploadStatus, _default$3 as UploadZone, UploadistaPluginOptions, _default$4 as UploadistaProvider, UseUploadMetricsOptions, UseUploadistaClientReturn, calculateProgress, createFilePreview, createUploadistaPlugin, formatDuration, formatFileSize, formatSpeed, generateUploadId, getFileExtension, isAudioFile, isBrowserFile, isDocumentFile, isImageFile, isVideoFile, revokeFilePreview, useDragDrop, useFlowUpload, useMultiFlowUpload, useMultiUpload, useUpload, useUploadMetrics, useUploadistaClient, validateFileType };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./utils-BSoozMHK.mjs";import{i as m,n as h,r as g,t as _}from"./components-
|
|
1
|
+
import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./utils-BSoozMHK.mjs";import{i as m,n as h,r as g,t as _}from"./components-PKZ6tZdQ.mjs";import{n as v,r as y,t as b}from"./plugin-HH1lTjcq.mjs";import{a as x,i as S,n as C,o as w,r as T,s as E,t as D}from"./composables-Biblh8X9.mjs";import{t as O}from"./providers-W-v9skqN.mjs";export{m as FlowUploadList,g as FlowUploadZone,b as UPLOADISTA_CLIENT_KEY,v as UPLOADISTA_EVENT_SUBSCRIBERS_KEY,h as UploadList,_ as UploadZone,O as UploadistaProvider,f as calculateProgress,s as createFilePreview,y as createUploadistaPlugin,u as formatDuration,i as formatFileSize,e as formatSpeed,c as generateUploadId,d as getFileExtension,t as isAudioFile,o as isBrowserFile,a as isDocumentFile,p as isImageFile,n as isVideoFile,r as revokeFilePreview,E as useDragDrop,x as useFlowUpload,S as useMultiFlowUpload,T as useMultiUpload,C as useUpload,D as useUploadMetrics,w as useUploadistaClient,l as validateFileType};
|
package/dist/providers/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../plugin-HH1lTjcq.mjs";import{t as e}from"../providers-
|
|
1
|
+
import"../plugin-HH1lTjcq.mjs";import{t as e}from"../providers-W-v9skqN.mjs";export{e as UploadistaProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{n as e,t}from"./plugin-HH1lTjcq.mjs";import{defineComponent as n,onBeforeUnmount as r,provide as i,ref as a,renderSlot as o}from"vue";import{createUploadistaClient as s}from"@uploadista/client-browser";var c=n({__name:`UploadistaProvider`,props:{serverUrl:{},storageId:{default:`local`},uploadistaBasePath:{default:`uploadista`},chunkSize:{default:1024*1024},parallelUploads:{default:1},storeFingerprintForResuming:{type:Boolean,default:!0},onEvent:{}},emits:[`event`],setup(n,{emit:c}){let l=n,u=c,d=a(new Set),f=s({baseUrl:l.serverUrl,storageId:l.storageId,uploadistaBasePath:l.uploadistaBasePath,chunkSize:l.chunkSize,parallelUploads:l.parallelUploads,storeFingerprintForResuming:l.storeFingerprintForResuming,onEvent:e=>{d.value.forEach(t=>{t(e)}),l.onEvent?.(e),u(`event`,e)}});return i(t,f),i(e,d),r(()=>{f.closeAllWebSockets()}),(e,t)=>o(e.$slots,`default`)}});export{c as t};
|
|
2
|
-
//# sourceMappingURL=providers-
|
|
2
|
+
//# sourceMappingURL=providers-W-v9skqN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers-W-v9skqN.mjs","names":[],"sources":["../src/providers/UploadistaProvider.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createUploadistaClient,\n type UploadistaEvent,\n} from \"@uploadista/client-browser\";\nimport { onBeforeUnmount, provide, ref } from \"vue\";\nimport {\n UPLOADISTA_CLIENT_KEY,\n UPLOADISTA_EVENT_SUBSCRIBERS_KEY,\n} from \"../composables/plugin\";\n\nconst props = withDefaults(\n defineProps<{\n serverUrl: string;\n storageId?: string;\n uploadistaBasePath?: string;\n chunkSize?: number;\n parallelUploads?: number;\n storeFingerprintForResuming?: boolean;\n onEvent?: (event: UploadistaEvent) => void;\n }>(),\n {\n storageId: \"local\",\n uploadistaBasePath: \"uploadista\",\n chunkSize: 1024 * 1024,\n parallelUploads: 1,\n storeFingerprintForResuming: true,\n },\n);\n\nconst emit = defineEmits<{\n /**\n * Emitted when the underlying client dispatches an event.\n */\n (e: \"event\", event: UploadistaEvent): void;\n}>();\n\n// Create a shared set of event subscribers\nconst eventSubscribers = ref(new Set<(event: UploadistaEvent) => void>());\n\nconst client = createUploadistaClient({\n baseUrl: props.serverUrl,\n storageId: props.storageId,\n uploadistaBasePath: props.uploadistaBasePath,\n chunkSize: props.chunkSize,\n parallelUploads: props.parallelUploads,\n storeFingerprintForResuming: props.storeFingerprintForResuming,\n onEvent: (event) => {\n // Dispatch to all subscribers registered via subscribeToEvents\n eventSubscribers.value.forEach((subscriber) => {\n subscriber(event);\n });\n\n props.onEvent?.(event);\n emit(\"event\", event);\n },\n});\n\nprovide(UPLOADISTA_CLIENT_KEY, client);\nprovide(UPLOADISTA_EVENT_SUBSCRIBERS_KEY, eventSubscribers);\n\nonBeforeUnmount(() => {\n client.closeAllWebSockets();\n});\n</script>\n\n<template>\n <slot />\n</template>\n"],"mappings":"8eAWA,IAAM,EAAQ,EAmBR,EAAO,EAQP,EAAmB,EAAI,IAAI,IAAuC,CAElE,EAAS,EAAuB,CACpC,QAAS,EAAM,UACf,UAAW,EAAM,UACjB,mBAAoB,EAAM,mBAC1B,UAAW,EAAM,UACjB,gBAAiB,EAAM,gBACvB,4BAA6B,EAAM,4BACnC,QAAU,GAAU,CAElB,EAAiB,MAAM,QAAS,GAAe,CAC7C,EAAW,EAAK,EACjB,CAED,EAAM,UAAU,EAAK,CACrB,EAAK,QAAS,EAAK,EAEtB,CAAA,QAED,EAAQ,EAAuB,EAAM,CACrC,EAAQ,EAAkC,EAAgB,CAE1D,MAAsB,CACpB,EAAO,oBAAmB,EAC3B,QAIC,EAAQ,EAAA,OAAA,UAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uploadista/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"description": "Vue client for Uploadista",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Uploadista",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"vue": "^3.3.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@uploadista/client-browser": "0.0.
|
|
35
|
-
"@uploadista/core": "0.0.
|
|
34
|
+
"@uploadista/client-browser": "0.0.10",
|
|
35
|
+
"@uploadista/core": "0.0.10"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@vue/test-utils": "^2.4.6",
|
|
39
|
-
"tsdown": "0.
|
|
39
|
+
"tsdown": "0.16.0",
|
|
40
40
|
"unplugin-vue": "^7.0.2",
|
|
41
|
-
"vitest": "4.0.
|
|
41
|
+
"vitest": "4.0.7",
|
|
42
42
|
"vue": "^3.5.0",
|
|
43
|
-
"vue-tsc": "3.1.
|
|
44
|
-
"@uploadista/typescript-config": "0.0.
|
|
43
|
+
"vue-tsc": "3.1.3",
|
|
44
|
+
"@uploadista/typescript-config": "0.0.10"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsdown",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{m as e}from"./utils-BSoozMHK.mjs";import{a as t,n,r,s as i}from"./composables-Biblh8X9.mjs";import{Fragment as a,computed as o,createCommentVNode as s,createElementBlock as c,createElementVNode as l,createTextVNode as u,defineComponent as d,normalizeClass as f,normalizeStyle as p,openBlock as m,ref as h,renderList as g,renderSlot as _,toDisplayString as v,unref as y,withKeys as b,withModifiers as x}from"vue";const S={class:`flow-upload-list`},C={class:`flow-upload-list__item-header`},w={class:`flow-upload-list__item-icon`},T={class:`flow-upload-list__item-name`},E={class:`flow-upload-list__item-details`},D={class:`flow-upload-list__item-size`},O={key:0,class:`flow-upload-list__item-job`},ee={key:0,class:`flow-upload-list__item-progress`},k={class:`flow-upload-list__progress-bar`},A={class:`flow-upload-list__progress-text`},j={key:1,class:`flow-upload-list__item-error`},M={key:2,class:`flow-upload-list__item-success`};var N=d({__name:`FlowUploadList`,props:{uploads:{},filter:{type:Function},sortBy:{type:Function}},setup(t){let n=t,r=o(()=>{let e=n.uploads;return n.filter&&(e=e.filter(n.filter)),n.sortBy&&(e=[...e].sort(n.sortBy)),e}),i=o(()=>({pending:r.value.filter(e=>e.status===`pending`),uploading:r.value.filter(e=>e.status===`uploading`),success:r.value.filter(e=>e.status===`success`),error:r.value.filter(e=>e.status===`error`),aborted:r.value.filter(e=>e.status===`aborted`)})),u=e=>{if(e===0)return`0 Bytes`;let t=1024,n=[`Bytes`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(2))} ${n[r]}`},d=e=>{switch(e){case`pending`:return`⏳`;case`uploading`:return`📤`;case`success`:return`✅`;case`error`:return`❌`;case`aborted`:return`⏹️`;default:return`❓`}},h=e=>{switch(e){case`pending`:return`#6c757d`;case`uploading`:return`#007bff`;case`success`:return`#28a745`;case`error`:return`#dc3545`;case`aborted`:return`#6c757d`;default:return`#6c757d`}};return(t,n)=>(m(),c(`div`,S,[_(t.$slots,`default`,{items:r.value,itemsByStatus:i.value},()=>[s(` Default rendering: simple list of flow upload items `),(m(!0),c(a,null,g(r.value,(n,r)=>(m(),c(`div`,{key:n.id,class:f([`flow-upload-list__item`,`flow-upload-list__item--${n.status}`])},[_(t.$slots,`item`,{item:n,index:r,isPending:n.status===`pending`,isUploading:n.status===`uploading`,isSuccess:n.status===`success`,isError:n.status===`error`,isAborted:n.status===`aborted`,formatFileSize:u},()=>[s(` Default item template `),l(`div`,C,[l(`span`,w,v(d(n.status)),1),l(`span`,T,v(y(e)(n.file)?n.file.name:`File`),1),l(`span`,{class:`flow-upload-list__item-status`,style:p({color:h(n.status)})},v(n.status.toUpperCase()),5)]),l(`div`,E,[l(`span`,D,v(u(n.totalBytes)),1),n.jobId?(m(),c(`span`,O,` Job: `+v(n.jobId.slice(0,8))+`... `,1)):s(`v-if`,!0)]),n.status===`uploading`?(m(),c(`div`,ee,[l(`div`,k,[l(`div`,{class:`flow-upload-list__progress-fill`,style:p({width:`${n.progress}%`})},null,4)]),l(`span`,A,v(n.progress)+`% • `+v(u(n.bytesUploaded))+` / `+v(u(n.totalBytes)),1)])):s(`v-if`,!0),n.status===`error`&&n.error?(m(),c(`div`,j,v(n.error.message),1)):s(`v-if`,!0),n.status===`success`?(m(),c(`div`,M,` Upload complete `)):s(`v-if`,!0)],!0)],2))),128))],!0)]))}}),P=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},F=P(N,[[`__scopeId`,`data-v-eabb787d`]]);const I=[`tabindex`,`aria-disabled`,`onKeydown`],L={class:`flow-upload-zone__content`},R={key:0},z={key:1},B={key:2},V={key:0},H={key:3},U={key:4,class:`flow-upload-zone__error`},W={key:5},te={key:6,class:`flow-upload-zone__progress`},G={class:`flow-upload-zone__progress-bar`},K={key:7,class:`flow-upload-zone__errors`},q=[`multiple`,`accept`,`disabled`];var J=P(d({__name:`FlowUploadZone`,props:{flowConfig:{},options:{},accept:{},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxFileSize:{}},emits:[`upload-complete`,`upload-error`,`upload-start`,`validation-error`],setup(e,{emit:n}){let r=e,d=n,S=t({...r.options,flowConfig:r.flowConfig,onFlowComplete:e=>{d(`upload-complete`,e),r.options?.onFlowComplete?.(e)},onError:e=>{d(`upload-error`,e),r.options?.onError?.(e)}}),C=i({accept:r.accept?[r.accept]:void 0,multiple:r.multiple,maxFileSize:r.maxFileSize,onFilesReceived:e=>{let t=e[0];t&&(d(`upload-start`,t),S.upload(t))},onValidationError:e=>{d(`validation-error`,e)}}),w=h(),T=()=>{r.disabled||w.value?.click()},E=o(()=>C.state.value.isDragging||C.state.value.isOver);return(t,n)=>(m(),c(`div`,{class:f([`flow-upload-zone`,{"flow-upload-zone--active":E.value,"flow-upload-zone--disabled":e.disabled,"flow-upload-zone--uploading":y(S).isUploading.value}]),onDragenter:n[1]||=t=>!e.disabled&&y(C).onDragEnter,onDragover:n[2]||=t=>!e.disabled&&y(C).onDragOver,onDragleave:n[3]||=t=>!e.disabled&&y(C).onDragLeave,onDrop:n[4]||=t=>!e.disabled&&y(C).onDrop,onClick:T,role:`button`,tabindex:e.disabled?-1:0,"aria-disabled":e.disabled,"aria-label":`Upload file with flow processing`,onKeydown:[b(T,[`enter`]),b(x(T,[`prevent`]),[`space`])]},[_(t.$slots,`default`,{isDragging:y(C).state.value.isDragging,isOver:y(C).state.value.isOver,isUploading:y(S).isUploading.value,isProcessing:y(S).isProcessing.value,progress:y(S).state.value.progress,status:y(S).state.value.status,errors:[...y(C).state.value.errors],openFilePicker:T},()=>[s(` Default slot content `),l(`div`,L,[y(C).state.value.isDragging?(m(),c(`p`,R,`Drop file here...`)):y(S).isUploading.value?(m(),c(`p`,z,` Uploading... `+v(y(S).state.value.progress)+`% `,1)):y(S).isProcessing.value?(m(),c(`p`,B,[n[5]||=u(` Processing... `,-1),y(S).state.value.currentNodeName?(m(),c(`span`,V,` (`+v(y(S).state.value.currentNodeName)+`) `,1)):s(`v-if`,!0)])):y(S).state.value.status===`success`?(m(),c(`p`,H,`Upload complete!`)):y(S).state.value.status===`error`?(m(),c(`p`,U,` Error: `+v(y(S).state.value.error?.message),1)):(m(),c(`p`,W,`Drag a file here or click to select`)),y(S).isUploading.value?(m(),c(`div`,te,[l(`div`,G,[l(`div`,{class:`flow-upload-zone__progress-fill`,style:p({width:`${y(S).state.value.progress}%`})},null,4)])])):s(`v-if`,!0),y(C).state.value.errors.length>0?(m(),c(`div`,K,[(m(!0),c(a,null,g(y(C).state.value.errors,(e,t)=>(m(),c(`p`,{key:t},v(e),1))),128))])):s(`v-if`,!0)])],!0),l(`input`,{ref_key:`fileInputRef`,ref:w,type:`file`,multiple:y(C).inputProps.value.multiple,accept:y(C).inputProps.value.accept,disabled:e.disabled,onChange:n[0]||=(...e)=>y(C).onInputChange&&y(C).onInputChange(...e),style:{display:`none`},"aria-hidden":`true`},null,40,q)],42,I))}}),[[`__scopeId`,`data-v-e6d6e2c2`]]);const Y={class:`upload-list`},X={class:`upload-list__item-header`},Z={class:`upload-list__item-icon`},Q={class:`upload-list__item-name`},ne={key:0,class:`upload-list__item-size`},re={key:1,class:`upload-list__item-progress`},ie={class:`upload-list__progress-bar`},ae={class:`upload-list__progress-text`},oe={key:2,class:`upload-list__item-error`};var $=P(d({__name:`UploadList`,props:{uploads:{},filter:{type:Function},sortBy:{type:Function}},setup(t){let n=t,r=o(()=>{let e=n.uploads;return n.filter&&(e=e.filter(n.filter)),n.sortBy&&(e=[...e].sort(n.sortBy)),e}),i=o(()=>({idle:r.value.filter(e=>e.state.status===`idle`),uploading:r.value.filter(e=>e.state.status===`uploading`),success:r.value.filter(e=>e.state.status===`success`),error:r.value.filter(e=>e.state.status===`error`),aborted:r.value.filter(e=>e.state.status===`aborted`)})),u=e=>{if(e===0)return`0 Bytes`;let t=1024,n=[`Bytes`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(2))} ${n[r]}`},d=e=>{switch(e){case`idle`:return`⏳`;case`uploading`:return`📤`;case`success`:return`✅`;case`error`:return`❌`;case`aborted`:return`⏹️`;default:return`❓`}},h=e=>{switch(e){case`idle`:return`#6c757d`;case`uploading`:return`#007bff`;case`success`:return`#28a745`;case`error`:return`#dc3545`;case`aborted`:return`#6c757d`;default:return`#6c757d`}};return(t,n)=>(m(),c(`div`,Y,[_(t.$slots,`default`,{items:r.value,itemsByStatus:i.value},()=>[s(` Default rendering: simple list of upload items `),(m(!0),c(a,null,g(r.value,(n,r)=>(m(),c(`div`,{key:n.id,class:f([`upload-list__item`,`upload-list__item--${n.state.status}`])},[_(t.$slots,`item`,{item:n,index:r,isUploading:n.state.status===`uploading`,isSuccess:n.state.status===`success`,isError:n.state.status===`error`,formatFileSize:u},()=>[s(` Default item template `),l(`div`,X,[l(`span`,Z,v(d(n.state.status)),1),l(`span`,Q,v(y(e)(n.file)?n.file.name:`File`),1),l(`span`,{class:`upload-list__item-status`,style:p({color:h(n.state.status)})},v(n.state.status.toUpperCase()),5)]),n.state.totalBytes?(m(),c(`div`,ne,v(u(n.state.totalBytes)),1)):s(`v-if`,!0),n.state.status===`uploading`?(m(),c(`div`,re,[l(`div`,ie,[l(`div`,{class:`upload-list__progress-fill`,style:p({width:`${n.state.progress}%`})},null,4)]),l(`span`,ae,v(n.state.progress)+`%`,1)])):s(`v-if`,!0),n.state.status===`error`&&n.state.error?(m(),c(`div`,oe,v(n.state.error.message),1)):s(`v-if`,!0)],!0)],2))),128))],!0)]))}}),[[`__scopeId`,`data-v-70c8fe1a`]]);const se=[`tabindex`,`aria-disabled`,`aria-label`,`onKeydown`],ce={class:`upload-zone__content`},le={key:0},ue={key:1},de={key:2,class:`upload-zone__errors`},fe=[`multiple`,`accept`,`disabled`];var pe=P(d({__name:`UploadZone`,props:{accept:{},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},maxFileSize:{},validator:{},multiUploadOptions:{},uploadOptions:{}},emits:[`file-select`,`upload-start`,`validation-error`],setup(e,{emit:t}){let u=e,d=t,p=u.multiple?null:n(u.uploadOptions||{}),S=u.multiple?r(u.multiUploadOptions||{}):null,C=i({accept:u.accept,multiple:u.multiple,maxFileSize:u.maxFileSize,validator:u.validator,onFilesReceived:e=>{d(`file-select`,e),d(`upload-start`,e),u.multiple&&S?(S.addFiles(e),setTimeout(()=>S.startAll(),0)):!u.multiple&&p&&e[0]&&p.upload(e[0])},onValidationError:e=>{d(`validation-error`,e)}}),w=h(),T=()=>{u.disabled||w.value?.click()},E=o(()=>C.state.value.isDragging||C.state.value.isOver),D=o(()=>u.multiple&&S?S.state.value.isUploading:!u.multiple&&p?p.state.value.status===`uploading`:!1);return(t,n)=>(m(),c(`div`,{class:f([`upload-zone`,{"upload-zone--active":E.value,"upload-zone--disabled":e.disabled}]),onDragenter:n[1]||=t=>!e.disabled&&y(C).onDragEnter,onDragover:n[2]||=t=>!e.disabled&&y(C).onDragOver,onDragleave:n[3]||=t=>!e.disabled&&y(C).onDragLeave,onDrop:n[4]||=t=>!e.disabled&&y(C).onDrop,onClick:T,role:`button`,tabindex:e.disabled?-1:0,"aria-disabled":e.disabled,"aria-label":e.multiple?`Upload multiple files`:`Upload a file`,onKeydown:[b(T,[`enter`]),b(x(T,[`prevent`]),[`space`])]},[_(t.$slots,`default`,{isDragging:y(C).state.value.isDragging,isOver:y(C).state.value.isOver,isUploading:D.value,errors:[...y(C).state.value.errors],openFilePicker:T},()=>[s(` Default slot content `),l(`div`,ce,[y(C).state.value.isDragging?(m(),c(`p`,le,v(e.multiple?`Drop files here...`:`Drop file here...`),1)):(m(),c(`p`,ue,v(e.multiple?`Drag files here or click to select`:`Drag a file here or click to select`),1)),y(C).state.value.errors.length>0?(m(),c(`div`,de,[(m(!0),c(a,null,g(y(C).state.value.errors,(e,t)=>(m(),c(`p`,{key:t},v(e),1))),128))])):s(`v-if`,!0)])],!0),l(`input`,{ref_key:`fileInputRef`,ref:w,type:`file`,multiple:y(C).inputProps.value.multiple,accept:y(C).inputProps.value.accept,disabled:e.disabled,onChange:n[0]||=(...e)=>y(C).onInputChange&&y(C).onInputChange(...e),style:{display:`none`},"aria-hidden":`true`},null,40,fe)],42,se))}}),[[`__scopeId`,`data-v-8b709bef`]]);export{F as i,$ as n,J as r,pe as t};
|
|
2
|
-
//# sourceMappingURL=components-DjgxUKKp.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components-DjgxUKKp.mjs","names":[],"sources":["../src/components/FlowUploadList.vue","../src/components/FlowUploadList.vue","../src/components/FlowUploadZone.vue","../src/components/FlowUploadZone.vue","../src/components/UploadList.vue","../src/components/UploadList.vue","../src/components/UploadZone.vue","../src/components/UploadZone.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * FlowUploadList - Display list of flow uploads with processing status\n *\n * Shows the progress and processing status of files being uploaded through flow pipelines.\n * Supports filtering, sorting, and status-based grouping. Provides flexible slot-based\n * customization for rendering each flow upload item.\n *\n * @component\n * @example\n * // Basic flow upload list\n * <FlowUploadList :uploads=\"flowUploads\" />\n *\n * @example\n * // Custom item rendering with flow status\n * <FlowUploadList :uploads=\"flowUploads\">\n * <template #item=\"{ item, isSuccess, isError, isUploading }\">\n * <div class=\"flow-item\">\n * <span>{{ item.filename }}</span>\n * <progress :value=\"item.uploadProgress\" max=\"100\"></progress>\n * <span v-if=\"isUploading\">Processing...</span>\n * <span v-else-if=\"isSuccess\">Complete</span>\n * <span v-else-if=\"isError\">Failed</span>\n * </div>\n * </template>\n * </FlowUploadList>\n *\n * @example\n * // With status grouping\n * <FlowUploadList :uploads=\"flowUploads\">\n * <template #default=\"{ itemsByStatus }\">\n * <div v-if=\"itemsByStatus.uploading.length\">\n * <h3>Uploading...</h3>\n * <div v-for=\"item of itemsByStatus.uploading\" :key=\"item.id\">\n * {{ item.filename }}\n * </div>\n * </div>\n * </template>\n * </FlowUploadList>\n */\nimport type {\n BrowserUploadInput,\n FlowUploadItem,\n} from \"@uploadista/client-browser\";\nimport { computed } from \"vue\";\nimport { isBrowserFile } from \"../utils\";\n\n/**\n * Props for the FlowUploadList component\n * @property {FlowUploadItem[]} uploads - Array of flow upload items to display\n * @property {Function} filter - Optional filter for which items to display\n * @property {Function} sortBy - Optional sorting function for items (a, b) => number\n */\nexport interface FlowUploadListProps {\n /**\n * Array of flow upload items to display\n */\n uploads: FlowUploadItem<BrowserUploadInput>[];\n\n /**\n * Optional filter for which items to display\n */\n filter?: (item: FlowUploadItem<BrowserUploadInput>) => boolean;\n\n /**\n * Optional sorting function for items\n */\n sortBy?: (\n a: FlowUploadItem<BrowserUploadInput>,\n b: FlowUploadItem<BrowserUploadInput>,\n ) => number;\n}\n\nconst props = defineProps<FlowUploadListProps>();\n\ndefineSlots<{\n item(props: {\n item: FlowUploadItem<BrowserUploadInput>;\n index: number;\n isPending: boolean;\n isUploading: boolean;\n isSuccess: boolean;\n isError: boolean;\n isAborted: boolean;\n formatFileSize: (bytes: number) => string;\n }): any;\n default?(props: {\n items: FlowUploadItem<BrowserUploadInput>[];\n itemsByStatus: {\n pending: FlowUploadItem<BrowserUploadInput>[];\n uploading: FlowUploadItem<BrowserUploadInput>[];\n success: FlowUploadItem<BrowserUploadInput>[];\n error: FlowUploadItem<BrowserUploadInput>[];\n aborted: FlowUploadItem<BrowserUploadInput>[];\n };\n }): any;\n}>();\n\n// Apply filtering and sorting\nconst filteredItems = computed(() => {\n let items = props.uploads;\n\n if (props.filter) {\n items = items.filter(props.filter);\n }\n\n if (props.sortBy) {\n items = [...items].sort(props.sortBy);\n }\n\n return items;\n});\n\n// Group items by status\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst itemsByStatus = computed(() => ({\n pending: filteredItems.value.filter((item) => item.status === \"pending\"),\n uploading: filteredItems.value.filter((item) => item.status === \"uploading\"),\n success: filteredItems.value.filter((item) => item.status === \"success\"),\n error: filteredItems.value.filter((item) => item.status === \"error\"),\n aborted: filteredItems.value.filter((item) => item.status === \"aborted\"),\n}));\n\n// Helper function to format file sizes\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\n// Helper function to get status icon\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusIcon = (status: string): string => {\n switch (status) {\n case \"pending\":\n return \"⏳\";\n case \"uploading\":\n return \"📤\";\n case \"success\":\n return \"✅\";\n case \"error\":\n return \"❌\";\n case \"aborted\":\n return \"⏹️\";\n default:\n return \"❓\";\n }\n};\n\n// Helper function to get status color\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusColor = (status: string): string => {\n switch (status) {\n case \"pending\":\n return \"#6c757d\";\n case \"uploading\":\n return \"#007bff\";\n case \"success\":\n return \"#28a745\";\n case \"error\":\n return \"#dc3545\";\n case \"aborted\":\n return \"#6c757d\";\n default:\n return \"#6c757d\";\n }\n};\n</script>\n\n<template>\n <div class=\"flow-upload-list\">\n <slot :items=\"filteredItems\" :items-by-status=\"itemsByStatus\">\n <!-- Default rendering: simple list of flow upload items -->\n <div\n v-for=\"(item, index) in filteredItems\"\n :key=\"item.id\"\n class=\"flow-upload-list__item\"\n :class=\"`flow-upload-list__item--${item.status}`\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :is-pending=\"item.status === 'pending'\"\n :is-uploading=\"item.status === 'uploading'\"\n :is-success=\"item.status === 'success'\"\n :is-error=\"item.status === 'error'\"\n :is-aborted=\"item.status === 'aborted'\"\n :format-file-size=\"formatFileSize\"\n >\n <!-- Default item template -->\n <div class=\"flow-upload-list__item-header\">\n <span class=\"flow-upload-list__item-icon\">\n {{ getStatusIcon(item.status) }}\n </span>\n <span class=\"flow-upload-list__item-name\">\n {{ isBrowserFile(item.file) ? item.file.name : 'File' }}\n </span>\n <span\n class=\"flow-upload-list__item-status\"\n :style=\"{ color: getStatusColor(item.status) }\"\n >\n {{ item.status.toUpperCase() }}\n </span>\n </div>\n\n <div class=\"flow-upload-list__item-details\">\n <span class=\"flow-upload-list__item-size\">\n {{ formatFileSize(item.totalBytes) }}\n </span>\n <span v-if=\"item.jobId\" class=\"flow-upload-list__item-job\">\n Job: {{ item.jobId.slice(0, 8) }}...\n </span>\n </div>\n\n <div v-if=\"item.status === 'uploading'\" class=\"flow-upload-list__item-progress\">\n <div class=\"flow-upload-list__progress-bar\">\n <div\n class=\"flow-upload-list__progress-fill\"\n :style=\"{ width: `${item.progress}%` }\"\n />\n </div>\n <span class=\"flow-upload-list__progress-text\">\n {{ item.progress }}% • {{ formatFileSize(item.bytesUploaded) }} / {{ formatFileSize(item.totalBytes) }}\n </span>\n </div>\n\n <div v-if=\"item.status === 'error' && item.error\" class=\"flow-upload-list__item-error\">\n {{ item.error.message }}\n </div>\n\n <div v-if=\"item.status === 'success'\" class=\"flow-upload-list__item-success\">\n Upload complete\n </div>\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.flow-upload-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.flow-upload-list__item {\n padding: 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 0.375rem;\n background-color: #fff;\n}\n\n.flow-upload-list__item-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.flow-upload-list__item-icon {\n font-size: 1rem;\n}\n\n.flow-upload-list__item-name {\n flex: 1;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.flow-upload-list__item-status {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.flow-upload-list__item-details {\n display: flex;\n gap: 1rem;\n font-size: 0.75rem;\n color: #666;\n margin-bottom: 0.5rem;\n}\n\n.flow-upload-list__item-size {\n font-weight: 500;\n}\n\n.flow-upload-list__item-job {\n color: #999;\n font-family: monospace;\n}\n\n.flow-upload-list__item-progress {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n.flow-upload-list__progress-bar {\n width: 100%;\n height: 0.375rem;\n background-color: #e0e0e0;\n border-radius: 0.1875rem;\n overflow: hidden;\n}\n\n.flow-upload-list__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.flow-upload-list__progress-text {\n font-size: 0.75rem;\n color: #666;\n}\n\n.flow-upload-list__item-error {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #f8d7da;\n color: #721c24;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n\n.flow-upload-list__item-success {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #d4edda;\n color: #155724;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * FlowUploadList - Display list of flow uploads with processing status\n *\n * Shows the progress and processing status of files being uploaded through flow pipelines.\n * Supports filtering, sorting, and status-based grouping. Provides flexible slot-based\n * customization for rendering each flow upload item.\n *\n * @component\n * @example\n * // Basic flow upload list\n * <FlowUploadList :uploads=\"flowUploads\" />\n *\n * @example\n * // Custom item rendering with flow status\n * <FlowUploadList :uploads=\"flowUploads\">\n * <template #item=\"{ item, isSuccess, isError, isUploading }\">\n * <div class=\"flow-item\">\n * <span>{{ item.filename }}</span>\n * <progress :value=\"item.uploadProgress\" max=\"100\"></progress>\n * <span v-if=\"isUploading\">Processing...</span>\n * <span v-else-if=\"isSuccess\">Complete</span>\n * <span v-else-if=\"isError\">Failed</span>\n * </div>\n * </template>\n * </FlowUploadList>\n *\n * @example\n * // With status grouping\n * <FlowUploadList :uploads=\"flowUploads\">\n * <template #default=\"{ itemsByStatus }\">\n * <div v-if=\"itemsByStatus.uploading.length\">\n * <h3>Uploading...</h3>\n * <div v-for=\"item of itemsByStatus.uploading\" :key=\"item.id\">\n * {{ item.filename }}\n * </div>\n * </div>\n * </template>\n * </FlowUploadList>\n */\nimport type {\n BrowserUploadInput,\n FlowUploadItem,\n} from \"@uploadista/client-browser\";\nimport { computed } from \"vue\";\nimport { isBrowserFile } from \"../utils\";\n\n/**\n * Props for the FlowUploadList component\n * @property {FlowUploadItem[]} uploads - Array of flow upload items to display\n * @property {Function} filter - Optional filter for which items to display\n * @property {Function} sortBy - Optional sorting function for items (a, b) => number\n */\nexport interface FlowUploadListProps {\n /**\n * Array of flow upload items to display\n */\n uploads: FlowUploadItem<BrowserUploadInput>[];\n\n /**\n * Optional filter for which items to display\n */\n filter?: (item: FlowUploadItem<BrowserUploadInput>) => boolean;\n\n /**\n * Optional sorting function for items\n */\n sortBy?: (\n a: FlowUploadItem<BrowserUploadInput>,\n b: FlowUploadItem<BrowserUploadInput>,\n ) => number;\n}\n\nconst props = defineProps<FlowUploadListProps>();\n\ndefineSlots<{\n item(props: {\n item: FlowUploadItem<BrowserUploadInput>;\n index: number;\n isPending: boolean;\n isUploading: boolean;\n isSuccess: boolean;\n isError: boolean;\n isAborted: boolean;\n formatFileSize: (bytes: number) => string;\n }): any;\n default?(props: {\n items: FlowUploadItem<BrowserUploadInput>[];\n itemsByStatus: {\n pending: FlowUploadItem<BrowserUploadInput>[];\n uploading: FlowUploadItem<BrowserUploadInput>[];\n success: FlowUploadItem<BrowserUploadInput>[];\n error: FlowUploadItem<BrowserUploadInput>[];\n aborted: FlowUploadItem<BrowserUploadInput>[];\n };\n }): any;\n}>();\n\n// Apply filtering and sorting\nconst filteredItems = computed(() => {\n let items = props.uploads;\n\n if (props.filter) {\n items = items.filter(props.filter);\n }\n\n if (props.sortBy) {\n items = [...items].sort(props.sortBy);\n }\n\n return items;\n});\n\n// Group items by status\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst itemsByStatus = computed(() => ({\n pending: filteredItems.value.filter((item) => item.status === \"pending\"),\n uploading: filteredItems.value.filter((item) => item.status === \"uploading\"),\n success: filteredItems.value.filter((item) => item.status === \"success\"),\n error: filteredItems.value.filter((item) => item.status === \"error\"),\n aborted: filteredItems.value.filter((item) => item.status === \"aborted\"),\n}));\n\n// Helper function to format file sizes\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\n// Helper function to get status icon\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusIcon = (status: string): string => {\n switch (status) {\n case \"pending\":\n return \"⏳\";\n case \"uploading\":\n return \"📤\";\n case \"success\":\n return \"✅\";\n case \"error\":\n return \"❌\";\n case \"aborted\":\n return \"⏹️\";\n default:\n return \"❓\";\n }\n};\n\n// Helper function to get status color\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusColor = (status: string): string => {\n switch (status) {\n case \"pending\":\n return \"#6c757d\";\n case \"uploading\":\n return \"#007bff\";\n case \"success\":\n return \"#28a745\";\n case \"error\":\n return \"#dc3545\";\n case \"aborted\":\n return \"#6c757d\";\n default:\n return \"#6c757d\";\n }\n};\n</script>\n\n<template>\n <div class=\"flow-upload-list\">\n <slot :items=\"filteredItems\" :items-by-status=\"itemsByStatus\">\n <!-- Default rendering: simple list of flow upload items -->\n <div\n v-for=\"(item, index) in filteredItems\"\n :key=\"item.id\"\n class=\"flow-upload-list__item\"\n :class=\"`flow-upload-list__item--${item.status}`\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :is-pending=\"item.status === 'pending'\"\n :is-uploading=\"item.status === 'uploading'\"\n :is-success=\"item.status === 'success'\"\n :is-error=\"item.status === 'error'\"\n :is-aborted=\"item.status === 'aborted'\"\n :format-file-size=\"formatFileSize\"\n >\n <!-- Default item template -->\n <div class=\"flow-upload-list__item-header\">\n <span class=\"flow-upload-list__item-icon\">\n {{ getStatusIcon(item.status) }}\n </span>\n <span class=\"flow-upload-list__item-name\">\n {{ isBrowserFile(item.file) ? item.file.name : 'File' }}\n </span>\n <span\n class=\"flow-upload-list__item-status\"\n :style=\"{ color: getStatusColor(item.status) }\"\n >\n {{ item.status.toUpperCase() }}\n </span>\n </div>\n\n <div class=\"flow-upload-list__item-details\">\n <span class=\"flow-upload-list__item-size\">\n {{ formatFileSize(item.totalBytes) }}\n </span>\n <span v-if=\"item.jobId\" class=\"flow-upload-list__item-job\">\n Job: {{ item.jobId.slice(0, 8) }}...\n </span>\n </div>\n\n <div v-if=\"item.status === 'uploading'\" class=\"flow-upload-list__item-progress\">\n <div class=\"flow-upload-list__progress-bar\">\n <div\n class=\"flow-upload-list__progress-fill\"\n :style=\"{ width: `${item.progress}%` }\"\n />\n </div>\n <span class=\"flow-upload-list__progress-text\">\n {{ item.progress }}% • {{ formatFileSize(item.bytesUploaded) }} / {{ formatFileSize(item.totalBytes) }}\n </span>\n </div>\n\n <div v-if=\"item.status === 'error' && item.error\" class=\"flow-upload-list__item-error\">\n {{ item.error.message }}\n </div>\n\n <div v-if=\"item.status === 'success'\" class=\"flow-upload-list__item-success\">\n Upload complete\n </div>\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.flow-upload-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.flow-upload-list__item {\n padding: 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 0.375rem;\n background-color: #fff;\n}\n\n.flow-upload-list__item-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.flow-upload-list__item-icon {\n font-size: 1rem;\n}\n\n.flow-upload-list__item-name {\n flex: 1;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.flow-upload-list__item-status {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.flow-upload-list__item-details {\n display: flex;\n gap: 1rem;\n font-size: 0.75rem;\n color: #666;\n margin-bottom: 0.5rem;\n}\n\n.flow-upload-list__item-size {\n font-weight: 500;\n}\n\n.flow-upload-list__item-job {\n color: #999;\n font-family: monospace;\n}\n\n.flow-upload-list__item-progress {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n.flow-upload-list__progress-bar {\n width: 100%;\n height: 0.375rem;\n background-color: #e0e0e0;\n border-radius: 0.1875rem;\n overflow: hidden;\n}\n\n.flow-upload-list__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.flow-upload-list__progress-text {\n font-size: 0.75rem;\n color: #666;\n}\n\n.flow-upload-list__item-error {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #f8d7da;\n color: #721c24;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n\n.flow-upload-list__item-success {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #d4edda;\n color: #155724;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * FlowUploadZone - Upload zone with flow processing pipeline\n *\n * Specialized upload component that uploads files through a flow pipeline for processing.\n * Supports drag-and-drop and file picker with flow configuration. Emits events for flow\n * completion, errors, and upload status changes.\n *\n * @component\n * @example\n * // Upload images through image processing flow\n * <FlowUploadZone\n * :flow-config=\"{ flowId: 'image-processor' }\"\n * accept=\"image/*\"\n * @upload-complete=\"handleFlowResult\"\n * @upload-error=\"handleError\"\n * />\n *\n * @example\n * // With custom slot content\n * <FlowUploadZone\n * :flow-config=\"{ flowId: 'image-processor' }\"\n * @upload-complete=\"handleResult\"\n * >\n * <template #default=\"{ isDragging, isProcessing, progress }\">\n * <div :class=\"{ processing: isProcessing }\">\n * <p v-if=\"isProcessing\">Processing... {{ progress }}%</p>\n * <p v-else-if=\"isDragging\">Drop file here</p>\n * <p v-else>Drag file here for processing</p>\n * </div>\n * </template>\n * </FlowUploadZone>\n *\n * @emits upload-complete - Flow processing completed with results\n * @emits upload-error - Upload or processing failed\n * @emits upload-start - File upload started\n * @emits validation-error - File validation failed\n */\nimport type {\n FlowUploadConfig,\n FlowUploadOptions,\n} from \"@uploadista/client-browser\";\nimport { computed, ref } from \"vue\";\nimport { useDragDrop, useFlowUpload } from \"../composables\";\n\n/**\n * Props for the FlowUploadZone component\n * @property {FlowUploadConfig} flowConfig - Flow configuration with flowId\n * @property {FlowUploadOptions} options - Additional flow upload options\n * @property {string} accept - Accepted file types (single MIME type or extension string)\n * @property {boolean} multiple - Allow multiple files (default: false, flow uploads are single-file)\n * @property {boolean} disabled - Disable the upload zone (default: false)\n * @property {number} maxFileSize - Maximum file size in bytes\n */\nexport interface FlowUploadZoneProps {\n /**\n * Flow configuration\n */\n flowConfig: FlowUploadConfig;\n\n /**\n * Additional flow upload options\n */\n options?: Omit<FlowUploadOptions, \"flowConfig\">;\n\n /**\n * Accepted file types (single MIME type or extension string)\n */\n accept?: string;\n\n /**\n * Whether to allow multiple files (currently only single file supported for flow uploads)\n */\n multiple?: boolean;\n\n /**\n * Whether the upload zone is disabled\n */\n disabled?: boolean;\n\n /**\n * Maximum file size in bytes\n */\n maxFileSize?: number;\n}\n\nconst props = withDefaults(defineProps<FlowUploadZoneProps>(), {\n multiple: false,\n disabled: false,\n});\n\n// biome-ignore lint/suspicious/noExplicitAny: Flow result can be any type\nconst emit = defineEmits<{\n // biome-ignore lint/suspicious/noExplicitAny: Flow result can be any type\n \"upload-complete\": [result: any];\n \"upload-error\": [error: Error];\n \"upload-start\": [file: File];\n \"validation-error\": [errors: string[]];\n}>();\n\n// biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\ndefineSlots<{\n // biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\n default(props: {\n isDragging: boolean;\n isOver: boolean;\n isUploading: boolean;\n isProcessing: boolean;\n progress: number;\n status: string;\n errors: string[];\n openFilePicker: () => void;\n }): any;\n}>();\n\n// Initialize flow upload\nconst flowUpload = useFlowUpload({\n ...props.options,\n flowConfig: props.flowConfig,\n onFlowComplete: (outputs) => {\n emit(\"upload-complete\", outputs);\n props.options?.onFlowComplete?.(outputs);\n },\n onError: (error) => {\n emit(\"upload-error\", error);\n props.options?.onError?.(error);\n },\n});\n\n// Handle files received from drag-drop or file picker\nconst handleFilesReceived = (files: File[]) => {\n const file = files[0];\n if (file) {\n emit(\"upload-start\", file);\n flowUpload.upload(file);\n }\n};\n\n// Handle validation errors\nconst handleValidationError = (errors: string[]) => {\n emit(\"validation-error\", errors);\n};\n\n// Initialize drag-drop\nconst dragDrop = useDragDrop({\n accept: props.accept ? [props.accept] : undefined,\n multiple: props.multiple,\n maxFileSize: props.maxFileSize,\n onFilesReceived: handleFilesReceived,\n onValidationError: handleValidationError,\n});\n\n// File input ref\nconst fileInputRef = ref<HTMLInputElement>();\n\n// Open file picker\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst openFilePicker = () => {\n if (!props.disabled) {\n fileInputRef.value?.click();\n }\n};\n\n// Computed states\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isActive = computed(\n () => dragDrop.state.value.isDragging || dragDrop.state.value.isOver,\n);\n</script>\n\n<template>\n <div\n class=\"flow-upload-zone\"\n :class=\"{\n 'flow-upload-zone--active': isActive,\n 'flow-upload-zone--disabled': disabled,\n 'flow-upload-zone--uploading': flowUpload.isUploading.value\n }\"\n @dragenter=\"!disabled && dragDrop.onDragEnter\"\n @dragover=\"!disabled && dragDrop.onDragOver\"\n @dragleave=\"!disabled && dragDrop.onDragLeave\"\n @drop=\"!disabled && dragDrop.onDrop\"\n @click=\"openFilePicker\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled\"\n aria-label=\"Upload file with flow processing\"\n @keydown.enter=\"openFilePicker\"\n @keydown.space.prevent=\"openFilePicker\"\n >\n <slot\n :is-dragging=\"dragDrop.state.value.isDragging\"\n :is-over=\"dragDrop.state.value.isOver\"\n :is-uploading=\"flowUpload.isUploading.value\"\n :is-processing=\"flowUpload.isProcessing.value\"\n :progress=\"flowUpload.state.value.progress\"\n :status=\"flowUpload.state.value.status\"\n :errors=\"[...dragDrop.state.value.errors]\"\n :open-file-picker=\"openFilePicker\"\n >\n <!-- Default slot content -->\n <div class=\"flow-upload-zone__content\">\n <p v-if=\"dragDrop.state.value.isDragging\">Drop file here...</p>\n <p v-else-if=\"flowUpload.isUploading.value\">\n Uploading... {{ flowUpload.state.value.progress }}%\n </p>\n <p v-else-if=\"flowUpload.isProcessing.value\">\n Processing...\n <span v-if=\"flowUpload.state.value.currentNodeName\">\n ({{ flowUpload.state.value.currentNodeName }})\n </span>\n </p>\n <p v-else-if=\"flowUpload.state.value.status === 'success'\">Upload complete!</p>\n <p v-else-if=\"flowUpload.state.value.status === 'error'\" class=\"flow-upload-zone__error\">\n Error: {{ flowUpload.state.value.error?.message }}\n </p>\n <p v-else>Drag a file here or click to select</p>\n\n <div v-if=\"flowUpload.isUploading.value\" class=\"flow-upload-zone__progress\">\n <div class=\"flow-upload-zone__progress-bar\">\n <div\n class=\"flow-upload-zone__progress-fill\"\n :style=\"{ width: `${flowUpload.state.value.progress}%` }\"\n />\n </div>\n </div>\n\n <div v-if=\"dragDrop.state.value.errors.length > 0\" class=\"flow-upload-zone__errors\">\n <p v-for=\"(error, index) in dragDrop.state.value.errors\" :key=\"index\">\n {{ error }}\n </p>\n </div>\n </div>\n </slot>\n\n <input\n ref=\"fileInputRef\"\n type=\"file\"\n :multiple=\"dragDrop.inputProps.value.multiple\"\n :accept=\"dragDrop.inputProps.value.accept\"\n :disabled=\"disabled\"\n @change=\"dragDrop.onInputChange\"\n style=\"display: none\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n\n<style scoped>\n.flow-upload-zone {\n cursor: pointer;\n user-select: none;\n}\n\n.flow-upload-zone--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.flow-upload-zone--uploading {\n pointer-events: none;\n}\n\n.flow-upload-zone__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n\n.flow-upload-zone__error {\n color: #dc3545;\n}\n\n.flow-upload-zone__progress {\n width: 100%;\n max-width: 300px;\n margin-top: 0.5rem;\n}\n\n.flow-upload-zone__progress-bar {\n width: 100%;\n height: 0.5rem;\n background-color: #e0e0e0;\n border-radius: 0.25rem;\n overflow: hidden;\n}\n\n.flow-upload-zone__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.flow-upload-zone__errors {\n margin-top: 0.5rem;\n color: #dc3545;\n font-size: 0.875rem;\n}\n\n.flow-upload-zone__errors p {\n margin: 0.25rem 0;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * FlowUploadZone - Upload zone with flow processing pipeline\n *\n * Specialized upload component that uploads files through a flow pipeline for processing.\n * Supports drag-and-drop and file picker with flow configuration. Emits events for flow\n * completion, errors, and upload status changes.\n *\n * @component\n * @example\n * // Upload images through image processing flow\n * <FlowUploadZone\n * :flow-config=\"{ flowId: 'image-processor' }\"\n * accept=\"image/*\"\n * @upload-complete=\"handleFlowResult\"\n * @upload-error=\"handleError\"\n * />\n *\n * @example\n * // With custom slot content\n * <FlowUploadZone\n * :flow-config=\"{ flowId: 'image-processor' }\"\n * @upload-complete=\"handleResult\"\n * >\n * <template #default=\"{ isDragging, isProcessing, progress }\">\n * <div :class=\"{ processing: isProcessing }\">\n * <p v-if=\"isProcessing\">Processing... {{ progress }}%</p>\n * <p v-else-if=\"isDragging\">Drop file here</p>\n * <p v-else>Drag file here for processing</p>\n * </div>\n * </template>\n * </FlowUploadZone>\n *\n * @emits upload-complete - Flow processing completed with results\n * @emits upload-error - Upload or processing failed\n * @emits upload-start - File upload started\n * @emits validation-error - File validation failed\n */\nimport type {\n FlowUploadConfig,\n FlowUploadOptions,\n} from \"@uploadista/client-browser\";\nimport { computed, ref } from \"vue\";\nimport { useDragDrop, useFlowUpload } from \"../composables\";\n\n/**\n * Props for the FlowUploadZone component\n * @property {FlowUploadConfig} flowConfig - Flow configuration with flowId\n * @property {FlowUploadOptions} options - Additional flow upload options\n * @property {string} accept - Accepted file types (single MIME type or extension string)\n * @property {boolean} multiple - Allow multiple files (default: false, flow uploads are single-file)\n * @property {boolean} disabled - Disable the upload zone (default: false)\n * @property {number} maxFileSize - Maximum file size in bytes\n */\nexport interface FlowUploadZoneProps {\n /**\n * Flow configuration\n */\n flowConfig: FlowUploadConfig;\n\n /**\n * Additional flow upload options\n */\n options?: Omit<FlowUploadOptions, \"flowConfig\">;\n\n /**\n * Accepted file types (single MIME type or extension string)\n */\n accept?: string;\n\n /**\n * Whether to allow multiple files (currently only single file supported for flow uploads)\n */\n multiple?: boolean;\n\n /**\n * Whether the upload zone is disabled\n */\n disabled?: boolean;\n\n /**\n * Maximum file size in bytes\n */\n maxFileSize?: number;\n}\n\nconst props = withDefaults(defineProps<FlowUploadZoneProps>(), {\n multiple: false,\n disabled: false,\n});\n\n// biome-ignore lint/suspicious/noExplicitAny: Flow result can be any type\nconst emit = defineEmits<{\n // biome-ignore lint/suspicious/noExplicitAny: Flow result can be any type\n \"upload-complete\": [result: any];\n \"upload-error\": [error: Error];\n \"upload-start\": [file: File];\n \"validation-error\": [errors: string[]];\n}>();\n\n// biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\ndefineSlots<{\n // biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\n default(props: {\n isDragging: boolean;\n isOver: boolean;\n isUploading: boolean;\n isProcessing: boolean;\n progress: number;\n status: string;\n errors: string[];\n openFilePicker: () => void;\n }): any;\n}>();\n\n// Initialize flow upload\nconst flowUpload = useFlowUpload({\n ...props.options,\n flowConfig: props.flowConfig,\n onFlowComplete: (outputs) => {\n emit(\"upload-complete\", outputs);\n props.options?.onFlowComplete?.(outputs);\n },\n onError: (error) => {\n emit(\"upload-error\", error);\n props.options?.onError?.(error);\n },\n});\n\n// Handle files received from drag-drop or file picker\nconst handleFilesReceived = (files: File[]) => {\n const file = files[0];\n if (file) {\n emit(\"upload-start\", file);\n flowUpload.upload(file);\n }\n};\n\n// Handle validation errors\nconst handleValidationError = (errors: string[]) => {\n emit(\"validation-error\", errors);\n};\n\n// Initialize drag-drop\nconst dragDrop = useDragDrop({\n accept: props.accept ? [props.accept] : undefined,\n multiple: props.multiple,\n maxFileSize: props.maxFileSize,\n onFilesReceived: handleFilesReceived,\n onValidationError: handleValidationError,\n});\n\n// File input ref\nconst fileInputRef = ref<HTMLInputElement>();\n\n// Open file picker\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst openFilePicker = () => {\n if (!props.disabled) {\n fileInputRef.value?.click();\n }\n};\n\n// Computed states\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isActive = computed(\n () => dragDrop.state.value.isDragging || dragDrop.state.value.isOver,\n);\n</script>\n\n<template>\n <div\n class=\"flow-upload-zone\"\n :class=\"{\n 'flow-upload-zone--active': isActive,\n 'flow-upload-zone--disabled': disabled,\n 'flow-upload-zone--uploading': flowUpload.isUploading.value\n }\"\n @dragenter=\"!disabled && dragDrop.onDragEnter\"\n @dragover=\"!disabled && dragDrop.onDragOver\"\n @dragleave=\"!disabled && dragDrop.onDragLeave\"\n @drop=\"!disabled && dragDrop.onDrop\"\n @click=\"openFilePicker\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled\"\n aria-label=\"Upload file with flow processing\"\n @keydown.enter=\"openFilePicker\"\n @keydown.space.prevent=\"openFilePicker\"\n >\n <slot\n :is-dragging=\"dragDrop.state.value.isDragging\"\n :is-over=\"dragDrop.state.value.isOver\"\n :is-uploading=\"flowUpload.isUploading.value\"\n :is-processing=\"flowUpload.isProcessing.value\"\n :progress=\"flowUpload.state.value.progress\"\n :status=\"flowUpload.state.value.status\"\n :errors=\"[...dragDrop.state.value.errors]\"\n :open-file-picker=\"openFilePicker\"\n >\n <!-- Default slot content -->\n <div class=\"flow-upload-zone__content\">\n <p v-if=\"dragDrop.state.value.isDragging\">Drop file here...</p>\n <p v-else-if=\"flowUpload.isUploading.value\">\n Uploading... {{ flowUpload.state.value.progress }}%\n </p>\n <p v-else-if=\"flowUpload.isProcessing.value\">\n Processing...\n <span v-if=\"flowUpload.state.value.currentNodeName\">\n ({{ flowUpload.state.value.currentNodeName }})\n </span>\n </p>\n <p v-else-if=\"flowUpload.state.value.status === 'success'\">Upload complete!</p>\n <p v-else-if=\"flowUpload.state.value.status === 'error'\" class=\"flow-upload-zone__error\">\n Error: {{ flowUpload.state.value.error?.message }}\n </p>\n <p v-else>Drag a file here or click to select</p>\n\n <div v-if=\"flowUpload.isUploading.value\" class=\"flow-upload-zone__progress\">\n <div class=\"flow-upload-zone__progress-bar\">\n <div\n class=\"flow-upload-zone__progress-fill\"\n :style=\"{ width: `${flowUpload.state.value.progress}%` }\"\n />\n </div>\n </div>\n\n <div v-if=\"dragDrop.state.value.errors.length > 0\" class=\"flow-upload-zone__errors\">\n <p v-for=\"(error, index) in dragDrop.state.value.errors\" :key=\"index\">\n {{ error }}\n </p>\n </div>\n </div>\n </slot>\n\n <input\n ref=\"fileInputRef\"\n type=\"file\"\n :multiple=\"dragDrop.inputProps.value.multiple\"\n :accept=\"dragDrop.inputProps.value.accept\"\n :disabled=\"disabled\"\n @change=\"dragDrop.onInputChange\"\n style=\"display: none\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n\n<style scoped>\n.flow-upload-zone {\n cursor: pointer;\n user-select: none;\n}\n\n.flow-upload-zone--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.flow-upload-zone--uploading {\n pointer-events: none;\n}\n\n.flow-upload-zone__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n}\n\n.flow-upload-zone__error {\n color: #dc3545;\n}\n\n.flow-upload-zone__progress {\n width: 100%;\n max-width: 300px;\n margin-top: 0.5rem;\n}\n\n.flow-upload-zone__progress-bar {\n width: 100%;\n height: 0.5rem;\n background-color: #e0e0e0;\n border-radius: 0.25rem;\n overflow: hidden;\n}\n\n.flow-upload-zone__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.flow-upload-zone__errors {\n margin-top: 0.5rem;\n color: #dc3545;\n font-size: 0.875rem;\n}\n\n.flow-upload-zone__errors p {\n margin: 0.25rem 0;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * UploadList - Display a list of uploads with customizable status grouping and sorting\n *\n * Shows the progress and status of multiple file uploads. Supports filtering, sorting,\n * and status-based grouping. Provides flexible slot-based customization for rendering each item.\n *\n * @component\n * @example\n * // Basic upload list\n * <UploadList :uploads=\"uploads\" />\n *\n * @example\n * // Custom item rendering with status indicators\n * <UploadList :uploads=\"uploads\">\n * <template #item=\"{ item, isSuccess, isError }\">\n * <div class=\"upload-item\">\n * <span>{{ item.filename }}</span>\n * <progress :value=\"item.progress\" max=\"100\"></progress>\n * <span :class=\"{ success: isSuccess, error: isError }\">\n * {{ item.state.status }}\n * </span>\n * </div>\n * </template>\n * </UploadList>\n *\n * @example\n * // With filtering and sorting\n * <UploadList\n * :uploads=\"uploads\"\n * :filter=\"item => item.state.status === 'success'\"\n * :sort-by=\"(a, b) => a.uploadedAt - b.uploadedAt\"\n * />\n */\nimport { computed } from \"vue\";\nimport type { UploadItem } from \"../composables\";\nimport { isBrowserFile } from \"../utils\";\n\n/**\n * Props for the UploadList component\n * @property {UploadItem[]} uploads - Array of upload items to display\n * @property {Function} filter - Optional filter for which items to display\n * @property {Function} sortBy - Optional sorting function for items (a, b) => number\n */\nexport interface UploadListProps {\n /**\n * Array of upload items to display\n */\n uploads: UploadItem[];\n\n /**\n * Optional filter for which items to display\n */\n filter?: (item: UploadItem) => boolean;\n\n /**\n * Optional sorting function for items\n */\n sortBy?: (a: UploadItem, b: UploadItem) => number;\n}\n\nconst props = defineProps<UploadListProps>();\n\ndefineSlots<{\n item(props: {\n item: UploadItem;\n index: number;\n isUploading: boolean;\n isSuccess: boolean;\n isError: boolean;\n formatFileSize: (bytes: number) => string;\n }): any;\n default?(props: {\n items: UploadItem[];\n itemsByStatus: {\n idle: UploadItem[];\n uploading: UploadItem[];\n success: UploadItem[];\n error: UploadItem[];\n aborted: UploadItem[];\n };\n }): any;\n}>();\n\n// Apply filtering and sorting\nconst filteredItems = computed(() => {\n let items = props.uploads;\n\n if (props.filter) {\n items = items.filter(props.filter);\n }\n\n if (props.sortBy) {\n items = [...items].sort(props.sortBy);\n }\n\n return items;\n});\n\n// Group items by status\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst itemsByStatus = computed(() => ({\n idle: filteredItems.value.filter((item) => item.state.status === \"idle\"),\n uploading: filteredItems.value.filter(\n (item) => item.state.status === \"uploading\",\n ),\n success: filteredItems.value.filter(\n (item) => item.state.status === \"success\",\n ),\n error: filteredItems.value.filter((item) => item.state.status === \"error\"),\n aborted: filteredItems.value.filter(\n (item) => item.state.status === \"aborted\",\n ),\n}));\n\n// Helper function to format file sizes\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\n// Helper function to get status icon\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusIcon = (status: string): string => {\n switch (status) {\n case \"idle\":\n return \"⏳\";\n case \"uploading\":\n return \"📤\";\n case \"success\":\n return \"✅\";\n case \"error\":\n return \"❌\";\n case \"aborted\":\n return \"⏹️\";\n default:\n return \"❓\";\n }\n};\n\n// Helper function to get status color\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusColor = (status: string): string => {\n switch (status) {\n case \"idle\":\n return \"#6c757d\";\n case \"uploading\":\n return \"#007bff\";\n case \"success\":\n return \"#28a745\";\n case \"error\":\n return \"#dc3545\";\n case \"aborted\":\n return \"#6c757d\";\n default:\n return \"#6c757d\";\n }\n};\n</script>\n\n<template>\n <div class=\"upload-list\">\n <slot :items=\"filteredItems\" :items-by-status=\"itemsByStatus\">\n <!-- Default rendering: simple list of upload items -->\n <div\n v-for=\"(item, index) in filteredItems\"\n :key=\"item.id\"\n class=\"upload-list__item\"\n :class=\"`upload-list__item--${item.state.status}`\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :is-uploading=\"item.state.status === 'uploading'\"\n :is-success=\"item.state.status === 'success'\"\n :is-error=\"item.state.status === 'error'\"\n :format-file-size=\"formatFileSize\"\n >\n <!-- Default item template -->\n <div class=\"upload-list__item-header\">\n <span class=\"upload-list__item-icon\">\n {{ getStatusIcon(item.state.status) }}\n </span>\n <span class=\"upload-list__item-name\">\n {{ isBrowserFile(item.file) ? item.file.name : 'File' }}\n </span>\n <span\n class=\"upload-list__item-status\"\n :style=\"{ color: getStatusColor(item.state.status) }\"\n >\n {{ item.state.status.toUpperCase() }}\n </span>\n </div>\n\n <div v-if=\"item.state.totalBytes\" class=\"upload-list__item-size\">\n {{ formatFileSize(item.state.totalBytes) }}\n </div>\n\n <div v-if=\"item.state.status === 'uploading'\" class=\"upload-list__item-progress\">\n <div class=\"upload-list__progress-bar\">\n <div\n class=\"upload-list__progress-fill\"\n :style=\"{ width: `${item.state.progress}%` }\"\n />\n </div>\n <span class=\"upload-list__progress-text\">{{ item.state.progress }}%</span>\n </div>\n\n <div v-if=\"item.state.status === 'error' && item.state.error\" class=\"upload-list__item-error\">\n {{ item.state.error.message }}\n </div>\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.upload-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.upload-list__item {\n padding: 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 0.375rem;\n background-color: #fff;\n}\n\n.upload-list__item-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.upload-list__item-icon {\n font-size: 1rem;\n}\n\n.upload-list__item-name {\n flex: 1;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.upload-list__item-status {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.upload-list__item-size {\n font-size: 0.75rem;\n color: #666;\n margin-bottom: 0.5rem;\n}\n\n.upload-list__item-progress {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.upload-list__progress-bar {\n flex: 1;\n height: 0.375rem;\n background-color: #e0e0e0;\n border-radius: 0.1875rem;\n overflow: hidden;\n}\n\n.upload-list__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.upload-list__progress-text {\n font-size: 0.75rem;\n color: #666;\n min-width: 3rem;\n text-align: right;\n}\n\n.upload-list__item-error {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #f8d7da;\n color: #721c24;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * UploadList - Display a list of uploads with customizable status grouping and sorting\n *\n * Shows the progress and status of multiple file uploads. Supports filtering, sorting,\n * and status-based grouping. Provides flexible slot-based customization for rendering each item.\n *\n * @component\n * @example\n * // Basic upload list\n * <UploadList :uploads=\"uploads\" />\n *\n * @example\n * // Custom item rendering with status indicators\n * <UploadList :uploads=\"uploads\">\n * <template #item=\"{ item, isSuccess, isError }\">\n * <div class=\"upload-item\">\n * <span>{{ item.filename }}</span>\n * <progress :value=\"item.progress\" max=\"100\"></progress>\n * <span :class=\"{ success: isSuccess, error: isError }\">\n * {{ item.state.status }}\n * </span>\n * </div>\n * </template>\n * </UploadList>\n *\n * @example\n * // With filtering and sorting\n * <UploadList\n * :uploads=\"uploads\"\n * :filter=\"item => item.state.status === 'success'\"\n * :sort-by=\"(a, b) => a.uploadedAt - b.uploadedAt\"\n * />\n */\nimport { computed } from \"vue\";\nimport type { UploadItem } from \"../composables\";\nimport { isBrowserFile } from \"../utils\";\n\n/**\n * Props for the UploadList component\n * @property {UploadItem[]} uploads - Array of upload items to display\n * @property {Function} filter - Optional filter for which items to display\n * @property {Function} sortBy - Optional sorting function for items (a, b) => number\n */\nexport interface UploadListProps {\n /**\n * Array of upload items to display\n */\n uploads: UploadItem[];\n\n /**\n * Optional filter for which items to display\n */\n filter?: (item: UploadItem) => boolean;\n\n /**\n * Optional sorting function for items\n */\n sortBy?: (a: UploadItem, b: UploadItem) => number;\n}\n\nconst props = defineProps<UploadListProps>();\n\ndefineSlots<{\n item(props: {\n item: UploadItem;\n index: number;\n isUploading: boolean;\n isSuccess: boolean;\n isError: boolean;\n formatFileSize: (bytes: number) => string;\n }): any;\n default?(props: {\n items: UploadItem[];\n itemsByStatus: {\n idle: UploadItem[];\n uploading: UploadItem[];\n success: UploadItem[];\n error: UploadItem[];\n aborted: UploadItem[];\n };\n }): any;\n}>();\n\n// Apply filtering and sorting\nconst filteredItems = computed(() => {\n let items = props.uploads;\n\n if (props.filter) {\n items = items.filter(props.filter);\n }\n\n if (props.sortBy) {\n items = [...items].sort(props.sortBy);\n }\n\n return items;\n});\n\n// Group items by status\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst itemsByStatus = computed(() => ({\n idle: filteredItems.value.filter((item) => item.state.status === \"idle\"),\n uploading: filteredItems.value.filter(\n (item) => item.state.status === \"uploading\",\n ),\n success: filteredItems.value.filter(\n (item) => item.state.status === \"success\",\n ),\n error: filteredItems.value.filter((item) => item.state.status === \"error\"),\n aborted: filteredItems.value.filter(\n (item) => item.state.status === \"aborted\",\n ),\n}));\n\n// Helper function to format file sizes\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return \"0 Bytes\";\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return `${parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;\n};\n\n// Helper function to get status icon\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusIcon = (status: string): string => {\n switch (status) {\n case \"idle\":\n return \"⏳\";\n case \"uploading\":\n return \"📤\";\n case \"success\":\n return \"✅\";\n case \"error\":\n return \"❌\";\n case \"aborted\":\n return \"⏹️\";\n default:\n return \"❓\";\n }\n};\n\n// Helper function to get status color\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst getStatusColor = (status: string): string => {\n switch (status) {\n case \"idle\":\n return \"#6c757d\";\n case \"uploading\":\n return \"#007bff\";\n case \"success\":\n return \"#28a745\";\n case \"error\":\n return \"#dc3545\";\n case \"aborted\":\n return \"#6c757d\";\n default:\n return \"#6c757d\";\n }\n};\n</script>\n\n<template>\n <div class=\"upload-list\">\n <slot :items=\"filteredItems\" :items-by-status=\"itemsByStatus\">\n <!-- Default rendering: simple list of upload items -->\n <div\n v-for=\"(item, index) in filteredItems\"\n :key=\"item.id\"\n class=\"upload-list__item\"\n :class=\"`upload-list__item--${item.state.status}`\"\n >\n <slot\n name=\"item\"\n :item=\"item\"\n :index=\"index\"\n :is-uploading=\"item.state.status === 'uploading'\"\n :is-success=\"item.state.status === 'success'\"\n :is-error=\"item.state.status === 'error'\"\n :format-file-size=\"formatFileSize\"\n >\n <!-- Default item template -->\n <div class=\"upload-list__item-header\">\n <span class=\"upload-list__item-icon\">\n {{ getStatusIcon(item.state.status) }}\n </span>\n <span class=\"upload-list__item-name\">\n {{ isBrowserFile(item.file) ? item.file.name : 'File' }}\n </span>\n <span\n class=\"upload-list__item-status\"\n :style=\"{ color: getStatusColor(item.state.status) }\"\n >\n {{ item.state.status.toUpperCase() }}\n </span>\n </div>\n\n <div v-if=\"item.state.totalBytes\" class=\"upload-list__item-size\">\n {{ formatFileSize(item.state.totalBytes) }}\n </div>\n\n <div v-if=\"item.state.status === 'uploading'\" class=\"upload-list__item-progress\">\n <div class=\"upload-list__progress-bar\">\n <div\n class=\"upload-list__progress-fill\"\n :style=\"{ width: `${item.state.progress}%` }\"\n />\n </div>\n <span class=\"upload-list__progress-text\">{{ item.state.progress }}%</span>\n </div>\n\n <div v-if=\"item.state.status === 'error' && item.state.error\" class=\"upload-list__item-error\">\n {{ item.state.error.message }}\n </div>\n </slot>\n </div>\n </slot>\n </div>\n</template>\n\n<style scoped>\n.upload-list {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.upload-list__item {\n padding: 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 0.375rem;\n background-color: #fff;\n}\n\n.upload-list__item-header {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin-bottom: 0.5rem;\n}\n\n.upload-list__item-icon {\n font-size: 1rem;\n}\n\n.upload-list__item-name {\n flex: 1;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.upload-list__item-status {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n}\n\n.upload-list__item-size {\n font-size: 0.75rem;\n color: #666;\n margin-bottom: 0.5rem;\n}\n\n.upload-list__item-progress {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.upload-list__progress-bar {\n flex: 1;\n height: 0.375rem;\n background-color: #e0e0e0;\n border-radius: 0.1875rem;\n overflow: hidden;\n}\n\n.upload-list__progress-fill {\n height: 100%;\n background-color: #007bff;\n transition: width 0.2s ease;\n}\n\n.upload-list__progress-text {\n font-size: 0.75rem;\n color: #666;\n min-width: 3rem;\n text-align: right;\n}\n\n.upload-list__item-error {\n margin-top: 0.5rem;\n padding: 0.5rem;\n background-color: #f8d7da;\n color: #721c24;\n font-size: 0.75rem;\n border-radius: 0.25rem;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * UploadZone - A flexible file upload component with drag-and-drop support\n *\n * Provides a drag-and-drop zone and file picker for uploading files. Supports both single\n * and multiple file uploads with validation. Emits events for file selection and upload events.\n *\n * @component\n * @example\n * // Basic single file upload\n * <UploadZone @file-select=\"handleFiles\" />\n *\n * @example\n * // Multiple files with validation\n * <UploadZone\n * multiple\n * accept={[\"image/*\"]}\n * :max-file-size=\"10 * 1024 * 1024\"\n * @file-select=\"handleFiles\"\n * @validation-error=\"handleErrors\"\n * >\n * <template #default=\"{ isDragging, errors, openFilePicker }\">\n * <div :class=\"{ dragging: isDragging }\" @click=\"openFilePicker\">\n * <p>{{ isDragging ? 'Drop files here' : 'Click or drag files here' }}</p>\n * <div v-if=\"errors.length\">\n * <p v-for=\"error in errors\" :key=\"error\">{{ error }}</p>\n * </div>\n * </div>\n * </template>\n * </UploadZone>\n *\n * @emits file-select - When files are selected/dropped\n * @emits upload-start - When upload begins\n * @emits validation-error - When validation fails\n */\nimport type { UploadOptions } from \"@uploadista/client-browser\";\nimport { computed, ref } from \"vue\";\nimport type { MultiUploadOptions } from \"../composables\";\nimport { useDragDrop, useMultiUpload, useUpload } from \"../composables\";\n\n/**\n * Props for the UploadZone component\n * @property {string[]} accept - Accepted file types (MIME types or file extensions)\n * @property {boolean} multiple - Whether to allow multiple files (default: true)\n * @property {boolean} disabled - Whether the upload zone is disabled (default: false)\n * @property {number} maxFileSize - Maximum file size in bytes\n * @property {Function} validator - Custom validation function for files\n * @property {MultiUploadOptions} multiUploadOptions - Multi-upload options (only used when multiple=true)\n * @property {UploadOptions} uploadOptions - Single upload options (only used when multiple=false)\n */\nexport interface UploadZoneProps {\n /**\n * Accepted file types (MIME types or file extensions)\n */\n accept?: string[];\n\n /**\n * Whether to allow multiple files\n */\n multiple?: boolean;\n\n /**\n * Whether the upload zone is disabled\n */\n disabled?: boolean;\n\n /**\n * Maximum file size in bytes\n */\n maxFileSize?: number;\n\n /**\n * Custom validation function for files\n */\n validator?: (files: File[]) => string[] | null;\n\n /**\n * Multi-upload options (only used when multiple=true)\n */\n multiUploadOptions?: MultiUploadOptions;\n\n /**\n * Single upload options (only used when multiple=false)\n */\n uploadOptions?: UploadOptions;\n}\n\nconst props = withDefaults(defineProps<UploadZoneProps>(), {\n multiple: true,\n disabled: false,\n});\n\nconst emit = defineEmits<{\n \"file-select\": [files: File[]];\n \"upload-start\": [files: File[]];\n \"validation-error\": [errors: string[]];\n}>();\n\ndefineSlots<{\n // biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\n default(props: {\n isDragging: boolean;\n isOver: boolean;\n isUploading: boolean;\n errors: string[];\n openFilePicker: () => void;\n }): any;\n}>();\n\n// Initialize upload composables\nconst singleUpload = props.multiple\n ? null\n : useUpload(props.uploadOptions || {});\nconst multiUpload = props.multiple\n ? useMultiUpload(props.multiUploadOptions || {})\n : null;\n\n// Handle files received from drag-drop or file picker\nconst handleFilesReceived = (files: File[]) => {\n emit(\"file-select\", files);\n emit(\"upload-start\", files);\n\n if (props.multiple && multiUpload) {\n multiUpload.addFiles(files);\n setTimeout(() => multiUpload.startAll(), 0);\n } else if (!props.multiple && singleUpload && files[0]) {\n singleUpload.upload(files[0]);\n }\n};\n\n// Handle validation errors\nconst handleValidationError = (errors: string[]) => {\n emit(\"validation-error\", errors);\n};\n\n// Initialize drag-drop\nconst dragDrop = useDragDrop({\n accept: props.accept,\n multiple: props.multiple,\n maxFileSize: props.maxFileSize,\n validator: props.validator,\n onFilesReceived: handleFilesReceived,\n onValidationError: handleValidationError,\n});\n\n// File input ref\nconst fileInputRef = ref<HTMLInputElement>();\n\n// Open file picker\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst openFilePicker = () => {\n if (!props.disabled) {\n fileInputRef.value?.click();\n }\n};\n\n// Computed states\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isActive = computed(\n () => dragDrop.state.value.isDragging || dragDrop.state.value.isOver,\n);\n\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isUploading = computed(() => {\n if (props.multiple && multiUpload) {\n return multiUpload.state.value.isUploading;\n } else if (!props.multiple && singleUpload) {\n return singleUpload.state.value.status === \"uploading\";\n }\n return false;\n});\n</script>\n\n<template>\n <div\n class=\"upload-zone\"\n :class=\"{ 'upload-zone--active': isActive, 'upload-zone--disabled': disabled }\"\n @dragenter=\"!disabled && dragDrop.onDragEnter\"\n @dragover=\"!disabled && dragDrop.onDragOver\"\n @dragleave=\"!disabled && dragDrop.onDragLeave\"\n @drop=\"!disabled && dragDrop.onDrop\"\n @click=\"openFilePicker\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled\"\n :aria-label=\"multiple ? 'Upload multiple files' : 'Upload a file'\"\n @keydown.enter=\"openFilePicker\"\n @keydown.space.prevent=\"openFilePicker\"\n >\n <slot\n :is-dragging=\"dragDrop.state.value.isDragging\"\n :is-over=\"dragDrop.state.value.isOver\"\n :is-uploading=\"isUploading\"\n :errors=\"[...dragDrop.state.value.errors]\"\n :open-file-picker=\"openFilePicker\"\n >\n <!-- Default slot content -->\n <div class=\"upload-zone__content\">\n <p v-if=\"dragDrop.state.value.isDragging\">\n {{ multiple ? 'Drop files here...' : 'Drop file here...' }}\n </p>\n <p v-else>\n {{ multiple ? 'Drag files here or click to select' : 'Drag a file here or click to select' }}\n </p>\n\n <div v-if=\"dragDrop.state.value.errors.length > 0\" class=\"upload-zone__errors\">\n <p v-for=\"(error, index) in dragDrop.state.value.errors\" :key=\"index\">\n {{ error }}\n </p>\n </div>\n </div>\n </slot>\n\n <input\n ref=\"fileInputRef\"\n type=\"file\"\n :multiple=\"dragDrop.inputProps.value.multiple\"\n :accept=\"dragDrop.inputProps.value.accept\"\n :disabled=\"disabled\"\n @change=\"dragDrop.onInputChange\"\n style=\"display: none\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n\n<style scoped>\n.upload-zone {\n cursor: pointer;\n user-select: none;\n}\n\n.upload-zone--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.upload-zone__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.upload-zone__errors {\n margin-top: 0.5rem;\n color: #dc3545;\n font-size: 0.875rem;\n}\n\n.upload-zone__errors p {\n margin: 0.25rem 0;\n}\n</style>\n","<script setup lang=\"ts\">\n/**\n * UploadZone - A flexible file upload component with drag-and-drop support\n *\n * Provides a drag-and-drop zone and file picker for uploading files. Supports both single\n * and multiple file uploads with validation. Emits events for file selection and upload events.\n *\n * @component\n * @example\n * // Basic single file upload\n * <UploadZone @file-select=\"handleFiles\" />\n *\n * @example\n * // Multiple files with validation\n * <UploadZone\n * multiple\n * accept={[\"image/*\"]}\n * :max-file-size=\"10 * 1024 * 1024\"\n * @file-select=\"handleFiles\"\n * @validation-error=\"handleErrors\"\n * >\n * <template #default=\"{ isDragging, errors, openFilePicker }\">\n * <div :class=\"{ dragging: isDragging }\" @click=\"openFilePicker\">\n * <p>{{ isDragging ? 'Drop files here' : 'Click or drag files here' }}</p>\n * <div v-if=\"errors.length\">\n * <p v-for=\"error in errors\" :key=\"error\">{{ error }}</p>\n * </div>\n * </div>\n * </template>\n * </UploadZone>\n *\n * @emits file-select - When files are selected/dropped\n * @emits upload-start - When upload begins\n * @emits validation-error - When validation fails\n */\nimport type { UploadOptions } from \"@uploadista/client-browser\";\nimport { computed, ref } from \"vue\";\nimport type { MultiUploadOptions } from \"../composables\";\nimport { useDragDrop, useMultiUpload, useUpload } from \"../composables\";\n\n/**\n * Props for the UploadZone component\n * @property {string[]} accept - Accepted file types (MIME types or file extensions)\n * @property {boolean} multiple - Whether to allow multiple files (default: true)\n * @property {boolean} disabled - Whether the upload zone is disabled (default: false)\n * @property {number} maxFileSize - Maximum file size in bytes\n * @property {Function} validator - Custom validation function for files\n * @property {MultiUploadOptions} multiUploadOptions - Multi-upload options (only used when multiple=true)\n * @property {UploadOptions} uploadOptions - Single upload options (only used when multiple=false)\n */\nexport interface UploadZoneProps {\n /**\n * Accepted file types (MIME types or file extensions)\n */\n accept?: string[];\n\n /**\n * Whether to allow multiple files\n */\n multiple?: boolean;\n\n /**\n * Whether the upload zone is disabled\n */\n disabled?: boolean;\n\n /**\n * Maximum file size in bytes\n */\n maxFileSize?: number;\n\n /**\n * Custom validation function for files\n */\n validator?: (files: File[]) => string[] | null;\n\n /**\n * Multi-upload options (only used when multiple=true)\n */\n multiUploadOptions?: MultiUploadOptions;\n\n /**\n * Single upload options (only used when multiple=false)\n */\n uploadOptions?: UploadOptions;\n}\n\nconst props = withDefaults(defineProps<UploadZoneProps>(), {\n multiple: true,\n disabled: false,\n});\n\nconst emit = defineEmits<{\n \"file-select\": [files: File[]];\n \"upload-start\": [files: File[]];\n \"validation-error\": [errors: string[]];\n}>();\n\ndefineSlots<{\n // biome-ignore lint/suspicious/noExplicitAny: Vue slot definition requires any\n default(props: {\n isDragging: boolean;\n isOver: boolean;\n isUploading: boolean;\n errors: string[];\n openFilePicker: () => void;\n }): any;\n}>();\n\n// Initialize upload composables\nconst singleUpload = props.multiple\n ? null\n : useUpload(props.uploadOptions || {});\nconst multiUpload = props.multiple\n ? useMultiUpload(props.multiUploadOptions || {})\n : null;\n\n// Handle files received from drag-drop or file picker\nconst handleFilesReceived = (files: File[]) => {\n emit(\"file-select\", files);\n emit(\"upload-start\", files);\n\n if (props.multiple && multiUpload) {\n multiUpload.addFiles(files);\n setTimeout(() => multiUpload.startAll(), 0);\n } else if (!props.multiple && singleUpload && files[0]) {\n singleUpload.upload(files[0]);\n }\n};\n\n// Handle validation errors\nconst handleValidationError = (errors: string[]) => {\n emit(\"validation-error\", errors);\n};\n\n// Initialize drag-drop\nconst dragDrop = useDragDrop({\n accept: props.accept,\n multiple: props.multiple,\n maxFileSize: props.maxFileSize,\n validator: props.validator,\n onFilesReceived: handleFilesReceived,\n onValidationError: handleValidationError,\n});\n\n// File input ref\nconst fileInputRef = ref<HTMLInputElement>();\n\n// Open file picker\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst openFilePicker = () => {\n if (!props.disabled) {\n fileInputRef.value?.click();\n }\n};\n\n// Computed states\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isActive = computed(\n () => dragDrop.state.value.isDragging || dragDrop.state.value.isOver,\n);\n\n// biome-ignore lint/correctness/noUnusedVariables: Used in slot templates\nconst isUploading = computed(() => {\n if (props.multiple && multiUpload) {\n return multiUpload.state.value.isUploading;\n } else if (!props.multiple && singleUpload) {\n return singleUpload.state.value.status === \"uploading\";\n }\n return false;\n});\n</script>\n\n<template>\n <div\n class=\"upload-zone\"\n :class=\"{ 'upload-zone--active': isActive, 'upload-zone--disabled': disabled }\"\n @dragenter=\"!disabled && dragDrop.onDragEnter\"\n @dragover=\"!disabled && dragDrop.onDragOver\"\n @dragleave=\"!disabled && dragDrop.onDragLeave\"\n @drop=\"!disabled && dragDrop.onDrop\"\n @click=\"openFilePicker\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled\"\n :aria-label=\"multiple ? 'Upload multiple files' : 'Upload a file'\"\n @keydown.enter=\"openFilePicker\"\n @keydown.space.prevent=\"openFilePicker\"\n >\n <slot\n :is-dragging=\"dragDrop.state.value.isDragging\"\n :is-over=\"dragDrop.state.value.isOver\"\n :is-uploading=\"isUploading\"\n :errors=\"[...dragDrop.state.value.errors]\"\n :open-file-picker=\"openFilePicker\"\n >\n <!-- Default slot content -->\n <div class=\"upload-zone__content\">\n <p v-if=\"dragDrop.state.value.isDragging\">\n {{ multiple ? 'Drop files here...' : 'Drop file here...' }}\n </p>\n <p v-else>\n {{ multiple ? 'Drag files here or click to select' : 'Drag a file here or click to select' }}\n </p>\n\n <div v-if=\"dragDrop.state.value.errors.length > 0\" class=\"upload-zone__errors\">\n <p v-for=\"(error, index) in dragDrop.state.value.errors\" :key=\"index\">\n {{ error }}\n </p>\n </div>\n </div>\n </slot>\n\n <input\n ref=\"fileInputRef\"\n type=\"file\"\n :multiple=\"dragDrop.inputProps.value.multiple\"\n :accept=\"dragDrop.inputProps.value.accept\"\n :disabled=\"disabled\"\n @change=\"dragDrop.onInputChange\"\n style=\"display: none\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n\n<style scoped>\n.upload-zone {\n cursor: pointer;\n user-select: none;\n}\n\n.upload-zone--disabled {\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.upload-zone__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.upload-zone__errors {\n margin-top: 0.5rem;\n color: #dc3545;\n font-size: 0.875rem;\n}\n\n.upload-zone__errors p {\n margin: 0.25rem 0;\n}\n</style>\n"],"mappings":"qhCCyEA,IAAM,EAAQ,EA0BR,EAAgB,MAAe,CACnC,IAAI,EAAQ,EAAM,QAUlB,OARI,EAAM,SACR,EAAQ,EAAM,OAAO,EAAM,OAAO,EAGhC,EAAM,SACR,EAAQ,CAAC,GAAG,EAAM,CAAC,KAAK,EAAM,OAAO,EAGhC,GACP,CAII,EAAgB,OAAgB,CACpC,QAAS,EAAc,MAAM,OAAQ,GAAS,EAAK,SAAW,UAAU,CACxE,UAAW,EAAc,MAAM,OAAQ,GAAS,EAAK,SAAW,YAAY,CAC5E,QAAS,EAAc,MAAM,OAAQ,GAAS,EAAK,SAAW,UAAU,CACxE,MAAO,EAAc,MAAM,OAAQ,GAAS,EAAK,SAAW,QAAQ,CACpE,QAAS,EAAc,MAAM,OAAQ,GAAS,EAAK,SAAW,UAAU,CACzE,EAAE,CAIG,EAAkB,GAA0B,CAChD,GAAI,IAAU,EAAG,MAAO,UACxB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Q,CAAC,MAAM,MAAM,OAAO,OAAM,GAAA,GAAA,CAA7C,EAIM,MAJN,GAIM,EAAA,EAAA,GAAA,CAHJ,EAEI,EAAA,KAAA,EAFwB,EAAA,EAAQ,CAAC,MAAM,MAAM,QAAtC,EAAO,SAAlB,EAEI,IAAA,CAFsD,IAAK,EAAK,CAAA,EAC/D,EAAK,CAAA,EAAA,gCAMhB,EASE,QAAA,SARI,eAAJ,IAAI,EACJ,KAAK,OACJ,SAAU,EAAA,EAAQ,CAAC,WAAW,MAAM,SACpC,OAAQ,EAAA,EAAQ,CAAC,WAAW,MAAM,OAClC,SAAU,EAAA,SACV,SAAM,AAAA,EAAA,MAAA,GAAA,IAAE,EAAA,EAAQ,CAAC,eAAT,EAAA,EAAQ,CAAC,cAAa,GAAA,EAAA,CAC/B,MAAA,CAAA,QAAA,OAAqB,CACrB,cAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BxAfeZLx.d.mts","names":[],"sources":["../src/composables/plugin.ts","../src/composables/useDragDrop.ts","../src/composables/useFlowUpload.ts","../src/composables/useMultiFlowUpload.ts","../src/composables/useUpload.ts","../src/composables/useMultiUpload.ts","../src/composables/useUploadistaClient.ts","../src/composables/useUploadMetrics.ts"],"sourcesContent":[],"mappings":";;;;;;;;;UAQiB,uBAAA,SAAgC;;;;YAIrC;;cAGC,uBAAuB,aAClC,kBAAkB;AARH,cAWJ,gCAPD,EAOmC,YAXE,CAY/C,GAZ+C,CAY3C,GAZ2C,CAAA,CAAA,KAAA,EAY/B,eAZsD,EAAA,GAAA,IAAA,CAAA,CAAA,CAAA;AAOxE;;;;;AAIA;;;;;;AAiCA;;;;AClDA;AA0CA;AAmGA;;;;;;;;;;;;iBD3FgB,sBAAA,UAAgC;eAE/B;;;;UCpDA,eAAA;;;;;;;;;EDMA;AAOjB;;EACE,WAAA,CAAA,EAAA,MAAA;EADkC;;AAIpC;EACkB,QAAA,CAAA,EAAA,OAAA;EAAZ;;;EADq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;;;;;;;;;;;;;;IFwSe,QAAA,EAAA,MAAA,GAAA,IAAA;IA4IS,UAAA,EAAA,OAAA;;;;;;;;;;;;;;;;;gBEpbxB;sBAKM,QAAQ;oBAKV;;;;;;;;;;MDzDA,OAAA,EAAA,MAAmB,GAAA,IAAA;MAAA,QAAA,EAAA,MAAA,GAAA,IAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providers-BQhKoGMk.mjs","names":[],"sources":["../src/providers/UploadistaProvider.vue","../src/providers/UploadistaProvider.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n createUploadistaClient,\n type UploadistaEvent,\n} from \"@uploadista/client-browser\";\nimport { onBeforeUnmount, provide, ref } from \"vue\";\nimport {\n UPLOADISTA_CLIENT_KEY,\n UPLOADISTA_EVENT_SUBSCRIBERS_KEY,\n} from \"../composables/plugin\";\n\nconst props = withDefaults(\n defineProps<{\n serverUrl: string;\n storageId?: string;\n uploadistaBasePath?: string;\n chunkSize?: number;\n parallelUploads?: number;\n storeFingerprintForResuming?: boolean;\n onEvent?: (event: UploadistaEvent) => void;\n }>(),\n {\n storageId: \"local\",\n uploadistaBasePath: \"uploadista\",\n chunkSize: 1024 * 1024,\n parallelUploads: 1,\n storeFingerprintForResuming: true,\n },\n);\n\nconst emit = defineEmits<{\n /**\n * Emitted when the underlying client dispatches an event.\n */\n (e: \"event\", event: UploadistaEvent): void;\n}>();\n\n// Create a shared set of event subscribers\nconst eventSubscribers = ref(new Set<(event: UploadistaEvent) => void>());\n\nconst client = createUploadistaClient({\n baseUrl: props.serverUrl,\n storageId: props.storageId,\n uploadistaBasePath: props.uploadistaBasePath,\n chunkSize: props.chunkSize,\n parallelUploads: props.parallelUploads,\n storeFingerprintForResuming: props.storeFingerprintForResuming,\n onEvent: (event) => {\n // Dispatch to all subscribers registered via subscribeToEvents\n eventSubscribers.value.forEach((subscriber) => {\n subscriber(event);\n });\n\n props.onEvent?.(event);\n emit(\"event\", event);\n },\n});\n\nprovide(UPLOADISTA_CLIENT_KEY, client);\nprovide(UPLOADISTA_EVENT_SUBSCRIBERS_KEY, eventSubscribers);\n\nonBeforeUnmount(() => {\n client.closeAllWebSockets();\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script setup lang=\"ts\">\nimport {\n createUploadistaClient,\n type UploadistaEvent,\n} from \"@uploadista/client-browser\";\nimport { onBeforeUnmount, provide, ref } from \"vue\";\nimport {\n UPLOADISTA_CLIENT_KEY,\n UPLOADISTA_EVENT_SUBSCRIBERS_KEY,\n} from \"../composables/plugin\";\n\nconst props = withDefaults(\n defineProps<{\n serverUrl: string;\n storageId?: string;\n uploadistaBasePath?: string;\n chunkSize?: number;\n parallelUploads?: number;\n storeFingerprintForResuming?: boolean;\n onEvent?: (event: UploadistaEvent) => void;\n }>(),\n {\n storageId: \"local\",\n uploadistaBasePath: \"uploadista\",\n chunkSize: 1024 * 1024,\n parallelUploads: 1,\n storeFingerprintForResuming: true,\n },\n);\n\nconst emit = defineEmits<{\n /**\n * Emitted when the underlying client dispatches an event.\n */\n (e: \"event\", event: UploadistaEvent): void;\n}>();\n\n// Create a shared set of event subscribers\nconst eventSubscribers = ref(new Set<(event: UploadistaEvent) => void>());\n\nconst client = createUploadistaClient({\n baseUrl: props.serverUrl,\n storageId: props.storageId,\n uploadistaBasePath: props.uploadistaBasePath,\n chunkSize: props.chunkSize,\n parallelUploads: props.parallelUploads,\n storeFingerprintForResuming: props.storeFingerprintForResuming,\n onEvent: (event) => {\n // Dispatch to all subscribers registered via subscribeToEvents\n eventSubscribers.value.forEach((subscriber) => {\n subscriber(event);\n });\n\n props.onEvent?.(event);\n emit(\"event\", event);\n },\n});\n\nprovide(UPLOADISTA_CLIENT_KEY, client);\nprovide(UPLOADISTA_EVENT_SUBSCRIBERS_KEY, eventSubscribers);\n\nonBeforeUnmount(() => {\n client.closeAllWebSockets();\n});\n</script>\n\n<template>\n <slot />\n</template>\n"],"mappings":"8eCWA,IAAM,EAAQ,EAmBR,EAAO,EAQP,EAAmB,EAAI,IAAI,IAAwC,CAEnE,EAAS,EAAuB,CACpC,QAAS,EAAM,UACf,UAAW,EAAM,UACjB,mBAAoB,EAAM,mBAC1B,UAAW,EAAM,UACjB,gBAAiB,EAAM,gBACvB,4BAA6B,EAAM,4BACnC,QAAU,GAAU,CAElB,EAAiB,MAAM,QAAS,GAAe,CAC7C,EAAW,EAAM,EACjB,CAEF,EAAM,UAAU,EAAM,CACtB,EAAK,QAAS,EAAM,EAEvB,CAAC,QAEF,EAAQ,EAAuB,EAAO,CACtC,EAAQ,EAAkC,EAAiB,CAE3D,MAAsB,CACpB,EAAO,oBAAoB,EAC3B,QAIA,EAAQ,EAAA,OAAA,UAAA"}
|