@everymatrix/lottery-tipping-dialog 1.87.21 → 1.87.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryTippingDialog = require('./lottery-tipping-dialog-2d1e9c0b.js');
5
+ const lotteryTippingDialog = require('./lottery-tipping-dialog-a529778c.js');
6
6
  require('./index-8fa36c42.js');
7
7
 
8
8
 
@@ -207,7 +207,7 @@ const LotteryTippingDialog = class {
207
207
  maxHeight: 'calc(100vh - 62px)',
208
208
  overflowY: 'auto'
209
209
  };
210
- return (index.h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), index.h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, index.h("div", { key: '30ca33b925ff2525ead8aae83e72031258367b40', class: "dialog-header" }, index.h("h2", { key: '492c3e864ac1547da58b0a47e4cc8d45470bde54', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (index.h("button", { key: '8ae4b872d18ce82d33292dc794e8a1f714a96ba9', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), index.h("div", { key: 'd661c78b333f78b9dee92e0975f8b136ef5a3071', class: "dialog-content", style: contentStyle }, index.h("slot", { key: 'f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82' })), this.showFooter && (index.h("div", { key: '40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7', class: "dialog-footer" }, index.h("slot", { key: '91539def47d118a69735ec229e7a6b36fc1db40b', name: "footer" }, this.showCancelBtn && (index.h("button", { key: 'f3b3add23f150c660159a906c2ef23b5fbe3b4c5', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), index.h("button", { key: '5fc33e89b6c55ac9e2162302e128bce0e79c5f89', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
210
+ return (index.h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), index.h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, (this.dialogTitle || this.closable) && (index.h("div", { key: '04d54878aa24e0d9eb98bc921ea3edfacd6de3af', class: "dialog-header" }, index.h("h2", { key: 'f6f6c279de47e49cde86d0c907b9b40a115926b3', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (index.h("button", { key: 'e1625473e5460cd667961923bf678c9a91b69c82', class: "close-btn", onClick: this.handleClose.bind(this) }, "x")))), index.h("div", { key: 'fb0db8dd765832cf1d8e8b682131e4c97a93ac22', class: "dialog-content", style: contentStyle }, index.h("slot", { key: '75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508' })), this.showFooter && (index.h("div", { key: 'a305086a2830265317abb0fd6f59b4a053fd54a9', class: "dialog-footer" }, index.h("slot", { key: 'cb330ea63908002f4f8b4b8139d5843c2570302e', name: "footer" }, this.showCancelBtn && (index.h("button", { key: 'c3d2c15195e56efd6d388265e9ccb87030627b7b', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), index.h("button", { key: 'af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
211
211
  }
212
212
  get el() { return index.getElement(this); }
213
213
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryTippingDialog = require('./lottery-tipping-dialog-2d1e9c0b.js');
5
+ const lotteryTippingDialog = require('./lottery-tipping-dialog-a529778c.js');
6
6
  require('./index-8fa36c42.js');
7
7
 
8
8
 
@@ -88,7 +88,7 @@ export class LotteryTippingDialog {
88
88
  maxHeight: 'calc(100vh - 62px)',
89
89
  overflowY: 'auto'
90
90
  };
91
- return (h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, h("div", { key: '30ca33b925ff2525ead8aae83e72031258367b40', class: "dialog-header" }, h("h2", { key: '492c3e864ac1547da58b0a47e4cc8d45470bde54', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: '8ae4b872d18ce82d33292dc794e8a1f714a96ba9', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), h("div", { key: 'd661c78b333f78b9dee92e0975f8b136ef5a3071', class: "dialog-content", style: contentStyle }, h("slot", { key: 'f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82' })), this.showFooter && (h("div", { key: '40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7', class: "dialog-footer" }, h("slot", { key: '91539def47d118a69735ec229e7a6b36fc1db40b', name: "footer" }, this.showCancelBtn && (h("button", { key: 'f3b3add23f150c660159a906c2ef23b5fbe3b4c5', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), h("button", { key: '5fc33e89b6c55ac9e2162302e128bce0e79c5f89', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
91
+ return (h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, (this.dialogTitle || this.closable) && (h("div", { key: '04d54878aa24e0d9eb98bc921ea3edfacd6de3af', class: "dialog-header" }, h("h2", { key: 'f6f6c279de47e49cde86d0c907b9b40a115926b3', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: 'e1625473e5460cd667961923bf678c9a91b69c82', class: "close-btn", onClick: this.handleClose.bind(this) }, "x")))), h("div", { key: 'fb0db8dd765832cf1d8e8b682131e4c97a93ac22', class: "dialog-content", style: contentStyle }, h("slot", { key: '75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508' })), this.showFooter && (h("div", { key: 'a305086a2830265317abb0fd6f59b4a053fd54a9', class: "dialog-footer" }, h("slot", { key: 'cb330ea63908002f4f8b4b8139d5843c2570302e', name: "footer" }, this.showCancelBtn && (h("button", { key: 'c3d2c15195e56efd6d388265e9ccb87030627b7b', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), h("button", { key: 'af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
92
92
  }
93
93
  static get is() { return "lottery-tipping-dialog"; }
94
94
  static get encapsulation() { return "shadow"; }
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryTippingDialog } from './lottery-tipping-dialog-f19b42bc.js';
1
+ export { L as LotteryTippingDialog } from './lottery-tipping-dialog-d948d5a0.js';
2
2
  import './index-9dba6e0e.js';
@@ -205,7 +205,7 @@ const LotteryTippingDialog = class {
205
205
  maxHeight: 'calc(100vh - 62px)',
206
206
  overflowY: 'auto'
207
207
  };
208
- return (h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, h("div", { key: '30ca33b925ff2525ead8aae83e72031258367b40', class: "dialog-header" }, h("h2", { key: '492c3e864ac1547da58b0a47e4cc8d45470bde54', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: '8ae4b872d18ce82d33292dc794e8a1f714a96ba9', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), h("div", { key: 'd661c78b333f78b9dee92e0975f8b136ef5a3071', class: "dialog-content", style: contentStyle }, h("slot", { key: 'f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82' })), this.showFooter && (h("div", { key: '40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7', class: "dialog-footer" }, h("slot", { key: '91539def47d118a69735ec229e7a6b36fc1db40b', name: "footer" }, this.showCancelBtn && (h("button", { key: 'f3b3add23f150c660159a906c2ef23b5fbe3b4c5', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), h("button", { key: '5fc33e89b6c55ac9e2162302e128bce0e79c5f89', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
208
+ return (h("div", { key: '306683c5190fa6dca57dcf75e52eca575c0215e7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, h("div", { key: '8be097f3a86fcd9ad4e18c6ac56cafdcf249049b', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: '87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6', part: "dialog", class: computedDialogClass, style: computedDialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, (this.dialogTitle || this.closable) && (h("div", { key: '04d54878aa24e0d9eb98bc921ea3edfacd6de3af', class: "dialog-header" }, h("h2", { key: 'f6f6c279de47e49cde86d0c907b9b40a115926b3', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: 'e1625473e5460cd667961923bf678c9a91b69c82', class: "close-btn", onClick: this.handleClose.bind(this) }, "x")))), h("div", { key: 'fb0db8dd765832cf1d8e8b682131e4c97a93ac22', class: "dialog-content", style: contentStyle }, h("slot", { key: '75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508' })), this.showFooter && (h("div", { key: 'a305086a2830265317abb0fd6f59b4a053fd54a9', class: "dialog-footer" }, h("slot", { key: 'cb330ea63908002f4f8b4b8139d5843c2570302e', name: "footer" }, this.showCancelBtn && (h("button", { key: 'c3d2c15195e56efd6d388265e9ccb87030627b7b', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate('cancel', this.language))), h("button", { key: 'af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate('confirm', this.language))))))));
209
209
  }
210
210
  get el() { return getElement(this); }
211
211
  static get watchers() { return {
@@ -1,2 +1,2 @@
1
- export { L as lottery_tipping_dialog } from './lottery-tipping-dialog-f19b42bc.js';
1
+ export { L as lottery_tipping_dialog } from './lottery-tipping-dialog-d948d5a0.js';
2
2
  import './index-9dba6e0e.js';
@@ -1 +1 @@
1
- export{L as LotteryTippingDialog}from"./lottery-tipping-dialog-f19b42bc.js";import"./index-9dba6e0e.js";
1
+ export{L as LotteryTippingDialog}from"./lottery-tipping-dialog-d948d5a0.js";import"./index-9dba6e0e.js";
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as t,g as o}from"./index-9dba6e0e.js";const a=["ro","en","fr","ar","hr"],r={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},n=(e,i)=>{const t=i;return r[void 0!==t&&a.includes(t)?t:"en"][e]},l=class{constructor(t){e(this,t),this.open=i(this,"open",7),this.close=i(this,"close",7),this.confirm=i(this,"confirm",7),this.cancel=i(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(e,i){e!=i&&function(e,i){if(e){const t=document.createElement("style");t.innerHTML=i,e.appendChild(t)}}(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,i){e!=i&&function(e,i){if(!e||!i)return;const t=new URL(i);fetch(t.href).then((e=>e.text())).then((i=>{const t=document.createElement("style");t.innerHTML=i,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,i){e!=i&&function(e,i){if(window.emMessageBus){const t=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{t.innerHTML=i,e&&e.appendChild(t)}))}}(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async e=>{if(e)try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const o=await t.json();i=o,Object.keys(i).forEach((e=>{for(let t in i[e])r[e][t]=i[e][t]}))}catch(e){console.error("Failed to fetch or parse translations from URL:",e)}var i})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const e=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),i=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],o=["mask",this.visible?"mask-enter":"mask-leave"],a=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return t("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:i.join(" "),ref:e=>this.stylingContainer=e},t("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:o.join(" "),onClick:this.handleMaskClick.bind(this)}),t("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:a,style:e,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},(this.dialogTitle||this.closable)&&t("div",{key:"04d54878aa24e0d9eb98bc921ea3edfacd6de3af",class:"dialog-header"},t("h2",{key:"f6f6c279de47e49cde86d0c907b9b40a115926b3",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&t("button",{key:"e1625473e5460cd667961923bf678c9a91b69c82",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),t("div",{key:"fb0db8dd765832cf1d8e8b682131e4c97a93ac22",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},t("slot",{key:"75336f59c2a8fe6775fc12ed4e2e26ff6bb6b508"})),this.showFooter&&t("div",{key:"a305086a2830265317abb0fd6f59b4a053fd54a9",class:"dialog-footer"},t("slot",{key:"cb330ea63908002f4f8b4b8139d5843c2570302e",name:"footer"},this.showCancelBtn&&t("button",{key:"c3d2c15195e56efd6d388265e9ccb87030627b7b",class:"cancel-btn",onClick:this.handleClose.bind(this)},n("cancel",this.language)),t("button",{key:"af9c96b4e1ce82f9ecb73e2b9f4e93cba0382d76",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},n("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{l as L}
@@ -1 +1 @@
1
- export{L as lottery_tipping_dialog}from"./lottery-tipping-dialog-f19b42bc.js";import"./index-9dba6e0e.js";
1
+ export{L as lottery_tipping_dialog}from"./lottery-tipping-dialog-d948d5a0.js";import"./index-9dba6e0e.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-tipping-dialog",
3
- "version": "1.87.21",
3
+ "version": "1.87.22",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,g as o}from"./index-9dba6e0e.js";const a=["ro","en","fr","ar","hr"],r={en:{cancel:"Cancel",confirm:"Confirm"},ro:{cancel:"Anulează",confirm:"Confirmă"},fr:{cancel:"Annuler",confirm:"Confirmer"},ar:{cancel:"إلغاء",confirm:"تأكيد"},hr:{cancel:"Odustani",confirm:"Potvrdi"}},n=(e,i)=>{const t=i;return r[void 0!==t&&a.includes(t)?t:"en"][e]},l=class{constructor(t){e(this,t),this.open=i(this,"open",7),this.close=i(this,"close",7),this.confirm=i(this,"confirm",7),this.cancel=i(this,"cancel",7),this.wasVisible=!1,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.visible=void 0,this.dialogTitle="",this.width="520px",this.closable=!0,this.mask=!0,this.maskClosable=!0,this.animationDuration=300,this.fullscreen=!1,this.showFooter=!0,this.showCancelBtn=!0,this.language="en",this.translationUrl=void 0,this.dialogClass=void 0,this.dialogStyle=void 0}handleClientStylingChange(e,i){e!=i&&function(e,i){if(e){const t=document.createElement("style");t.innerHTML=i,e.appendChild(t)}}(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,i){e!=i&&function(e,i){if(!e||!i)return;const t=new URL(i);fetch(t.href).then((e=>e.text())).then((i=>{const t=document.createElement("style");t.innerHTML=i,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(e,i){e!=i&&function(e,i){if(window.emMessageBus){const t=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{t.innerHTML=i,e&&e.appendChild(t)}))}}(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){this.translationUrl&&(async e=>{if(e)try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const o=await t.json();i=o,Object.keys(i).forEach((e=>{for(let t in i[e])r[e][t]=i[e][t]}))}catch(e){console.error("Failed to fetch or parse translations from URL:",e)}var i})(this.translationUrl)}componentWillUpdate(){this.visible&&!this.wasVisible?this.disableBodyScroll():!this.visible&&this.wasVisible&&this.enableBodyScroll(),this.wasVisible=this.visible}disconnectedCallback(){this.enableBodyScroll(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}disableBodyScroll(){document.body.style.overflow="hidden"}enableBodyScroll(){document.body.style.overflow=""}handleClose(){this.cancel.emit()}handleMaskClick(){this.maskClosable&&this.cancel.emit()}handleConfirm(){this.confirm.emit()}render(){const e=Object.assign({width:"number"==typeof this.width?`${this.width}px`:this.width,"--duration":`${this.animationDuration}ms`},this.dialogStyle||{}),i=["dialog-wrapper",this.visible?"dialog-wrapper-visible":""],o=["mask",this.visible?"mask-enter":"mask-leave"],a=["dialog",this.visible?"dialog-enter":"dialog-leave",this.fullscreen?"fullscreen":"",this.dialogClass].filter(Boolean).join(" ");return t("div",{key:"306683c5190fa6dca57dcf75e52eca575c0215e7",class:i.join(" "),ref:e=>this.stylingContainer=e},t("div",{key:"8be097f3a86fcd9ad4e18c6ac56cafdcf249049b",class:o.join(" "),onClick:this.handleMaskClick.bind(this)}),t("div",{key:"87d2206d3e3d75fe0e0ef8a6afd8de5c20892ae6",part:"dialog",class:a,style:e,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title"},t("div",{key:"30ca33b925ff2525ead8aae83e72031258367b40",class:"dialog-header"},t("h2",{key:"492c3e864ac1547da58b0a47e4cc8d45470bde54",id:"dialog-title",class:"dialog-title"},this.dialogTitle),this.closable&&t("button",{key:"8ae4b872d18ce82d33292dc794e8a1f714a96ba9",class:"close-btn",onClick:this.handleClose.bind(this)},"x")),t("div",{key:"d661c78b333f78b9dee92e0975f8b136ef5a3071",class:"dialog-content",style:{maxHeight:"calc(100vh - 62px)",overflowY:"auto"}},t("slot",{key:"f32a6f6e4962239e0148e61c4bb70f6b5d3a2c82"})),this.showFooter&&t("div",{key:"40b5e9fd1c9221eb4d6c87d053c5d018f540d8e7",class:"dialog-footer"},t("slot",{key:"91539def47d118a69735ec229e7a6b36fc1db40b",name:"footer"},this.showCancelBtn&&t("button",{key:"f3b3add23f150c660159a906c2ef23b5fbe3b4c5",class:"cancel-btn",onClick:this.handleClose.bind(this)},n("cancel",this.language)),t("button",{key:"5fc33e89b6c55ac9e2162302e128bce0e79c5f89",class:"confirm-btn",onClick:this.handleConfirm.bind(this)},n("confirm",this.language))))))}get el(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style=".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));background-color:var(--emw--color-background, #fff);color:var(--emw--color-typography, #000)}.dialog-footer .cancel-btn:hover{background-color:var(--emw--color-background-tertiary, #ccc)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-typography-normalized, #ffffff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}.Loading{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.Loading svg{animation:spin 1s linear infinite;transform-origin:center}@keyframes spin{100%{transform:rotate(360deg)}}";export{l as L}