@pie-api/pie-element-extensions
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -28,3 +28,3 @@ /** | ||
*/ | ||
const u=new WeakMap,_=t=>"function"==typeof t&&u.has(t),m={},g={}; | ||
const u=new WeakMap,_=t=>"function"==typeof t&&u.has(t),m={},f={}; | ||
/** | ||
@@ -43,3 +43,3 @@ * @license | ||
*/ | ||
class f{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this.__parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const e=t?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),s=[],i=this.template.parts,n=document.createTreeWalker(e,133,null,!1);let r,o=0,l=0,h=n.nextNode();for(;o<i.length;)if(r=i[o],a(r)){for(;l<r.index;)l++,"TEMPLATE"===h.nodeName&&(s.push(h),n.currentNode=h.content),null===(h=n.nextNode())&&(n.currentNode=s.pop(),h=n.nextNode());if("node"===r.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(h.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(h,r.name,r.strings,this.options));o++}else this.__parts.push(void 0),o++;return t&&(document.adoptNode(e),customElements.upgrade(e)),e}} | ||
class g{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this.__parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const e=t?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),s=[],i=this.template.parts,n=document.createTreeWalker(e,133,null,!1);let r,o=0,l=0,h=n.nextNode();for(;o<i.length;)if(r=i[o],a(r)){for(;l<r.index;)l++,"TEMPLATE"===h.nodeName&&(s.push(h),n.currentNode=h.content),null===(h=n.nextNode())&&(n.currentNode=s.pop(),h=n.nextNode());if("node"===r.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(h.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(h,r.name,r.strings,this.options));o++}else this.__parts.push(void 0),o++;return t&&(document.adoptNode(e),customElements.upgrade(e)),e}} | ||
/** | ||
@@ -70,3 +70,3 @@ * @license | ||
* http://polymer.github.io/PATENTS.txt | ||
*/const S=t=>null===t||!("object"==typeof t||"function"==typeof t),w=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class b{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new x(this)}_getValue(){const t=this.strings,e=t.length-1;let s="";for(let i=0;i<e;i++){s+=t[i];const e=this.parts[i];if(void 0!==e){const t=e.value;if(S(t)||!w(t))s+="string"==typeof t?t:String(t);else for(const e of t)s+="string"==typeof e?e:String(e)}}return s+=t[e],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class x{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===m||S(t)&&t===this.value||(this.value=t,_(t)||(this.committer.dirty=!0))}commit(){for(;_(this.value);){const t=this.value;this.value=m,t(this)}this.value!==m&&this.committer.commit()}}class P{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(l()),this.endNode=t.appendChild(l())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=l()),t.__insert(this.endNode=l())}insertAfterPart(t){t.__insert(this.startNode=l()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;_(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=m,t(this)}const t=this.__pendingValue;t!==m&&(S(t)?t!==this.value&&this.__commitText(t):t instanceof v?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):w(t)?this.__commitIterable(t):t===g?(this.value=g,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,s="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=s:this.__commitNode(document.createTextNode(s)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof f&&this.value.template===e)this.value.update(t.values);else{const s=new f(e,t.processor,this.options),i=s._clone();s.update(t.values),this.__commitNode(i),this.value=s}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,i=0;for(const n of t)s=e[i],void 0===s&&(s=new P(this.options),e.push(s),0===i?s.appendIntoPart(this):s.insertAfterPart(e[i-1])),s.setValue(n),s.commit(),i++;i<e.length&&(e.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){e(this.startNode.parentNode,t.nextSibling,this.endNode)}}class N{constructor(t,e,s){if(this.value=void 0,this.__pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this.__pendingValue=t}commit(){for(;_(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=m,t(this)}if(this.__pendingValue===m)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=m}}class C extends b{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new A(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class A extends x{}let T=!1;(()=>{try{const t={get capture(){return T=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class E{constructor(t,e,s){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;_(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=m,t(this)}if(this.__pendingValue===m)return;const t=this.__pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),i=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=V(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=m}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const V=t=>t&&(T?{capture:t.capture,passive:t.passive,once:t.once}:t.capture) | ||
*/const S=t=>null===t||!("object"==typeof t||"function"==typeof t),w=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class b{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new x(this)}_getValue(){const t=this.strings,e=t.length-1;let s="";for(let i=0;i<e;i++){s+=t[i];const e=this.parts[i];if(void 0!==e){const t=e.value;if(S(t)||!w(t))s+="string"==typeof t?t:String(t);else for(const e of t)s+="string"==typeof e?e:String(e)}}return s+=t[e],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class x{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===m||S(t)&&t===this.value||(this.value=t,_(t)||(this.committer.dirty=!0))}commit(){for(;_(this.value);){const t=this.value;this.value=m,t(this)}this.value!==m&&this.committer.commit()}}class P{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(l()),this.endNode=t.appendChild(l())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=l()),t.__insert(this.endNode=l())}insertAfterPart(t){t.__insert(this.startNode=l()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;_(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=m,t(this)}const t=this.__pendingValue;t!==m&&(S(t)?t!==this.value&&this.__commitText(t):t instanceof v?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):w(t)?this.__commitIterable(t):t===f?(this.value=f,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,s="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=s:this.__commitNode(document.createTextNode(s)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof g&&this.value.template===e)this.value.update(t.values);else{const s=new g(e,t.processor,this.options),i=s._clone();s.update(t.values),this.__commitNode(i),this.value=s}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,i=0;for(const n of t)s=e[i],void 0===s&&(s=new P(this.options),e.push(s),0===i?s.appendIntoPart(this):s.insertAfterPart(e[i-1])),s.setValue(n),s.commit(),i++;i<e.length&&(e.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){e(this.startNode.parentNode,t.nextSibling,this.endNode)}}class N{constructor(t,e,s){if(this.value=void 0,this.__pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this.__pendingValue=t}commit(){for(;_(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=m,t(this)}if(this.__pendingValue===m)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=m}}class C extends b{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new A(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class A extends x{}let T=!1;(()=>{try{const t={get capture(){return T=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class E{constructor(t,e,s){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;_(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=m,t(this)}if(this.__pendingValue===m)return;const t=this.__pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),i=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=V(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=m}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const V=t=>t&&(T?{capture:t.capture,passive:t.passive,once:t.once}:t.capture) | ||
/** | ||
@@ -97,3 +97,3 @@ * @license | ||
* http://polymer.github.io/PATENTS.txt | ||
*/const R=new | ||
*/const $=new | ||
/** | ||
@@ -125,3 +125,3 @@ * @license | ||
* http://polymer.github.io/PATENTS.txt | ||
*/"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const $=(t,...e)=>new v(t,e,"html",R) | ||
*/"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const R=(t,...e)=>new v(t,e,"html",$) | ||
/** | ||
@@ -164,3 +164,3 @@ * @license | ||
*/ | ||
(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const Q={};class X extends W{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){const e=(t,s)=>t.reduceRight((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t),s),s=e(t,new Set),i=[];s.forEach(t=>i.unshift(t)),this._styles=i}else this._styles=[t]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?D?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==Q&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return Q}}X.finalized=!0,X.render=(t,s,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=O.has(s),o=j&&11===s.nodeType&&!!s.host,a=o&&!F.has(n),l=a?document.createDocumentFragment():s;if(((t,s,i)=>{let n=O.get(s);void 0===n&&(e(s,s.firstChild),O.set(s,n=new P(Object.assign({templateFactory:U},i))),n.appendInto(s)),n.setValue(t),n.commit()})(t,l,Object.assign({templateFactory:q(n)},i)),a){const t=O.get(l);O.delete(l);const i=t.value instanceof f?t.value.template:void 0;z(n,l,i),e(s,s.firstChild),s.appendChild(l),O.set(s,t)}!r&&o&&window.ShadyCSS.styleElement(s.host)};class Y extends X{static get styles(){return[K` | ||
(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const Q={};class X extends W{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){const e=(t,s)=>t.reduceRight((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t),s),s=e(t,new Set),i=[];s.forEach(t=>i.unshift(t)),this._styles=i}else this._styles=[t]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?D?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==Q&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return Q}}X.finalized=!0,X.render=(t,s,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=O.has(s),o=j&&11===s.nodeType&&!!s.host,a=o&&!F.has(n),l=a?document.createDocumentFragment():s;if(((t,s,i)=>{let n=O.get(s);void 0===n&&(e(s,s.firstChild),O.set(s,n=new P(Object.assign({templateFactory:U},i))),n.appendInto(s)),n.setValue(t),n.commit()})(t,l,Object.assign({templateFactory:q(n)},i)),a){const t=O.get(l);O.delete(l);const i=t.value instanceof g?t.value.template:void 0;z(n,l,i),e(s,s.firstChild),s.appendChild(l),O.set(s,t)}!r&&o&&window.ShadyCSS.styleElement(s.host)};const Y=K`white`;class Z extends X{static get styles(){return[K` | ||
:host { | ||
@@ -170,3 +170,3 @@ color: var(--color, black); | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
background-color: var(--background-color, ${Y}); | ||
height: calc(var(--height, ${60}) * 1px); | ||
@@ -176,5 +176,5 @@ overflow: hidden; | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:t,choicePrefix:e}=this.model||{},{value:s}=this.session||{};if(!t||!s)return $``;const i="numbers"===e?48:65;return s.map(e=>{const s=t.findIndex(t=>t.value===e);return String.fromCharCode(s+i)}).join(", ")}render(){const t=this._getResponse();return $` <div class="cell">${t}</div> `}}class Z extends X{static get styles(){return[K` | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:t,choicePrefix:e}=this.model||{},{value:s}=this.session||{};if(!t||!s)return R``;const i="numbers"===e?48:65;return s.map(e=>{const s=t.findIndex(t=>t.value===e);return String.fromCharCode(s+i)}).join(", ")}render(){const t=this._getResponse();return R` <div class="cell">${t}</div> `}}class tt extends X{static get styles(){return[K` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
background-color: var(--background-color, ${Y}); | ||
height: calc(var(--height, ${200}) * 1px); | ||
@@ -184,2 +184,2 @@ overflow: hidden; | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:t,choicePrefix:e}=this.model||{},{value:s}=this.session||{};if(!t||!s)return $``;const i="numbers"===e?48:65;return s.map(e=>{const s=t.findIndex(t=>t.value===e);return`${String.fromCharCode(s+i)}: ${t[s].label}`}).join(", ")}render(){return $`<div class="response">${this._getResponse()}</div>`}}export{Y as MultipleChoiceCell,Z as MultipleChoiceResponse}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:t,choicePrefix:e}=this.model||{},{value:s}=this.session||{};if(!t||!s)return R``;const i="numbers"===e?48:65;return s.map(e=>{const s=t.findIndex(t=>t.value===e);return`${String.fromCharCode(s+i)}: ${t[s].label}`}).join(", ")}render(){return R`<div class="response">${this._getResponse()}</div>`}}export{Z as MultipleChoiceCell,tt as MultipleChoiceResponse}; |
@@ -1,9 +0,9 @@ | ||
import{L as t,c as e,b as r,d as a,h as s}from"./utlis-fdfb3c18.js";class c extends t{static get styles(){return[e` | ||
import{L as e,c as t,d as r,b as a,e as s,h as c}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${a}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${a}) * 1px); | ||
width: calc(var(--width, ${s}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return s`<div class="cell"></div>`}}export default c;export{c as ConstructedCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return c`<div class="cell"></div>`}}export default i;export{i as ConstructedCell}; | ||
//# sourceMappingURL=ConstructedCell.js.map |
@@ -1,11 +0,11 @@ | ||
import{L as e,c as t,m as r,a as s,h as a}from"./utlis-fdfb3c18.js";import{u as o}from"./unsafe-html-bf679e49.js";class c extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as r,m as s,a,h as o}from"./utils-7781a56e.js";import{u as c}from"./unsafe-html-bb7cce25.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${s}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_processEscapedMarkup(){const{markup:e}=this.model||{},{value:t}=this.session||{};if(!t||!e)return a``;const r=document.createElement("textarea");return r.innerHTML=e,r.innerText.replace(/\{\{(.)\}\}/g,(e,r)=>t[r])}render(){return a`<div class="response"> | ||
${o(this._processEscapedMarkup())} | ||
</div>`}}export default c;export{c as ConstructedResponse}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_processEscapedMarkup(){const{markup:e}=this.model||{},{value:t}=this.session||{};if(!t||!e)return o``;const r=document.createElement("textarea");return r.innerHTML=e,r.innerText.replace(/\{\{(.)\}\}/g,(e,r)=>t[r])}render(){return o`<div class="response"> | ||
${c(this._processEscapedMarkup())} | ||
</div>`}}export default i;export{i as ConstructedResponse}; | ||
//# sourceMappingURL=ConstructedResponse.js.map |
@@ -1,9 +0,9 @@ | ||
import{L as t,c as e,b as r,d as a,h as s}from"./utlis-fdfb3c18.js";class c extends t{static get styles(){return[e` | ||
import{L as e,c as t,d as r,b as a,e as s,h as c}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${a}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${a}) * 1px); | ||
width: calc(var(--width, ${s}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return s`<div class="cell"></div>`}}export default c;export{c as DragInTheBlankCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return c`<div class="cell"></div>`}}export default i;export{i as DragInTheBlankCell}; | ||
//# sourceMappingURL=DragInTheBlankCell.js.map |
@@ -1,11 +0,11 @@ | ||
import{L as e,c as t,m as r,a as s,h as a}from"./utlis-fdfb3c18.js";import{u as i}from"./unsafe-html-bf679e49.js";class o extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as r,m as s,a,h as c}from"./utils-7781a56e.js";import{u as o}from"./unsafe-html-bb7cce25.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${s}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_processEscapedMarkup(){const{markup:e,choices:t}=this.model||{},{value:r}=this.session||{};if(!r||!e||!t)return a``;const s=document.createElement("textarea");return s.innerHTML=e,s.innerText.replace(/\{\{(.)\}\}/g,(e,s)=>t.find(e=>e.id===r[s]).value)}render(){return a`<div class="response"> | ||
${i(this._processEscapedMarkup())} | ||
</div>`}}export default o;export{o as DragInTheBlankResponse}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_processEscapedMarkup(){const{markup:e,choices:t}=this.model||{},{value:r}=this.session||{};if(!r||!e||!t)return c``;const s=document.createElement("textarea");return s.innerHTML=e,s.innerText.replace(/\{\{(.)\}\}/g,(e,s)=>t.find(e=>e.id===r[s]).value)}render(){return c`<div class="response"> | ||
${o(this._processEscapedMarkup())} | ||
</div>`}}export default i;export{i as DragInTheBlankResponse}; | ||
//# sourceMappingURL=DragInTheBlankResponse.js.map |
@@ -1,8 +0,8 @@ | ||
import{L as t,c as e,b as r,d as a,h as s}from"./utlis-fdfb3c18.js";class c extends t{static get styles(){return[e` | ||
import{L as t,c as e,d as r,b as a,e as s,h as c}from"./utils-7781a56e.js";class i extends t{static get styles(){return[e` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${a}) * 1px); | ||
width: calc(var(--width, ${s}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return s`<div class="cell"></div>`}}export default c;export{c as DrawingCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return c`<div class="cell"></div>`}}export default i;export{i as DrawingCell}; | ||
//# sourceMappingURL=DrawingCell.js.map |
@@ -1,2 +0,2 @@ | ||
import{L as e,c as t,h as a,m as r,a as s}from"./utlis-fdfb3c18.js";class i extends e{static get styles(){return[t` | ||
import{L as e,c as t,h as a,m as r,a as s}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
@@ -3,0 +3,0 @@ position: relative; |
@@ -1,2 +0,2 @@ | ||
import{L as t,c as e,b as r,d as s,h as a}from"./utlis-fdfb3c18.js";class n extends t{static get styles(){return[e` | ||
import{L as t,c as e,d as r,b as s,e as a,h as n}from"./utils-7781a56e.js";class o extends t{static get styles(){return[e` | ||
:host { | ||
@@ -7,13 +7,13 @@ color: var(--color, black); | ||
align-items: center; | ||
background-color: var(--background-color, lightgrey); | ||
background-color: var(--background-color, ${r}); | ||
display: flex; | ||
height: calc(var(--height, ${r}) * 1px); | ||
height: calc(var(--height, ${s}) * 1px); | ||
justify-content: center; | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}static _getPart(t,e){const{choices:r,choicePrefix:s}=t||{},{value:n}=e||{};if(!r||!n)return a``;const o="numbers"===s?48:65;return n.map(t=>{const e=r.findIndex(e=>e.value===t);return String.fromCharCode(e+o)}).join(" ")}_getResponse(){const{partA:t,partB:e}=this.model||{},{value:r}=this.session||{};return r?a` | ||
<span>${n._getPart(t,r.partA)}, </span> | ||
<span>${n._getPart(e,r.partB)}</span> | ||
`:""}render(){const t=this._getResponse();return a`<div class="cell">${t}</div>`}}export default n;export{n as EBSRCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}static _getPart(t,e){const{choices:r,choicePrefix:s}=t||{},{value:a}=e||{};if(!r||!a)return n``;const o="numbers"===s?48:65;return a.map(t=>{const e=r.findIndex(e=>e.value===t);return String.fromCharCode(e+o)}).join(" ")}_getResponse(){const{partA:t,partB:e}=this.model||{},{value:r}=this.session||{};return r?n` | ||
<span>${o._getPart(t,r.partA)}, </span> | ||
<span>${o._getPart(e,r.partB)}</span> | ||
`:""}render(){const t=this._getResponse();return n`<div class="cell">${t}</div>`}}export default o;export{o as EBSRCell}; | ||
//# sourceMappingURL=EBSRCell.js.map |
@@ -1,15 +0,15 @@ | ||
import{L as t,c as e,m as r,a as s,h as a}from"./utlis-fdfb3c18.js";class n extends t{static get styles(){return[e` | ||
import{L as e,c as t,d as r,m as s,a,h as n}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
align-items: center; | ||
background-color: var(--background-color, lightgrey); | ||
background-color: var(--background-color, ${r}); | ||
display: flex; | ||
height: calc(var(--height, ${r}) * 1px); | ||
height: calc(var(--height, ${s}) * 1px); | ||
justify-content: center; | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}static _getPart(t,e){const{choices:r,choicePrefix:s}=t||{},{value:n}=e||{};if(!r||!n)return a``;const i="numbers"===s?48:65;return n.map(t=>{const e=r.findIndex(e=>e.value===t);return String.fromCharCode(e+i)}).join(" ")}_getResponse(){const{partA:t,partB:e}=this.model||{},{value:r}=this.session||{};return r?a` | ||
<span>${n._getPart(t,r.partA)}, </span> | ||
<span>${n._getPart(e,r.partB)}</span> | ||
`:""}render(){return a`<div class="response">${this._getResponse()}</div>`}}export default n;export{n as EBSRResponse}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}static _getPart(e,t){const{choices:r,choicePrefix:s}=e||{},{value:a}=t||{};if(!r||!a)return n``;const i="numbers"===s?48:65;return a.map(e=>{const t=r.findIndex(t=>t.value===e);return String.fromCharCode(t+i)}).join(" ")}_getResponse(){const{partA:e,partB:t}=this.model||{},{value:r}=this.session||{};return r?n` | ||
<span>${i._getPart(e,r.partA)}, </span> | ||
<span>${i._getPart(t,r.partB)}</span> | ||
`:""}render(){return n`<div class="response">${this._getResponse()}</div>`}}export default i;export{i as EBSRResponse}; | ||
//# sourceMappingURL=EBSRResponse.js.map |
@@ -1,8 +0,8 @@ | ||
import{L as t,c as e,b as r,d as a,h as s}from"./utlis-fdfb3c18.js";class c extends t{static get styles(){return[e` | ||
import{L as t,c as e,d as r,b as a,e as s,h as c}from"./utils-7781a56e.js";class i extends t{static get styles(){return[e` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${a}) * 1px); | ||
width: calc(var(--width, ${s}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return s`<div class="cell"></div>`}}export default c;export{c as GraphingCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return c`<div class="cell"></div>`}}export default i;export{i as GraphingCell}; | ||
//# sourceMappingURL=GraphingCell.js.map |
@@ -1,7 +0,7 @@ | ||
import{L as e,c as t,m as r,a as s,h as n}from"./utlis-fdfb3c18.js";class a extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as r,m as s,a,h as n}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${s}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
@@ -14,5 +14,5 @@ .point { | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}static _renderPoint({label:e,x:t,y:r}){return n`<div class="point">${e||""}(${t}, ${r})</div>`}static _renderType(e){return n`<span class="type">${e}:</span>`}_getResponse(){const{answer:e}=this.session||{};return e&&e.length?e.map(e=>{const{type:t,edge:r,root:s,points:i,from:o,to:c}=e;let p;switch(t){case"point":p=a._renderPoint(e);break;case"circle":case"sine":case"parabola":p=n`(${a._renderPoint(s)}, | ||
${a._renderPoint(r)})`;break;case"polygon":p=i.map((e,t)=>n`${a._renderPoint(e)}${t<i.length-1?", ":""}`);break;case"segment":case"vector":case"line":case"ray":p=n`[${a._renderPoint(o)}, | ||
${a._renderPoint(c)}]`}return n`<div>${a._renderType(t)} ${p}</div>`}):n`<div>No answers</div>`}render(){return n`<div class="response">${this._getResponse()}</div>`}}export default a;export{a as GraphingResponse}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}static _renderPoint({label:e,x:t,y:r}){return n`<div class="point">${e||""}(${t}, ${r})</div>`}static _renderType(e){return n`<span class="type">${e}:</span>`}_getResponse(){const{answer:e}=this.session||{};return e&&e.length?e.map(e=>{const{type:t,edge:r,root:s,points:a,from:o,to:c}=e;let p;switch(t){case"point":p=i._renderPoint(e);break;case"circle":case"sine":case"parabola":p=n`(${i._renderPoint(s)}, | ||
${i._renderPoint(r)})`;break;case"polygon":p=a.map((e,t)=>n`${i._renderPoint(e)}${t<a.length-1?", ":""}`);break;case"segment":case"vector":case"line":case"ray":p=n`[${i._renderPoint(o)}, | ||
${i._renderPoint(c)}]`}return n`<div>${i._renderType(t)} ${p}</div>`}):n`<div>No answers</div>`}render(){return n`<div class="response">${this._getResponse()}</div>`}}export default i;export{i as GraphingResponse}; | ||
//# sourceMappingURL=GraphingResponse.js.map |
@@ -1,8 +0,8 @@ | ||
import{L as t,c as e,b as r,d as a,h as s}from"./utlis-fdfb3c18.js";class c extends t{static get styles(){return[e` | ||
import{L as t,c as e,d as r,b as a,e as s,h as c}from"./utils-7781a56e.js";class i extends t{static get styles(){return[e` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${a}) * 1px); | ||
width: calc(var(--width, ${s}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return s`<div class="cell"></div>`}}export default c;export{c as HotspotCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return c`<div class="cell"></div>`}}export default i;export{i as HotspotCell}; | ||
//# sourceMappingURL=HotspotCell.js.map |
@@ -1,2 +0,2 @@ | ||
import{L as t,c as e,h as s,m as i,a}from"./utlis-fdfb3c18.js";class r extends t{static get styles(){return[e` | ||
import{L as t,c as e,h as s,m as i,a}from"./utils-7781a56e.js";class r extends t{static get styles(){return[e` | ||
.response { | ||
@@ -3,0 +3,0 @@ position: relative; |
@@ -1,11 +0,11 @@ | ||
import{L as e,c as t,b as s,d as r,h as a}from"./utlis-fdfb3c18.js";class c extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as s,b as r,e as a,h as o}from"./utils-7781a56e.js";class c extends e{static get styles(){return[t` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${s}) * 1px); | ||
background-color: var(--background-color, ${s}); | ||
height: calc(var(--height, ${r}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{value:e}=this.session||{};return e?Object.keys(e).map(t=>a`${t}: ${e[t]}<br />`):a``}render(){return a`<div class="cell"> | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{value:e}=this.session||{};return e?Object.keys(e).map(t=>o`${t}: ${e[t]}<br />`):o``}render(){return o`<div class="cell"> | ||
${this._getResponse()} | ||
</div>`}}export default c;export{c as InlineDropdownCell}; | ||
//# sourceMappingURL=InlineDropdownCell.js.map |
@@ -1,11 +0,11 @@ | ||
import{L as e,c as t,m as r,a as s,h as a}from"./utlis-fdfb3c18.js";import{u as o}from"./unsafe-html-bf679e49.js";class c extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as r,m as s,a,h as c}from"./utils-7781a56e.js";import{u as o}from"./unsafe-html-bb7cce25.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${s}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_processEscapedMarkup(){const{markup:e,choices:t}=this.model||{},{value:r}=this.session||{};if(!r||!e||!t)return a``;const s=document.createElement("textarea");return s.innerHTML=e,s.innerText.replace(/\{\{(.)\}\}/g,(e,s)=>t[s].find(e=>e.value===r[s]).label)}render(){return a`<div class="response"> | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_processEscapedMarkup(){const{markup:e,choices:t}=this.model||{},{value:r}=this.session||{};if(!r||!e||!t)return c``;const s=document.createElement("textarea");return s.innerHTML=e,s.innerText.replace(/\{\{(.)\}\}/g,(e,s)=>t[s].find(e=>e.value===r[s]).label)}render(){return c`<div class="response"> | ||
${o(this._processEscapedMarkup())} | ||
</div>`}}export default c;export{c as InlineDropdownResponse}; | ||
</div>`}}export default i;export{i as InlineDropdownResponse}; | ||
//# sourceMappingURL=InlineDropdownResponse.js.map |
@@ -1,8 +0,8 @@ | ||
import{L as t,c as e,b as r,d as a,h as s}from"./utlis-fdfb3c18.js";class c extends t{static get styles(){return[e` | ||
import{L as t,c as e,d as r,b as a,e as s,h as c}from"./utils-7781a56e.js";class i extends t{static get styles(){return[e` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${a}) * 1px); | ||
width: calc(var(--width, ${s}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return s`<div class="cell"></div>`}}export default c;export{c as MatchCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}render(){return c`<div class="cell"></div>`}}export default i;export{i as MatchCell}; | ||
//# sourceMappingURL=MatchCell.js.map |
@@ -1,7 +0,7 @@ | ||
import{L as e,c as t,m as r,a as s,h as o}from"./utlis-fdfb3c18.js";class i extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as r,m as s,a,h as o}from"./utils-7781a56e.js";class d extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${s}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
@@ -32,3 +32,3 @@ .choice { | ||
</tr>`})} | ||
</table>`:o``}render(){return o`<div class="response">${this._getResponse()}</div>`}}export default i;export{i as MatchResponse}; | ||
</table>`:o``}render(){return o`<div class="response">${this._getResponse()}</div>`}}export default d;export{d as MatchResponse}; | ||
//# sourceMappingURL=MatchResponse.js.map |
@@ -1,2 +0,2 @@ | ||
import{L as e,c as t,b as r,d as s,h as o}from"./utlis-fdfb3c18.js";class c extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as r,b as s,e as o,h as a}from"./utils-7781a56e.js";class c extends e{static get styles(){return[t` | ||
:host { | ||
@@ -6,8 +6,8 @@ color: var(--color, black); | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${r}) * 1px); | ||
background-color: var(--background-color, ${r}); | ||
height: calc(var(--height, ${s}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${o}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:e,choicePrefix:t}=this.model||{},{value:r}=this.session||{};if(!e||!r)return o``;const s="numbers"===t?48:65;return r.map(t=>{const r=e.findIndex(e=>e.value===t);return String.fromCharCode(r+s)}).join(", ")}render(){const e=this._getResponse();return o` <div class="cell">${e}</div> `}}export default c;export{c as MultipleChoiceCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:e,choicePrefix:t}=this.model||{},{value:r}=this.session||{};if(!e||!r)return a``;const s="numbers"===t?48:65;return r.map(t=>{const r=e.findIndex(e=>e.value===t);return String.fromCharCode(r+s)}).join(", ")}render(){const e=this._getResponse();return a` <div class="cell">${e}</div> `}}export default c;export{c as MultipleChoiceCell}; | ||
//# sourceMappingURL=MultipleChoiceCell.js.map |
@@ -1,9 +0,9 @@ | ||
import{L as e,c as t,m as r,a as s,h as o}from"./utlis-fdfb3c18.js";class i extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as s,m as r,a as o,h as a}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
background-color: var(--background-color, ${s}); | ||
height: calc(var(--height, ${r}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${s}) * 1px); | ||
width: calc(var(--width, ${o}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:e,choicePrefix:t}=this.model||{},{value:r}=this.session||{};if(!e||!r)return o``;const s="numbers"===t?48:65;return r.map(t=>{const r=e.findIndex(e=>e.value===t);return`${String.fromCharCode(r+s)}: ${e[r].label}`}).join(", ")}render(){return o`<div class="response">${this._getResponse()}</div>`}}export default i;export{i as MultipleChoiceResponse}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{choices:e,choicePrefix:t}=this.model||{},{value:s}=this.session||{};if(!e||!s)return a``;const r="numbers"===t?48:65;return s.map(t=>{const s=e.findIndex(e=>e.value===t);return`${String.fromCharCode(s+r)}: ${e[s].label}`}).join(", ")}render(){return a`<div class="response">${this._getResponse()}</div>`}}export default i;export{i as MultipleChoiceResponse}; | ||
//# sourceMappingURL=MultipleChoiceResponse.js.map |
@@ -1,9 +0,9 @@ | ||
import{L as e,c as t,b as s,d as r,h as a}from"./utlis-fdfb3c18.js";class i extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as s,b as r,e as a,h as o}from"./utils-7781a56e.js";class i extends e{static get styles(){return[t` | ||
.cell { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${s}) * 1px); | ||
background-color: var(--background-color, ${s}); | ||
height: calc(var(--height, ${r}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{selectedTokens:e}=this.session||{};return e&&e.length?e.map(({start:e,end:t})=>a`<div>[${e} - ${t}]</div>`):a``}render(){const e=this._getResponse();return a`<div class="cell">${e}</div>`}}export default i;export{i as SelectTextCell}; | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{selectedTokens:e}=this.session||{};return e&&e.length?e.map(({start:e,end:t})=>o`<div>[${e} - ${t}]</div>`):o``}render(){const e=this._getResponse();return o`<div class="cell">${e}</div>`}}export default i;export{i as SelectTextCell}; | ||
//# sourceMappingURL=SelectTextCell.js.map |
@@ -1,9 +0,9 @@ | ||
import{L as e,c as t,m as s,a as r,h as n}from"./utlis-fdfb3c18.js";class o extends e{static get styles(){return[t` | ||
import{L as e,c as t,d as s,m as r,a,h as n}from"./utils-7781a56e.js";class o extends e{static get styles(){return[t` | ||
.response { | ||
background-color: var(--background-color, lightgrey); | ||
height: calc(var(--height, ${s}) * 1px); | ||
background-color: var(--background-color, ${s}); | ||
height: calc(var(--height, ${r}) * 1px); | ||
overflow: hidden; | ||
width: calc(var(--width, ${r}) * 1px); | ||
width: calc(var(--width, ${a}) * 1px); | ||
} | ||
`]}static get properties(){return{model:{type:Object,attribute:!1},session:{type:Array,attribute:!1}}}_getResponse(){const{tokens:e}=this.model||{},{selectedTokens:t}=this.session||{};return e&&e.length&&t&&t.length?t.map(t=>{const s=e.find(e=>e.start===t.start&&e.end===t.end);return s?n`<div>${s.text}</div>`:n``}):n``}render(){return n`<div class="response">${this._getResponse()}</div>`}}export default o;export{o as SelectTextResponse}; | ||
//# sourceMappingURL=SelectTextResponse.js.map |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Extended capabilites for pie-elements", | ||
@@ -9,0 +9,0 @@ "author": "PIE Api Authors", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
290114