mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
1.6 KiB
JavaScript
1 line
1.6 KiB
JavaScript
(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[8025],{18025:function(e,t,i){"use strict";i.r(t),i.d(t,{pwa_camera_modal_instance:function(){return o}});var n=i(75485);const o=class{constructor(e){(0,n.r)(this,e),this.noDevicesText="No camera found",this.noDevicesButtonText="Choose image",this.handlePhoto=async e=>{this.onPhoto.emit(e)},this.handleNoDeviceError=async e=>{this.noDeviceError.emit(e)},this.onPhoto=(0,n.c)(this,"onPhoto",7),this.noDeviceError=(0,n.c)(this,"noDeviceError",7)}handleBackdropClick(e){e.target!==this.el&&this.onPhoto.emit(null)}handleComponentClick(e){e.stopPropagation()}handleBackdropKeyUp(e){"Escape"===e.key&&this.onPhoto.emit(null)}render(){return(0,n.h)("div",{class:"wrapper",onClick:e=>this.handleBackdropClick(e)},(0,n.h)("div",{class:"content"},(0,n.h)("pwa-camera",{onClick:e=>this.handleComponentClick(e),handlePhoto:this.handlePhoto,handleNoDeviceError:this.handleNoDeviceError,noDevicesButtonText:this.noDevicesButtonText,noDevicesText:this.noDevicesText})))}get el(){return(0,n.g)(this)}static get style(){return":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper,:host{display:-ms-flexbox;display:flex}.wrapper{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0,0,0,.15)}.content{-webkit-box-shadow:0 0 5px rgba(0,0,0,.2);box-shadow:0 0 5px rgba(0,0,0,.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width:600px){.content{width:100%;height:100%}}"}}}}]); |