PageSourceSearch

https://app.propell.co.uk/_next/static/chunks/pages/documents/recycle-bin-b630b17ddd7ba762.js

js propell.co.uk collected 2026-10-02 01:11:02 UTC 7,529 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2016],{29532:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents/recycle-bin",function(){return t(47972)}])},47972:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>I});var a=t(37876),i=t(14232),o=t(77328),s=t.n(o),r=t(17439),n=t(78625),d=t(85461),c=t(75897),m=t(39456),u=t(86174),p=t(20951),f=t(44603),v=t(98727),x=t(1200),w=t(88605),h=t(63663),y=t(86566),N=t(87525),g=t(73072),b=t(6769),j=t(9734),C=t(4626),M=t(95836),T=t(71127),A=t(68622),D=t(13866);let E=[{label:"Name",value:"name"},{label:"Last Modified",value:"lastModified"},{label:"Type",value:"type"},{label:"Size",value:"size"}],k=function(){let e=(0,r.ab)(),[l,t]=(0,i.useState)([]),{toast:o}=(0,n.dj)(),s=(0,d.jE)(),k=(0,c.A)(),[S,P]=(0,T.tg)(),[F,I]=(0,i.useState)({addFolderModal:!1,sendBin:!1}),{data:_}=(0,b.lX)({filter:{isDeleted:!0}});(0,i.useEffect)(()=>()=>{P("")},[P]);let K=p.S.documents.softDeleteDocument.useMutation({onSuccess:()=>{["customDocuments","favouriteCustomDocuments","customDocumentFolders"].forEach(e=>{s.invalidateQueries({queryKey:[e]})})},onError:e=>{var l,t;console.error(e),o({title:"Error",description:null!=(t=null==e||null==(l=e.body)?void 0:l.error)?t:"Failed to restore document/file.",variant:"destructive"})}}),R=p.S.users.setDocumentMode.useMutation({onSuccess:()=>{s.invalidateQueries({queryKey:["document-mode"]})},onError:e=>{console.error(e),o({title:"Error",description:"Failed to update document mode",variant:"destructive"})}}),B=(0,i.useMemo)(()=>[{id:"fileName",header:"File Name",meta:{className:k?"w-[36%]":"w-[30%]"},cell:e=>{var l,t,i;let{row:s}=e;if((null==(l=s.original)?void 0:l.itemType)==="category")return(0,a.jsxs)("div",{className:"group/cell flex w-fit cursor-pointer items-center py-2",onClick:e=>{e.stopPropagation(),o({title:"Error",description:"Please restore the folder first to view content.",variant:"destructive"})},children:[(0,a.jsx)(f.A,{className:"w-[16px]"}),(0,a.jsx)("span",{className:"ml-4 max-w-[200px] overflow-x-hidden overflow-ellipsis whitespace-nowrap text-sm font-bold leading-[1.2] text-secondary-white-500 group-hover/cell:underline",children:null==(t=s.original)?void 0:t.name})]});if((null==(i=s.original)?void 0:i.itemType)==="file"){let e=s.original.originData,l=null==e?void 0:e.fileName,t=(null==e?void 0:e.documentTitleManually)||(null==e?void 0:e.documentTitle)||"";return(0,a.jsxs)("div",{className:"group/cell flex w-fit cursor-pointer items-center py-2",onClick:e=>{e.stopPropagation(),o({title:"Error",description:"Please restore the document first to view content",variant:"destructive"})},children:[(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(j.A,{fileName:null!=l?l:"",wrapperClassName:"!h-[24px] !w-auto",className:"h-[24px]"})}),(0,a.jsx)("span",{className:"ml-4 max-w-[15vw] overflow-x-hidden overflow-ellipsis whitespace-nowrap text-sm font-bold leading-[1.2] text-secondary-white-500 group-hover/cell:underline",children:t})]})}}},{accessorKey:"lastModified",meta:{className:"w-[20%]"},header:"Last Modified"},{accessorKey:"itemType",header:"Type",meta:{className:"w-[15%]"},cell:e=>{let{row:l}=e;return(0,a.jsx)("span",{className:"text-sm text-secondary-white-500",children:"file"===l.getValue("itemType")?"Document":"Folder"})}},{accessorKey:"size",header:"Size",meta:{className:"w-[15%]"}},{accessorKey:"sharing",header:"Sharing",meta:{className:"w-[10%]"}}],[k]),L=(0,i.useMemo)(()=>[...(null!=_?_:[]).filter(e=>{var l,t;return(null==(l=e.documentTitle)?void 0:l.toLowerCase().includes(S.toLowerCase()))||(null==(t=e.documentTitleManually)?void 0:t.toLowerCase().includes(S.toLowerCase()))}).map(e=>{var l,t;return{id:"".concat(e.documentId),renderId:"".concat(e.fileName?"file-":"category-").concat(e.documentId),itemType:e.fileName?"file":"category",name:e.documentTitle||e.documentTitleManually||"",lastModified:e.fileName?(0,C.GP)(null!=(t=null!=(l=e.createdAt)?l:e.updatedAt)?t:"","dd/MM/yyyy HH:mm"):"--",size:e.fileName?(0,M.v)(e.fileSize):"--",sharing:"--",originData:{...e}}})],[_,S]),z=(0,i.useCallback)(()=>{let e=l.map(e=>({documentId:parseFloat(e.split("-").pop()),isDeleted:!1}));e.length>0&&K.mutate({body:e})},[L,l]),Q=(0,i.useMemo)(()=>[{value:"restore",label:"Restore",disabled:0===l.length,icon:(0,a.jsx)(v.A,{isStroke:!0,className:"w-5"}),onClick:()=>z()},{value:"delete",label:"Permanently Delete",disabled:0===l.length,icon:(0,a.jsx)(x.A,{isStroke:!0,className:"w-5"}),onClick:()=>{I(e=>({...e,sendBin:!0}))}},{value:"download",label:"Download",disabled:!0,icon:(0,a.jsx)(w.A,{isStroke:!0,className:"w-5"})}],[l.length,z]),G=(0,i.useMemo)(()=>({table:{tableWrapperClassName:"max-laptop:overflow-visible",fixedLayout:!0,headerRowClassName:"border-none",bodyRowClassName:"border-none cursor-pointer",columns:B,renderMobileRowItem:e=>(0,a.jsxs)("div",{className:"group/cell flex w-fit cursor-pointer items-center py-2",onClick:e=>{e.stopPropagation(),o({title:"Error",description:"Please restore the folder first to view content.",variant:"destructive"})},children:[(0,a.jsx)(f.A,{className:"w-[16px]"}),(0,a.jsx)("span",{className:"ml-4 max-w-[calc(100vw-220px)] overflow-x-hidden overflow-ellipsis whitespace-nowrap text-sm font-bold leading-[1.2] text-secondary-white-500 group-hover/cell:underline",children:null==e?void 0:e.name})]})},grid:{gridWrapperClassName:"max-laptop:overflow-visible",gridItemLabelKey:"name",onGridItemClick:()=>{o({title:"Error",description:"Please restore the folder first to view content.",variant:"destructive"})},gridItemIcon:e=>{var l,t;return(0,a.jsxs)(a.Fragment,{children:["file"!==e.itemType&&(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(f.A,{className:"w-[90px]"})}),"file"===e.itemType&&(0,a.jsx)(j.A,{className:"w-[90px]",fileName:null!=(t=null==(l=e.originData)?void 0:l.fileName)?t:""})]})}}}),[B]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A.Tf,{Icon:D.A,headingText:"Recycle Bin",iconClassName:A.Km,classNameContainer:"shrink-0 max-tablet:mx-0"}),(0,a.jsxs)(m.A,{children:[(0,a.jsx)("div",{className:"mb-5 flex w-full flex-shrink-0 items-center justify-between laptop:mb-7",children:(0,a.jsx)("span",{className:"text-sm font-bold",children:"Recycle Bin"})}),(0,a.jsx)(u.A,{}),(0,a.jsx)("div",{className:"flex min-h-0 w-full flex-1 overflow-hidden max-la
1ptop:flex-none max-laptop:overflow-visible",children:(0,a.jsx)("div",{className:"h-full min-h-0 w-full overflow-hidden max-laptop:h-auto max-laptop:overflow-visible",children:(0,a.jsx)(h.A,{dragDrop:{enable:!1},actions:Q,viewMode:e===g.DocumentModeEnum.Files?y.Q.Grid:y.Q.Table,onViewModeChange:e=>{var l;return l=e===y.Q.Table?g.DocumentModeEnum.Rows:g.DocumentModeEnum.Files,void R.mutate({body:{documentMode:l}})},viewSetting:G,sortingColumnOptions:[...E],selectable:!0,idKey:"renderId",showActionBar:!0,selectedRowKey:l,onSelect:e=>{var l;return l=e.renderId,void t(e=>e.includes(l)?e.filter(e=>e!==l):[...e,l])},data:L})})}),(0,a.jsx)(N.A,{isRecycleBin:!0,items:l,open:F.sendBin,onClose:()=>I(e=>({...e,sendBin:!1}))})]})]})};var S=t(93350),P=t(99977),F=t(68082);let I=function(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s(),{children:[(0,a.jsx)("title",{children:"Propell - Documents"}),(0,a.jsx)("meta",{name:"description",content:"Propell"})]}),(0,a.jsx)(S.A,{children:(0,a.jsx)(P.W,{children:(0,a.jsx)(F.A,{className:"mx-[1vw] flex min-h-0 flex-1 flex-col overflow-hidden max-tablet:px-[2vw]",children:(0,a.jsx)(k,{})})})})]})}}},e=>{e.O(0,[4664,7459,3663,8595,636,6593,8792],()=>e(e.s=29532)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.