@uploadista/vue 0.0.7 → 0.0.9
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-euaBuhSY.d.mts → index-CKbFC9WP.d.mts} +2 -2
- package/dist/{index-euaBuhSY.d.mts.map → index-CKbFC9WP.d.mts.map} +1 -1
- package/dist/{index-Di33Lq49.d.mts → index-DOHoymBz.d.mts} +34 -391
- package/dist/index-DOHoymBz.d.mts.map +1 -0
- package/dist/{index-BmoqlSiN.d.mts → index-DkJiYi3_.d.mts} +2 -2
- package/dist/{index-BmoqlSiN.d.mts.map → index-DkJiYi3_.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/providers/index.d.mts +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-Di33Lq49.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-CKbFC9WP.mjs";
|
|
2
|
+
import "../index-DOHoymBz.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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A,EAAA,CAAS,WAAW,MAAM,OAClC,SAAU,EAAA,SACV,SAAM,AAAA,EAAA,MAAA,GAAA,IAAE,EAAA,EAAA,CAAS,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-DOHoymBz.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,4 +1,4 @@
|
|
|
1
|
-
import { c as UploadItem, o as MultiUploadOptions } from "./index-
|
|
1
|
+
import { c as UploadItem, o as MultiUploadOptions } from "./index-DOHoymBz.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-CKbFC9WP.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CKbFC9WP.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,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CAAA,EAAA,CAAA,CAAA,KAAA,MAAA,EAAA,EAAA,GAAA,GAAA,CAAA,GAAA,SAAA;EAEC,oBAAA,CAAA,EAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,EAAA,GAAA,GAAA,CAAA,GAAA,SAAA;CACK,CAAA,EAAA;EACF,QAAA,EAAA,OAAA;EACF,QAAA,EAAA,OAAA;CACE,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,iCAAA,KAAA,EAAA,CAAA,CAAA,EAAA,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,10 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue1 from "vue";
|
|
2
2
|
import { App, InjectionKey, Ref } from "vue";
|
|
3
|
-
import * as _uploadista_client_browser0 from "@uploadista/client-browser";
|
|
4
3
|
import { BrowserUploadInput, FlowUploadConfig, MultiFlowUploadOptions, UploadOptions, UploadistaClientOptions, UploadistaEvent, createUploadistaClient } from "@uploadista/client-browser";
|
|
5
4
|
import { UploadFile } from "@uploadista/core/types";
|
|
6
|
-
import * as _uploadista_client_core0 from "@uploadista/client-core";
|
|
7
|
-
import * as _uploadista_core0 from "@uploadista/core";
|
|
8
5
|
|
|
9
6
|
//#region src/composables/plugin.d.ts
|
|
10
7
|
interface UploadistaPluginOptions extends UploadistaClientOptions {
|
|
@@ -172,7 +169,7 @@ interface DragDropState {
|
|
|
172
169
|
* ```
|
|
173
170
|
*/
|
|
174
171
|
declare function useDragDrop(options?: DragDropOptions): {
|
|
175
|
-
state: Readonly<
|
|
172
|
+
state: Readonly<vue1.Ref<{
|
|
176
173
|
readonly isDragging: boolean;
|
|
177
174
|
readonly isOver: boolean;
|
|
178
175
|
readonly isValid: boolean;
|
|
@@ -188,7 +185,7 @@ declare function useDragDrop(options?: DragDropOptions): {
|
|
|
188
185
|
onDragLeave: (event: DragEvent) => void;
|
|
189
186
|
onDrop: (event: DragEvent) => void;
|
|
190
187
|
onInputChange: (event: Event) => void;
|
|
191
|
-
inputProps:
|
|
188
|
+
inputProps: vue1.ComputedRef<{
|
|
192
189
|
type: "file";
|
|
193
190
|
multiple: boolean;
|
|
194
191
|
accept: string | undefined;
|
|
@@ -287,13 +284,13 @@ interface UseFlowUploadOptions<TOutput = UploadFile> {
|
|
|
287
284
|
* ```
|
|
288
285
|
*/
|
|
289
286
|
declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptions<TOutput>): {
|
|
290
|
-
state: Readonly<
|
|
287
|
+
state: Readonly<vue1.Ref<{
|
|
291
288
|
readonly status: FlowUploadStatus;
|
|
292
289
|
readonly progress: number;
|
|
293
290
|
readonly bytesUploaded: number;
|
|
294
291
|
readonly totalBytes: number | null;
|
|
295
292
|
readonly error: Error | null;
|
|
296
|
-
readonly result:
|
|
293
|
+
readonly result: vue1.DeepReadonly<vue1.UnwrapRef<TOutput>> | null;
|
|
297
294
|
readonly jobId: string | null;
|
|
298
295
|
readonly flowStarted: boolean;
|
|
299
296
|
readonly currentNodeName: string | null;
|
|
@@ -307,7 +304,7 @@ declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptio
|
|
|
307
304
|
readonly bytesUploaded: number;
|
|
308
305
|
readonly totalBytes: number | null;
|
|
309
306
|
readonly error: Error | null;
|
|
310
|
-
readonly result:
|
|
307
|
+
readonly result: vue1.DeepReadonly<vue1.UnwrapRef<TOutput>> | null;
|
|
311
308
|
readonly jobId: string | null;
|
|
312
309
|
readonly flowStarted: boolean;
|
|
313
310
|
readonly currentNodeName: string | null;
|
|
@@ -319,9 +316,9 @@ declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptio
|
|
|
319
316
|
upload: (file: File | Blob) => Promise<void>;
|
|
320
317
|
abort: () => void;
|
|
321
318
|
reset: () => void;
|
|
322
|
-
isUploading:
|
|
323
|
-
isUploadingFile:
|
|
324
|
-
isProcessing:
|
|
319
|
+
isUploading: vue1.ComputedRef<boolean>;
|
|
320
|
+
isUploadingFile: vue1.ComputedRef<boolean>;
|
|
321
|
+
isProcessing: vue1.ComputedRef<boolean>;
|
|
325
322
|
};
|
|
326
323
|
//#endregion
|
|
327
324
|
//#region src/composables/useMultiFlowUpload.d.ts
|
|
@@ -375,125 +372,7 @@ declare function useFlowUpload<TOutput = UploadFile>(options: UseFlowUploadOptio
|
|
|
375
372
|
* ```
|
|
376
373
|
*/
|
|
377
374
|
declare function useMultiFlowUpload(options: MultiFlowUploadOptions<BrowserUploadInput>): {
|
|
378
|
-
state: Readonly<
|
|
379
|
-
readonly items: readonly {
|
|
380
|
-
readonly id: string;
|
|
381
|
-
readonly file: {
|
|
382
|
-
readonly size: number;
|
|
383
|
-
readonly type: string;
|
|
384
|
-
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
385
|
-
readonly bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
386
|
-
readonly slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
387
|
-
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
388
|
-
readonly text: () => Promise<string>;
|
|
389
|
-
} | {
|
|
390
|
-
readonly lastModified: number;
|
|
391
|
-
readonly name: string;
|
|
392
|
-
readonly webkitRelativePath: string;
|
|
393
|
-
readonly size: number;
|
|
394
|
-
readonly type: string;
|
|
395
|
-
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
396
|
-
readonly bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
397
|
-
readonly slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
398
|
-
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
399
|
-
readonly text: () => Promise<string>;
|
|
400
|
-
};
|
|
401
|
-
readonly status: "pending" | "uploading" | "success" | "error" | "aborted";
|
|
402
|
-
readonly progress: number;
|
|
403
|
-
readonly bytesUploaded: number;
|
|
404
|
-
readonly totalBytes: number;
|
|
405
|
-
readonly error: Error | null;
|
|
406
|
-
readonly result: {
|
|
407
|
-
readonly id: string;
|
|
408
|
-
readonly offset: number;
|
|
409
|
-
readonly storage: {
|
|
410
|
-
readonly id: string;
|
|
411
|
-
readonly type: string;
|
|
412
|
-
readonly path?: string | undefined | undefined;
|
|
413
|
-
readonly uploadId?: string | undefined | undefined;
|
|
414
|
-
readonly bucket?: string | undefined | undefined;
|
|
415
|
-
};
|
|
416
|
-
readonly flow?: {
|
|
417
|
-
readonly flowId: string;
|
|
418
|
-
readonly nodeId: string;
|
|
419
|
-
readonly jobId: string;
|
|
420
|
-
} | undefined;
|
|
421
|
-
readonly size?: number | undefined | undefined;
|
|
422
|
-
readonly metadata?: {
|
|
423
|
-
readonly [x: string]: string | number | boolean;
|
|
424
|
-
} | undefined;
|
|
425
|
-
readonly creationDate?: string | undefined | undefined;
|
|
426
|
-
readonly url?: string | undefined | undefined;
|
|
427
|
-
readonly sizeIsDeferred?: boolean | undefined | undefined;
|
|
428
|
-
readonly checksum?: string | undefined | undefined;
|
|
429
|
-
readonly checksumAlgorithm?: string | undefined | undefined;
|
|
430
|
-
} | null;
|
|
431
|
-
readonly jobId: string | null;
|
|
432
|
-
}[];
|
|
433
|
-
readonly totalProgress: number;
|
|
434
|
-
readonly activeUploads: number;
|
|
435
|
-
readonly completedUploads: number;
|
|
436
|
-
readonly failedUploads: number;
|
|
437
|
-
}, {
|
|
438
|
-
readonly items: readonly {
|
|
439
|
-
readonly id: string;
|
|
440
|
-
readonly file: {
|
|
441
|
-
readonly size: number;
|
|
442
|
-
readonly type: string;
|
|
443
|
-
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
444
|
-
readonly bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
445
|
-
readonly slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
446
|
-
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
447
|
-
readonly text: () => Promise<string>;
|
|
448
|
-
} | {
|
|
449
|
-
readonly lastModified: number;
|
|
450
|
-
readonly name: string;
|
|
451
|
-
readonly webkitRelativePath: string;
|
|
452
|
-
readonly size: number;
|
|
453
|
-
readonly type: string;
|
|
454
|
-
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
455
|
-
readonly bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
456
|
-
readonly slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
457
|
-
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
458
|
-
readonly text: () => Promise<string>;
|
|
459
|
-
};
|
|
460
|
-
readonly status: "pending" | "uploading" | "success" | "error" | "aborted";
|
|
461
|
-
readonly progress: number;
|
|
462
|
-
readonly bytesUploaded: number;
|
|
463
|
-
readonly totalBytes: number;
|
|
464
|
-
readonly error: Error | null;
|
|
465
|
-
readonly result: {
|
|
466
|
-
readonly id: string;
|
|
467
|
-
readonly offset: number;
|
|
468
|
-
readonly storage: {
|
|
469
|
-
readonly id: string;
|
|
470
|
-
readonly type: string;
|
|
471
|
-
readonly path?: string | undefined | undefined;
|
|
472
|
-
readonly uploadId?: string | undefined | undefined;
|
|
473
|
-
readonly bucket?: string | undefined | undefined;
|
|
474
|
-
};
|
|
475
|
-
readonly flow?: {
|
|
476
|
-
readonly flowId: string;
|
|
477
|
-
readonly nodeId: string;
|
|
478
|
-
readonly jobId: string;
|
|
479
|
-
} | undefined;
|
|
480
|
-
readonly size?: number | undefined | undefined;
|
|
481
|
-
readonly metadata?: {
|
|
482
|
-
readonly [x: string]: string | number | boolean;
|
|
483
|
-
} | undefined;
|
|
484
|
-
readonly creationDate?: string | undefined | undefined;
|
|
485
|
-
readonly url?: string | undefined | undefined;
|
|
486
|
-
readonly sizeIsDeferred?: boolean | undefined | undefined;
|
|
487
|
-
readonly checksum?: string | undefined | undefined;
|
|
488
|
-
readonly checksumAlgorithm?: string | undefined | undefined;
|
|
489
|
-
} | null;
|
|
490
|
-
readonly jobId: string | null;
|
|
491
|
-
}[];
|
|
492
|
-
readonly totalProgress: number;
|
|
493
|
-
readonly activeUploads: number;
|
|
494
|
-
readonly completedUploads: number;
|
|
495
|
-
readonly failedUploads: number;
|
|
496
|
-
}>>;
|
|
375
|
+
state: Readonly<vue1.Ref<any, any>>;
|
|
497
376
|
addFiles: (files: File[] | FileList) => void;
|
|
498
377
|
removeFile: (id: string) => void;
|
|
499
378
|
startUpload: () => void;
|
|
@@ -501,7 +380,7 @@ declare function useMultiFlowUpload(options: MultiFlowUploadOptions<BrowserUploa
|
|
|
501
380
|
abortAll: () => void;
|
|
502
381
|
clear: () => void;
|
|
503
382
|
retryUpload: (id: string) => void;
|
|
504
|
-
isUploading:
|
|
383
|
+
isUploading: vue1.ComputedRef<boolean>;
|
|
505
384
|
};
|
|
506
385
|
//#endregion
|
|
507
386
|
//#region src/composables/useUpload.d.ts
|
|
@@ -582,75 +461,27 @@ interface UploadMetrics {
|
|
|
582
461
|
* ```
|
|
583
462
|
*/
|
|
584
463
|
declare function useUpload(options?: UploadOptions): {
|
|
585
|
-
state: Readonly<
|
|
464
|
+
state: Readonly<vue1.Ref<{
|
|
586
465
|
readonly status: UploadStatus;
|
|
587
466
|
readonly progress: number;
|
|
588
467
|
readonly bytesUploaded: number;
|
|
589
468
|
readonly totalBytes: number | null;
|
|
590
469
|
readonly error: Error | null;
|
|
591
|
-
readonly result:
|
|
592
|
-
readonly id: string;
|
|
593
|
-
readonly offset: number;
|
|
594
|
-
readonly storage: {
|
|
595
|
-
readonly id: string;
|
|
596
|
-
readonly type: string;
|
|
597
|
-
readonly path?: string | undefined | undefined;
|
|
598
|
-
readonly uploadId?: string | undefined | undefined;
|
|
599
|
-
readonly bucket?: string | undefined | undefined;
|
|
600
|
-
};
|
|
601
|
-
readonly flow?: {
|
|
602
|
-
readonly flowId: string;
|
|
603
|
-
readonly nodeId: string;
|
|
604
|
-
readonly jobId: string;
|
|
605
|
-
} | undefined;
|
|
606
|
-
readonly size?: number | undefined | undefined;
|
|
607
|
-
readonly metadata?: {
|
|
608
|
-
readonly [x: string]: string | number | boolean;
|
|
609
|
-
} | undefined;
|
|
610
|
-
readonly creationDate?: string | undefined | undefined;
|
|
611
|
-
readonly url?: string | undefined | undefined;
|
|
612
|
-
readonly sizeIsDeferred?: boolean | undefined | undefined;
|
|
613
|
-
readonly checksum?: string | undefined | undefined;
|
|
614
|
-
readonly checksumAlgorithm?: string | undefined | undefined;
|
|
615
|
-
} | null;
|
|
470
|
+
readonly result: UploadFile | null;
|
|
616
471
|
}, {
|
|
617
472
|
readonly status: UploadStatus;
|
|
618
473
|
readonly progress: number;
|
|
619
474
|
readonly bytesUploaded: number;
|
|
620
475
|
readonly totalBytes: number | null;
|
|
621
476
|
readonly error: Error | null;
|
|
622
|
-
readonly result:
|
|
623
|
-
readonly id: string;
|
|
624
|
-
readonly offset: number;
|
|
625
|
-
readonly storage: {
|
|
626
|
-
readonly id: string;
|
|
627
|
-
readonly type: string;
|
|
628
|
-
readonly path?: string | undefined | undefined;
|
|
629
|
-
readonly uploadId?: string | undefined | undefined;
|
|
630
|
-
readonly bucket?: string | undefined | undefined;
|
|
631
|
-
};
|
|
632
|
-
readonly flow?: {
|
|
633
|
-
readonly flowId: string;
|
|
634
|
-
readonly nodeId: string;
|
|
635
|
-
readonly jobId: string;
|
|
636
|
-
} | undefined;
|
|
637
|
-
readonly size?: number | undefined | undefined;
|
|
638
|
-
readonly metadata?: {
|
|
639
|
-
readonly [x: string]: string | number | boolean;
|
|
640
|
-
} | undefined;
|
|
641
|
-
readonly creationDate?: string | undefined | undefined;
|
|
642
|
-
readonly url?: string | undefined | undefined;
|
|
643
|
-
readonly sizeIsDeferred?: boolean | undefined | undefined;
|
|
644
|
-
readonly checksum?: string | undefined | undefined;
|
|
645
|
-
readonly checksumAlgorithm?: string | undefined | undefined;
|
|
646
|
-
} | null;
|
|
477
|
+
readonly result: UploadFile | null;
|
|
647
478
|
}>>;
|
|
648
479
|
upload: (file: UploadInput) => void;
|
|
649
480
|
abort: () => void;
|
|
650
481
|
reset: () => void;
|
|
651
482
|
retry: () => void;
|
|
652
|
-
isUploading:
|
|
653
|
-
canRetry:
|
|
483
|
+
isUploading: vue1.ComputedRef<boolean>;
|
|
484
|
+
canRetry: vue1.ComputedRef<boolean>;
|
|
654
485
|
metrics: UploadMetrics;
|
|
655
486
|
};
|
|
656
487
|
//#endregion
|
|
@@ -793,7 +624,7 @@ interface MultiUploadState {
|
|
|
793
624
|
* ```
|
|
794
625
|
*/
|
|
795
626
|
declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
796
|
-
state: Readonly<
|
|
627
|
+
state: Readonly<vue1.Ref<{
|
|
797
628
|
readonly total: number;
|
|
798
629
|
readonly completed: number;
|
|
799
630
|
readonly successful: number;
|
|
@@ -816,9 +647,12 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
816
647
|
readonly isUploading: boolean;
|
|
817
648
|
readonly isComplete: boolean;
|
|
818
649
|
}>>;
|
|
819
|
-
items: Readonly<
|
|
650
|
+
items: Readonly<vue1.Ref<readonly {
|
|
820
651
|
readonly id: string;
|
|
821
652
|
readonly file: {
|
|
653
|
+
readonly lastModified: number;
|
|
654
|
+
readonly name: string;
|
|
655
|
+
readonly webkitRelativePath: string;
|
|
822
656
|
readonly size: number;
|
|
823
657
|
readonly type: string;
|
|
824
658
|
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
@@ -827,9 +661,6 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
827
661
|
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
828
662
|
readonly text: () => Promise<string>;
|
|
829
663
|
} | {
|
|
830
|
-
readonly lastModified: number;
|
|
831
|
-
readonly name: string;
|
|
832
|
-
readonly webkitRelativePath: string;
|
|
833
664
|
readonly size: number;
|
|
834
665
|
readonly type: string;
|
|
835
666
|
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
@@ -844,35 +675,14 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
844
675
|
readonly bytesUploaded: number;
|
|
845
676
|
readonly totalBytes: number | null;
|
|
846
677
|
readonly error: Error | null;
|
|
847
|
-
readonly result:
|
|
848
|
-
readonly id: string;
|
|
849
|
-
readonly offset: number;
|
|
850
|
-
readonly storage: {
|
|
851
|
-
readonly id: string;
|
|
852
|
-
readonly type: string;
|
|
853
|
-
readonly path?: string | undefined | undefined;
|
|
854
|
-
readonly uploadId?: string | undefined | undefined;
|
|
855
|
-
readonly bucket?: string | undefined | undefined;
|
|
856
|
-
};
|
|
857
|
-
readonly flow?: {
|
|
858
|
-
readonly flowId: string;
|
|
859
|
-
readonly nodeId: string;
|
|
860
|
-
readonly jobId: string;
|
|
861
|
-
} | undefined;
|
|
862
|
-
readonly size?: number | undefined | undefined;
|
|
863
|
-
readonly metadata?: {
|
|
864
|
-
readonly [x: string]: string | number | boolean;
|
|
865
|
-
} | undefined;
|
|
866
|
-
readonly creationDate?: string | undefined | undefined;
|
|
867
|
-
readonly url?: string | undefined | undefined;
|
|
868
|
-
readonly sizeIsDeferred?: boolean | undefined | undefined;
|
|
869
|
-
readonly checksum?: string | undefined | undefined;
|
|
870
|
-
readonly checksumAlgorithm?: string | undefined | undefined;
|
|
871
|
-
} | null;
|
|
678
|
+
readonly result: UploadFile | null;
|
|
872
679
|
};
|
|
873
680
|
}[], readonly {
|
|
874
681
|
readonly id: string;
|
|
875
682
|
readonly file: {
|
|
683
|
+
readonly lastModified: number;
|
|
684
|
+
readonly name: string;
|
|
685
|
+
readonly webkitRelativePath: string;
|
|
876
686
|
readonly size: number;
|
|
877
687
|
readonly type: string;
|
|
878
688
|
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
@@ -881,9 +691,6 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
881
691
|
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
882
692
|
readonly text: () => Promise<string>;
|
|
883
693
|
} | {
|
|
884
|
-
readonly lastModified: number;
|
|
885
|
-
readonly name: string;
|
|
886
|
-
readonly webkitRelativePath: string;
|
|
887
694
|
readonly size: number;
|
|
888
695
|
readonly type: string;
|
|
889
696
|
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
@@ -898,31 +705,7 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
898
705
|
readonly bytesUploaded: number;
|
|
899
706
|
readonly totalBytes: number | null;
|
|
900
707
|
readonly error: Error | null;
|
|
901
|
-
readonly result:
|
|
902
|
-
readonly id: string;
|
|
903
|
-
readonly offset: number;
|
|
904
|
-
readonly storage: {
|
|
905
|
-
readonly id: string;
|
|
906
|
-
readonly type: string;
|
|
907
|
-
readonly path?: string | undefined | undefined;
|
|
908
|
-
readonly uploadId?: string | undefined | undefined;
|
|
909
|
-
readonly bucket?: string | undefined | undefined;
|
|
910
|
-
};
|
|
911
|
-
readonly flow?: {
|
|
912
|
-
readonly flowId: string;
|
|
913
|
-
readonly nodeId: string;
|
|
914
|
-
readonly jobId: string;
|
|
915
|
-
} | undefined;
|
|
916
|
-
readonly size?: number | undefined | undefined;
|
|
917
|
-
readonly metadata?: {
|
|
918
|
-
readonly [x: string]: string | number | boolean;
|
|
919
|
-
} | undefined;
|
|
920
|
-
readonly creationDate?: string | undefined | undefined;
|
|
921
|
-
readonly url?: string | undefined | undefined;
|
|
922
|
-
readonly sizeIsDeferred?: boolean | undefined | undefined;
|
|
923
|
-
readonly checksum?: string | undefined | undefined;
|
|
924
|
-
readonly checksumAlgorithm?: string | undefined | undefined;
|
|
925
|
-
} | null;
|
|
708
|
+
readonly result: UploadFile | null;
|
|
926
709
|
};
|
|
927
710
|
}[]>>;
|
|
928
711
|
addFiles: (files: UploadInput[]) => void;
|
|
@@ -938,6 +721,9 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
938
721
|
getItemsByStatus: (status: UploadStatus) => {
|
|
939
722
|
id: string;
|
|
940
723
|
file: {
|
|
724
|
+
readonly lastModified: number;
|
|
725
|
+
readonly name: string;
|
|
726
|
+
readonly webkitRelativePath: string;
|
|
941
727
|
readonly size: number;
|
|
942
728
|
readonly type: string;
|
|
943
729
|
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
@@ -946,9 +732,6 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
946
732
|
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
947
733
|
text: () => Promise<string>;
|
|
948
734
|
} | {
|
|
949
|
-
readonly lastModified: number;
|
|
950
|
-
readonly name: string;
|
|
951
|
-
readonly webkitRelativePath: string;
|
|
952
735
|
readonly size: number;
|
|
953
736
|
readonly type: string;
|
|
954
737
|
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
@@ -963,29 +746,7 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
963
746
|
bytesUploaded: number;
|
|
964
747
|
totalBytes: number | null;
|
|
965
748
|
error: Error | null;
|
|
966
|
-
result:
|
|
967
|
-
id: string;
|
|
968
|
-
offset: number;
|
|
969
|
-
storage: {
|
|
970
|
-
id: string;
|
|
971
|
-
type: string;
|
|
972
|
-
path?: string | undefined | undefined;
|
|
973
|
-
uploadId?: string | undefined | undefined;
|
|
974
|
-
bucket?: string | undefined | undefined;
|
|
975
|
-
};
|
|
976
|
-
flow?: {
|
|
977
|
-
flowId: string;
|
|
978
|
-
nodeId: string;
|
|
979
|
-
jobId: string;
|
|
980
|
-
} | undefined;
|
|
981
|
-
size?: number | undefined | undefined;
|
|
982
|
-
metadata?: Record<string, string | number | boolean> | undefined;
|
|
983
|
-
creationDate?: string | undefined | undefined;
|
|
984
|
-
url?: string | undefined | undefined;
|
|
985
|
-
sizeIsDeferred?: boolean | undefined | undefined;
|
|
986
|
-
checksum?: string | undefined | undefined;
|
|
987
|
-
checksumAlgorithm?: string | undefined | undefined;
|
|
988
|
-
} | null;
|
|
749
|
+
result: UploadFile | null;
|
|
989
750
|
};
|
|
990
751
|
}[];
|
|
991
752
|
metrics: UploadMetrics;
|
|
@@ -1019,125 +780,7 @@ declare function useMultiUpload(options?: MultiUploadOptions): {
|
|
|
1019
780
|
* ```
|
|
1020
781
|
*/
|
|
1021
782
|
declare function useUploadistaClient(): {
|
|
1022
|
-
client:
|
|
1023
|
-
upload: (file: _uploadista_client_browser0.BrowserUploadInput, {
|
|
1024
|
-
uploadLengthDeferred,
|
|
1025
|
-
uploadSize,
|
|
1026
|
-
onProgress,
|
|
1027
|
-
onChunkComplete,
|
|
1028
|
-
onSuccess,
|
|
1029
|
-
onShouldRetry,
|
|
1030
|
-
onError
|
|
1031
|
-
}?: _uploadista_client_core0.UploadistaUploadOptions) => Promise<{
|
|
1032
|
-
abort: () => void;
|
|
1033
|
-
}>;
|
|
1034
|
-
uploadWithFlow: (file: _uploadista_client_browser0.BrowserUploadInput, flowConfig: _uploadista_client_core0.FlowUploadConfig, {
|
|
1035
|
-
onProgress,
|
|
1036
|
-
onChunkComplete,
|
|
1037
|
-
onSuccess,
|
|
1038
|
-
onShouldRetry,
|
|
1039
|
-
onJobStart,
|
|
1040
|
-
onError
|
|
1041
|
-
}?: Omit<_uploadista_client_core0.UploadistaUploadOptions, "uploadLengthDeferred" | "uploadSize" | "metadata">) => Promise<{
|
|
1042
|
-
abort: () => Promise<void>;
|
|
1043
|
-
pause: () => Promise<_uploadista_core0.FlowJob>;
|
|
1044
|
-
jobId: string;
|
|
1045
|
-
}>;
|
|
1046
|
-
abort: (params: Parameters<({
|
|
1047
|
-
uploadId,
|
|
1048
|
-
uploadIdStorageKey,
|
|
1049
|
-
retryTimeout,
|
|
1050
|
-
shouldTerminate,
|
|
1051
|
-
abortController,
|
|
1052
|
-
uploadistaApi,
|
|
1053
|
-
platformService,
|
|
1054
|
-
retryDelays,
|
|
1055
|
-
clientStorage
|
|
1056
|
-
}: {
|
|
1057
|
-
uploadId: string;
|
|
1058
|
-
uploadIdStorageKey: string | undefined;
|
|
1059
|
-
retryTimeout: _uploadista_client_core0.Timeout | null;
|
|
1060
|
-
shouldTerminate: boolean;
|
|
1061
|
-
abortController: _uploadista_client_core0.AbortControllerLike;
|
|
1062
|
-
uploadistaApi: _uploadista_client_core0.UploadistaApi;
|
|
1063
|
-
platformService: _uploadista_client_core0.PlatformService;
|
|
1064
|
-
retryDelays?: number[];
|
|
1065
|
-
clientStorage: _uploadista_client_core0.ClientStorage;
|
|
1066
|
-
}) => Promise<void>>[0]) => Promise<void>;
|
|
1067
|
-
getFlow: (flowId: string) => Promise<{
|
|
1068
|
-
status: number;
|
|
1069
|
-
flow: _uploadista_core0.FlowData;
|
|
1070
|
-
}>;
|
|
1071
|
-
runFlow: ({
|
|
1072
|
-
flowId,
|
|
1073
|
-
inputs,
|
|
1074
|
-
storageId: flowStorageId
|
|
1075
|
-
}: {
|
|
1076
|
-
flowId: string;
|
|
1077
|
-
inputs: Record<string, unknown>;
|
|
1078
|
-
storageId?: string;
|
|
1079
|
-
}) => Promise<{
|
|
1080
|
-
status: number;
|
|
1081
|
-
job: _uploadista_core0.FlowJob;
|
|
1082
|
-
}>;
|
|
1083
|
-
resumeFlow: ({
|
|
1084
|
-
jobId,
|
|
1085
|
-
nodeId,
|
|
1086
|
-
newData,
|
|
1087
|
-
contentType
|
|
1088
|
-
}: {
|
|
1089
|
-
jobId: string;
|
|
1090
|
-
nodeId: string;
|
|
1091
|
-
newData: unknown;
|
|
1092
|
-
contentType?: "application/json" | "application/octet-stream";
|
|
1093
|
-
}) => Promise<_uploadista_core0.FlowJob>;
|
|
1094
|
-
pauseFlow: (jobId: string) => Promise<_uploadista_core0.FlowJob>;
|
|
1095
|
-
cancelFlow: (jobId: string) => Promise<_uploadista_core0.FlowJob>;
|
|
1096
|
-
getJobStatus: (jobId: string) => Promise<_uploadista_core0.FlowJob>;
|
|
1097
|
-
openUploadWebSocket: (uploadId: string) => Promise<_uploadista_client_core0.WebSocketLike>;
|
|
1098
|
-
openFlowWebSocket: (jobId: string) => Promise<_uploadista_client_core0.WebSocketLike>;
|
|
1099
|
-
openWebSocket: (id: string) => Promise<_uploadista_client_core0.WebSocketLike>;
|
|
1100
|
-
closeWebSocket: (id: string) => void;
|
|
1101
|
-
closeAllWebSockets: () => void;
|
|
1102
|
-
sendPing: (jobId: string) => boolean;
|
|
1103
|
-
isWebSocketConnected: (id: string) => boolean;
|
|
1104
|
-
getWebSocketConnectionCount: () => number;
|
|
1105
|
-
getWebSocketConnectionCountByType: () => {
|
|
1106
|
-
upload: number;
|
|
1107
|
-
flow: number;
|
|
1108
|
-
total: number;
|
|
1109
|
-
};
|
|
1110
|
-
getNetworkMetrics: () => _uploadista_client_core0.NetworkMetrics;
|
|
1111
|
-
getNetworkCondition: () => _uploadista_client_core0.NetworkCondition;
|
|
1112
|
-
getChunkingInsights: () => _uploadista_client_core0.PerformanceInsights;
|
|
1113
|
-
exportMetrics: () => {
|
|
1114
|
-
session: Partial<_uploadista_client_core0.UploadSessionMetrics>;
|
|
1115
|
-
chunks: _uploadista_client_core0.ChunkMetrics[];
|
|
1116
|
-
insights: _uploadista_client_core0.PerformanceInsights;
|
|
1117
|
-
};
|
|
1118
|
-
getConnectionMetrics: () => _uploadista_client_core0.ConnectionMetrics;
|
|
1119
|
-
getDetailedConnectionMetrics: () => _uploadista_client_core0.DetailedConnectionMetrics;
|
|
1120
|
-
warmupConnections: (urls: string[]) => Promise<void>;
|
|
1121
|
-
getConnectionPoolingInsights: () => Promise<{
|
|
1122
|
-
isOptimized: boolean;
|
|
1123
|
-
reuseRate: number;
|
|
1124
|
-
recommendedMinChunkSize: number;
|
|
1125
|
-
connectionOverhead: number;
|
|
1126
|
-
}>;
|
|
1127
|
-
resetMetrics: () => Promise<void>;
|
|
1128
|
-
validateConfiguration: (options: _uploadista_client_core0.UploadistaClientOptions<_uploadista_client_browser0.BrowserUploadInput>) => {
|
|
1129
|
-
valid: boolean;
|
|
1130
|
-
errors: string[];
|
|
1131
|
-
warnings: string[];
|
|
1132
|
-
};
|
|
1133
|
-
validateConfigurationAsync: (options: _uploadista_client_core0.UploadistaClientOptions<_uploadista_client_browser0.BrowserUploadInput>) => Promise<{
|
|
1134
|
-
valid: boolean;
|
|
1135
|
-
errors: string[];
|
|
1136
|
-
warnings: string[];
|
|
1137
|
-
capabilities: _uploadista_core0.DataStoreCapabilities;
|
|
1138
|
-
}>;
|
|
1139
|
-
getCapabilities: () => Promise<_uploadista_core0.DataStoreCapabilities>;
|
|
1140
|
-
};
|
|
783
|
+
client: any;
|
|
1141
784
|
subscribeToEvents: (handler: (event: UploadistaEvent) => void) => () => void;
|
|
1142
785
|
};
|
|
1143
786
|
type UseUploadistaClientReturn = ReturnType<typeof useUploadistaClient>;
|
|
@@ -1304,7 +947,7 @@ interface UseUploadMetricsOptions {
|
|
|
1304
947
|
* ```
|
|
1305
948
|
*/
|
|
1306
949
|
declare function useUploadMetrics(options?: UseUploadMetricsOptions): {
|
|
1307
|
-
metrics: Readonly<
|
|
950
|
+
metrics: Readonly<vue1.Ref<{
|
|
1308
951
|
readonly totalBytesUploaded: number;
|
|
1309
952
|
readonly totalBytes: number;
|
|
1310
953
|
readonly averageSpeed: number;
|
|
@@ -1343,7 +986,7 @@ declare function useUploadMetrics(options?: UseUploadMetricsOptions): {
|
|
|
1343
986
|
}[];
|
|
1344
987
|
readonly chunkMetrics: readonly any[];
|
|
1345
988
|
}>>;
|
|
1346
|
-
fileMetrics: Readonly<
|
|
989
|
+
fileMetrics: Readonly<vue1.Ref<readonly {
|
|
1347
990
|
readonly id: string;
|
|
1348
991
|
readonly filename: string;
|
|
1349
992
|
readonly size: number;
|
|
@@ -1419,4 +1062,4 @@ declare function useUploadMetrics(options?: UseUploadMetricsOptions): {
|
|
|
1419
1062
|
};
|
|
1420
1063
|
//#endregion
|
|
1421
1064
|
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-
|
|
1065
|
+
//# sourceMappingURL=index-DOHoymBz.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DOHoymBz.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;;;;EAAhC,OAAA,CAAA,EAIL,uBAJ6B,CAAA,SAI7B,CAAA;AAGZ;AACoB,cADP,qBACO,EADgB,YAChB,CAAlB,UAAkB,CAAA,OAAA,sBAAA,CAAA,CAAA;AAAlB,cAGW,gCAHX,EAG6C,YAH7C,CAIA,GAJA,CAII,GAJJ,CAAA,CAAA,KAAA,EAIgB,eAJhB,EAAA,GAAA,IAAA,CAAA,CAAA,CAAA;;;AAGF;;;;;;AAiCA;;;;AClDA;AA0CA;AAmGA;;;;;;;;;;;;;;;ACpHY,iBFyBI,sBAAA,CEzBY,OAAA,EFyBoB,uBEzBpB,CAAA,EAAA;EAQX,OAAA,CAAA,GAAA,EFmBA,GEnBA,CAAA,EAAe,IAAA;CAAW;;;UDjC1B,eAAA;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A,qBAAA;MAKc,cAAA,EAAR,OAAQ,CAAA,sBAAA,CAAA,EAAA;MAAR,YAAA,EAKF,cALE,EAAA;IAKF,CAAA;IAAY,KAAA,EAAA"}
|
|
@@ -20,8 +20,8 @@ declare const __VLS_base: vue18.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue
|
|
|
20
20
|
}, string, vue18.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
21
|
onEvent?: ((event: UploadistaEvent) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
uploadistaBasePath: string;
|
|
24
23
|
storageId: string;
|
|
24
|
+
uploadistaBasePath: string;
|
|
25
25
|
chunkSize: number;
|
|
26
26
|
parallelUploads: number;
|
|
27
27
|
storeFingerprintForResuming: boolean;
|
|
@@ -36,4 +36,4 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
36
36
|
//# sourceMappingURL=UploadistaProvider.vue.d.ts.map
|
|
37
37
|
//#endregion
|
|
38
38
|
export { _default as t };
|
|
39
|
-
//# sourceMappingURL=index-
|
|
39
|
+
//# sourceMappingURL=index-DkJiYi3_.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DkJiYi3_.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,SAAA,EAAA,MAAA;EAKV,kBAAoE,EAAA,MAAA;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"}
|
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-
|
|
3
|
-
import { t as _default$4 } from "./index-
|
|
1
|
+
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "./index-CKbFC9WP.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-DOHoymBz.mjs";
|
|
3
|
+
import { t as _default$4 } from "./index-DkJiYi3_.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "../index-
|
|
1
|
+
import { t as _default } from "../index-DkJiYi3_.mjs";
|
|
2
2
|
export { _default as UploadistaProvider };
|
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.9",
|
|
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/core": "0.0.
|
|
35
|
-
"@uploadista/client-browser": "0.0.
|
|
34
|
+
"@uploadista/core": "0.0.9",
|
|
35
|
+
"@uploadista/client-browser": "0.0.9"
|
|
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": "
|
|
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.9"
|
|
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,IAAM,E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,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-Di33Lq49.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,C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,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"}
|