diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2025-05-31 16:39:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-31 16:39:04 +0200 |
commit | a0dea9b37a4af0e8cc3cc04ae13d019ddf529bac (patch) | |
tree | 12fd15f2cf413cd06646ce5b2b116debddbe57ca | |
parent | e0287102207e817c1a68674b9f797b9eaa880127 (diff) | |
parent | 255e8c894e85cfd0db50cafe252d77e648ee33cf (diff) | |
download | nextcloud-server-a0dea9b37a4af0e8cc3cc04ae13d019ddf529bac.tar.gz nextcloud-server-a0dea9b37a4af0e8cc3cc04ae13d019ddf529bac.zip |
Merge pull request #53222 from nextcloud/dependabot/npm_and_yarn/nextcloud/stylelint-config-3.1.0
-rw-r--r-- | apps/comments/src/components/Comment.vue | 2 | ||||
-rw-r--r-- | apps/dav/css/schedule-response.css | 1 | ||||
-rw-r--r-- | apps/files_sharing/css/404.css | 2 | ||||
-rw-r--r-- | apps/user_ldap/css/renewPassword.css | 1 | ||||
-rw-r--r-- | apps/user_ldap/css/settings.css | 2 | ||||
-rw-r--r-- | dist/7462-7462.js | 4 | ||||
-rw-r--r-- | dist/7462-7462.js.map | 2 | ||||
-rw-r--r-- | dist/comments-comments-app.js | 4 | ||||
-rw-r--r-- | dist/comments-comments-app.js.map | 2 | ||||
-rw-r--r-- | dist/comments-comments-tab.js | 4 | ||||
-rw-r--r-- | dist/comments-comments-tab.js.map | 2 | ||||
-rw-r--r-- | package-lock.json | 102 | ||||
-rw-r--r-- | package.json | 10 |
13 files changed, 86 insertions, 52 deletions
diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue index fb08778b9d2..c8b2b176f42 100644 --- a/apps/comments/src/components/Comment.vue +++ b/apps/comments/src/components/Comment.vue @@ -364,7 +364,7 @@ $comment-padding: 10px; &__message { white-space: pre-wrap; - word-break: break-word; + word-break: normal; max-height: 70px; overflow: hidden; margin-top: -6px; diff --git a/apps/dav/css/schedule-response.css b/apps/dav/css/schedule-response.css index eef571027c5..85a03cb63e1 100644 --- a/apps/dav/css/schedule-response.css +++ b/apps/dav/css/schedule-response.css @@ -56,6 +56,7 @@ form #selectPartStatForm label span { display: block; line-height: normal; } + form #selectPartStatForm label.ui-state-hover, form #selectPartStatForm label.ui-state-active { color:#000; diff --git a/apps/files_sharing/css/404.css b/apps/files_sharing/css/404.css index 160a8f83fc3..7542c7cfae1 100644 --- a/apps/files_sharing/css/404.css +++ b/apps/files_sharing/css/404.css @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ #body-login .error-broken-link{ - text-align:left;color:#fff; + text-align:start;color:#fff; } #body-login .error-broken-link ul{ diff --git a/apps/user_ldap/css/renewPassword.css b/apps/user_ldap/css/renewPassword.css index 0fe8c4d183e..8acd97254fa 100644 --- a/apps/user_ldap/css/renewPassword.css +++ b/apps/user_ldap/css/renewPassword.css @@ -33,7 +33,6 @@ letter-spacing:normal; line-break:auto; line-height:1.6; - text-align:left; text-align:start; text-decoration:none; text-shadow:none; diff --git a/apps/user_ldap/css/settings.css b/apps/user_ldap/css/settings.css index 3aa9b2a168e..a1048031fa2 100644 --- a/apps/user_ldap/css/settings.css +++ b/apps/user_ldap/css/settings.css @@ -202,10 +202,12 @@ select[multiple=multiple] + button { width: 16px; vertical-align: text-bottom; } + .ldap_config_state_indicator_sign.success { background: #37ce02; border-radius: 8px; } + .ldap_config_state_indicator_sign.error { background: #ce3702; } diff --git a/dist/7462-7462.js b/dist/7462-7462.js index 8a3e2c8caf1..3177bd78de3 100644 --- a/dist/7462-7462.js +++ b/dist/7462-7462.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7462],{10396:(e,n,o)=>{o.d(n,{A:()=>l});var i=o(85168),s=o(70395),a=o(80486),r=o(10767),c=o(65899),d=o(36564),m=o(96689);const l={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,c.n2)(d.h)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await(0,r.A)(this.resourceType,this.resourceId,this.id,e),m.A.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to edit the comment")),console.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,i.Br);(0,i._h)(t("comments","Comment deleted"),(()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}))},async onDelete(){try{await(0,a.A)(this.resourceType,this.resourceId,this.id),m.A.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to delete the comment")),console.error(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await(0,s.A)(this.resourceType,this.resourceId,e);m.A.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to create the comment")),console.error(e)}finally{this.loading=!1}}}}},10529:(t,e,n)=>{n(83704)},10767:(t,e,n)=>{n.d(e,{A:()=>i});var o=n(35550);async function i(t,e,n,i){const s=["",t,e,n].join("/");return await o.A.customRequest(s,Object.assign({method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${i}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`}))}},25627:(t,e,n)=>{n.d(e,{X:()=>o,Y:()=>i});var o=function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconEdit",{attrs:{size:20}})]},proxy:!0}],null,!1,649782975)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDelete",{attrs:{size:20}})]},proxy:!0}],null,!1,881161434)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{type:"tertiary-no-background","native-type":"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},on:{click:t.onExpand}})],1)])},i=[]},29369:(t,e,n)=>{n.d(e,{A:()=>v});var o=n(21777),i=n(53334),s=n(57505),a=n(24764),r=n(15502),c=n(41944),d=n(97012),m=n(4604),l=n(59892),A=n(77764),p=n(33691),u=n(66001),h=n(79759),C=n(2413),g=n(10396),_=n(65899),y=n(36564);const v={name:"Comment",components:{IconArrowRight:p.A,IconClose:u.A,IconDelete:h.A,IconEdit:C.A,NcActionButton:s.A,NcActions:a.A,NcActionSeparator:r.A,NcAvatar:c.A,NcButton:d.A,NcDateTime:m.A,NcLoadingIcon:l.A,NcRichContenteditable:()=>Promise.all([n.e(4208),n.e(6408),n.e(5258)]).then(n.bind(n,95528)),NcRichText:()=>Promise.all([n.e(4208),n.e(6408),n.e(4508)]).then(n.bind(n,64508))},mixins:[g.A],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,_.n2)(y.h),isOwnComment(){return(0,o.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach(((n,o)=>{const i=`mention-${o}`,s=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(s,`{${i}}`),t[i]={component:A.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}})),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:i.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick((()=>{this.$refs.editor.$el.focus()}))):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}}},36564:(t,e,n)=>{n.d(e,{h:()=>o});const o=(0,n(65899).nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){this.idsInLimbo.includes(t)}}})},51195:(t,e,n)=>{function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;t<e;t++)o=n.parseFromString(o,"text/html").documentElement.textContent;return o}n.d(e,{j:()=>o})},54416:(t,e,n)=>{n.d(e,{A:()=>o});const o=n(29369).A},65463:(t,e,n)=>{n.d(e,{A:()=>s});var o=n(25627),i=n(54416);n(10529);const s=(0,n(14486).A)(i.A,o.X,o.Y,!1,null,"16499043",null).exports},70395:(t,e,n)=>{n.d(e,{A:()=>c});var o=n(21777),i=n(17003),s=n(51195),a=n(65043),r=n(35550);async function c(t,e,n){const c=["",t,e].join("/"),d=await a.Ay.post((0,i.e)()+c,{actorDisplayName:(0,o.HW)().displayName,actorId:(0,o.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),m=c+"/"+parseInt(d.headers["content-location"].split("/").pop()),l=await r.A.stat(m,{details:!0}),A=l.data.props;return A.actorDisplayName=(0,s.j)(A.actorDisplayName,2),A.message=(0,s.j)(A.message,2),l.data}},70452:(t,e,n)=>{n.d(e,{A:()=>r});var o=n(65043),i=n(21777),s=n(32981),a=n(63814);const r=(0,n(85471).pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await o.Ay.get((0,a.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,s.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach((t=>{this.userData[t.id]=t})),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach((t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,i.HW)()?.uid===t.mentionId}})),this.userData}}})},80486:(t,e,n)=>{n.d(e,{A:()=>i});var o=n(35550);async function i(t,e,n){const i=["",t,e,n].join("/");await o.A.deleteFile(i)}},83704:(t,e,n)=>{var o=n(85072),i=n.n(o),s=n(97825),a=n.n(s),r=n(77659),c=n.n(r),d=n(55056),m=n.n(d),l=n(10540),A=n.n(l),p=n(41113),u=n.n(p),h=n(92179),C={};C.styleTagTransform=u(),C.setAttributes=m(),C.insert=c().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=A(),i()(h.A,C),h.A&&h.A.locals&&h.A.locals},92179:(t,e,n)=>{n.d(e,{A:()=>r});var o=n(71354),i=n.n(o),s=n(76314),a=n.n(s)()(i());a.push([t.id,".comment[data-v-16499043]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-16499043]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-16499043]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-16499043]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-16499043]{margin-inline-start:10px !important}.comment__author[data-v-16499043]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-16499043],.comment__timestamp[data-v-16499043]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-16499043]{position:relative}.comment__editor-description[data-v-16499043]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-16499043]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-16499043]{white-space:pre-wrap;word-break:break-word;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-16499043]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-16499043]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: break-word;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const r=a}}]); -//# sourceMappingURL=7462-7462.js.map?v=98f94269bdbec2386555
\ No newline at end of file +"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[7462],{8304:(t,e,n)=>{n.d(e,{X:()=>o,Y:()=>i});var o=function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconEdit",{attrs:{size:20}})]},proxy:!0}],null,!1,649782975)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDelete",{attrs:{size:20}})]},proxy:!0}],null,!1,881161434)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{type:"tertiary-no-background","native-type":"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},on:{click:t.onExpand}})],1)])},i=[]},10396:(e,n,o)=>{o.d(n,{A:()=>l});var i=o(85168),s=o(70395),a=o(80486),r=o(10767),d=o(65899),c=o(36564),m=o(96689);const l={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,d.n2)(c.h)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await(0,r.A)(this.resourceType,this.resourceId,this.id,e),m.A.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to edit the comment")),console.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,i.Br);(0,i._h)(t("comments","Comment deleted"),(()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}))},async onDelete(){try{await(0,a.A)(this.resourceType,this.resourceId,this.id),m.A.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to delete the comment")),console.error(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await(0,s.A)(this.resourceType,this.resourceId,e);m.A.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,i.Qg)(t("comments","An error occurred while trying to create the comment")),console.error(e)}finally{this.loading=!1}}}}},10767:(t,e,n)=>{n.d(e,{A:()=>i});var o=n(35550);async function i(t,e,n,i){const s=["",t,e,n].join("/");return await o.A.customRequest(s,Object.assign({method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${i}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`}))}},29369:(t,e,n)=>{n.d(e,{A:()=>v});var o=n(21777),i=n(53334),s=n(57505),a=n(24764),r=n(15502),d=n(41944),c=n(97012),m=n(4604),l=n(59892),A=n(77764),p=n(33691),u=n(66001),h=n(79759),C=n(2413),g=n(10396),_=n(65899),y=n(36564);const v={name:"Comment",components:{IconArrowRight:p.A,IconClose:u.A,IconDelete:h.A,IconEdit:C.A,NcActionButton:s.A,NcActions:a.A,NcActionSeparator:r.A,NcAvatar:d.A,NcButton:c.A,NcDateTime:m.A,NcLoadingIcon:l.A,NcRichContenteditable:()=>Promise.all([n.e(4208),n.e(6408),n.e(5258)]).then(n.bind(n,95528)),NcRichText:()=>Promise.all([n.e(4208),n.e(6408),n.e(4508)]).then(n.bind(n,64508))},mixins:[g.A],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,_.n2)(y.h),isOwnComment(){return(0,o.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach(((n,o)=>{const i=`mention-${o}`,s=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(s,`{${i}}`),t[i]={component:A.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}})),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:i.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick((()=>{this.$refs.editor.$el.focus()}))):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}}},35642:(t,e,n)=>{n.d(e,{A:()=>r});var o=n(71354),i=n.n(o),s=n(76314),a=n.n(s)()(i());a.push([t.id,".comment[data-v-434d3ed4]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-434d3ed4]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-434d3ed4]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-434d3ed4]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-434d3ed4]{margin-inline-start:10px !important}.comment__author[data-v-434d3ed4]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-434d3ed4],.comment__timestamp[data-v-434d3ed4]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-434d3ed4]{position:relative}.comment__editor-description[data-v-434d3ed4]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-434d3ed4]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-434d3ed4]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-434d3ed4]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-434d3ed4]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const r=a},36564:(t,e,n)=>{n.d(e,{h:()=>o});const o=(0,n(65899).nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){this.idsInLimbo.includes(t)}}})},41792:(t,e,n)=>{n(90133)},51195:(t,e,n)=>{function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;t<e;t++)o=n.parseFromString(o,"text/html").documentElement.textContent;return o}n.d(e,{j:()=>o})},54416:(t,e,n)=>{n.d(e,{A:()=>o});const o=n(29369).A},65463:(t,e,n)=>{n.d(e,{A:()=>s});var o=n(8304),i=n(54416);n(41792);const s=(0,n(14486).A)(i.A,o.X,o.Y,!1,null,"434d3ed4",null).exports},70395:(t,e,n)=>{n.d(e,{A:()=>d});var o=n(21777),i=n(17003),s=n(51195),a=n(65043),r=n(35550);async function d(t,e,n){const d=["",t,e].join("/"),c=await a.Ay.post((0,i.e)()+d,{actorDisplayName:(0,o.HW)().displayName,actorId:(0,o.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),m=d+"/"+parseInt(c.headers["content-location"].split("/").pop()),l=await r.A.stat(m,{details:!0}),A=l.data.props;return A.actorDisplayName=(0,s.j)(A.actorDisplayName,2),A.message=(0,s.j)(A.message,2),l.data}},70452:(t,e,n)=>{n.d(e,{A:()=>r});var o=n(65043),i=n(21777),s=n(32981),a=n(63814);const r=(0,n(85471).pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,i.HW)().displayName,actorId:(0,i.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await o.Ay.get((0,a.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,s.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach((t=>{this.userData[t.id]=t})),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach((t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,i.HW)()?.uid===t.mentionId}})),this.userData}}})},80486:(t,e,n)=>{n.d(e,{A:()=>i});var o=n(35550);async function i(t,e,n){const i=["",t,e,n].join("/");await o.A.deleteFile(i)}},90133:(t,e,n)=>{var o=n(85072),i=n.n(o),s=n(97825),a=n.n(s),r=n(77659),d=n.n(r),c=n(55056),m=n.n(c),l=n(10540),A=n.n(l),p=n(41113),u=n.n(p),h=n(35642),C={};C.styleTagTransform=u(),C.setAttributes=m(),C.insert=d().bind(null,"head"),C.domAPI=a(),C.insertStyleElement=A(),i()(h.A,C),h.A&&h.A.locals&&h.A.locals}}]); +//# sourceMappingURL=7462-7462.js.map?v=f1794da3f7db0f7bd37e
\ No newline at end of file diff --git a/dist/7462-7462.js.map b/dist/7462-7462.js.map index 94a14022314..07044f625cd 100644 --- a/dist/7462-7462.js.map +++ b/dist/7462-7462.js.map @@ -1 +1 @@ -{"version":3,"file":"7462-7462.js?v=98f94269bdbec2386555","mappings":"yMAaA,SACCA,MAAO,CACNC,GAAI,CACHC,KAAMC,OACNC,QAAS,MAEVC,QAAS,CACRH,KAAMI,OACNF,QAAS,IAEVG,WAAY,CACXL,KAAM,CAACI,OAAQH,QACfK,UAAU,GAEXC,aAAc,CACbP,KAAMI,OACNF,QAAS,UAIXM,KAAIA,KACI,CACNC,SAAS,EACTC,SAAS,EACTC,SAAS,IAIXC,SAAU,KACNC,EAAAA,EAAAA,IAAUC,EAAAA,IAGdC,QAAS,CAERC,MAAAA,GACCC,KAAKP,SAAU,CAChB,EACAQ,YAAAA,GACCD,KAAKP,SAAU,EAEfO,KAAKE,mBAAmBF,KAAKd,QAC9B,EACA,mBAAMiB,CAAcjB,GACnBc,KAAKN,SAAU,EACf,UACOU,EAAAA,EAAAA,GAAYJ,KAAKV,aAAcU,KAAKZ,WAAYY,KAAKlB,GAAII,GAC/DmB,EAAAA,EAAOC,MAAM,iBAAkB,CAAEhB,aAAcU,KAAKV,aAAcF,WAAYY,KAAKZ,WAAYN,GAAIkB,KAAKlB,GAAII,YAC5Gc,KAAKO,MAAM,iBAAkBrB,GAC7Bc,KAAKP,SAAU,CAChB,CAAE,MAAOe,IACRC,EAAAA,EAAAA,IA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IACT9K,KAAKqE,SAASyG,EAAQC,WAAa,CAE/BC,KAAM,YACNlM,GAAIgM,EAAQC,UACZlE,MAAOiE,EAAQG,mBACfC,OAAQ,QACRpE,SAASb,EAAAA,EAAAA,OAAkBC,MAAQ4E,EAAQC,UAC9C,IAEE/K,KAAKqE,QAChB,I,kDCzDO1C,eAAA,EAAerC,EAAcF,EAAYwC,GACvD,MAAMC,EAAc,CAAC,GAAIvC,EAAcF,EAAYwC,GAAWE,KAAK,WAG7DC,EAAAA,EAAOoJ,WAAWtJ,EACzB,C,yJCRIuJ,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,M,sECrBtDC,E,MAA0B,GAA4B,KAE1DA,EAAwB7D,KAAK,CAAC8D,EAAO9M,GAAI,ytCAA0tC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wDAAwD,MAAQ,GAAG,SAAW,udAAud,eAAiB,CAAC,03CAA43C,WAAa,MAE9tG,S","sources":["webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?f1d4","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport NewComment from '../services/NewComment.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\nimport logger from '../logger.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, Object.assign({\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${message}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`,\n\t}))\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{'comment--loading': _vm.loading}},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconEdit',{attrs:{\"size\":20}})]},proxy:true}],null,false,649782975)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconDelete',{attrs:{\"size\":20}})]},proxy:true}],null,false,881161434)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"type\":\"tertiary-no-background\",\"native-type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{'comment__message--expanded': _vm.expanded},attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},on:{\"click\":_vm.onExpand}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<component :is=\"tag\"\n\t\tv-show=\"!deleted && !isLimbo\"\n\t\t:class=\"{'comment--loading': loading}\"\n\t\tclass=\"comment\">\n\t\t<!-- Comment header toolbar -->\n\t\t<div class=\"comment__side\">\n\t\t\t<!-- Author -->\n\t\t\t<NcAvatar class=\"comment__avatar\"\n\t\t\t\t:display-name=\"actorDisplayName\"\n\t\t\t\t:user=\"actorId\"\n\t\t\t\t:size=\"32\" />\n\t\t</div>\n\t\t<div class=\"comment__body\">\n\t\t\t<div class=\"comment__header\">\n\t\t\t\t<span class=\"comment__author\">{{ actorDisplayName }}</span>\n\n\t\t\t\t<!-- Comment actions,\n\t\t\t\t\tshow if we have a message id and current user is author -->\n\t\t\t\t<NcActions v-if=\"isOwnComment && id && !loading\" class=\"comment__actions\">\n\t\t\t\t\t<template v-if=\"!editing\">\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onEdit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconEdit :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Edit comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionSeparator />\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onDeleteWithUndo\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconDelete :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Delete comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<NcActionButton v-else @click=\"onEditCancel\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('comments', 'Cancel edit') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\n\t\t\t\t<!-- Show loading if we're editing or deleting, not on new ones -->\n\t\t\t\t<div v-if=\"id && loading\" class=\"comment_loading icon-loading-small\" />\n\n\t\t\t\t<!-- Relative time to the comment creation -->\n\t\t\t\t<NcDateTime v-else-if=\"creationDateTime\"\n\t\t\t\t\tclass=\"comment__timestamp\"\n\t\t\t\t\t:timestamp=\"timestamp\"\n\t\t\t\t\t:ignore-seconds=\"true\" />\n\t\t\t</div>\n\n\t\t\t<!-- Message editor -->\n\t\t\t<form v-if=\"editor || editing\" class=\"comment__editor\" @submit.prevent>\n\t\t\t\t<div class=\"comment__editor-group\">\n\t\t\t\t\t<NcRichContenteditable ref=\"editor\"\n\t\t\t\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t\t\t\t:contenteditable=\"!loading\"\n\t\t\t\t\t\t:label=\"editor ? t('comments', 'New comment') : t('comments', 'Edit comment')\"\n\t\t\t\t\t\t:placeholder=\"t('comments', 'Write a comment …')\"\n\t\t\t\t\t\t:value=\"localMessage\"\n\t\t\t\t\t\t:user-data=\"userData\"\n\t\t\t\t\t\taria-describedby=\"tab-comments__editor-description\"\n\t\t\t\t\t\t@update:value=\"updateLocalMessage\"\n\t\t\t\t\t\t@submit=\"onSubmit\" />\n\t\t\t\t\t<div class=\"comment__submit\">\n\t\t\t\t\t\t<NcButton type=\"tertiary-no-background\"\n\t\t\t\t\t\t\tnative-type=\"submit\"\n\t\t\t\t\t\t\t:aria-label=\"t('comments', 'Post comment')\"\n\t\t\t\t\t\t\t:disabled=\"isEmptyMessage\"\n\t\t\t\t\t\t\t@click=\"onSubmit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t\t\t<IconArrowRight v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"tab-comments__editor-description\" class=\"comment__editor-description\">\n\t\t\t\t\t{{ t('comments', '@ for mentions, : for emoji, / for smart picker') }}\n\t\t\t\t</div>\n\t\t\t</form>\n\n\t\t\t<!-- Message content -->\n\t\t\t<NcRichText v-else\n\t\t\t\tclass=\"comment__message\"\n\t\t\t\t:class=\"{'comment__message--expanded': expanded}\"\n\t\t\t\t:text=\"richContent.message\"\n\t\t\t\t:arguments=\"richContent.mentions\"\n\t\t\t\t@click=\"onExpand\" />\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport NcActions from '@nextcloud/vue/components/NcActions'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcDateTime from '@nextcloud/vue/components/NcDateTime'\nimport NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'\nimport NcUserBubble from '@nextcloud/vue/components/NcUserBubble'\n\nimport IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport IconClose from 'vue-material-design-icons/Close.vue'\nimport IconDelete from 'vue-material-design-icons/Delete.vue'\nimport IconEdit from 'vue-material-design-icons/Pencil.vue'\n\nimport CommentMixin from '../mixins/CommentMixin.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\n// Dynamic loading\nconst NcRichContenteditable = () => import('@nextcloud/vue/components/NcRichContenteditable')\nconst NcRichText = () => import('@nextcloud/vue/components/NcRichText')\n\nexport default {\n\tname: 'Comment',\n\n\tcomponents: {\n\t\tIconArrowRight,\n\t\tIconClose,\n\t\tIconDelete,\n\t\tIconEdit,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcActionSeparator,\n\t\tNcAvatar,\n\t\tNcButton,\n\t\tNcDateTime,\n\t\tNcLoadingIcon,\n\t\tNcRichContenteditable,\n\t\tNcRichText,\n\t},\n\tmixins: [CommentMixin],\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tactorDisplayName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactorId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tcreationDateTime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Force the editor display\n\t\t */\n\t\teditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide the autocompletion data\n\t\t */\n\t\tautoComplete: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\ttag: {\n\t\t\ttype: String,\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\texpanded: false,\n\t\t\t// Only change data locally and update the original\n\t\t\t// parent data when the request is sent and resolved\n\t\t\tlocalMessage: '',\n\t\t\tsubmitted: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\n\t\t/**\n\t\t * Is the current user the author of this comment\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisOwnComment() {\n\t\t\treturn getCurrentUser().uid === this.actorId\n\t\t},\n\n\t\trichContent() {\n\t\t\tconst mentions = {}\n\t\t\tlet message = this.localMessage\n\n\t\t\tObject.keys(this.userData).forEach((user, index) => {\n\t\t\t\tconst key = `mention-${index}`\n\t\t\t\tconst regex = new RegExp(`@${user}|@\"${user}\"`, 'g')\n\t\t\t\tmessage = message.replace(regex, `{${key}}`)\n\t\t\t\tmentions[key] = {\n\t\t\t\t\tcomponent: NcUserBubble,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tuser,\n\t\t\t\t\t\tdisplayName: this.userData[user].label,\n\t\t\t\t\t\tprimary: this.userData[user].primary,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn { mentions, message }\n\t\t},\n\n\t\tisEmptyMessage() {\n\t\t\treturn !this.localMessage || this.localMessage.trim() === ''\n\t\t},\n\n\t\t/**\n\t\t * Timestamp of the creation time (in ms UNIX time)\n\t\t */\n\t\ttimestamp() {\n\t\t\treturn Date.parse(this.creationDateTime)\n\t\t},\n\n\t\tisLimbo() {\n\t\t\treturn this.deletedCommentLimboStore.checkForId(this.id)\n\t\t},\n\t},\n\n\twatch: {\n\t\t// If the data change, update the local value\n\t\tmessage(message) {\n\t\t\tthis.updateLocalMessage(message)\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// Init localMessage\n\t\tthis.updateLocalMessage(this.message)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update local Message on outer change\n\t\t *\n\t\t * @param {string} message the message to set\n\t\t */\n\t\tupdateLocalMessage(message) {\n\t\t\tthis.localMessage = message.toString()\n\t\t\tthis.submitted = false\n\t\t},\n\n\t\t/**\n\t\t * Dispatch message between edit and create\n\t\t */\n\t\tonSubmit() {\n\t\t\t// Do not submit if message is empty\n\t\t\tif (this.localMessage.trim() === '') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.editor) {\n\t\t\t\tthis.onNewComment(this.localMessage.trim())\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t// Focus the editor again\n\t\t\t\t\tthis.$refs.editor.$el.focus()\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.onEditComment(this.localMessage.trim())\n\t\t},\n\n\t\tonExpand() {\n\t\t\tthis.expanded = true\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use \"sass:math\";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: break-word;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n</style>\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\tthis.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=16499043&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"16499043\",\n null\n \n)\n\nexport default component.exports","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport axios from '@nextcloud/axios'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param {string} search the query\n * @param {Function} callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: 'files',\n itemId: this.resourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach(user => { this.userData[user.id] = user; });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach(mention => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-16499043]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-16499043]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-16499043]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-16499043]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-16499043]{margin-inline-start:10px !important}.comment__author[data-v-16499043]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-16499043],.comment__timestamp[data-v-16499043]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-16499043]{position:relative}.comment__editor-description[data-v-16499043]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-16499043]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-16499043]{white-space:pre-wrap;word-break:break-word;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-16499043]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-16499043]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: break-word;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["props","id","type","Number","default","message","String","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","useDeletedCommentLimbo","methods","onEdit","this","onEditCancel","updateLocalMessage","onEditComment","EditComment","logger","debug","$emit","error","showError","t","console","onDeleteWithUndo","deletedCommentLimboStore","addId","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","removeId","DeleteComment","onNewComment","newComment","NewComment","localMessage","async","commentId","commentPath","join","client","customRequest","Object","assign","method","render","_vm","_c","_self","tag","directives","name","rawName","value","isLimbo","expression","staticClass","class","attrs","actorDisplayName","actorId","_v","_s","isOwnComment","on","scopedSlots","_u","key","fn","proxy","_e","creationDateTime","timestamp","editor","$event","preventDefault","ref","autoComplete","userData","onSubmit","isEmptyMessage","expanded","richContent","mentions","onExpand","staticRenderFns","components","IconArrowRight","IconClose","IconDelete","IconEdit","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","Boolean","Function","submitted","getCurrentUser","uid","keys","forEach","user","index","regex","RegExp","replace","component","NcUserBubble","displayName","label","primary","trim","Date","parse","checkForId","watch","beforeMount","toString","$nextTick","$refs","$el","focus","defineStore","state","idsInLimbo","actions","push","indexOf","splice","includes","decodeHtmlEntities","passes","arguments","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","resourcePath","response","axios","post","getRootPath","actorType","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","defineComponent","editorData","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","deleteFile","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","___CSS_LOADER_EXPORT___","module"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"file":"7462-7462.js?v=f1794da3f7db0f7b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eAAA,EAAe3B,EAAcF,EAAY8B,GACvD,MAAMC,EAAc,CAAC,GAAI7B,EAAcF,EAAY8B,GAAWE,KAAK,WAG7DC,EAAAA,EAAO6G,WAAW/G,EACzB,C,yJCRIgH,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,M","sources":["webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack://nextcloud/./apps/comments/src/components/Comment.vue?192b"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{'comment--loading': _vm.loading}},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconEdit',{attrs:{\"size\":20}})]},proxy:true}],null,false,649782975)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconDelete',{attrs:{\"size\":20}})]},proxy:true}],null,false,881161434)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"type\":\"tertiary-no-background\",\"native-type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{'comment__message--expanded': _vm.expanded},attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},on:{\"click\":_vm.onExpand}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport NewComment from '../services/NewComment.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\nimport logger from '../logger.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, Object.assign({\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${message}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`,\n\t}))\n}\n","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<component :is=\"tag\"\n\t\tv-show=\"!deleted && !isLimbo\"\n\t\t:class=\"{'comment--loading': loading}\"\n\t\tclass=\"comment\">\n\t\t<!-- Comment header toolbar -->\n\t\t<div class=\"comment__side\">\n\t\t\t<!-- Author -->\n\t\t\t<NcAvatar class=\"comment__avatar\"\n\t\t\t\t:display-name=\"actorDisplayName\"\n\t\t\t\t:user=\"actorId\"\n\t\t\t\t:size=\"32\" />\n\t\t</div>\n\t\t<div class=\"comment__body\">\n\t\t\t<div class=\"comment__header\">\n\t\t\t\t<span class=\"comment__author\">{{ actorDisplayName }}</span>\n\n\t\t\t\t<!-- Comment actions,\n\t\t\t\t\tshow if we have a message id and current user is author -->\n\t\t\t\t<NcActions v-if=\"isOwnComment && id && !loading\" class=\"comment__actions\">\n\t\t\t\t\t<template v-if=\"!editing\">\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onEdit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconEdit :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Edit comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionSeparator />\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onDeleteWithUndo\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconDelete :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Delete comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<NcActionButton v-else @click=\"onEditCancel\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('comments', 'Cancel edit') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\n\t\t\t\t<!-- Show loading if we're editing or deleting, not on new ones -->\n\t\t\t\t<div v-if=\"id && loading\" class=\"comment_loading icon-loading-small\" />\n\n\t\t\t\t<!-- Relative time to the comment creation -->\n\t\t\t\t<NcDateTime v-else-if=\"creationDateTime\"\n\t\t\t\t\tclass=\"comment__timestamp\"\n\t\t\t\t\t:timestamp=\"timestamp\"\n\t\t\t\t\t:ignore-seconds=\"true\" />\n\t\t\t</div>\n\n\t\t\t<!-- Message editor -->\n\t\t\t<form v-if=\"editor || editing\" class=\"comment__editor\" @submit.prevent>\n\t\t\t\t<div class=\"comment__editor-group\">\n\t\t\t\t\t<NcRichContenteditable ref=\"editor\"\n\t\t\t\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t\t\t\t:contenteditable=\"!loading\"\n\t\t\t\t\t\t:label=\"editor ? t('comments', 'New comment') : t('comments', 'Edit comment')\"\n\t\t\t\t\t\t:placeholder=\"t('comments', 'Write a comment …')\"\n\t\t\t\t\t\t:value=\"localMessage\"\n\t\t\t\t\t\t:user-data=\"userData\"\n\t\t\t\t\t\taria-describedby=\"tab-comments__editor-description\"\n\t\t\t\t\t\t@update:value=\"updateLocalMessage\"\n\t\t\t\t\t\t@submit=\"onSubmit\" />\n\t\t\t\t\t<div class=\"comment__submit\">\n\t\t\t\t\t\t<NcButton type=\"tertiary-no-background\"\n\t\t\t\t\t\t\tnative-type=\"submit\"\n\t\t\t\t\t\t\t:aria-label=\"t('comments', 'Post comment')\"\n\t\t\t\t\t\t\t:disabled=\"isEmptyMessage\"\n\t\t\t\t\t\t\t@click=\"onSubmit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t\t\t<IconArrowRight v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"tab-comments__editor-description\" class=\"comment__editor-description\">\n\t\t\t\t\t{{ t('comments', '@ for mentions, : for emoji, / for smart picker') }}\n\t\t\t\t</div>\n\t\t\t</form>\n\n\t\t\t<!-- Message content -->\n\t\t\t<NcRichText v-else\n\t\t\t\tclass=\"comment__message\"\n\t\t\t\t:class=\"{'comment__message--expanded': expanded}\"\n\t\t\t\t:text=\"richContent.message\"\n\t\t\t\t:arguments=\"richContent.mentions\"\n\t\t\t\t@click=\"onExpand\" />\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport NcActions from '@nextcloud/vue/components/NcActions'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcDateTime from '@nextcloud/vue/components/NcDateTime'\nimport NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'\nimport NcUserBubble from '@nextcloud/vue/components/NcUserBubble'\n\nimport IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport IconClose from 'vue-material-design-icons/Close.vue'\nimport IconDelete from 'vue-material-design-icons/Delete.vue'\nimport IconEdit from 'vue-material-design-icons/Pencil.vue'\n\nimport CommentMixin from '../mixins/CommentMixin.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\n// Dynamic loading\nconst NcRichContenteditable = () => import('@nextcloud/vue/components/NcRichContenteditable')\nconst NcRichText = () => import('@nextcloud/vue/components/NcRichText')\n\nexport default {\n\tname: 'Comment',\n\n\tcomponents: {\n\t\tIconArrowRight,\n\t\tIconClose,\n\t\tIconDelete,\n\t\tIconEdit,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcActionSeparator,\n\t\tNcAvatar,\n\t\tNcButton,\n\t\tNcDateTime,\n\t\tNcLoadingIcon,\n\t\tNcRichContenteditable,\n\t\tNcRichText,\n\t},\n\tmixins: [CommentMixin],\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tactorDisplayName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactorId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tcreationDateTime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Force the editor display\n\t\t */\n\t\teditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide the autocompletion data\n\t\t */\n\t\tautoComplete: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\ttag: {\n\t\t\ttype: String,\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\texpanded: false,\n\t\t\t// Only change data locally and update the original\n\t\t\t// parent data when the request is sent and resolved\n\t\t\tlocalMessage: '',\n\t\t\tsubmitted: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\n\t\t/**\n\t\t * Is the current user the author of this comment\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisOwnComment() {\n\t\t\treturn getCurrentUser().uid === this.actorId\n\t\t},\n\n\t\trichContent() {\n\t\t\tconst mentions = {}\n\t\t\tlet message = this.localMessage\n\n\t\t\tObject.keys(this.userData).forEach((user, index) => {\n\t\t\t\tconst key = `mention-${index}`\n\t\t\t\tconst regex = new RegExp(`@${user}|@\"${user}\"`, 'g')\n\t\t\t\tmessage = message.replace(regex, `{${key}}`)\n\t\t\t\tmentions[key] = {\n\t\t\t\t\tcomponent: NcUserBubble,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tuser,\n\t\t\t\t\t\tdisplayName: this.userData[user].label,\n\t\t\t\t\t\tprimary: this.userData[user].primary,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn { mentions, message }\n\t\t},\n\n\t\tisEmptyMessage() {\n\t\t\treturn !this.localMessage || this.localMessage.trim() === ''\n\t\t},\n\n\t\t/**\n\t\t * Timestamp of the creation time (in ms UNIX time)\n\t\t */\n\t\ttimestamp() {\n\t\t\treturn Date.parse(this.creationDateTime)\n\t\t},\n\n\t\tisLimbo() {\n\t\t\treturn this.deletedCommentLimboStore.checkForId(this.id)\n\t\t},\n\t},\n\n\twatch: {\n\t\t// If the data change, update the local value\n\t\tmessage(message) {\n\t\t\tthis.updateLocalMessage(message)\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// Init localMessage\n\t\tthis.updateLocalMessage(this.message)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update local Message on outer change\n\t\t *\n\t\t * @param {string} message the message to set\n\t\t */\n\t\tupdateLocalMessage(message) {\n\t\t\tthis.localMessage = message.toString()\n\t\t\tthis.submitted = false\n\t\t},\n\n\t\t/**\n\t\t * Dispatch message between edit and create\n\t\t */\n\t\tonSubmit() {\n\t\t\t// Do not submit if message is empty\n\t\t\tif (this.localMessage.trim() === '') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.editor) {\n\t\t\t\tthis.onNewComment(this.localMessage.trim())\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t// Focus the editor again\n\t\t\t\t\tthis.$refs.editor.$el.focus()\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.onEditComment(this.localMessage.trim())\n\t\t},\n\n\t\tonExpand() {\n\t\t\tthis.expanded = true\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use \"sass:math\";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n</style>\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-434d3ed4]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-434d3ed4]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-434d3ed4]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-434d3ed4]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-434d3ed4]{margin-inline-start:10px !important}.comment__author[data-v-434d3ed4]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-434d3ed4],.comment__timestamp[data-v-434d3ed4]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-434d3ed4]{position:relative}.comment__editor-description[data-v-434d3ed4]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-434d3ed4]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-434d3ed4]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-434d3ed4]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-434d3ed4]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: normal;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\tthis.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=434d3ed4&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"434d3ed4\",\n null\n \n)\n\nexport default component.exports","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport axios from '@nextcloud/axios'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param {string} search the query\n * @param {Function} callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: 'files',\n itemId: this.resourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach(user => { this.userData[user.id] = user; });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach(mention => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":["render","_vm","this","_c","_self","tag","directives","name","rawName","value","deleted","isLimbo","expression","staticClass","class","loading","attrs","actorDisplayName","actorId","_v","_s","isOwnComment","id","editing","on","onEditCancel","scopedSlots","_u","key","fn","proxy","t","onEdit","onDeleteWithUndo","_e","creationDateTime","timestamp","editor","$event","preventDefault","ref","autoComplete","localMessage","userData","updateLocalMessage","onSubmit","isEmptyMessage","expanded","richContent","message","mentions","onExpand","staticRenderFns","props","type","Number","default","String","resourceId","required","resourceType","data","computed","mapStores","useDeletedCommentLimbo","methods","onEditComment","EditComment","logger","debug","$emit","error","showError","console","deletedCommentLimboStore","addId","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","removeId","DeleteComment","onNewComment","newComment","NewComment","async","commentId","commentPath","join","client","customRequest","Object","assign","method","components","IconArrowRight","IconClose","IconDelete","IconEdit","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","Boolean","Function","submitted","getCurrentUser","uid","keys","forEach","user","index","regex","RegExp","replace","component","NcUserBubble","displayName","label","primary","trim","Date","parse","checkForId","watch","beforeMount","toString","$nextTick","$refs","$el","focus","___CSS_LOADER_EXPORT___","push","module","defineStore","state","idsInLimbo","actions","indexOf","splice","includes","decodeHtmlEntities","passes","arguments","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","resourcePath","response","axios","post","getRootPath","actorType","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","defineComponent","editorData","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","deleteFile","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals"],"sourceRoot":""}
\ No newline at end of file diff --git a/dist/comments-comments-app.js b/dist/comments-comments-app.js index be23893db31..00e9a85ce93 100644 --- a/dist/comments-comments-app.js +++ b/dist/comments-comments-app.js @@ -1,2 +1,2 @@ -(()=>{var e,n,o,s={3520:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comments[data-v-e6750fda]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-e6750fda],.comments__error[data-v-e6750fda]{flex:1 0}.comments__retry[data-v-e6750fda]{margin:0 auto}.comments__info[data-v-e6750fda]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}","",{version:3,sources:["webpack://./apps/comments/src/views/Comments.vue"],names:[],mappings:"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n"],sourceRoot:""}]);const a=r},42634:()=>{},49060:(e,n,o)=>{"use strict";var s=o(21777),i=o(53334),r=o(65899),a=o(85471),c=o(85168),l=o(55042),m=o(35779),d=o(97012);const u={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var p=o(14486);const A=(0,p.A)(u,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,h={name:"MessageReplyTextIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},g=(0,p.A)(h,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var C=o(57578),f=o(57505),_=o(24764),y=o(15502),v=o(41944),b=o(4604),x=o(59892),w=o(77764),I=o(33691),k=o(66001),D=o(79759),T=o(2413),N=o(63814);const S=function(){return(0,N.dC)("dav/comments")};function E(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;t<e;t++)o=n.parseFromString(o,"text/html").documentElement.textContent;return o}var R=o(65043),O=o(60669);const M=(0,O.UU)(S()),B=t=>{M.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,s.zo)(B),B((0,s.do)());const $=M,L=(0,r.nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){this.idsInLimbo.includes(t)}}}),j=(0,o(35947).YK)().setApp("comments").detectUser().build(),P={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,r.n2)(L)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await async function(t,e,n,o){const s=["",t,e,n].join("/");return await $.customRequest(s,Object.assign({method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${o}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`}))}(this.resourceType,this.resourceId,this.id,e),j.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,c.Qg)(t("comments","An error occurred while trying to edit the comment")),console.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,c.Br);(0,c._h)(t("comments","Comment deleted"),(()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}))},async onDelete(){try{await async function(t,e,n){const o=["",t,e,n].join("/");await $.deleteFile(o)}(this.resourceType,this.resourceId,this.id),j.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,c.Qg)(t("comments","An error occurred while trying to delete the comment")),console.error(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await async function(t,e,n){const o=["",t,e].join("/"),i=await R.Ay.post(S()+o,{actorDisplayName:(0,s.HW)().displayName,actorId:(0,s.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),r=o+"/"+parseInt(i.headers["content-location"].split("/").pop()),a=await $.stat(r,{details:!0}),c=a.data.props;return c.actorDisplayName=E(c.actorDisplayName,2),c.message=E(c.message,2),a.data}(this.resourceType,this.resourceId,e);j.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,c.Qg)(t("comments","An error occurred while trying to create the comment")),console.error(e)}finally{this.loading=!1}}}},q={name:"Comment",components:{IconArrowRight:I.A,IconClose:k.A,IconDelete:D.A,IconEdit:T.A,NcActionButton:f.A,NcActions:_.A,NcActionSeparator:y.A,NcAvatar:v.A,NcButton:d.A,NcDateTime:b.A,NcLoadingIcon:x.A,NcRichContenteditable:()=>Promise.all([o.e(4208),o.e(6408),o.e(5258)]).then(o.bind(o,95528)),NcRichText:()=>Promise.all([o.e(4208),o.e(6408),o.e(4508)]).then(o.bind(o,64508))},mixins:[P],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,r.n2)(L),isOwnComment(){return(0,s.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach(((n,o)=>{const s=`mention-${o}`,i=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(i,`{${s}}`),t[s]={component:w.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}})),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:i.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick((()=>{this.$refs.editor.$el.focus()}))):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}};var H=o(85072),V=o.n(H),z=o(97825),W=o.n(z),F=o(77659),G=o.n(F),U=o(55056),Y=o.n(U),Q=o(10540),K=o.n(Q),Z=o(41113),X=o.n(Z),J=o(92179),tt={};tt.styleTagTransform=X(),tt.setAttributes=Y(),tt.insert=G().bind(null,"head"),tt.domAPI=W(),tt.insertStyleElement=K(),V()(J.A,tt),J.A&&J.A.locals&&J.A.locals;const et=(0,p.A)(q,(function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconEdit",{attrs:{size:20}})]},proxy:!0}],null,!1,649782975)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDelete",{attrs:{size:20}})]},proxy:!0}],null,!1,881161434)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{type:"tertiary-no-background","native-type":"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},on:{click:t.onExpand}})],1)])}),[],!1,null,"16499043",null).exports;var nt=o(32981);const ot=(0,a.pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,s.HW)().displayName,actorId:(0,s.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await R.Ay.get((0,N.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,nt.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach((t=>{this.userData[t.id]=t})),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach((t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,s.HW)()?.uid===t.mentionId}})),this.userData}}});var st=o(54290),it=o(90176);const rt=async function(t,e){let{resourceType:n,resourceId:o}=t;const s=["",n,o].join("/"),i=e.datetime?`<oc:datetime>${e.datetime.toISOString()}</oc:datetime>`:"",r=await $.customRequest(s,Object.assign({method:"REPORT",data:`<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>${e.limit??20}</oc:limit>\n\t\t\t\t<oc:offset>${e.offset||0}</oc:offset>\n\t\t\t\t${i}\n\t\t\t</oc:filter-comments>`},e)),a=await r.text(),c=await(0,O.h4)(a),l=at(c,!0);return(0,st.hq)(r,l,!0)},at=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:n}}=t;return n.map((t=>{const n=t.propstat.prop;return(0,it.ch)(n,n.id.toString(),e)}))},ct={name:"Comments",components:{Comment:et,NcEmptyContent:m.A,NcButton:d.A,RefreshIcon:A,MessageReplyTextIcon:g,AlertCircleOutlineIcon:C.A},directives:{elementVisibility:l.Zx},mixins:[ot],data(){return{error:"",loading:!1,done:!1,currentResourceId:this.resourceId,offset:0,comments:[],cancelRequest:()=>{},Comment:et,userData:{}}},computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},watch:{resourceId(){this.currentResourceId=this.resourceId}},methods:{t:i.Tl,async onVisibilityChange(t){if(t)try{await((t,e,n)=>{const o=["",t,e].join("/"),s=n.toUTCString();return $.customRequest(o,{method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:readMarker>${s}</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`})})(this.resourceType,this.currentResourceId,new Date)}catch(t){(0,c.Qg)(t.message||(0,i.Tl)("comments","Failed to mark comments as read"))}},async update(t){this.currentResourceId=t,this.resetState(),this.getComments()},onScrollBottomReached(){this.error||this.done||this.loading||this.getComments()},async getComments(){this.cancelRequest("cancel");try{this.loading=!0,this.error="";const{request:t,abort:e}=function(t){const e=new AbortController,n=e.signal;return{request:async function(e,o){return await t(e,Object.assign({signal:n},o))},abort:()=>e.abort()}}(rt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.currentResourceId},{offset:this.offset})||{data:[]};this.logger.debug(`Processed ${n.length} comments`,{comments:n}),n.length<20&&(this.done=!0),this.comments.push(...n),this.offset+=20}catch(t){if("cancel"===t.message)return;this.error=(0,i.Tl)("comments","Unable to load the comments list"),console.error("Error loading the comments list",t)}finally{this.loading=!1}},onNewComment(t){this.comments.unshift(t)},onDelete(t){const e=this.comments.findIndex((e=>e.props.id===t));e>-1?this.comments.splice(e,1):console.error("Could not find the deleted comment in the list",t)},resetState(){this.error="",this.loading=!1,this.done=!1,this.offset=0,this.comments=[]}}};var lt=o(3520),mt={};mt.styleTagTransform=X(),mt.setAttributes=Y(),mt.insert=G().bind(null,"head"),mt.domAPI=W(),mt.insertStyleElement=K(),V()(lt.A,mt),lt.A&<.A.locals&<.A.locals;const dt=(0,p.A)(ct,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"element-visibility",rawName:"v-element-visibility",value:t.onVisibilityChange,expression:"onVisibilityChange"}],staticClass:"comments",class:{"icon-loading":t.isFirstLoading}},[e("Comment",t._b({staticClass:"comments__writer",attrs:{"auto-complete":t.autoComplete,"resource-type":t.resourceType,editor:!0,"user-data":t.userData,"resource-id":t.currentResourceId},on:{new:t.onNewComment}},"Comment",t.editorData,!1)),t._v(" "),t.isFirstLoading?t._e():[!t.hasComments&&t.done?e("NcEmptyContent",{staticClass:"comments__empty",attrs:{name:t.t("comments","No comments yet, start the conversation!")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("MessageReplyTextIcon")]},proxy:!0}],null,!1,1033639148)}):e("ul",t._l(t.comments,(function(n){return e("Comment",t._b({key:n.props.id,staticClass:"comments__list",attrs:{tag:"li","auto-complete":t.autoComplete,"resource-type":t.resourceType,message:n.props.message,"resource-id":t.currentResourceId,"user-data":t.genMentionsData(n.props.mentions)},on:{"update:message":function(e){return t.$set(n.props,"message",e)},delete:t.onDelete}},"Comment",n.props,!1))})),1),t._v(" "),t.loading&&!t.isFirstLoading?e("div",{staticClass:"comments__info icon-loading"}):t.hasComments&&t.done?e("div",{staticClass:"comments__info"},[t._v("\n\t\t\t"+t._s(t.t("comments","No more messages"))+"\n\t\t")]):t.error?[e("NcEmptyContent",{staticClass:"comments__error",attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AlertCircleOutlineIcon")]},proxy:!0}],null,!1,66050004)}),t._v(" "),e("NcButton",{staticClass:"comments__retry",on:{click:t.getComments},scopedSlots:t._u([{key:"icon",fn:function(){return[e("RefreshIcon")]},proxy:!0}],null,!1,3924573781)},[t._v("\n\t\t\t\t"+t._s(t.t("comments","Retry"))+"\n\t\t\t")])]:t._e()]],2)}),[],!1,null,"e6750fda",null).exports;a.Ay.use(r.R2),o.nc=(0,s.aV)(),a.Ay.mixin({data:()=>({logger:j}),methods:{t:i.t,n:i.n}}),window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,r.Ey)();return e={...e,propsData:{...e.propsData??{},resourceType:t},pinia:n},new(a.Ay.extend(dt))(e)}}}),console.debug("OCA.Comments.View initialized")},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},92179:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comment[data-v-16499043]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-16499043]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-16499043]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-16499043]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-16499043]{margin-inline-start:10px !important}.comment__author[data-v-16499043]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-16499043],.comment__timestamp[data-v-16499043]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-16499043]{position:relative}.comment__editor-description[data-v-16499043]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-16499043]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-16499043]{white-space:pre-wrap;word-break:break-word;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-16499043]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-16499043]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: break-word;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const a=r}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return s[t].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}r.m=s,e=[],r.O=(t,n,o,s)=>{if(!n){var i=1/0;for(m=0;m<e.length;m++){n=e[m][0],o=e[m][1],s=e[m][2];for(var a=!0,c=0;c<n.length;c++)(!1&s||i>=s)&&Object.keys(r.O).every((t=>r.O[t](n[c])))?n.splice(c--,1):(a=!1,s<i&&(i=s));if(a){e.splice(m--,1);var l=o();void 0!==l&&(t=l)}}return t}s=s||0;for(var m=e.length;m>0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,o,s]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,n)=>(r.f[n](t,e),e)),[])),r.u=t=>t+"-"+t+".js?v="+{640:"c4d4943f2c00c1f8a515",4508:"c556959b637fb7a30be4",5258:"3c88a2c4e4c6df0084c1",5862:"142cd48ca8ec32e57725",6408:"d68d596cc661db69d9eb",7432:"bf453467840969b202ee",9279:"460048c8db22e016b900"}[t],r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},o="nextcloud:",r.l=(t,e,s,i)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==s)for(var l=document.getElementsByTagName("script"),m=0;m<l.length;m++){var d=l[m];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==o+s){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",o+s),a.src=t),n[t]=[e];var u=(e,o)=>{a.onerror=a.onload=null,clearTimeout(p);var s=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((t=>t(o))),e)return e(o)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),c&&document.head.appendChild(a)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.j=7062,(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{r.b=document.baseURI||self.location.href;var t={7062:0};r.f.j=(e,n)=>{var o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise(((n,s)=>o=t[e]=[n,s]));n.push(o[2]=s);var i=r.p+r.u(e),a=new Error;r.l(i,(n=>{if(r.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+i+")",a.name="ChunkLoadError",a.type=s,a.request=i,o[1](a)}}),"chunk-"+e,e)}},r.O.j=e=>0===t[e];var e=(e,n)=>{var o,s,i=n[0],a=n[1],c=n[2],l=0;if(i.some((e=>0!==t[e]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(c)var m=c(r)}for(e&&e(n);l<i.length;l++)s=i[l],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return r.O(m)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),r.nc=void 0;var a=r.O(void 0,[4208],(()=>r(49060)));a=r.O(a)})(); -//# sourceMappingURL=comments-comments-app.js.map?v=70c8428361d24204e81b
\ No newline at end of file +(()=>{var e,n,o,s={3520:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comments[data-v-e6750fda]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-e6750fda],.comments__error[data-v-e6750fda]{flex:1 0}.comments__retry[data-v-e6750fda]{margin:0 auto}.comments__info[data-v-e6750fda]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}","",{version:3,sources:["webpack://./apps/comments/src/views/Comments.vue"],names:[],mappings:"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n"],sourceRoot:""}]);const a=r},22042:(e,n,o)=>{"use strict";var s=o(21777),i=o(53334),r=o(65899),a=o(85471),c=o(85168),l=o(55042),d=o(35779),m=o(97012);const u={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var p=o(14486);const A=(0,p.A)(u,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,h={name:"MessageReplyTextIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},g=(0,p.A)(h,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var C=o(57578),f=o(57505),_=o(24764),y=o(15502),v=o(41944),b=o(4604),x=o(59892),w=o(77764),I=o(33691),D=o(66001),k=o(79759),T=o(2413),N=o(63814);const S=function(){return(0,N.dC)("dav/comments")};function E(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=new DOMParser;let o=t;for(let t=0;t<e;t++)o=n.parseFromString(o,"text/html").documentElement.textContent;return o}var R=o(65043),O=o(60669);const M=(0,O.UU)(S()),B=t=>{M.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,s.zo)(B),B((0,s.do)());const $=M,L=(0,r.nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){this.idsInLimbo.includes(t)}}}),j=(0,o(35947).YK)().setApp("comments").detectUser().build(),P={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,r.n2)(L)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await async function(t,e,n,o){const s=["",t,e,n].join("/");return await $.customRequest(s,Object.assign({method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${o}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`}))}(this.resourceType,this.resourceId,this.id,e),j.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,c.Qg)(t("comments","An error occurred while trying to edit the comment")),console.error(e)}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,c.Br);(0,c._h)(t("comments","Comment deleted"),(()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}))},async onDelete(){try{await async function(t,e,n){const o=["",t,e,n].join("/");await $.deleteFile(o)}(this.resourceType,this.resourceId,this.id),j.debug("Comment deleted",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id}),this.$emit("delete",this.id)}catch(e){(0,c.Qg)(t("comments","An error occurred while trying to delete the comment")),console.error(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)}},async onNewComment(e){this.loading=!0;try{const t=await async function(t,e,n){const o=["",t,e].join("/"),i=await R.Ay.post(S()+o,{actorDisplayName:(0,s.HW)().displayName,actorId:(0,s.HW)().uid,actorType:"users",creationDateTime:(new Date).toUTCString(),message:n,objectType:t,verb:"comment"}),r=o+"/"+parseInt(i.headers["content-location"].split("/").pop()),a=await $.stat(r,{details:!0}),c=a.data.props;return c.actorDisplayName=E(c.actorDisplayName,2),c.message=E(c.message,2),a.data}(this.resourceType,this.resourceId,e);j.debug("New comment posted",{resourceType:this.resourceType,resourceId:this.resourceId,newComment:t}),this.$emit("new",t),this.$emit("update:message",""),this.localMessage=""}catch(e){(0,c.Qg)(t("comments","An error occurred while trying to create the comment")),console.error(e)}finally{this.loading=!1}}}},H={name:"Comment",components:{IconArrowRight:I.A,IconClose:D.A,IconDelete:k.A,IconEdit:T.A,NcActionButton:f.A,NcActions:_.A,NcActionSeparator:y.A,NcAvatar:v.A,NcButton:m.A,NcDateTime:b.A,NcLoadingIcon:x.A,NcRichContenteditable:()=>Promise.all([o.e(4208),o.e(6408),o.e(5258)]).then(o.bind(o,95528)),NcRichText:()=>Promise.all([o.e(4208),o.e(6408),o.e(4508)]).then(o.bind(o,64508))},mixins:[P],inheritAttrs:!1,props:{actorDisplayName:{type:String,required:!0},actorId:{type:String,required:!0},creationDateTime:{type:String,default:null},editor:{type:Boolean,default:!1},autoComplete:{type:Function,required:!0},userData:{type:Object,default:()=>({})},tag:{type:String,default:"div"}},data:()=>({expanded:!1,localMessage:"",submitted:!1}),computed:{...(0,r.n2)(L),isOwnComment(){return(0,s.HW)().uid===this.actorId},richContent(){const t={};let e=this.localMessage;return Object.keys(this.userData).forEach(((n,o)=>{const s=`mention-${o}`,i=new RegExp(`@${n}|@"${n}"`,"g");e=e.replace(i,`{${s}}`),t[s]={component:w.A,props:{user:n,displayName:this.userData[n].label,primary:this.userData[n].primary}}})),{mentions:t,message:e}},isEmptyMessage(){return!this.localMessage||""===this.localMessage.trim()},timestamp(){return Date.parse(this.creationDateTime)},isLimbo(){return this.deletedCommentLimboStore.checkForId(this.id)}},watch:{message(t){this.updateLocalMessage(t)}},beforeMount(){this.updateLocalMessage(this.message)},methods:{t:i.Tl,updateLocalMessage(t){this.localMessage=t.toString(),this.submitted=!1},onSubmit(){if(""!==this.localMessage.trim())return this.editor?(this.onNewComment(this.localMessage.trim()),void this.$nextTick((()=>{this.$refs.editor.$el.focus()}))):void this.onEditComment(this.localMessage.trim())},onExpand(){this.expanded=!0}}};var q=o(85072),V=o.n(q),z=o(97825),W=o.n(z),F=o(77659),G=o.n(F),U=o(55056),Y=o.n(U),Q=o(10540),K=o.n(Q),Z=o(41113),X=o.n(Z),J=o(35642),tt={};tt.styleTagTransform=X(),tt.setAttributes=Y(),tt.insert=G().bind(null,"head"),tt.domAPI=W(),tt.insertStyleElement=K(),V()(J.A,tt),J.A&&J.A.locals&&J.A.locals;const et=(0,p.A)(H,(function(){var t=this,e=t._self._c;return e(t.tag,{directives:[{name:"show",rawName:"v-show",value:!t.deleted&&!t.isLimbo,expression:"!deleted && !isLimbo"}],tag:"component",staticClass:"comment",class:{"comment--loading":t.loading}},[e("div",{staticClass:"comment__side"},[e("NcAvatar",{staticClass:"comment__avatar",attrs:{"display-name":t.actorDisplayName,user:t.actorId,size:32}})],1),t._v(" "),e("div",{staticClass:"comment__body"},[e("div",{staticClass:"comment__header"},[e("span",{staticClass:"comment__author"},[t._v(t._s(t.actorDisplayName))]),t._v(" "),t.isOwnComment&&t.id&&!t.loading?e("NcActions",{staticClass:"comment__actions"},[t.editing?e("NcActionButton",{on:{click:t.onEditCancel},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconClose",{attrs:{size:20}})]},proxy:!0}],null,!1,2888946197)},[t._v("\n\t\t\t\t\t"+t._s(t.t("comments","Cancel edit"))+"\n\t\t\t\t")]):[e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onEdit},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconEdit",{attrs:{size:20}})]},proxy:!0}],null,!1,649782975)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Edit comment"))+"\n\t\t\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":""},on:{click:t.onDeleteWithUndo},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconDelete",{attrs:{size:20}})]},proxy:!0}],null,!1,881161434)},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("comments","Delete comment"))+"\n\t\t\t\t\t")])]],2):t._e(),t._v(" "),t.id&&t.loading?e("div",{staticClass:"comment_loading icon-loading-small"}):t.creationDateTime?e("NcDateTime",{staticClass:"comment__timestamp",attrs:{timestamp:t.timestamp,"ignore-seconds":!0}}):t._e()],1),t._v(" "),t.editor||t.editing?e("form",{staticClass:"comment__editor",on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"comment__editor-group"},[e("NcRichContenteditable",{ref:"editor",attrs:{"auto-complete":t.autoComplete,contenteditable:!t.loading,label:t.editor?t.t("comments","New comment"):t.t("comments","Edit comment"),placeholder:t.t("comments","Write a comment …"),value:t.localMessage,"user-data":t.userData,"aria-describedby":"tab-comments__editor-description"},on:{"update:value":t.updateLocalMessage,submit:t.onSubmit}}),t._v(" "),e("div",{staticClass:"comment__submit"},[e("NcButton",{attrs:{type:"tertiary-no-background","native-type":"submit","aria-label":t.t("comments","Post comment"),disabled:t.isEmptyMessage},on:{click:t.onSubmit},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!1,758946661)})],1)],1),t._v(" "),e("div",{staticClass:"comment__editor-description",attrs:{id:"tab-comments__editor-description"}},[t._v("\n\t\t\t\t"+t._s(t.t("comments","@ for mentions, : for emoji, / for smart picker"))+"\n\t\t\t")])]):e("NcRichText",{staticClass:"comment__message",class:{"comment__message--expanded":t.expanded},attrs:{text:t.richContent.message,arguments:t.richContent.mentions},on:{click:t.onExpand}})],1)])}),[],!1,null,"434d3ed4",null).exports;var nt=o(32981);const ot=(0,a.pM)({props:{resourceId:{type:Number,required:!0},resourceType:{type:String,default:"files"}},data:()=>({editorData:{actorDisplayName:(0,s.HW)().displayName,actorId:(0,s.HW)().uid,key:"editor"},userData:{}}),methods:{async autoComplete(t,e){const{data:n}=await R.Ay.get((0,N.KT)("core/autocomplete/get"),{params:{search:t,itemType:"files",itemId:this.resourceId,sorter:"commenters|share-recipients",limit:(0,nt.C)("comments","maxAutoCompleteResults")}});return n.ocs.data.forEach((t=>{this.userData[t.id]=t})),e(Object.values(this.userData))},genMentionsData(t){return Object.values(t).flat().forEach((t=>{this.userData[t.mentionId]={icon:"icon-user",id:t.mentionId,label:t.mentionDisplayName,source:"users",primary:(0,s.HW)()?.uid===t.mentionId}})),this.userData}}});var st=o(54290),it=o(90176);const rt=async function(t,e){let{resourceType:n,resourceId:o}=t;const s=["",n,o].join("/"),i=e.datetime?`<oc:datetime>${e.datetime.toISOString()}</oc:datetime>`:"",r=await $.customRequest(s,Object.assign({method:"REPORT",data:`<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>${e.limit??20}</oc:limit>\n\t\t\t\t<oc:offset>${e.offset||0}</oc:offset>\n\t\t\t\t${i}\n\t\t\t</oc:filter-comments>`},e)),a=await r.text(),c=await(0,O.h4)(a),l=at(c,!0);return(0,st.hq)(r,l,!0)},at=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:n}}=t;return n.map((t=>{const n=t.propstat.prop;return(0,it.ch)(n,n.id.toString(),e)}))},ct={name:"Comments",components:{Comment:et,NcEmptyContent:d.A,NcButton:m.A,RefreshIcon:A,MessageReplyTextIcon:g,AlertCircleOutlineIcon:C.A},directives:{elementVisibility:l.Zx},mixins:[ot],data(){return{error:"",loading:!1,done:!1,currentResourceId:this.resourceId,offset:0,comments:[],cancelRequest:()=>{},Comment:et,userData:{}}},computed:{hasComments(){return this.comments.length>0},isFirstLoading(){return this.loading&&0===this.offset}},watch:{resourceId(){this.currentResourceId=this.resourceId}},methods:{t:i.Tl,async onVisibilityChange(t){if(t)try{await((t,e,n)=>{const o=["",t,e].join("/"),s=n.toUTCString();return $.customRequest(o,{method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:readMarker>${s}</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`})})(this.resourceType,this.currentResourceId,new Date)}catch(t){(0,c.Qg)(t.message||(0,i.Tl)("comments","Failed to mark comments as read"))}},async update(t){this.currentResourceId=t,this.resetState(),this.getComments()},onScrollBottomReached(){this.error||this.done||this.loading||this.getComments()},async getComments(){this.cancelRequest("cancel");try{this.loading=!0,this.error="";const{request:t,abort:e}=function(t){const e=new AbortController,n=e.signal;return{request:async function(e,o){return await t(e,Object.assign({signal:n},o))},abort:()=>e.abort()}}(rt);this.cancelRequest=e;const{data:n}=await t({resourceType:this.resourceType,resourceId:this.currentResourceId},{offset:this.offset})||{data:[]};this.logger.debug(`Processed ${n.length} comments`,{comments:n}),n.length<20&&(this.done=!0),this.comments.push(...n),this.offset+=20}catch(t){if("cancel"===t.message)return;this.error=(0,i.Tl)("comments","Unable to load the comments list"),console.error("Error loading the comments list",t)}finally{this.loading=!1}},onNewComment(t){this.comments.unshift(t)},onDelete(t){const e=this.comments.findIndex((e=>e.props.id===t));e>-1?this.comments.splice(e,1):console.error("Could not find the deleted comment in the list",t)},resetState(){this.error="",this.loading=!1,this.done=!1,this.offset=0,this.comments=[]}}};var lt=o(3520),dt={};dt.styleTagTransform=X(),dt.setAttributes=Y(),dt.insert=G().bind(null,"head"),dt.domAPI=W(),dt.insertStyleElement=K(),V()(lt.A,dt),lt.A&<.A.locals&<.A.locals;const mt=(0,p.A)(ct,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"element-visibility",rawName:"v-element-visibility",value:t.onVisibilityChange,expression:"onVisibilityChange"}],staticClass:"comments",class:{"icon-loading":t.isFirstLoading}},[e("Comment",t._b({staticClass:"comments__writer",attrs:{"auto-complete":t.autoComplete,"resource-type":t.resourceType,editor:!0,"user-data":t.userData,"resource-id":t.currentResourceId},on:{new:t.onNewComment}},"Comment",t.editorData,!1)),t._v(" "),t.isFirstLoading?t._e():[!t.hasComments&&t.done?e("NcEmptyContent",{staticClass:"comments__empty",attrs:{name:t.t("comments","No comments yet, start the conversation!")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("MessageReplyTextIcon")]},proxy:!0}],null,!1,1033639148)}):e("ul",t._l(t.comments,(function(n){return e("Comment",t._b({key:n.props.id,staticClass:"comments__list",attrs:{tag:"li","auto-complete":t.autoComplete,"resource-type":t.resourceType,message:n.props.message,"resource-id":t.currentResourceId,"user-data":t.genMentionsData(n.props.mentions)},on:{"update:message":function(e){return t.$set(n.props,"message",e)},delete:t.onDelete}},"Comment",n.props,!1))})),1),t._v(" "),t.loading&&!t.isFirstLoading?e("div",{staticClass:"comments__info icon-loading"}):t.hasComments&&t.done?e("div",{staticClass:"comments__info"},[t._v("\n\t\t\t"+t._s(t.t("comments","No more messages"))+"\n\t\t")]):t.error?[e("NcEmptyContent",{staticClass:"comments__error",attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[e("AlertCircleOutlineIcon")]},proxy:!0}],null,!1,66050004)}),t._v(" "),e("NcButton",{staticClass:"comments__retry",on:{click:t.getComments},scopedSlots:t._u([{key:"icon",fn:function(){return[e("RefreshIcon")]},proxy:!0}],null,!1,3924573781)},[t._v("\n\t\t\t\t"+t._s(t.t("comments","Retry"))+"\n\t\t\t")])]:t._e()]],2)}),[],!1,null,"e6750fda",null).exports;a.Ay.use(r.R2),o.nc=(0,s.aV)(),a.Ay.mixin({data:()=>({logger:j}),methods:{t:i.t,n:i.n}}),window.OCA&&!window.OCA.Comments&&Object.assign(window.OCA,{Comments:{}}),Object.assign(window.OCA.Comments,{View:class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"files",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,r.Ey)();return e={...e,propsData:{...e.propsData??{},resourceType:t},pinia:n},new(a.Ay.extend(mt))(e)}}}),console.debug("OCA.Comments.View initialized")},35642:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(71354),s=n.n(o),i=n(76314),r=n.n(i)()(s());r.push([t.id,".comment[data-v-434d3ed4]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-434d3ed4]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-434d3ed4]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-434d3ed4]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-434d3ed4]{margin-inline-start:10px !important}.comment__author[data-v-434d3ed4]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-434d3ed4],.comment__timestamp[data-v-434d3ed4]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-434d3ed4]{position:relative}.comment__editor-description[data-v-434d3ed4]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-434d3ed4]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-434d3ed4]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-434d3ed4]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-434d3ed4]{min-height:44px;margin:0;padding:10px}","",{version:3,sources:["webpack://./apps/comments/src/components/Comment.vue"],names:[],mappings:"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB",sourcesContent:['\n@use "sass:math";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n'],sourceRoot:""}]);const a=r},42634:()=>{},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return s[t].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}r.m=s,e=[],r.O=(t,n,o,s)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){n=e[d][0],o=e[d][1],s=e[d][2];for(var a=!0,c=0;c<n.length;c++)(!1&s||i>=s)&&Object.keys(r.O).every((t=>r.O[t](n[c])))?n.splice(c--,1):(a=!1,s<i&&(i=s));if(a){e.splice(d--,1);var l=o();void 0!==l&&(t=l)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,o,s]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,n)=>(r.f[n](t,e),e)),[])),r.u=t=>t+"-"+t+".js?v="+{640:"c4d4943f2c00c1f8a515",4508:"c556959b637fb7a30be4",5258:"3c88a2c4e4c6df0084c1",5862:"142cd48ca8ec32e57725",6408:"d68d596cc661db69d9eb",7432:"bf453467840969b202ee",9279:"460048c8db22e016b900"}[t],r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},o="nextcloud:",r.l=(t,e,s,i)=>{if(n[t])n[t].push(e);else{var a,c;if(void 0!==s)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var m=l[d];if(m.getAttribute("src")==t||m.getAttribute("data-webpack")==o+s){a=m;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",o+s),a.src=t),n[t]=[e];var u=(e,o)=>{a.onerror=a.onload=null,clearTimeout(p);var s=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((t=>t(o))),e)return e(o)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),c&&document.head.appendChild(a)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.j=7062,(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{r.b=document.baseURI||self.location.href;var t={7062:0};r.f.j=(e,n)=>{var o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise(((n,s)=>o=t[e]=[n,s]));n.push(o[2]=s);var i=r.p+r.u(e),a=new Error;r.l(i,(n=>{if(r.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+i+")",a.name="ChunkLoadError",a.type=s,a.request=i,o[1](a)}}),"chunk-"+e,e)}},r.O.j=e=>0===t[e];var e=(e,n)=>{var o,s,i=n[0],a=n[1],c=n[2],l=0;if(i.some((e=>0!==t[e]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(c)var d=c(r)}for(e&&e(n);l<i.length;l++)s=i[l],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return r.O(d)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),r.nc=void 0;var a=r.O(void 0,[4208],(()=>r(22042)));a=r.O(a)})(); +//# sourceMappingURL=comments-comments-app.js.map?v=c772a4b602dd4d6a9252
\ No newline at end of file diff --git a/dist/comments-comments-app.js.map b/dist/comments-comments-app.js.map index 0b1d3844912..8de4b2fe720 100644 --- a/dist/comments-comments-app.js.map +++ b/dist/comments-comments-app.js.map @@ -1 +1 @@ -{"version":3,"file":"comments-comments-app.js?v=70c8428361d24204e81b","mappings":"UAAIA,ECAAC,EACAC,E,mFCEAC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,kUAAmU,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,wHAAwH,eAAiB,CAAC,uTAAuT,WAAa,MAE/5B,S,wICaA,MCpB0G,EDoB1G,CACEC,KAAM,cACNC,MAAO,CAAC,SACRC,MAAO,CACLC,MAAO,CACLC,KAAMC,QAERC,UAA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F,KACrCD,EAAoBO,EAAEN,GAAYyF,EAAYzF,IAGhD,GAAG0F,EAAS,IAAI1J,EAAS0J,EAAQ3F,EAClC,CAEA,IADGyF,GAA4BA,EAA2BxT,GACrD/B,EAAIuQ,EAAS5Q,OAAQK,IACzBwR,EAAUjB,EAASvQ,GAChB8P,EAAoBsB,EAAE2D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,EAE5B,OAAO1B,EAAoBQ,EAAEvE,EAAO,EAGjC4J,EAAqBd,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fc,EAAmBjO,QAAQ4N,EAAqB7B,KAAK,KAAM,IAC3DkC,EAAmBjY,KAAO4X,EAAqB7B,KAAK,KAAMkC,EAAmBjY,KAAK+V,KAAKkC,G,KCvFvF7F,EAAoBgD,QAAKlT,ECGzB,IAAIgW,EAAsB9F,EAAoBQ,OAAE1Q,EAAW,CAAC,OAAO,IAAOkQ,EAAoB,SAC9F8F,EAAsB9F,EAAoBQ,EAAEsF,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=script&lang=js","webpack://nextcloud/./node_modules/vue-material-design-icons/Refresh.vue?0940","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=template&id=2864f909","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyText.vue?vue&type=script&lang=js","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyText.vue","webpack://nextcloud/./node_modules/vue-material-design-icons/MessageReplyText.vue?2121","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyText.vue?vue&type=template&id=92c64d6a","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack://nextcloud/./apps/comments/src/components/Comment.vue?f1d4","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/views/Comments.vue","webpack:///nextcloud/apps/comments/src/services/ReadComments.ts","webpack:///nextcloud/apps/comments/src/utils/cancelableRequest.js","webpack://nextcloud/./apps/comments/src/views/Comments.vue?6659","webpack://nextcloud/./apps/comments/src/views/Comments.vue?f45b","webpack://nextcloud/./apps/comments/src/views/Comments.vue?0e41","webpack:///nextcloud/apps/comments/src/services/CommentsInstance.js","webpack:///nextcloud/apps/comments/src/comments-app.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comments[data-v-e6750fda]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-e6750fda],.comments__error[data-v-e6750fda]{flex:1 0}.comments__retry[data-v-e6750fda]{margin:0 auto}.comments__info[data-v-e6750fda]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/views/Comments.vue\"],\"names\":[],\"mappings\":\"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA\",\"sourcesContent\":[\"\\n.comments {\\n\\tmin-height: 100%;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\n\\t&__empty,\\n\\t&__error {\\n\\t\\tflex: 1 0;\\n\\t}\\n\\n\\t&__retry {\\n\\t\\tmargin: 0 auto;\\n\\t}\\n\\n\\t&__info {\\n\\t\\theight: 60px;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\ttext-align: center;\\n\\t\\tline-height: 60px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon refresh-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=\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"RefreshIcon\",\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>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Refresh.vue?vue&type=template&id=2864f909\"\nimport script from \"./Refresh.vue?vue&type=script&lang=js\"\nexport * from \"./Refresh.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon refresh-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyText.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyText.vue?vue&type=script&lang=js\"","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon message-reply-text-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=\"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"MessageReplyTextIcon\",\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>","import { render, staticRenderFns } from \"./MessageReplyText.vue?vue&type=template&id=92c64d6a\"\nimport script from \"./MessageReplyText.vue?vue&type=script&lang=js\"\nexport * from \"./MessageReplyText.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon message-reply-text-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst getRootPath = function() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\nconst setHeaders = (token) => {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\tthis.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport NewComment from '../services/NewComment.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\nimport logger from '../logger.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, Object.assign({\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${message}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`,\n\t}))\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport axios from '@nextcloud/axios'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<component :is=\"tag\"\n\t\tv-show=\"!deleted && !isLimbo\"\n\t\t:class=\"{'comment--loading': loading}\"\n\t\tclass=\"comment\">\n\t\t<!-- Comment header toolbar -->\n\t\t<div class=\"comment__side\">\n\t\t\t<!-- Author -->\n\t\t\t<NcAvatar class=\"comment__avatar\"\n\t\t\t\t:display-name=\"actorDisplayName\"\n\t\t\t\t:user=\"actorId\"\n\t\t\t\t:size=\"32\" />\n\t\t</div>\n\t\t<div class=\"comment__body\">\n\t\t\t<div class=\"comment__header\">\n\t\t\t\t<span class=\"comment__author\">{{ actorDisplayName }}</span>\n\n\t\t\t\t<!-- Comment actions,\n\t\t\t\t\tshow if we have a message id and current user is author -->\n\t\t\t\t<NcActions v-if=\"isOwnComment && id && !loading\" class=\"comment__actions\">\n\t\t\t\t\t<template v-if=\"!editing\">\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onEdit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconEdit :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Edit comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionSeparator />\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onDeleteWithUndo\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconDelete :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Delete comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<NcActionButton v-else @click=\"onEditCancel\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('comments', 'Cancel edit') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\n\t\t\t\t<!-- Show loading if we're editing or deleting, not on new ones -->\n\t\t\t\t<div v-if=\"id && loading\" class=\"comment_loading icon-loading-small\" />\n\n\t\t\t\t<!-- Relative time to the comment creation -->\n\t\t\t\t<NcDateTime v-else-if=\"creationDateTime\"\n\t\t\t\t\tclass=\"comment__timestamp\"\n\t\t\t\t\t:timestamp=\"timestamp\"\n\t\t\t\t\t:ignore-seconds=\"true\" />\n\t\t\t</div>\n\n\t\t\t<!-- Message editor -->\n\t\t\t<form v-if=\"editor || editing\" class=\"comment__editor\" @submit.prevent>\n\t\t\t\t<div class=\"comment__editor-group\">\n\t\t\t\t\t<NcRichContenteditable ref=\"editor\"\n\t\t\t\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t\t\t\t:contenteditable=\"!loading\"\n\t\t\t\t\t\t:label=\"editor ? t('comments', 'New comment') : t('comments', 'Edit comment')\"\n\t\t\t\t\t\t:placeholder=\"t('comments', 'Write a comment …')\"\n\t\t\t\t\t\t:value=\"localMessage\"\n\t\t\t\t\t\t:user-data=\"userData\"\n\t\t\t\t\t\taria-describedby=\"tab-comments__editor-description\"\n\t\t\t\t\t\t@update:value=\"updateLocalMessage\"\n\t\t\t\t\t\t@submit=\"onSubmit\" />\n\t\t\t\t\t<div class=\"comment__submit\">\n\t\t\t\t\t\t<NcButton type=\"tertiary-no-background\"\n\t\t\t\t\t\t\tnative-type=\"submit\"\n\t\t\t\t\t\t\t:aria-label=\"t('comments', 'Post comment')\"\n\t\t\t\t\t\t\t:disabled=\"isEmptyMessage\"\n\t\t\t\t\t\t\t@click=\"onSubmit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t\t\t<IconArrowRight v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"tab-comments__editor-description\" class=\"comment__editor-description\">\n\t\t\t\t\t{{ t('comments', '@ for mentions, : for emoji, / for smart picker') }}\n\t\t\t\t</div>\n\t\t\t</form>\n\n\t\t\t<!-- Message content -->\n\t\t\t<NcRichText v-else\n\t\t\t\tclass=\"comment__message\"\n\t\t\t\t:class=\"{'comment__message--expanded': expanded}\"\n\t\t\t\t:text=\"richContent.message\"\n\t\t\t\t:arguments=\"richContent.mentions\"\n\t\t\t\t@click=\"onExpand\" />\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport NcActions from '@nextcloud/vue/components/NcActions'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcDateTime from '@nextcloud/vue/components/NcDateTime'\nimport NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'\nimport NcUserBubble from '@nextcloud/vue/components/NcUserBubble'\n\nimport IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport IconClose from 'vue-material-design-icons/Close.vue'\nimport IconDelete from 'vue-material-design-icons/Delete.vue'\nimport IconEdit from 'vue-material-design-icons/Pencil.vue'\n\nimport CommentMixin from '../mixins/CommentMixin.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\n// Dynamic loading\nconst NcRichContenteditable = () => import('@nextcloud/vue/components/NcRichContenteditable')\nconst NcRichText = () => import('@nextcloud/vue/components/NcRichText')\n\nexport default {\n\tname: 'Comment',\n\n\tcomponents: {\n\t\tIconArrowRight,\n\t\tIconClose,\n\t\tIconDelete,\n\t\tIconEdit,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcActionSeparator,\n\t\tNcAvatar,\n\t\tNcButton,\n\t\tNcDateTime,\n\t\tNcLoadingIcon,\n\t\tNcRichContenteditable,\n\t\tNcRichText,\n\t},\n\tmixins: [CommentMixin],\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tactorDisplayName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactorId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tcreationDateTime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Force the editor display\n\t\t */\n\t\teditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide the autocompletion data\n\t\t */\n\t\tautoComplete: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\ttag: {\n\t\t\ttype: String,\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\texpanded: false,\n\t\t\t// Only change data locally and update the original\n\t\t\t// parent data when the request is sent and resolved\n\t\t\tlocalMessage: '',\n\t\t\tsubmitted: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\n\t\t/**\n\t\t * Is the current user the author of this comment\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisOwnComment() {\n\t\t\treturn getCurrentUser().uid === this.actorId\n\t\t},\n\n\t\trichContent() {\n\t\t\tconst mentions = {}\n\t\t\tlet message = this.localMessage\n\n\t\t\tObject.keys(this.userData).forEach((user, index) => {\n\t\t\t\tconst key = `mention-${index}`\n\t\t\t\tconst regex = new RegExp(`@${user}|@\"${user}\"`, 'g')\n\t\t\t\tmessage = message.replace(regex, `{${key}}`)\n\t\t\t\tmentions[key] = {\n\t\t\t\t\tcomponent: NcUserBubble,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tuser,\n\t\t\t\t\t\tdisplayName: this.userData[user].label,\n\t\t\t\t\t\tprimary: this.userData[user].primary,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn { mentions, message }\n\t\t},\n\n\t\tisEmptyMessage() {\n\t\t\treturn !this.localMessage || this.localMessage.trim() === ''\n\t\t},\n\n\t\t/**\n\t\t * Timestamp of the creation time (in ms UNIX time)\n\t\t */\n\t\ttimestamp() {\n\t\t\treturn Date.parse(this.creationDateTime)\n\t\t},\n\n\t\tisLimbo() {\n\t\t\treturn this.deletedCommentLimboStore.checkForId(this.id)\n\t\t},\n\t},\n\n\twatch: {\n\t\t// If the data change, update the local value\n\t\tmessage(message) {\n\t\t\tthis.updateLocalMessage(message)\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// Init localMessage\n\t\tthis.updateLocalMessage(this.message)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update local Message on outer change\n\t\t *\n\t\t * @param {string} message the message to set\n\t\t */\n\t\tupdateLocalMessage(message) {\n\t\t\tthis.localMessage = message.toString()\n\t\t\tthis.submitted = false\n\t\t},\n\n\t\t/**\n\t\t * Dispatch message between edit and create\n\t\t */\n\t\tonSubmit() {\n\t\t\t// Do not submit if message is empty\n\t\t\tif (this.localMessage.trim() === '') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.editor) {\n\t\t\t\tthis.onNewComment(this.localMessage.trim())\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t// Focus the editor again\n\t\t\t\t\tthis.$refs.editor.$el.focus()\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.onEditComment(this.localMessage.trim())\n\t\t},\n\n\t\tonExpand() {\n\t\t\tthis.expanded = true\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use \"sass:math\";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: break-word;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n</style>\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=16499043&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=16499043&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"16499043\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{'comment--loading': _vm.loading}},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconEdit',{attrs:{\"size\":20}})]},proxy:true}],null,false,649782975)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconDelete',{attrs:{\"size\":20}})]},proxy:true}],null,false,881161434)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"type\":\"tertiary-no-background\",\"native-type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{'comment__message--expanded': _vm.expanded},attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},on:{\"click\":_vm.onExpand}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param {string} search the query\n * @param {Function} callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: 'files',\n itemId: this.resourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach(user => { this.userData[user.id] = user; });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach(mention => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\n// https://github.com/perry-mitchell/webdav-client/issues/339\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param {object} data destructuring object\n * @param {string} data.resourceType the resource type\n * @param {number} data.resourceId the resource ID\n * @param {object} [options] optional options for axios\n * @param {number} [options.offset] the pagination offset\n * @param {number} [options.limit] the pagination limit, defaults to 20\n * @param {Date} [options.datetime] optional date to query\n * @return {{data: object[]}} the comments list\n */\nexport const getComments = async function ({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `<oc:datetime>${options.datetime.toISOString()}</oc:datetime>` : '';\n const response = await client.customRequest(resourcePath, Object.assign({\n method: 'REPORT',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<oc:limit>${options.limit ?? DEFAULT_LIMIT}</oc:limit>\n\t\t\t\t<oc:offset>${options.offset || 0}</oc:offset>\n\t\t\t\t${datetime}\n\t\t\t</oc:filter-comments>`,\n }, options));\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n return processResponsePayload(response, stat, true);\n};\n// https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\nconst getDirectoryFiles = function (result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map(item => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n};\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div v-element-visibility=\"onVisibilityChange\"\n\t\tclass=\"comments\"\n\t\t:class=\"{ 'icon-loading': isFirstLoading }\">\n\t\t<!-- Editor -->\n\t\t<Comment v-bind=\"editorData\"\n\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t:resource-type=\"resourceType\"\n\t\t\t:editor=\"true\"\n\t\t\t:user-data=\"userData\"\n\t\t\t:resource-id=\"currentResourceId\"\n\t\t\tclass=\"comments__writer\"\n\t\t\t@new=\"onNewComment\" />\n\n\t\t<template v-if=\"!isFirstLoading\">\n\t\t\t<NcEmptyContent v-if=\"!hasComments && done\"\n\t\t\t\tclass=\"comments__empty\"\n\t\t\t\t:name=\"t('comments', 'No comments yet, start the conversation!')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<MessageReplyTextIcon />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t\t<ul v-else>\n\t\t\t\t<!-- Comments -->\n\t\t\t\t<Comment v-for=\"comment in comments\"\n\t\t\t\t\t:key=\"comment.props.id\"\n\t\t\t\t\ttag=\"li\"\n\t\t\t\t\tv-bind=\"comment.props\"\n\t\t\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t\t\t:resource-type=\"resourceType\"\n\t\t\t\t\t:message.sync=\"comment.props.message\"\n\t\t\t\t\t:resource-id=\"currentResourceId\"\n\t\t\t\t\t:user-data=\"genMentionsData(comment.props.mentions)\"\n\t\t\t\t\tclass=\"comments__list\"\n\t\t\t\t\t@delete=\"onDelete\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Loading more message -->\n\t\t\t<div v-if=\"loading && !isFirstLoading\" class=\"comments__info icon-loading\" />\n\n\t\t\t<div v-else-if=\"hasComments && done\" class=\"comments__info\">\n\t\t\t\t{{ t('comments', 'No more messages') }}\n\t\t\t</div>\n\n\t\t\t<!-- Error message -->\n\t\t\t<template v-else-if=\"error\">\n\t\t\t\t<NcEmptyContent class=\"comments__error\" :name=\"error\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlertCircleOutlineIcon />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t\t<NcButton class=\"comments__retry\" @click=\"getComments\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<RefreshIcon />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ t('comments', 'Retry') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { showError } from '@nextcloud/dialogs'\nimport { translate as t } from '@nextcloud/l10n'\nimport { vElementVisibility as elementVisibility } from '@vueuse/components'\n\nimport NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport RefreshIcon from 'vue-material-design-icons/Refresh.vue'\nimport MessageReplyTextIcon from 'vue-material-design-icons/MessageReplyText.vue'\nimport AlertCircleOutlineIcon from 'vue-material-design-icons/AlertCircleOutline.vue'\n\nimport Comment from '../components/Comment.vue'\nimport CommentView from '../mixins/CommentView'\nimport cancelableRequest from '../utils/cancelableRequest.js'\nimport { getComments, DEFAULT_LIMIT } from '../services/GetComments.ts'\nimport { markCommentsAsRead } from '../services/ReadComments.ts'\n\nexport default {\n\tname: 'Comments',\n\n\tcomponents: {\n\t\tComment,\n\t\tNcEmptyContent,\n\t\tNcButton,\n\t\tRefreshIcon,\n\t\tMessageReplyTextIcon,\n\t\tAlertCircleOutlineIcon,\n\t},\n\n\tdirectives: {\n\t\telementVisibility,\n\t},\n\n\tmixins: [CommentView],\n\n\tdata() {\n\t\treturn {\n\t\t\terror: '',\n\t\t\tloading: false,\n\t\t\tdone: false,\n\n\t\t\tcurrentResourceId: this.resourceId,\n\t\t\toffset: 0,\n\t\t\tcomments: [],\n\n\t\t\tcancelRequest: () => {},\n\n\t\t\tComment,\n\t\t\tuserData: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasComments() {\n\t\t\treturn this.comments.length > 0\n\t\t},\n\t\tisFirstLoading() {\n\t\t\treturn this.loading && this.offset === 0\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceId() {\n\t\t\tthis.currentResourceId = this.resourceId\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tasync onVisibilityChange(isVisible) {\n\t\t\tif (isVisible) {\n\t\t\t\ttry {\n\t\t\t\t\tawait markCommentsAsRead(this.resourceType, this.currentResourceId, new Date())\n\t\t\t\t} catch (e) {\n\t\t\t\t\tshowError(e.message || t('comments', 'Failed to mark comments as read'))\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update current resourceId and fetch new data\n\t\t *\n\t\t * @param {number} resourceId the current resourceId (fileId...)\n\t\t */\n\t\tasync update(resourceId) {\n\t\t\tthis.currentResourceId = resourceId\n\t\t\tthis.resetState()\n\t\t\tthis.getComments()\n\t\t},\n\n\t\t/**\n\t\t * Ran when the bottom of the tab is reached\n\t\t */\n\t\tonScrollBottomReached() {\n\t\t\t/**\n\t\t\t * Do not fetch more if we:\n\t\t\t * - are showing an error\n\t\t\t * - already fetched everything\n\t\t\t * - are currently loading\n\t\t\t */\n\t\t\tif (this.error || this.done || this.loading) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.getComments()\n\t\t},\n\n\t\t/**\n\t\t * Get the existing shares infos\n\t\t */\n\t\tasync getComments() {\n\t\t\t// Cancel any ongoing request\n\t\t\tthis.cancelRequest('cancel')\n\n\t\t\ttry {\n\t\t\t\tthis.loading = true\n\t\t\t\tthis.error = ''\n\n\t\t\t\t// Init cancellable request\n\t\t\t\tconst { request, abort } = cancelableRequest(getComments)\n\t\t\t\tthis.cancelRequest = abort\n\n\t\t\t\t// Fetch comments\n\t\t\t\tconst { data: comments } = await request({\n\t\t\t\t\tresourceType: this.resourceType,\n\t\t\t\t\tresourceId: this.currentResourceId,\n\t\t\t\t}, { offset: this.offset }) || { data: [] }\n\n\t\t\t\tthis.logger.debug(`Processed ${comments.length} comments`, { comments })\n\n\t\t\t\t// We received less than the requested amount,\n\t\t\t\t// we're done fetching comments\n\t\t\t\tif (comments.length < DEFAULT_LIMIT) {\n\t\t\t\t\tthis.done = true\n\t\t\t\t}\n\n\t\t\t\t// Insert results\n\t\t\t\tthis.comments.push(...comments)\n\n\t\t\t\t// Increase offset for next fetch\n\t\t\t\tthis.offset += DEFAULT_LIMIT\n\t\t\t} catch (error) {\n\t\t\t\tif (error.message === 'cancel') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.error = t('comments', 'Unable to load the comments list')\n\t\t\t\tconsole.error('Error loading the comments list', error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add newly created comment to the list\n\t\t *\n\t\t * @param {object} comment the new comment\n\t\t */\n\t\tonNewComment(comment) {\n\t\t\tthis.comments.unshift(comment)\n\t\t},\n\n\t\t/**\n\t\t * Remove deleted comment from the list\n\t\t *\n\t\t * @param {number} id the deleted comment\n\t\t */\n\t\tonDelete(id) {\n\t\t\tconst index = this.comments.findIndex(comment => comment.props.id === id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.comments.splice(index, 1)\n\t\t\t} else {\n\t\t\t\tconsole.error('Could not find the deleted comment in the list', id)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Reset the current view to its default state\n\t\t */\n\t\tresetState() {\n\t\t\tthis.error = ''\n\t\t\tthis.loading = false\n\t\t\tthis.done = false\n\t\t\tthis.offset = 0\n\t\t\tthis.comments = []\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport client from './DavClient.js';\n/**\n * Mark comments older than the date timestamp as read\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param date the date object\n */\nexport const markCommentsAsRead = (resourceType, resourceId, date) => {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const readMarker = date.toUTCString();\n return client.customRequest(resourcePath, {\n method: 'PROPPATCH',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:readMarker>${readMarker}</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`,\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Creates a cancelable axios 'request object'.\n *\n * @param {Function} request the axios promise request\n * @return {object}\n */\nconst cancelableRequest = function(request) {\n\tconst controller = new AbortController()\n\tconst signal = controller.signal\n\n\t/**\n\t * Execute the request\n\t *\n\t * @param {string} url the url to send the request to\n\t * @param {object} [options] optional config for the request\n\t */\n\tconst fetch = async function(url, options) {\n\t\tconst response = await request(\n\t\t\turl,\n\t\t\tObject.assign({ signal }, options),\n\t\t)\n\t\treturn response\n\t}\n\n\treturn {\n\t\trequest: fetch,\n\t\tabort: () => controller.abort(),\n\t}\n}\n\nexport default cancelableRequest\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comments.vue?vue&type=template&id=e6750fda&scoped=true\"\nimport script from \"./Comments.vue?vue&type=script&lang=js\"\nexport * from \"./Comments.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e6750fda\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"element-visibility\",rawName:\"v-element-visibility\",value:(_vm.onVisibilityChange),expression:\"onVisibilityChange\"}],staticClass:\"comments\",class:{ 'icon-loading': _vm.isFirstLoading }},[_c('Comment',_vm._b({staticClass:\"comments__writer\",attrs:{\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"editor\":true,\"user-data\":_vm.userData,\"resource-id\":_vm.currentResourceId},on:{\"new\":_vm.onNewComment}},'Comment',_vm.editorData,false)),_vm._v(\" \"),(!_vm.isFirstLoading)?[(!_vm.hasComments && _vm.done)?_c('NcEmptyContent',{staticClass:\"comments__empty\",attrs:{\"name\":_vm.t('comments', 'No comments yet, start the conversation!')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('MessageReplyTextIcon')]},proxy:true}],null,false,1033639148)}):_c('ul',_vm._l((_vm.comments),function(comment){return _c('Comment',_vm._b({key:comment.props.id,staticClass:\"comments__list\",attrs:{\"tag\":\"li\",\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"message\":comment.props.message,\"resource-id\":_vm.currentResourceId,\"user-data\":_vm.genMentionsData(comment.props.mentions)},on:{\"update:message\":function($event){return _vm.$set(comment.props, \"message\", $event)},\"delete\":_vm.onDelete}},'Comment',comment.props,false))}),1),_vm._v(\" \"),(_vm.loading && !_vm.isFirstLoading)?_c('div',{staticClass:\"comments__info icon-loading\"}):(_vm.hasComments && _vm.done)?_c('div',{staticClass:\"comments__info\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('comments', 'No more messages'))+\"\\n\\t\\t\")]):(_vm.error)?[_c('NcEmptyContent',{staticClass:\"comments__error\",attrs:{\"name\":_vm.error},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('AlertCircleOutlineIcon')]},proxy:true}],null,false,66050004)}),_vm._v(\" \"),_c('NcButton',{staticClass:\"comments__retry\",on:{\"click\":_vm.getComments},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('RefreshIcon')]},proxy:true}],null,false,3924573781)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Retry'))+\"\\n\\t\\t\\t\")])]:_vm._e()]:_vm._e()],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { t, n } from '@nextcloud/l10n'\nimport { PiniaVuePlugin, createPinia } from 'pinia'\nimport Vue from 'vue'\nimport CommentsApp from '../views/Comments.vue'\nimport logger from '../logger.js'\n\nVue.use(PiniaVuePlugin)\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = getCSPNonce()\n\n// Add translates functions\nVue.mixin({\n\tdata() {\n\t\treturn {\n\t\t\tlogger,\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\nexport default class CommentInstance {\n\n\t/**\n\t * Initialize a new Comments instance for the desired type\n\t *\n\t * @param {string} resourceType the comments endpoint type\n\t * @param {object} options the vue options (propsData, parent, el...)\n\t */\n\tconstructor(resourceType = 'files', options = {}) {\n\t\tconst pinia = createPinia()\n\n\t\t// Merge options and set `resourceType` property\n\t\toptions = {\n\t\t\t...options,\n\t\t\tpropsData: {\n\t\t\t\t...(options.propsData ?? {}),\n\t\t\t\tresourceType,\n\t\t\t},\n\t\t\tpinia,\n\t\t}\n\t\t// Init Comments component\n\t\tconst View = Vue.extend(CommentsApp)\n\t\treturn new View(options)\n\t}\n\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport CommentsInstance from './services/CommentsInstance.js'\n\n// Init Comments\nif (window.OCA && !window.OCA.Comments) {\n\tObject.assign(window.OCA, { Comments: {} })\n}\n\n// Init Comments App view\nObject.assign(window.OCA.Comments, { View: CommentsInstance })\nconsole.debug('OCA.Comments.View initialized')\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-16499043]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-16499043]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-16499043]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-16499043]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-16499043]{margin-inline-start:10px !important}.comment__author[data-v-16499043]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-16499043],.comment__timestamp[data-v-16499043]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-16499043]{position:relative}.comment__editor-description[data-v-16499043]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-16499043]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-16499043]{white-space:pre-wrap;word-break:break-word;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-16499043]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-16499043]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,qBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: break-word;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c4d4943f2c00c1f8a515\",\"4508\":\"c556959b637fb7a30be4\",\"5258\":\"3c88a2c4e4c6df0084c1\",\"5862\":\"142cd48ca8ec32e57725\",\"6408\":\"d68d596cc661db69d9eb\",\"7432\":\"bf453467840969b202ee\",\"9279\":\"460048c8db22e016b900\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 7062;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t7062: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(49060)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","___CSS_LOADER_EXPORT___","push","module","id","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","getRootPath","generateRemoteUrl","decodeHtmlEntities","value","passes","arguments","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","client","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","useDeletedCommentLimbo","defineStore","state","idsInLimbo","actions","addId","removeId","index","indexOf","splice","checkForId","includes","getLoggerBuilder","setApp","detectUser","build","message","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","methods","onEdit","onEditCancel","updateLocalMessage","onEditComment","async","commentId","commentPath","join","customRequest","Object","assign","method","EditComment","logger","debug","error","showError","t","console","onDeleteWithUndo","deletedCommentLimboStore","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","deleteFile","DeleteComment","onNewComment","newComment","resourcePath","response","axios","post","actorDisplayName","getCurrentUser","displayName","actorId","uid","actorType","creationDateTime","Date","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","NewComment","localMessage","components","IconArrowRight","IconClose","IconDelete","IconEdit","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","editor","Boolean","autoComplete","Function","userData","tag","expanded","submitted","isOwnComment","richContent","mentions","keys","forEach","user","key","regex","RegExp","replace","component","NcUserBubble","label","primary","isEmptyMessage","trim","timestamp","parse","isLimbo","watch","beforeMount","toString","onSubmit","$nextTick","$refs","$el","focus","onExpand","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","directives","rawName","expression","class","scopedSlots","_u","fn","proxy","preventDefault","ref","defineComponent","editorData","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","getComments","_ref","datetime","toISOString","offset","responseData","text","result","parseXML","getDirectoryFiles","processResponsePayload","isDetailed","multistatus","responseItems","map","item","propstat","prop","prepareFileFromProps","Comment","NcEmptyContent","RefreshIcon","MessageReplyTextIcon","AlertCircleOutlineIcon","elementVisibility","CommentView","done","currentResourceId","comments","cancelRequest","hasComments","isFirstLoading","onVisibilityChange","isVisible","markCommentsAsRead","date","readMarker","e","update","resetState","onScrollBottomReached","request","abort","controller","AbortController","signal","url","cancelableRequest","unshift","findIndex","_l","$set","Vue","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","mixin","n","window","OCA","Comments","View","constructor","pinia","createPinia","propsData","extend","CommentsApp","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","every","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","f","chunkId","Promise","all","reduce","promises","u","g","globalThis","obj","prototype","hasOwnProperty","l","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","doneFns","parentNode","removeChild","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"file":"comments-comments-app.js?v=c772a4b602dd4d6a9252","mappings":"UAAIA,ECAAC,EACAC,E,mFCEAC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,kUAAmU,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oDAAoD,MAAQ,GAAG,SAAW,wHAAwH,eAAiB,CAAC,uTAAuT,WAAa,MAE/5B,S,2HCaA,MCpB0G,EDoB1G,CACEC,KAAM,cACNC,MAAO,CAAC,SACRC,MAAO,CACLC,MAAO,CACLC,KAAMC,QAERC,UAAW,CACTF,KAAMC,OACNE,QAAS,gBAEXC,KAAM,CACJJ,KAAMK,OACNF,QAAS,M,eEff,SAXgB,OACd,GCRW,WAAkB,IAAIG,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,OAAOF,EAAII,GAAG,CAACC,YAAY,oCAAoCC,MAAM,CAAC,cAAcN,EAAIP,MAAQ,KAAO,OAAO,aAAaO,EAAIP,MAAM,KAAO,OAAOc,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOR,EAAIS,MAAM,QAASD,EAAO,IAAI,OAAOR,E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A,KAA4B,uBAAK,GAC1Fc,EAAmBjO,QAAQ4N,EAAqB7B,KAAK,KAAM,IAC3DkC,EAAmBjY,KAAO4X,EAAqB7B,KAAK,KAAMkC,EAAmBjY,KAAK+V,KAAKkC,G,KCvFvF7F,EAAoBgD,QAAKlT,ECGzB,IAAIgW,EAAsB9F,EAAoBQ,OAAE1Q,EAAW,CAAC,OAAO,IAAOkQ,EAAoB,SAC9F8F,EAAsB9F,EAAoBQ,EAAEsF,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=script&lang=js","webpack://nextcloud/./node_modules/vue-material-design-icons/Refresh.vue?0940","webpack:///nextcloud/node_modules/vue-material-design-icons/Refresh.vue?vue&type=template&id=2864f909","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyText.vue?vue&type=script&lang=js","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyText.vue","webpack://nextcloud/./node_modules/vue-material-design-icons/MessageReplyText.vue?2121","webpack:///nextcloud/node_modules/vue-material-design-icons/MessageReplyText.vue?vue&type=template&id=92c64d6a","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/utils/decodeHtmlEntities.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/store/deletedCommentLimbo.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/apps/comments/src/mixins/CommentMixin.js","webpack:///nextcloud/apps/comments/src/services/EditComment.js","webpack:///nextcloud/apps/comments/src/services/DeleteComment.js","webpack:///nextcloud/apps/comments/src/services/NewComment.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/components/Comment.vue","webpack://nextcloud/./apps/comments/src/components/Comment.vue?192b","webpack://nextcloud/./apps/comments/src/components/Comment.vue?7f26","webpack://nextcloud/./apps/comments/src/components/Comment.vue?d1f7","webpack:///nextcloud/apps/comments/src/mixins/CommentView.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/views/Comments.vue?vue&type=script&lang=js","webpack:///nextcloud/apps/comments/src/views/Comments.vue","webpack:///nextcloud/apps/comments/src/services/ReadComments.ts","webpack:///nextcloud/apps/comments/src/utils/cancelableRequest.js","webpack://nextcloud/./apps/comments/src/views/Comments.vue?6659","webpack://nextcloud/./apps/comments/src/views/Comments.vue?f45b","webpack://nextcloud/./apps/comments/src/views/Comments.vue?0e41","webpack:///nextcloud/apps/comments/src/services/CommentsInstance.js","webpack:///nextcloud/apps/comments/src/comments-app.js","webpack:///nextcloud/apps/comments/src/components/Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comments[data-v-e6750fda]{min-height:100%;display:flex;flex-direction:column}.comments__empty[data-v-e6750fda],.comments__error[data-v-e6750fda]{flex:1 0}.comments__retry[data-v-e6750fda]{margin:0 auto}.comments__info[data-v-e6750fda]{height:60px;color:var(--color-text-maxcontrast);text-align:center;line-height:60px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/views/Comments.vue\"],\"names\":[],\"mappings\":\"AACA,2BACC,eAAA,CACA,YAAA,CACA,qBAAA,CAEA,oEAEC,QAAA,CAGD,kCACC,aAAA,CAGD,iCACC,WAAA,CACA,mCAAA,CACA,iBAAA,CACA,gBAAA\",\"sourcesContent\":[\"\\n.comments {\\n\\tmin-height: 100%;\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\n\\t&__empty,\\n\\t&__error {\\n\\t\\tflex: 1 0;\\n\\t}\\n\\n\\t&__retry {\\n\\t\\tmargin: 0 auto;\\n\\t}\\n\\n\\t&__info {\\n\\t\\theight: 60px;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\ttext-align: center;\\n\\t\\tline-height: 60px;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon refresh-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=\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"RefreshIcon\",\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>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Refresh.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Refresh.vue?vue&type=template&id=2864f909\"\nimport script from \"./Refresh.vue?vue&type=script&lang=js\"\nexport * from \"./Refresh.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon refresh-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyText.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./MessageReplyText.vue?vue&type=script&lang=js\"","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon message-reply-text-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=\"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"MessageReplyTextIcon\",\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>","import { render, staticRenderFns } from \"./MessageReplyText.vue?vue&type=template&id=92c64d6a\"\nimport script from \"./MessageReplyText.vue?vue&type=script&lang=js\"\nexport * from \"./MessageReplyText.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('span',_vm._b({staticClass:\"material-design-icon message-reply-text-icon\",attrs:{\"aria-hidden\":_vm.title ? null : 'true',\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst getRootPath = function() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * @param {any} value -\n * @param {any} passes -\n */\nexport function decodeHtmlEntities(value, passes = 1) {\n\tconst parser = new DOMParser()\n\tlet decoded = value\n\tfor (let i = 0; i < passes; i++) {\n\t\tdecoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent\n\t}\n\treturn decoded\n}\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\nconst setHeaders = (token) => {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { defineStore } from 'pinia'\n\nexport const useDeletedCommentLimbo = defineStore('deletedCommentLimbo', {\n\tstate: () => ({\n\t\tidsInLimbo: [],\n\t}),\n\tactions: {\n\t\taddId(id) {\n\t\t\tthis.idsInLimbo.push(id)\n\t\t},\n\n\t\tremoveId(id) {\n\t\t\tconst index = this.idsInLimbo.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.idsInLimbo.splice(index, 1)\n\t\t\t}\n\t\t},\n\n\t\tcheckForId(id) {\n\t\t\tthis.idsInLimbo.includes(id)\n\t\t},\n\t},\n})\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'\nimport NewComment from '../services/NewComment.js'\nimport DeleteComment from '../services/DeleteComment.js'\nimport EditComment from '../services/EditComment.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\nimport logger from '../logger.js'\n\nexport default {\n\tprops: {\n\t\tid: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tresourceId: {\n\t\t\ttype: [String, Number],\n\t\t\trequired: true,\n\t\t},\n\t\tresourceType: {\n\t\t\ttype: String,\n\t\t\tdefault: 'files',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tdeleted: false,\n\t\t\tediting: false,\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\t},\n\n\tmethods: {\n\t\t// EDITION\n\t\tonEdit() {\n\t\t\tthis.editing = true\n\t\t},\n\t\tonEditCancel() {\n\t\t\tthis.editing = false\n\t\t\t// Restore original value\n\t\t\tthis.updateLocalMessage(this.message)\n\t\t},\n\t\tasync onEditComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tawait EditComment(this.resourceType, this.resourceId, this.id, message)\n\t\t\t\tlogger.debug('Comment edited', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id, message })\n\t\t\t\tthis.$emit('update:message', message)\n\t\t\t\tthis.editing = false\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to edit the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t// DELETION\n\t\tonDeleteWithUndo() {\n\t\t\tthis.$emit('delete')\n\t\t\tthis.deleted = true\n\t\t\tthis.deletedCommentLimboStore.addId(this.id)\n\t\t\tconst timeOutDelete = setTimeout(this.onDelete, TOAST_UNDO_TIMEOUT)\n\t\t\tshowUndo(t('comments', 'Comment deleted'), () => {\n\t\t\t\tclearTimeout(timeOutDelete)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t})\n\t\t},\n\t\tasync onDelete() {\n\t\t\ttry {\n\t\t\t\tawait DeleteComment(this.resourceType, this.resourceId, this.id)\n\t\t\t\tlogger.debug('Comment deleted', { resourceType: this.resourceType, resourceId: this.resourceId, id: this.id })\n\t\t\t\tthis.$emit('delete', this.id)\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to delete the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t\tthis.deleted = false\n\t\t\t\tthis.deletedCommentLimboStore.removeId(this.id)\n\t\t\t}\n\t\t},\n\n\t\t// CREATION\n\t\tasync onNewComment(message) {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst newComment = await NewComment(this.resourceType, this.resourceId, message)\n\t\t\t\tlogger.debug('New comment posted', { resourceType: this.resourceType, resourceId: this.resourceId, newComment })\n\t\t\t\tthis.$emit('new', newComment)\n\n\t\t\t\t// Clear old content\n\t\t\t\tthis.$emit('update:message', '')\n\t\t\t\tthis.localMessage = ''\n\t\t\t} catch (error) {\n\t\t\t\tshowError(t('comments', 'An error occurred while trying to create the comment'))\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Edit an existing comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n * @param {string} message the message content\n */\nexport default async function(resourceType, resourceId, commentId, message) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\treturn await client.customRequest(commentPath, Object.assign({\n\t\tmethod: 'PROPPATCH',\n\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${message}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`,\n\t}))\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport client from './DavClient.js'\n\n/**\n * Delete a comment\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {number} commentId the comment iD\n */\nexport default async function(resourceType, resourceId, commentId) {\n\tconst commentPath = ['', resourceType, resourceId, commentId].join('/')\n\n\t// Fetch newly created comment data\n\tawait client.deleteFile(commentPath)\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { decodeHtmlEntities } from '../utils/decodeHtmlEntities.js'\nimport axios from '@nextcloud/axios'\nimport client from './DavClient.js'\n\n/**\n * Retrieve the comments list\n *\n * @param {string} resourceType the resource type\n * @param {number} resourceId the resource ID\n * @param {string} message the message\n * @return {object} the new comment\n */\nexport default async function(resourceType, resourceId, message) {\n\tconst resourcePath = ['', resourceType, resourceId].join('/')\n\n\tconst response = await axios.post(getRootPath() + resourcePath, {\n\t\tactorDisplayName: getCurrentUser().displayName,\n\t\tactorId: getCurrentUser().uid,\n\t\tactorType: 'users',\n\t\tcreationDateTime: (new Date()).toUTCString(),\n\t\tmessage,\n\t\tobjectType: resourceType,\n\t\tverb: 'comment',\n\t})\n\n\t// Retrieve comment id from resource location\n\tconst commentId = parseInt(response.headers['content-location'].split('/').pop())\n\tconst commentPath = resourcePath + '/' + commentId\n\n\t// Fetch newly created comment data\n\tconst comment = await client.stat(commentPath, {\n\t\tdetails: true,\n\t})\n\n\tconst props = comment.data.props\n\t// Decode twice to handle potentially double-encoded entities\n\t// FIXME Remove this once https://github.com/nextcloud/server/issues/29306\n\t// is resolved\n\tprops.actorDisplayName = decodeHtmlEntities(props.actorDisplayName, 2)\n\tprops.message = decodeHtmlEntities(props.message, 2)\n\n\treturn comment.data\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=script&lang=js\"","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n<template>\n\t<component :is=\"tag\"\n\t\tv-show=\"!deleted && !isLimbo\"\n\t\t:class=\"{'comment--loading': loading}\"\n\t\tclass=\"comment\">\n\t\t<!-- Comment header toolbar -->\n\t\t<div class=\"comment__side\">\n\t\t\t<!-- Author -->\n\t\t\t<NcAvatar class=\"comment__avatar\"\n\t\t\t\t:display-name=\"actorDisplayName\"\n\t\t\t\t:user=\"actorId\"\n\t\t\t\t:size=\"32\" />\n\t\t</div>\n\t\t<div class=\"comment__body\">\n\t\t\t<div class=\"comment__header\">\n\t\t\t\t<span class=\"comment__author\">{{ actorDisplayName }}</span>\n\n\t\t\t\t<!-- Comment actions,\n\t\t\t\t\tshow if we have a message id and current user is author -->\n\t\t\t\t<NcActions v-if=\"isOwnComment && id && !loading\" class=\"comment__actions\">\n\t\t\t\t\t<template v-if=\"!editing\">\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onEdit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconEdit :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Edit comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionSeparator />\n\t\t\t\t\t\t<NcActionButton close-after-click\n\t\t\t\t\t\t\t@click=\"onDeleteWithUndo\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconDelete :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ t('comments', 'Delete comment') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<NcActionButton v-else @click=\"onEditCancel\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('comments', 'Cancel edit') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\n\t\t\t\t<!-- Show loading if we're editing or deleting, not on new ones -->\n\t\t\t\t<div v-if=\"id && loading\" class=\"comment_loading icon-loading-small\" />\n\n\t\t\t\t<!-- Relative time to the comment creation -->\n\t\t\t\t<NcDateTime v-else-if=\"creationDateTime\"\n\t\t\t\t\tclass=\"comment__timestamp\"\n\t\t\t\t\t:timestamp=\"timestamp\"\n\t\t\t\t\t:ignore-seconds=\"true\" />\n\t\t\t</div>\n\n\t\t\t<!-- Message editor -->\n\t\t\t<form v-if=\"editor || editing\" class=\"comment__editor\" @submit.prevent>\n\t\t\t\t<div class=\"comment__editor-group\">\n\t\t\t\t\t<NcRichContenteditable ref=\"editor\"\n\t\t\t\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t\t\t\t:contenteditable=\"!loading\"\n\t\t\t\t\t\t:label=\"editor ? t('comments', 'New comment') : t('comments', 'Edit comment')\"\n\t\t\t\t\t\t:placeholder=\"t('comments', 'Write a comment …')\"\n\t\t\t\t\t\t:value=\"localMessage\"\n\t\t\t\t\t\t:user-data=\"userData\"\n\t\t\t\t\t\taria-describedby=\"tab-comments__editor-description\"\n\t\t\t\t\t\t@update:value=\"updateLocalMessage\"\n\t\t\t\t\t\t@submit=\"onSubmit\" />\n\t\t\t\t\t<div class=\"comment__submit\">\n\t\t\t\t\t\t<NcButton type=\"tertiary-no-background\"\n\t\t\t\t\t\t\tnative-type=\"submit\"\n\t\t\t\t\t\t\t:aria-label=\"t('comments', 'Post comment')\"\n\t\t\t\t\t\t\t:disabled=\"isEmptyMessage\"\n\t\t\t\t\t\t\t@click=\"onSubmit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t\t\t<IconArrowRight v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"tab-comments__editor-description\" class=\"comment__editor-description\">\n\t\t\t\t\t{{ t('comments', '@ for mentions, : for emoji, / for smart picker') }}\n\t\t\t\t</div>\n\t\t\t</form>\n\n\t\t\t<!-- Message content -->\n\t\t\t<NcRichText v-else\n\t\t\t\tclass=\"comment__message\"\n\t\t\t\t:class=\"{'comment__message--expanded': expanded}\"\n\t\t\t\t:text=\"richContent.message\"\n\t\t\t\t:arguments=\"richContent.mentions\"\n\t\t\t\t@click=\"onExpand\" />\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport NcActions from '@nextcloud/vue/components/NcActions'\nimport NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'\nimport NcAvatar from '@nextcloud/vue/components/NcAvatar'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcDateTime from '@nextcloud/vue/components/NcDateTime'\nimport NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'\nimport NcUserBubble from '@nextcloud/vue/components/NcUserBubble'\n\nimport IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport IconClose from 'vue-material-design-icons/Close.vue'\nimport IconDelete from 'vue-material-design-icons/Delete.vue'\nimport IconEdit from 'vue-material-design-icons/Pencil.vue'\n\nimport CommentMixin from '../mixins/CommentMixin.js'\nimport { mapStores } from 'pinia'\nimport { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'\n\n// Dynamic loading\nconst NcRichContenteditable = () => import('@nextcloud/vue/components/NcRichContenteditable')\nconst NcRichText = () => import('@nextcloud/vue/components/NcRichText')\n\nexport default {\n\tname: 'Comment',\n\n\tcomponents: {\n\t\tIconArrowRight,\n\t\tIconClose,\n\t\tIconDelete,\n\t\tIconEdit,\n\t\tNcActionButton,\n\t\tNcActions,\n\t\tNcActionSeparator,\n\t\tNcAvatar,\n\t\tNcButton,\n\t\tNcDateTime,\n\t\tNcLoadingIcon,\n\t\tNcRichContenteditable,\n\t\tNcRichText,\n\t},\n\tmixins: [CommentMixin],\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tactorDisplayName: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactorId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tcreationDateTime: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Force the editor display\n\t\t */\n\t\teditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Provide the autocompletion data\n\t\t */\n\t\tautoComplete: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\t\tuserData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\ttag: {\n\t\t\ttype: String,\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\texpanded: false,\n\t\t\t// Only change data locally and update the original\n\t\t\t// parent data when the request is sent and resolved\n\t\t\tlocalMessage: '',\n\t\t\tsubmitted: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t...mapStores(useDeletedCommentLimbo),\n\n\t\t/**\n\t\t * Is the current user the author of this comment\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisOwnComment() {\n\t\t\treturn getCurrentUser().uid === this.actorId\n\t\t},\n\n\t\trichContent() {\n\t\t\tconst mentions = {}\n\t\t\tlet message = this.localMessage\n\n\t\t\tObject.keys(this.userData).forEach((user, index) => {\n\t\t\t\tconst key = `mention-${index}`\n\t\t\t\tconst regex = new RegExp(`@${user}|@\"${user}\"`, 'g')\n\t\t\t\tmessage = message.replace(regex, `{${key}}`)\n\t\t\t\tmentions[key] = {\n\t\t\t\t\tcomponent: NcUserBubble,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tuser,\n\t\t\t\t\t\tdisplayName: this.userData[user].label,\n\t\t\t\t\t\tprimary: this.userData[user].primary,\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn { mentions, message }\n\t\t},\n\n\t\tisEmptyMessage() {\n\t\t\treturn !this.localMessage || this.localMessage.trim() === ''\n\t\t},\n\n\t\t/**\n\t\t * Timestamp of the creation time (in ms UNIX time)\n\t\t */\n\t\ttimestamp() {\n\t\t\treturn Date.parse(this.creationDateTime)\n\t\t},\n\n\t\tisLimbo() {\n\t\t\treturn this.deletedCommentLimboStore.checkForId(this.id)\n\t\t},\n\t},\n\n\twatch: {\n\t\t// If the data change, update the local value\n\t\tmessage(message) {\n\t\t\tthis.updateLocalMessage(message)\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// Init localMessage\n\t\tthis.updateLocalMessage(this.message)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Update local Message on outer change\n\t\t *\n\t\t * @param {string} message the message to set\n\t\t */\n\t\tupdateLocalMessage(message) {\n\t\t\tthis.localMessage = message.toString()\n\t\t\tthis.submitted = false\n\t\t},\n\n\t\t/**\n\t\t * Dispatch message between edit and create\n\t\t */\n\t\tonSubmit() {\n\t\t\t// Do not submit if message is empty\n\t\t\tif (this.localMessage.trim() === '') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.editor) {\n\t\t\t\tthis.onNewComment(this.localMessage.trim())\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t// Focus the editor again\n\t\t\t\t\tthis.$refs.editor.$el.focus()\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.onEditComment(this.localMessage.trim())\n\t\t},\n\n\t\tonExpand() {\n\t\t\tthis.expanded = true\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use \"sass:math\";\n\n$comment-padding: 10px;\n\n.comment {\n\tdisplay: flex;\n\tgap: 8px;\n\tpadding: 5px $comment-padding;\n\n\t&__side {\n\t\tdisplay: flex;\n\t\talign-items: flex-start;\n\t\tpadding-top: 6px;\n\t}\n\n\t&__body {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\tflex-direction: column;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tmin-height: 44px;\n\t}\n\n\t&__actions {\n\t\tmargin-inline-start: $comment-padding !important;\n\t}\n\n\t&__author {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&_loading,\n\t&__timestamp {\n\t\tmargin-inline-start: auto;\n\t\ttext-align: end;\n\t\twhite-space: nowrap;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__editor-group {\n\t\tposition: relative;\n\t}\n\n\t&__editor-description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\tpadding-block: var(--default-grid-baseline);\n\t}\n\n\t&__submit {\n\t\tposition: absolute !important;\n\t\tbottom: 5px;\n\t\tinset-inline-end: 0;\n\t}\n\n\t&__message {\n\t\twhite-space: pre-wrap;\n\t\tword-break: normal;\n\t\tmax-height: 70px;\n\t\toverflow: hidden;\n\t\tmargin-top: -6px;\n\t\t&--expanded {\n\t\t\tmax-height: none;\n\t\t\toverflow: visible;\n\t\t}\n\t}\n}\n\n.rich-contenteditable__input {\n\tmin-height: 44px;\n\tmargin: 0;\n\tpadding: $comment-padding;\n}\n\n</style>\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comment.vue?vue&type=template&id=434d3ed4&scoped=true\"\nimport script from \"./Comment.vue?vue&type=script&lang=js\"\nexport * from \"./Comment.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comment.vue?vue&type=style&index=0&id=434d3ed4&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"434d3ed4\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c(_vm.tag,{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.deleted && !_vm.isLimbo),expression:\"!deleted && !isLimbo\"}],tag:\"component\",staticClass:\"comment\",class:{'comment--loading': _vm.loading}},[_c('div',{staticClass:\"comment__side\"},[_c('NcAvatar',{staticClass:\"comment__avatar\",attrs:{\"display-name\":_vm.actorDisplayName,\"user\":_vm.actorId,\"size\":32}})],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__body\"},[_c('div',{staticClass:\"comment__header\"},[_c('span',{staticClass:\"comment__author\"},[_vm._v(_vm._s(_vm.actorDisplayName))]),_vm._v(\" \"),(_vm.isOwnComment && _vm.id && !_vm.loading)?_c('NcActions',{staticClass:\"comment__actions\"},[(!_vm.editing)?[_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onEdit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconEdit',{attrs:{\"size\":20}})]},proxy:true}],null,false,649782975)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Edit comment'))+\"\\n\\t\\t\\t\\t\\t\")]),_vm._v(\" \"),_c('NcActionSeparator'),_vm._v(\" \"),_c('NcActionButton',{attrs:{\"close-after-click\":\"\"},on:{\"click\":_vm.onDeleteWithUndo},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconDelete',{attrs:{\"size\":20}})]},proxy:true}],null,false,881161434)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Delete comment'))+\"\\n\\t\\t\\t\\t\\t\")])]:_c('NcActionButton',{on:{\"click\":_vm.onEditCancel},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('IconClose',{attrs:{\"size\":20}})]},proxy:true}],null,false,2888946197)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Cancel edit'))+\"\\n\\t\\t\\t\\t\")])],2):_vm._e(),_vm._v(\" \"),(_vm.id && _vm.loading)?_c('div',{staticClass:\"comment_loading icon-loading-small\"}):(_vm.creationDateTime)?_c('NcDateTime',{staticClass:\"comment__timestamp\",attrs:{\"timestamp\":_vm.timestamp,\"ignore-seconds\":true}}):_vm._e()],1),_vm._v(\" \"),(_vm.editor || _vm.editing)?_c('form',{staticClass:\"comment__editor\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('div',{staticClass:\"comment__editor-group\"},[_c('NcRichContenteditable',{ref:\"editor\",attrs:{\"auto-complete\":_vm.autoComplete,\"contenteditable\":!_vm.loading,\"label\":_vm.editor ? _vm.t('comments', 'New comment') : _vm.t('comments', 'Edit comment'),\"placeholder\":_vm.t('comments', 'Write a comment …'),\"value\":_vm.localMessage,\"user-data\":_vm.userData,\"aria-describedby\":\"tab-comments__editor-description\"},on:{\"update:value\":_vm.updateLocalMessage,\"submit\":_vm.onSubmit}}),_vm._v(\" \"),_c('div',{staticClass:\"comment__submit\"},[_c('NcButton',{attrs:{\"type\":\"tertiary-no-background\",\"native-type\":\"submit\",\"aria-label\":_vm.t('comments', 'Post comment'),\"disabled\":_vm.isEmptyMessage},on:{\"click\":_vm.onSubmit},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('NcLoadingIcon'):_c('IconArrowRight',{attrs:{\"size\":20}})]},proxy:true}],null,false,758946661)})],1)],1),_vm._v(\" \"),_c('div',{staticClass:\"comment__editor-description\",attrs:{\"id\":\"tab-comments__editor-description\"}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', '@ for mentions, : for emoji, / for smart picker'))+\"\\n\\t\\t\\t\")])]):_c('NcRichText',{staticClass:\"comment__message\",class:{'comment__message--expanded': _vm.expanded},attrs:{\"text\":_vm.richContent.message,\"arguments\":_vm.richContent.mentions},on:{\"click\":_vm.onExpand}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { loadState } from '@nextcloud/initial-state';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { defineComponent } from 'vue';\nexport default defineComponent({\n props: {\n resourceId: {\n type: Number,\n required: true,\n },\n resourceType: {\n type: String,\n default: 'files',\n },\n },\n data() {\n return {\n editorData: {\n actorDisplayName: getCurrentUser().displayName,\n actorId: getCurrentUser().uid,\n key: 'editor',\n },\n userData: {},\n };\n },\n methods: {\n /**\n * Autocomplete @mentions\n *\n * @param {string} search the query\n * @param {Function} callback the callback to process the results with\n */\n async autoComplete(search, callback) {\n const { data } = await axios.get(generateOcsUrl('core/autocomplete/get'), {\n params: {\n search,\n itemType: 'files',\n itemId: this.resourceId,\n sorter: 'commenters|share-recipients',\n limit: loadState('comments', 'maxAutoCompleteResults'),\n },\n });\n // Save user data so it can be used by the editor to replace mentions\n data.ocs.data.forEach(user => { this.userData[user.id] = user; });\n return callback(Object.values(this.userData));\n },\n /**\n * Make sure we have all mentions as Array of objects\n *\n * @param mentions the mentions list\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n genMentionsData(mentions) {\n Object.values(mentions)\n .flat()\n .forEach(mention => {\n this.userData[mention.mentionId] = {\n // TODO: support groups\n icon: 'icon-user',\n id: mention.mentionId,\n label: mention.mentionDisplayName,\n source: 'users',\n primary: getCurrentUser()?.uid === mention.mentionId,\n };\n });\n return this.userData;\n },\n },\n});\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\n// https://github.com/perry-mitchell/webdav-client/issues/339\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param {object} data destructuring object\n * @param {string} data.resourceType the resource type\n * @param {number} data.resourceId the resource ID\n * @param {object} [options] optional options for axios\n * @param {number} [options.offset] the pagination offset\n * @param {number} [options.limit] the pagination limit, defaults to 20\n * @param {Date} [options.datetime] optional date to query\n * @return {{data: object[]}} the comments list\n */\nexport const getComments = async function ({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `<oc:datetime>${options.datetime.toISOString()}</oc:datetime>` : '';\n const response = await client.customRequest(resourcePath, Object.assign({\n method: 'REPORT',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<oc:limit>${options.limit ?? DEFAULT_LIMIT}</oc:limit>\n\t\t\t\t<oc:offset>${options.offset || 0}</oc:offset>\n\t\t\t\t${datetime}\n\t\t\t</oc:filter-comments>`,\n }, options));\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n return processResponsePayload(response, stat, true);\n};\n// https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\nconst getDirectoryFiles = function (result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map(item => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n};\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=script&lang=js\"","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div v-element-visibility=\"onVisibilityChange\"\n\t\tclass=\"comments\"\n\t\t:class=\"{ 'icon-loading': isFirstLoading }\">\n\t\t<!-- Editor -->\n\t\t<Comment v-bind=\"editorData\"\n\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t:resource-type=\"resourceType\"\n\t\t\t:editor=\"true\"\n\t\t\t:user-data=\"userData\"\n\t\t\t:resource-id=\"currentResourceId\"\n\t\t\tclass=\"comments__writer\"\n\t\t\t@new=\"onNewComment\" />\n\n\t\t<template v-if=\"!isFirstLoading\">\n\t\t\t<NcEmptyContent v-if=\"!hasComments && done\"\n\t\t\t\tclass=\"comments__empty\"\n\t\t\t\t:name=\"t('comments', 'No comments yet, start the conversation!')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<MessageReplyTextIcon />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t\t<ul v-else>\n\t\t\t\t<!-- Comments -->\n\t\t\t\t<Comment v-for=\"comment in comments\"\n\t\t\t\t\t:key=\"comment.props.id\"\n\t\t\t\t\ttag=\"li\"\n\t\t\t\t\tv-bind=\"comment.props\"\n\t\t\t\t\t:auto-complete=\"autoComplete\"\n\t\t\t\t\t:resource-type=\"resourceType\"\n\t\t\t\t\t:message.sync=\"comment.props.message\"\n\t\t\t\t\t:resource-id=\"currentResourceId\"\n\t\t\t\t\t:user-data=\"genMentionsData(comment.props.mentions)\"\n\t\t\t\t\tclass=\"comments__list\"\n\t\t\t\t\t@delete=\"onDelete\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Loading more message -->\n\t\t\t<div v-if=\"loading && !isFirstLoading\" class=\"comments__info icon-loading\" />\n\n\t\t\t<div v-else-if=\"hasComments && done\" class=\"comments__info\">\n\t\t\t\t{{ t('comments', 'No more messages') }}\n\t\t\t</div>\n\n\t\t\t<!-- Error message -->\n\t\t\t<template v-else-if=\"error\">\n\t\t\t\t<NcEmptyContent class=\"comments__error\" :name=\"error\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlertCircleOutlineIcon />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t\t<NcButton class=\"comments__retry\" @click=\"getComments\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<RefreshIcon />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ t('comments', 'Retry') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { showError } from '@nextcloud/dialogs'\nimport { translate as t } from '@nextcloud/l10n'\nimport { vElementVisibility as elementVisibility } from '@vueuse/components'\n\nimport NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport RefreshIcon from 'vue-material-design-icons/Refresh.vue'\nimport MessageReplyTextIcon from 'vue-material-design-icons/MessageReplyText.vue'\nimport AlertCircleOutlineIcon from 'vue-material-design-icons/AlertCircleOutline.vue'\n\nimport Comment from '../components/Comment.vue'\nimport CommentView from '../mixins/CommentView'\nimport cancelableRequest from '../utils/cancelableRequest.js'\nimport { getComments, DEFAULT_LIMIT } from '../services/GetComments.ts'\nimport { markCommentsAsRead } from '../services/ReadComments.ts'\n\nexport default {\n\tname: 'Comments',\n\n\tcomponents: {\n\t\tComment,\n\t\tNcEmptyContent,\n\t\tNcButton,\n\t\tRefreshIcon,\n\t\tMessageReplyTextIcon,\n\t\tAlertCircleOutlineIcon,\n\t},\n\n\tdirectives: {\n\t\telementVisibility,\n\t},\n\n\tmixins: [CommentView],\n\n\tdata() {\n\t\treturn {\n\t\t\terror: '',\n\t\t\tloading: false,\n\t\t\tdone: false,\n\n\t\t\tcurrentResourceId: this.resourceId,\n\t\t\toffset: 0,\n\t\t\tcomments: [],\n\n\t\t\tcancelRequest: () => {},\n\n\t\t\tComment,\n\t\t\tuserData: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasComments() {\n\t\t\treturn this.comments.length > 0\n\t\t},\n\t\tisFirstLoading() {\n\t\t\treturn this.loading && this.offset === 0\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceId() {\n\t\t\tthis.currentResourceId = this.resourceId\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tasync onVisibilityChange(isVisible) {\n\t\t\tif (isVisible) {\n\t\t\t\ttry {\n\t\t\t\t\tawait markCommentsAsRead(this.resourceType, this.currentResourceId, new Date())\n\t\t\t\t} catch (e) {\n\t\t\t\t\tshowError(e.message || t('comments', 'Failed to mark comments as read'))\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update current resourceId and fetch new data\n\t\t *\n\t\t * @param {number} resourceId the current resourceId (fileId...)\n\t\t */\n\t\tasync update(resourceId) {\n\t\t\tthis.currentResourceId = resourceId\n\t\t\tthis.resetState()\n\t\t\tthis.getComments()\n\t\t},\n\n\t\t/**\n\t\t * Ran when the bottom of the tab is reached\n\t\t */\n\t\tonScrollBottomReached() {\n\t\t\t/**\n\t\t\t * Do not fetch more if we:\n\t\t\t * - are showing an error\n\t\t\t * - already fetched everything\n\t\t\t * - are currently loading\n\t\t\t */\n\t\t\tif (this.error || this.done || this.loading) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.getComments()\n\t\t},\n\n\t\t/**\n\t\t * Get the existing shares infos\n\t\t */\n\t\tasync getComments() {\n\t\t\t// Cancel any ongoing request\n\t\t\tthis.cancelRequest('cancel')\n\n\t\t\ttry {\n\t\t\t\tthis.loading = true\n\t\t\t\tthis.error = ''\n\n\t\t\t\t// Init cancellable request\n\t\t\t\tconst { request, abort } = cancelableRequest(getComments)\n\t\t\t\tthis.cancelRequest = abort\n\n\t\t\t\t// Fetch comments\n\t\t\t\tconst { data: comments } = await request({\n\t\t\t\t\tresourceType: this.resourceType,\n\t\t\t\t\tresourceId: this.currentResourceId,\n\t\t\t\t}, { offset: this.offset }) || { data: [] }\n\n\t\t\t\tthis.logger.debug(`Processed ${comments.length} comments`, { comments })\n\n\t\t\t\t// We received less than the requested amount,\n\t\t\t\t// we're done fetching comments\n\t\t\t\tif (comments.length < DEFAULT_LIMIT) {\n\t\t\t\t\tthis.done = true\n\t\t\t\t}\n\n\t\t\t\t// Insert results\n\t\t\t\tthis.comments.push(...comments)\n\n\t\t\t\t// Increase offset for next fetch\n\t\t\t\tthis.offset += DEFAULT_LIMIT\n\t\t\t} catch (error) {\n\t\t\t\tif (error.message === 'cancel') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.error = t('comments', 'Unable to load the comments list')\n\t\t\t\tconsole.error('Error loading the comments list', error)\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add newly created comment to the list\n\t\t *\n\t\t * @param {object} comment the new comment\n\t\t */\n\t\tonNewComment(comment) {\n\t\t\tthis.comments.unshift(comment)\n\t\t},\n\n\t\t/**\n\t\t * Remove deleted comment from the list\n\t\t *\n\t\t * @param {number} id the deleted comment\n\t\t */\n\t\tonDelete(id) {\n\t\t\tconst index = this.comments.findIndex(comment => comment.props.id === id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.comments.splice(index, 1)\n\t\t\t} else {\n\t\t\t\tconsole.error('Could not find the deleted comment in the list', id)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Reset the current view to its default state\n\t\t */\n\t\tresetState() {\n\t\t\tthis.error = ''\n\t\t\tthis.loading = false\n\t\t\tthis.done = false\n\t\t\tthis.offset = 0\n\t\t\tthis.comments = []\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.comments {\n\tmin-height: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__empty,\n\t&__error {\n\t\tflex: 1 0;\n\t}\n\n\t&__retry {\n\t\tmargin: 0 auto;\n\t}\n\n\t&__info {\n\t\theight: 60px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\tline-height: 60px;\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport client from './DavClient.js';\n/**\n * Mark comments older than the date timestamp as read\n *\n * @param resourceType the resource type\n * @param resourceId the resource ID\n * @param date the date object\n */\nexport const markCommentsAsRead = (resourceType, resourceId, date) => {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const readMarker = date.toUTCString();\n return client.customRequest(resourcePath, {\n method: 'PROPPATCH',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:readMarker>${readMarker}</oc:readMarker>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`,\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * Creates a cancelable axios 'request object'.\n *\n * @param {Function} request the axios promise request\n * @return {object}\n */\nconst cancelableRequest = function(request) {\n\tconst controller = new AbortController()\n\tconst signal = controller.signal\n\n\t/**\n\t * Execute the request\n\t *\n\t * @param {string} url the url to send the request to\n\t * @param {object} [options] optional config for the request\n\t */\n\tconst fetch = async function(url, options) {\n\t\tconst response = await request(\n\t\t\turl,\n\t\t\tObject.assign({ signal }, options),\n\t\t)\n\t\treturn response\n\t}\n\n\treturn {\n\t\trequest: fetch,\n\t\tabort: () => controller.abort(),\n\t}\n}\n\nexport default cancelableRequest\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/sass-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Comments.vue?vue&type=template&id=e6750fda&scoped=true\"\nimport script from \"./Comments.vue?vue&type=script&lang=js\"\nexport * from \"./Comments.vue?vue&type=script&lang=js\"\nimport style0 from \"./Comments.vue?vue&type=style&index=0&id=e6750fda&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"e6750fda\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{directives:[{name:\"element-visibility\",rawName:\"v-element-visibility\",value:(_vm.onVisibilityChange),expression:\"onVisibilityChange\"}],staticClass:\"comments\",class:{ 'icon-loading': _vm.isFirstLoading }},[_c('Comment',_vm._b({staticClass:\"comments__writer\",attrs:{\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"editor\":true,\"user-data\":_vm.userData,\"resource-id\":_vm.currentResourceId},on:{\"new\":_vm.onNewComment}},'Comment',_vm.editorData,false)),_vm._v(\" \"),(!_vm.isFirstLoading)?[(!_vm.hasComments && _vm.done)?_c('NcEmptyContent',{staticClass:\"comments__empty\",attrs:{\"name\":_vm.t('comments', 'No comments yet, start the conversation!')},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('MessageReplyTextIcon')]},proxy:true}],null,false,1033639148)}):_c('ul',_vm._l((_vm.comments),function(comment){return _c('Comment',_vm._b({key:comment.props.id,staticClass:\"comments__list\",attrs:{\"tag\":\"li\",\"auto-complete\":_vm.autoComplete,\"resource-type\":_vm.resourceType,\"message\":comment.props.message,\"resource-id\":_vm.currentResourceId,\"user-data\":_vm.genMentionsData(comment.props.mentions)},on:{\"update:message\":function($event){return _vm.$set(comment.props, \"message\", $event)},\"delete\":_vm.onDelete}},'Comment',comment.props,false))}),1),_vm._v(\" \"),(_vm.loading && !_vm.isFirstLoading)?_c('div',{staticClass:\"comments__info icon-loading\"}):(_vm.hasComments && _vm.done)?_c('div',{staticClass:\"comments__info\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('comments', 'No more messages'))+\"\\n\\t\\t\")]):(_vm.error)?[_c('NcEmptyContent',{staticClass:\"comments__error\",attrs:{\"name\":_vm.error},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('AlertCircleOutlineIcon')]},proxy:true}],null,false,66050004)}),_vm._v(\" \"),_c('NcButton',{staticClass:\"comments__retry\",on:{\"click\":_vm.getComments},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('RefreshIcon')]},proxy:true}],null,false,3924573781)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('comments', 'Retry'))+\"\\n\\t\\t\\t\")])]:_vm._e()]:_vm._e()],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { t, n } from '@nextcloud/l10n'\nimport { PiniaVuePlugin, createPinia } from 'pinia'\nimport Vue from 'vue'\nimport CommentsApp from '../views/Comments.vue'\nimport logger from '../logger.js'\n\nVue.use(PiniaVuePlugin)\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = getCSPNonce()\n\n// Add translates functions\nVue.mixin({\n\tdata() {\n\t\treturn {\n\t\t\tlogger,\n\t\t}\n\t},\n\tmethods: {\n\t\tt,\n\t\tn,\n\t},\n})\n\nexport default class CommentInstance {\n\n\t/**\n\t * Initialize a new Comments instance for the desired type\n\t *\n\t * @param {string} resourceType the comments endpoint type\n\t * @param {object} options the vue options (propsData, parent, el...)\n\t */\n\tconstructor(resourceType = 'files', options = {}) {\n\t\tconst pinia = createPinia()\n\n\t\t// Merge options and set `resourceType` property\n\t\toptions = {\n\t\t\t...options,\n\t\t\tpropsData: {\n\t\t\t\t...(options.propsData ?? {}),\n\t\t\t\tresourceType,\n\t\t\t},\n\t\t\tpinia,\n\t\t}\n\t\t// Init Comments component\n\t\tconst View = Vue.extend(CommentsApp)\n\t\treturn new View(options)\n\t}\n\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport CommentsInstance from './services/CommentsInstance.js'\n\n// Init Comments\nif (window.OCA && !window.OCA.Comments) {\n\tObject.assign(window.OCA, { Comments: {} })\n}\n\n// Init Comments App view\nObject.assign(window.OCA.Comments, { View: CommentsInstance })\nconsole.debug('OCA.Comments.View initialized')\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.comment[data-v-434d3ed4]{display:flex;gap:8px;padding:5px 10px}.comment__side[data-v-434d3ed4]{display:flex;align-items:flex-start;padding-top:6px}.comment__body[data-v-434d3ed4]{display:flex;flex-grow:1;flex-direction:column}.comment__header[data-v-434d3ed4]{display:flex;align-items:center;min-height:44px}.comment__actions[data-v-434d3ed4]{margin-inline-start:10px !important}.comment__author[data-v-434d3ed4]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-maxcontrast)}.comment_loading[data-v-434d3ed4],.comment__timestamp[data-v-434d3ed4]{margin-inline-start:auto;text-align:end;white-space:nowrap;color:var(--color-text-maxcontrast)}.comment__editor-group[data-v-434d3ed4]{position:relative}.comment__editor-description[data-v-434d3ed4]{color:var(--color-text-maxcontrast);padding-block:var(--default-grid-baseline)}.comment__submit[data-v-434d3ed4]{position:absolute !important;bottom:5px;inset-inline-end:0}.comment__message[data-v-434d3ed4]{white-space:pre-wrap;word-break:normal;max-height:70px;overflow:hidden;margin-top:-6px}.comment__message--expanded[data-v-434d3ed4]{max-height:none;overflow:visible}.rich-contenteditable__input[data-v-434d3ed4]{min-height:44px;margin:0;padding:10px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/comments/src/components/Comment.vue\"],\"names\":[],\"mappings\":\"AAKA,0BACC,YAAA,CACA,OAAA,CACA,gBAAA,CAEA,gCACC,YAAA,CACA,sBAAA,CACA,eAAA,CAGD,gCACC,YAAA,CACA,WAAA,CACA,qBAAA,CAGD,kCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAGD,mCACC,mCAAA,CAGD,kCACC,eAAA,CACA,kBAAA,CACA,sBAAA,CACA,mCAAA,CAGD,uEAEC,wBAAA,CACA,cAAA,CACA,kBAAA,CACA,mCAAA,CAGD,wCACC,iBAAA,CAGD,8CACC,mCAAA,CACA,0CAAA,CAGD,kCACC,4BAAA,CACA,UAAA,CACA,kBAAA,CAGD,mCACC,oBAAA,CACA,iBAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,6CACC,eAAA,CACA,gBAAA,CAKH,8CACC,eAAA,CACA,QAAA,CACA,YA3EiB\",\"sourcesContent\":[\"\\n@use \\\"sass:math\\\";\\n\\n$comment-padding: 10px;\\n\\n.comment {\\n\\tdisplay: flex;\\n\\tgap: 8px;\\n\\tpadding: 5px $comment-padding;\\n\\n\\t&__side {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: flex-start;\\n\\t\\tpadding-top: 6px;\\n\\t}\\n\\n\\t&__body {\\n\\t\\tdisplay: flex;\\n\\t\\tflex-grow: 1;\\n\\t\\tflex-direction: column;\\n\\t}\\n\\n\\t&__header {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tmin-height: 44px;\\n\\t}\\n\\n\\t&__actions {\\n\\t\\tmargin-inline-start: $comment-padding !important;\\n\\t}\\n\\n\\t&__author {\\n\\t\\toverflow: hidden;\\n\\t\\twhite-space: nowrap;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&_loading,\\n\\t&__timestamp {\\n\\t\\tmargin-inline-start: auto;\\n\\t\\ttext-align: end;\\n\\t\\twhite-space: nowrap;\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t}\\n\\n\\t&__editor-group {\\n\\t\\tposition: relative;\\n\\t}\\n\\n\\t&__editor-description {\\n\\t\\tcolor: var(--color-text-maxcontrast);\\n\\t\\tpadding-block: var(--default-grid-baseline);\\n\\t}\\n\\n\\t&__submit {\\n\\t\\tposition: absolute !important;\\n\\t\\tbottom: 5px;\\n\\t\\tinset-inline-end: 0;\\n\\t}\\n\\n\\t&__message {\\n\\t\\twhite-space: pre-wrap;\\n\\t\\tword-break: normal;\\n\\t\\tmax-height: 70px;\\n\\t\\toverflow: hidden;\\n\\t\\tmargin-top: -6px;\\n\\t\\t&--expanded {\\n\\t\\t\\tmax-height: none;\\n\\t\\t\\toverflow: visible;\\n\\t\\t}\\n\\t}\\n}\\n\\n.rich-contenteditable__input {\\n\\tmin-height: 44px;\\n\\tmargin: 0;\\n\\tpadding: $comment-padding;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c4d4943f2c00c1f8a515\",\"4508\":\"c556959b637fb7a30be4\",\"5258\":\"3c88a2c4e4c6df0084c1\",\"5862\":\"142cd48ca8ec32e57725\",\"6408\":\"d68d596cc661db69d9eb\",\"7432\":\"bf453467840969b202ee\",\"9279\":\"460048c8db22e016b900\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 7062;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t7062: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(22042)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","___CSS_LOADER_EXPORT___","push","module","id","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","getRootPath","generateRemoteUrl","decodeHtmlEntities","value","passes","arguments","length","undefined","parser","DOMParser","decoded","i","parseFromString","documentElement","textContent","client","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","useDeletedCommentLimbo","defineStore","state","idsInLimbo","actions","addId","removeId","index","indexOf","splice","checkForId","includes","getLoggerBuilder","setApp","detectUser","build","message","resourceId","required","resourceType","data","deleted","editing","loading","computed","mapStores","methods","onEdit","onEditCancel","updateLocalMessage","onEditComment","async","commentId","commentPath","join","customRequest","Object","assign","method","EditComment","logger","debug","error","showError","t","console","onDeleteWithUndo","deletedCommentLimboStore","timeOutDelete","setTimeout","onDelete","TOAST_UNDO_TIMEOUT","showUndo","clearTimeout","deleteFile","DeleteComment","onNewComment","newComment","resourcePath","response","axios","post","actorDisplayName","getCurrentUser","displayName","actorId","uid","actorType","creationDateTime","Date","toUTCString","objectType","verb","parseInt","headers","split","pop","comment","stat","details","NewComment","localMessage","components","IconArrowRight","IconClose","IconDelete","IconEdit","NcActionButton","NcActions","NcActionSeparator","NcAvatar","NcButton","NcDateTime","NcLoadingIcon","NcRichContenteditable","NcRichText","mixins","CommentMixin","inheritAttrs","editor","Boolean","autoComplete","Function","userData","tag","expanded","submitted","isOwnComment","richContent","mentions","keys","forEach","user","key","regex","RegExp","replace","component","NcUserBubble","label","primary","isEmptyMessage","trim","timestamp","parse","isLimbo","watch","beforeMount","toString","onSubmit","$nextTick","$refs","$el","focus","onExpand","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","directives","rawName","expression","class","scopedSlots","_u","fn","proxy","preventDefault","ref","defineComponent","editorData","search","callback","get","generateOcsUrl","params","itemType","itemId","sorter","limit","loadState","ocs","values","genMentionsData","flat","mention","mentionId","icon","mentionDisplayName","source","getComments","_ref","datetime","toISOString","offset","responseData","text","result","parseXML","getDirectoryFiles","processResponsePayload","isDetailed","multistatus","responseItems","map","item","propstat","prop","prepareFileFromProps","Comment","NcEmptyContent","RefreshIcon","MessageReplyTextIcon","AlertCircleOutlineIcon","elementVisibility","CommentView","done","currentResourceId","comments","cancelRequest","hasComments","isFirstLoading","onVisibilityChange","isVisible","markCommentsAsRead","date","readMarker","e","update","resetState","onScrollBottomReached","request","abort","controller","AbortController","signal","url","cancelableRequest","unshift","findIndex","_l","$set","Vue","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","mixin","n","window","OCA","Comments","View","constructor","pinia","createPinia","propsData","extend","CommentsApp","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","every","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","f","chunkId","Promise","all","reduce","promises","u","g","globalThis","obj","prototype","hasOwnProperty","l","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","doneFns","parentNode","removeChild","bind","target","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file diff --git a/dist/comments-comments-tab.js b/dist/comments-comments-tab.js index d4dd4957fe6..f4e4eaad87f 100644 --- a/dist/comments-comments-tab.js +++ b/dist/comments-comments-tab.js @@ -1,2 +1,2 @@ -(()=>{var e,o,n,r={1836:(e,o,n)=>{"use strict";var r=n(21777),i=n(32981),a=n(51651),s=n(85471),c=n(96689),d=n(60669),l=n(54290),u=n(90176),m=n(35550);var f=n(65899);let p,b;function v(){window.OCA.Activity.registerSidebarAction({mount:async(e,t)=>{let{context:o,fileInfo:r,reload:i}=t;const a=(0,f.Ey)();if(!p){const{default:e}=await Promise.all([n.e(4208),n.e(7462),n.e(8057)]).then(n.bind(n,98057));p=s.Ay.extend(e)}b=new p({el:e,parent:o,pinia:a,propsData:{reloadCallback:i,resourceId:r.id}}),c.A.info("Comments plugin mounted in Activity sidebar action",{fileInfo:r})},unmount:()=>{b&&b.$destroy()}}),window.OCA.Activity.registerSidebarEntries((async e=>{let{fileInfo:t,limit:o,offset:r}=e;const{data:i}=await async function(e,t){let{resourceType:o,resourceId:n}=e;const r=["",o,n].join("/"),i=t.datetime?`<oc:datetime>${t.datetime.toISOString()}</oc:datetime>`:"",a=await m.A.customRequest(r,Object.assign({method:"REPORT",data:`<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>${t.limit??20}</oc:limit>\n\t\t\t\t<oc:offset>${t.offset||0}</oc:offset>\n\t\t\t\t${i}\n\t\t\t</oc:filter-comments>`},t)),s=await a.text(),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:o}}=e;return o.map((e=>{const o=e.propstat.prop;return(0,u.ch)(o,o.id.toString(),t)}))}(await(0,d.h4)(s),!0);return(0,l.hq)(a,c,!0)}({resourceType:"files",resourceId:t.id},{limit:o,offset:r});c.A.debug("Loaded comments",{fileInfo:t,comments:i});const{default:f}=await Promise.all([n.e(4208),n.e(7462),n.e(3920)]).then(n.bind(n,93920)),p=s.Ay.extend(f);return i.map((e=>({_CommentsViewInstance:void 0,timestamp:(0,a.A)(e.props?.creationDateTime).toDate().getTime(),mount(o,n){let{context:r,reload:i}=n;this._CommentsViewInstance=new p({el:o,parent:r,propsData:{comment:e,resourceId:t.id,reloadCallback:i}})},unmount(){this._CommentsViewInstance?.$destroy()}})))})),window.OCA.Activity.registerSidebarFilter((e=>"comments"!==e.type)),c.A.info("Comments plugin registered for Activity sidebar action")}if(s.Ay.use(f.R2),n.nc=(0,r.aV)(),(0,i.C)("comments","activityEnabled",!1)&&void 0!==OCA?.Activity?.registerSidebarAction)window.addEventListener("DOMContentLoaded",(function(){v()}));else{let e=null;const o=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-message-reply-text" viewBox="0 0 24 24"><path d="M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z" /></svg>',async mount(t,o,n){e&&e.$destroy(),e=new OCA.Comments.View("files",{parent:n,propsData:{resourceId:o.id}}),await e.update(o.id),e.$mount(t)},update(t){e.update(t.id)},destroy(){e.$destroy(),e=null},scrollBottomReached(){e.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",(function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(o)}))}},17003:(e,t,o)=>{"use strict";o.d(t,{e:()=>r});var n=o(63814);const r=function(){return(0,n.dC)("dav/comments")}},35550:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(60669),r=o(17003),i=o(21777);const a=(0,n.UU)((0,r.e)()),s=e=>{a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};(0,i.zo)(s),s((0,i.do)());const c=a},42634:()=>{},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},96689:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=(0,o(35947).YK)().setApp("comments").detectUser().build()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=r,e=[],a.O=(t,o,n,r)=>{if(!o){var i=1/0;for(l=0;l<e.length;l++){o=e[l][0],n=e[l][1],r=e[l][2];for(var s=!0,c=0;c<o.length;c++)(!1&r||i>=r)&&Object.keys(a.O).every((e=>a.O[e](o[c])))?o.splice(c--,1):(s=!1,r<i&&(i=r));if(s){e.splice(l--,1);var d=n();void 0!==d&&(t=d)}}return t}r=r||0;for(var l=e.length;l>0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[o,n,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,o)=>(a.f[o](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{640:"c4d4943f2c00c1f8a515",3920:"156103e97e6acaa3e5c9",4508:"c556959b637fb7a30be4",5258:"3c88a2c4e4c6df0084c1",5862:"142cd48ca8ec32e57725",6408:"d68d596cc661db69d9eb",7432:"bf453467840969b202ee",7462:"98f94269bdbec2386555",8057:"2c8f7e35c56e047ba73f",9279:"460048c8db22e016b900"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="nextcloud:",a.l=(e,t,r,i)=>{if(o[e])o[e].push(t);else{var s,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var u=d[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+r){s=u;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",n+r),s.src=e),o[e]=[t];var m=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=2122,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={2122:0};a.f.j=(t,o)=>{var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise(((o,r)=>n=e[t]=[o,r]));o.push(n[2]=r);var i=a.p+a.u(t),s=new Error;a.l(i,(o=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,o)=>{var n,r,i=o[0],s=o[1],c=o[2],d=0;if(i.some((t=>0!==e[t]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(c)var l=c(a)}for(t&&t(o);d<i.length;d++)r=i[d],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(l)},o=self.webpackChunknextcloud=self.webpackChunknextcloud||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),a.nc=void 0;var s=a.O(void 0,[4208],(()=>a(1836)));s=a.O(s)})(); -//# sourceMappingURL=comments-comments-tab.js.map?v=e83fed6cfa39cad93b20
\ No newline at end of file +(()=>{var e,o,n,r={1836:(e,o,n)=>{"use strict";var r=n(21777),i=n(32981),a=n(51651),s=n(85471),c=n(96689),d=n(60669),l=n(54290),u=n(90176),m=n(35550);var f=n(65899);let p,b;function v(){window.OCA.Activity.registerSidebarAction({mount:async(e,t)=>{let{context:o,fileInfo:r,reload:i}=t;const a=(0,f.Ey)();if(!p){const{default:e}=await Promise.all([n.e(4208),n.e(7462),n.e(8057)]).then(n.bind(n,98057));p=s.Ay.extend(e)}b=new p({el:e,parent:o,pinia:a,propsData:{reloadCallback:i,resourceId:r.id}}),c.A.info("Comments plugin mounted in Activity sidebar action",{fileInfo:r})},unmount:()=>{b&&b.$destroy()}}),window.OCA.Activity.registerSidebarEntries((async e=>{let{fileInfo:t,limit:o,offset:r}=e;const{data:i}=await async function(e,t){let{resourceType:o,resourceId:n}=e;const r=["",o,n].join("/"),i=t.datetime?`<oc:datetime>${t.datetime.toISOString()}</oc:datetime>`:"",a=await m.A.customRequest(r,Object.assign({method:"REPORT",data:`<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>${t.limit??20}</oc:limit>\n\t\t\t\t<oc:offset>${t.offset||0}</oc:offset>\n\t\t\t\t${i}\n\t\t\t</oc:filter-comments>`},t)),s=await a.text(),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{multistatus:{response:o}}=e;return o.map((e=>{const o=e.propstat.prop;return(0,u.ch)(o,o.id.toString(),t)}))}(await(0,d.h4)(s),!0);return(0,l.hq)(a,c,!0)}({resourceType:"files",resourceId:t.id},{limit:o,offset:r});c.A.debug("Loaded comments",{fileInfo:t,comments:i});const{default:f}=await Promise.all([n.e(4208),n.e(7462),n.e(3920)]).then(n.bind(n,93920)),p=s.Ay.extend(f);return i.map((e=>({_CommentsViewInstance:void 0,timestamp:(0,a.A)(e.props?.creationDateTime).toDate().getTime(),mount(o,n){let{context:r,reload:i}=n;this._CommentsViewInstance=new p({el:o,parent:r,propsData:{comment:e,resourceId:t.id,reloadCallback:i}})},unmount(){this._CommentsViewInstance?.$destroy()}})))})),window.OCA.Activity.registerSidebarFilter((e=>"comments"!==e.type)),c.A.info("Comments plugin registered for Activity sidebar action")}if(s.Ay.use(f.R2),n.nc=(0,r.aV)(),(0,i.C)("comments","activityEnabled",!1)&&void 0!==OCA?.Activity?.registerSidebarAction)window.addEventListener("DOMContentLoaded",(function(){v()}));else{let e=null;const o=new OCA.Files.Sidebar.Tab({id:"comments",name:t("comments","Comments"),iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-message-reply-text" viewBox="0 0 24 24"><path d="M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z" /></svg>',async mount(t,o,n){e&&e.$destroy(),e=new OCA.Comments.View("files",{parent:n,propsData:{resourceId:o.id}}),await e.update(o.id),e.$mount(t)},update(t){e.update(t.id)},destroy(){e.$destroy(),e=null},scrollBottomReached(){e.onScrollBottomReached()}});window.addEventListener("DOMContentLoaded",(function(){OCA.Files&&OCA.Files.Sidebar&&OCA.Files.Sidebar.registerTab(o)}))}},17003:(e,t,o)=>{"use strict";o.d(t,{e:()=>r});var n=o(63814);const r=function(){return(0,n.dC)("dav/comments")}},35550:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var n=o(60669),r=o(17003),i=o(21777);const a=(0,n.UU)((0,r.e)()),s=e=>{a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};(0,i.zo)(s),s((0,i.do)());const c=a},42634:()=>{},59169:()=>{},63779:()=>{},77199:()=>{},86833:()=>{},96689:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});const n=(0,o(35947).YK)().setApp("comments").detectUser().build()}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(o.exports,o,o.exports,a),o.loaded=!0,o.exports}a.m=r,e=[],a.O=(t,o,n,r)=>{if(!o){var i=1/0;for(l=0;l<e.length;l++){o=e[l][0],n=e[l][1],r=e[l][2];for(var s=!0,c=0;c<o.length;c++)(!1&r||i>=r)&&Object.keys(a.O).every((e=>a.O[e](o[c])))?o.splice(c--,1):(s=!1,r<i&&(i=r));if(s){e.splice(l--,1);var d=n();void 0!==d&&(t=d)}}return t}r=r||0;for(var l=e.length;l>0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[o,n,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,o)=>(a.f[o](e,t),t)),[])),a.u=e=>e+"-"+e+".js?v="+{640:"c4d4943f2c00c1f8a515",3920:"156103e97e6acaa3e5c9",4508:"c556959b637fb7a30be4",5258:"3c88a2c4e4c6df0084c1",5862:"142cd48ca8ec32e57725",6408:"d68d596cc661db69d9eb",7432:"bf453467840969b202ee",7462:"f1794da3f7db0f7bd37e",8057:"2c8f7e35c56e047ba73f",9279:"460048c8db22e016b900"}[e],a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},n="nextcloud:",a.l=(e,t,r,i)=>{if(o[e])o[e].push(t);else{var s,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var u=d[l];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+r){s=u;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",n+r),s.src=e),o[e]=[t];var m=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var r=o[e];if(delete o[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(n))),t)return t(n)},f=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=2122,(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b=document.baseURI||self.location.href;var e={2122:0};a.f.j=(t,o)=>{var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise(((o,r)=>n=e[t]=[o,r]));o.push(n[2]=r);var i=a.p+a.u(t),s=new Error;a.l(i,(o=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}}),"chunk-"+t,t)}},a.O.j=t=>0===e[t];var t=(t,o)=>{var n,r,i=o[0],s=o[1],c=o[2],d=0;if(i.some((t=>0!==e[t]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(c)var l=c(a)}for(t&&t(o);d<i.length;d++)r=i[d],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(l)},o=self.webpackChunknextcloud=self.webpackChunknextcloud||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),a.nc=void 0;var s=a.O(void 0,[4208],(()=>a(1836)));s=a.O(s)})(); +//# sourceMappingURL=comments-comments-tab.js.map?v=4761c0e17866eaa10e41
\ No newline at end of file diff --git a/dist/comments-comments-tab.js.map b/dist/comments-comments-tab.js.map index a722a9fec00..58d334d2176 100644 --- a/dist/comments-comments-tab.js.map +++ b/dist/comments-comments-tab.js.map @@ -1 +1 @@ -{"version":3,"file":"comments-comments-tab.js?v=e83fed6cfa39cad93b20","mappings":"UAAIA,ECAAC,EACAC,E,qJCSJ,IAAIC,EACAC,EAIG,SAASC,IACZC,OAAOC,IAAIC,SAASC,sBAAsB,CACtCC,MAAOC,MAAOC,EAAEC,K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6B,EAAEkF,EAAa9G,KACrCD,EAAoBQ,EAAEP,GAAY8G,EAAY9G,IAGhD,GAAG+G,EAAS,IAAIrL,EAASqL,EAAQhH,EAClC,CAEA,IADG8G,GAA4BA,EAA2BpM,GACrDqG,EAAIL,EAAS5E,OAAQiF,IACzBoB,EAAUzB,EAASK,GAChBf,EAAoB6B,EAAEsE,EAAiBhE,IAAYgE,EAAgBhE,IACrEgE,EAAgBhE,GAAS,KAE1BgE,EAAgBhE,GAAW,EAE5B,OAAOnC,EAAoBS,EAAE9E,EAAO,EAGjCuL,EAAqBjB,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FiB,EAAmBzC,QAAQoC,EAAqBlC,KAAK,KAAM,IAC3DuC,EAAmBhE,KAAO2D,EAAqBlC,KAAK,KAAMuC,EAAmBhE,KAAKyB,KAAKuC,G,KCvFvFlH,EAAoB6D,QAAK9H,ECGzB,IAAIoL,EAAsBnH,EAAoBS,OAAE1E,EAAW,CAAC,OAAO,IAAOiE,EAAoB,QAC9FmH,EAAsBnH,EAAoBS,EAAE0G,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/comments-activity-tab.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/comments-tab.js","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport moment from '@nextcloud/moment';\nimport Vue, {} from 'vue';\nimport logger from './logger.js';\nimport { getComments } from './services/GetComments.js';\nimport { PiniaVuePlugin, createPinia } from 'pinia';\nVue.use(PiniaVuePlugin);\nlet ActivityTabPluginView;\nlet ActivityTabPluginInstance;\n/**\n * Register the comments plugins for the Activity sidebar\n */\nexport function registerCommentsPlugins() {\n window.OCA.Activity.registerSidebarAction({\n mount: async (el, { context, fileInfo, reload }) => {\n const pinia = createPinia();\n if (!ActivityTabPluginView) {\n const { default: ActivityCommentAction } = await import('./views/ActivityCommentAction.vue');\n // @ts-expect-error Types are broken for Vue2\n ActivityTabPluginView = Vue.extend(ActivityCommentAction);\n }\n ActivityTabPluginInstance = new ActivityTabPluginView({\n el,\n parent: context,\n pinia,\n propsData: {\n reloadCallback: reload,\n resourceId: fileInfo.id,\n },\n });\n logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo });\n },\n unmount: () => {\n // destroy previous instance if available\n if (ActivityTabPluginInstance) {\n ActivityTabPluginInstance.$destroy();\n }\n },\n });\n window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {\n const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset });\n logger.debug('Loaded comments', { fileInfo, comments });\n const { default: CommentView } = await import('./views/ActivityCommentEntry.vue');\n // @ts-expect-error Types are broken for Vue2\n const CommentsViewObject = Vue.extend(CommentView);\n return comments.map((comment) => ({\n _CommentsViewInstance: undefined,\n timestamp: moment(comment.props?.creationDateTime).toDate().getTime(),\n mount(element, { context, reload }) {\n this._CommentsViewInstance = new CommentsViewObject({\n el: element,\n parent: context,\n propsData: {\n comment,\n resourceId: fileInfo.id,\n reloadCallback: reload,\n },\n });\n },\n unmount() {\n this._CommentsViewInstance?.$destroy();\n },\n }));\n });\n window.OCA.Activity.registerSidebarFilter((activity) => activity.type !== 'comments');\n logger.info('Comments plugin registered for Activity sidebar action');\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\n// https://github.com/perry-mitchell/webdav-client/issues/339\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param {object} data destructuring object\n * @param {string} data.resourceType the resource type\n * @param {number} data.resourceId the resource ID\n * @param {object} [options] optional options for axios\n * @param {number} [options.offset] the pagination offset\n * @param {number} [options.limit] the pagination limit, defaults to 20\n * @param {Date} [options.datetime] optional date to query\n * @return {{data: object[]}} the comments list\n */\nexport const getComments = async function ({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `<oc:datetime>${options.datetime.toISOString()}</oc:datetime>` : '';\n const response = await client.customRequest(resourcePath, Object.assign({\n method: 'REPORT',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<oc:limit>${options.limit ?? DEFAULT_LIMIT}</oc:limit>\n\t\t\t\t<oc:offset>${options.offset || 0}</oc:offset>\n\t\t\t\t${datetime}\n\t\t\t</oc:filter-comments>`,\n }, options));\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n return processResponsePayload(response, stat, true);\n};\n// https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\nconst getDirectoryFiles = function (result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map(item => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// eslint-disable-next-line n/no-missing-import, import/no-unresolved\nimport MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { registerCommentsPlugins } from './comments-activity-tab.ts'\n\n// @ts-expect-error __webpack_nonce__ is injected by webpack\n__webpack_nonce__ = getCSPNonce()\n\nif (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {\n\t// Do not mount own tab but mount into activity\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tregisterCommentsPlugins()\n\t})\n} else {\n\t// Init Comments tab component\n\tlet TabInstance = null\n\tconst commentTab = new OCA.Files.Sidebar.Tab({\n\t\tid: 'comments',\n\t\tname: t('comments', 'Comments'),\n\t\ticonSvg: MessageReplyText,\n\n\t\tasync mount(el, fileInfo, context) {\n\t\t\tif (TabInstance) {\n\t\t\t\tTabInstance.$destroy()\n\t\t\t}\n\t\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t\t// Better integration with vue parent component\n\t\t\t\tparent: context,\n\t\t\t\tpropsData: {\n\t\t\t\t\tresourceId: fileInfo.id,\n\t\t\t\t},\n\t\t\t})\n\t\t\t// Only mount after we have all the info we need\n\t\t\tawait TabInstance.update(fileInfo.id)\n\t\t\tTabInstance.$mount(el)\n\t\t},\n\t\tupdate(fileInfo) {\n\t\t\tTabInstance.update(fileInfo.id)\n\t\t},\n\t\tdestroy() {\n\t\t\tTabInstance.$destroy()\n\t\t\tTabInstance = null\n\t\t},\n\t\tscrollBottomReached() {\n\t\t\tTabInstance.onScrollBottomReached()\n\t\t},\n\t})\n\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t\t}\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst getRootPath = function() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\nconst setHeaders = (token) => {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c4d4943f2c00c1f8a515\",\"3920\":\"156103e97e6acaa3e5c9\",\"4508\":\"c556959b637fb7a30be4\",\"5258\":\"3c88a2c4e4c6df0084c1\",\"5862\":\"142cd48ca8ec32e57725\",\"6408\":\"d68d596cc661db69d9eb\",\"7432\":\"bf453467840969b202ee\",\"7462\":\"98f94269bdbec2386555\",\"8057\":\"2c8f7e35c56e047ba73f\",\"9279\":\"460048c8db22e016b900\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2122;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2122: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(1836)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","ActivityTabPluginView","ActivityTabPluginInstance","registerCommentsPlugins","window","OCA","Activity","registerSidebarAction","mount","async","el","_ref","context","fileInfo","reload","pinia","createPinia","default","ActivityCommentAction","Vue","extend","parent","propsData","reloadCallback","resourceId","id","logger","info","unmount","$destroy","registerSidebarEntries","limit","offset","_ref2","data","comments","options","resourceType","resourcePath","join","datetime","toISOString","response","client","customRequest","Object","assign","method","responseData","text","stat","result","isDetailed","arguments","length","undefined","multistatus","responseItems","map","item","props","propstat","prop","prepareFileFromProps","toString","getDirectoryFiles","parseXML","processResponsePayload","getComments","debug","CommentView","CommentsViewObject","comment","_CommentsViewInstance","timestamp","moment","creationDateTime","toDate","getTime","element","_ref3","this","registerSidebarFilter","activity","type","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","loadState","addEventListener","TabInstance","commentTab","Files","Sidebar","Tab","name","t","iconSvg","Comments","View","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","registerTab","getRootPath","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","getLoggerBuilder","setApp","detectUser","build","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","obj","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"file":"comments-comments-tab.js?v=4761c0e17866eaa10e41","mappings":"UAAIA,ECAAC,EACAC,E,qJCSJ,IAAIC,EACAC,EAIG,SAASC,IACZC,OAAOC,IAAIC,SAASC,sBAAsB,CACtCC,MAAOC,MAAOC,EAAEC,KAAoC,IAAlC,QAAEC,EAAO,SAAEC,EAAQ,OAAEC,GAAQH,EAC3C,MAAMI,GAAQC,EAAAA,EAAAA,MACd,IAAKf,EAAuB,CACxB,MAAQgB,QAASC,SAAgC,mEAEjDjB,EAAwBkB,EAAAA,GAAIC,OAAOF,EACvC,CACAhB,EAA4B,IAAID,EAAsB,CAClDS,KACAW,OAAQT,EACRG,QACAO,UAAW,CACPC,eAAgBT,EAChBU,WAAYX,EAASY,MAG7BC,EAAAA,EAAOC,KAAK,qDAAsD,CAAEd,YAAW,EAEnFe,QAASA,KAED1B,GACAA,EAA0B2B,UAC9B,IAGRzB,OAAOC,IAAIC,SAASwB,wBAAuBrB,UAAuC,IAAhC,SAAEI,EAAQ,MAAEkB,EAAK,OAAEC,GAAQC,EACzE,MAAQC,KAAMC,SCrBK1B,eAAAE,EAA8CyB,GAAS,IAAvC,aAAEC,EAAY,WAAEb,GAAYb,EACnE,MAAM2B,EAAe,CAAC,GAAID,EAAcb,GAAYe,KAAK,KACnDC,EAAWJ,EAAQI,SAAW,gBAAgBJ,EAAQI,SAASC,8BAAgC,GAC/FC,QAAiBC,EAAAA,E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loud/webpack/runtime/load script","webpack:///nextcloud/apps/comments/src/comments-activity-tab.ts","webpack:///nextcloud/apps/comments/src/services/GetComments.ts","webpack:///nextcloud/apps/comments/src/comments-tab.js","webpack:///nextcloud/apps/comments/src/utils/davUtils.js","webpack:///nextcloud/apps/comments/src/services/DavClient.js","webpack:///nextcloud/apps/comments/src/logger.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport moment from '@nextcloud/moment';\nimport Vue, {} from 'vue';\nimport logger from './logger.js';\nimport { getComments } from './services/GetComments.js';\nimport { PiniaVuePlugin, createPinia } from 'pinia';\nVue.use(PiniaVuePlugin);\nlet ActivityTabPluginView;\nlet ActivityTabPluginInstance;\n/**\n * Register the comments plugins for the Activity sidebar\n */\nexport function registerCommentsPlugins() {\n window.OCA.Activity.registerSidebarAction({\n mount: async (el, { context, fileInfo, reload }) => {\n const pinia = createPinia();\n if (!ActivityTabPluginView) {\n const { default: ActivityCommentAction } = await import('./views/ActivityCommentAction.vue');\n // @ts-expect-error Types are broken for Vue2\n ActivityTabPluginView = Vue.extend(ActivityCommentAction);\n }\n ActivityTabPluginInstance = new ActivityTabPluginView({\n el,\n parent: context,\n pinia,\n propsData: {\n reloadCallback: reload,\n resourceId: fileInfo.id,\n },\n });\n logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo });\n },\n unmount: () => {\n // destroy previous instance if available\n if (ActivityTabPluginInstance) {\n ActivityTabPluginInstance.$destroy();\n }\n },\n });\n window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {\n const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset });\n logger.debug('Loaded comments', { fileInfo, comments });\n const { default: CommentView } = await import('./views/ActivityCommentEntry.vue');\n // @ts-expect-error Types are broken for Vue2\n const CommentsViewObject = Vue.extend(CommentView);\n return comments.map((comment) => ({\n _CommentsViewInstance: undefined,\n timestamp: moment(comment.props?.creationDateTime).toDate().getTime(),\n mount(element, { context, reload }) {\n this._CommentsViewInstance = new CommentsViewObject({\n el: element,\n parent: context,\n propsData: {\n comment,\n resourceId: fileInfo.id,\n reloadCallback: reload,\n },\n });\n },\n unmount() {\n this._CommentsViewInstance?.$destroy();\n },\n }));\n });\n window.OCA.Activity.registerSidebarFilter((activity) => activity.type !== 'comments');\n logger.info('Comments plugin registered for Activity sidebar action');\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { parseXML } from 'webdav';\n// https://github.com/perry-mitchell/webdav-client/issues/339\nimport { processResponsePayload } from 'webdav/dist/node/response.js';\nimport { prepareFileFromProps } from 'webdav/dist/node/tools/dav.js';\nimport client from './DavClient.js';\nexport const DEFAULT_LIMIT = 20;\n/**\n * Retrieve the comments list\n *\n * @param {object} data destructuring object\n * @param {string} data.resourceType the resource type\n * @param {number} data.resourceId the resource ID\n * @param {object} [options] optional options for axios\n * @param {number} [options.offset] the pagination offset\n * @param {number} [options.limit] the pagination limit, defaults to 20\n * @param {Date} [options.datetime] optional date to query\n * @return {{data: object[]}} the comments list\n */\nexport const getComments = async function ({ resourceType, resourceId }, options) {\n const resourcePath = ['', resourceType, resourceId].join('/');\n const datetime = options.datetime ? `<oc:datetime>${options.datetime.toISOString()}</oc:datetime>` : '';\n const response = await client.customRequest(resourcePath, Object.assign({\n method: 'REPORT',\n data: `<?xml version=\"1.0\"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<oc:limit>${options.limit ?? DEFAULT_LIMIT}</oc:limit>\n\t\t\t\t<oc:offset>${options.offset || 0}</oc:offset>\n\t\t\t\t${datetime}\n\t\t\t</oc:filter-comments>`,\n }, options));\n const responseData = await response.text();\n const result = await parseXML(responseData);\n const stat = getDirectoryFiles(result, true);\n return processResponsePayload(response, stat, true);\n};\n// https://github.com/perry-mitchell/webdav-client/blob/8d9694613c978ce7404e26a401c39a41f125f87f/source/operations/directoryContents.ts\nconst getDirectoryFiles = function (result, isDetailed = false) {\n // Extract the response items (directory contents)\n const { multistatus: { response: responseItems }, } = result;\n // Map all items to a consistent output structure (results)\n return responseItems.map(item => {\n // Each item should contain a stat object\n const props = item.propstat.prop;\n return prepareFileFromProps(props, props.id.toString(), isDetailed);\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// eslint-disable-next-line n/no-missing-import, import/no-unresolved\nimport MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'\nimport { getCSPNonce } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport { registerCommentsPlugins } from './comments-activity-tab.ts'\n\n// @ts-expect-error __webpack_nonce__ is injected by webpack\n__webpack_nonce__ = getCSPNonce()\n\nif (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {\n\t// Do not mount own tab but mount into activity\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tregisterCommentsPlugins()\n\t})\n} else {\n\t// Init Comments tab component\n\tlet TabInstance = null\n\tconst commentTab = new OCA.Files.Sidebar.Tab({\n\t\tid: 'comments',\n\t\tname: t('comments', 'Comments'),\n\t\ticonSvg: MessageReplyText,\n\n\t\tasync mount(el, fileInfo, context) {\n\t\t\tif (TabInstance) {\n\t\t\t\tTabInstance.$destroy()\n\t\t\t}\n\t\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t\t// Better integration with vue parent component\n\t\t\t\tparent: context,\n\t\t\t\tpropsData: {\n\t\t\t\t\tresourceId: fileInfo.id,\n\t\t\t\t},\n\t\t\t})\n\t\t\t// Only mount after we have all the info we need\n\t\t\tawait TabInstance.update(fileInfo.id)\n\t\t\tTabInstance.$mount(el)\n\t\t},\n\t\tupdate(fileInfo) {\n\t\t\tTabInstance.update(fileInfo.id)\n\t\t},\n\t\tdestroy() {\n\t\t\tTabInstance.$destroy()\n\t\t\tTabInstance = null\n\t\t},\n\t\tscrollBottomReached() {\n\t\t\tTabInstance.onScrollBottomReached()\n\t\t},\n\t})\n\n\twindow.addEventListener('DOMContentLoaded', function() {\n\t\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t\t}\n\t})\n}\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\nconst getRootPath = function() {\n\treturn generateRemoteUrl('dav/comments')\n}\n\nexport { getRootPath }\n","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createClient } from 'webdav'\nimport { getRootPath } from '../utils/davUtils.js'\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'\n\n// init webdav client\nconst client = createClient(getRootPath())\n\n// set CSRF token header\nconst setHeaders = (token) => {\n\tclient.setHeaders({\n\t\t// Add this so the server knows it is an request from the browser\n\t\t'X-Requested-With': 'XMLHttpRequest',\n\t\t// Inject user auth\n\t\trequesttoken: token ?? '',\n\t})\n}\n\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders)\nsetHeaders(getRequestToken())\n\nexport default client\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('comments')\n\t.detectUser()\n\t.build()\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"640\":\"c4d4943f2c00c1f8a515\",\"3920\":\"156103e97e6acaa3e5c9\",\"4508\":\"c556959b637fb7a30be4\",\"5258\":\"3c88a2c4e4c6df0084c1\",\"5862\":\"142cd48ca8ec32e57725\",\"6408\":\"d68d596cc661db69d9eb\",\"7432\":\"bf453467840969b202ee\",\"7462\":\"f1794da3f7db0f7bd37e\",\"8057\":\"2c8f7e35c56e047ba73f\",\"9279\":\"460048c8db22e016b900\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2122;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2122: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(1836)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","ActivityTabPluginView","ActivityTabPluginInstance","registerCommentsPlugins","window","OCA","Activity","registerSidebarAction","mount","async","el","_ref","context","fileInfo","reload","pinia","createPinia","default","ActivityCommentAction","Vue","extend","parent","propsData","reloadCallback","resourceId","id","logger","info","unmount","$destroy","registerSidebarEntries","limit","offset","_ref2","data","comments","options","resourceType","resourcePath","join","datetime","toISOString","response","client","customRequest","Object","assign","method","responseData","text","stat","result","isDetailed","arguments","length","undefined","multistatus","responseItems","map","item","props","propstat","prop","prepareFileFromProps","toString","getDirectoryFiles","parseXML","processResponsePayload","getComments","debug","CommentView","CommentsViewObject","comment","_CommentsViewInstance","timestamp","moment","creationDateTime","toDate","getTime","element","_ref3","this","registerSidebarFilter","activity","type","use","PiniaVuePlugin","__webpack_nonce__","getCSPNonce","loadState","addEventListener","TabInstance","commentTab","Files","Sidebar","Tab","name","t","iconSvg","Comments","View","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","registerTab","getRootPath","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","getLoggerBuilder","setApp","detectUser","build","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","Function","obj","prototype","hasOwnProperty","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","tagName","toUpperCase","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 09569e7fb03..5a55cae821e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -98,7 +98,7 @@ "@nextcloud/babel-config": "^1.2.0", "@nextcloud/cypress": "^1.0.0-beta.15", "@nextcloud/eslint-config": "^8.4.2", - "@nextcloud/stylelint-config": "^3.0.1", + "@nextcloud/stylelint-config": "^3.1.0", "@nextcloud/typings": "^1.9.1", "@nextcloud/webpack-vue-config": "^6.3.0", "@pinia/testing": "^0.1.7", @@ -4168,18 +4168,21 @@ } }, "node_modules/@nextcloud/stylelint-config": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@nextcloud/stylelint-config/-/stylelint-config-3.0.1.tgz", - "integrity": "sha512-xZ9hhyDCK8bMxPchfcyMhGZ8oTG+H+fmzE+vvCIVni0O+SzCVBEKDuvtKWZJDUs3ngmnmNYN1tH5xjbZBBeYyw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nextcloud/stylelint-config/-/stylelint-config-3.1.0.tgz", + "integrity": "sha512-ZKr/AeqfcqIziJAxnN4K0ldoGz8zWj8pUTov4eloqfaCgvJxcQkt2ldHJfxbutNq8uFkbvRYagkufaYxjC4FlQ==", "dev": true, "license": "AGPL-3.0-or-later", + "dependencies": { + "stylelint-use-logical": "^2.1.2" + }, "engines": { "node": "^20.0.0", "npm": "^10.0.0" }, "peerDependencies": { - "stylelint": "^16.2.0", - "stylelint-config-recommended-scss": "^14.0.0", + "stylelint": "^16.13.2", + "stylelint-config-recommended-scss": "^15.0.1", "stylelint-config-recommended-vue": "^1.5.0" } }, @@ -17192,12 +17195,11 @@ } }, "node_modules/known-css-properties": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz", - "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.36.0.tgz", + "integrity": "sha512-A+9jP+IUmuQsNdsLdcg6Yt7voiMF/D4K83ew0OpJtpu+l34ef7LaohWV0Rc6KNvzw6ZDizkqfyB5JznZnzuKQA==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/launch-editor": { "version": "2.9.1", @@ -23446,9 +23448,9 @@ } }, "node_modules/stylelint-config-recommended": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-14.0.1.tgz", - "integrity": "sha512-bLvc1WOz/14aPImu/cufKAZYfXs/A/owZfSMZ4N+16WGXLoX5lOir53M6odBxvhgmgdxCVnNySJmZKx73T93cg==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-16.0.0.tgz", + "integrity": "sha512-4RSmPjQegF34wNcK1e1O3Uz91HN8P1aFdFzio90wNK9mjgAI19u5vsU868cVZboKzCaa5XbpvtTzAAGQAxpcXA==", "dev": true, "funding": [ { @@ -23466,27 +23468,27 @@ "node": ">=18.12.0" }, "peerDependencies": { - "stylelint": "^16.1.0" + "stylelint": "^16.16.0" } }, "node_modules/stylelint-config-recommended-scss": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-14.1.0.tgz", - "integrity": "sha512-bhaMhh1u5dQqSsf6ri2GVWWQW5iUjBYgcHkh7SgDDn92ijoItC/cfO/W+fpXshgTQWhwFkP1rVcewcv4jaftRg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-15.0.1.tgz", + "integrity": "sha512-V24bxkNkFGggqPVJlP9iXaBabwSGEG7QTz+PyxrRtjPkcF+/NsWtB3tKYvFYEmczRkWiIEfuFMhGpJFj9Fxe6Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "postcss-scss": "^4.0.9", - "stylelint-config-recommended": "^14.0.1", - "stylelint-scss": "^6.4.0" + "stylelint-config-recommended": "^16.0.0", + "stylelint-scss": "^6.12.0" }, "engines": { - "node": ">=18.12.0" + "node": ">=20" }, "peerDependencies": { "postcss": "^8.3.3", - "stylelint": "^16.6.1" + "stylelint": "^16.16.0" }, "peerDependenciesMeta": { "postcss": { @@ -23532,17 +23534,20 @@ } }, "node_modules/stylelint-scss": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.4.1.tgz", - "integrity": "sha512-+clI2bQC2FPOt06ZwUlXZZ95IO2C5bKTP0GLN1LNQPVvISfSNcgMKv/VTwym1mK9vnqhHbOk8lO4rj4nY7L9pw==", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-6.12.0.tgz", + "integrity": "sha512-U7CKhi1YNkM1pXUXl/GMUXi8xKdhl4Ayxdyceie1nZ1XNIdaUgMV6OArpooWcDzEggwgYD0HP/xIgVJo9a655w==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "known-css-properties": "^0.34.0", + "css-tree": "^3.0.1", + "is-plain-object": "^5.0.0", + "known-css-properties": "^0.36.0", + "mdn-data": "^2.21.0", "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.1.0", + "postcss-resolve-nested-selector": "^0.1.6", + "postcss-selector-parser": "^7.1.0", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -23552,6 +23557,40 @@ "stylelint": "^16.0.2" } }, + "node_modules/stylelint-scss/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stylelint-scss/node_modules/mdn-data": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.21.0.tgz", + "integrity": "sha512-+ZKPQezM5vYJIkCxaC+4DTnRrVZR1CgsKLu5zsQERQx6Tea8Y+wMx5A24rq8A8NepCeatIQufVAekKNgiBMsGQ==", + "dev": true, + "license": "CC0-1.0", + "peer": true + }, + "node_modules/stylelint-scss/node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/stylelint-use-logical": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/stylelint-use-logical/-/stylelint-use-logical-2.1.2.tgz", @@ -23636,13 +23675,6 @@ "node": ">=0.10.0" } }, - "node_modules/stylelint/node_modules/known-css-properties": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.36.0.tgz", - "integrity": "sha512-A+9jP+IUmuQsNdsLdcg6Yt7voiMF/D4K83ew0OpJtpu+l34ef7LaohWV0Rc6KNvzw6ZDizkqfyB5JznZnzuKQA==", - "dev": true, - "license": "MIT" - }, "node_modules/stylelint/node_modules/postcss-selector-parser": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", diff --git a/package.json b/package.json index 1a84b9b4c18..27facd300a7 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,10 @@ "postbuild": "build/npm-post-build.sh", "dev": "webpack --node-env development --progress", "watch": "webpack --node-env development --progress --watch", - "lint": "eslint $(for appdir in $(ls apps); do if ! $(git check-ignore -q $appdir); then printf \"apps/$appdir \"; fi; done) core --no-error-on-unmatched-pattern", - "lint:fix": "eslint $(for appdir in $(ls apps); do if ! $(git check-ignore -q $appdir); then printf \"apps/$appdir \"; fi; done) core --no-error-on-unmatched-pattern --fix", - "stylelint": "stylelint '{apps,core}/**/*.{scss,vue}'", - "stylelint:fix": "stylelint --fix '{apps,core}/**/*.{scss,vue}'", + "lint": "eslint $(for appdir in $(ls apps); do if ! $(git check-ignore -q \"apps/$appdir\"); then printf \"apps/$appdir \"; fi; done) core --no-error-on-unmatched-pattern", + "lint:fix": "npm run lint -- --fix", + "stylelint": "stylelint $(for appdir in $(ls apps); do if ! $(git check-ignore -q \"apps/$appdir\"); then printf \"'apps/$appdir/**/*.{scss,vue}' \"; fi; done) 'core/**/*.{scss,vue}'", + "stylelint:fix": "npm run stylelint -- --fix", "test": "vitest run", "test:watch": "vitest watch", "test:coverage": "vitest run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml", @@ -129,7 +129,7 @@ "@nextcloud/babel-config": "^1.2.0", "@nextcloud/cypress": "^1.0.0-beta.15", "@nextcloud/eslint-config": "^8.4.2", - "@nextcloud/stylelint-config": "^3.0.1", + "@nextcloud/stylelint-config": "^3.1.0", "@nextcloud/typings": "^1.9.1", "@nextcloud/webpack-vue-config": "^6.3.0", "@pinia/testing": "^0.1.7", |