You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/dist/files-sidebar.js

3 lines
45 KiB
JavaScript

/*! For license information please see files-sidebar.js.LICENSE.txt */
(()=>{"use strict";var e,i,n,s={9165:(t,e,i)=>{i.d(e,{NZC:()=>n,ZL5:()=>r,dF:()=>o,fEr:()=>s});var n="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",s="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",r="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",o="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z"},85638:(t,e,i)=>{const{XMLParser:n,XMLValidator:s}=i(86454),r=t=>{if(null==t)return!1;if(0===(t=t.toString().trim()).length)return!1;if(!0!==s.validate(t))return!1;let e;const i=new n;try{e=i.parse(t)}catch(t){return!1}return!!e&&"svg"in e};t.exports=r,t.exports.default=r},1581:(e,i,n)=>{var s=n(85471),r=n(53334),o=n(92457),a=n(87485),l=n(85168),d=n(61338),c=n(35810),u=n(71089),p=n(63814),h=n(52129),f=n(9165),m=n(26287),g=n(74692),v=n.n(g),y=n(58589),b=n(63420),w=n(4604),A=n(10833),_=n(6695);const x={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:()=>{},required:!0}},watch:{fileInfo(t){this.setFileInfo(t)}},mounted(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}};var T=n(14486);const N=(0,T.A)(x,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports,E={name:"SidebarTab",components:{NcAppSidebarTab:n(18503).A,NcEmptyContent:A.A},props:{fileInfo:{type:Object,default:()=>{},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,required:!1},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:()=>{}}},data:()=>({loading:!0}),computed:{activeTab(){return this.$parent.activeTab}},watch:{async fileInfo(t,e){t.id!==e.id&&(this.loading=!0,await this.onUpdate(this.fileInfo),this.loading=!1)}},async mounted(){this.loading=!0,await this.onMount(this.$refs.mount,this.fileInfo,this.$refs.tab),this.loading=!1},async beforeDestroy(){await this.onDestroy()}},S=(0,T.A)(E,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports;var C=n(46222),O=n(5212),I=n(71654);const F={userVisible:!0,userAssignable:!0,canAssign:!0},L=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,i]=t;return[(0,I.A)(e),"displayName"===(0,I.A)(e)?String(i):i]})))})),P=t=>{const e={...t};return e.name&&!e.displayName||(e.name=e.displayName,delete e.displayName),e};var D=n(44719);const R=(0,p.dC)("dav"),k=(0,D.UU)(R),$=t=>{k.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:null!=t?t:""})};(0,o.zo)($),$((0,o.do)());var j=n(53529);const M=(0,j.YK)().setApp("systemtags").detectUser().build(),B='<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n\t<d:prop>\n\t\t<oc:id />\n\t\t<oc:display-name />\n\t\t<oc:user-visible />\n\t\t<oc:user-assignable />\n\t\t<oc:can-assign />\n\t</d:prop>\n</d:propfind>',V=async(e,i)=>{const n="/systemtags-relations/files/"+i+"/"+e.id,s=P(e);try{await k.customRequest(n,{method:"PUT",data:s})}catch(e){throw M.error(t("systemtags","Failed to set tag for file"),{error:e}),new Error(t("systemtags","Failed to set tag for file"))}},U=s.Ay.extend({name:"SystemTags",components:{NcLoadingIcon:C.A,NcSelectTags:O.A},props:{fileId:{type:Number,required:!0}},data:()=>({sortedTags:[],selectedTags:[],loadingTags:!1,loading:!1}),async created(){try{const t=await(async()=>{try{const{data:t}=await k.getDirectoryC
//# sourceMappingURL=files-sidebar.js.map?v=62d73e8ae9c340b9917b