@everymatrix/lottery-selection 1.88.6 → 1.88.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.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{lottery-selection-50db8c33.js → lottery-selection-3333838b.js} +1 -1
- package/dist/cjs/lottery-selection.cjs.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{lottery-selection-873439b0.js → lottery-selection-27840a0d.js} +1 -1
- package/dist/esm/lottery-selection.entry.js +1 -1
- package/dist/lottery-selection/index.esm.js +1 -1
- package/dist/lottery-selection/lottery-selection-27840a0d.js +1 -0
- package/dist/lottery-selection/lottery-selection.entry.js +1 -1
- package/package.json +1 -1
- package/dist/lottery-selection/lottery-selection-873439b0.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -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]
|
|
103
|
+
let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
|
|
104
104
|
|
|
105
105
|
if (!cachedStyle) {
|
|
106
106
|
cachedStyle = new CSSStyleSheet();
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { L as LotterySelection } from './lottery-selection-
|
|
1
|
+
export { L as LotterySelection } from './lottery-selection-27840a0d.js';
|
|
2
2
|
import './index-ab825ca6.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]
|
|
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_selection } from './lottery-selection-
|
|
1
|
+
export { L as lottery_selection } from './lottery-selection-27840a0d.js';
|
|
2
2
|
import './index-ab825ca6.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as LotterySelection}from"./lottery-selection-
|
|
1
|
+
export{L as LotterySelection}from"./lottery-selection-27840a0d.js";import"./index-ab825ca6.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as o}from"./index-ab825ca6.js";const r="__WIDGET_GLOBAL_STYLE_CACHE__";function i(t,e){if(t){const o=document.createElement("style");o.innerHTML=e,t.appendChild(o)}}function n(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 l(t,e,o,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)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[r]||(window[r]={}),o=function(t,e){return window.emMessageBus.subscribe(e,(o=>{if(!t)return;const i=t.getRootNode(),n=window[r];let l=n[e]&&n[e].sheet;l?n[e].refCount=n[e].refCount+1:(l=new CSSStyleSheet,l.replaceSync(o),n[e]={sheet:l,refCount:1});const s=i.adoptedStyleSheets||[];s.includes(l)||(i.adoptedStyleSheets=[...s,l])}))}(t,e);const n=o.unsubscribe.bind(o);return o.unsubscribe=()=>{if(window[r][e]){const t=window[r][e];t.refCount>1?t.refCount=t.refCount-1:delete window[r][e]}n()},o}const s={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"};var c=function(){return c=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},c.apply(this,arguments)},a={primaryColor:"#333",secondaryColor:"#E6E6E6"};function d(t,e){var o="svg"===t.tag?c(c({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(o).reduce((function(t,e){var r=o[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",n=(t.children||[]).map((function(t){return d(t,e)})).join("");return n&&n.length?"<".concat(t.tag).concat(i,">").concat(n,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const h=class{constructor(o){t(this,o),this.lotteryBulletClickHandler=e(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||a;return d(t.icon(o.primaryColor,o.secondaryColor),e)}return d(t.icon,e)}(s,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),o("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},o("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&o("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),o("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";export{h as L}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as lottery_selection}from"./lottery-selection-
|
|
1
|
+
export{L as lottery_selection}from"./lottery-selection-27840a0d.js";import"./index-ab825ca6.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as o}from"./index-ab825ca6.js";const r="__WIDGET_GLOBAL_STYLE_CACHE__";function i(t,e){if(t){const o=document.createElement("style");o.innerHTML=e,t.appendChild(o)}}function n(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 l(t,e,o,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)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[r]||(window[r]={}),o=function(t,e){return window.emMessageBus.subscribe(e,(o=>{if(!t)return;const i=t.getRootNode(),n=window[r];let l=n[e]?.sheet;l?n[e].refCount=n[e].refCount+1:(l=new CSSStyleSheet,l.replaceSync(o),n[e]={sheet:l,refCount:1});const s=i.adoptedStyleSheets||[];s.includes(l)||(i.adoptedStyleSheets=[...s,l])}))}(t,e);const n=o.unsubscribe.bind(o);return o.unsubscribe=()=>{if(window[r][e]){const t=window[r][e];t.refCount>1?t.refCount=t.refCount-1:delete window[r][e]}n()},o}const s={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"};var c=function(){return c=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},c.apply(this,arguments)},a={primaryColor:"#333",secondaryColor:"#E6E6E6"};function d(t,e){var o="svg"===t.tag?c(c({},t.attrs),e.extraSVGAttrs||{}):t.attrs,r=Object.keys(o).reduce((function(t,e){var r=o[e],i="".concat(e,'="').concat(r,'"');return t.push(i),t}),[]),i=r.length?" "+r.join(" "):"",n=(t.children||[]).map((function(t){return d(t,e)})).join("");return n&&n.length?"<".concat(t.tag).concat(i,">").concat(n,"</").concat(t.tag,">"):"<".concat(t.tag).concat(i," />")}const h=class{constructor(o){t(this,o),this.lotteryBulletClickHandler=e(this,"lotteryBulletClick",7),this.value=0,this.text=void 0,this.idx=void 0,this.type="toggle",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.hasBorder=!0,this.hasBackground=!0,this.deleteIconSvg="",this.deleteIconWidth="16px",this.deleteIconHeight="16px"}handleClientStylingChange(t,e){t!==e&&i(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!==e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!==e&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClick(){"disabled"!==this.type&&"readonly"!==this.type&&(console.log("bullet clicked",this.type,this.idx,this.text,this.value),this.lotteryBulletClickHandler.emit({type:this.type,idx:this.idx,text:this.text,value:this.value}))}render(){let t;return t=this.deleteIconSvg?function(t){let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/on[a-z]+=[\"'][^\"']*[\"']/gi,""),e=e.replace(/javascript:/gi,""),e}(this.deleteIconSvg):function(t,e){if(void 0===e&&(e={}),"function"==typeof t.icon){var o=e.placeholders||a;return d(t.icon(o.primaryColor,o.secondaryColor),e)}return d(t.icon,e)}(s,{extraSVGAttrs:{width:this.deleteIconWidth,height:this.deleteIconHeight,fill:"currentColor"}}),o("div",{key:"0d1e8aaa80a907a7467410f6b27b4b6175e82299",class:"lottery-selection",ref:t=>this.stylingContainer=t},o("button",{key:"11a2402abbc290dc877ad95f3433092c3a0d8419",class:{"lottery-selection__button":!0,"lottery-selection__button--selected":1==this.value,"lottery-selection__button--disabled":"disabled"===this.type,"lottery-selection__button--no-border":!this.hasBorder,"lottery-selection__button--no-background":!this.hasBackground,isDeleteByIcon:"delete"===this.type,isCallDialogBtn:"input"===this.type||"readonly"===this.type},onClick:this.handleClick.bind(this),disabled:"disabled"===this.type},"delete"===this.type&&o("span",{key:"f99001d936a8f7bdf8adc5c46e82caf730a9442a",class:"lottery-selection__delete-icon",innerHTML:t}),o("span",{key:"55775e2492a1fe45cc8a457ac0a0d206744461ab",class:"lottery-selection__text"},this.text)))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.style=":host{display:inline-block}.lottery-selection__button{display:flex;align-items:center;justify-content:center;width:var(--lottery-selection-width, 32px);height:var(--lottery-selection-height, 32px);padding:var(--lottery-selection-padding, 0);box-sizing:border-box;background:var(--lottery-selection-background, var(--emw--color-background, #fff));border:var(--lottery-selection-border-width, 2px) var(--lottery-selection-border-style, solid) var(--lottery-selection-border-color, var(--emw--color-primary, #0d196e));border-radius:var(--lottery-selection-border-radius, var(--emw--border-radius-medium, 8px));color:var(--lottery-selection-color, var(--emw--color-typography, #000));font-weight:var(--lottery-selection-font-weight, bold);font-size:var(--lottery-selection-font-size, 1em);cursor:pointer;user-select:none;}.lottery-selection__button:hover{background:var(--lottery-selection-hover-background, var(--emw--color-background, #fff));border-color:var(--lottery-selection-hover-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-hover-color, var(--emw--color-typography, #000))}.lottery-selection__button .lottery-selection__delete-icon{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__text{display:none}.lottery-selection__button.isDeleteByIcon:hover .lottery-selection__delete-icon{display:flex;align-items:center;justify-content:center;fill:var(--lottery-selection-delete-icon-color, var(--emw--color-typography, #000));vertical-align:middle}.lottery-selection__button.lottery-selection__button--selected{background-color:var(--lottery-selection-selected-background, var(--emw--color-primary, #0d196e));border-color:var(--lottery-selection-selected-border-color, var(--emw--color-primary, #0d196e));color:var(--lottery-selection-selected-color, var(--emw--color-typography-inverse, #fff))}.lottery-selection__button.lottery-selection__button--disabled{background-color:var(--lottery-selection-disabled-background, var(--emw--color-gray-50, #f5f5f5));border-color:var(--lottery-selection-disabled-border-color, var(--emw--color-gray-100, #e6e6e6));color:var(--lottery-selection-disabled-color, var(--emw--color-gray-150, #6f6f6f));cursor:not-allowed;pointer-events:none;}.lottery-selection__button.lottery-selection__button--no-border{border:none}.lottery-selection__button.lottery-selection__button--no-background{background:transparent}";export{h as L}
|