File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/im/application/notifications/dist/notifications.bundle.min.js
Back
this.BX=this.BX||{};this.BX.Messenger=this.BX.Messenger||{};(function(t,e,n,i,r){"use strict"; /** * Bitrix Im * Core application * * @package bitrix * @subpackage im * @copyright 2001-2020 Bitrix */var o=function(){function t(){var e=this;var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};babelHelpers.classCallCheck(this,t);this.inited=false;this.initPromise=new BX.Promise;this.params=i;this.template=null;this.rootNode=this.params.node||document.createElement("div");this.legacyMode=this.params.mode==="legacy";this.initCounter=this.params.initCounter||null;this.templateTemp=null;this.eventBus=new n.VueVendorV2;this.initCore().then((function(){return e.initParams()})).then((function(){return e.initComponent(e.legacyMode)})).then((function(){return e.initPullClient()})).then((function(){return e.initPullHandlers()})).then((function(){return e.initComplete()}))}babelHelpers.createClass(t,[{key:"initPullClient",value:function t(){this.pullClient=BX.PULL;return new Promise((function(t,e){return t()}))}},{key:"initPullHandlers",value:function t(){this.pullClient.subscribe(new r.ImNotificationsPullHandler({store:this.controller.getStore(),application:this,controller:this.controller}));return new Promise((function(t,e){return t()}))}},{key:"initCore",value:function t(){var n=this;return new Promise((function(t,i){e.Core.ready().then((function(e){n.controller=e;t()}))}))}},{key:"initParams",value:function t(){var e=this;if(this.initCounter){this.controller.getStore().dispatch("notifications/setCounter",{unreadTotal:this.initCounter})}this.controller.getStore().subscribe((function(t){return e.eventStoreInteraction(t)}));return new Promise((function(t,e){return t()}))}},{key:"initComponent",value:function t(e){var n=this;if(e){return new Promise((function(t,e){return t()}))}var i;if(this.legacyMode){i="<bx-im-component-notifications/>"}else{i='<div style="height: 400px; border: 1px solid #ccc;">\n\t\t\t\t<bx-im-component-notifications/>\n\t\t\t</div>'}return this.controller.createVue(this,{el:this.rootNode,template:i}).then((function(t){n.template=t;n.template.$el.id=n.rootNode.substr(1);return new Promise((function(t,e){return t()}))}))}},{key:"initComplete",value:function t(){this.inited=true;this.initPromise.resolve(this)}},{key:"ready",value:function t(){if(this.inited){var e=new BX.Promise;e.resolve(this);return e}return this.initPromise}},{key:"emit",value:function t(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.eventBus.$emit(e,n);return true}},{key:"listen",value:function t(e,n){if(typeof n!=="function"){return false}this.eventBus.$on(e,n);return true}},{key:"hasVueInstance",value:function t(){return this.template!==null}},{key:"destroyVueInstance",value:function t(){this.template.$destroy();this.template=null}},{key:"eventStoreInteraction",value:function t(e){if(e.type==="notifications/setCounter"){if(parseInt(e.payload)>=0){BXIM.notify.updateNotifyNextCount(parseInt(e.payload),true)}}}}]);return t}();t.NotificationsApplication=o})(this.BX.Messenger.Application=this.BX.Messenger.Application||{},BX.Messenger.Application,BX,BX.Messenger,BX.Messenger.Provider.Pull); //# sourceMappingURL=notifications.bundle.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings