nextcloud/dist/files_sharing-files_sharing_tab.js
Ferdinand Thiessen 7b7d74fda2
chore: compile assets
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-10 14:53:19 +01:00

2 lines
No EOL
11 KiB
JavaScript

(()=>{var e,t,r,i={28237(e,t,r){"use strict";var i=r(21777),n=r(35810),a=r(53334),o=r(26422),s=r(85471),d=r(48564);r.nc=(0,i.aV)(),window.OCA.Sharing??={},Object.assign(window.OCA.Sharing,{ShareSearch:new class{constructor(){var e,t,r;e=this,r=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_state"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,this._state={},this._state.results=[],d.A.debug("OCA.Sharing.ShareSearch initialized")}get state(){return this._state}addNewResult(e){return""!==e.displayName.trim()&&"function"==typeof e.handler?(this._state.results.push(e),!0):(d.A.error("Invalid search result provided",{result:e}),!1)}}}),Object.assign(window.OCA.Sharing,{ExternalShareActions:new class{constructor(){var e,t,r;e=this,r=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_state"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,this._state={},this._state.actions=[],d.A.debug("OCA.Sharing.ExternalShareActions initialized")}get state(){return this._state}registerAction(e){return d.A.warn("OCA.Sharing.ExternalShareActions is deprecated, use `registerSidebarAction` from `@nextcloud/sharing` instead"),"object"==typeof e&&"string"==typeof e.id&&"function"==typeof e.data&&Array.isArray(e.shareType)&&"object"==typeof e.handlers&&Object.values(e.handlers).every(e=>"function"==typeof e)?this._state.actions.findIndex(t=>t.id===e.id)>-1?(d.A.error(`An action with the same id ${e.id} already exists`,e),!1):(this._state.actions.push(e),!0):(d.A.error("Invalid action provided",e),!1)}}}),Object.assign(window.OCA.Sharing,{ShareTabSections:new class{constructor(){var e,t,r;e=this,r=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_sections"))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,this._sections=[]}registerSection(e){this._sections.push(e)}getSections(){return this._sections}}}),s.Ay.prototype.t=a.t,s.Ay.prototype.n=a.n;const c="files_sharing-sidebar-tab";(0,n.dC)().registerTab({id:"sharing",displayName:(0,a.t)("files_sharing","Sharing"),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-share-variant" viewBox="0 0 24 24"><path d="M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z" /></svg>',order:10,tagName:c,async onInit(){const{default:e}=await Promise.all([r.e(4208),r.e(8577)]).then(r.bind(r,38577)),t=(0,o.A)(s.Ay,e);Object.defineProperty(t.prototype,"attachShadow",{value(){return this}}),Object.defineProperty(t.prototype,"shadowRoot",{get(){return this}}),window.customElements.define(c,t)}})},48564(e,t,r){"use strict";r.d(t,{A:()=>i});const i=(0,r(35947).YK)().setApp("files_sharing").detectUser().build()},63779(){},77199(){},35810(e,t,r){"use strict";r.d(t,{My:()=>l,dC:()=>d});var i=r(96464),n=r(380),a=r(20005),o=r(53334);Object.freeze({DEFAULT:"default",HIDDEN:"hidden"}),n.m,Object.freeze({UploadFromDevice:0,CreateNew:1,Other:2});class s{get#e(){return window.OCA?.Files?._sidebar?.()}get available(){return!!this.#e}get isOpen(){return this.#e?.isOpen??!1}get activeTab(){return this.#e?.activeTab}get node(){return this.#e?.node}open(e,t){this.#e?.open(e,t)}close(){this.#e?.close()}setActiveTab(e){this.#e?.setActiveTab(e)}registerTab(e){!function(e){!function(e){if("object"!=typeof e)throw new Error("Sidebar tab is not an object");if(!e.id||"string"!=typeof e.id||e.id!==CSS.escape(e.id))throw new Error("Sidebar tabs need to have an id conforming to the HTML id attribute specifications");if(!e.tagName||"string"!=typeof e.tagName)throw new Error("Sidebar tabs need to have the tagName name set");if(!e.tagName.match(/^[a-z][a-z0-9-_]+$/))throw new Error('Sidebar tab "tagName" is invalid');if(!e.displayName||"string"!=typeof e.displayName)throw new Error("Sidebar tabs need to have a name set");if("string"!=typeof e.iconSvgInline||!(0,a.A)(e.iconSvgInline))throw new Error("Sidebar tabs need to have an valid SVG icon");if("number"!=typeof e.order)throw new Error("Sidebar tabs need to have a numeric order set");if(e.enabled&&"function"!=typeof e.enabled)throw new Error('Sidebar tab "enabled" is not a function');if(e.onInit&&"function"!=typeof e.onInit)throw new Error('Sidebar tab "onInit" is not a function')}(e),i.s.filesSidebarTabs??=new Map,i.s.filesSidebarTabs.has(e.id)?i.l.warn(`Sidebar tab with id "${e.id}" already registered. Skipping.`):(i.s.filesSidebarTabs.set(e.id,e),i.l.debug(`New sidebar tab with id "${e.id}" registered.`))}(e)}getTabs(e){return this.#e?.getTabs(e)??[]}getActions(e){return this.#e?.getActions(e)??[]}registerAction(e){!function(e){!function(e){if("object"!=typeof e)throw new Error("Sidebar action is not an object");if(!e.id||"string"!=typeof e.id||e.id!==CSS.escape(e.id))throw new Error("Sidebar actions need to have an id conforming to the HTML id attribute specifications");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Sidebar actions need to have a displayName function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Sidebar actions need to have a iconSvgInline function");if(!e.enabled||"function"!=typeof e.enabled)throw new Error("Sidebar actions need to have an enabled function");if(!e.onClick||"function"!=typeof e.onClick)throw new Error("Sidebar actions need to have an onClick function")}(e),i.s.filesSidebarActions??=new Map,i.s.filesSidebarActions.has(e.id)?i.l.warn(`Sidebar action with id "${e.id}" already registered. Skipping.`):(i.s.filesSidebarActions.set(e.id,e),i.l.debug(`New sidebar action with id "${e.id}" registered.`))}(e)}}function d(){return new s}function c(e){return e instanceof Date?e.toISOString():String(e)}function l(e,t,r){r=r??[];const i=(t=t??[e=>e]).map((e,t)=>"asc"===(r[t]??"asc")?1:-1),n=Intl.Collator([(0,o.Z0)(),(0,o.lO)()],{numeric:!0,usage:"sort"});return[...e].sort((e,r)=>{for(const[a,o]of t.entries()){const t=n.compare(c(o(e)),c(o(r)));if(0!==t)return t*i[a]}return 0})}Object.freeze({ReservedName:"reserved name",Character:"character",Extension:"extension"}),Error,Object.freeze({Name:"basename",Modified:"mtime",Size:"size"})}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=i,e=[],a.O=(t,r,i,n)=>{if(!r){var o=1/0;for(l=0;l<e.length;l++){for(var[r,i,n]=e[l],s=!0,d=0;d<r.length;d++)(!1&n||o>=n)&&Object.keys(a.O).every(e=>a.O[e](r[d]))?r.splice(d--,1):(s=!1,n<o&&(o=n));if(s){e.splice(l--,1);var c=i();void 0!==c&&(t=c)}}return t}n=n||0;for(var l=e.length;l>0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[r,i,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>e+"-"+e+".js?v="+{857:"3d28157955f39376ab2c",2710:"0319a4b5398392025378",4471:"9b3c8620f038b7593241",6798:"995524658ab188a2d123",7004:"da5a822695a273d4d2eb",7394:"9b9a710e7fcefb63fcb4",7471:"b4ac70873a3ab192efd0",7859:"449c6cbdb74832a2f6c7",8127:"8825f856581210b8af66",8453:"d4f76450bf0c442af291",8577:"c9522a7730e74c480208"}[e],a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="nextcloud-ui-legacy:",a.l=(e,i,n,o)=>{if(t[e])t[e].push(i);else{var s,d;if(void 0!==n)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var u=c[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+n){s=u;break}}s||(d=!0,(s=document.createElement("script")).charset="utf-8",a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+n),s.src=e),t[e]=[i];var f=(r,i)=>{s.onerror=s.onload=null,clearTimeout(b);var n=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach(e=>e(i)),r)return r(i)},b=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),d&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=4958,(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={4958:0};a.f.j=(t,r)=>{var i=a.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var n=new Promise((r,n)=>i=e[t]=[r,n]);r.push(i[2]=n);var o=a.p+a.u(t),s=new Error;a.l(o,r=>{if(a.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var n=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,i[1](s)}},"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,r)=>{var i,n,[o,s,d]=r,c=0;if(o.some(t=>0!==e[t])){for(i in s)a.o(s,i)&&(a.m[i]=s[i]);if(d)var l=d(a)}for(t&&t(r);c<o.length;c++)n=o[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(l)},r=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),a.nc=void 0;var o=a.O(void 0,[4208],()=>a(28237));o=a.O(o)})();
//# sourceMappingURL=files_sharing-files_sharing_tab.js.map?v=c6b2e4de940d756e4534