graphdb-workbench
Version:
The web application for GraphDB APIs
1 lines • 1.73 kB
JavaScript
import{h,Host}from"@stencil/core";export class OntoCookieConsent{constructor(){this.showModal=!1,this.openModal=e=>{e.preventDefault(),this.showModal=!0},this.handleConsentClick=()=>{this.consentGiven.emit()}}onDialogClose(){this.showModal=!1}render(){return h(Host,{key:"dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d"},h("div",{key:"414c970a3a4b263e8f3f5d066dc8bb22b8194c48",class:"cookie-consent-modal"},h("section",{key:"6a1cccadb167b301738fb6a453b7d300e93ba18b",class:"cookie-consent-content"},h("span",{key:"aa62410b522125feeb48eaa568a78c761e6b9596"},h("translate-label",{key:"0696068c1aa8738bb3ddf0e548d9140ba12609e1",labelKey:"cookie.cookie_consent"}),h("a",{key:"efd9792a6a424b86606b3904615c53f19a2cdb6e",id:"cookie-policy-link",href:"#",onClick:this.openModal,class:"btn btn-link p-0"},h("translate-label",{key:"12e95d1446f81b47c973e285ee71da5fbfa4934f",labelKey:"cookie.cookie_policy_url_label"})),"."),h("button",{key:"a91e7d9e7eddef1b50d82570f4211a0e1e1ae7b0",id:"accept-cookie-policy",class:"onto-btn onto-btn-primary",onClick:this.handleConsentClick},h("translate-label",{key:"5ca81d4f299a7b7f13ed0f77ac7d1ceaeaad318a",labelKey:"common.button.ok"})))),this.showModal&&h("onto-cookie-policy-dialog",{key:"e54d3f134771ff5f59a288d0d6c9949c6f59567f",dialogHandler:this}))}static get is(){return"onto-cookie-consent"}static get originalStyleUrls(){return{$:["onto-cookie-consent.scss"]}}static get styleUrls(){return{$:["onto-cookie-consent.css"]}}static get states(){return{showModal:{}}}static get events(){return[{method:"consentGiven",name:"consentGiven",bubbles:!0,cancelable:!0,composed:!0,docs:{tags:[],text:"Event emitter for when consent is given"},complexType:{original:"void",resolved:"void",references:{}}}]}}