{"version":3,"sources":["webpack:///./resources/js/src/app/components/pageDesign/Popper.vue?782b","webpack:///./resources/js/src/app/components/pageDesign/Popper.vue?032f","webpack:///resources/js/src/app/components/pageDesign/Popper.vue","webpack:///./resources/js/src/app/components/pageDesign/Popper.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","ref","staticClass","_t","_m","_v","class","classNames","bodyClass","style","bodyStyle","_withStripped","component","options","__file"],"mappings":"kGAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,IAAMF,EACzB,OAAOE,EAAG,MAAO,CACfA,EACE,MACA,CAAEE,IAAK,SAAUC,YAAa,iBAC9B,CAACP,EAAIQ,GAAG,SAAU,CAACR,EAAIS,GAAG,MAC1B,GAEFT,EAAIU,GAAG,KACPN,EACE,MACA,CACEE,IAAK,OACLC,YAAa,0BACbI,MAAOX,EAAIY,YAEb,CACER,EAAG,KAAM,CAAEG,YAAa,kBAAoB,CAACP,EAAIQ,GAAG,UAAW,GAC/DR,EAAIU,GAAG,KACPN,EACE,MACA,CACEG,YAAa,eACbI,MAAOX,EAAIa,UACXC,MAAOd,EAAIe,WAEb,CAACf,EAAIQ,GAAG,YACR,GAEFR,EAAIU,GAAG,KACPN,EAAG,MAAO,CAAEE,IAAK,QAASC,YAAa,eAe/CR,EAAOiB,eAAgB,E,oCChDuL,ECkC9M,CACE,MAAF,CACI,UAAJ,CACM,KAAN,OACM,QAAN,QAEI,QAAJ,CACM,KAAN,OACM,QAAN,SAEI,aAAJ,CACM,KAAN,OACM,QAAN,IAEI,UAAJ,CACM,KAAN,OACM,QAAN,IAEI,UAAJ,CACM,KAAN,OACM,QAAN,KAIE,QAxBF,WAyBI,IAAJ,OACI,KAAJ,sBAEA,wDAEQ,EAAR,mBAGM,IAAN,8BAEA,gBAEQ,OAAR,YAAQ,CAAR,GACA,+BAEU,EAAV,oBAOE,UA/CF,WAiDI,KAAJ,iBACI,OAAJ,kDAGE,KArDF,WAuDI,MAAJ,CACM,WAAN,EACM,OAAN,KACM,cAAN,OAIE,SACF,CACI,WADJ,WAIM,IAAN,wCAEM,OAAN,0CAIE,QACF,CACI,iBADJ,WAGM,IAAN,kBAEA,oBAEQ,EAAR,6BACQ,SAAR,qBAGM,KAAN,qBACA,uDACA,EACA,CACQ,UAAR,eACQ,UAAR,CACU,MAAV,CACY,QAAZ,mBAGQ,iBAAR,IAIM,KAAN,qBAGI,kBA5BJ,WA6BM,IAAN,OACM,KAAN,2DAGQ,EAAR,aAEQ,YAAR,WACU,EAAV,gCACA,MAGM,IAAN,yDAEA,wBAEQ,EAAR,qCAEU,EAAV,gBAEQ,EAAR,oCAEU,EAAV,iBAKQ,EAAR,0CAEU,EAAV,mBAKI,aA9DJ,WAgEM,KAAN,0BACM,KAAN,UAGI,WApEJ,WAsEM,KAAN,aACM,KAAN,UAGI,WA1EJ,WA4EM,KAAN,aACM,KAAN,UAGI,OAhFJ,WAkFA,0BAEQ,KAAR,2B,OCzLIC,EAAY,YACd,EACAlB,EH6BoB,CACpB,WACE,IACIG,EADMD,KACGE,eACTC,EAFMH,KAEGI,MAAMD,IAAMF,EACzB,OAAOE,EAAG,SAAU,CAAEG,YAAa,qCAAuC,CACxEH,EAAG,IAAK,CAAEG,YAAa,oBGjC3B,EACA,KACA,KACA,MAuBFU,EAAUC,QAAQC,OAAS,wDACZ,UAAAF,E","file":"chunks/ceres-51.min.js","sourcesContent":["var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", [\n _c(\n \"div\",\n { ref: \"handle\", staticClass: \"popper-handle\" },\n [_vm._t(\"handle\", [_vm._m(0)])],\n 2\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n ref: \"node\",\n staticClass: \"popover bs-popover-auto\",\n class: _vm.classNames\n },\n [\n _c(\"h3\", { staticClass: \"popover-header\" }, [_vm._t(\"title\")], 2),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"popover-body\",\n class: _vm.bodyClass,\n style: _vm.bodyStyle\n },\n [_vm._t(\"content\")],\n 2\n ),\n _vm._v(\" \"),\n _c(\"div\", { ref: \"arrow\", staticClass: \"arrow\" })\n ]\n )\n ])\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"button\", { staticClass: \"btn btn-icon btn-secondary btn-sm\" }, [\n _c(\"i\", { staticClass: \"fa fa-info\" })\n ])\n }\n]\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Popper.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Popper.vue?vue&type=script&lang=js&\"","<template>\n \t<div>\n\t\t<div class=\"popper-handle\" ref=\"handle\">\n\t\t\t<slot name=\"handle\">\n\t\t\t\t<!--Element to trigger popper -->\n <button class=\"btn btn-icon btn-secondary btn-sm\">\n <i class=\"fa fa-info\"></i>\n </button>\n\t\t\t</slot>\n\t\t</div>\n\n\t\t<div ref=\"node\" class=\"popover bs-popover-auto\" :class=\"classNames\">\n\t\t\t<h3 class=\"popover-header\">\n\t\t\t\t<slot name=\"title\">\n\t\t\t\t\t<!-- {# Title to display in the popper #} -->\n\t\t\t\t</slot>\n\t\t\t</h3>\n\t\t\t<div class=\"popover-body\" :class=\"bodyClass\" :style=\"bodyStyle\">\n\t\t\t\t<slot name=\"content\">\n\t\t\t\t\t<!-- {# Content to display in the popper #} -->\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t\t<div class=\"arrow\" ref=\"arrow\"></div>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { isNullOrUndefined } from \"../../helper/utils\";\nimport { findParent } from \"../../helper/dom\";\nimport { findModal } from \"../../services/ModalService\";\nimport Vue from \"vue\";\nimport Popper from \"popper.js\";\n\nexport default {\n props: {\n placement: {\n type: String,\n default: \"auto\"\n },\n trigger: {\n type: String,\n default: \"click\"\n },\n popoverClass: {\n type: String,\n default: \"\"\n },\n bodyClass: {\n type: String,\n default: \"\"\n },\n bodyStyle: {\n type: String,\n default: \"\"\n }\n },\n\n mounted()\n {\n this.$nextTick(() =>\n {\n if (!isNullOrUndefined(this.$refs.node) && !isNullOrUndefined(this.$refs.handle))\n {\n this.initializePopper();\n }\n\n const parentModal = findParent(this.$el, \".modal\");\n\n if (!isNullOrUndefined(parentModal))\n {\n findModal(parentModal)\n .on(\"hide.bs.modal\", () =>\n {\n this.hidePopper();\n });\n }\n\n });\n },\n\n destroyed()\n {\n this.popper.destroy();\n window.removeEventListener(\"resize\", this.eventListener);\n },\n\n data()\n {\n return {\n isVisible: false,\n popper: null,\n eventListener: null\n };\n },\n\n computed:\n {\n classNames()\n {\n // in the shopbuilder we need to hide the popper completely, to hide the dropzone\n const hideClass = App.isShopBuilder ? \" d-none\" : \" hidden\";\n\n return this.popoverClass + (!this.isVisible ? hideClass : \"\");\n }\n },\n\n methods:\n {\n initializePopper()\n {\n const node = this.$refs.node;\n\n if (!App.isShopBuilder)\n {\n node.parentElement.removeChild(node);\n document.body.appendChild(node);\n }\n\n this.popper = new Popper(\n (this.$refs.handle.firstElementChild || this.$refs.handle),\n node,\n {\n placement: this.placement,\n modifiers: {\n arrow: {\n element: this.$refs.arrow\n }\n },\n removeOnDestroy: true\n }\n );\n\n this.addEventListeners();\n },\n \n addEventListeners()\n {\n this.eventListener = window.addEventListener(\"resize\", () =>\n {\n // popper's position needs to be reset after a resize, to prevent the overflow, after switching from landscape to normal\n this.hidePopper();\n\n setTimeout(() => {\n this.$refs.node.style.transform = \"\";\n }, 0);\n });\n\n const handle = this.$refs.handle.firstElementChild || this.$refs.handle;\n\n if (this.trigger === \"focus\")\n {\n handle.addEventListener(\"focus\", () =>\n {\n this.showPopper();\n });\n handle.addEventListener(\"blur\", () =>\n {\n this.hidePopper();\n });\n }\n else\n {\n handle.addEventListener(this.trigger, () =>\n {\n this.togglePopper();\n });\n }\n },\n\n togglePopper()\n {\n this.isVisible = !this.isVisible;\n this.update();\n },\n\n showPopper()\n {\n this.isVisible = true;\n this.update();\n },\n\n hidePopper()\n {\n this.isVisible = false;\n this.update();\n },\n\n update()\n {\n if (!isNullOrUndefined(this.popper))\n {\n this.popper.scheduleUpdate();\n }\n }\n }\n}\n</script>\n","import { render, staticRenderFns } from \"./Popper.vue?vue&type=template&id=00b0102c&\"\nimport script from \"./Popper.vue?vue&type=script&lang=js&\"\nexport * from \"./Popper.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/runner/work/plugin-ceres/plugin-ceres/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('00b0102c')) {\n api.createRecord('00b0102c', component.options)\n } else {\n api.reload('00b0102c', component.options)\n }\n module.hot.accept(\"./Popper.vue?vue&type=template&id=00b0102c&\", function () {\n api.rerender('00b0102c', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"resources/js/src/app/components/pageDesign/Popper.vue\"\nexport default component.exports"],"sourceRoot":""}