mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
1 line
3.4 KiB
Plaintext
1 line
3.4 KiB
Plaintext
{"version":3,"sources":["../src/message_drawer_helper.js"],"names":["define","PubSub","MessageDrawerEvents","createConversationWithUser","args","publish","CREATE_CONVERSATION_WITH_USER","hide","HIDE","show","SHOW","showConversation","SHOW_CONVERSATION","showSettings","SHOW_SETTINGS"],"mappings":"AAuBAA,OAAM,sCACN,CACI,aADJ,CAEI,oCAFJ,CADM,CAKN,SACIC,CADJ,CAEIC,CAFJ,CAGE,CAyCE,MAAO,CACHC,0BAA0B,CAnCG,QAA7BA,CAAAA,0BAA6B,CAASC,CAAT,CAAe,CAC5CH,CAAM,CAACI,OAAP,CAAeH,CAAmB,CAACI,6BAAnC,CAAkEF,CAAlE,CACH,CAgCM,CAEHG,IAAI,CA7BG,QAAPA,CAAAA,IAAO,EAAW,CAClBN,CAAM,CAACI,OAAP,CAAeH,CAAmB,CAACM,IAAnC,CACH,CAyBM,CAGHC,IAAI,CAvBG,QAAPA,CAAAA,IAAO,EAAW,CAClBR,CAAM,CAACI,OAAP,CAAeH,CAAmB,CAACQ,IAAnC,CACH,CAkBM,CAIHC,gBAAgB,CAfG,QAAnBA,CAAAA,gBAAmB,CAASP,CAAT,CAAe,CAClCH,CAAM,CAACI,OAAP,CAAeH,CAAmB,CAACU,iBAAnC,CAAsDR,CAAtD,CACH,CASM,CAKHS,YAAY,CATG,QAAfA,CAAAA,YAAe,EAAW,CAC1BZ,CAAM,CAACI,OAAP,CAAeH,CAAmB,CAACY,aAAnC,CACH,CAEM,CAOV,CAxDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Provides some helper functions to trigger actions in the message drawer.\n *\n * @module core_message/message_drawer_helper\n * @package message\n * @copyright 2018 Ryan Wyllie <ryan@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(\n[\n 'core/pubsub',\n 'core_message/message_drawer_events'\n],\nfunction(\n PubSub,\n MessageDrawerEvents\n) {\n\n /**\n * Trigger an event to create a new conversation in the message drawer.\n *\n * @param {Number} userId The user id to start a conversation.\n */\n var createConversationWithUser = function(args) {\n PubSub.publish(MessageDrawerEvents.CREATE_CONVERSATION_WITH_USER, args);\n };\n\n /**\n * Trigger an event to hide the message drawer.\n */\n var hide = function() {\n PubSub.publish(MessageDrawerEvents.HIDE);\n };\n\n /**\n * Trigger an event to show the message drawer.\n */\n var show = function() {\n PubSub.publish(MessageDrawerEvents.SHOW);\n };\n\n /**\n * Trigger an event to show the given conversation.\n *\n * @param {int} conversationId Id for the conversation to show.\n */\n var showConversation = function(args) {\n PubSub.publish(MessageDrawerEvents.SHOW_CONVERSATION, args);\n };\n\n /**\n * Trigger an event to show messaging settings.\n */\n var showSettings = function() {\n PubSub.publish(MessageDrawerEvents.SHOW_SETTINGS);\n };\n\n return {\n createConversationWithUser: createConversationWithUser,\n hide: hide,\n show: show,\n showConversation: showConversation,\n showSettings: showSettings\n };\n});\n"],"file":"message_drawer_helper.min.js"} |