{"version":3,"sources":["webpack:///resources/js/src/app/components/pageDesign/Popper.vue","webpack:///./resources/js/src/app/components/pageDesign/Popper.vue?782b","webpack:///./resources/js/src/app/components/pageDesign/Popper.vue","webpack:///./resources/js/src/app/components/pageDesign/Popper.vue?032f","webpack:///./resources/js/src/app/components/pageDesign/Popper.vue?5ffe"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA,kBADA;AAEA;AAFA,KADA;AAKA;AACA,kBADA;AAEA;AAFA,KALA;AASA;AACA,kBADA;AAEA;AAFA,KATA;AAaA;AACA,kBADA;AAEA;AAFA,KAbA;AAiBA;AACA,kBADA;AAEA;AAFA;AAjBA,GADA;AAwBA,SAxBA,qBAyBA;AAAA;;AACA,+BACA;AACA,sMACA;AACA;AACA;;AAEA;;AAEA,iGACA;AACA,8FACA,EADA,CACA,eADA,EACA,YACA;AACA;AACA,SAJA;AAKA;AAEA,KAlBA;AAmBA,GA7CA;AA+CA,WA/CA,uBAgDA;AACA;AACA;AACA,GAnDA;AAqDA,MArDA,kBAsDA;AACA;AACA,sBADA;AAEA,kBAFA;AAGA;AAHA;AAKA,GA5DA;AA8DA,YACA;AACA,cADA,wBAEA;AACA;AACA;AAEA;AACA;AAPA,GA/DA;AAyEA,WACA;AACA,oBADA,8BAEA;AACA;;AAEA,8BACA;AACA;AACA;AACA;;AAEA,0EACA,wDADA,EAEA,IAFA,EAGA;AACA,iCADA;AAEA;AACA;AACA;AADA;AADA,SAFA;AAOA;AAPA,OAHA;AAcA;AACA,KA1BA;AA4BA,qBA5BA,+BA6BA;AAAA;;AACA,yEACA;AACA;AACA;;AAEA;AACA;AACA,SAFA,EAEA,CAFA;AAGA,OARA;AAUA;;AAEA,oCACA;AACA,qDACA;AACA;AACA,SAHA;AAIA,oDACA;AACA;AACA,SAHA;AAIA,OAVA,MAYA;AACA,0DACA;AACA;AACA,SAHA;AAIA;AACA,KA5DA;AA8DA,gBA9DA,0BA+DA;AACA;AACA;AACA,KAlEA;AAoEA,cApEA,wBAqEA;AACA;AACA;AACA,KAxEA;AA0EA,cA1EA,wBA2EA;AACA;AACA;AACA,KA9EA;AAgFA,UAhFA,oBAiFA;AACA,iGACA;AACA;AACA;AACA;AAtFA;AA1EA,G;;;;;;;;;;;;AClCA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,8CAA8C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,kBAAkB,gCAAgC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,mBAAmB,qCAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,mDAAmD;AAC5E,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;;;;;;;;;;;;;;AChDA;AAAA;AAAA;AAAA;AAAqF;AAC3B;AACL;;;AAGrD;AACsG;AACtG,gBAAgB,2GAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,iFAAM;AACR,EAAE,0FAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;ACtCf;AAAA;AAAA,wCAA8L,CAAgB,0OAAG,EAAC,C;;;;;;;;;;;;ACAlN;AAAA;AAAA;AAAA;AAAA;AAAA","file":"chunks/ceres-46.js","sourcesContent":["<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","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 { 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","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&\"","export * from \"-!../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Popper.vue?vue&type=template&id=00b0102c&\""],"sourceRoot":""}