From d9710475500dc61cefb3c216e9a02cbe8a459db8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 13 Aug 2024 10:12:33 +0200 Subject: [PATCH] chore: Compile assets Signed-off-by: Ferdinand Thiessen --- dist/files_trashbin-init.js | 4 ++-- dist/files_trashbin-init.js.map | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/files_trashbin-init.js b/dist/files_trashbin-init.js index ae819b2178ce1..0b37e1e60385a 100644 --- a/dist/files_trashbin-init.js +++ b/dist/files_trashbin-init.js @@ -1,3 +1,3 @@ /*! For license information please see files_trashbin-init.js.LICENSE.txt */ -(()=>{"use strict";var e,t={29276:(e,t,n)=>{var i=n(85072),r=n.n(i),o=n(97825),s=n.n(o),l=n(77659),a=n.n(l),d=n(55056),c=n.n(d),u=n(10540),p=n.n(u),v=n(41113),h=n.n(v),f=n(98290),b={};b.styleTagTransform=h(),b.setAttributes=c(),b.insert=a().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=p(),r()(f.A,b),f.A&&f.A.locals&&f.A.locals;var m,g=n(53334),w=n(19231),y=n(78791),A=n(63814),x=n(21777),_=n(44719);const C="/trashbin/".concat(null===(m=(0,x.HW)())||void 0===m?void 0:m.uid,"/trash"),T=(0,A.dC)("dav"+C),H=(0,_.UU)(T),O=e=>{H.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:null!=e?e:""})};(0,x.zo)(O),O((0,x.do)());const L=H,S='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t").concat((0,y.VX)(),"\n\t\n"),P=function(e){var t,n,i,r,o;const s=(0,y.vb)(null===(t=e.props)||void 0===t?void 0:t.permissions),l=null===(n=(0,x.HW)())||void 0===n?void 0:n.uid,a=(0,A.Jv)("/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32",e.props),d={id:(null===(i=e.props)||void 0===i?void 0:i.fileid)||0,source:(0,A.dC)("dav"+C+e.filename),mime:e.mime,size:(null===(r=e.props)||void 0===r?void 0:r.size)||0,permissions:s,owner:l,root:C,attributes:{...e,...e.props,displayName:null===(o=e.props)||void 0===o?void 0:o["trashbin-filename"],previewUrl:a}};return delete d.attributes.props,"file"===e.type?new y.ZH(d):new y.vd(d)};var j=n(61338),k=n(26287);const M=(0,n(53529).YK)().setApp("files").detectUser().build();var V=n(71225);(0,y.Gg)(new y.hY({id:"restore",displayName:()=>(0,g.Tl)("files_trashbin","Restore"),iconSvgInline:()=>'',enabled:(e,t)=>"trashbin"===t.id&&e.length>0&&e.map((e=>e.permissions)).every((e=>!!(e&y.aX.READ))),async exec(e){try{var t;const n=(0,A.dC)((0,V.O0)("dav/trashbin/".concat(null===(t=(0,x.HW)())||void 0===t?void 0:t.uid,"/restore/").concat(e.basename)));return await(0,k.A)({method:"MOVE",url:e.encodedSource,headers:{destination:n}}),(0,j.Ic)("files:node:deleted",e),!0}catch(e){return M.error(e),!1}},async execBatch(e,t,n){return Promise.all(e.map((e=>this.exec(e,t,n))))},order:1,inline:()=>!0}));const E=e=>{var t,n;const i=void 0!==(null===(t=e.attributes)||void 0===t?void 0:t["trashbin-original-location"])?String(null===(n=e.attributes)||void 0===n?void 0:n["trashbin-original-location"]):null;if(!i)return(0,g.Tl)("files_trashbin","Unknown");const r=(0,V.pD)(i);return r===i?(0,g.Tl)("files_trashbin","All files"):(0,V.HS)((0,g.Tl)("files_trashbin","All files"),r)};(0,y.bh)().register(new y.Ss({id:"trashbin",name:(0,g.Tl)("files_trashbin","Deleted files"),caption:(0,g.Tl)("files_trashbin","List of files that have been deleted."),emptyTitle:(0,g.Tl)("files_trashbin","No deleted files"),emptyCaption:(0,g.Tl)("files_trashbin","Files and folders you have deleted will show up here"),icon:'',order:50,sticky:!0,defaultSortKey:"deleted",columns:[new y.VP({id:"original-location",title:(0,g.Tl)("files_trashbin","Original location"),render(e){const t=E(e),n=document.createElement("span");return n.title=t,n.textContent=t,n},sort(e,t){const n=E(e),i=E(t);return n.localeCompare(i)}}),new y.VP({id:"deleted",title:(0,g.Tl)("files_trashbin","Deleted"),render(e){var t;const n=null===(t=e.attributes)||void 0===t?void 0:t["trashbin-deletion-time"],i=document.createElement("span");return n?(i.title=w.A.unix(n).format("LLL"),i.textContent=w.A.unix(n).fromNow(),i):(i.textContent=(0,g.Tl)("files_trashbin","A long time ago"),i)},sort(e,t){var n,i;const r=(null===(n=e.attributes)||void 0===n?void 0:n["trashbin-deletion-time"])||(null==e?void 0:e.mtime)||0;return((null===(i=t.attributes)||void 0===i?void 0:i["trashbin-deletion-time"])||(null==t?void 0:t.mtime)||0)-r}})],getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=await L.stat(e,{details:!0,data:S}),n=await L.getDirectoryContents(e,{details:!0,data:S});return{folder:P(t.data),contents:n.data.map(P)}}}))},98290:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(71354),r=n.n(i),o=n(76314),s=n.n(o)()(r());s.push([e.id,".files-list__row-trashbin-original-location{width:150px !important}","",{version:3,sources:["webpack://./apps/files_trashbin/src/trashbin.scss"],names:[],mappings:"AAAA,4CACE,sBAAA",sourcesContent:[".files-list__row-trashbin-original-location {\n width: 150px !important;\n}\n"],sourceRoot:""}]);const l=s}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(c=0;c=o)&&Object.keys(i.O).every((e=>i.O[e](n[a])))?n.splice(a--,1):(l=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.e=()=>Promise.resolve(),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=2573,(()=>{i.b=document.baseURI||self.location.href;var e={2573:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,s=n[0],l=n[1],a=n[2],d=0;if(s.some((t=>0!==e[t]))){for(r in l)i.o(l,r)&&(i.m[r]=l[r]);if(a)var c=a(i)}for(t&&t(n);di(29276)));r=i.O(r)})(); -//# sourceMappingURL=files_trashbin-init.js.map?v=70a9f636c8c504cb7f54 \ No newline at end of file +(()=>{"use strict";var e,t={29276:(e,t,n)=>{var i=n(85072),r=n.n(i),o=n(97825),l=n.n(o),s=n(77659),a=n.n(s),d=n(55056),c=n.n(d),u=n(10540),h=n.n(u),v=n(41113),f=n.n(v),p=n(98290),b={};b.styleTagTransform=f(),b.setAttributes=c(),b.insert=a().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=h(),r()(p.A,b),p.A&&p.A.locals&&p.A.locals;var m,g=n(53334),w=n(19231),A=n(78791),y=n(21777);const x="/trashbin/".concat(null===(m=(0,y.HW)())||void 0===m?void 0:m.uid,"/trash"),_=(0,A.H4)();var T=n(63814);const C='\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t").concat((0,A.VX)(),"\n\t\n"),O=e=>{const t=(0,A.Al)(e,x);return t.attributes.previewUrl=(0,T.Jv)("/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32",{fileid:t.fileid}),t};var H=n(61338),S=n(26287);const L=(0,n(53529).YK)().setApp("files").detectUser().build();var P=n(71225);(0,A.Gg)(new A.hY({id:"restore",displayName:()=>(0,g.Tl)("files_trashbin","Restore"),iconSvgInline:()=>'',enabled:(e,t)=>"trashbin"===t.id&&e.length>0&&e.map((e=>e.permissions)).every((e=>!!(e&A.aX.READ))),async exec(e){try{var t;const n=(0,T.dC)((0,P.O0)("dav/trashbin/".concat(null===(t=(0,y.HW)())||void 0===t?void 0:t.uid,"/restore/").concat(e.basename)));return await(0,S.A)({method:"MOVE",url:e.encodedSource,headers:{destination:n}}),(0,H.Ic)("files:node:deleted",e),!0}catch(e){return L.error(e),!1}},async execBatch(e,t,n){return Promise.all(e.map((e=>this.exec(e,t,n))))},order:1,inline:()=>!0}));const j=e=>{var t,n;const i=void 0!==(null===(t=e.attributes)||void 0===t?void 0:t["trashbin-original-location"])?String(null===(n=e.attributes)||void 0===n?void 0:n["trashbin-original-location"]):null;if(!i)return(0,g.Tl)("files_trashbin","Unknown");const r=(0,P.pD)(i);return r===i?(0,g.Tl)("files_trashbin","All files"):(0,P.HS)((0,g.Tl)("files_trashbin","All files"),r)};(0,A.bh)().register(new A.Ss({id:"trashbin",name:(0,g.Tl)("files_trashbin","Deleted files"),caption:(0,g.Tl)("files_trashbin","List of files that have been deleted."),emptyTitle:(0,g.Tl)("files_trashbin","No deleted files"),emptyCaption:(0,g.Tl)("files_trashbin","Files and folders you have deleted will show up here"),icon:'',order:50,sticky:!0,defaultSortKey:"deleted",columns:[new A.VP({id:"original-location",title:(0,g.Tl)("files_trashbin","Original location"),render(e){const t=j(e),n=document.createElement("span");return n.title=t,n.textContent=t,n},sort(e,t){const n=j(e),i=j(t);return n.localeCompare(i)}}),new A.VP({id:"deleted",title:(0,g.Tl)("files_trashbin","Deleted"),render(e){var t;const n=null===(t=e.attributes)||void 0===t?void 0:t["trashbin-deletion-time"],i=document.createElement("span");return n?(i.title=w.A.unix(n).format("LLL"),i.textContent=w.A.unix(n).fromNow(),i):(i.textContent=(0,g.Tl)("files_trashbin","A long time ago"),i)},sort(e,t){var n,i;const r=(null===(n=e.attributes)||void 0===n?void 0:n["trashbin-deletion-time"])||(null==e?void 0:e.mtime)||0;return((null===(i=t.attributes)||void 0===i?void 0:i["trashbin-deletion-time"])||(null==t?void 0:t.mtime)||0)-r}})],getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await _.getDirectoryContents("".concat(x).concat(e),{details:!0,data:C,includeSelf:!0})).data.map(O),[n]=t.splice(t.findIndex((t=>t.dirname===e)),1);return{folder:n,contents:t}}}))},98290:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(71354),r=n.n(i),o=n(76314),l=n.n(o)()(r());l.push([e.id,".files-list__row-trashbin-original-location{width:150px !important}","",{version:3,sources:["webpack://./apps/files_trashbin/src/trashbin.scss"],names:[],mappings:"AAAA,4CACE,sBAAA",sourcesContent:[".files-list__row-trashbin-original-location {\n width: 150px !important;\n}\n"],sourceRoot:""}]);const s=l}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=(t,n,r,o)=>{if(!n){var l=1/0;for(c=0;c=o)&&Object.keys(i.O).every((e=>i.O[e](n[a])))?n.splice(a--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.e=()=>Promise.resolve(),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=2573,(()=>{i.b=document.baseURI||self.location.href;var e={2573:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,l=n[0],s=n[1],a=n[2],d=0;if(l.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(a)var c=a(i)}for(t&&t(n);di(29276)));r=i.O(r)})(); +//# sourceMappingURL=files_trashbin-init.js.map?v=fdf0363ad4635bc39e33 \ No newline at end of file diff --git a/dist/files_trashbin-init.js.map b/dist/files_trashbin-init.js.map index 97fec829e6e31..05cf1ed912112 100644 --- a/dist/files_trashbin-init.js.map +++ b/dist/files_trashbin-init.js.map @@ -1 +1 @@ -{"version":3,"file":"files_trashbin-init.js?v=70a9f636c8c504cb7f54","mappings":";uBAAIA,4JCWAC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,+ECDnD,MAAMC,EAAW,aAAHC,OAAgC,QAAhCC,GAAgBC,EAAAA,EAAAA,aAAgB,IAAAD,OAAA,EAAhBA,EAAkBE,IAAG,UAC7CC,GAAUC,EAAAA,EAAAA,IAAkB,MAAQN,GAC3CO,GAASC,EAAAA,EAAAA,IAAaH,GAEtBI,EAAcC,IAChBH,EAAOE,WAAW,CAEd,mBAAoB,iBAEpBE,aAAcD,QAAAA,EAAS,IACzB,GAGNE,EAAAA,EAAAA,IAAqBH,GACrBA,GAAWI,EAAAA,EAAAA,OACX,UCpCMC,EAAO,sCAAHb,QACIc,EAAAA,EAAAA,MAAkB,0JAAAd,QAM5Be,EAAAA,EAAAA,MAAkB,gCAGhBC,EAAe,SAAUC,GAAM,IAAAC,EAAAjB,EAAAkB,EAAAC,EAAAC,EACjC,MAAMC,GAAcC,EAAAA,EAAAA,IAA8B,QAAXL,EAACD,EAAKO,aAAK,IAAAN,OAAA,EAAVA,EAAYI,aAC9CG,EAAwB,QAAnBxB,GAAGC,EAAAA,EAAAA,aAAgB,IAAAD,OAAA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,CAACC,EAA4BlL,KACvD,IAKI0H,EAAUsD,EALV7C,EAAWnI,EAAK,GAChBmL,EAAcnL,EAAK,GACnBoL,EAAUpL,EAAK,GAGIwI,EAAI,EAC3B,GAAGL,EAASkD,MAAMrK,GAAgC,IAAxB+J,EAAgB/J,KAAa,CACtD,IAAI0G,KAAYyD,EACZ1D,EAAoB6B,EAAE6B,EAAazD,KACrCD,EAAoBO,EAAEN,GAAYyD,EAAYzD,IAGhD,GAAG0D,EAAS,IAAIlD,EAASkD,EAAQ3D,EAClC,CAEA,IADGyD,GAA4BA,EAA2BlL,GACrDwI,EAAIL,EAAS5F,OAAQiG,IACzBwC,EAAU7C,EAASK,GAChBf,EAAoB6B,EAAEyB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOvD,EAAoBQ,EAAEC,EAAO,EAGjCoD,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBhE,KAAO2D,EAAqBO,KAAK,KAAMF,EAAmBhE,KAAKkE,KAAKF,QClDvF7D,EAAoBgE,QAAKrH,ECGzB,IAAIsH,EAAsBjE,EAAoBQ,OAAE7D,EAAW,CAAC,OAAO,IAAOqD,EAAoB,SAC9FiE,EAAsBjE,EAAoBQ,EAAEyD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack://nextcloud/./apps/files_trashbin/src/trashbin.scss?8b2e","webpack:///nextcloud/apps/files_trashbin/src/services/client.ts","webpack:///nextcloud/apps/files_trashbin/src/services/trashbin.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files_trashbin/src/actions/restoreAction.ts","webpack:///nextcloud/apps/files_trashbin/src/files-init.ts","webpack:///nextcloud/apps/files_trashbin/src/trashbin.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./trashbin.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./trashbin.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth';\n// init webdav client\nexport const rootPath = `/trashbin/${getCurrentUser()?.uid}/trash`;\nexport const rootUrl = generateRemoteUrl('dav' + rootPath);\nconst client = createClient(rootUrl);\n// set CSRF token header\nconst setHeaders = (token) => {\n client.setHeaders({\n // Add this so the server knows it is an request from the browser\n 'X-Requested-With': 'XMLHttpRequest',\n // Inject user auth\n requesttoken: token ?? '',\n });\n};\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders);\nsetHeaders(getRequestToken());\nexport default client;\n","import { File, Folder, davParsePermissions, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport client, { rootPath } from './client';\nconst data = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t${getDavProperties()}\n\t\n`;\nconst resultToNode = function (node) {\n const permissions = davParsePermissions(node.props?.permissions);\n const owner = getCurrentUser()?.uid;\n const previewUrl = generateUrl('/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32', node.props);\n const nodeData = {\n id: node.props?.fileid || 0,\n source: generateRemoteUrl('dav' + rootPath + node.filename),\n // do not show the mtime column\n // mtime: new Date(node.lastmod),\n mime: node.mime,\n size: node.props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...node.props,\n // Override displayed name on the list\n displayName: node.props?.['trashbin-filename'],\n previewUrl,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = async (path = '/') => {\n // TODO: use only one request when webdav-client supports it\n // @see https://github.com/perry-mitchell/webdav-client/pull/334\n const rootResponse = await client.stat(path, {\n details: true,\n data,\n });\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data,\n });\n return {\n folder: resultToNode(rootResponse.data),\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Node, View, registerFileAction, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport History from '@mdi/svg/svg/history.svg?raw';\nimport logger from '../../../files/src/logger.js';\nimport { encodePath } from '@nextcloud/paths';\nregisterFileAction(new FileAction({\n id: 'restore',\n displayName() {\n return t('files_trashbin', 'Restore');\n },\n iconSvgInline: () => History,\n enabled(nodes, view) {\n // Only available in the trashbin view\n if (view.id !== 'trashbin') {\n return false;\n }\n // Only available if all nodes have read permission\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.READ) !== 0);\n },\n async exec(node) {\n try {\n const destination = generateRemoteUrl(encodePath(`dav/trashbin/${getCurrentUser()?.uid}/restore/${node.basename}`));\n await axios({\n method: 'MOVE',\n url: node.encodedSource,\n headers: {\n destination,\n },\n });\n // Let's pretend the file is deleted since\n // we don't know the restored location\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error(error);\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n}));\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport './trashbin.scss';\nimport { translate as t } from '@nextcloud/l10n';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport moment from '@nextcloud/moment';\nimport { getContents } from './services/trashbin';\n// Register restore action\nimport './actions/restoreAction';\nimport { Column, Node, View, getNavigation } from '@nextcloud/files';\nimport { dirname, joinPaths } from '@nextcloud/paths';\nconst parseOriginalLocation = (node) => {\n const path = node.attributes?.['trashbin-original-location'] !== undefined ? String(node.attributes?.['trashbin-original-location']) : null;\n if (!path) {\n return t('files_trashbin', 'Unknown');\n }\n const dir = dirname(path);\n if (dir === path) { // Node is in root folder\n return t('files_trashbin', 'All files');\n }\n return joinPaths(t('files_trashbin', 'All files'), dir);\n};\nconst Navigation = getNavigation();\nNavigation.register(new View({\n id: 'trashbin',\n name: t('files_trashbin', 'Deleted files'),\n caption: t('files_trashbin', 'List of files that have been deleted.'),\n emptyTitle: t('files_trashbin', 'No deleted files'),\n emptyCaption: t('files_trashbin', 'Files and folders you have deleted will show up here'),\n icon: DeleteSvg,\n order: 50,\n sticky: true,\n defaultSortKey: 'deleted',\n columns: [\n new Column({\n id: 'original-location',\n title: t('files_trashbin', 'Original location'),\n render(node) {\n const originalLocation = parseOriginalLocation(node);\n const span = document.createElement('span');\n span.title = originalLocation;\n span.textContent = originalLocation;\n return span;\n },\n sort(nodeA, nodeB) {\n const locationA = parseOriginalLocation(nodeA);\n const locationB = parseOriginalLocation(nodeB);\n return locationA.localeCompare(locationB);\n },\n }),\n new Column({\n id: 'deleted',\n title: t('files_trashbin', 'Deleted'),\n render(node) {\n const deletionTime = node.attributes?.['trashbin-deletion-time'];\n const span = document.createElement('span');\n if (deletionTime) {\n span.title = moment.unix(deletionTime).format('LLL');\n span.textContent = moment.unix(deletionTime).fromNow();\n return span;\n }\n // Unknown deletion time\n span.textContent = t('files_trashbin', 'A long time ago');\n return span;\n },\n sort(nodeA, nodeB) {\n const deletionTimeA = nodeA.attributes?.['trashbin-deletion-time'] || nodeA?.mtime || 0;\n const deletionTimeB = nodeB.attributes?.['trashbin-deletion-time'] || nodeB?.mtime || 0;\n return deletionTimeB - deletionTimeA;\n },\n }),\n ],\n getContents,\n}));\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__row-trashbin-original-location{width:150px !important}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_trashbin/src/trashbin.scss\"],\"names\":[],\"mappings\":\"AAAA,4CACE,sBAAA\",\"sourcesContent\":[\".files-list__row-trashbin-original-location {\\n width: 150px !important;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2573;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2573: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(29276)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","rootPath","concat","_getCurrentUser","getCurrentUser","uid","rootUrl","generateRemoteUrl","client","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","data","getDavNameSpaces","getDavProperties","resultToNode","node","_node$props","_node$props2","_node$props3","_node$props4","permissions","davParsePermissions","props","owner","previewUrl","generateUrl","nodeData","id","fileid","source","filename","mime","size","root","attributes","displayName","type","File","Folder","getLoggerBuilder","setApp","detectUser","build","registerFileAction","FileAction","t","iconSvgInline","enabled","nodes","view","length","map","every","permission","Permission","READ","exec","destination","encodePath","basename","axios","method","url","encodedSource","headers","emit","error","logger","execBatch","dir","Promise","all","this","order","inline","parseOriginalLocation","_node$attributes","_node$attributes2","path","undefined","String","dirname","joinPaths","getNavigation","register","View","name","caption","emptyTitle","emptyCaption","icon","sticky","defaultSortKey","columns","Column","title","render","originalLocation","span","document","createElement","textContent","sort","nodeA","nodeB","locationA","locationB","localeCompare","_node$attributes3","deletionTime","moment","unix","format","fromNow","_nodeA$attributes","_nodeB$attributes","deletionTimeA","mtime","getContents","async","arguments","rootResponse","stat","details","contentsResponse","getDirectoryContents","folder","contents","___CSS_LOADER_EXPORT___","push","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","e","resolve","g","globalThis","Function","window","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"files_trashbin-init.js?v=fdf0363ad4635bc39e33","mappings":";uBAAIA,4JCWAC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,yDCFnD,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AAgBhJ,KAAa,CACtD,IAAI4F,KAAYwD,EACZzD,EAAoB4B,EAAE6B,EAAaxD,KACrCD,EAAoBO,EAAEN,GAAYwD,EAAYxD,IAGhD,GAAGyD,EAAS,IAAIjD,EAASiD,EAAQ1D,EAClC,CAEA,IADGwD,GAA4BA,EAA2BpK,GACrD2H,EAAIL,EAAS9F,OAAQmG,IACzBuC,EAAU5C,EAASK,GAChBf,EAAoB4B,EAAEyB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOtD,EAAoBQ,EAAEC,EAAO,EAGjCmD,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmB/D,KAAO0D,EAAqBO,KAAK,KAAMF,EAAmB/D,KAAKiE,KAAKF,QClDvF5D,EAAoB+D,QAAKpH,ECGzB,IAAIqH,EAAsBhE,EAAoBQ,OAAE7D,EAAW,CAAC,OAAO,IAAOqD,EAAoB,SAC9FgE,EAAsBhE,EAAoBQ,EAAEwD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack://nextcloud/./apps/files_trashbin/src/trashbin.scss?8b2e","webpack:///nextcloud/apps/files_trashbin/src/services/client.ts","webpack:///nextcloud/apps/files_trashbin/src/services/trashbin.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files_trashbin/src/actions/restoreAction.ts","webpack:///nextcloud/apps/files_trashbin/src/files-init.ts","webpack:///nextcloud/apps/files_trashbin/src/trashbin.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./trashbin.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./trashbin.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { davGetClient } from '@nextcloud/files';\n// init WebDAV client\nexport const rootPath = `/trashbin/${getCurrentUser()?.uid}/trash`;\nexport const client = davGetClient();\n","import { File, Folder, davResultToNode, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { client, rootPath } from './client';\nimport { generateUrl } from '@nextcloud/router';\nconst data = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t${getDavProperties()}\n\t\n`;\nconst resultToNode = (stat) => {\n const node = davResultToNode(stat, rootPath);\n node.attributes.previewUrl = generateUrl('/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32', { fileid: node.fileid });\n return node;\n};\nexport const getContents = async (path = '/') => {\n const contentsResponse = await client.getDirectoryContents(`${rootPath}${path}`, {\n details: true,\n data,\n includeSelf: true,\n });\n const contents = contentsResponse.data.map(resultToNode);\n const [folder] = contents.splice(contents.findIndex((node) => node.dirname === path), 1);\n return {\n folder: folder,\n contents,\n };\n};\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Node, View, registerFileAction, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport History from '@mdi/svg/svg/history.svg?raw';\nimport logger from '../../../files/src/logger.js';\nimport { encodePath } from '@nextcloud/paths';\nregisterFileAction(new FileAction({\n id: 'restore',\n displayName() {\n return t('files_trashbin', 'Restore');\n },\n iconSvgInline: () => History,\n enabled(nodes, view) {\n // Only available in the trashbin view\n if (view.id !== 'trashbin') {\n return false;\n }\n // Only available if all nodes have read permission\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.READ) !== 0);\n },\n async exec(node) {\n try {\n const destination = generateRemoteUrl(encodePath(`dav/trashbin/${getCurrentUser()?.uid}/restore/${node.basename}`));\n await axios({\n method: 'MOVE',\n url: node.encodedSource,\n headers: {\n destination,\n },\n });\n // Let's pretend the file is deleted since\n // we don't know the restored location\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error(error);\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n}));\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport './trashbin.scss';\nimport { translate as t } from '@nextcloud/l10n';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport moment from '@nextcloud/moment';\nimport { getContents } from './services/trashbin';\n// Register restore action\nimport './actions/restoreAction';\nimport { Column, Node, View, getNavigation } from '@nextcloud/files';\nimport { dirname, joinPaths } from '@nextcloud/paths';\nconst parseOriginalLocation = (node) => {\n const path = node.attributes?.['trashbin-original-location'] !== undefined ? String(node.attributes?.['trashbin-original-location']) : null;\n if (!path) {\n return t('files_trashbin', 'Unknown');\n }\n const dir = dirname(path);\n if (dir === path) { // Node is in root folder\n return t('files_trashbin', 'All files');\n }\n return joinPaths(t('files_trashbin', 'All files'), dir);\n};\nconst Navigation = getNavigation();\nNavigation.register(new View({\n id: 'trashbin',\n name: t('files_trashbin', 'Deleted files'),\n caption: t('files_trashbin', 'List of files that have been deleted.'),\n emptyTitle: t('files_trashbin', 'No deleted files'),\n emptyCaption: t('files_trashbin', 'Files and folders you have deleted will show up here'),\n icon: DeleteSvg,\n order: 50,\n sticky: true,\n defaultSortKey: 'deleted',\n columns: [\n new Column({\n id: 'original-location',\n title: t('files_trashbin', 'Original location'),\n render(node) {\n const originalLocation = parseOriginalLocation(node);\n const span = document.createElement('span');\n span.title = originalLocation;\n span.textContent = originalLocation;\n return span;\n },\n sort(nodeA, nodeB) {\n const locationA = parseOriginalLocation(nodeA);\n const locationB = parseOriginalLocation(nodeB);\n return locationA.localeCompare(locationB);\n },\n }),\n new Column({\n id: 'deleted',\n title: t('files_trashbin', 'Deleted'),\n render(node) {\n const deletionTime = node.attributes?.['trashbin-deletion-time'];\n const span = document.createElement('span');\n if (deletionTime) {\n span.title = moment.unix(deletionTime).format('LLL');\n span.textContent = moment.unix(deletionTime).fromNow();\n return span;\n }\n // Unknown deletion time\n span.textContent = t('files_trashbin', 'A long time ago');\n return span;\n },\n sort(nodeA, nodeB) {\n const deletionTimeA = nodeA.attributes?.['trashbin-deletion-time'] || nodeA?.mtime || 0;\n const deletionTimeB = nodeB.attributes?.['trashbin-deletion-time'] || nodeB?.mtime || 0;\n return deletionTimeB - deletionTimeA;\n },\n }),\n ],\n getContents,\n}));\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__row-trashbin-original-location{width:150px !important}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_trashbin/src/trashbin.scss\"],\"names\":[],\"mappings\":\"AAAA,4CACE,sBAAA\",\"sourcesContent\":[\".files-list__row-trashbin-original-location {\\n width: 150px !important;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2573;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2573: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(29276)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","rootPath","concat","_getCurrentUser","getCurrentUser","uid","client","davGetClient","data","getDavNameSpaces","getDavProperties","resultToNode","stat","node","davResultToNode","attributes","previewUrl","generateUrl","fileid","getLoggerBuilder","setApp","detectUser","build","registerFileAction","FileAction","id","displayName","t","iconSvgInline","enabled","nodes","view","length","map","permissions","every","permission","Permission","READ","exec","destination","generateRemoteUrl","encodePath","basename","axios","method","url","encodedSource","headers","emit","error","logger","execBatch","dir","Promise","all","this","order","inline","parseOriginalLocation","_node$attributes","_node$attributes2","path","undefined","String","dirname","joinPaths","getNavigation","register","View","name","caption","emptyTitle","emptyCaption","icon","sticky","defaultSortKey","columns","Column","title","render","originalLocation","span","document","createElement","textContent","sort","nodeA","nodeB","locationA","locationB","localeCompare","_node$attributes3","deletionTime","moment","unix","format","fromNow","_nodeA$attributes","_nodeB$attributes","deletionTimeA","mtime","getContents","async","arguments","contents","getDirectoryContents","details","includeSelf","folder","splice","findIndex","___CSS_LOADER_EXPORT___","push","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","key","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","e","resolve","g","globalThis","Function","window","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file