@citolab/qti-components 7.3.5 → 7.3.7
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/cdn/chunks/chunk-2VU43EIZ.js +8 -0
- package/cdn/chunks/chunk-2WJEB7LD.js +1 -0
- package/cdn/chunks/chunk-34G25RYG.js +8 -0
- package/cdn/chunks/chunk-7543U7PC.js +1 -0
- package/cdn/chunks/chunk-A73O6JDN.js +5 -0
- package/cdn/chunks/chunk-AV6ISYP4.js +41 -0
- package/cdn/chunks/chunk-AYRVSFDB.js +1 -0
- package/cdn/chunks/chunk-BJRPEBBQ.js +1 -0
- package/cdn/chunks/chunk-C3UTBQLI.js +8 -0
- package/cdn/chunks/chunk-CHA2MSUC.js +1 -0
- package/cdn/chunks/chunk-D5X3UG54.js +1 -0
- package/cdn/chunks/chunk-DS3TJWSG.js +8 -0
- package/cdn/chunks/chunk-FTIKZVQS.js +0 -0
- package/cdn/chunks/chunk-GHYJJLM6.js +5 -0
- package/cdn/chunks/chunk-H5VQY4UD.js +1 -0
- package/cdn/chunks/chunk-IYTC7IL7.js +48 -0
- package/cdn/chunks/chunk-JB5OTSUJ.js +1 -0
- package/cdn/chunks/chunk-JR322KXH.js +1 -0
- package/cdn/chunks/chunk-JYB6NVDN.js +1 -0
- package/cdn/chunks/chunk-LXJSKVMQ.js +6 -0
- package/cdn/chunks/chunk-NN2AW26H.js +5 -0
- package/cdn/chunks/chunk-ONSO5XEG.js +1464 -0
- package/cdn/chunks/chunk-PMW5NIBL.js +8 -0
- package/cdn/chunks/chunk-Q54YYIH7.js +8 -0
- package/cdn/chunks/chunk-QIEEN6C7.js +8 -0
- package/cdn/chunks/chunk-RALUW4CJ.js +5 -0
- package/cdn/chunks/chunk-RTHQAQWR.js +2 -0
- package/cdn/chunks/chunk-SB62LFF7.js +10 -0
- package/cdn/chunks/chunk-TI7HI3OS.js +1464 -0
- package/cdn/chunks/chunk-VWTYL7A3.js +48 -0
- package/cdn/chunks/chunk-W4QXZT2Y.js +8 -0
- package/cdn/chunks/chunk-YNBLRM6A.js +1 -0
- package/cdn/chunks/chunk-ZPQBCZQ2.js +3589 -0
- package/cdn/exports/computed-item.context.js +1 -1
- package/cdn/exports/computed.context.js +1 -1
- package/cdn/exports/config.context.js +1 -1
- package/cdn/exports/interaction.js +1 -1
- package/cdn/exports/item.context.js +1 -1
- package/cdn/exports/qti-assessment-item.context.js +1 -1
- package/cdn/exports/qti-condition-expression.js +1 -1
- package/cdn/exports/qti-expression.js +1 -1
- package/cdn/exports/session.context.js +1 -1
- package/cdn/exports/test.context.js +1 -1
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/cdn/qti-item/components/item-container.js +1 -1
- package/cdn/qti-item/components/item-show-correct-response.js +1 -1
- package/cdn/qti-item/components/print-item-variables.js +1 -1
- package/cdn/qti-item/components/styles.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-loader/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/styles.js +1 -1
- package/cdn/qti-test/components/test-check-item.js +1 -1
- package/cdn/qti-test/components/test-container.js +1 -1
- package/cdn/qti-test/components/test-end-attempt.js +1 -1
- package/cdn/qti-test/components/test-item-link.js +1 -1
- package/cdn/qti-test/components/test-navigation.js +1 -1
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-print-context.js +1 -1
- package/cdn/qti-test/components/test-print-item-variables.js +1 -1
- package/cdn/qti-test/components/test-scoring-buttons.js +1 -1
- package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
- package/cdn/qti-test/components/test-section-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-section-link.js +1 -1
- package/cdn/qti-test/components/test-show-correct-response.js +1 -1
- package/cdn/qti-test/components/test-stamp.js +1 -1
- package/cdn/qti-test/components/test-view-toggle.js +1 -1
- package/cdn/qti-test/components/test-view.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/cdn/qti-transformers/index.js +1 -1
- package/dist/chunks/chunk-3TX2EBTU.js +94 -0
- package/dist/chunks/chunk-3TX2EBTU.js.map +1 -0
- package/dist/chunks/chunk-7K44TDQO.js +91 -0
- package/dist/chunks/chunk-7K44TDQO.js.map +1 -0
- package/dist/chunks/chunk-AZJR5HSV.js +7960 -0
- package/dist/chunks/chunk-AZJR5HSV.js.map +1 -0
- package/dist/chunks/chunk-B3C3IFYR.js +7960 -0
- package/dist/chunks/chunk-B3C3IFYR.js.map +1 -0
- package/dist/chunks/chunk-BV2QSR2N.js +3 -0
- package/dist/chunks/chunk-BV2QSR2N.js.map +1 -0
- package/dist/chunks/chunk-CP34TICQ.js +45 -0
- package/dist/chunks/chunk-CP34TICQ.js.map +1 -0
- package/dist/chunks/chunk-EMVOKXSA.js +84 -0
- package/dist/chunks/chunk-EMVOKXSA.js.map +1 -0
- package/dist/chunks/chunk-GAHXUFMQ.js +93 -0
- package/dist/chunks/chunk-GAHXUFMQ.js.map +1 -0
- package/dist/chunks/chunk-GRQYHS5X.js +269 -0
- package/dist/chunks/chunk-GRQYHS5X.js.map +1 -0
- package/dist/chunks/chunk-KSXNC564.js +43 -0
- package/dist/chunks/chunk-KSXNC564.js.map +1 -0
- package/dist/chunks/chunk-LNL2LY75.js +94 -0
- package/dist/chunks/chunk-LNL2LY75.js.map +1 -0
- package/dist/chunks/chunk-NBCXOMMU.js +887 -0
- package/dist/chunks/chunk-NBCXOMMU.js.map +1 -0
- package/dist/chunks/chunk-NJ26K2SA.js +3579 -0
- package/dist/chunks/chunk-NJ26K2SA.js.map +1 -0
- package/dist/chunks/chunk-TUKEQ36K.js +60 -0
- package/dist/chunks/chunk-TUKEQ36K.js.map +1 -0
- package/dist/chunks/chunk-VVXIAK5M.js +82 -0
- package/dist/chunks/chunk-VVXIAK5M.js.map +1 -0
- package/dist/chunks/chunk-YKLITOZB.js +887 -0
- package/dist/chunks/chunk-YKLITOZB.js.map +1 -0
- package/dist/exports/computed.context.d.ts +2 -2
- package/dist/exports/session.context.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -13
- package/dist/item.css +0 -3
- package/dist/qti-components/index.js +2 -1
- package/dist/qti-components-jsx.d.ts +4 -8
- package/dist/qti-item/components/item-container.js +2 -2
- package/dist/qti-item/core/index.js +2 -2
- package/dist/qti-test/components/index.d.ts +2 -2
- package/dist/qti-test/components/index.js +12 -10
- package/dist/qti-test/components/test-container.js +2 -2
- package/dist/qti-test/components/test-navigation.d.ts +2 -2
- package/dist/qti-test/components/test-navigation.js +1 -1
- package/dist/qti-test/components/test-next.d.ts +18 -15
- package/dist/qti-test/components/test-next.js +4 -1
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +1 -1
- package/dist/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/dist/qti-test/components/test-prev.d.ts +19 -18
- package/dist/qti-test/components/test-prev.js +4 -1
- package/dist/qti-test/components/test-print-context.d.ts +2 -2
- package/dist/qti-test/components/test-print-item-variables.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-buttons.d.ts +2 -2
- package/dist/qti-test/components/test-scoring-buttons.js +1 -1
- package/dist/qti-test/components/test-scoring-feedback.d.ts +2 -2
- package/dist/qti-test/components/test-section-buttons-stamp.d.ts +1 -1
- package/dist/qti-test/components/test-section-buttons-stamp.js +1 -1
- package/dist/qti-test/components/test-show-correct-response.d.ts +2 -2
- package/dist/qti-test/components/test-stamp.d.ts +1 -1
- package/dist/qti-test/components/test-stamp.js +1 -1
- package/dist/qti-test/components/test-view-toggle.js +1 -1
- package/dist/qti-test/core/index.d.ts +3 -3
- package/dist/qti-test/core/index.js +3 -2
- package/dist/qti-test-feedback-DCZDtUuH.d.ts +85 -0
- package/dist/vscode.html-custom-data.json +4 -16
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as h,c as u}from"./chunk-U5Y5T4ZS.js";import{a as d}from"./chunk-P6SSTAJ2.js";import{b as a}from"./chunk-7WJYJA45.js";import{a as m,b as s}from"./chunk-42P7F3FC.js";import{a as p,d as c,i as l}from"./chunk-65CZNGQC.js";import{a as e}from"./chunk-JR322KXH.js";var t=class extends l{constructor(){super(...arguments);this.shown=!1;this.disabled=!1;this.showCorrectText="Show correct response";this.hideCorrectText="Hide correct response";this.noCorrectResponseText="No correct response specified"}willUpdate(b){let i=this.computedContext?.testParts.flatMap(r=>r.sections.flatMap(n=>n.items)).find(r=>r.active);if(this._previousActiveItem!==i&&(this.shown=!1,this._previousActiveItem=i),i){let r=!!i?.variables?.some(o=>o.correctResponse),n=!!i?.variables?.some(o=>o.mapping?.mapEntries?.length>0||o.areaMapping?.areaMapEntries?.length>0);this.disabled=!r&&!n}else this.disabled=!0}_toggleState(){this.disabled||(this.shown=!this.shown,this.dispatchEvent(new CustomEvent("test-show-correct-response",{detail:this.shown,bubbles:!0})))}_getDisplayedText(){return this.disabled?this.noCorrectResponseText:this.shown?this.hideCorrectText:this.showCorrectText}render(){return c` <div @click="${this._toggleState}">${this._getDisplayedText()}</div> `}};t.styles=p`
|
|
2
|
+
:host {
|
|
3
|
+
${h};
|
|
4
|
+
}
|
|
5
|
+
:host([disabled]) {
|
|
6
|
+
${u};
|
|
7
|
+
}
|
|
8
|
+
`,e([a({context:d,subscribe:!0})],t.prototype,"computedContext",2),e([s({type:Boolean,reflect:!0})],t.prototype,"shown",2),e([s({type:Boolean,reflect:!0})],t.prototype,"disabled",2),e([s({type:String})],t.prototype,"showCorrectText",2),e([s({type:String})],t.prototype,"hideCorrectText",2),e([s({type:String})],t.prototype,"noCorrectResponseText",2),t=e([m("test-show-correct-response")],t);export{t as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as n,c as l}from"./chunk-U5Y5T4ZS.js";import{a as i}from"./chunk-42P7F3FC.js";import{a as s,d as o,i as r}from"./chunk-65CZNGQC.js";import{a as e}from"./chunk-JR322KXH.js";var t=class extends r{constructor(){super(),this.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("test-end-attempt",{bubbles:!0})),this.dispatchEvent(new CustomEvent("test-show-correct-response",{detail:!0,bubbles:!0}));let c=this.closest("qti-test").querySelector("test-container");Array.from(c.shadowRoot.querySelectorAll("[view]")).forEach(a=>{a.classList.toggle("show",!0)})})}render(){return o` <slot></slot> `}};t.styles=s`
|
|
2
|
+
:host {
|
|
3
|
+
${n};
|
|
4
|
+
}
|
|
5
|
+
:host([disabled]) {
|
|
6
|
+
${l};
|
|
7
|
+
}
|
|
8
|
+
`,t=e([i("test-check-item")],t);export{t as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as a,c as n}from"./chunk-U5Y5T4ZS.js";import{a as o}from"./chunk-42P7F3FC.js";import{a as s,d as r,i as l}from"./chunk-65CZNGQC.js";import{a as e}from"./chunk-JR322KXH.js";var t=class extends l{constructor(){super(),this.addEventListener("click",()=>this.dispatchEvent(new CustomEvent("test-end-attempt",{bubbles:!0})))}render(){return r` <slot></slot> `}};t.styles=s`
|
|
2
|
+
:host {
|
|
3
|
+
${a};
|
|
4
|
+
}
|
|
5
|
+
:host([disabled]) {
|
|
6
|
+
${n};
|
|
7
|
+
}
|
|
8
|
+
`,t=e([o("test-end-attempt")],t);export{t as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as p,b as c}from"./chunk-ZPQBCZQ2.js";import{a as o}from"./chunk-XUJ7TXHW.js";import{a as l}from"./chunk-ULI6NOVG.js";import{a as s,b as m,c as a}from"./chunk-42P7F3FC.js";import{d as r,i as n}from"./chunk-65CZNGQC.js";import{a as i}from"./chunk-JR322KXH.js";var e=class extends n{constructor(){super(...arguments);this.itemURL=null;this.itemDoc=null;this.itemXML=null;this.templateContent=null}async handleItemURLChange(){if(this.itemURL)try{let{promise:t}=await l().load(this.itemURL);this.itemDoc=(await t).htmlDoc()}catch(t){console.error("Error loading or parsing XML:",t)}}handleItemXMLChange(){if(this.itemXML)try{this.itemDoc=l().parse(this.itemXML).htmlDoc()}catch(t){console.error("Error parsing XML:",t)}}async connectedCallback(){super.connectedCallback(),this.initializeTemplateContent(),this.applyStyles(),this.itemURL&&this.handleItemURLChange(),this.itemXML&&this.handleItemXMLChange()}initializeTemplateContent(){let t=this.querySelector("template");this.templateContent=t?t.content:r``}applyStyles(){let t=new CSSStyleSheet;t.replaceSync(c),this.shadowRoot.adoptedStyleSheets=[t]}render(){return r`
|
|
2
|
+
${this.templateContent}
|
|
3
|
+
<slot></slot>
|
|
4
|
+
${p(this.itemDoc,r`<span>Loading...</span>`)}
|
|
5
|
+
`}};i([m({type:String,attribute:"item-url"})],e.prototype,"itemURL",2),i([a()],e.prototype,"itemDoc",2),i([a()],e.prototype,"itemXML",2),i([o("itemURL",{waitUntilFirstUpdate:!0})],e.prototype,"handleItemURLChange",1),i([o("itemXML",{waitUntilFirstUpdate:!0})],e.prototype,"handleItemXMLChange",1),e=i([s("item-container")],e);export{e as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as x}from"./chunk-AV6ISYP4.js";import{a as h}from"./chunk-P6SSTAJ2.js";import{b as u}from"./chunk-7WJYJA45.js";import{a as v,b as f,c as p}from"./chunk-42P7F3FC.js";import{d as r,g as c,i as d}from"./chunk-65CZNGQC.js";import{a as o}from"./chunk-JR322KXH.js";var e=class extends d{constructor(){super(...arguments);this.debug=!1;this.stampContext={view:"candidate",activeItem:{},activeSection:{items:[]},activeTestpart:{items:[],sections:[]},test:{}}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();let m=this.querySelector("template");if(!m){this.myTemplate=null;return}this.myTemplate=x(m)}willUpdate(m){if(!this.computedContext)return;let i=this.computedContext.testParts.find(t=>t.active),n=i?.sections.find(t=>t.active),l=n?.items.find(t=>t.active),{variables:P,...C}=l||{};if(!i||!n||!l)return;let y={...i,items:i.sections.flatMap(t=>t.items.map(({variables:a,...s})=>s)),sections:i.sections.map(t=>({...t,items:t.items.map(({variables:a,...s})=>s)}))},T={...n,items:n.items.map(({variables:t,...a})=>a)},{testParts:k,...b}=this.computedContext;this.stampContext={view:this.computedContext.view,activeItem:C,activeSection:T,activeTestpart:y,test:b}}render(){return r` ${this.debug?r`<small><pre>${JSON.stringify(this.stampContext,null,2)}</pre></small>`:c}
|
|
2
|
+
${this.myTemplate?this.myTemplate(this.stampContext):c}`}};o([f({type:Boolean,reflect:!0})],e.prototype,"debug",2),o([p(),u({context:h,subscribe:!0})],e.prototype,"computedContext",2),o([p()],e.prototype,"stampContext",2),e=o([v("test-stamp")],e);export{e as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{b as m}from"./chunk-CZDMOYYF.js";import{a as c}from"./chunk-XUJ7TXHW.js";import{b as r}from"./chunk-7WJYJA45.js";import{a,b as n,c as l}from"./chunk-42P7F3FC.js";import{d as s,i as p}from"./chunk-65CZNGQC.js";import{a as i}from"./chunk-JR322KXH.js";var t=class extends p{constructor(){super(...arguments);this.label="view";this._handleViewOptionsChange=()=>{this.updateViewOptions()};this._viewOptions=t.DEFAULT_VIEW_OPTIONS}connectedCallback(){super.connectedCallback(),this.updateViewOptions()}updateViewOptions(){if(this.viewOptions){let e=this.viewOptions.split(",").map(o=>o.trim());this._viewOptions=e.filter(o=>t.DEFAULT_VIEW_OPTIONS.includes(o))}else this._viewOptions=t.DEFAULT_VIEW_OPTIONS}_switchView(e){this.dispatchEvent(new CustomEvent("on-test-switch-view",{composed:!0,bubbles:!0,detail:e}))}render(){return s`
|
|
2
|
+
<label part="label" for="viewSelect">${this.label}</label>
|
|
3
|
+
<select
|
|
4
|
+
part="select"
|
|
5
|
+
id="viewSelect"
|
|
6
|
+
@change=${e=>{let o=e.target;this._switchView(o.value)}}
|
|
7
|
+
>
|
|
8
|
+
${this._viewOptions.map(e=>s`<option value="${e}" ?selected=${e===this.sessionContext.view}>${e}</option>`)}
|
|
9
|
+
</select>
|
|
10
|
+
`}};t.DEFAULT_VIEW_OPTIONS=["author","candidate","proctor","scorer","testConstructor","tutor"],i([r({context:m,subscribe:!0})],t.prototype,"sessionContext",2),i([n({type:String})],t.prototype,"label",2),i([n({type:String,attribute:"view-options"})],t.prototype,"viewOptions",2),i([c("viewOptions",{waitUntilFirstUpdate:!0})],t.prototype,"_handleViewOptionsChange",2),i([l()],t.prototype,"_viewOptions",2),t=i([a("test-view")],t);export{t as a};
|