@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 3.77 kB
JavaScript
/*!
*
* @rocketspark/domain-checker v0.0.34
* https://github.com/rocketspark/domain-checker.git
*
* Copyright (c) Lee Reichardt and project contributors.
*
* This source code is licensed under the no license license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[890],{1890:function(t,s,o){o.r(s),o.d(s,{rs_popup:function(){return i}});var e=o(7915);const i=class{constructor(t){(0,e.r)(this,t),this.rsClose=(0,e.c)(this,"rsClose",7),this.rsOpen=(0,e.c)(this,"rsOpen",7),this.scrolledToBottom=(0,e.c)(this,"scrolledToBottom",7),this.backDropCloseHandler=()=>{this.backdropClose&&this.closeHandler()},this.doClosePopup=()=>{this.el.style.opacity="0",setTimeout((()=>{this.el.style.display="none"}),150)},this.closeHandler=()=>{this.doClosePopup(),this.rsClose.emit()},this.renderCloseButton=()=>{let t=null;return this.closeButton&&(t=(0,e.h)("rs-icon",{class:"rs-popup__close",name:"fine-x",color:"secondary",size:20,onClick:this.closeHandler})),t},this.renderHelpButton=()=>{let t=null;return this.helpLink&&"string"==typeof this.helpLink&&(t=(0,e.h)("a",{href:this.helpLink,target:"_blank",class:"rs-popup__help"},(0,e.h)("rs-icon",{class:"rs-popup__help-icon",name:"help",color:"secondary",size:22}))),t},this.hasScrolledToTheBottom=()=>{this.rsPopupBody.scrollHeight-this.rsPopupBody.scrollTop-this.rsPopupBody.clientHeight<2&&this.scrolledToBottom.emit()},this.closeButton=!0,this.helpLink=!1,this.heading="",this.headingAlignment="left",this.backdrop=!0,this.backdropClose=!0,this.zIndex=1,this.width="724px",this.height="auto",this.top="50%",this.left="50%",this.right="unset",this.bottom="unset",this.transform="translate(-50%, -50%)",this.position="fixed"}async close(){this.doClosePopup()}async open(){this.el.style.display="block",setTimeout((()=>{this.el.style.opacity="1"})),this.rsOpen.emit()}render(){return(0,e.h)(e.H,{style:{"z-index":this.zIndex.toString()}},this.backdrop?(0,e.h)("div",{class:"rs-popup__backdrop",onClick:this.backDropCloseHandler}):"",(0,e.h)("div",{class:"rs-popup__inner rs-component-shadow--popup",style:{position:this.position,top:this.top,right:this.right,bottom:this.bottom,left:this.left,transform:this.transform,width:this.width,height:this.height}},(0,e.h)("div",{class:"rs-popup__header"},(0,e.h)("rs-header",{heading:"4",color:"heading",style:{width:"center"===this.headingAlignment?"100%":null,textAlign:this.headingAlignment}},this.heading),(0,e.h)("slot",{name:"header"}),(0,e.h)("rs-item",{class:"rs-popup__controls","align-items":"center"},this.renderHelpButton(),this.renderCloseButton())),(0,e.h)("div",{class:"rs-popup__body",ref:t=>this.rsPopupBody=t,onScroll:this.hasScrolledToTheBottom},(0,e.h)("slot",null))))}get el(){return(0,e.g)(this)}};i.style=":host{display:none;opacity:0;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1);z-index:1;position:fixed;top:0;left:0;bottom:0;right:0}:host .rs-popup__backdrop{display:block;width:100%;height:100%;position:fixed;top:0;left:0;background:var(--rs-color-grey-light);opacity:0.8}:host .rs-popup__inner{display:flex;flex-direction:column;width:724px;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);background-color:var(--rs-color-white);border-radius:10px;box-shadow:var(--rs-shadow-popup);box-sizing:border-box;overflow:hidden}:host .rs-popup__header{display:flex;align-items:center;justify-content:space-between;padding:25px;box-sizing:border-box;border-bottom:1px solid var(--rs-color-light)}:host .rs-popup__close{cursor:pointer;margin-left:17px}:host .rs-popup__help{cursor:pointer}:host .rs-popup__body{position:relative;padding:25px;overflow-y:auto}"}}]);
//# sourceMappingURL=890.index.js.map