blob: 8b1d43a5c9fa160ab653bcecd162718fbf64760d [file] [log] [blame]
{"version":3,"file":"tobago-popover.js","sourceRoot":"../ts/","sources":["tobago-popover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8BAA8B;AAC9B,4DAA4D;AAC5D,4DAA4D;AAC5D,+DAA+D;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,oDAAoD,CAAC;AAC3E,8DAA8D;AAE9D,MAAM,aAAc,SAAQ,WAAW;IAIrC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;YACvC,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAY,SAAS;QACnB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;QACzD,OAAO,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;IACtD,CAAC;CACF;AAED,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,UAAU,KAAY;IAC7D,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,IAAI,EAAE;QACvD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC,CAAC","sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// XXX which? nothing works...\n// import * as bootstrap from \"bootstrap/dist/js/bootstrap\";\n// import Popover from \"bootstrap/dist/js/bootstrap.bundle\";\n// import {createPopper} from \"@popperjs/core/dist/esm/popper\";\nimport {Popover} from \"../node_modules/tobago-core/node_modules/bootstrap\";\n// import {Popover} from \"bootstrap/dist/js/bootstrap.bundle\";\n\nclass TobagoPopover extends HTMLElement {\n\n private popover: Popover;\n\n constructor() {\n super();\n }\n\n connectedCallback(): void {\n this.popover = new Popover(this.trigger, {\n container: this.menuStore\n });\n }\n\n get trigger(): HTMLElement {\n return this;\n }\n\n private get menuStore(): HTMLDivElement {\n const root = this.getRootNode() as ShadowRoot | Document;\n return root.querySelector(\".tobago-page-menuStore\");\n }\n}\n\ndocument.addEventListener(\"tobago.init\", function (event: Event): void {\n if (window.customElements.get(\"tobago-popover\") == null) {\n window.customElements.define(\"tobago-popover\", TobagoPopover);\n }\n});\n"]}