@everymatrix/lottery-oddsbom-bullet-group 0.8.6 → 0.8.8

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 lotteryOddsbomBulletGroup = require('./lottery-oddsbom-bullet-group-001f8c5a.js');
5
+ const lotteryOddsbomBulletGroup = require('./lottery-oddsbom-bullet-group-596bff22.js');
6
6
  require('./index-887155dc.js');
7
7
 
8
8
 
@@ -100,7 +100,7 @@ function getAdoptStyleSubscription(stylingContainer, domain) {
100
100
 
101
101
  const shadowRoot = stylingContainer.getRootNode();
102
102
  const cacheStyleObject = window[StyleCacheKey];
103
- let cachedStyle = cacheStyleObject[domain]?.sheet;
103
+ let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
104
104
 
105
105
  if (!cachedStyle) {
106
106
  cachedStyle = new CSSStyleSheet();
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-887155dc.js');
6
- const lotteryOddsbomBulletGroup = require('./lottery-oddsbom-bullet-group-001f8c5a.js');
6
+ const lotteryOddsbomBulletGroup = require('./lottery-oddsbom-bullet-group-596bff22.js');
7
7
 
8
8
  // This icon file is generated automatically.
9
9
  var DeleteFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z" } }] }, "name": "delete", "theme": "filled" };
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryOddsbomBulletGroup } from './lottery-oddsbom-bullet-group-d66a61e2.js';
1
+ export { L as LotteryOddsbomBulletGroup } from './lottery-oddsbom-bullet-group-d1fda886.js';
2
2
  import './index-85e87cde.js';
@@ -98,7 +98,7 @@ function getAdoptStyleSubscription(stylingContainer, domain) {
98
98
 
99
99
  const shadowRoot = stylingContainer.getRootNode();
100
100
  const cacheStyleObject = window[StyleCacheKey];
101
- let cachedStyle = cacheStyleObject[domain]?.sheet;
101
+ let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
102
102
 
103
103
  if (!cachedStyle) {
104
104
  cachedStyle = new CSSStyleSheet();
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-85e87cde.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-bullet-group-d66a61e2.js';
3
- export { L as lottery_oddsbom_bullet_group } from './lottery-oddsbom-bullet-group-d66a61e2.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './lottery-oddsbom-bullet-group-d1fda886.js';
3
+ export { L as lottery_oddsbom_bullet_group } from './lottery-oddsbom-bullet-group-d1fda886.js';
4
4
 
5
5
  // This icon file is generated automatically.
6
6
  var DeleteFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z" } }] }, "name": "delete", "theme": "filled" };
@@ -1 +1 @@
1
- export{L as LotteryOddsbomBulletGroup}from"./lottery-oddsbom-bullet-group-d66a61e2.js";import"./index-85e87cde.js";
1
+ export{L as LotteryOddsbomBulletGroup}from"./lottery-oddsbom-bullet-group-d1fda886.js";import"./index-85e87cde.js";
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i}from"./index-85e87cde.js";const s="__WIDGET_GLOBAL_STYLE_CACHE__";function l(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function o(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,i,l=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!l)return i=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),i;window[s]||(window[s]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const l=t.getRootNode(),o=window[s];let n=o[e]&&o[e].sheet;n?o[e].refCount=o[e].refCount+1:(n=new CSSStyleSheet,n.replaceSync(i),o[e]={sheet:n,refCount:1});const d=l.adoptedStyleSheets||[];d.includes(n)||(l.adoptedStyleSheets=[...d,n])}))}(t,e);const o=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[s][e]){const t=window[s][e];t.refCount>1?t.refCount=t.refCount-1:delete window[s][e]}o()},i}const d=class{constructor(i){t(this,i),this.addSelectionEvent=e(this,"addSelection",7),this.deleteSelectionEvent=e(this,"deleteSelection",7),this.deleteSelectionOriginEvent=e(this,"deleteSelectionOrigin",7),this.oddsbomBulletGroupToggleEvent=e(this,"oddsbomBulletGroupToggle",7),this.oddsbomBulletGroupAddedByMoreBtnDelEvent=e(this,"oddsbomBulletGroupAddedByMoreBtnDel",7),this.oddsbomBulletCallDialogFromGroupEvent=e(this,"oddsbomBulletCallDialogFromGroup",7),this.selectionIdx=void 0,this.matchIdx=void 0,this.bulletConfigs=[],this.bulletConfigsDeleteOrigin=[],this.addSelectionConfig=void 0,this.isDeleteByIcon=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.bulletListClass=void 0,this.innerBulletConfigs=void 0,this.innerBulletConfigsDeleteOrigin=void 0}handleBulletConfigsChange(t){this.innerBulletConfigs=t.map((t=>Object.assign({},t)))}handleBulletConfigsDeleteOriginChange(t){this.innerBulletConfigsDeleteOrigin=t.map((t=>Object.assign({},t)))}componentWillLoad(){this.handleBulletConfigsChange(this.bulletConfigs)}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}oddsbomBulletToggleHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:s}=this,l=[...this.innerBulletConfigs],o=Object.assign({},l[e]);o.isSelected=!o.isSelected,l[e]=o,this.innerBulletConfigs=l,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigs,matchIdx:i,selectionIdx:s})}oddsbomBulletDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:s}=this,l=[...this.innerBulletConfigsDeleteOrigin],o=Object.assign({},l[e]);o.isSelected=!o.isSelected,l[e]=o,this.innerBulletConfigsDeleteOrigin=l,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigsDeleteOrigin,matchIdx:i,selectionIdx:s})}oddsbomBulletAddedByMoreBtnDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:s}=this;this.oddsbomBulletGroupAddedByMoreBtnDelEvent.emit({delText:e,matchIdx:i,selectionIdx:s})}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleOddsbomBulletCallDialog(){const{matchIdx:t,selectionIdx:e}=this;this.oddsbomBulletCallDialogFromGroupEvent.emit({matchIdx:t,selectionIdx:e})}render(){return i("div",{key:"38102a447cf8fafc8f7a7e5a122c7ccbc2ce8b4a",class:"oddsbomBulletGroup",ref:t=>this.stylingContainer=t},i("div",{key:"59ca1df498575356eb3438b45e9431b1bc7ee2dd",class:`oddsbomBulletGroup-list ${this.bulletListClass||""}`},this.innerBulletConfigs.map((t=>i("lottery-oddsbom-bullet",t.isAddMoreBtn?{text:`${this.addSelectionConfig.maxOverScore}+`,disabled:t.isDisabled,isCallDialogBtn:!0,onOddsbomBulletCallDialog:this.handleOddsbomBulletCallDialog.bind(this)}:{text:t.text,idx:t.idx,isSelected:t.isSelected,disabled:t.isDisabled,isDeleteByIcon:this.isDeleteByIcon,isAddedByMoreBtn:t.isAddedByMoreBtn})))))}static get watchers(){return{bulletConfigs:["handleBulletConfigsChange"],bulletConfigsDeleteOrigin:["handleBulletConfigsDeleteOriginChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style=".oddsbomBulletGroup{width:100%}.oddsbomBulletGroup .oddsbomBulletGroup-list{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.oddsbomBulletGroup .selection-bullet-list{justify-content:flex-end}";export{d as L,o as a,n as b,l as s}
@@ -1 +1 @@
1
- import{r as t,c as o,h as e}from"./index-85e87cde.js";import{s as l,a as s,b as d}from"./lottery-oddsbom-bullet-group-d66a61e2.js";export{L as lottery_oddsbom_bullet_group}from"./lottery-oddsbom-bullet-group-d66a61e2.js";var r=function(){return r=Object.assign||function(t){for(var o,e=1,l=arguments.length;e<l;e++)for(var s in o=arguments[e])Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s]);return t},r.apply(this,arguments)},i={primaryColor:"#333",secondaryColor:"#E6E6E6"};function n(t,o){var e="svg"===t.tag?r(r({},t.attrs),o.extraSVGAttrs||{}):t.attrs,l=Object.keys(e).reduce((function(t,o){var l=e[o],s="".concat(o,'="').concat(l,'"');return t.push(s),t}),[]),s=l.length?" "+l.join(" "):"",d=(t.children||[]).map((function(t){return n(t,o)})).join("");return d&&d.length?"<".concat(t.tag).concat(s,">").concat(d,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const a=function(t,o){if(void 0===o&&(o={}),"function"==typeof t.icon){var e=o.placeholders||i;return n(t.icon(e.primaryColor,e.secondaryColor),o)}return n(t.icon,o)}({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),h=class{constructor(e){t(this,e),this.oddsbomBulletToggleEvent=o(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=o(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=o(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=o(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,o){t!=o&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,o){t!=o&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,o){t!=o&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return e("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},e("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},e("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:a}),e("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";export{h as lottery_oddsbom_bullet}
1
+ import{r as t,c as o,h as e}from"./index-85e87cde.js";import{s as l,a as s,b as d}from"./lottery-oddsbom-bullet-group-d1fda886.js";export{L as lottery_oddsbom_bullet_group}from"./lottery-oddsbom-bullet-group-d1fda886.js";var r=function(){return r=Object.assign||function(t){for(var o,e=1,l=arguments.length;e<l;e++)for(var s in o=arguments[e])Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s]);return t},r.apply(this,arguments)},i={primaryColor:"#333",secondaryColor:"#E6E6E6"};function n(t,o){var e="svg"===t.tag?r(r({},t.attrs),o.extraSVGAttrs||{}):t.attrs,l=Object.keys(e).reduce((function(t,o){var l=e[o],s="".concat(o,'="').concat(l,'"');return t.push(s),t}),[]),s=l.length?" "+l.join(" "):"",d=(t.children||[]).map((function(t){return n(t,o)})).join("");return d&&d.length?"<".concat(t.tag).concat(s,">").concat(d,"</").concat(t.tag,">"):"<".concat(t.tag).concat(s," />")}const a=function(t,o){if(void 0===o&&(o={}),"function"==typeof t.icon){var e=o.placeholders||i;return n(t.icon(e.primaryColor,e.secondaryColor),o)}return n(t.icon,o)}({icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},{extraSVGAttrs:{width:"18px",height:"18px",fill:""}}),h=class{constructor(e){t(this,e),this.oddsbomBulletToggleEvent=o(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=o(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=o(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=o(this,"oddsbomBulletCallDialog",7),this.isSelected=void 0,this.disabled=void 0,this.text=void 0,this.idx=void 0,this.isReading=void 0,this.isDeleteByIcon=void 0,this.isCallDialogBtn=void 0,this.isAddedByMoreBtn=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0}handleClientStylingChange(t,o){t!=o&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,o){t!=o&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,o){t!=o&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){this.isCallDialogBtn?this.oddsbomBulletCallDialogEvent.emit():this.isDeleteByIcon?this.isAddedByMoreBtn?this.oddsbomBulletAddedByMoreBtnDeleteEvent.emit(this.text):this.oddsbomBulletDeleteEvent.emit(this.idx):this.disabled||this.oddsbomBulletToggleEvent.emit(this.idx)}render(){return e("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},e("button",{key:"4edf5cd481d8283bd71f6806b6f93949e1308095",class:{OddsbomBulletBtn__normal:!0,OddsbomBulletBtn__selected:this.isSelected,OddsbomBulletBtn__disabled:this.disabled,isDeleteByIcon:this.isDeleteByIcon,isCallDialogBtn:this.isCallDialogBtn||this.isReading},onClick:this.handleClick.bind(this),disabled:this.disabled},e("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:a}),e("span",{key:"53ed96f2c2b833d21488049f987b6131718d563e",class:"OddsbomBullet--text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style=".OddsbomBullet .OddsbomBulletBtn__normal{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:var(--emw--color-background, #fff);border:2px solid var(--emw--color-primary, #0d196e);border-radius:var(--emw--border-radius-medium, 8px);color:var(--emw--color-typography, #000);font-weight:bold;cursor:pointer;transition:transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, background-color 0.3s;user-select:none;position:relative}.OddsbomBullet .OddsbomBulletBtn__normal:hover{transform:scale(1.15) rotate(-5deg);box-shadow:var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15)) 7px 6px 6px}.OddsbomBullet .OddsbomBulletBtn__normal .OddsbomBullet--deleteIcon{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover{background-color:var(--emw--color-background, #fff)}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--text{display:none}.OddsbomBullet .OddsbomBulletBtn__normal.isDeleteByIcon:hover .OddsbomBullet--deleteIcon{display:inline;fill:var(--emw--color-typography, #000)}.OddsbomBullet .OddsbomBulletBtn__normal.isCallDialogBtn:hover{transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__selected{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff);transform:scale(1.05);box-shadow:0 5px 10px var(--emw--button-box-shadow-color-secondary, rgba(0, 0, 0, 0.15))}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled{background-color:var(--emw--color-gray-50, #f5f5f5);border-color:var(--emw--color-gray-100, #e6e6e6);color:var(--emw--color-gray-150, #6f6f6f);cursor:not-allowed;transform:none;box-shadow:none}.OddsbomBullet .OddsbomBulletBtn__normal.OddsbomBulletBtn__disabled:hover{transform:none;box-shadow:none}";export{h as lottery_oddsbom_bullet}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-oddsbom-bullet-group",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
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 t,c as e,h as i}from"./index-85e87cde.js";const s="__WIDGET_GLOBAL_STYLE_CACHE__";function l(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function o(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,i,l=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!l)return i=function(t,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(i.innerHTML=e,t.appendChild(i))}))}(t,e),i;window[s]||(window[s]={}),i=function(t,e){return window.emMessageBus.subscribe(e,(i=>{if(!t)return;const l=t.getRootNode(),o=window[s];let n=o[e]?.sheet;n?o[e].refCount=o[e].refCount+1:(n=new CSSStyleSheet,n.replaceSync(i),o[e]={sheet:n,refCount:1});const d=l.adoptedStyleSheets||[];d.includes(n)||(l.adoptedStyleSheets=[...d,n])}))}(t,e);const o=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[s][e]){const t=window[s][e];t.refCount>1?t.refCount=t.refCount-1:delete window[s][e]}o()},i}const d=class{constructor(i){t(this,i),this.addSelectionEvent=e(this,"addSelection",7),this.deleteSelectionEvent=e(this,"deleteSelection",7),this.deleteSelectionOriginEvent=e(this,"deleteSelectionOrigin",7),this.oddsbomBulletGroupToggleEvent=e(this,"oddsbomBulletGroupToggle",7),this.oddsbomBulletGroupAddedByMoreBtnDelEvent=e(this,"oddsbomBulletGroupAddedByMoreBtnDel",7),this.oddsbomBulletCallDialogFromGroupEvent=e(this,"oddsbomBulletCallDialogFromGroup",7),this.selectionIdx=void 0,this.matchIdx=void 0,this.bulletConfigs=[],this.bulletConfigsDeleteOrigin=[],this.addSelectionConfig=void 0,this.isDeleteByIcon=void 0,this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.bulletListClass=void 0,this.innerBulletConfigs=void 0,this.innerBulletConfigsDeleteOrigin=void 0}handleBulletConfigsChange(t){this.innerBulletConfigs=t.map((t=>Object.assign({},t)))}handleBulletConfigsDeleteOriginChange(t){this.innerBulletConfigsDeleteOrigin=t.map((t=>Object.assign({},t)))}componentWillLoad(){this.handleBulletConfigsChange(this.bulletConfigs)}handleClientStylingChange(t,e){t!=e&&l(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&o(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}oddsbomBulletToggleHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:s}=this,l=[...this.innerBulletConfigs],o=Object.assign({},l[e]);o.isSelected=!o.isSelected,l[e]=o,this.innerBulletConfigs=l,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigs,matchIdx:i,selectionIdx:s})}oddsbomBulletDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:s}=this,l=[...this.innerBulletConfigsDeleteOrigin],o=Object.assign({},l[e]);o.isSelected=!o.isSelected,l[e]=o,this.innerBulletConfigsDeleteOrigin=l,this.oddsbomBulletGroupToggleEvent.emit({bulletSelctionArr:this.innerBulletConfigsDeleteOrigin,matchIdx:i,selectionIdx:s})}oddsbomBulletAddedByMoreBtnDeleteHandler(t){const e=t.detail,{matchIdx:i,selectionIdx:s}=this;this.oddsbomBulletGroupAddedByMoreBtnDelEvent.emit({delText:e,matchIdx:i,selectionIdx:s})}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&l(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleOddsbomBulletCallDialog(){const{matchIdx:t,selectionIdx:e}=this;this.oddsbomBulletCallDialogFromGroupEvent.emit({matchIdx:t,selectionIdx:e})}render(){return i("div",{key:"38102a447cf8fafc8f7a7e5a122c7ccbc2ce8b4a",class:"oddsbomBulletGroup",ref:t=>this.stylingContainer=t},i("div",{key:"59ca1df498575356eb3438b45e9431b1bc7ee2dd",class:`oddsbomBulletGroup-list ${this.bulletListClass||""}`},this.innerBulletConfigs.map((t=>i("lottery-oddsbom-bullet",t.isAddMoreBtn?{text:`${this.addSelectionConfig.maxOverScore}+`,disabled:t.isDisabled,isCallDialogBtn:!0,onOddsbomBulletCallDialog:this.handleOddsbomBulletCallDialog.bind(this)}:{text:t.text,idx:t.idx,isSelected:t.isSelected,disabled:t.isDisabled,isDeleteByIcon:this.isDeleteByIcon,isAddedByMoreBtn:t.isAddedByMoreBtn})))))}static get watchers(){return{bulletConfigs:["handleBulletConfigsChange"],bulletConfigsDeleteOrigin:["handleBulletConfigsDeleteOriginChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};d.style=".oddsbomBulletGroup{width:100%}.oddsbomBulletGroup .oddsbomBulletGroup-list{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.oddsbomBulletGroup .selection-bullet-list{justify-content:flex-end}";export{d as L,o as a,n as b,l as s}