From: WoltLab Date: Fri, 4 Aug 2023 13:42:13 +0000 (+0000) Subject: Updating minified JavaScript files X-Git-Tag: 6.0.0_Alpha_8~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cc38891fc1f01fff41202092b6a9d3839f9ac083;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Updating minified JavaScript files --- diff --git a/files/js/WoltLabSuite.Core.Conversation.min.js b/files/js/WoltLabSuite.Core.Conversation.min.js index 81fb4d0..91c567f 100644 --- a/files/js/WoltLabSuite.Core.Conversation.min.js +++ b/files/js/WoltLabSuite.Core.Conversation.min.js @@ -1 +1 @@ -define("WoltLabSuite/Core/Conversation/Ui/MarkAllAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importStar(n),e.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),async function(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),document.querySelectorAll(".conversationList .new").forEach((t=>{t.classList.remove("new")})),document.querySelector("#unreadConversations .badgeUpdate")?.remove(),n.show()}()}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/MarkAsRead",["require","exports","WoltLabSuite/Core/Ajax"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0;const i=new WeakSet;e.setup=function(){document.querySelectorAll(".conversationList .new .columnAvatar").forEach((t=>{i.has(t)||(i.add(t),t.addEventListener("dblclick",(e=>{e.preventDefault();const i=t.closest(".conversation");i.classList.contains("new")&&async function(t){const e=parseInt(t.dataset.conversationId,10);await(0,o.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([e]).dispatch(),t.classList.remove("new"),t.querySelector(".columnAvatar p")?.removeAttribute("title")}(i)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/Message/Quote",["require","exports","WoltLabSuite/Core/Ui/Message/Quote"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UiConversationMessageQuote=void 0;class i extends o.UiMessageQuote{constructor(t){super(t,"wcf\\data\\conversation\\message\\ConversationMessageAction","com.woltlab.wcf.conversation.message",".message",".messageBody",".messageBody > div > div.messageText",!0)}}e.UiConversationMessageQuote=i,e.default=i})),define("WoltLabSuite/Core/Conversation/Ui/Participant/Add",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Ui/ItemList/User","WoltLabSuite/Core/Language"],(function(t,e,o,i,n,a,s,r,c){"use strict";return i=o.__importStar(i),n=o.__importDefault(n),a=o.__importDefault(a),s=o.__importStar(s),r=o.__importStar(r),c=o.__importStar(c),class{conversationId;constructor(t){this.conversationId=t,i.api(this,{actionName:"getAddParticipantsForm"})}_ajaxSetup(){return{data:{className:"wcf\\data\\conversation\\ConversationAction",objectIDs:[this.conversationId]}}}_ajaxSuccess(t){switch(t.actionName){case"addParticipants":this.handleResponse(t);break;case"getAddParticipantsForm":this.render(t)}}handleResponse(t){t.returnValues.errorMessage?n.default.innerError(document.getElementById("participantsInput").closest(".inputItemList"),t.returnValues.errorMessage):(t.returnValues.count&&s.show(t.returnValues.successMessage,(()=>window.location.reload())),a.default.close(this))}render(t){a.default.open(this,t.returnValues.template);const e=document.getElementById("addParticipants");e.disabled=!0,r.init("participantsInput",{callbackChange:(t,o)=>{e.disabled=0===o.length},excludedSearchValues:t.returnValues.excludedSearchValues,maxItems:t.returnValues.maxItems,includeUserGroups:t.returnValues.canAddGroupParticipants&&t.returnValues.restrictUserGroupIDs.length>0,restrictUserGroupIDs:t.returnValues.restrictUserGroupIDs,csvPerType:!0}),e.addEventListener("click",(()=>this.submit()))}submit(){const t=[],e=[];r.getValues("participantsInput").forEach((o=>{"group"===o.type?e.push(o.objectId):t.push(o.value)}));const o={participants:t,participantsGroupIDs:e,visibility:null},n=a.default.getDialog(this).content.querySelector('input[name="messageVisibility"]:checked, input[name="messageVisibility"][type="hidden"]');n&&(o.visibility=n.value),i.api(this,{actionName:"addParticipants",parameters:o})}_dialogSetup(){return{id:"conversationAddParticipants",options:{title:c.get("wcf.conversation.edit.addParticipants")},source:null}}}})),define("WoltLabSuite/Core/Conversation/Ui/Subject/Editor",["require","exports","tslib","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n,a,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.beginEdit=void 0,i=o.__importDefault(i),n=o.__importDefault(n),a=o.__importStar(a),s=o.__importStar(s),r=o.__importStar(r);class c{objectId;subject;constructor(t){this.objectId=t}show(){i.default.open(this)}saveEdit(t){t.preventDefault();const e=this.subject.value.trim();""===e?n.default.innerError(this.subject,s.get("wcf.global.form.error.empty")):(n.default.innerError(this.subject,""),a.api(this,{parameters:{subject:e},objectIDs:[this.objectId]}))}getCurrentValue(){return Array.from(document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`)).map((t=>t.textContent)).slice(-1)[0]}_ajaxSuccess(t){i.default.close(this),document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`).forEach((e=>{e.textContent=t.returnValues.subject})),r.show()}_dialogSetup(){return{id:"dialogConversationSubjectEditor",options:{onSetup:t=>{this.subject=document.getElementById("jsConversationSubject"),this.subject.addEventListener("keyup",(t=>{"Enter"===t.key&&this.saveEdit(t)})),t.querySelector(".jsButtonSave").addEventListener("click",(t=>this.saveEdit(t)))},onShow:()=>{this.subject.value=this.getCurrentValue()},title:s.get("wcf.conversation.edit.subject")},source:`\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n `}}_ajaxSetup(){return{data:{actionName:"editSubject",className:"wcf\\data\\conversation\\ConversationAction"}}}}let u;e.beginEdit=function(t){u=new c(t),u.show()}})),define("WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant",["require","exports","tslib","WoltLabSuite/Core/Ui/Object/Action/Handler"],(function(t,e,o,i){"use strict";function n(t){t.objectElement.querySelector(".userLink").classList.add("conversationLeft"),t.objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']").remove()}Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,i=o.__importDefault(i),e.setup=function(){new i.default("removeParticipant",[],n)}})),define("WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/User/Menu/View","WoltLabSuite/Core/Ui/User/Menu/Manager"],(function(t,e,o,i,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importDefault(n);class s{button;counter=0;options;stale=!0;view=void 0;constructor(t,e){this.button=t,this.options=e;const o=t.querySelector(".badge");if(o){const t=parseInt(o.textContent.trim());t&&(this.counter=t)}}getPanelButton(){return this.button}getMenuButtons(){const t=[];return this.options.canStartConversation&&t.push({icon:'',link:this.options.newConversationLink,name:"newConversation",title:this.options.newConversationTitle}),t}getIdentifier(){return"com.woltlab.wcf.conversation.conversations"}async getData(){const t=await(0,i.dboAction)("getConversations","wcf\\data\\conversation\\ConversationAction").disableLoadingIndicator().dispatch();return this.updateCounter(t.totalCount),this.stale=!1,t.items}getFooter(){return{link:this.options.showAllLink,title:this.options.showAllTitle}}getTitle(){return this.options.title}getView(){return void 0===this.view&&(this.view=new n.default(this)),this.view}getEmptyViewMessage(){return this.options.noItems}hasPlainTitle(){return!0}hasUnreadContent(){return this.counter>0}isStale(){if(this.stale)return!0;const t=this.getView().getItems().filter((t=>"true"===t.dataset.isUnread));return this.counter!==t.length}async markAsRead(t){const e=await(0,i.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([t]).dispatch();this.updateCounter(e.totalCount)}async markAllAsRead(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),this.updateCounter(0)}updateCounter(t){let e=this.button.querySelector(".badge");null===e&&t>0&&(e=document.createElement("span"),e.classList.add("badge","badgeUpdate"),this.button.querySelector("a").append(e)),e&&(0===t?e.remove():e.textContent=t.toString()),this.counter=t}}let r=!1;e.setup=function(t){if(!r){const e=document.getElementById("unreadConversations");if(null!==e){const o=new s(e,t);(0,a.registerProvider)(o)}r=!0}}})); \ No newline at end of file +define("WoltLabSuite/Core/Conversation/Ui/MarkAllAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importStar(n),e.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),async function(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),document.querySelectorAll(".conversationList .new").forEach((t=>{t.classList.remove("new")})),document.querySelector("#unreadConversations .badgeUpdate")?.remove(),n.show()}()}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/MarkAsRead",["require","exports","WoltLabSuite/Core/Ajax"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0;const i=new WeakSet;e.setup=function(){document.querySelectorAll(".conversationList .new .columnAvatar").forEach((t=>{i.has(t)||(i.add(t),t.addEventListener("dblclick",(e=>{e.preventDefault();const i=t.closest(".conversation");i.classList.contains("new")&&async function(t){const e=parseInt(t.dataset.conversationId,10);await(0,o.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([e]).dispatch(),t.classList.remove("new"),t.querySelector(".columnAvatar p")?.removeAttribute("title")}(i)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/Message/Quote",["require","exports","WoltLabSuite/Core/Ui/Message/Quote"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UiConversationMessageQuote=void 0;class i extends o.UiMessageQuote{constructor(t){super(t,"wcf\\data\\conversation\\message\\ConversationMessageAction","com.woltlab.wcf.conversation.message",".message",".messageBody",".messageBody > div > div.messageText",!0)}}e.UiConversationMessageQuote=i,e.default=i})),define("WoltLabSuite/Core/Conversation/Ui/Participant/Add",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Ui/ItemList/User","WoltLabSuite/Core/Language"],(function(t,e,o,i,n,a,s,r,c){"use strict";return i=o.__importStar(i),n=o.__importDefault(n),a=o.__importDefault(a),s=o.__importStar(s),r=o.__importStar(r),c=o.__importStar(c),class{conversationId;constructor(t){this.conversationId=t,i.api(this,{actionName:"getAddParticipantsForm"})}_ajaxSetup(){return{data:{className:"wcf\\data\\conversation\\ConversationAction",objectIDs:[this.conversationId]}}}_ajaxSuccess(t){switch(t.actionName){case"addParticipants":this.handleResponse(t);break;case"getAddParticipantsForm":this.render(t)}}handleResponse(t){"errorMessage"in t.returnValues?n.default.innerError(document.getElementById("participantsInput").closest(".inputItemList"),t.returnValues.errorMessage):("count"in t.returnValues&&s.show(t.returnValues.successMessage,(()=>{window.location.reload()})),a.default.close(this))}render(t){a.default.open(this,t.returnValues.template);const e=document.getElementById("addParticipants");e.disabled=!0,r.init("participantsInput",{callbackChange:(t,o)=>{e.disabled=0===o.length},excludedSearchValues:t.returnValues.excludedSearchValues,maxItems:t.returnValues.maxItems,includeUserGroups:t.returnValues.canAddGroupParticipants&&t.returnValues.restrictUserGroupIDs.length>0,restrictUserGroupIDs:t.returnValues.restrictUserGroupIDs,csvPerType:!0}),e.addEventListener("click",(()=>{this.submit()}))}submit(){const t=[],e=[];r.getValues("participantsInput").forEach((o=>{"group"===o.type?e.push(o.objectId):t.push(o.value)}));const o={participants:t,participantsGroupIDs:e,visibility:null},n=a.default.getDialog(this).content.querySelector('input[name="messageVisibility"]:checked, input[name="messageVisibility"][type="hidden"]');n&&(o.visibility=n.value),i.api(this,{actionName:"addParticipants",parameters:o})}_dialogSetup(){return{id:"conversationAddParticipants",options:{title:c.get("wcf.conversation.edit.addParticipants")},source:null}}}})),define("WoltLabSuite/Core/Conversation/Ui/Subject/Editor",["require","exports","tslib","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n,a,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.beginEdit=void 0,i=o.__importDefault(i),n=o.__importDefault(n),a=o.__importStar(a),s=o.__importStar(s),r=o.__importStar(r);class c{objectId;subject;constructor(t){this.objectId=t}show(){i.default.open(this)}saveEdit(t){t.preventDefault();const e=this.subject.value.trim();""===e?n.default.innerError(this.subject,s.get("wcf.global.form.error.empty")):(n.default.innerError(this.subject,""),a.api(this,{parameters:{subject:e},objectIDs:[this.objectId]}))}getCurrentValue(){return Array.from(document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`)).map((t=>t.textContent)).slice(-1)[0]}_ajaxSuccess(t){i.default.close(this),document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`).forEach((e=>{e.textContent=t.returnValues.subject})),r.show()}_dialogSetup(){return{id:"dialogConversationSubjectEditor",options:{onSetup:t=>{this.subject=document.getElementById("jsConversationSubject"),this.subject.addEventListener("keyup",(t=>{"Enter"===t.key&&this.saveEdit(t)})),t.querySelector(".jsButtonSave").addEventListener("click",(t=>{this.saveEdit(t)}))},onShow:()=>{this.subject.value=this.getCurrentValue()},title:s.get("wcf.conversation.edit.subject")},source:`\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n `}}_ajaxSetup(){return{data:{actionName:"editSubject",className:"wcf\\data\\conversation\\ConversationAction"}}}}let u;e.beginEdit=function(t){u=new c(t),u.show()}})),define("WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant",["require","exports","tslib","WoltLabSuite/Core/Ui/Object/Action/Handler"],(function(t,e,o,i){"use strict";function n(t){t.objectElement.querySelector(".userLink").classList.add("conversationLeft"),t.objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']").remove()}Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,i=o.__importDefault(i),e.setup=function(){new i.default("removeParticipant",[],n)}})),define("WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/User/Menu/View","WoltLabSuite/Core/Ui/User/Menu/Manager"],(function(t,e,o,i,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importDefault(n);class s{button;counter=0;options;stale=!0;view=void 0;constructor(t,e){this.button=t,this.options=e;const o=t.querySelector(".badge");if(o){const t=parseInt(o.textContent.trim());t&&(this.counter=t)}}getPanelButton(){return this.button}getMenuButtons(){const t=[];return this.options.canStartConversation&&t.push({icon:'',link:this.options.newConversationLink,name:"newConversation",title:this.options.newConversationTitle}),t}getIdentifier(){return"com.woltlab.wcf.conversation.conversations"}async getData(){const t=await(0,i.dboAction)("getConversations","wcf\\data\\conversation\\ConversationAction").disableLoadingIndicator().dispatch();return this.updateCounter(t.totalCount),this.stale=!1,t.items}getFooter(){return{link:this.options.showAllLink,title:this.options.showAllTitle}}getTitle(){return this.options.title}getView(){return void 0===this.view&&(this.view=new n.default(this)),this.view}getEmptyViewMessage(){return this.options.noItems}hasPlainTitle(){return!0}hasUnreadContent(){return this.counter>0}isStale(){if(this.stale)return!0;const t=this.getView().getItems().filter((t=>"true"===t.dataset.isUnread));return this.counter!==t.length}async markAsRead(t){const e=await(0,i.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([t]).dispatch();this.updateCounter(e.totalCount)}async markAllAsRead(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),this.updateCounter(0)}updateCounter(t){let e=this.button.querySelector(".badge");null===e&&t>0&&(e=document.createElement("span"),e.classList.add("badge","badgeUpdate"),this.button.querySelector("a").append(e)),e&&(0===t?e.remove():e.textContent=t.toString()),this.counter=t}}let r=!1;e.setup=function(t){if(!r){const e=document.getElementById("unreadConversations");if(null!==e){const o=new s(e,t);(0,a.registerProvider)(o)}r=!0}}})); \ No newline at end of file diff --git a/files/js/WoltLabSuite.Core.Conversation.tiny.min.js b/files/js/WoltLabSuite.Core.Conversation.tiny.min.js index 81fb4d0..91c567f 100644 --- a/files/js/WoltLabSuite.Core.Conversation.tiny.min.js +++ b/files/js/WoltLabSuite.Core.Conversation.tiny.min.js @@ -1 +1 @@ -define("WoltLabSuite/Core/Conversation/Ui/MarkAllAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importStar(n),e.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),async function(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),document.querySelectorAll(".conversationList .new").forEach((t=>{t.classList.remove("new")})),document.querySelector("#unreadConversations .badgeUpdate")?.remove(),n.show()}()}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/MarkAsRead",["require","exports","WoltLabSuite/Core/Ajax"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0;const i=new WeakSet;e.setup=function(){document.querySelectorAll(".conversationList .new .columnAvatar").forEach((t=>{i.has(t)||(i.add(t),t.addEventListener("dblclick",(e=>{e.preventDefault();const i=t.closest(".conversation");i.classList.contains("new")&&async function(t){const e=parseInt(t.dataset.conversationId,10);await(0,o.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([e]).dispatch(),t.classList.remove("new"),t.querySelector(".columnAvatar p")?.removeAttribute("title")}(i)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/Message/Quote",["require","exports","WoltLabSuite/Core/Ui/Message/Quote"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UiConversationMessageQuote=void 0;class i extends o.UiMessageQuote{constructor(t){super(t,"wcf\\data\\conversation\\message\\ConversationMessageAction","com.woltlab.wcf.conversation.message",".message",".messageBody",".messageBody > div > div.messageText",!0)}}e.UiConversationMessageQuote=i,e.default=i})),define("WoltLabSuite/Core/Conversation/Ui/Participant/Add",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Ui/ItemList/User","WoltLabSuite/Core/Language"],(function(t,e,o,i,n,a,s,r,c){"use strict";return i=o.__importStar(i),n=o.__importDefault(n),a=o.__importDefault(a),s=o.__importStar(s),r=o.__importStar(r),c=o.__importStar(c),class{conversationId;constructor(t){this.conversationId=t,i.api(this,{actionName:"getAddParticipantsForm"})}_ajaxSetup(){return{data:{className:"wcf\\data\\conversation\\ConversationAction",objectIDs:[this.conversationId]}}}_ajaxSuccess(t){switch(t.actionName){case"addParticipants":this.handleResponse(t);break;case"getAddParticipantsForm":this.render(t)}}handleResponse(t){t.returnValues.errorMessage?n.default.innerError(document.getElementById("participantsInput").closest(".inputItemList"),t.returnValues.errorMessage):(t.returnValues.count&&s.show(t.returnValues.successMessage,(()=>window.location.reload())),a.default.close(this))}render(t){a.default.open(this,t.returnValues.template);const e=document.getElementById("addParticipants");e.disabled=!0,r.init("participantsInput",{callbackChange:(t,o)=>{e.disabled=0===o.length},excludedSearchValues:t.returnValues.excludedSearchValues,maxItems:t.returnValues.maxItems,includeUserGroups:t.returnValues.canAddGroupParticipants&&t.returnValues.restrictUserGroupIDs.length>0,restrictUserGroupIDs:t.returnValues.restrictUserGroupIDs,csvPerType:!0}),e.addEventListener("click",(()=>this.submit()))}submit(){const t=[],e=[];r.getValues("participantsInput").forEach((o=>{"group"===o.type?e.push(o.objectId):t.push(o.value)}));const o={participants:t,participantsGroupIDs:e,visibility:null},n=a.default.getDialog(this).content.querySelector('input[name="messageVisibility"]:checked, input[name="messageVisibility"][type="hidden"]');n&&(o.visibility=n.value),i.api(this,{actionName:"addParticipants",parameters:o})}_dialogSetup(){return{id:"conversationAddParticipants",options:{title:c.get("wcf.conversation.edit.addParticipants")},source:null}}}})),define("WoltLabSuite/Core/Conversation/Ui/Subject/Editor",["require","exports","tslib","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n,a,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.beginEdit=void 0,i=o.__importDefault(i),n=o.__importDefault(n),a=o.__importStar(a),s=o.__importStar(s),r=o.__importStar(r);class c{objectId;subject;constructor(t){this.objectId=t}show(){i.default.open(this)}saveEdit(t){t.preventDefault();const e=this.subject.value.trim();""===e?n.default.innerError(this.subject,s.get("wcf.global.form.error.empty")):(n.default.innerError(this.subject,""),a.api(this,{parameters:{subject:e},objectIDs:[this.objectId]}))}getCurrentValue(){return Array.from(document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`)).map((t=>t.textContent)).slice(-1)[0]}_ajaxSuccess(t){i.default.close(this),document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`).forEach((e=>{e.textContent=t.returnValues.subject})),r.show()}_dialogSetup(){return{id:"dialogConversationSubjectEditor",options:{onSetup:t=>{this.subject=document.getElementById("jsConversationSubject"),this.subject.addEventListener("keyup",(t=>{"Enter"===t.key&&this.saveEdit(t)})),t.querySelector(".jsButtonSave").addEventListener("click",(t=>this.saveEdit(t)))},onShow:()=>{this.subject.value=this.getCurrentValue()},title:s.get("wcf.conversation.edit.subject")},source:`\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n `}}_ajaxSetup(){return{data:{actionName:"editSubject",className:"wcf\\data\\conversation\\ConversationAction"}}}}let u;e.beginEdit=function(t){u=new c(t),u.show()}})),define("WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant",["require","exports","tslib","WoltLabSuite/Core/Ui/Object/Action/Handler"],(function(t,e,o,i){"use strict";function n(t){t.objectElement.querySelector(".userLink").classList.add("conversationLeft"),t.objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']").remove()}Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,i=o.__importDefault(i),e.setup=function(){new i.default("removeParticipant",[],n)}})),define("WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/User/Menu/View","WoltLabSuite/Core/Ui/User/Menu/Manager"],(function(t,e,o,i,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importDefault(n);class s{button;counter=0;options;stale=!0;view=void 0;constructor(t,e){this.button=t,this.options=e;const o=t.querySelector(".badge");if(o){const t=parseInt(o.textContent.trim());t&&(this.counter=t)}}getPanelButton(){return this.button}getMenuButtons(){const t=[];return this.options.canStartConversation&&t.push({icon:'',link:this.options.newConversationLink,name:"newConversation",title:this.options.newConversationTitle}),t}getIdentifier(){return"com.woltlab.wcf.conversation.conversations"}async getData(){const t=await(0,i.dboAction)("getConversations","wcf\\data\\conversation\\ConversationAction").disableLoadingIndicator().dispatch();return this.updateCounter(t.totalCount),this.stale=!1,t.items}getFooter(){return{link:this.options.showAllLink,title:this.options.showAllTitle}}getTitle(){return this.options.title}getView(){return void 0===this.view&&(this.view=new n.default(this)),this.view}getEmptyViewMessage(){return this.options.noItems}hasPlainTitle(){return!0}hasUnreadContent(){return this.counter>0}isStale(){if(this.stale)return!0;const t=this.getView().getItems().filter((t=>"true"===t.dataset.isUnread));return this.counter!==t.length}async markAsRead(t){const e=await(0,i.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([t]).dispatch();this.updateCounter(e.totalCount)}async markAllAsRead(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),this.updateCounter(0)}updateCounter(t){let e=this.button.querySelector(".badge");null===e&&t>0&&(e=document.createElement("span"),e.classList.add("badge","badgeUpdate"),this.button.querySelector("a").append(e)),e&&(0===t?e.remove():e.textContent=t.toString()),this.counter=t}}let r=!1;e.setup=function(t){if(!r){const e=document.getElementById("unreadConversations");if(null!==e){const o=new s(e,t);(0,a.registerProvider)(o)}r=!0}}})); \ No newline at end of file +define("WoltLabSuite/Core/Conversation/Ui/MarkAllAsRead",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importStar(n),e.setup=function(){document.querySelectorAll(".markAllAsReadButton").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),async function(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),document.querySelectorAll(".conversationList .new").forEach((t=>{t.classList.remove("new")})),document.querySelector("#unreadConversations .badgeUpdate")?.remove(),n.show()}()}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/MarkAsRead",["require","exports","WoltLabSuite/Core/Ajax"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0;const i=new WeakSet;e.setup=function(){document.querySelectorAll(".conversationList .new .columnAvatar").forEach((t=>{i.has(t)||(i.add(t),t.addEventListener("dblclick",(e=>{e.preventDefault();const i=t.closest(".conversation");i.classList.contains("new")&&async function(t){const e=parseInt(t.dataset.conversationId,10);await(0,o.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([e]).dispatch(),t.classList.remove("new"),t.querySelector(".columnAvatar p")?.removeAttribute("title")}(i)}),{once:!0}))}))}})),define("WoltLabSuite/Core/Conversation/Ui/Message/Quote",["require","exports","WoltLabSuite/Core/Ui/Message/Quote"],(function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UiConversationMessageQuote=void 0;class i extends o.UiMessageQuote{constructor(t){super(t,"wcf\\data\\conversation\\message\\ConversationMessageAction","com.woltlab.wcf.conversation.message",".message",".messageBody",".messageBody > div > div.messageText",!0)}}e.UiConversationMessageQuote=i,e.default=i})),define("WoltLabSuite/Core/Conversation/Ui/Participant/Add",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Ui/Notification","WoltLabSuite/Core/Ui/ItemList/User","WoltLabSuite/Core/Language"],(function(t,e,o,i,n,a,s,r,c){"use strict";return i=o.__importStar(i),n=o.__importDefault(n),a=o.__importDefault(a),s=o.__importStar(s),r=o.__importStar(r),c=o.__importStar(c),class{conversationId;constructor(t){this.conversationId=t,i.api(this,{actionName:"getAddParticipantsForm"})}_ajaxSetup(){return{data:{className:"wcf\\data\\conversation\\ConversationAction",objectIDs:[this.conversationId]}}}_ajaxSuccess(t){switch(t.actionName){case"addParticipants":this.handleResponse(t);break;case"getAddParticipantsForm":this.render(t)}}handleResponse(t){"errorMessage"in t.returnValues?n.default.innerError(document.getElementById("participantsInput").closest(".inputItemList"),t.returnValues.errorMessage):("count"in t.returnValues&&s.show(t.returnValues.successMessage,(()=>{window.location.reload()})),a.default.close(this))}render(t){a.default.open(this,t.returnValues.template);const e=document.getElementById("addParticipants");e.disabled=!0,r.init("participantsInput",{callbackChange:(t,o)=>{e.disabled=0===o.length},excludedSearchValues:t.returnValues.excludedSearchValues,maxItems:t.returnValues.maxItems,includeUserGroups:t.returnValues.canAddGroupParticipants&&t.returnValues.restrictUserGroupIDs.length>0,restrictUserGroupIDs:t.returnValues.restrictUserGroupIDs,csvPerType:!0}),e.addEventListener("click",(()=>{this.submit()}))}submit(){const t=[],e=[];r.getValues("participantsInput").forEach((o=>{"group"===o.type?e.push(o.objectId):t.push(o.value)}));const o={participants:t,participantsGroupIDs:e,visibility:null},n=a.default.getDialog(this).content.querySelector('input[name="messageVisibility"]:checked, input[name="messageVisibility"][type="hidden"]');n&&(o.visibility=n.value),i.api(this,{actionName:"addParticipants",parameters:o})}_dialogSetup(){return{id:"conversationAddParticipants",options:{title:c.get("wcf.conversation.edit.addParticipants")},source:null}}}})),define("WoltLabSuite/Core/Conversation/Ui/Subject/Editor",["require","exports","tslib","WoltLabSuite/Core/Ui/Dialog","WoltLabSuite/Core/Dom/Util","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Language","WoltLabSuite/Core/Ui/Notification"],(function(t,e,o,i,n,a,s,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.beginEdit=void 0,i=o.__importDefault(i),n=o.__importDefault(n),a=o.__importStar(a),s=o.__importStar(s),r=o.__importStar(r);class c{objectId;subject;constructor(t){this.objectId=t}show(){i.default.open(this)}saveEdit(t){t.preventDefault();const e=this.subject.value.trim();""===e?n.default.innerError(this.subject,s.get("wcf.global.form.error.empty")):(n.default.innerError(this.subject,""),a.api(this,{parameters:{subject:e},objectIDs:[this.objectId]}))}getCurrentValue(){return Array.from(document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`)).map((t=>t.textContent)).slice(-1)[0]}_ajaxSuccess(t){i.default.close(this),document.querySelectorAll(`.jsConversationSubject[data-conversation-id="${this.objectId}"], .conversationLink[data-object-id="${this.objectId}"]`).forEach((e=>{e.textContent=t.returnValues.subject})),r.show()}_dialogSetup(){return{id:"dialogConversationSubjectEditor",options:{onSetup:t=>{this.subject=document.getElementById("jsConversationSubject"),this.subject.addEventListener("keyup",(t=>{"Enter"===t.key&&this.saveEdit(t)})),t.querySelector(".jsButtonSave").addEventListener("click",(t=>{this.saveEdit(t)}))},onShow:()=>{this.subject.value=this.getCurrentValue()},title:s.get("wcf.conversation.edit.subject")},source:`\n
\n
\n \n
\n
\n \n
\n
\n
\n \n
\n `}}_ajaxSetup(){return{data:{actionName:"editSubject",className:"wcf\\data\\conversation\\ConversationAction"}}}}let u;e.beginEdit=function(t){u=new c(t),u.show()}})),define("WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant",["require","exports","tslib","WoltLabSuite/Core/Ui/Object/Action/Handler"],(function(t,e,o,i){"use strict";function n(t){t.objectElement.querySelector(".userLink").classList.add("conversationLeft"),t.objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']").remove()}Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,i=o.__importDefault(i),e.setup=function(){new i.default("removeParticipant",[],n)}})),define("WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation",["require","exports","tslib","WoltLabSuite/Core/Ajax","WoltLabSuite/Core/Ui/User/Menu/View","WoltLabSuite/Core/Ui/User/Menu/Manager"],(function(t,e,o,i,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setup=void 0,n=o.__importDefault(n);class s{button;counter=0;options;stale=!0;view=void 0;constructor(t,e){this.button=t,this.options=e;const o=t.querySelector(".badge");if(o){const t=parseInt(o.textContent.trim());t&&(this.counter=t)}}getPanelButton(){return this.button}getMenuButtons(){const t=[];return this.options.canStartConversation&&t.push({icon:'',link:this.options.newConversationLink,name:"newConversation",title:this.options.newConversationTitle}),t}getIdentifier(){return"com.woltlab.wcf.conversation.conversations"}async getData(){const t=await(0,i.dboAction)("getConversations","wcf\\data\\conversation\\ConversationAction").disableLoadingIndicator().dispatch();return this.updateCounter(t.totalCount),this.stale=!1,t.items}getFooter(){return{link:this.options.showAllLink,title:this.options.showAllTitle}}getTitle(){return this.options.title}getView(){return void 0===this.view&&(this.view=new n.default(this)),this.view}getEmptyViewMessage(){return this.options.noItems}hasPlainTitle(){return!0}hasUnreadContent(){return this.counter>0}isStale(){if(this.stale)return!0;const t=this.getView().getItems().filter((t=>"true"===t.dataset.isUnread));return this.counter!==t.length}async markAsRead(t){const e=await(0,i.dboAction)("markAsRead","wcf\\data\\conversation\\ConversationAction").objectIds([t]).dispatch();this.updateCounter(e.totalCount)}async markAllAsRead(){await(0,i.dboAction)("markAllAsRead","wcf\\data\\conversation\\ConversationAction").dispatch(),this.updateCounter(0)}updateCounter(t){let e=this.button.querySelector(".badge");null===e&&t>0&&(e=document.createElement("span"),e.classList.add("badge","badgeUpdate"),this.button.querySelector("a").append(e)),e&&(0===t?e.remove():e.textContent=t.toString()),this.counter=t}}let r=!1;e.setup=function(t){if(!r){const e=document.getElementById("unreadConversations");if(null!==e){const o=new s(e,t);(0,a.registerProvider)(o)}r=!0}}})); \ No newline at end of file