PageSourceSearch

https://cloud.selbstlernserver.de/store-apps/collectives/js/collectives-reference.mjs?v=e41f2372-11

js selbstlernserver.de collected 2026-10-05 01:42:24 UTC 11,179 bytes, 2 lines download raw bytes

1import{b as $,P as q,c as x,d as E,e as T,C as D,A as H,f as M,r as R,g as W,h as G,i as Z}from"./PageIcon-BXDg1iZ8.chunk.mjs";import{o as l,c as s,a as n,t as o,b as v,m as L,d as N,h as w,H as a,Z as P,e as p,F as f,E as h,f as m,D as J,N as Q,v as K,w as g,G as X,j as S}from"./NcButton-C0Rt1u73.chunk.mjs";import{c as Y,e as ee,d as te,i as ie}from"./public-DlqchCUM.chunk.mjs";import{_ as le,N as se,d as ae}from"./NcModal-BuJCI3bA.chunk.mjs";import{_ as y}from"./_plugin-vue_export-helper-DkBX4V6b.chunk.mjs";import"./colors-BSjUQ0JC.chunk.mjs";import"./index-BJk_viv1.chunk.mjs";function ce(e){return Y.get($("v1.0","collectives","search","recent"),{params:{query:e}})}const oe={name:"AlertOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ne=["aria-hidden","aria-label"],re=["fill","width","height"],de={d:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16"},ue={key:0};function pe(e,i,t,c,u,C){return l(),s("span",L(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon alert-outline-icon",role:"img",onClick:i[0]||(i[0]=d=>e.$emit("click",d))}),[(l(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[n("path",de,[t.title?(l(),s("title",ue,o(t.title),1)):v("",!0)])],8,re))],16,ne)}const ge=y(oe,[["render",pe]]),he={name:"FilterCheckOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},me=["aria-hidden","aria-label"],ve=["fill","width","height"],Ce={d:"M13 19.88C13.04 20.18 12.94 20.5 12.72 20.71C12.32 21.1 11.69 21.1 11.3 20.71L7.29 16.7C7.06 16.47 6.96 16.16 7 15.87V10.75L2.21 4.62C1.87 4.19 1.95 3.56 2.38 3.22C2.57 3.08 2.78 3 3 3H17C17.22 3 17.43 3.08 
117.62 3.22C18.05 3.56 18.13 4.19 17.79 4.62L13 10.75V19.88M5.04 5L9 10.07V15.58L11 17.58V10.05L14.96 5H5.04M17.75 21L15 18L16.16 16.84L17.75 18.43L21.34 14.84L22.5 16.25L17.75 21"},ye={key:0};function fe(e,i,t,c,u,C){return l(),s("span",L(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon filter-check-outline-icon",role:"img",onClick:i[0]||(i[0]=d=>e.$emit("click",d))}),[(l(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[n("path",Ce,[t.title?(l(),s("title",ye,o(t.title),1)):v("",!0)])],8,ve))],16,me)}const ke=y(he,[["render",fe]]),be={name:"FilterOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Pe=["aria-hidden","aria-label"],we=["fill","width","height"],Le={d:"M15,19.88C15.04,20.18 14.94,20.5 14.71,20.71C14.32,21.1 13.69,21.1 13.3,20.71L9.29,16.7C9.06,16.47 8.96,16.16 9,15.87V10.75L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L15,10.75V19.88M7.04,5L11,10.06V15.58L13,17.58V10.05L16.96,5H7.04Z"},Ie={key:0};function Se(e,i,t,c,u,C){return l(),s("span",L(e.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon filter-outline-icon",role:"img",onClick:i[0]||(i[0]=d=>e.$emit("click",d))}),[(l(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[n("path",Le,[t.title?(l(),s("title",Ie,o(t.title),1)):v("",!0)])],8,we))],16,Pe)}const Ne=y(be,[["render",Se]]),Oe=N({name:"PagePreview",components:{NcUserBubble:x,PageIcon:q},props:{notFound:{type:Boolean,default:!1},link:{type:String,default:null},title:{type:String,required:!0},description:{type:String,required:!0},emoji:{type:String,default:""},lastEdited:{type:String,default:""},lastUserId:{type:String,default:""},lastUserDisplayName:{type:String,default:""},small:{type:Boolean,default:!1}},computed:{iconSize(){return this.small?34:50},pageStyle(){return{"padding-inline":`${this.small?8:12}px !important`}},imageStyle(){return{width:`${this.iconSize}px`}},emojiStyle(){return{"font-size":`calc(${this.iconSize}px * 0.8)`,height:`${this.iconSize}px`}}},methods:{t:w,clickLink(e){if(!this.link)return!1;window.OCA.Collectives?.openLink&&(e.preventDefault(),window.OCA.Collectives.openLink(this.link))}}}),je=["href"],Ue={class:"collective-page--info"},_e={class:"title"},ze={class:"description"},Ve={key:0,class:"last-edited"};function Ae(e,i,t,c,u,C){const d=a("PageIcon"),k=a("NcUserBubble");return l(),s("a",{href:e.link,target:"_blank",class:J(["collective-page",{"not-found":e.notFound}]),style:P(e.pageStyle),onClick:i[0]||(i[0]=(...b)=>e.clickLink&&e.clickLink(...b))},[n("div",{class:"collective-page--image",style:P(e.imageStyle)},[e.emoji?(l(),s("span",{key:0,class:"page-emoji",style:P(e.emojiStyle)},o(e.emoji),5)):(l(),p(d,{key:1,size:e.iconSize},null,8,["size"]))],4),n("div",Ue,[n("div",_e,[n("strong",null,[e.notFound?(l(),s(f,{key:0},[h(o(e.t("collectives","Page not found")),1)],64)):(l(),s(f,{key:1},[h(o(e.title),1)],64))])]),n("div",ze,[e.notFound?(l(),s(f,{key:0},[h(o(e.t("collectives","The page does not exist or you are not allowed to view it.")),1)],64)):(l(),s(f,{key:1},[h(o(e.description),1)],64))]),!e.notFound&&!e.small?(l(),s("div",Ve,[h(o(e.lastEdited)+" ",1),m(k,{user:e.lastUserId,displayName:e.lastUserDisplayName},null,8,["user","displayName"])])):v("",!0)])],14,je)}const O=y(Oe,[["render",Ae],["__scopeId","data-v-7a04b6fd"]]),Fe=N({name:"PagePicker",components:{AlertOutlineIcon:ge,CollectivesIcon:D,FilterCheckOutlineIcon:ke,FilterOutlineIcon:Ne,NcActionCheckbox:T,NcActions:ae,NcActionText:E,NcButton:Q,NcEmptyContent:ee,NcLoadingIcon:se,NcTextField:le,PagePreview:O},emits:["cancel"],setup(){return{isPublic:ie(),t:w}},data(){return{collectiveId:null,filterCollective:!1,currentPages:[],searchedPages:[],searchedPagesLoading:!1,rootPage:null,selectedPageId:null,isLoadingPages:!1,query:"",debouncedGetSearchedPages:te(this.getSearchedPages,300)}},computed:{currentRecentPages(){const e=this.currentPages.slice().sort(M);if(!this.query)return e;const i=this.query.toLowerCase(),t=(window.OCA.Collectives?.currentCollective?.nameWithEmoji??"").toLocaleLowerCase().includes(i);return e.filter(c=>c.title.toLocaleLowerCase().includes(i)?!0:t&&c.parentId===0)},pages(){return this.filterCollective?this.currentRecentPages.slice(0,10):this.searchedPages.slice(0,10)}},watch:{query(){this.filterCollective||(this.searchedPages=[],this.debouncedGetSearchedPages())}
1,filterCollective(e){e||this.getSearchedPages()}},mounted(){this.initCurrentPages(),setTimeout(()=>this.$refs.searchInput.focus(),0)},methods:{close(){this.$emit("cancel")},initCurrentPages(){this.collectiveId=window.OCA.Collectives?.currentCollective?.id;const e=window.OCA.Collectives?.currentCollective?.storeIndex;if(this.collectiveId&&e){this.filterCollective=!0;let i;try{if(i=localStorage.getItem(H),i){const t=JSON.parse(i);this.currentPages=t[e]??[]}return}catch{}}this.isPublic||this.getSearchedPages()},onClickPage(e){const i=this.filterCollective?window.OCA.Collectives?.currentCollective?.path:e.collectivePath;if(i){const t=e.slug?`${e.slug}-${e.id}`:encodeURIComponent(e.title),c=window.location.origin+K("/apps/collectives")+i+"/"+t;this.$el.dispatchEvent(new CustomEvent("submit",{bubbles:!0,detail:c}))}else console.error("Cannot generate page link")},description(e){const i=this.filterCollective?window.OCA.Collectives?.currentCollective?.nameWithEmoji||"":e.collectiveNameWithEmoji,t=e.filePathString?i+" - "+e.filePathString:i;return w("collectives","In collective {path}",{path:t})},async getSearchedPages(){const e=this.query;this.searchedPagesLoading=!0;try{const i=await ce(e);this.query===e&&(this.searchedPages=i.data.ocs.data.pages)}finally{this.query===e&&(this.searchedPagesLoading=!1)}}}}),Be={class:"modal-scroller collectives-page-picker"},$e={class:"modal-inner"},qe={class:"searchbar"},xe={class:"page-list"},Ee={key:0},Te={class:"modal-buttons"};function De(e,i,t,c,u,C){const d=a("NcTextField"),k=a("FilterCheckOutlineIcon"),b=a("FilterOutlineIcon"),j=a("NcActionCheckbox"),U=a("AlertOutlineIcon"),_=a("NcActionText"),z=a("NcActions"),V=a("PagePreview"),A=a("NcLoadingIcon"),I=a("NcEmptyContent"),F=a("CollectivesIcon"),B=a("NcButton");return l(),s("div",Be,[n("h2",null,o(e.t("collectives","Add link to page")),1),n("div",$e,[n("div",qe,[m(d,{ref:"searchInput",modelValue:e.query,"onUpdate:modelValue":i[0]||(i[0]=r=>e.query=r),label:e.t("collectives","Search pages…"),showTrailingButton:!!e.query,trailingButtonLabel:e.t("collectives","Clear search"),onTrailingButtonClick:i[1]||(i[1]=r=>e.query="")},null,8,["modelValue","label","showTrailingButton","trailingButtonLabel"]),!e.isPublic&&e.collectiveId?(l(),p(z,{key:0},{icon:g(()=>[e.filterCollective?(l(),p(k,{key:0,size:20})):(l(),p(b,{key:1,size:20}))]),default:g(()=>[m(j,{modelValue:e.filterCollective,"onUpdate:modelValue":i[2]||(i[2]=r=>e.filterCollective=r)},{default:g(()=>[h(o(e.t("collectives","Limit to current collective")),1)]),_:1},8,["modelValue"]),e.filterCollective?v("",!0):(l(),p(_,{key:0},{icon:g(()=>[m(U,{size:20})]),default:g(()=>[h(" "+o(e.t("collectives","Other members may lack access to pages from other collectives.")),1)]),_:1}))]),_:1})):v("",!0)]),n("div",xe,[e.pages.length>0?(l(),s("ul",Ee,[(l(!0),s(f,null,X(e.pages,r=>(l(),p(V,{key:r.id,title:r.title,description:e.description(r),emoji:r.emoji,lastUserId:r.lastUserId,lastUserDisplayName:r.lastUserDisplayName,small:!0,class:"page-preview-item",onClick:Ge=>e.onClickPage(r)},null,8,["title","description","emoji","lastUserId","lastUserDisplayName","onClick"]))),128))])):e.searchedPagesLoading?(l(),p(I,{key:1,description:e.t("collectives","Loading pages")},{icon:g(()=>[m(A)]),_:1},8,["description"])):(l(),p(I,{key:2,description:e.t("collectives","No pages to link")},{icon:g(()=>[m(F)]),_:1},8,["description"]))]),n("div",Te,[m(B,{onClick:e.close},{default:g(()=>[h(o(e.t("collectives","Cancel")),1)]),_:1},8,["onClick"])])])])}const He=y(Fe,[["render",De],["__scopeId","data-v-bb25159e"]]),Me={name:"PageReferenceWidget",components:{PagePreview:O},props:{richObjectType:{type:String,default:""},richObject:{type:Object,default:null},accessible:{type:Boolean,default:!0}},computed:{notFound(){return this.accessible===!1}}};function Re(e,i,t,c,u,C){const d=a("PagePreview");return t.richObject?(l(),p(d,{key:0,notFound:C.notFound,link:t.richObject.link,title:t.richObject.page?.title||"",description:t.richObject.description,emoji:t.richObject.page?.emoji,lastEdited:t.richObject.lastEdited,lastUserId:t.richObject.page?.lastUserId,lastUserDisplayName:t.richObject.page?.lastUserDisplayName},null,8,["notFound","link","title","description","emoji","lastEdited","lastUserId","lastUserDisplayName"])):v("",!0)}const We=y(Me,[["render",Re]]);R("collectives_page",(e,{richObjectType:i,richObject:t,accessible:c})=>{S(We,{richObjectType:i,richObject:t,accessible:c}).mount(e)}),W("collectives-ref-pages",(e,{providerId:i,accessible:t})=>{const c=G(),u=S(He,{providerId:i,accessible:t});return u.use(c),u.mount(e),new Z(e,u)},(e,i)=>{i.object?.unmount()},"normal");
2//# sourceMappingURL=collectives-reference.mjs.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.