@everymatrix/lottery-oddsbom-bullet 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 lotteryOddsbomBullet = require('./lottery-oddsbom-bullet-6234c62c.js');
5
+ const lotteryOddsbomBullet = require('./lottery-oddsbom-bullet-40274450.js');
6
6
  require('./index-dde9ffca.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();
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const lotteryOddsbomBullet = require('./lottery-oddsbom-bullet-6234c62c.js');
5
+ const lotteryOddsbomBullet = require('./lottery-oddsbom-bullet-40274450.js');
6
6
  require('./index-dde9ffca.js');
7
7
 
8
8
 
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { L as LotteryOddsbomBullet } from './lottery-oddsbom-bullet-bdc47e39.js';
1
+ export { L as LotteryOddsbomBullet } from './lottery-oddsbom-bullet-15560e49.js';
2
2
  import './index-c46a54d9.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,2 +1,2 @@
1
- export { L as lottery_oddsbom_bullet } from './lottery-oddsbom-bullet-bdc47e39.js';
1
+ export { L as lottery_oddsbom_bullet } from './lottery-oddsbom-bullet-15560e49.js';
2
2
  import './index-c46a54d9.js';
@@ -1 +1 @@
1
- export{L as LotteryOddsbomBullet}from"./lottery-oddsbom-bullet-bdc47e39.js";import"./index-c46a54d9.js";
1
+ export{L as LotteryOddsbomBullet}from"./lottery-oddsbom-bullet-15560e49.js";import"./index-c46a54d9.js";
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as o}from"./index-c46a54d9.js";const l="__WIDGET_GLOBAL_STYLE_CACHE__";function n(t,e){if(t){const o=document.createElement("style");o.innerHTML=e,t.appendChild(o)}}function s(t,e){if(!t||!e)return;const o=new URL(e);fetch(o.href).then((t=>t.text())).then((e=>{const o=document.createElement("style");o.innerHTML=e,t&&t.appendChild(o)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function d(t,e,o,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return o=function(t,e){const o=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(o.innerHTML=e,t.appendChild(o))}))}(t,e),o;window[l]||(window[l]={}),o=function(t,e){return window.emMessageBus.subscribe(e,(o=>{if(!t)return;const n=t.getRootNode(),s=window[l];let d=s[e]&&s[e].sheet;d?s[e].refCount=s[e].refCount+1:(d=new CSSStyleSheet,d.replaceSync(o),s[e]={sheet:d,refCount:1});const r=n.adoptedStyleSheets||[];r.includes(d)||(n.adoptedStyleSheets=[...r,d])}))}(t,e);const s=o.unsubscribe.bind(o);return o.unsubscribe=()=>{if(window[l][e]){const t=window[l][e];t.refCount>1?t.refCount=t.refCount-1:delete window[l][e]}s()},o}var r=function(){return r=Object.assign||function(t){for(var e,o=1,l=arguments.length;o<l;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},i={primaryColor:"#333",secondaryColor:"#E6E6E6"};function a(t,e){var o="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,l=Object.keys(o).reduce((function(t,e){var l=o[e],n="".concat(e,'="').concat(l,'"');return t.push(n),t}),[]),n=l.length?" "+l.join(" "):"",s=(t.children||[]).map((function(t){return a(t,e)})).join("");return s&&s.length?"<".concat(t.tag).concat(n,">").concat(s,"</").concat(t.tag,">"):"<".concat(t.tag).concat(n," />")}const c=function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||i;return a(t.icon(o.primaryColor,o.secondaryColor),e)}return a(t.icon,e)}({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(o){t(this,o),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(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,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(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 o("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},o("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},o("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:c}),o("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 L}
@@ -1 +1 @@
1
- export{L as lottery_oddsbom_bullet}from"./lottery-oddsbom-bullet-bdc47e39.js";import"./index-c46a54d9.js";
1
+ export{L as lottery_oddsbom_bullet}from"./lottery-oddsbom-bullet-15560e49.js";import"./index-c46a54d9.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-oddsbom-bullet",
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 o}from"./index-c46a54d9.js";const l="__WIDGET_GLOBAL_STYLE_CACHE__";function n(t,e){if(t){const o=document.createElement("style");o.innerHTML=e,t.appendChild(o)}}function s(t,e){if(!t||!e)return;const o=new URL(e);fetch(o.href).then((t=>t.text())).then((e=>{const o=document.createElement("style");o.innerHTML=e,t&&t.appendChild(o)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function d(t,e,o,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return o=function(t,e){const o=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{t&&(o.innerHTML=e,t.appendChild(o))}))}(t,e),o;window[l]||(window[l]={}),o=function(t,e){return window.emMessageBus.subscribe(e,(o=>{if(!t)return;const n=t.getRootNode(),s=window[l];let d=s[e]?.sheet;d?s[e].refCount=s[e].refCount+1:(d=new CSSStyleSheet,d.replaceSync(o),s[e]={sheet:d,refCount:1});const r=n.adoptedStyleSheets||[];r.includes(d)||(n.adoptedStyleSheets=[...r,d])}))}(t,e);const s=o.unsubscribe.bind(o);return o.unsubscribe=()=>{if(window[l][e]){const t=window[l][e];t.refCount>1?t.refCount=t.refCount-1:delete window[l][e]}s()},o}var r=function(){return r=Object.assign||function(t){for(var e,o=1,l=arguments.length;o<l;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},i={primaryColor:"#333",secondaryColor:"#E6E6E6"};function a(t,e){var o="svg"===t.tag?r(r({},t.attrs),e.extraSVGAttrs||{}):t.attrs,l=Object.keys(o).reduce((function(t,e){var l=o[e],n="".concat(e,'="').concat(l,'"');return t.push(n),t}),[]),n=l.length?" "+l.join(" "):"",s=(t.children||[]).map((function(t){return a(t,e)})).join("");return s&&s.length?"<".concat(t.tag).concat(n,">").concat(s,"</").concat(t.tag,">"):"<".concat(t.tag).concat(n," />")}const c=function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||i;return a(t.icon(o.primaryColor,o.secondaryColor),e)}return a(t.icon,e)}({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(o){t(this,o),this.oddsbomBulletToggleEvent=e(this,"oddsbomBulletToggle",7),this.oddsbomBulletDeleteEvent=e(this,"oddsbomBulletDelete",7),this.oddsbomBulletAddedByMoreBtnDeleteEvent=e(this,"oddsbomBulletAddedByMoreBtnDelete",7),this.oddsbomBulletCallDialogEvent=e(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,e){t!=e&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&s(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&d(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(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 o("div",{key:"e21cf46108e35dcbf7d65e8c6a5f12f5d5ae49cb",class:"OddsbomBullet",ref:t=>this.stylingContainer=t},o("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},o("span",{key:"fa1aed0293dc004808e6992c069d6992317b0788",class:"OddsbomBullet--deleteIcon",innerHTML:c}),o("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 L}