Files
nextcloud-server/dist/NcTextArea-CseOD9aM-DbV5V1vm.chunk.mjs
nextcloud-command 78098c8325 chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-04-01 13:41:02 +00:00

3 lines
10 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{r as i,B as W,C as G,D as J,t as K,E as Q,F as Y,s as X,b as k,G as Z,H as ee,I as F,J as te,K as ae,L as se,M as re,l as oe,O as ne,_ as B,N as V,P as ie,Q as le,R as ue,S as ce,c as de}from"./NcIconSvgWrapper-De-2-ukl-CcvQeIAt.chunk.mjs";import{d as pe}from"./index-Bp9-GhMo.chunk.mjs";import"./translation-DoG5ZELJ-DJHEP2RB.chunk.mjs";import{n as w,j as he,k as me,l as ge}from"./mdi-BUoBIgaz.chunk.mjs";import{a as fe}from"./NcModal-kyWZ3UFC-BxKwwKAq.chunk.mjs";import"./PencilOutline-BzoFsBsK.chunk.mjs";import"./Web-rJva_rmF.chunk.mjs";import{_ as be,N as ye}from"./NcSelect-B1uITk_3-D769WsNG.chunk.mjs";import"./NcInputField-CPL-a_MM-DHVwy56P.chunk.mjs";import{b as U,z as M,A as ve,n as R,o as c,f as g,k as I,w as H,u as m,F as L,i as xe,h as f,C as z,l as Se,r as P,m as b,g as y,c as v,t as O,R as _e,J as Ne,j as ke,D as j}from"./preload-helper-DoJVKVMq.chunk.mjs";import"./NcDialog-nDc1gW50-CpnK8gUQ.chunk.mjs";import"./NcContent-D69ktIEB-DFgyD-CP.chunk.mjs";import"./NcEmptyContent-CDgWCt_m-MnlDvtO9.chunk.mjs";import{P as Ie}from"./index-CBZdOufL.chunk.mjs";import{a as Le,N as Oe}from"./NcAvatar-ruClKRzS-D00PbCEA.chunk.mjs";import"./index-ClciYKp3.chunk.mjs";import{g as we}from"./public-CvthP4YJ.chunk.mjs";i(),i(W),{...fe.props},i(G),i(J),i(Q,K),i(X,Y),k("Search …"),i(Z),i(ee),i(F);const Pe="LOCALHOST",Ve="COLON",x={defaultProtocol:"http",events:null,format:T,formatHref:T,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function E(e,s=null){let t=Object.assign({},x);e&&(t=Object.assign(t,e instanceof E?e.o:e));const r=t.ignoreTags,o=[];for(let n=0;n<r.length;n++)o.push(r[n].toUpperCase());this.o=t,s&&(this.defaultRender=s),this.ignoreTags=o}E.prototype={o:x,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,s,t){const r=s!=null;let o=this.o[e];return o&&(typeof o=="object"?(o=t.t in o?o[t.t]:x[e],typeof o=="function"&&r&&(o=o(s,t))):typeof o=="function"&&r&&(o=o(s,t.t,t)),o)},getObj(e,s,t){let r=this.o[e];return typeof r=="function"&&s!=null&&(r=r(s,t.t,t)),r},render(e){const s=e.render(this);return(this.get("render",null,e)||this.defaultRender)(s,e.t,e)}};function T(e){return e}function q(e,s){this.t="token",this.v=e,this.tk=s}q.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const s=this.toString(),t=e.get("truncate",s,this),r=e.get("format",s,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=x.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const s=this,t=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",t,this),o=e.get("tagName",t,s),n=this.toFormattedString(e),l={},d=e.get("className",t,s),h=e.get("target",t,s),p=e.get("rel",t,s),u=e.getObj("attributes",t,s),a=e.getObj("events",t,s);return l.href=r,d&&(l.class=d),h&&(l.target=h),p&&(l.rel=p),u&&Object.assign(l,u),{tagName:o,attributes:l,content:n,eventListeners:a}}};function _(e,s){class t extends q{constructor(o,n){super(o,n),this.t=e}}for(const r in s)t.prototype[r]=s[r];return t.t=e,t}_("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),_("text"),_("nl"),_("url",{isLink:!0,toHref(e=x.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Pe&&e[1].t===Ve}}),i(te),new Ie({concurrency:5}),i(ae),i(se),i(re),k("More items …");const ze=oe().detectLanguage(),N=ze.build();N.ngettext.bind(N),N.gettext.bind(N),i(ne),i(F);const Be=8,$=32,Ce={name:"NcListItemIcon",components:{NcAvatar:Oe,NcHighlight:be,NcIconSvgWrapper:V},mixins:[Le],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:$},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:Be,defaultSize:$}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const e=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*e+"px","--margin":this.margin+"px"}},searchParts(){const e=/^([^<]*)<([^>]+)>?$/,s=this.search.match(e);return this.isNoUser||!s?[this.search,this.search]:[s[1].trim(),s[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}},He=["id"],je={class:"option__details"},Te={key:1},$e=["aria-label"];function Ae(e,s,t,r,o,n){const l=P("NcAvatar"),d=P("NcHighlight"),h=P("NcIconSvgWrapper");return c(),g("span",{id:t.id,class:L(["option",{"option--compact":t.avatarSize<r.defaultSize}]),style:_e(n.cssVars)},[I(l,b(e.$attrs,{disableMenu:"",disableTooltip:"",displayName:t.displayName||t.name,isNoUser:t.isNoUser,size:t.avatarSize,class:"option__avatar"}),null,16,["displayName","isNoUser","size"]),y("div",je,[I(d,{class:"option__lineone",text:t.name,search:n.searchParts[0]},null,8,["text","search"]),n.isValidSubname&&n.isSizeBigEnough?(c(),v(d,{key:0,class:"option__linetwo",text:t.subname,search:n.searchParts[1]},null,8,["text","search"])):e.hasStatus?(c(),g("span",Te,[y("span",null,O(e.userStatus.icon),1),y("span",null,O(e.userStatus.message),1)])):f("",!0)]),xe(e.$slots,"default",{},()=>[n.hasIconSvg?(c(),v(h,{key:0,class:"option__icon",svg:t.iconSvg,name:t.iconName},null,8,["svg","name"])):n.hasIcon?(c(),g("span",{key:1,class:L(["icon option__icon",t.icon]),"aria-label":t.iconName},null,10,$e)):f("",!0)],!0)],14,He)}const A=B(Ce,[["render",Ae],["__scopeId","data-v-0ee94269"]]);Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--clickable-area-small")),i(ie),i(le),we()?.circles?.teamResourceProviders,i(ue),k("Related resources"),k("Anything shared with the same group of people will show up here");const Fe=U({__name:"NcSelectUsers",props:z({ariaLabelClearSelected:{},ariaLabelListbox:{},ariaLabelDeselectOption:{type:Function},disabled:{type:Boolean},inputId:{},inputLabel:{},labelOutside:{type:Boolean},keepOpen:{type:Boolean},loading:{type:Boolean},multiple:{type:Boolean},noWrap:{type:Boolean},options:{},placeholder:{},required:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:z(["search"],["update:modelValue"]),setup(e,{emit:s}){const t=M(e,"modelValue"),r=s,o=Se("");R(o,()=>r("search",o.value));const n=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),l=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),d=n-2*l;function h(p,u,a){const S=/[^<]*<([^>]+)/,C=a.match(S),D=p.subname?.toLocaleLowerCase()??"";return C&&D.indexOf(C[1].toLocaleLowerCase())>-1||`${u} ${p.subname}`.toLocaleLowerCase().indexOf(a.toLocaleLowerCase())>-1}return(p,u)=>(c(),v(m(ye),b({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a),class:"nc-select-users"},p.$props,{filterBy:h,label:"displayName",onSearch:u[1]||(u[1]=a=>o.value=a)}),{option:H(a=>[I(m(A),b(a,{avatarSize:32,name:a.displayName,search:o.value}),null,16,["name","search"])]),"selected-option":H(a=>[I(m(A),b(a,{avatarSize:d,name:a.displayName,noMargin:"",search:o.value}),null,16,["name","search"])]),_:1},16,["modelValue"]))}}),ht=B(Fe,[["__scopeId","data-v-e8e18fd3"]]);i(ce),pe(function(e){this.loadGroup(e)},200);const Ue={class:"textarea__main-wrapper"},Me=["id","aria-describedby","disabled","placeholder","value"],Re=["for"],Ee=["id"],qe=U({inheritAttrs:!1,__name:"NcTextArea",props:z({disabled:{type:Boolean},error:{type:Boolean},helperText:{default:void 0},id:{default:()=>de()},inputClass:{default:""},label:{default:void 0},labelOutside:{type:Boolean},placeholder:{default:void 0},resize:{default:"both"},success:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:s}){const t=M(e,"modelValue"),r=e;s({focus:p,select:u});const o=Ne(),n=ve("input"),l=j(()=>r.placeholder||(w?r.label:void 0));R(()=>r.labelOutside,()=>{!r.labelOutside&&!r.label&&ge.warn("[NcTextArea] You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.")});const d=j(()=>{const a=[];return r.helperText&&a.push(`${r.id}-helper-text`),typeof o["aria-describedby"]=="string"&&a.push(o["aria-describedby"]),a.join(" ")||void 0});function h(a){const{value:S}=a.target;t.value=S}function p(a){n.value.focus(a)}function u(){n.value.select()}return(a,S)=>(c(),g("div",{class:L(["textarea",[a.$attrs.class,{"textarea--disabled":a.disabled,"textarea--legacy":m(w)}]])},[y("div",Ue,[y("textarea",b({...a.$attrs,class:void 0},{id:a.id,ref:"input","aria-describedby":d.value,"aria-live":"polite",class:["textarea__input",[a.inputClass,{"textarea__input--label-outside":a.labelOutside,"textarea__input--legacy":m(w),"textarea__input--success":a.success,"textarea__input--error":a.error}]],disabled:a.disabled,placeholder:l.value,style:{resize:a.resize},value:t.value,onInput:h}),null,16,Me),a.labelOutside?f("",!0):(c(),g("label",{key:0,class:"textarea__label",for:a.id},O(a.label),9,Re))]),a.helperText?(c(),g("p",{key:0,id:`${a.id}-helper-text`,class:L(["textarea__helper-text-message",{"textarea__helper-text-message--error":a.error,"textarea__helper-text-message--success":a.success}])},[a.success?(c(),v(V,{key:0,class:"textarea__helper-text-message__icon",path:m(he),inline:""},null,8,["path"])):a.error?(c(),v(V,{key:1,class:"textarea__helper-text-message__icon",path:m(me),inline:""},null,8,["path"])):f("",!0),ke(" "+O(a.helperText),1)],10,Ee)):f("",!0)],2))}}),mt=B(qe,[["__scopeId","data-v-657c47f8"]]);export{ht as N,mt as a};
//# sourceMappingURL=NcTextArea-CseOD9aM-DbV5V1vm.chunk.mjs.map