@everymatrix/lottery-game-page 1.85.17 → 1.85.19
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.
|
@@ -25,6 +25,8 @@ function setClientStyling(stylingContainer, clientStyling) {
|
|
|
25
25
|
* @param {string} clientStylingUrl The URL of the style content
|
|
26
26
|
*/
|
|
27
27
|
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
28
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
29
|
+
|
|
28
30
|
const url = new URL(clientStylingUrl);
|
|
29
31
|
|
|
30
32
|
fetch(url.href)
|
|
@@ -21,6 +21,8 @@ function setClientStyling(stylingContainer, clientStyling) {
|
|
|
21
21
|
* @param {string} clientStylingUrl The URL of the style content
|
|
22
22
|
*/
|
|
23
23
|
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
24
|
+
if (!stylingContainer || !clientStylingUrl) return;
|
|
25
|
+
|
|
24
26
|
const url = new URL(clientStylingUrl);
|
|
25
27
|
|
|
26
28
|
fetch(url.href)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as s,a as o}from"./index-4dbc736a.js";function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function a(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function n(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const l=class{constructor(s){t(this,s),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=i("../static/dropdown.svg"),this.upIcon=i("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return s("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},s("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},s("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},s("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>s("span",{class:"chip"},s("div",{class:"chip-text",title:t.text},t.text),s("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&s("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&s("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),s("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},s("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&s("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>s("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&s("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>s("span",{class:"chip"},s("span",{class:"chip-text",title:t.text},t.text),s("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const h=["ro","en","hr"],c={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},d=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.translationUrl=void 0,this.showContent=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])c[e][i]=t[e][i]})))}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return s("div",{key:"58cd507e7d1dc8de1e3b049936a2d6acb355e83d",class:"Wrapper",ref:t=>this.stylingContainer=t},s("div",{key:"70c6453ca4c4d40738edb1ae7e91f8954eebd3eb",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},s("p",{key:"cf543e01c0baa833bea27aa4effb19734e234ed1",class:"Title"},this.headerTitle),s("p",{key:"365a05cabda273796e9d9689e514566ecc2aadcc",class:"Subtitle"},this.headerSubtitle),s("p",{key:"f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f",class:"Subtitle Description"},this.description),s("span",{key:"a47718e90743d53b31968f67b002a3e427e193bc",class:"Expand"},this.showContent?"<":">")),this.showContent&&s("div",{key:"bb34d51602f9397c427d79141a38aca7a64bf206"},s("div",{key:"64171a30185b88bbafaa4ea555aeb9e2e33c46d6",class:"Content"},s("slot",{key:"6def0d44f3881196255f3329184053fb3d5a3cfd",name:"accordionContent"}),this.footer&&this.showContent&&s("div",{key:"08bfb5b017055788ba55b149e3bee23964f11ccf"},this.deleteTab&&s("span",{key:"b7b03fc6329a37841a2cf2b6a34780349341a0d5",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return c[void 0!==t&&h.includes(t)?t:"en"].deleteTicket})())))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-primary, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-secondary, #00aba4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-background, #fff);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00aba4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--color-typography, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);padding:10px 15px;user-select:none;color:var(--emw--color-typography, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-background, #fff)}.ActionButton:hover{background:var(--emw--color-secondary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}';const u=["ro","en","hr"],p={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Cauta",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",searchByDate:"Search by Date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"},hr:{filterOpen:"Filter",filterClear:"Očisti",filterModalTicketTitle:"Rezultati listića",filterModalDrawTitle:"Povijest rezultata Izvlačenja",filterTicketPlaceholder:"Pretraga ID listića",filterDrawPlaceholder:"Pretraga ID izvlačenja",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Traži",filterFromCalendar:"Od",filterToCalendar:"Do",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"}},m=(t,e)=>{const i=e;return p[void 0!==i&&u.includes(i)?i:"en"][t]};var f=Object.defineProperty,v=Object.defineProperties,b=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,x=(t,e,i)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,k=(t,e)=>{for(var i in e||(e={}))y.call(e,i)&&x(t,i,e[i]);if(g)for(var i of g(e))w.call(e,i)&&x(t,i,e[i]);return t},_=(t,e)=>v(t,b(e)),C=(t,e,i)=>(x(t,"symbol"!=typeof e?e+"":e,i),i),S=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{n(i.next(t))}catch(t){o(t)}},a=t=>{try{n(i.throw(t))}catch(t){o(t)}},n=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,a);n((i=i.apply(t,e)).next())}))
|
|
1
|
+
import{r as t,c as e,g as i,h as s,a as o}from"./index-4dbc736a.js";function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function a(t,e){if(!t||!e)return;const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function n(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const l=class{constructor(s){t(this,s),this.change=e(this,"change",7),this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.dropdownOpen=!1,this.overflowOpen=!1)},this.toggleDropdown=t=>{t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.overflowOpen=!1},this.isSelected=t=>this.selectedValues.includes(t),this.selectItem=t=>{this.isSelected(t.value)||(this.selectedValues=[...this.selectedValues,t.value],this.change.emit(this.selectedValues))},this.toggleItem=t=>{this.isSelected(t.value)?this.removeItem(t.value):this.selectItem(t)},this.removeItem=(t,e)=>{e&&e.stopPropagation(),this.selectedValues=this.selectedValues.filter((e=>e!==t)),this.change.emit(this.selectedValues)},this.downIcon=i("../static/dropdown.svg"),this.upIcon=i("../static/dropup.svg"),this.isTouch="ontouchstart"in window,this.openOverflow=()=>{this.isTouch||(this.computePopoverPosition(),this.overflowOpen=!0)},this.closeOverflow=()=>{this.isTouch||(this.overflowOpen=!1)},this.toggleOverflow=t=>{t.stopPropagation(),this.computePopoverPosition(),this.overflowOpen=!this.overflowOpen},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.options=[],this.maxVisibleChips=2,this.placeholder="",this.selectedValues=[],this.dropdownOpen=!1,this.overflowOpen=!1,this.popoverStyle={top:"0px",left:"0px"}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}async clear(){this.selectedValues=[],this.change.emit(this.selectedValues)}componentWillLoad(){document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}get selectedOptions(){return this.options.filter((t=>this.isSelected(t.value)))}get visibleChips(){return this.selectedOptions.slice(0,this.maxVisibleChips)}get hiddenChips(){return this.selectedOptions.slice(this.maxVisibleChips)}computePopoverPosition(){if(this.overflowChipEl&&this.el){const{left:t}=this.overflowChipEl.getBoundingClientRect(),{left:e,height:i}=this.el.getBoundingClientRect();this.popoverStyle={top:i-10+"px",left:t-e+"px"}}}render(){var t;return s("div",{key:"50b48397be3ede1907ab2c2abcd1cf2f43f69c13",class:"general-multi-select-container",ref:t=>this.stylingContainer=t},s("div",{key:"696a1bb1f221f8f5cf290fac040af10e2e5a115e",class:"multi-select-container",ref:t=>this.el=t},s("div",{key:"9ea92f01787b26d43054573a11896cf65065b073",class:"flex-row",onClick:this.toggleDropdown},s("div",{key:"f79720ca3ec383ee7f95b09483698ee18119c79a",class:"control"},this.visibleChips.map((t=>s("span",{class:"chip"},s("div",{class:"chip-text",title:t.text},t.text),s("div",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))),this.hiddenChips.length>0&&s("span",{key:"25e9e527c33dd7a315dacb10cc51084fe69b9b7e",class:"chip overflow-chip",ref:t=>this.overflowChipEl=t,onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow,onClick:this.toggleOverflow},"•••"),0===this.selectedValues.length&&s("span",{key:"b061de660a55f7a0d41ce9aa650108d3f38a9dc0",class:"placeholder"},this.placeholder)),s("div",{key:"f83b6517e88b3976cdc18590f8f1233cb2515230",class:"arrow"},s("img",{key:"1b61a49090237057b98e5ce8a4f7c1e3bfc9d4ba",class:"info-icon",src:this.dropdownOpen?this.upIcon:this.downIcon,style:{width:"18px"}}))),this.dropdownOpen&&s("div",{key:"e5b081007bcbdd251ce5ac235c1f19f17852c420",class:"dropdown"},this.options.map((t=>s("div",{class:{"dropdown-item":!0,selected:this.isSelected(t.value)},onClick:()=>this.toggleItem(t)},t.text)))),this.overflowOpen&&!!(null===(t=this.hiddenChips)||void 0===t?void 0:t.length)&&s("div",{key:"f8e3289042c69c569bebcd0a40d90f31261c6c12",class:"overflow-popover",style:{top:this.popoverStyle.top,left:this.popoverStyle.left},onMouseEnter:this.openOverflow,onMouseLeave:this.closeOverflow},this.hiddenChips.map((t=>s("span",{class:"chip"},s("span",{class:"chip-text",title:t.text},t.text),s("span",{class:"remove-btn",onClick:e=>this.removeItem(t.value,e)},"×")))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.style='.multi-select-container{position:relative;font-family:"Inter", sans-serif;margin-top:4px;width:100%}.flex-row{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;padding:8px 12px;padding-right:4px;border-radius:4px;background:var(--emw-selector-color-background, #e8ebef);cursor:pointer}.control{flex:1;display:flex;align-items:center;flex-wrap:nowrap;overflow:hidden}.control:focus-within{border-color:var(--emw--color-primary, #fed275);box-shadow:0 0 0 2px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.chip{display:inline-flex;align-items:center;background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-dialog-typography, #000);border-radius:4px;padding:2px 8px;margin-right:6px;font-size:0.875rem;line-height:1.2;justify-content:space-between;flex:0 1 auto;min-width:0}.chip-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overflow-chip{background:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-300, #333);width:20px;text-align:center;display:block}.remove-btn{background:none;border:none;font-size:1rem;margin-left:6px;cursor:pointer;color:var(--emw--color-gray-150, #6f6f6f)}.remove-btn:hover{color:var(--emw--color-error, red)}.placeholder{color:var(--emw--color-gray-150, #6f6f6f);font-size:0.875rem;padding:3px 8px;line-height:1.2}.arrow{margin-left:auto;font-size:0.8rem;width:20px;color:var(--emw--color-gray-150, #6f6f6f)}.dropdown{position:absolute;top:calc(100% + 4px);left:0;width:100%;max-height:240px;overflow-y:auto;border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;background:var(--emw--color-dialog-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:10}.dropdown-item{padding:10px 14px;cursor:pointer;font-size:0.875rem;line-height:1.4;transition:background 0.2s}.dropdown-item:hover{background:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-typography, #000)}.dropdown-item.selected{background:var(--emw--color-background-secondary, #f5f5f5);color:var(--emw--color-typography, #000);font-weight:500}.overflow-popover{position:absolute;top:var(--overflow-top, 0px);left:var(--overflow-left, 0px);max-width:200px;padding:12px;display:flex;flex-wrap:wrap;gap:6px;border:1px solid var(--emw--color-gray-100, #d0d5dd);border-radius:6px;background:var(--emw--color-background, #ffffff);box-shadow:0 4px 12px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15));z-index:20}';const h=["ro","en","hr"],c={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},d=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.translationUrl=void 0,this.showContent=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])c[e][i]=t[e][i]})))}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return s("div",{key:"58cd507e7d1dc8de1e3b049936a2d6acb355e83d",class:"Wrapper",ref:t=>this.stylingContainer=t},s("div",{key:"70c6453ca4c4d40738edb1ae7e91f8954eebd3eb",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},s("p",{key:"cf543e01c0baa833bea27aa4effb19734e234ed1",class:"Title"},this.headerTitle),s("p",{key:"365a05cabda273796e9d9689e514566ecc2aadcc",class:"Subtitle"},this.headerSubtitle),s("p",{key:"f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f",class:"Subtitle Description"},this.description),s("span",{key:"a47718e90743d53b31968f67b002a3e427e193bc",class:"Expand"},this.showContent?"<":">")),this.showContent&&s("div",{key:"bb34d51602f9397c427d79141a38aca7a64bf206"},s("div",{key:"64171a30185b88bbafaa4ea555aeb9e2e33c46d6",class:"Content"},s("slot",{key:"6def0d44f3881196255f3329184053fb3d5a3cfd",name:"accordionContent"}),this.footer&&this.showContent&&s("div",{key:"08bfb5b017055788ba55b149e3bee23964f11ccf"},this.deleteTab&&s("span",{key:"b7b03fc6329a37841a2cf2b6a34780349341a0d5",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return c[void 0!==t&&h.includes(t)?t:"en"].deleteTicket})())))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-primary, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-secondary, #00aba4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-background, #fff);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00aba4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--color-typography, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-primary, #009993);padding:10px 15px;user-select:none;color:var(--emw--color-typography, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #ff3d00);border:1px solid var(--emw--color-error, #ff3d00);color:var(--emw--color-background, #fff)}.ActionButton:hover{background:var(--emw--color-secondary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}';const u=["ro","en","hr"],p={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Cauta",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",searchByDate:"Search by Date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"},hr:{filterOpen:"Filter",filterClear:"Očisti",filterModalTicketTitle:"Rezultati listića",filterModalDrawTitle:"Povijest rezultata Izvlačenja",filterTicketPlaceholder:"Pretraga ID listića",filterDrawPlaceholder:"Pretraga ID izvlačenja",filterTicketIdPlaceholder:"Search by Ticket ID",filterTiketTypePlaceholder:"Ticket Type",filterModalButton:"Traži",filterFromCalendar:"Od",filterToCalendar:"Do",searchByDate:"Search by Date",searchByTicketType:"Search by Ticket Type"}},m=(t,e)=>{const i=e;return p[void 0!==i&&u.includes(i)?i:"en"][t]};var f=Object.defineProperty,v=Object.defineProperties,b=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,x=(t,e,i)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,k=(t,e)=>{for(var i in e||(e={}))y.call(e,i)&&x(t,i,e[i]);if(g)for(var i of g(e))w.call(e,i)&&x(t,i,e[i]);return t},_=(t,e)=>v(t,b(e)),C=(t,e,i)=>(x(t,"symbol"!=typeof e?e+"":e,i),i),S=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{n(i.next(t))}catch(t){o(t)}},a=t=>{try{n(i.throw(t))}catch(t){o(t)}},n=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,a);n((i=i.apply(t,e)).next())}))
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|