Merge pull request #57503 from nextcloud/chore/drop-moment

refactor: drop moment from new bundles
This commit is contained in:
Ferdinand Thiessen 2026-01-14 12:33:56 +01:00 committed by GitHub
commit 22ebf79e90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
187 changed files with 226 additions and 255 deletions

View file

@ -139,8 +139,7 @@ import type { Version } from '../utils/versions.ts'
import { getCurrentUser } from '@nextcloud/auth'
import { formatFileSize, Permission } from '@nextcloud/files'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import moment from '@nextcloud/moment'
import { getCanonicalLocale, t } from '@nextcloud/l10n'
import { getRootUrl } from '@nextcloud/router'
import { computed, nextTick, ref } from 'vue'
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
@ -233,7 +232,13 @@ const versionAuthor = computed(() => {
})
const versionHumanExplicitDate = computed(() => {
return moment(props.version.mtime).format('LLLL')
return new Date(props.version.mtime).toLocaleString(
[getCanonicalLocale(), getCanonicalLocale().split('-')[0]!],
{
timeStyle: 'long',
dateStyle: 'long',
},
)
})
const downloadURL = computed(() => {

View file

@ -9,7 +9,7 @@ import type { FileStat, ResponseDataDetailed } from 'webdav'
import { getCurrentUser } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
import { getClient } from '@nextcloud/files/dav'
import moment from '@nextcloud/moment'
import { getCanonicalLocale } from '@nextcloud/l10n'
import { encodePath, join } from '@nextcloud/paths'
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
import davRequest from '../utils/davRequest.ts'
@ -97,7 +97,7 @@ export async function restoreVersion(version: Version) {
* @param node - The original node
*/
function formatVersion(version: Required<FileStat>, node: INode): Version {
const mtime = moment(version.lastmod).unix() * 1000
const mtime = Date.parse(version.lastmod)
let previewUrl = ''
if (mtime === node.mtime?.getTime()) { // Version is the current one
@ -119,7 +119,13 @@ function formatVersion(version: Required<FileStat>, node: INode): Version {
author: version.props['version-author'] ? String(version.props['version-author']) : null,
authorName: null,
filename: version.filename,
basename: moment(mtime).format('LLL'),
basename: new Date(mtime).toLocaleString(
[getCanonicalLocale(), getCanonicalLocale().split('-')[0]!],
{
timeStyle: 'long',
dateStyle: 'medium',
},
),
mime: version.mime,
etag: `${version.props.getetag}`,
size: version.size,

View file

@ -3,8 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { t } from '@nextcloud/l10n'
import moment from '@nextcloud/moment'
import { formatRelativeTime, t } from '@nextcloud/l10n'
import { dateFactory } from './dateService.js'
/**
@ -13,7 +12,7 @@ import { dateFactory } from './dateService.js'
* @param {object | null} clearAt The clear-at config
* @return {number | null}
*/
function getTimestampForClearAt(clearAt) {
export function getTimestampForClearAt(clearAt) {
if (clearAt === null) {
return null
}
@ -27,8 +26,9 @@ function getTimestampForClearAt(clearAt) {
if (clearAt.type === 'end-of') {
switch (clearAt.time) {
case 'day':
return Math.floor(getEndOfDay(date).getTime() / 1000)
case 'week':
return Number(moment(date).endOf(clearAt.time).format('X'))
return Math.floor(getEndOfWeek(date).getTime() / 1000)
}
}
// This is not an officially supported type
@ -47,7 +47,7 @@ function getTimestampForClearAt(clearAt) {
* @param {object} clearAt The clearAt object
* @return {string|null}
*/
function clearAtFormat(clearAt) {
export function clearAtFormat(clearAt) {
if (clearAt === null) {
return t('user_status', 'Don\'t clear')
}
@ -65,23 +65,35 @@ function clearAtFormat(clearAt) {
}
if (clearAt.type === 'period') {
return moment.duration(clearAt.time * 1000).humanize()
return formatRelativeTime(Date.now() + clearAt.time * 1000)
}
// This is not an officially supported type
// but only used internally to show the remaining time
// in the Set Status Modal
if (clearAt.type === '_time') {
const momentNow = moment(dateFactory())
const momentClearAt = moment(clearAt.time, 'X')
return moment.duration(momentNow.diff(momentClearAt)).humanize()
return formatRelativeTime(clearAt.time * 1000)
}
return null
}
export {
clearAtFormat,
getTimestampForClearAt,
/**
* @param {Date} date - The date to calculate the end of the day for
*/
function getEndOfDay(date) {
const endOfDay = new Date(date)
endOfDay.setHours(23, 59, 59, 999)
return endOfDay
}
/**
* Calculates the end of the week for a given date
*
* @param {Date} date - The date to calculate the end of the week for
*/
function getEndOfWeek(date) {
const endOfWeek = getEndOfDay(date)
endOfWeek.setDate(date.getDate() + ((endOfWeek.getFirstDay() - 1 - endOfWeek.getDay() + 7) % 7))
return endOfWeek
}

View file

@ -1,2 +1,2 @@
import{b as g,p as y,q as v,c as p,u as o,o as n,N as h,w as _,g as V,t as k,r as x,s as M,j as d,e as f,F as q,C as w,E as U,G as j}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{c as C}from"./index-FffHbzvj.chunk.mjs";import{a as E}from"./index-JpgrUA2Z-BU0x-nEh.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-Cr5LJw9O.chunk.mjs";import{g as N}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import{c as S}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{N as A}from"./NcSelect-Czzsi3P_-DYeov0Mn.chunk.mjs";import{N as K}from"./NcCheckboxRadioSwitch-BCSKF7Tk-BfYgMYeK.chunk.mjs";import{N as z}from"./NcPasswordField-djttkA5Q-PPKLVftl.chunk.mjs";import{_ as B}from"./TrashCanOutline-Dy-u-_ok.chunk.mjs";import{a as c,C as b}from"./types-enGIHWiM.chunk.mjs";import{l as G}from"./logger-CrDakPzW.chunk.mjs";const P=g({__name:"ConfigurationEntry",props:y({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue");return(t,i)=>e.configOption.type!==o(c).Boolean?(n(),p(h(e.configOption.type===o(c).Password?o(z):o(B)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=l=>a.value=l),name:e.configKey,required:!(e.configOption.flags&o(b).Optional),label:e.configOption.value,title:e.configOption.tooltip},null,8,["modelValue","name","required","label","title"])):(n(),p(o(K),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=l=>a.value=l),type:"switch",title:e.configOption.tooltip},{default:_(()=>[V(k(e.configOption.value),1)]),_:1},8,["modelValue","title"]))}}),R=g({__name:"AuthMechanismRsa",props:y({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue"),t=x();M(t,()=>{t.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:l}=await C.post(N("/apps/files_external/ajax/public_key.php"),{keyLength:t.value});a.value.private_key=l.data.private_key,a.value.public_key=l.data.public_key}catch(l){G.error("Error generating RSA key pair",{error:l}),E(s("files_external","Error generating key pair"))}}return(l,m)=>(n(),d("div",null,[(n(!0),d(q,null,w(e.authMechanism.configuration,(r,u)=>U((n(),p(P,{key:r.value,modelValue:a.value[u],"onUpdate:modelValue":O=>a.value[u]=O,"config-key":u,"config-option":r},null,8,["modelValue","onUpdate:modelValue","config-key","config-option"])),[[j,!(r.flags&o(b).Hidden)]])),128)),f(o(A),{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=r=>t.value=r),clearable:!1,"input-label":o(s)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","input-label"]),f(o(S),{disabled:!t.value,wide:"",onClick:i},{default:_(()=>[V(k(o(s)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{$ as A,P as _};
//# sourceMappingURL=AuthMechanismRsa-C7Dhz5x5.chunk.mjs.map
import{b as g,p as y,q as v,c as p,u as o,o as n,N as h,w as _,g as V,t as k,r as x,s as M,j as d,e as f,F as q,C as w,E as U,G as j}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{c as C}from"./index-BfylblLb.chunk.mjs";import{a as E}from"./index-JpgrUA2Z-BFiKKJ1W.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-gw0g4US-.chunk.mjs";import{g as N}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import{c as S}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{N as A}from"./NcSelect-Czzsi3P_-DLFUGW7z.chunk.mjs";import{N as K}from"./NcCheckboxRadioSwitch-BCSKF7Tk-yPckcGKs.chunk.mjs";import{N as z}from"./NcPasswordField-djttkA5Q-2g87vOpY.chunk.mjs";import{_ as B}from"./TrashCanOutline-CvWRJ8GE.chunk.mjs";import{a as c,C as b}from"./types-BoPN4zt3.chunk.mjs";import{l as G}from"./logger-CrDakPzW.chunk.mjs";const P=g({__name:"ConfigurationEntry",props:y({configKey:{},configOption:{}},{modelValue:{type:[String,Boolean],default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue");return(t,i)=>e.configOption.type!==o(c).Boolean?(n(),p(h(e.configOption.type===o(c).Password?o(z):o(B)),{key:0,modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=l=>a.value=l),name:e.configKey,required:!(e.configOption.flags&o(b).Optional),label:e.configOption.value,title:e.configOption.tooltip},null,8,["modelValue","name","required","label","title"])):(n(),p(o(K),{key:1,modelValue:a.value,"onUpdate:modelValue":i[1]||(i[1]=l=>a.value=l),type:"switch",title:e.configOption.tooltip},{default:_(()=>[V(k(e.configOption.value),1)]),_:1},8,["modelValue","title"]))}}),R=g({__name:"AuthMechanismRsa",props:y({authMechanism:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=v(e,"modelValue"),t=x();M(t,()=>{t.value&&(a.value.private_key="",a.value.public_key="")});async function i(){try{const{data:l}=await C.post(N("/apps/files_external/ajax/public_key.php"),{keyLength:t.value});a.value.private_key=l.data.private_key,a.value.public_key=l.data.public_key}catch(l){G.error("Error generating RSA key pair",{error:l}),E(s("files_external","Error generating key pair"))}}return(l,m)=>(n(),d("div",null,[(n(!0),d(q,null,w(e.authMechanism.configuration,(r,u)=>U((n(),p(P,{key:r.value,modelValue:a.value[u],"onUpdate:modelValue":O=>a.value[u]=O,"config-key":u,"config-option":r},null,8,["modelValue","onUpdate:modelValue","config-key","config-option"])),[[j,!(r.flags&o(b).Hidden)]])),128)),f(o(A),{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=r=>t.value=r),clearable:!1,"input-label":o(s)("files_external","Key size"),options:[1024,2048,4096],required:""},null,8,["modelValue","input-label"]),f(o(S),{disabled:!t.value,wide:"",onClick:i},{default:_(()=>[V(k(o(s)("files_external","Generate keys")),1)]),_:1},8,["disabled"])]))}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{$ as A,P as _};
//# sourceMappingURL=AuthMechanismRsa-e40gyg0q.chunk.mjs.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{r as g,_ as p,t as h}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import{b as C,j as i,o as e,k as o,l as s,m as _,g as k,t as r,u as d,e as y,z as f}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{a as H}from"./index-xFugdZPW.chunk.mjs";const b={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},A=["aria-hidden","aria-label"],v=["fill","width","height"],z={d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},V={key:0};function w(a,l,t,c,m,u){return e(),i("span",f(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon help-circle-icon",role:"img",onClick:l[0]||(l[0]=n=>a.$emit("click",n))}),[(e(),i("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[o("path",z,[t.title?(e(),i("title",V,r(t.title),1)):s("",!0)])],8,v))],16,A)}const M=p(b,[["render",w]]);g();const S={class:"settings-section"},x={class:"settings-section__name"},$=["aria-label","href","title"],I={key:0,class:"settings-section__desc"},N=C({__name:"NcSettingsSection",props:{name:{},description:{default:""},docUrl:{default:""}},setup(a){const l=h("External documentation");return(t,c)=>(e(),i("div",S,[o("h2",x,[k(r(t.name)+" ",1),t.docUrl?(e(),i("a",{key:0,"aria-label":d(l),class:"settings-section__info",href:t.docUrl,rel:"noreferrer nofollow",target:"_blank",title:d(l)},[y(M,{size:20})],8,$)):s("",!0)]),t.description?(e(),i("p",I,r(t.description),1)):s("",!0),_(t.$slots,"default",{},void 0,!0)]))}}),T=p(N,[["__scopeId","data-v-9cedb949"]]),U={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},B=["aria-hidden","aria-label"],L=["fill","width","height"],Z={d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"},j={key:0};function E(a,l,t,c,m,u){return e(),i("span",f(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon content-copy-icon",role:"img",onClick:l[0]||(l[0]=n=>a.$emit("click",n))}),[(e(),i("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[o("path",Z,[t.title?(e(),i("title",j,r(t.title),1)):s("",!0)])],8,L))],16,B)}const F=H(U,[["render",E]]);export{F as I,T as N};
//# sourceMappingURL=ContentCopy-ZLU3Pysp.chunk.mjs.map
import{r as g,_ as p,t as h}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import{b as C,j as i,o as e,k as o,l as s,m as _,g as k,t as r,u as d,e as y,z as f}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{a as H}from"./index-xFugdZPW.chunk.mjs";const b={name:"HelpCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},A=["aria-hidden","aria-label"],v=["fill","width","height"],z={d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},V={key:0};function w(a,l,t,c,m,u){return e(),i("span",f(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon help-circle-icon",role:"img",onClick:l[0]||(l[0]=n=>a.$emit("click",n))}),[(e(),i("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[o("path",z,[t.title?(e(),i("title",V,r(t.title),1)):s("",!0)])],8,v))],16,A)}const M=p(b,[["render",w]]);g();const S={class:"settings-section"},x={class:"settings-section__name"},$=["aria-label","href","title"],I={key:0,class:"settings-section__desc"},N=C({__name:"NcSettingsSection",props:{name:{},description:{default:""},docUrl:{default:""}},setup(a){const l=h("External documentation");return(t,c)=>(e(),i("div",S,[o("h2",x,[k(r(t.name)+" ",1),t.docUrl?(e(),i("a",{key:0,"aria-label":d(l),class:"settings-section__info",href:t.docUrl,rel:"noreferrer nofollow",target:"_blank",title:d(l)},[y(M,{size:20})],8,$)):s("",!0)]),t.description?(e(),i("p",I,r(t.description),1)):s("",!0),_(t.$slots,"default",{},void 0,!0)]))}}),T=p(N,[["__scopeId","data-v-9cedb949"]]),U={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},B=["aria-hidden","aria-label"],L=["fill","width","height"],Z={d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"},j={key:0};function E(a,l,t,c,m,u){return e(),i("span",f(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon content-copy-icon",role:"img",onClick:l[0]||(l[0]=n=>a.$emit("click",n))}),[(e(),i("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[o("path",Z,[t.title?(e(),i("title",j,r(t.title),1)):s("",!0)])],8,L))],16,B)}const F=H(U,[["render",E]]);export{F as I,T as N};
//# sourceMappingURL=ContentCopy-DVkZwwZt.chunk.mjs.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{t}from"./translation-DoG5ZELJ-Cr5LJw9O.chunk.mjs";import{N as m}from"./index-JpgrUA2Z-BU0x-nEh.chunk.mjs";import{N as d}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{N as p}from"./NcPasswordField-djttkA5Q-PPKLVftl.chunk.mjs";import{_ as c}from"./TrashCanOutline-Dy-u-_ok.chunk.mjs";import{b as g,r as n,c as f,o as h,w as x,e as s,u as e}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import"./index-6_gsQFyp.chunk.mjs";import"./index-xFugdZPW.chunk.mjs";import"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import"./mdi-Ds-fACAT.chunk.mjs";import"./index-FffHbzvj.chunk.mjs";import"./string_decoder-BO00msnV.chunk.mjs";import"./NcInputField-Bwsh2aHY-CDnfv5zO.chunk.mjs";const D=g({__name:"CredentialsDialog",emits:["close"],setup(_){const o=n(""),r=n(""),u=[{label:t("files_external","Confirm"),type:"submit",variant:"primary"}];return(i,a)=>(h(),f(e(m),{buttons:u,class:"external-storage-auth","close-on-click-outside":"","data-cy-external-storage-auth":"","is-form":"",name:e(t)("files_external","Storage credentials"),"out-transition":"",onSubmit:a[2]||(a[2]=l=>i.$emit("close",{login:o.value,password:r.value})),"onUpdate:open":a[3]||(a[3]=l=>i.$emit("close"))},{default:x(()=>[s(e(d),{class:"external-storage-auth__header",text:e(t)("files_external","To access the storage, you need to provide the authentication credentials."),type:"info"},null,8,["text"]),s(e(c),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),autofocus:"",class:"external-storage-auth__login","data-cy-external-storage-auth-dialog-login":"",label:e(t)("files_external","Login"),placeholder:e(t)("files_external","Enter the storage login"),minlength:"2",name:"login",required:""},null,8,["modelValue","label","placeholder"]),s(e(p),{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),class:"external-storage-auth__password","data-cy-external-storage-auth-dialog-password":"",label:e(t)("files_external","Password"),placeholder:e(t)("files_external","Enter the storage password"),name:"password",required:""},null,8,["modelValue","label","placeholder"])]),_:1},8,["name"]))}});export{D as default};
//# sourceMappingURL=CredentialsDialog-BJfz1BoE.chunk.mjs.map
import{t}from"./translation-DoG5ZELJ-gw0g4US-.chunk.mjs";import{N as m}from"./index-JpgrUA2Z-BFiKKJ1W.chunk.mjs";import{N as d}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{N as p}from"./NcPasswordField-djttkA5Q-2g87vOpY.chunk.mjs";import{_ as c}from"./TrashCanOutline-CvWRJ8GE.chunk.mjs";import{b as g,r as n,c as f,o as h,w as x,e as s,u as e}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import"./index-6_gsQFyp.chunk.mjs";import"./index-xFugdZPW.chunk.mjs";import"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import"./mdi-D55n0uzy.chunk.mjs";import"./index-BfylblLb.chunk.mjs";import"./string_decoder-BO00msnV.chunk.mjs";import"./NcInputField-Bwsh2aHY-CHbAfY0u.chunk.mjs";const D=g({__name:"CredentialsDialog",emits:["close"],setup(_){const o=n(""),r=n(""),u=[{label:t("files_external","Confirm"),type:"submit",variant:"primary"}];return(i,a)=>(h(),f(e(m),{buttons:u,class:"external-storage-auth","close-on-click-outside":"","data-cy-external-storage-auth":"","is-form":"",name:e(t)("files_external","Storage credentials"),"out-transition":"",onSubmit:a[2]||(a[2]=l=>i.$emit("close",{login:o.value,password:r.value})),"onUpdate:open":a[3]||(a[3]=l=>i.$emit("close"))},{default:x(()=>[s(e(d),{class:"external-storage-auth__header",text:e(t)("files_external","To access the storage, you need to provide the authentication credentials."),type:"info"},null,8,["text"]),s(e(c),{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),autofocus:"",class:"external-storage-auth__login","data-cy-external-storage-auth-dialog-login":"",label:e(t)("files_external","Login"),placeholder:e(t)("files_external","Enter the storage login"),minlength:"2",name:"login",required:""},null,8,["modelValue","label","placeholder"]),s(e(p),{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),class:"external-storage-auth__password","data-cy-external-storage-auth-dialog-password":"",label:e(t)("files_external","Password"),placeholder:e(t)("files_external","Enter the storage password"),name:"password",required:""},null,8,["modelValue","label","placeholder"])]),_:1},8,["name"]))}});export{D as default};
//# sourceMappingURL=CredentialsDialog-DRqXEuS4.chunk.mjs.map

View file

@ -1 +1 @@
{"version":3,"file":"CredentialsDialog-BJfz1BoE.chunk.mjs","sources":["../build/frontend/apps/files_external/src/views/CredentialsDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport { t } from '@nextcloud/l10n'\nimport { ref } from 'vue'\nimport NcDialog from '@nextcloud/vue/components/NcDialog'\nimport NcNoteCard from '@nextcloud/vue/components/NcNoteCard'\nimport NcPasswordField from '@nextcloud/vue/components/NcPasswordField'\nimport NcTextField from '@nextcloud/vue/components/NcTextField'\n\ndefineEmits<{\n\tclose: [payload?: { login: string, password: string }]\n}>()\n\nconst login = ref('')\nconst password = ref('')\n\nconst dialogButtons: InstanceType<typeof NcDialog>['buttons'] = [{\n\tlabel: t('files_external', 'Confirm'),\n\ttype: 'submit',\n\tvariant: 'primary',\n}]\n</script>\n\n<template>\n\t<NcDialog\n\t\t:buttons=\"dialogButtons\"\n\t\tclass=\"external-storage-auth\"\n\t\tclose-on-click-outside\n\t\tdata-cy-external-storage-auth\n\t\tis-form\n\t\t:name=\"t('files_external', 'Storage credentials')\"\n\t\tout-transition\n\t\t@submit=\"$emit('close', { login, password })\"\n\t\t@update:open=\"$emit('close')\">\n\t\t<!-- Header -->\n\t\t<NcNoteCard\n\t\t\tclass=\"external-storage-auth__header\"\n\t\t\t:text=\"t('files_external', 'To access the storage, you need to provide the authentication credentials.')\"\n\t\t\ttype=\"info\" />\n\n\t\t<!-- Login -->\n\t\t<NcTextField\n\t\t\tv-model=\"login\"\n\t\t\tautofocus\n\t\t\tclass=\"external-storage-auth__login\"\n\t\t\tdata-cy-external-storage-auth-dialog-login\n\t\t\t:label=\"t('files_external', 'Login')\"\n\t\t\t:placeholder=\"t('files_external', 'Enter the storage login')\"\n\t\t\tminlength=\"2\"\n\t\t\tname=\"login\"\n\t\t\trequired />\n\n\t\t<!-- Password -->\n\t\t<NcPasswordField\n\t\t\tv-model=\"password\"\n\t\t\tclass=\"external-storage-auth__password\"\n\t\t\tdata-cy-external-storage-auth-dialog-password\n\t\t\t:label=\"t('files_external', 'Password')\"\n\t\t\t:placeholder=\"t('files_external', 'Enter the storage password')\"\n\t\t\tname=\"password\"\n\t\t\trequired />\n\t</NcDialog>\n</template>\n"],"names":["login","ref","password","dialogButtons","t","_createBlock","_unref","NcDialog","_cache","$event","$emit","_createVNode","NcNoteCard","NcTextField","NcPasswordField"],"mappings":"kvBAiBA,MAAMA,EAAQC,EAAI,EAAE,EACdC,EAAWD,EAAI,EAAE,EAEjBE,EAA0D,CAAC,CAChE,MAAOC,EAAE,iBAAkB,SAAS,EACpC,KAAM,SACN,QAAS,SAAA,CACT,oBAIAC,EAqCWC,EAAAC,CAAA,EAAA,CApCT,QAASJ,EACV,MAAM,wBACN,yBAAA,GACA,gCAAA,GACA,UAAA,GACC,KAAMG,EAAAF,CAAA,EAAC,iBAAA,qBAAA,EACR,iBAAA,GACC,SAAMI,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEC,EAAAA,MAAK,QAAA,CAAA,MAAYV,EAAA,eAAOE,EAAA,MAAQ,GACxC,+BAAaQ,EAAAA,MAAK,OAAA,EAAA,aAEnB,IAGe,CAHfC,EAGeL,EAAAM,CAAA,EAAA,CAFd,MAAM,gCACL,KAAMN,EAAAF,CAAA,EAAC,iBAAA,4EAAA,EACR,KAAK,MAAA,mBAGNO,EASYL,EAAAO,CAAA,EAAA,YARFb,EAAA,2CAAAA,EAAK,MAAAS,GACd,UAAA,GACA,MAAM,+BACN,6CAAA,GACC,MAAOH,EAAAF,CAAA,EAAC,iBAAA,OAAA,EACR,YAAaE,EAAAF,CAAA,EAAC,iBAAA,yBAAA,EACf,UAAU,IACV,KAAK,QACL,SAAA,EAAA,+CAGDO,EAOYL,EAAAQ,CAAA,EAAA,YANFZ,EAAA,2CAAAA,EAAQ,MAAAO,GACjB,MAAM,kCACN,gDAAA,GACC,MAAOH,EAAAF,CAAA,EAAC,iBAAA,UAAA,EACR,YAAaE,EAAAF,CAAA,EAAC,iBAAA,4BAAA,EACf,KAAK,WACL,SAAA,EAAA"}
{"version":3,"file":"CredentialsDialog-DRqXEuS4.chunk.mjs","sources":["../build/frontend/apps/files_external/src/views/CredentialsDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport { t } from '@nextcloud/l10n'\nimport { ref } from 'vue'\nimport NcDialog from '@nextcloud/vue/components/NcDialog'\nimport NcNoteCard from '@nextcloud/vue/components/NcNoteCard'\nimport NcPasswordField from '@nextcloud/vue/components/NcPasswordField'\nimport NcTextField from '@nextcloud/vue/components/NcTextField'\n\ndefineEmits<{\n\tclose: [payload?: { login: string, password: string }]\n}>()\n\nconst login = ref('')\nconst password = ref('')\n\nconst dialogButtons: InstanceType<typeof NcDialog>['buttons'] = [{\n\tlabel: t('files_external', 'Confirm'),\n\ttype: 'submit',\n\tvariant: 'primary',\n}]\n</script>\n\n<template>\n\t<NcDialog\n\t\t:buttons=\"dialogButtons\"\n\t\tclass=\"external-storage-auth\"\n\t\tclose-on-click-outside\n\t\tdata-cy-external-storage-auth\n\t\tis-form\n\t\t:name=\"t('files_external', 'Storage credentials')\"\n\t\tout-transition\n\t\t@submit=\"$emit('close', { login, password })\"\n\t\t@update:open=\"$emit('close')\">\n\t\t<!-- Header -->\n\t\t<NcNoteCard\n\t\t\tclass=\"external-storage-auth__header\"\n\t\t\t:text=\"t('files_external', 'To access the storage, you need to provide the authentication credentials.')\"\n\t\t\ttype=\"info\" />\n\n\t\t<!-- Login -->\n\t\t<NcTextField\n\t\t\tv-model=\"login\"\n\t\t\tautofocus\n\t\t\tclass=\"external-storage-auth__login\"\n\t\t\tdata-cy-external-storage-auth-dialog-login\n\t\t\t:label=\"t('files_external', 'Login')\"\n\t\t\t:placeholder=\"t('files_external', 'Enter the storage login')\"\n\t\t\tminlength=\"2\"\n\t\t\tname=\"login\"\n\t\t\trequired />\n\n\t\t<!-- Password -->\n\t\t<NcPasswordField\n\t\t\tv-model=\"password\"\n\t\t\tclass=\"external-storage-auth__password\"\n\t\t\tdata-cy-external-storage-auth-dialog-password\n\t\t\t:label=\"t('files_external', 'Password')\"\n\t\t\t:placeholder=\"t('files_external', 'Enter the storage password')\"\n\t\t\tname=\"password\"\n\t\t\trequired />\n\t</NcDialog>\n</template>\n"],"names":["login","ref","password","dialogButtons","t","_createBlock","_unref","NcDialog","_cache","$event","$emit","_createVNode","NcNoteCard","NcTextField","NcPasswordField"],"mappings":"kvBAiBA,MAAMA,EAAQC,EAAI,EAAE,EACdC,EAAWD,EAAI,EAAE,EAEjBE,EAA0D,CAAC,CAChE,MAAOC,EAAE,iBAAkB,SAAS,EACpC,KAAM,SACN,QAAS,SAAA,CACT,oBAIAC,EAqCWC,EAAAC,CAAA,EAAA,CApCT,QAASJ,EACV,MAAM,wBACN,yBAAA,GACA,gCAAA,GACA,UAAA,GACC,KAAMG,EAAAF,CAAA,EAAC,iBAAA,qBAAA,EACR,iBAAA,GACC,SAAMI,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEC,EAAAA,MAAK,QAAA,CAAA,MAAYV,EAAA,eAAOE,EAAA,MAAQ,GACxC,+BAAaQ,EAAAA,MAAK,OAAA,EAAA,aAEnB,IAGe,CAHfC,EAGeL,EAAAM,CAAA,EAAA,CAFd,MAAM,gCACL,KAAMN,EAAAF,CAAA,EAAC,iBAAA,4EAAA,EACR,KAAK,MAAA,mBAGNO,EASYL,EAAAO,CAAA,EAAA,YARFb,EAAA,2CAAAA,EAAK,MAAAS,GACd,UAAA,GACA,MAAM,+BACN,6CAAA,GACC,MAAOH,EAAAF,CAAA,EAAC,iBAAA,OAAA,EACR,YAAaE,EAAAF,CAAA,EAAC,iBAAA,yBAAA,EACf,UAAU,IACV,KAAK,QACL,SAAA,EAAA,+CAGDO,EAOYL,EAAAQ,CAAA,EAAA,YANFZ,EAAA,2CAAAA,EAAQ,MAAAO,GACjB,MAAM,kCACN,gDAAA,GACC,MAAOH,EAAAF,CAAA,EAAC,iBAAA,UAAA,EACR,YAAaE,EAAAF,CAAA,EAAC,iBAAA,4BAAA,EACf,KAAK,WACL,SAAA,EAAA"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{b as q,p as h,q as F,D as L,v as N,x as n,j as u,o as i,k as p,l as d,E as z,c as t,z as A,t as v,G as D,m as y,w as E,u as s,g as G,n as M}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{i as g,c as S,d as m,a as o,e as x}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{_ as H,c as J}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";const K={class:"input-field__main-wrapper"},P=["id","aria-describedby","disabled","placeholder","type","value"],Q=["for"],R={class:"input-field__icon input-field__icon--leading"},U={key:2,class:"input-field__icon input-field__icon--trailing"},W=["id"],X=q({inheritAttrs:!1,__name:"NcInputField",props:h({class:{default:""},inputClass:{default:""},id:{default:()=>J()},label:{default:void 0},labelOutside:{type:Boolean},type:{default:"text"},placeholder:{default:void 0},showTrailingButton:{type:Boolean},trailingButtonLabel:{default:void 0},success:{type:Boolean},error:{type:Boolean},helperText:{default:""},disabled:{type:Boolean},pill:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:h(["trailingButtonClick"],["update:modelValue"]),setup(c,{expose:k,emit:B}){const r=F(c,"modelValue"),l=c,$=B;k({focus:O,select:I});const f=L(),b=N("input"),T=n(()=>l.showTrailingButton||l.success),w=n(()=>{if(l.placeholder)return l.placeholder;if(l.label)return g?l.label:""}),_=n(()=>l.label||l.labelOutside),C=n(()=>{const e=[];return l.helperText&&e.push(`${l.id}-helper-text`),f["aria-describedby"]&&e.push(String(f["aria-describedby"])),e.join(" ")||void 0});function O(e){b.value.focus(e)}function I(){b.value.select()}function V(e){const a=e.target;r.value=l.type==="number"&&typeof r.value=="number"?parseFloat(a.value):a.value}return(e,a)=>(i(),u("div",{class:M(["input-field",[{"input-field--disabled":e.disabled,"input-field--error":e.error,"input-field--label-outside":e.labelOutside||!_.value,"input-field--leading-icon":!!e.$slots.icon,"input-field--trailing-icon":T.value,"input-field--pill":e.pill,"input-field--success":e.success,"input-field--legacy":s(g)},e.$props.class]])},[p("div",K,[p("input",A(e.$attrs,{id:e.id,ref:"input","aria-describedby":C.value,"aria-live":"polite",class:["input-field__input",e.inputClass],disabled:e.disabled,placeholder:w.value,type:e.type,value:r.value.toString(),onInput:V}),null,16,P),!e.labelOutside&&_.value?(i(),u("label",{key:0,class:"input-field__label",for:e.id},v(e.label),9,Q)):d("",!0),z(p("div",R,[y(e.$slots,"icon",{},void 0,!0)],512),[[D,!!e.$slots.icon]]),e.showTrailingButton?(i(),t(S,{key:1,class:"input-field__trailing-button","aria-label":e.trailingButtonLabel,disabled:e.disabled,variant:"tertiary-no-background",onClick:a[0]||(a[0]=j=>$("trailingButtonClick",j))},{icon:E(()=>[y(e.$slots,"trailing-button-icon",{},void 0,!0)]),_:3},8,["aria-label","disabled"])):e.success||e.error?(i(),u("div",U,[e.success?(i(),t(o,{key:0,path:s(m)},null,8,["path"])):(i(),t(o,{key:1,path:s(x)},null,8,["path"]))])):d("",!0)]),e.helperText?(i(),u("p",{key:0,id:`${e.id}-helper-text`,class:"input-field__helper-text-message"},[e.success?(i(),t(o,{key:0,class:"input-field__helper-text-message__icon",path:s(m),inline:""},null,8,["path"])):e.error?(i(),t(o,{key:1,class:"input-field__helper-text-message__icon",path:s(x),inline:""},null,8,["path"])):d("",!0),G(" "+v(e.helperText),1)],8,W)):d("",!0)],2))}}),le=H(X,[["__scopeId","data-v-a0e80f48"]]);export{le as N};
//# sourceMappingURL=NcInputField-Bwsh2aHY-CDnfv5zO.chunk.mjs.map
import{b as q,p as h,q as F,D as L,v as N,x as n,j as u,o as i,k as p,l as d,E as z,c as t,z as A,t as v,G as D,m as y,w as E,u as s,g as G,n as M}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{i as g,c as S,d as m,a as o,e as x}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{_ as H,c as J}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";const K={class:"input-field__main-wrapper"},P=["id","aria-describedby","disabled","placeholder","type","value"],Q=["for"],R={class:"input-field__icon input-field__icon--leading"},U={key:2,class:"input-field__icon input-field__icon--trailing"},W=["id"],X=q({inheritAttrs:!1,__name:"NcInputField",props:h({class:{default:""},inputClass:{default:""},id:{default:()=>J()},label:{default:void 0},labelOutside:{type:Boolean},type:{default:"text"},placeholder:{default:void 0},showTrailingButton:{type:Boolean},trailingButtonLabel:{default:void 0},success:{type:Boolean},error:{type:Boolean},helperText:{default:""},disabled:{type:Boolean},pill:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:h(["trailingButtonClick"],["update:modelValue"]),setup(c,{expose:k,emit:B}){const r=F(c,"modelValue"),l=c,$=B;k({focus:O,select:I});const f=L(),b=N("input"),T=n(()=>l.showTrailingButton||l.success),w=n(()=>{if(l.placeholder)return l.placeholder;if(l.label)return g?l.label:""}),_=n(()=>l.label||l.labelOutside),C=n(()=>{const e=[];return l.helperText&&e.push(`${l.id}-helper-text`),f["aria-describedby"]&&e.push(String(f["aria-describedby"])),e.join(" ")||void 0});function O(e){b.value.focus(e)}function I(){b.value.select()}function V(e){const a=e.target;r.value=l.type==="number"&&typeof r.value=="number"?parseFloat(a.value):a.value}return(e,a)=>(i(),u("div",{class:M(["input-field",[{"input-field--disabled":e.disabled,"input-field--error":e.error,"input-field--label-outside":e.labelOutside||!_.value,"input-field--leading-icon":!!e.$slots.icon,"input-field--trailing-icon":T.value,"input-field--pill":e.pill,"input-field--success":e.success,"input-field--legacy":s(g)},e.$props.class]])},[p("div",K,[p("input",A(e.$attrs,{id:e.id,ref:"input","aria-describedby":C.value,"aria-live":"polite",class:["input-field__input",e.inputClass],disabled:e.disabled,placeholder:w.value,type:e.type,value:r.value.toString(),onInput:V}),null,16,P),!e.labelOutside&&_.value?(i(),u("label",{key:0,class:"input-field__label",for:e.id},v(e.label),9,Q)):d("",!0),z(p("div",R,[y(e.$slots,"icon",{},void 0,!0)],512),[[D,!!e.$slots.icon]]),e.showTrailingButton?(i(),t(S,{key:1,class:"input-field__trailing-button","aria-label":e.trailingButtonLabel,disabled:e.disabled,variant:"tertiary-no-background",onClick:a[0]||(a[0]=j=>$("trailingButtonClick",j))},{icon:E(()=>[y(e.$slots,"trailing-button-icon",{},void 0,!0)]),_:3},8,["aria-label","disabled"])):e.success||e.error?(i(),u("div",U,[e.success?(i(),t(o,{key:0,path:s(m)},null,8,["path"])):(i(),t(o,{key:1,path:s(x)},null,8,["path"]))])):d("",!0)]),e.helperText?(i(),u("p",{key:0,id:`${e.id}-helper-text`,class:"input-field__helper-text-message"},[e.success?(i(),t(o,{key:0,class:"input-field__helper-text-message__icon",path:s(m),inline:""},null,8,["path"])):e.error?(i(),t(o,{key:1,class:"input-field__helper-text-message__icon",path:s(x),inline:""},null,8,["path"])):d("",!0),G(" "+v(e.helperText),1)],8,W)):d("",!0)],2))}}),le=H(X,[["__scopeId","data-v-a0e80f48"]]);export{le as N};
//# sourceMappingURL=NcInputField-Bwsh2aHY-CHbAfY0u.chunk.mjs.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{l as k,a as S,m as C,b as F}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{c as N}from"./index-FffHbzvj.chunk.mjs";import{g as M}from"./index-xFugdZPW.chunk.mjs";import{r as $,_ as q,a as z,t as n}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import{d as H}from"./index-6_gsQFyp.chunk.mjs";import{N as I}from"./NcInputField-Bwsh2aHY-CDnfv5zO.chunk.mjs";import{b as L,p as c,q as v,s as O,v as U,r as m,x as f,c as j,o as A,y as D,w as h,m as E,e as G,u as o,z as J}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";$();const K=L({__name:"NcPasswordField",props:c({class:{},inputClass:{default:""},id:{},label:{},labelOutside:{type:Boolean},placeholder:{},showTrailingButton:{type:Boolean,default:!0},success:{type:Boolean},error:{type:Boolean},helperText:{},disabled:{type:Boolean},pill:{type:Boolean},checkPasswordStrength:{type:Boolean},minlength:{default:void 0},asText:{type:Boolean}},{modelValue:{default:""},modelModifiers:{},visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:c(["valid","invalid"],["update:modelValue","update:visible"]),setup(l,{expose:y,emit:w}){const s=v(l,"modelValue"),a=v(l,"visible"),t=l,d=w;O(s,H(B,500)),y({focus:T,select:P});const{password_policy:b}=M(),u=U("inputField"),r=m(""),i=m(),g=f(()=>{const e={...t};return delete e.checkPasswordStrength,delete e.minlength,delete e.asText,delete e.error,delete e.helperText,delete e.inputClass,delete e.success,e}),x=f(()=>t.minlength??(t.checkPasswordStrength?b?.minLength:void 0)??void 0);async function B(){if(t.checkPasswordStrength)try{const{data:e}=await N.post(z("apps/password_policy/api/v1/validate"),{password:s.value});if(i.value=e.ocs.data.passed,e.ocs.data.passed){r.value=n("Password is secure"),d("valid");return}r.value=e.ocs.data.reason,d("invalid")}catch(e){k.error("Password policy returned an error",{error:e})}}function _(){a.value=!a.value}function T(e){u.value.focus(e)}function P(){u.value.select()}return(e,p)=>(A(),j(I,J(g.value,{ref:"inputField",modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=V=>s.value=V),error:e.error||i.value===!1,"helper-text":e.helperText||r.value,"input-class":[e.inputClass,{"password-field__input--secure-text":!a.value&&e.asText}],minlength:x.value,success:e.success||i.value===!0,"trailing-button-label":a.value?o(n)("Hide password"):o(n)("Show password"),type:a.value||e.asText?"text":"password",onTrailingButtonClick:_}),D({"trailing-button-icon":h(()=>[G(S,{path:a.value?o(C):o(F)},null,8,["path"])]),_:2},[e.$slots.icon?{name:"icon",fn:h(()=>[E(e.$slots,"icon",{},void 0,!0)]),key:"0"}:void 0]),1040,["modelValue","error","helper-text","input-class","minlength","success","trailing-button-label","type"]))}}),ae=q(K,[["__scopeId","data-v-b2684de6"]]);export{ae as N};
//# sourceMappingURL=NcPasswordField-djttkA5Q-PPKLVftl.chunk.mjs.map
import{l as k,a as S,m as C,b as F}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{c as N}from"./index-BfylblLb.chunk.mjs";import{g as M}from"./index-xFugdZPW.chunk.mjs";import{r as $,_ as q,a as z,t as n}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import{d as H}from"./index-6_gsQFyp.chunk.mjs";import{N as I}from"./NcInputField-Bwsh2aHY-CHbAfY0u.chunk.mjs";import{b as L,p as c,q as v,s as O,v as U,r as m,x as f,c as j,o as A,y as D,w as h,m as E,e as G,u as o,z as J}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";$();const K=L({__name:"NcPasswordField",props:c({class:{},inputClass:{default:""},id:{},label:{},labelOutside:{type:Boolean},placeholder:{},showTrailingButton:{type:Boolean,default:!0},success:{type:Boolean},error:{type:Boolean},helperText:{},disabled:{type:Boolean},pill:{type:Boolean},checkPasswordStrength:{type:Boolean},minlength:{default:void 0},asText:{type:Boolean}},{modelValue:{default:""},modelModifiers:{},visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:c(["valid","invalid"],["update:modelValue","update:visible"]),setup(l,{expose:y,emit:w}){const s=v(l,"modelValue"),a=v(l,"visible"),t=l,d=w;O(s,H(B,500)),y({focus:T,select:P});const{password_policy:b}=M(),u=U("inputField"),r=m(""),i=m(),g=f(()=>{const e={...t};return delete e.checkPasswordStrength,delete e.minlength,delete e.asText,delete e.error,delete e.helperText,delete e.inputClass,delete e.success,e}),x=f(()=>t.minlength??(t.checkPasswordStrength?b?.minLength:void 0)??void 0);async function B(){if(t.checkPasswordStrength)try{const{data:e}=await N.post(z("apps/password_policy/api/v1/validate"),{password:s.value});if(i.value=e.ocs.data.passed,e.ocs.data.passed){r.value=n("Password is secure"),d("valid");return}r.value=e.ocs.data.reason,d("invalid")}catch(e){k.error("Password policy returned an error",{error:e})}}function _(){a.value=!a.value}function T(e){u.value.focus(e)}function P(){u.value.select()}return(e,p)=>(A(),j(I,J(g.value,{ref:"inputField",modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=V=>s.value=V),error:e.error||i.value===!1,"helper-text":e.helperText||r.value,"input-class":[e.inputClass,{"password-field__input--secure-text":!a.value&&e.asText}],minlength:x.value,success:e.success||i.value===!0,"trailing-button-label":a.value?o(n)("Hide password"):o(n)("Show password"),type:a.value||e.asText?"text":"password",onTrailingButtonClick:_}),D({"trailing-button-icon":h(()=>[G(S,{path:a.value?o(C):o(F)},null,8,["path"])]),_:2},[e.$slots.icon?{name:"icon",fn:h(()=>[E(e.$slots,"icon",{},void 0,!0)]),key:"0"}:void 0]),1040,["modelValue","error","helper-text","input-class","minlength","success","trailing-button-label","type"]))}}),ae=q(K,[["__scopeId","data-v-b2684de6"]]);export{ae as N};
//# sourceMappingURL=NcPasswordField-djttkA5Q-2g87vOpY.chunk.mjs.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{R as z}from"./colors-Go3zmZRD-QB5rieLi.chunk.mjs";import{N as U}from"./NcAvatar-DmUGApWA-doOIHe1I.chunk.mjs";import{H as x}from"./index-JpgrUA2Z-BU0x-nEh.chunk.mjs";import{_ as y}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import{b as k,p as c,q as R,x as s,ae as B,s as L,c as b,o as l,w as o,m as i,N as f,z as S,e as H,k as j,j as _,l as q,K as C,t as K}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";const M={};function W(r,n){return l(),_("div",null,[i(r.$slots,"trigger")])}const A=y(M,[["render",W]]),D={class:"user-bubble__name"},E={key:0,class:"user-bubble__secondary"},F=k({__name:"NcUserBubble",props:c({avatarImage:{default:void 0},user:{default:void 0},displayName:{default:void 0},showUserStatus:{type:Boolean},url:{default:void 0},to:{default:void 0},primary:{type:Boolean},size:{default:20},margin:{default:2}},{open:{type:Boolean},openModifiers:{}}),emits:c(["click"],["update:open"]),setup(r,{emit:n}){const d=R(r,"open"),e=r,g=n,p=s(()=>{if(!e.avatarImage)return!1;try{return!!new URL(e.avatarImage)}catch{return!1}}),m=s(()=>!!e.avatarImage),h=s(()=>({marginInlineStart:`${e.margin}px`})),v=s(()=>{if(!e.url||e.url.trim()==="")return!1;try{return!!new URL(e.url,e.url?.startsWith?.("/")?window.location.href:void 0)}catch{return B("[NcUserBubble] Invalid URL passed",{url:e.url}),!1}}),w=s(()=>v.value?e.url:void 0),N=s(()=>v.value?"a":e.to?z:"div"),I=s(()=>({height:`${e.size}px`,lineHeight:`${e.size}px`,borderRadius:`${e.size/2}px`}));return L([()=>e.displayName,()=>e.user],()=>{!e.displayName&&e.user}),(a,t)=>(l(),b(f(a.$slots.default?x:A),{shown:d.value,"onUpdate:shown":t[1]||(t[1]=u=>d.value=u),class:"user-bubble__wrapper",trigger:"hover focus"},{trigger:o(({attrs:u})=>[(l(),b(f(N.value),S({class:["user-bubble__content",{"user-bubble__content--primary":a.primary}],style:I.value,to:a.to,href:w.value},u,{onClick:t[0]||(t[0]=$=>g("click",$))}),{default:o(()=>[H(U,{url:m.value&&p.value?a.avatarImage:void 0,"icon-class":m.value&&!p.value?a.avatarImage:void 0,user:a.user,"display-name":a.displayName,size:a.size-a.margin*2,style:C(h.value),"disable-tooltip":!0,"disable-menu":!0,"hide-status":!a.showUserStatus,class:"user-bubble__avatar"},null,8,["url","icon-class","user","display-name","size","style","hide-status"]),j("span",D,K(a.displayName||a.user),1),a.$slots.name?(l(),_("span",E,[i(a.$slots,"name",{},void 0,!0)])):q("",!0)]),_:2},1040,["class","style","to","href"]))]),default:o(()=>[i(a.$slots,"default",{},void 0,!0)]),_:3},40,["shown"]))}}),Q=y(F,[["__scopeId","data-v-ad356e41"]]);export{Q as N};
//# sourceMappingURL=NcUserBubble-DPAmU2_J-D4brzYTN.chunk.mjs.map
import{R as z}from"./colors-Go3zmZRD-DU6ImAGi.chunk.mjs";import{N as U}from"./NcAvatar-DmUGApWA-DBHt6M62.chunk.mjs";import{H as x}from"./index-JpgrUA2Z-BFiKKJ1W.chunk.mjs";import{_ as y}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import{b as k,p as c,q as R,x as s,ae as B,s as L,c as b,o as l,w as o,m as i,N as f,z as S,e as H,k as j,j as _,l as q,K as C,t as K}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";const M={};function W(r,n){return l(),_("div",null,[i(r.$slots,"trigger")])}const A=y(M,[["render",W]]),D={class:"user-bubble__name"},E={key:0,class:"user-bubble__secondary"},F=k({__name:"NcUserBubble",props:c({avatarImage:{default:void 0},user:{default:void 0},displayName:{default:void 0},showUserStatus:{type:Boolean},url:{default:void 0},to:{default:void 0},primary:{type:Boolean},size:{default:20},margin:{default:2}},{open:{type:Boolean},openModifiers:{}}),emits:c(["click"],["update:open"]),setup(r,{emit:n}){const d=R(r,"open"),e=r,g=n,p=s(()=>{if(!e.avatarImage)return!1;try{return!!new URL(e.avatarImage)}catch{return!1}}),m=s(()=>!!e.avatarImage),h=s(()=>({marginInlineStart:`${e.margin}px`})),v=s(()=>{if(!e.url||e.url.trim()==="")return!1;try{return!!new URL(e.url,e.url?.startsWith?.("/")?window.location.href:void 0)}catch{return B("[NcUserBubble] Invalid URL passed",{url:e.url}),!1}}),w=s(()=>v.value?e.url:void 0),N=s(()=>v.value?"a":e.to?z:"div"),I=s(()=>({height:`${e.size}px`,lineHeight:`${e.size}px`,borderRadius:`${e.size/2}px`}));return L([()=>e.displayName,()=>e.user],()=>{!e.displayName&&e.user}),(a,t)=>(l(),b(f(a.$slots.default?x:A),{shown:d.value,"onUpdate:shown":t[1]||(t[1]=u=>d.value=u),class:"user-bubble__wrapper",trigger:"hover focus"},{trigger:o(({attrs:u})=>[(l(),b(f(N.value),S({class:["user-bubble__content",{"user-bubble__content--primary":a.primary}],style:I.value,to:a.to,href:w.value},u,{onClick:t[0]||(t[0]=$=>g("click",$))}),{default:o(()=>[H(U,{url:m.value&&p.value?a.avatarImage:void 0,"icon-class":m.value&&!p.value?a.avatarImage:void 0,user:a.user,"display-name":a.displayName,size:a.size-a.margin*2,style:C(h.value),"disable-tooltip":!0,"disable-menu":!0,"hide-status":!a.showUserStatus,class:"user-bubble__avatar"},null,8,["url","icon-class","user","display-name","size","style","hide-status"]),j("span",D,K(a.displayName||a.user),1),a.$slots.name?(l(),_("span",E,[i(a.$slots,"name",{},void 0,!0)])):q("",!0)]),_:2},1040,["class","style","to","href"]))]),default:o(()=>[i(a.$slots,"default",{},void 0,!0)]),_:3},40,["shown"]))}}),Q=y(F,[["__scopeId","data-v-ad356e41"]]);export{Q as N};
//# sourceMappingURL=NcUserBubble-DPAmU2_J-BCvWAzcB.chunk.mjs.map

View file

@ -1,4 +1,4 @@
import{c as T}from"./index-FffHbzvj.chunk.mjs";import{g as q,a as f}from"./index-xFugdZPW.chunk.mjs";import{r as p,m as w,_ as m,t as s,a as x}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import{l as y}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{b,p as L,q as S,x as c,s as B,j as r,l as h,o as l,n as C,k as D,t as I,z as P}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";const M=`<!--
import{c as T}from"./index-BfylblLb.chunk.mjs";import{g as q,a as f}from"./index-xFugdZPW.chunk.mjs";import{r as p,m as w,_ as m,t as s,a as x}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import{l as y}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{b,p as L,q as S,x as c,s as B,j as r,l as h,o as l,n as C,k as D,t as I,z as P}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";const M=`<!--
- SPDX-FileCopyrightText: 2020 Google Inc.
- SPDX-License-Identifier: Apache-2.0
-->
@ -44,4 +44,4 @@ import{c as T}from"./index-FffHbzvj.chunk.mjs";import{g as q,a as f}from"./index
d="m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"/>
</svg>
`;p(),p(w);function H(a){switch(a){case"away":return s("away");case"busy":return s("busy");case"dnd":return s("do not disturb");case"online":return s("online");case"invisible":return s("invisible");case"offline":return s("offline");default:return a}}const k=["aria-hidden","aria-label","innerHTML"],A=b({__name:"NcUserStatusIcon",props:L({user:{default:void 0},ariaHidden:{type:[Boolean,String],default:!1}},{status:{},statusModifiers:{}}),emits:["update:status"],setup(a){const e=S(a,"status"),t=a,d=c(()=>e.value&&["invisible","offline"].includes(e.value)),o=c(()=>e.value&&(!t.ariaHidden||t.ariaHidden==="false")?s("User status: {status}",{status:H(e.value)}):void 0);B(()=>t.user,async u=>{if(!e.value&&u&&q()?.user_status?.enabled)try{const{data:i}=await T.get(x("/apps/user_status/api/v1/statuses/{user}",{user:u}));e.value=i.ocs?.data?.status}catch(i){y.debug("Error while fetching user status",{error:i})}},{immediate:!0});const v={online:_,away:M,busy:Z,dnd:X,invisible:g,offline:g},n=c(()=>e.value&&v[e.value]);return(u,i)=>e.value?(l(),r("span",{key:0,class:C(["user-status-icon",{"user-status-icon--invisible":d.value}]),"aria-hidden":!o.value||void 0,"aria-label":o.value,role:"img",innerHTML:n.value},null,10,k)):h("",!0)}}),K=m(A,[["__scopeId","data-v-881a79fb"]]),F={name:"PencilOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},G=["aria-hidden","aria-label"],z=["fill","width","height"],N={d:"M14.06,9L15,9.94L5.92,19H5V18.08L14.06,9M17.66,3C17.41,3 17.15,3.1 16.96,3.29L15.13,5.12L18.88,8.87L20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18.17,3.09 17.92,3 17.66,3M14.06,6.19L3,17.25V21H6.75L17.81,9.94L14.06,6.19Z"},U={key:0};function V(a,e,t,d,o,v){return l(),r("span",P(a.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon pencil-outline-icon",role:"img",onClick:e[0]||(e[0]=n=>a.$emit("click",n))}),[(l(),r("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[D("path",N,[t.title?(l(),r("title",U,I(t.title),1)):h("",!0)])],8,z))],16,G)}const Q=f(F,[["render",V]]);export{K as N,Q as P,H as g};
//# sourceMappingURL=PencilOutline-DGmdu8CF.chunk.mjs.map
//# sourceMappingURL=PencilOutline-DCq8EKwg.chunk.mjs.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
import{a as f,k as H,n as k,o as w}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{r as x,t as c}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";import{N as h}from"./NcInputField-Bwsh2aHY-CDnfv5zO.chunk.mjs";import{b as C,p as _,q as I,v as M,x as O,c as d,o as l,y as j,w as g,m as z,u as a,z as y,j as p,k as S,l as T,t as $}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{a as E}from"./index-xFugdZPW.chunk.mjs";x();const G=C({__name:"NcTextField",props:_({class:{},inputClass:{},id:{},label:{},labelOutside:{type:Boolean},type:{},placeholder:{},showTrailingButton:{type:Boolean},trailingButtonLabel:{default:void 0},success:{type:Boolean},error:{type:Boolean},helperText:{},disabled:{type:Boolean},pill:{type:Boolean},trailingButtonIcon:{default:"close"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(o,{expose:i}){const e=I(o,"modelValue"),s=o;i({focus:B,select:b});const r=M("inputField"),m={arrowEnd:c("Save changes"),close:c("Clear text"),undo:c("Undo changes")},u=new Set(Object.keys(h.props)),V=O(()=>{const t=Object.fromEntries(Object.entries(s).filter(([n])=>u.has(n)));return t.trailingButtonLabel??=m[s.trailingButtonIcon],t});function B(t){r.value.focus(t)}function b(){r.value.select()}return(t,n)=>(l(),d(a(h),y(V.value,{ref:"inputField",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=v=>e.value=v)}),j({_:2},[t.$slots.icon?{name:"icon",fn:g(()=>[z(t.$slots,"icon")]),key:"0"}:void 0,t.type!=="search"?{name:"trailing-button-icon",fn:g(()=>[t.trailingButtonIcon==="arrowEnd"?(l(),d(a(f),{key:0,directional:"",path:a(H)},null,8,["path"])):(l(),d(a(f),{key:1,path:t.trailingButtonIcon==="undo"?a(k):a(w)},null,8,["path"]))]),key:"1"}:void 0]),1040,["modelValue"]))}}),F={name:"TrashCanOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},N=["aria-hidden","aria-label"],A=["fill","width","height"],L={d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"},U={key:0};function q(o,i,e,s,r,m){return l(),p("span",y(o.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon trash-can-outline-icon",role:"img",onClick:i[0]||(i[0]=u=>o.$emit("click",u))}),[(l(),p("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[S("path",L,[e.title?(l(),p("title",U,$(e.title),1)):T("",!0)])],8,A))],16,N)}const J=E(F,[["render",q]]);export{J as D,G as _};
//# sourceMappingURL=TrashCanOutline-Dy-u-_ok.chunk.mjs.map
import{a as f,k as H,n as k,o as w}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{r as x,t as c}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";import{N as h}from"./NcInputField-Bwsh2aHY-CHbAfY0u.chunk.mjs";import{b as C,p as _,q as I,v as M,x as O,c as d,o as l,y as j,w as g,m as z,u as a,z as y,j as p,k as S,l as T,t as $}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{a as E}from"./index-xFugdZPW.chunk.mjs";x();const G=C({__name:"NcTextField",props:_({class:{},inputClass:{},id:{},label:{},labelOutside:{type:Boolean},type:{},placeholder:{},showTrailingButton:{type:Boolean},trailingButtonLabel:{default:void 0},success:{type:Boolean},error:{type:Boolean},helperText:{},disabled:{type:Boolean},pill:{type:Boolean},trailingButtonIcon:{default:"close"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(o,{expose:i}){const e=I(o,"modelValue"),s=o;i({focus:B,select:b});const r=M("inputField"),m={arrowEnd:c("Save changes"),close:c("Clear text"),undo:c("Undo changes")},u=new Set(Object.keys(h.props)),V=O(()=>{const t=Object.fromEntries(Object.entries(s).filter(([n])=>u.has(n)));return t.trailingButtonLabel??=m[s.trailingButtonIcon],t});function B(t){r.value.focus(t)}function b(){r.value.select()}return(t,n)=>(l(),d(a(h),y(V.value,{ref:"inputField",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=v=>e.value=v)}),j({_:2},[t.$slots.icon?{name:"icon",fn:g(()=>[z(t.$slots,"icon")]),key:"0"}:void 0,t.type!=="search"?{name:"trailing-button-icon",fn:g(()=>[t.trailingButtonIcon==="arrowEnd"?(l(),d(a(f),{key:0,directional:"",path:a(H)},null,8,["path"])):(l(),d(a(f),{key:1,path:t.trailingButtonIcon==="undo"?a(k):a(w)},null,8,["path"]))]),key:"1"}:void 0]),1040,["modelValue"]))}}),F={name:"TrashCanOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},N=["aria-hidden","aria-label"],A=["fill","width","height"],L={d:"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"},U={key:0};function q(o,i,e,s,r,m){return l(),p("span",y(o.$attrs,{"aria-hidden":e.title?null:"true","aria-label":e.title,class:"material-design-icon trash-can-outline-icon",role:"img",onClick:i[0]||(i[0]=u=>o.$emit("click",u))}),[(l(),p("svg",{fill:e.fillColor,class:"material-design-icon__svg",width:e.size,height:e.size,viewBox:"0 0 24 24"},[S("path",L,[e.title?(l(),p("title",U,$(e.title),1)):T("",!0)])],8,A))],16,N)}const J=E(F,[["render",q]]);export{J as D,G as _};
//# sourceMappingURL=TrashCanOutline-CvWRJ8GE.chunk.mjs.map

File diff suppressed because one or more lines are too long

2
dist/TrayArrowDown-DV7s2Yis.chunk.mjs vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,17 @@
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: Austin Andrews
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Rob Cresswell <robcresswell@pm.me>
This file is generated from multiple sources. Included packages:
- @mdi/svg
- version: 7.4.47
- license: Apache-2.0
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
- vue-material-design-icons
- version: 5.3.1
- license: MIT

File diff suppressed because one or more lines are too long

View file

@ -1,12 +1,17 @@
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
SPDX-FileCopyrightText: Austin Andrews
SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
SPDX-FileCopyrightText: Rob Cresswell <robcresswell@pm.me>
This file is generated from multiple sources. Included packages:
- @mdi/svg
- version: 7.4.47
- license: Apache-2.0
- @nextcloud/vue
- version: 9.3.1
- license: AGPL-3.0-or-later
- vue-material-design-icons
- version: 5.3.1
- license: MIT

View file

@ -1,2 +0,0 @@
import{a as s}from"./index-xFugdZPW.chunk.mjs";import{j as e,o as t,k as o,l as n,t as c,z as d}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";const V='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-check" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" /></svg>',g={name:"TrayArrowDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},m=["aria-hidden","aria-label"],h=["fill","width","height"],p={d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 15L17.55 9.54L16.13 8.13L13 11.25V2H11V11.25L7.88 8.13L6.46 9.55L12 15Z"},w={key:0};function L(l,a,i,u,f,v){return t(),e("span",d(l.$attrs,{"aria-hidden":i.title?null:"true","aria-label":i.title,class:"material-design-icon tray-arrow-down-icon",role:"img",onClick:a[0]||(a[0]=r=>l.$emit("click",r))}),[(t(),e("svg",{fill:i.fillColor,class:"material-design-icon__svg",width:i.size,height:i.size,viewBox:"0 0 24 24"},[o("path",p,[i.title?(t(),e("title",w,c(i.title),1)):n("",!0)])],8,h))],16,m)}const y=s(g,[["render",L]]);export{y as D,V as s};
//# sourceMappingURL=TrayArrowDown-Dax641oC.chunk.mjs.map

View file

@ -1 +0,0 @@
{"version":3,"file":"TrayArrowDown-Dax641oC.chunk.mjs","sources":["../node_modules/@mdi/svg/svg/check.svg?raw","../node_modules/vue-material-design-icons/TrayArrowDown.vue"],"sourcesContent":["export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-check\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z\\\" /></svg>\"","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon tray-arrow-down-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 15L17.55 9.54L16.13 8.13L13 11.25V2H11V11.25L7.88 8.13L6.46 9.55L12 15Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"TrayArrowDownIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>"],"names":["svgCheck","_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_ctx","$props","_cache","$event","_createElementVNode","_openBlock"],"mappings":"mJAAA,MAAAA,EAAe,wJCoBVC,EAAU,CACb,KAAM,oBACN,MAAO,CAAC,OAAO,EACf,MAAO,CACL,MAAO,CACL,KAAM,QAER,UAAW,CACT,KAAM,OACN,QAAS,gBAEX,KAAM,CACJ,KAAM,OACN,QAAS,EACX,CACF,CACF,6DAxBYC,EAAA,CAAA,EAAE,oJAAoJ,+CAXhKC,EAeO,OAfPC,EAAcC,EAAA,OAAM,CACb,cAAaC,EAAA,MAAK,KAAA,OAClB,aAAYA,EAAA,MACb,MAAM,4CACN,KAAK,MACJ,QAAKC,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,QAAUG,CAAM,WACjCL,EAQM,MAAA,CARA,KAAMG,EAAA,UACP,MAAM,4BACL,MAAOA,EAAA,KACP,OAAQA,EAAA,KACT,QAAQ,cACXG,EAEO,OAFPP,EAEO,CADQI,EAAA,OAAbI,EAAA,EAAAP,EAAuC,YAAhBG,EAAA,KAAK,EAAA,CAAA","x_google_ignoreList":[0,1]}

View file

@ -1,2 +1,2 @@
import{r as T,p as E,q as k,s as O,t as S,u as V}from"./NcNoteCard-CVhtNL04-DvQ-q8jC.chunk.mjs";import{b as D,I as K,M as b,x as l,a7 as $,u as m}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{r as I,o as P,t as i}from"./createElementId-DhjFt1I9-CmaX6aVQ.chunk.mjs";function y(e){const t=b(T),n=b(E),r=l(()=>{const c=m(e.to);return t.resolve(c)}),a=l(()=>{const{matched:c}=r.value,{length:u}=c,p=c[u-1],h=n.matched;if(!p||!h.length)return-1;const v=h.findIndex(k.bind(null,p));if(v>-1)return v;const C=M(c[u-2]);return u>1&&M(p)===C&&h[h.length-1].path!==C?h.findIndex(k.bind(null,c[u-2])):v}),o=l(()=>a.value>-1&&W(n.params,r.value.params)),f=l(()=>a.value>-1&&a.value===n.matched.length-1&&O(n.params,r.value.params));function g(c={}){if(L(c)){const u=t[m(e.replace)?"replace":"push"](m(e.to)).catch(V);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:l(()=>r.value.href),isActive:o,isExactActive:f,navigate:g}}function R(e){return e.length===1?e[0]:e}const q=D({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:y,setup(e,{slots:t}){const n=K(y(e)),{options:r}=b(T),a=l(()=>({[B(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[B(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&R(t.default(n));return e.custom?o:$("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},o)}}}),_=q;function L(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function W(e,t){for(const n in t){const r=t[n],a=e[n];if(typeof r=="string"){if(r!==a)return!1}else if(!S(a)||a.length!==r.length||r.some((o,f)=>o!==a[f]))return!1}return!0}function M(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const B=(e,t,n)=>e??t??n;I(P);class s{constructor(t,n,r,a){this.r=t,this.g=n,this.b=r,this.name=a,this.r=Math.min(t,255),this.g=Math.min(n,255),this.b=Math.min(r,255),this.name=a}get color(){const t=n=>`00${n.toString(16)}`.slice(-2);return`#${t(this.r)}${t(this.g)}${t(this.b)}`}}function j(e,t,n){return{r:(n.r-t.r)/e,g:(n.g-t.g)/e,b:(n.b-t.b)/e}}function d(e,t,n){const r=[];r.push(t);const a=j(e,t,n);for(let o=1;o<e;o++){const f=Math.floor(t.r+a.r*o),g=Math.floor(t.g+a.g*o),c=Math.floor(t.b+a.b*o);r.push(new s(f,g,c))}return r}const w=new s(182,70,157,i("Purple")),x=new s(221,203,85,i("Gold")),A=new s(0,130,201,i("Nextcloud blue")),H=new s(0,0,0,i("Black")),U=new s(255,255,255,i("White")),Y=[w,new s(191,103,139,i("Rosy brown")),new s(201,136,121,i("Feldspar")),new s(211,169,103,i("Whiskey")),x,new s(165,184,114,i("Olivine")),new s(110,166,143,i("Acapulco")),new s(55,148,172,i("Boston Blue")),A,new s(45,115,190,i("Mariner")),new s(91,100,179,i("Blue Violet")),new s(136,85,168,i("Deluge"))];function z(e){const t=d(e,w,x),n=d(e,x,A),r=d(e,A,w);return t.concat(n).concat(r)}export{H as C,_ as R,U as a,s as b,Y as d,z as g};
//# sourceMappingURL=colors-Go3zmZRD-QB5rieLi.chunk.mjs.map
import{r as T,p as E,q as k,s as O,t as S,u as V}from"./NcNoteCard-CVhtNL04-hwuc093N.chunk.mjs";import{b as D,I as K,M as b,x as l,a7 as $,u as m}from"./runtime-dom.esm-bundler-BrYCUcZF.chunk.mjs";import{r as I,o as P,t as i}from"./createElementId-DhjFt1I9--Zqj3wLs.chunk.mjs";function y(e){const t=b(T),n=b(E),r=l(()=>{const c=m(e.to);return t.resolve(c)}),a=l(()=>{const{matched:c}=r.value,{length:u}=c,p=c[u-1],h=n.matched;if(!p||!h.length)return-1;const v=h.findIndex(k.bind(null,p));if(v>-1)return v;const C=M(c[u-2]);return u>1&&M(p)===C&&h[h.length-1].path!==C?h.findIndex(k.bind(null,c[u-2])):v}),o=l(()=>a.value>-1&&W(n.params,r.value.params)),f=l(()=>a.value>-1&&a.value===n.matched.length-1&&O(n.params,r.value.params));function g(c={}){if(L(c)){const u=t[m(e.replace)?"replace":"push"](m(e.to)).catch(V);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:l(()=>r.value.href),isActive:o,isExactActive:f,navigate:g}}function R(e){return e.length===1?e[0]:e}const q=D({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:y,setup(e,{slots:t}){const n=K(y(e)),{options:r}=b(T),a=l(()=>({[B(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[B(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&R(t.default(n));return e.custom?o:$("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},o)}}}),_=q;function L(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function W(e,t){for(const n in t){const r=t[n],a=e[n];if(typeof r=="string"){if(r!==a)return!1}else if(!S(a)||a.length!==r.length||r.some((o,f)=>o!==a[f]))return!1}return!0}function M(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const B=(e,t,n)=>e??t??n;I(P);class s{constructor(t,n,r,a){this.r=t,this.g=n,this.b=r,this.name=a,this.r=Math.min(t,255),this.g=Math.min(n,255),this.b=Math.min(r,255),this.name=a}get color(){const t=n=>`00${n.toString(16)}`.slice(-2);return`#${t(this.r)}${t(this.g)}${t(this.b)}`}}function j(e,t,n){return{r:(n.r-t.r)/e,g:(n.g-t.g)/e,b:(n.b-t.b)/e}}function d(e,t,n){const r=[];r.push(t);const a=j(e,t,n);for(let o=1;o<e;o++){const f=Math.floor(t.r+a.r*o),g=Math.floor(t.g+a.g*o),c=Math.floor(t.b+a.b*o);r.push(new s(f,g,c))}return r}const w=new s(182,70,157,i("Purple")),x=new s(221,203,85,i("Gold")),A=new s(0,130,201,i("Nextcloud blue")),H=new s(0,0,0,i("Black")),U=new s(255,255,255,i("White")),Y=[w,new s(191,103,139,i("Rosy brown")),new s(201,136,121,i("Feldspar")),new s(211,169,103,i("Whiskey")),x,new s(165,184,114,i("Olivine")),new s(110,166,143,i("Acapulco")),new s(55,148,172,i("Boston Blue")),A,new s(45,115,190,i("Mariner")),new s(91,100,179,i("Blue Violet")),new s(136,85,168,i("Deluge"))];function z(e){const t=d(e,w,x),n=d(e,x,A),r=d(e,A,w);return t.concat(n).concat(r)}export{H as C,_ as R,U as a,s as b,Y as d,z as g};
//# sourceMappingURL=colors-Go3zmZRD-DU6ImAGi.chunk.mjs.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more