| Current Path : /var/www/homesaver/www/bitrix/js/ui/vue3/components/popup/dist/ |
| Current File : /var/www/homesaver/www/bitrix/js/ui/vue3/components/popup/dist/popup.bundle.min.js |
this.BX=this.BX||{};this.BX.UI=this.BX.UI||{};this.BX.UI.Vue3=this.BX.UI.Vue3||{};(function(o,t,p){"use strict";let e=o=>o,n;const s={name:"Popup",emits:["close"],props:{options:{type:Object,default:{}}},data(){return{isPopupShown:false,popupContentId:`ui-vue3-popup-${t.Text.getRandom()}`}},popup:null,mounted(){var o;const s=(o=this.options.events)!=null?o:{};this.popup=new p.Popup({...this.options,cacheable:false,content:t.Tag.render(n||(n=e`<div id="${0}"></div>`),this.popupContentId),events:{...s,onPopupShow:(...o)=>{this.isPopupShown=true;void this.$nextTick((()=>{this.popup.adjustPosition()}));if(t.Type.isFunction(s.onPopupShow)){s.onPopupShow(...o)}},onPopupAfterClose:(...o)=>{this.isPopupShown=false;this.$emit("close");if(t.Type.isFunction(s.onPopupAfterClose)){s.onPopupAfterClose(...o)}}}});this.popup.show()},beforeUnmount(){var o;(o=this.popup)==null?void 0:o.close()},template:`\n\t\t<Teleport v-if="isPopupShown" :to="'#' + popupContentId">\n\t\t\t<slot/>\n\t\t</Teleport>\n\t`};o.Popup=s})(this.BX.UI.Vue3.Components=this.BX.UI.Vue3.Components||{},BX,BX.Main);
//# sourceMappingURL=popup.bundle.map.js