Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/api-DlsqY5DV.chunk.mjs → dist/api-CrmL42y-.chunk.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{c as u}from"./index-Conii63U.chunk.mjs";import{g as y,e as c}from"./index-Bndk0DrU.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-Bni_xMHF.chunk.mjs";import{c as f}from"./index-DjsbsIll.chunk.mjs";import{b as h}from"./createElementId-DhjFt1I9-CNrdQIoZ.chunk.mjs";import{g as b}from"./dav-CufFHsl4.chunk.mjs";const r=y().setApp("systemtags").detectUser().build(),V={userVisible:!0,userAssignable:!0,canAssign:!0},x=Object.freeze({"display-name":"displayName","user-visible":"userVisible","user-assignable":"userAssignable","can-assign":"canAssign"});function p(t){return t.map(({props:s})=>Object.fromEntries(Object.entries(s).map(([e,a])=>(e=x[e]??e,a=e==="displayName"?String(a):a,[e,a]))))}function w(t){const s=t.indexOf("?");s>0&&(t=t.substring(0,s));const e=t.split("/");let a;do a=e[e.length-1],e.pop();while(!a&&e.length>0);return Number(a)}function v(t){if("name"in t&&!("displayName"in t))return{...t};const s={...t};return s.name=s.displayName,delete s.displayName,s}function N(t){const s=t.attributes?.["system-tags"]?.["system-tag"];return s===void 0?[]:[s].flat().map(e=>typeof e=="string"?e:e.text)}function P(t,s){t.attributes["system-tags"]={"system-tag":s},c("files:node:updated",t)}const n=b(),l=`<?xml version="1.0"?>
import{c as u}from"./index-Conii63U.chunk.mjs";import{g as y,e as c}from"./index-Bndk0DrU.chunk.mjs";import{t as o}from"./translation-DoG5ZELJ-Bni_xMHF.chunk.mjs";import{c as f}from"./index-DjsbsIll.chunk.mjs";import{b as h}from"./createElementId-DhjFt1I9-CNrdQIoZ.chunk.mjs";import{g as b}from"./dav-CMOydKDk.chunk.mjs";const r=y().setApp("systemtags").detectUser().build(),V={userVisible:!0,userAssignable:!0,canAssign:!0},x=Object.freeze({"display-name":"displayName","user-visible":"userVisible","user-assignable":"userAssignable","can-assign":"canAssign"});function p(t){return t.map(({props:s})=>Object.fromEntries(Object.entries(s).map(([e,a])=>(e=x[e]??e,a=e==="displayName"?String(a):a,[e,a]))))}function w(t){const s=t.indexOf("?");s>0&&(t=t.substring(0,s));const e=t.split("/");let a;do a=e[e.length-1],e.pop();while(!a&&e.length>0);return Number(a)}function v(t){if("name"in t&&!("displayName"in t))return{...t};const s={...t};return s.name=s.displayName,delete s.displayName,s}function N(t){const s=t.attributes?.["system-tags"]?.["system-tag"];return s===void 0?[]:[s].flat().map(e=>typeof e=="string"?e:e.text)}function P(t,s){t.attributes["system-tags"]={"system-tag":s},c("files:node:updated",t)}const n=b(),l=`<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:prop>
<oc:id />
Expand Down Expand Up @@ -40,4 +40,4 @@ import{c as u}from"./index-Conii63U.chunk.mjs";import{g as y,e as c}from"./index
</d:prop>
</d:remove>
</d:propertyupdate>`),await n.customRequest(i,{method:"PROPPATCH",data:d,headers:{"if-match":a}})}async function H(t){const s=t?"1":"0",e=h("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"systemtags",key:"restrict_creation_to_admin"});await f();const{data:a}=await u.post(e,{value:s});return a}export{_ as a,H as b,R as c,V as d,N as e,D as f,q as g,P as h,C as i,r as l,k as s,T as u};
//# sourceMappingURL=api-DlsqY5DV.chunk.mjs.map
//# sourceMappingURL=api-CrmL42y-.chunk.mjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/dav-CufFHsl4.chunk.mjs → dist/dav-CMOydKDk.chunk.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{a as h,b as N,o as y}from"./index-Bndk0DrU.chunk.mjs";import{f as E}from"./createElementId-DhjFt1I9-CNrdQIoZ.chunk.mjs";import{i as l,b}from"./index-xFugdZPW.chunk.mjs";import{l as D,_ as $}from"./index-JSJM6V6X.chunk.mjs";import{s as n,l as u,N as P,a as T,b as R,P as i}from"./folder-D9CBQngR-CuPN_AFd.chunk.mjs";function x(e=""){let s=i.NONE;return e&&(e.includes("G")&&(s|=i.READ),e.includes("W")&&(s|=i.WRITE),e.includes("CK")&&(s|=i.CREATE),e.includes("NV")&&(s|=i.UPDATE),e.includes("D")&&(s|=i.DELETE),e.includes("R")&&(s|=i.SHARE)),s}const v=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],g={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function S(e,s={nc:"http://nextcloud.org/ns"}){n.davNamespaces??={...g},n.davProperties??=[...v];const a={...n.davNamespaces,...s};if(n.davProperties.find(t=>t===e))return u.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return u.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const o=e.split(":")[0];return a[o]?(n.davProperties.push(e),n.davNamespaces=a,!0):(u.error(`${e} namespace unknown`,{prop:e,namespaces:a}),!1)}function z(){return n.davProperties??=[...v],n.davProperties.map(e=>`<${e} />`).join(" ")}function C(){return n.davNamespaces??={...g},Object.keys(n.davNamespaces).map(e=>`xmlns:${e}="${n.davNamespaces?.[e]}"`).join(" ")}function A(){return l()?`/files/${b()}`:`/files/${h()?.uid}`}const q=A();function W(){const e=E("dav");return l()?e.replace("remote.php","public.php"):e}const w=W();function O(e=w,s={}){const a=D(e,{headers:s});function o(t){a.setHeaders({...s,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return y(o),o(N()),$().patch("fetch",(t,r)=>{const c=r.headers;return c?.method&&(r.method=c.method,delete c.method),fetch(t,r)}),a}function U(e,s=q,a=w){let o=h()?.uid;if(l())o=o??"anonymous";else if(!o)throw new Error("No user id found");const t=e.props,r=x(t?.permissions),c=String(t?.["owner-id"]||o),f=t.fileid||0,d=new Date(Date.parse(e.lastmod)),p=new Date(Date.parse(t.creationdate)),m={id:f,source:`${a}${e.filename}`,mtime:!isNaN(d.getTime())&&d.getTime()!==0?d:void 0,crtime:!isNaN(p.getTime())&&p.getTime()!==0?p:void 0,mime:e.mime||"application/octet-stream",displayname:t.displayname!==void 0?String(t.displayname):void 0,size:t?.size||Number.parseInt(t.getcontentlength||"0"),status:f<0?P.FAILED:void 0,permissions:r,owner:c,root:s,attributes:{...e,...t,hasPreview:t?.["has-preview"]}};return delete m.attributes?.props,e.type==="file"?new T(m):new R(m)}export{C as a,z as b,S as c,w as d,W as e,A as f,O as g,U as r};
//# sourceMappingURL=dav-CufFHsl4.chunk.mjs.map
import{a as h,b as N,o as y}from"./index-Bndk0DrU.chunk.mjs";import{f as E}from"./createElementId-DhjFt1I9-CNrdQIoZ.chunk.mjs";import{i as l,b}from"./index-xFugdZPW.chunk.mjs";import{l as D,_ as $}from"./index-JSJM6V6X.chunk.mjs";import{s as n,l as u,N as P,a as T,b as R,P as i}from"./folder-29HuacU_-CwocT1ij.chunk.mjs";function x(e=""){let s=i.NONE;return e&&(e.includes("G")&&(s|=i.READ),e.includes("W")&&(s|=i.WRITE),e.includes("CK")&&(s|=i.CREATE),e.includes("NV")&&(s|=i.UPDATE),e.includes("D")&&(s|=i.DELETE),e.includes("R")&&(s|=i.SHARE)),s}const v=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],g={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function S(e,s={nc:"http://nextcloud.org/ns"}){n.davNamespaces??={...g},n.davProperties??=[...v];const a={...n.davNamespaces,...s};if(n.davProperties.find(t=>t===e))return u.warn(`${e} already registered`,{prop:e}),!1;if(e.startsWith("<")||e.split(":").length!==2)return u.error(`${e} is not valid. See example: 'oc:fileid'`,{prop:e}),!1;const o=e.split(":")[0];return a[o]?(n.davProperties.push(e),n.davNamespaces=a,!0):(u.error(`${e} namespace unknown`,{prop:e,namespaces:a}),!1)}function z(){return n.davProperties??=[...v],n.davProperties.map(e=>`<${e} />`).join(" ")}function C(){return n.davNamespaces??={...g},Object.keys(n.davNamespaces).map(e=>`xmlns:${e}="${n.davNamespaces?.[e]}"`).join(" ")}function A(){return l()?`/files/${b()}`:`/files/${h()?.uid}`}const q=A();function W(){const e=E("dav");return l()?e.replace("remote.php","public.php"):e}const w=W();function O(e=w,s={}){const a=D(e,{headers:s});function o(t){a.setHeaders({...s,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return y(o),o(N()),$().patch("fetch",(t,r)=>{const c=r.headers;return c?.method&&(r.method=c.method,delete c.method),fetch(t,r)}),a}function U(e,s=q,a=w){let o=h()?.uid;if(l())o=o??"anonymous";else if(!o)throw new Error("No user id found");const t=e.props,r=x(t?.permissions),c=String(t?.["owner-id"]||o),f=t.fileid||0,d=new Date(Date.parse(e.lastmod)),p=new Date(Date.parse(t.creationdate)),m={id:f,source:`${a}${e.filename}`,mtime:!isNaN(d.getTime())&&d.getTime()!==0?d:void 0,crtime:!isNaN(p.getTime())&&p.getTime()!==0?p:void 0,mime:e.mime||"application/octet-stream",displayname:t.displayname!==void 0?String(t.displayname):void 0,size:t?.size||Number.parseInt(t.getcontentlength||"0"),status:f<0?P.FAILED:void 0,permissions:r,owner:c,root:s,attributes:{...e,...t,hasPreview:t?.["has-preview"]}};return delete m.attributes?.props,e.type==="file"?new T(m):new R(m)}export{C as a,z as b,S as c,w as d,W as e,A as f,O as g,U as r};
//# sourceMappingURL=dav-CMOydKDk.chunk.mjs.map
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors

This file is generated from multiple sources. Included packages:
- @nextcloud/files
- version: 4.0.0-rc.3
- version: 4.0.0
- license: AGPL-3.0-or-later
Loading
Loading