1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 01:16:52 +02:00

Bundled output for commit a47bd2d457

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot
2024-10-19 17:44:34 +00:00
parent a47bd2d457
commit caefacbecd
98 changed files with 98 additions and 98 deletions

2
extensions/pusher/js/dist/forum.js generated vendored
View File

@@ -1,2 +1,2 @@
(()=>{var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const s=flarum.reg.get("core","forum/app");var n=e.n(s);const o=flarum.reg.get("core","common/extend"),r=flarum.reg.get("core","forum/components/DiscussionList");var i=e.n(r);const u=flarum.reg.get("core","forum/components/DiscussionPage");var a=e.n(u);const d=flarum.reg.get("core","forum/components/IndexPage");var c=e.n(d);const p=flarum.reg.get("core","common/components/Button");var l=e.n(p);n().initializers.add("flarum-pusher",(()=>{n().pusher=(async()=>{await import("//cdn.jsdelivr.net/npm/pusher-js@7.0.3/dist/web/pusher.min.js");const e=new Pusher(n().forum.attribute("pusherKey"),{authEndpoint:"".concat(n().forum.attribute("apiUrl"),"/pusher/auth"),cluster:n().forum.attribute("pusherCluster"),auth:{headers:{"X-CSRF-Token":n().session.csrfToken}}});return{channels:{main:e.subscribe("public"),user:n().session.user?e.subscribe("private-user".concat(n().session.user.id())):null},pusher:e}})(),n().pushedUpdates=[],(0,o.extend)(i().prototype,"oncreate",(function(){n().pusher.then((e=>{e.pusher.bind("newPost",(e=>{const t=n().discussions.getParams();if(!t.q&&!t.sort&&!t.filter){if(t.tags){const s=n().store.getBy("tags","slug",t.tags),o=null==s?void 0:s.id();if(!o||!e.tagIds.includes(o))return}const s=String(e.discussionId);n().current.get("discussion")&&s===n().current.get("discussion").id()||-1!==n().pushedUpdates.indexOf(s)||(n().pushedUpdates.push(s),n().current.matches(c())&&n().setTitleCount(n().pushedUpdates.length),m.redraw())}}))}))})),(0,o.extend)(i().prototype,"onremove",(function(){n().pusher.then((e=>{e.pusher.unbind("newPost")}))})),(0,o.extend)(i().prototype,"view",(function(e){if(n().pushedUpdates){const t=n().pushedUpdates.length;t&&"object"==typeof e&&e&&"children"in e&&e.children instanceof Array&&e.children.unshift(m(l(),{className:"Button Button--block DiscussionList-update",onclick:()=>{this.attrs.state.refresh().then((()=>{this.loadingUpdated=!1,n().pushedUpdates=[],n().setTitleCount(0),m.redraw()})),this.loadingUpdated=!0},loading:this.loadingUpdated},n().translator.trans("flarum-pusher.forum.discussion_list.show_updates_text",{count:t})))}})),(0,o.extend)(a().prototype,"oncreate",(function(){n().pusher.then((e=>{e.pusher.bind("newPost",(e=>{var t;const s=String(e.discussionId),o=null==(t=this.discussion)?void 0:t.id();if(this.discussion&&o===s&&this.stream){var r;const e=null!=(r=this.discussion.commentCount())?r:0;n().store.find("discussions",o).then((()=>{var t,s,o;null==(t=this.stream)||t.update().then(m.redraw),document.hasFocus()||(n().setTitleCount(Math.max(0,(null!=(s=null==(o=this.discussion)?void 0:o.commentCount())?s:0)-e)),window.addEventListener("focus",(()=>n().setTitleCount(0)),{once:!0}))}))}}))}))})),(0,o.extend)(a().prototype,"onremove",(function(){n().pusher.then((e=>{e.pusher.unbind("newPost")}))})),(0,o.extend)(c().prototype,"actionItems",(e=>{e.remove("refresh")})),n().pusher.then((e=>{const t=e.channels;t.user&&t.user.bind("notification",(()=>{var e,t;n().session.user&&n().session.user.pushAttributes({unreadNotificationCount:null!=(e=n().session.user.unreadNotificationCount())?e:1,newNotificationCount:null!=(t=n().session.user.newNotificationCount())?t:1}),n().notifications.clear(),m.redraw()}))}))}))})(),module.exports=t})();
(()=>{var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{"use strict";const t=flarum.reg.get("core","forum/app");var s=e.n(t);const n=flarum.reg.get("core","common/extend"),o=flarum.reg.get("core","forum/components/DiscussionList");var r=e.n(o);const i=flarum.reg.get("core","forum/components/DiscussionPage");var u=e.n(i);const a=flarum.reg.get("core","forum/components/IndexPage");var c=e.n(a);const d=flarum.reg.get("core","common/components/Button");var p=e.n(d);s().initializers.add("flarum-pusher",(()=>{s().pusher=(async()=>{await import("//cdn.jsdelivr.net/npm/pusher-js@7.0.3/dist/web/pusher.min.js");const e=new Pusher(s().forum.attribute("pusherKey"),{authEndpoint:`${s().forum.attribute("apiUrl")}/pusher/auth`,cluster:s().forum.attribute("pusherCluster"),auth:{headers:{"X-CSRF-Token":s().session.csrfToken}}});return{channels:{main:e.subscribe("public"),user:s().session.user?e.subscribe(`private-user${s().session.user.id()}`):null},pusher:e}})(),s().pushedUpdates=[],(0,n.extend)(r().prototype,"oncreate",(function(){s().pusher.then((e=>{e.pusher.bind("newPost",(e=>{const t=s().discussions.getParams();if(!t.q&&!t.sort&&!t.filter){if(t.tags){const n=s().store.getBy("tags","slug",t.tags),o=n?.id();if(!o||!e.tagIds.includes(o))return}const n=String(e.discussionId);s().current.get("discussion")&&n===s().current.get("discussion").id()||-1!==s().pushedUpdates.indexOf(n)||(s().pushedUpdates.push(n),s().current.matches(c())&&s().setTitleCount(s().pushedUpdates.length),m.redraw())}}))}))})),(0,n.extend)(r().prototype,"onremove",(function(){s().pusher.then((e=>{e.pusher.unbind("newPost")}))})),(0,n.extend)(r().prototype,"view",(function(e){if(s().pushedUpdates){const t=s().pushedUpdates.length;t&&"object"==typeof e&&e&&"children"in e&&e.children instanceof Array&&e.children.unshift(m(p(),{className:"Button Button--block DiscussionList-update",onclick:()=>{this.attrs.state.refresh().then((()=>{this.loadingUpdated=!1,s().pushedUpdates=[],s().setTitleCount(0),m.redraw()})),this.loadingUpdated=!0},loading:this.loadingUpdated},s().translator.trans("flarum-pusher.forum.discussion_list.show_updates_text",{count:t})))}})),(0,n.extend)(u().prototype,"oncreate",(function(){s().pusher.then((e=>{e.pusher.bind("newPost",(e=>{const t=String(e.discussionId),n=this.discussion?.id();if(this.discussion&&n===t&&this.stream){const e=this.discussion.commentCount()??0;s().store.find("discussions",n).then((()=>{this.stream?.update().then(m.redraw),document.hasFocus()||(s().setTitleCount(Math.max(0,(this.discussion?.commentCount()??0)-e)),window.addEventListener("focus",(()=>s().setTitleCount(0)),{once:!0}))}))}}))}))})),(0,n.extend)(u().prototype,"onremove",(function(){s().pusher.then((e=>{e.pusher.unbind("newPost")}))})),(0,n.extend)(c().prototype,"actionItems",(e=>{e.remove("refresh")})),s().pusher.then((e=>{const t=e.channels;t.user&&t.user.bind("notification",(()=>{s().session.user&&s().session.user.pushAttributes({unreadNotificationCount:s().session.user.unreadNotificationCount()??1,newNotificationCount:s().session.user.newNotificationCount()??1}),s().notifications.clear(),m.redraw()}))}))}))})(),module.exports={}})();
//# sourceMappingURL=forum.js.map

File diff suppressed because one or more lines are too long