@pie-api/pie-element-extensions
Advanced tools
Comparing version 1.6.6 to 1.6.7
@@ -11,3 +11,3 @@ import{g as e,j as s,r as t,b as o,h as r}from"./cssUtils-4ab6f935.js";import{C as i}from"./CustomLitElement-abdf1128.js";import"./unsafe-html-80e1c91a.js";import{g as h,r as c}from"./utils-642f8da2.js";class n extends i{static get styles(){return[e,s,t,o` | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1},hoveredChoice:{type:Object}}}set hoveredChoice(e){const s=this._hoveredChoice;s&&e&&s.value===e.value||(this._hoveredChoice=e,this.requestUpdate("hoveredChoice",s))}get hoveredChoice(){return this._hoveredChoice}constructor(){super(),this._hoveredChoice=null}mouseover(e,s){const t=e.target.closest(".choice-value"),o=t.closest(".response"),{offsetTop:r,offsetHeight:i,offsetLeft:h,offsetWidth:c}=t;this.hoveredChoice={value:s,top:o.offsetTop+r+i/2,left:o.offsetLeft+h+c}}mouseout(){this.hoveredChoice=null}_renderResponse(){const{correctResponse:e,choices:s}=this.model||{},{value:t}=this.session||{};if(!t||!e)return r``;return(Object.keys(e)||[]).map(o=>{const i=s.find(e=>e.id===t[o]);return r`<div | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1},hoveredChoice:{type:Object}}}set hoveredChoice(e){const s=this._hoveredChoice;s&&e&&s.value===e.value||(this._hoveredChoice=e,this.requestUpdate("hoveredChoice",s))}get hoveredChoice(){return this._hoveredChoice}constructor(){super(),this._hoveredChoice=null}mouseover(e,s){const t=e.target.closest(".choice-value"),{offsetTop:o,offsetHeight:r,offsetLeft:i,offsetWidth:h}=t;this.hoveredChoice={value:s,top:o+r/2,left:i+h}}mouseout(){this.hoveredChoice=null}_renderResponse(){const{correctResponse:e,choices:s}=this.model||{},{value:t}=this.session||{};if(!t||!e)return r``;return(Object.keys(e)||[]).map(o=>{const i=s.find(e=>e.id===t[o]);return r`<div | ||
class="choice-value" | ||
@@ -14,0 +14,0 @@ @mouseover=${e=>this.mouseover(e,i&&i.value)} |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "1.6.6", | ||
"version": "1.6.7", | ||
"description": "Extended capabilites for pie-elements", | ||
@@ -9,0 +9,0 @@ "author": "PIE Api Authors", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
342269
1182