@citolab/qti-components 7.0.4 → 7.0.6-next.0
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/chunk-25BMUTLC.js +1 -0
- package/cdn/chunk-3DWLPGTE.js +1 -0
- package/cdn/chunk-7BKWTY4S.js +1 -0
- package/cdn/chunk-7CQ4ETXL.js +1 -0
- package/cdn/chunk-7ENNZNJ4.js +1 -0
- package/cdn/chunk-7LGM2TQA.js +1 -0
- package/cdn/chunk-CYJMNT76.js +0 -0
- package/cdn/chunk-DLMFCDQX.js +1 -0
- package/cdn/chunk-DPR6SGCZ.js +1 -0
- package/cdn/chunk-EQGXFSYL.js +8 -0
- package/cdn/chunk-F5VW77RE.js +1 -0
- package/cdn/chunk-FNVXN5CO.js +1 -0
- package/cdn/chunk-GB7DLBFM.js +0 -0
- package/cdn/chunk-GBB54IPA.js +8 -0
- package/cdn/chunk-GPDDPZFH.js +1 -0
- package/cdn/chunk-H4A34YRT.js +0 -0
- package/cdn/chunk-ITXNNGVQ.js +0 -0
- package/cdn/chunk-IV7UP34N.js +5 -0
- package/cdn/chunk-IZZ36JQV.js +0 -0
- package/cdn/chunk-JNT54FPI.js +1 -0
- package/cdn/chunk-JS4S7ZI7.js +1 -0
- package/cdn/chunk-L26FOTPN.js +17 -0
- package/cdn/chunk-LA7TBIPQ.js +0 -0
- package/cdn/chunk-LVW3MHTI.js +23 -0
- package/cdn/chunk-POT65ZY7.js +1 -0
- package/cdn/chunk-Q7PVZA43.js +5 -0
- package/cdn/chunk-QJPHXAUE.js +1 -0
- package/cdn/chunk-QP57JHGY.js +11 -0
- package/cdn/chunk-RB6CONZW.js +3 -0
- package/cdn/chunk-RSRX5JYB.js +1 -0
- package/cdn/chunk-TG6AE3DB.js +0 -0
- package/cdn/chunk-V6YPUNZC.js +0 -0
- package/cdn/chunk-VI2WKTN4.js +1 -0
- package/cdn/chunk-W7X6GNEX.js +902 -0
- package/cdn/chunk-Y63VPWCG.js +3523 -0
- package/cdn/chunk-ZEX7TYC7.js +8 -0
- package/cdn/index.global.js +45 -45
- package/cdn/index.js +1 -4783
- package/cdn/qti-components/index.global.js +226 -0
- package/cdn/qti-components/index.js +1 -0
- package/cdn/qti-item/components/index.global.js +149 -0
- package/cdn/qti-item/components/index.js +1 -0
- package/cdn/qti-item/components/item-container.global.js +149 -0
- package/cdn/qti-item/components/item-container.js +1 -0
- package/cdn/qti-item/index.global.js +149 -0
- package/cdn/qti-item/index.js +1 -0
- package/cdn/qti-item/qti-item.global.js +114 -0
- package/cdn/qti-item/qti-item.js +1 -0
- package/cdn/qti-loader/index.global.js +1 -0
- package/cdn/qti-loader/index.js +1 -0
- package/cdn/qti-test/components/index.global.js +242 -0
- package/cdn/qti-test/components/index.js +1 -0
- package/cdn/qti-test/components/styles.global.js +44 -0
- package/cdn/qti-test/components/styles.js +1 -0
- package/cdn/qti-test/components/test-component.abstract.global.js +170 -0
- package/cdn/qti-test/components/test-component.abstract.js +1 -0
- package/cdn/qti-test/components/test-container.global.js +149 -0
- package/cdn/qti-test/components/test-container.js +1 -0
- package/cdn/qti-test/components/test-item-link.global.js +170 -0
- package/cdn/qti-test/components/test-item-link.js +1 -0
- package/cdn/qti-test/components/test-next.global.js +170 -0
- package/cdn/qti-test/components/test-next.js +1 -0
- package/cdn/qti-test/components/test-next.spec.global.js +297 -0
- package/cdn/qti-test/components/test-next.spec.js +713 -0
- package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +207 -0
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -0
- package/cdn/qti-test/components/test-prev.global.js +170 -0
- package/cdn/qti-test/components/test-prev.js +1 -0
- package/cdn/qti-test/components/test-view.global.js +170 -0
- package/cdn/qti-test/components/test-view.js +1 -0
- package/cdn/qti-test/context/index.global.js +58 -0
- package/cdn/qti-test/context/index.js +1 -0
- package/cdn/qti-test/context/test.context.global.js +58 -0
- package/cdn/qti-test/context/test.context.js +1 -0
- package/cdn/qti-test/index.global.js +242 -0
- package/cdn/qti-test/index.js +1 -0
- package/cdn/qti-test/mixins/index.global.js +1 -0
- package/cdn/qti-test/mixins/index.js +1 -0
- package/cdn/qti-test/mixins/test-loader.mixin.global.js +1 -0
- package/cdn/qti-test/mixins/test-loader.mixin.js +1 -0
- package/cdn/qti-test/mixins/test-navigation.mixin.global.js +1 -0
- package/cdn/qti-test/mixins/test-navigation.mixin.js +1 -0
- package/cdn/qti-test/mixins/test-view.mixin.global.js +1 -0
- package/cdn/qti-test/mixins/test-view.mixin.js +1 -0
- package/cdn/qti-test/qti-assessment-test/index.global.js +170 -0
- package/cdn/qti-test/qti-assessment-test/index.js +1 -0
- package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.global.js +170 -0
- package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.js +1 -0
- package/cdn/qti-test/qti-assessment-test/qti-assessment-section.global.js +170 -0
- package/cdn/qti-test/qti-assessment-test/qti-assessment-section.js +1 -0
- package/cdn/qti-test/qti-assessment-test/qti-assessment-test.global.js +170 -0
- package/cdn/qti-test/qti-assessment-test/qti-assessment-test.js +1 -0
- package/cdn/qti-test/qti-assessment-test/qti-test-part.global.js +114 -0
- package/cdn/qti-test/qti-assessment-test/qti-test-part.js +1 -0
- package/cdn/qti-test/qti-test.global.js +170 -0
- package/cdn/qti-test/qti-test.js +1 -0
- package/cdn/qti-test/test-base.global.js +170 -0
- package/cdn/qti-test/test-base.js +1 -0
- package/cdn/qti-transformers/index.global.js +1 -0
- package/cdn/qti-transformers/index.js +1 -0
- package/dist/{transformers/index.js → chunk-2OA7E3E7.js} +2 -1
- package/dist/chunk-2OA7E3E7.js.map +1 -0
- package/dist/chunk-37X6KZO3.js +1 -0
- package/dist/chunk-37X6KZO3.js.map +1 -0
- package/dist/chunk-3WLCQQN7.js +3529 -0
- package/dist/chunk-3WLCQQN7.js.map +1 -0
- package/dist/chunk-3YVIK6LO.js +1 -0
- package/dist/chunk-3YVIK6LO.js.map +1 -0
- package/dist/chunk-44VE5POH.js +55 -0
- package/dist/chunk-44VE5POH.js.map +1 -0
- package/dist/chunk-4CSM2PCC.js +37 -0
- package/dist/chunk-4CSM2PCC.js.map +1 -0
- package/dist/chunk-4YG2FPKK.js +31 -0
- package/dist/chunk-4YG2FPKK.js.map +1 -0
- package/dist/chunk-7A6KCSAU.js +44 -0
- package/dist/chunk-7A6KCSAU.js.map +1 -0
- package/dist/chunk-ENVUIH2A.js +118 -0
- package/dist/chunk-ENVUIH2A.js.map +1 -0
- package/dist/chunk-ENZVY5X6.js +20 -0
- package/dist/chunk-ENZVY5X6.js.map +1 -0
- package/dist/chunk-EUCEENQQ.js +6253 -0
- package/dist/chunk-EUCEENQQ.js.map +1 -0
- package/dist/chunk-FNFNAV3G.js +56 -0
- package/dist/chunk-FNFNAV3G.js.map +1 -0
- package/dist/chunk-GSFDTSLL.js +1 -0
- package/dist/chunk-GSFDTSLL.js.map +1 -0
- package/dist/chunk-GTYLWGDG.js +43 -0
- package/dist/chunk-GTYLWGDG.js.map +1 -0
- package/dist/chunk-IAFQ5ZPI.js +29 -0
- package/dist/chunk-IAFQ5ZPI.js.map +1 -0
- package/dist/chunk-JDHBXMKF.js +78 -0
- package/dist/chunk-JDHBXMKF.js.map +1 -0
- package/dist/chunk-L7MBIXEX.js +50 -0
- package/dist/chunk-L7MBIXEX.js.map +1 -0
- package/dist/chunk-LYFMLDNV.js +1 -0
- package/dist/chunk-LYFMLDNV.js.map +1 -0
- package/dist/chunk-NNPTSZGC.js +1 -0
- package/dist/chunk-NNPTSZGC.js.map +1 -0
- package/dist/chunk-NQM35JUI.js +1 -0
- package/dist/chunk-NQM35JUI.js.map +1 -0
- package/dist/chunk-ODUHPWTX.js +65 -0
- package/dist/chunk-ODUHPWTX.js.map +1 -0
- package/dist/chunk-OGHHCP23.js +36 -0
- package/dist/chunk-OGHHCP23.js.map +1 -0
- package/dist/chunk-OQZW2B47.js +75 -0
- package/dist/chunk-OQZW2B47.js.map +1 -0
- package/dist/chunk-OXDOQVRL.js +63 -0
- package/dist/chunk-OXDOQVRL.js.map +1 -0
- package/dist/chunk-PBSMP6VF.js +128 -0
- package/dist/chunk-PBSMP6VF.js.map +1 -0
- package/dist/chunk-Q7OPFS4A.js +1 -0
- package/dist/chunk-Q7OPFS4A.js.map +1 -0
- package/dist/chunk-R4HSV7U7.js +10 -0
- package/dist/chunk-R4HSV7U7.js.map +1 -0
- package/dist/chunk-TXRSYXG3.js +50 -0
- package/dist/chunk-TXRSYXG3.js.map +1 -0
- package/dist/chunk-U3RLYKL5.js +51 -0
- package/dist/chunk-U3RLYKL5.js.map +1 -0
- package/dist/chunk-UB5K44DB.js +30 -0
- package/dist/chunk-UB5K44DB.js.map +1 -0
- package/dist/chunk-VODOQFTJ.js +72 -0
- package/dist/chunk-VODOQFTJ.js.map +1 -0
- package/dist/chunk-VW7VIQBE.js +34 -0
- package/dist/chunk-VW7VIQBE.js.map +1 -0
- package/dist/chunk-X4ZBUCOD.js +94 -0
- package/dist/chunk-X4ZBUCOD.js.map +1 -0
- package/dist/chunk-XFHB6KQW.js +1 -0
- package/dist/chunk-XFHB6KQW.js.map +1 -0
- package/dist/chunk-XNBWN7N2.js +94 -0
- package/dist/chunk-XNBWN7N2.js.map +1 -0
- package/dist/index.d.ts +18 -503
- package/dist/index.js +169 -13584
- package/dist/index.js.map +1 -1
- package/dist/item.css +10 -10
- package/dist/qti-components/index.d.ts +150 -0
- package/dist/qti-components/index.js +189 -0
- package/dist/qti-components/index.js.map +1 -0
- package/dist/qti-components-jsx.d.ts +93 -147
- package/dist/qti-item/components/index.d.ts +3 -0
- package/dist/qti-item/components/index.js +12 -0
- package/dist/qti-item/components/index.js.map +1 -0
- package/dist/qti-item/components/item-container.d.ts +40 -0
- package/dist/qti-item/components/item-container.js +11 -0
- package/dist/qti-item/components/item-container.js.map +1 -0
- package/dist/qti-item/index.d.ts +4 -0
- package/dist/qti-item/index.js +17 -0
- package/dist/qti-item/index.js.map +1 -0
- package/dist/qti-item/qti-item.d.ts +25 -0
- package/dist/qti-item/qti-item.js +8 -0
- package/dist/qti-item/qti-item.js.map +1 -0
- package/dist/{loader → qti-loader}/index.d.ts +1 -1
- package/dist/qti-loader/index.js +11 -0
- package/dist/qti-loader/index.js.map +1 -0
- package/dist/{qti-simple-choice-D0GiMrqD.d.ts → qti-simple-choice-DxWcdKHi.d.ts} +30 -40
- package/dist/qti-test/components/index.d.ts +13 -0
- package/dist/qti-test/components/index.js +40 -0
- package/dist/qti-test/components/index.js.map +1 -0
- package/dist/qti-test/components/styles.d.ts +8 -0
- package/dist/qti-test/components/styles.js +14 -0
- package/dist/qti-test/components/styles.js.map +1 -0
- package/dist/qti-test/components/test-component.abstract.d.ts +23 -0
- package/dist/qti-test/components/test-component.abstract.js +12 -0
- package/dist/qti-test/components/test-component.abstract.js.map +1 -0
- package/dist/qti-test/components/test-container.d.ts +37 -0
- package/dist/qti-test/components/test-container.js +11 -0
- package/dist/qti-test/components/test-container.js.map +1 -0
- package/dist/qti-test/components/test-item-link.d.ts +21 -0
- package/dist/qti-test/components/test-item-link.js +14 -0
- package/dist/qti-test/components/test-item-link.js.map +1 -0
- package/dist/qti-test/components/test-next.d.ts +32 -0
- package/dist/qti-test/components/test-next.js +14 -0
- package/dist/qti-test/components/test-next.js.map +1 -0
- package/dist/qti-test/components/test-next.spec.d.ts +16 -0
- package/dist/qti-test/components/test-next.spec.js +45923 -0
- package/dist/qti-test/components/test-next.spec.js.map +1 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +22 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.js +13 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.js.map +1 -0
- package/dist/qti-test/components/test-prev.d.ts +32 -0
- package/dist/qti-test/components/test-prev.js +14 -0
- package/dist/qti-test/components/test-prev.js.map +1 -0
- package/dist/qti-test/components/test-view.d.ts +27 -0
- package/dist/qti-test/components/test-view.js +13 -0
- package/dist/qti-test/components/test-view.js.map +1 -0
- package/dist/qti-test/context/index.d.ts +6 -0
- package/dist/qti-test/context/index.js +11 -0
- package/dist/qti-test/context/index.js.map +1 -0
- package/dist/qti-test/context/test.context.d.ts +6 -0
- package/dist/qti-test/context/test.context.js +10 -0
- package/dist/qti-test/context/test.context.js.map +1 -0
- package/dist/qti-test/index.d.ts +14 -0
- package/dist/qti-test/index.js +72 -0
- package/dist/qti-test/index.js.map +1 -0
- package/dist/qti-test/mixins/index.d.ts +8 -0
- package/dist/qti-test/mixins/index.js +18 -0
- package/dist/qti-test/mixins/index.js.map +1 -0
- package/dist/qti-test/mixins/test-loader.mixin.d.ts +8 -0
- package/dist/qti-test/mixins/test-loader.mixin.js +9 -0
- package/dist/qti-test/mixins/test-loader.mixin.js.map +1 -0
- package/dist/qti-test/mixins/test-navigation.mixin.d.ts +22 -0
- package/dist/qti-test/mixins/test-navigation.mixin.js +8 -0
- package/dist/qti-test/mixins/test-navigation.mixin.js.map +1 -0
- package/dist/qti-test/mixins/test-view.mixin.d.ts +6 -0
- package/dist/qti-test/mixins/test-view.mixin.js +8 -0
- package/dist/qti-test/mixins/test-view.mixin.js.map +1 -0
- package/dist/qti-test/qti-assessment-test/index.d.ts +6 -0
- package/dist/qti-test/qti-assessment-test/index.js +23 -0
- package/dist/qti-test/qti-assessment-test/index.js.map +1 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.d.ts +6 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js +10 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js.map +1 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.d.ts +6 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.js +10 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.js.map +1 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.d.ts +6 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.js +10 -0
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.js.map +1 -0
- package/dist/qti-test/qti-assessment-test/qti-test-part.d.ts +19 -0
- package/dist/qti-test/qti-assessment-test/qti-test-part.js +8 -0
- package/dist/qti-test/qti-assessment-test/qti-test-part.js.map +1 -0
- package/dist/qti-test/qti-test.d.ts +68 -0
- package/dist/qti-test/qti-test.js +16 -0
- package/dist/qti-test/qti-test.js.map +1 -0
- package/dist/qti-test/test-base.d.ts +6 -0
- package/dist/qti-test/test-base.js +10 -0
- package/dist/qti-test/test-base.js.map +1 -0
- package/dist/qti-transformers/index.js +12 -0
- package/dist/qti-transformers/index.js.map +1 -0
- package/dist/test-base-BJwG9Ie8.d.ts +109 -0
- package/dist/vscode.html-custom-data.json +49 -38
- package/package.json +28 -52
- package/dist/custom-element-eslint-rules.js +0 -329
- package/dist/custom-elements.json +0 -27271
- package/dist/loader/index.js +0 -310
- package/dist/loader/index.js.map +0 -1
- package/dist/qti-simple-choice-CfgBEvdI.d.ts +0 -1143
- package/dist/qti-simple-choice-UTrFa_RQ.d.ts +0 -1177
- package/dist/qti-simple-choice-zEsDq3c0.d.ts +0 -1147
- package/dist/transformers/index.js.map +0 -1
- /package/dist/{transformers → qti-transformers}/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function f(e,l){let d={waitUntilFirstUpdate:!1,...l};return(s,o)=>{let{update:r}=s,p=Array.isArray(e)?e:[e];s.update=function(t){p.forEach(c=>{let n=c;if(t.has(n)){let a=t.get(n),i=this[n];a!==i&&(!d.waitUntilFirstUpdate||this.hasUpdated)&&this[o](a,i)}}),r.call(this,t)}}}export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=i=>{class n extends i{constructor(...t){super(...t),this._testContext={...this._testContext,view:"candidate"},this.addEventListener("on-test-switch-view",e=>{this._testContext={...this._testContext,view:e.detail},this._updateElementView()}),this.addEventListener("qti-assessment-test-connected",()=>{this._updateElementView()}),this.addEventListener("qti-assessment-item-connected",e=>{this._updateElementView(),this._setCorrectResponseVisibility(e.detail)})}willUpdate(t){super.willUpdate(t),t.has("_testContext")&&this._updateElementView()}_updateElementView(){if(this.testElement&&this.testElement.el){Array.from(this.testElement.el.querySelectorAll("[view]")).forEach(s=>{s.classList.toggle("show",s.getAttribute("view")===this._testContext.view)});let e=this.testElement.el.querySelector(`qti-assessment-item[identifier="${this._testContext.navItemId}"]`);e&&e.showCorrectResponse(this._testContext.view==="scorer")}}_setCorrectResponseVisibility(t){t.showCorrectResponse(this._testContext.view==="scorer")}}return n};export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b as m}from"./chunk-JNT54FPI.js";import{e as o}from"./chunk-VI2WKTN4.js";import{provide as l}from"@lit/context";import{LitElement as u}from"lit";import{state as d}from"lit/decorators.js";var r=class extends u{constructor(){super();this._testContext={items:[],testOutcomeVariables:[]};this.testElement={el:null};this._updateItemInTestContext=t=>{let{identifier:e,variables:i}=t,s=this._testContext.items.find(n=>n?.identifier===e);if(!s){console.warn(`Item IDs between assessment.xml and item.xml should match: ${e} is not found!`);return}s.variables?.length===1?this._updateItemVariablesInTestContext(e,i):t.variables=[...s.variables||[]]};this.addEventListener("qti-assessment-test-connected",t=>{let e=t.detail,i=Array.from(e.querySelectorAll("qti-assessment-item-ref")).map(s=>({href:s.href,identifier:s.identifier,category:s.category,variables:[{identifier:"completionStatus",value:"not_attempted",type:"outcome"}]}));this.testElement={el:e},this._testContext={...this._testContext,items:i}}),this.addEventListener("qti-assessment-item-connected",t=>{this._updateItemInTestContext(t.detail)}),this.addEventListener("qti-outcome-changed",t=>{let e=t.composedPath()[0];this._updateItemVariablesInTestContext(e.identifier,e.variables)})}get context(){return this._testContext}set context(t){t!=null&&(this._testContext={...t},t.items?.forEach(e=>{let i=this._testContext.items.find(s=>s.identifier===e.identifier);i?i.variables=e.variables:this._testContext.items.push(e)}))}_updateItemVariablesInTestContext(t,e){this._testContext={...this._testContext,items:this._testContext.items.map(i=>i.identifier!==t?i:{...i,variables:e.map(s=>{let n=i.variables.find(c=>c.identifier===s.identifier);return n?{...n,...s}:s})})}}connectedCallback(){super.connectedCallback(),this.setAttribute("qti-test","")}};o([d(),l({context:a})],r.prototype,"_testContext",2),o([d(),l({context:m})],r.prototype,"testElement",2);export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t}from"./chunk-VI2WKTN4.js";import{html as i,LitElement as o}from"lit";import{customElement as r,property as n}from"lit/decorators.js";var e=class extends o{constructor(){super(...arguments);this.identifier="";this.title="";this.class="";this.NavigationMode="nonlinear";this.submissionMode="individual"}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new Event("qti-test-part-connected",{bubbles:!0,composed:!0}))}render(){return i` <slot></slot>`}};t([n({type:String})],e.prototype,"identifier",2),t([n({type:String})],e.prototype,"title",2),t([n({type:String})],e.prototype,"class",2),t([n({type:String,attribute:"navigation-mode"})],e.prototype,"NavigationMode",2),t([n({type:String,attribute:"submission-mode"})],e.prototype,"submissionMode",2),e=t([r("qti-test-part")],e);customElements.get("qti-test-part")||customElements.define("qti-test-part",e);export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-LVW3MHTI.js";var c=s=>{class r extends s{constructor(...n){super(...n),this.addEventListener("qti-assessment-test-connected",()=>{}),this.addEventListener("qti-load-item-request",({detail:t})=>{t.promise=(async()=>(await e().load(`${t.href}`,t.cancelPreviousRequest)).htmlDoc())()}),this.addEventListener("qti-interaction-changed",t=>{}),this.addEventListener("qti-outcome-changed",()=>{})}}return r};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./chunk-25BMUTLC.js";import{a as m,b as c}from"./chunk-JNT54FPI.js";import{e as n}from"./chunk-VI2WKTN4.js";import{consume as u}from"@lit/context";import{LitElement as b}from"lit";import{state as h}from"lit/decorators.js";import{property as f}from"lit/decorators.js";function p(a){return(l,t)=>{f(a)(l,t);let e=`__${t}`;Object.defineProperty(l,t,{get(){return this[e]},set(r){let o=this[e];if(this[e]=r,o!==r){if(this._internals?.states){let i=t.toLowerCase();r?this._internals.states.add(`--${i}`):this._internals.states.delete(`--${i}`)}if(a.aria&&this._internals){let i=a.aria;r?this._internals[i]="true":this._internals[i]=null}this.requestUpdate(t,o)}},configurable:!0,enumerable:!0})}}var s=class extends b{constructor(){super();this.disabled=!0;this._internals=this.attachInternals()}_handleTestElementChange(t,e){e.el&&(this.disabled=!1)}willUpdate(t){if(t.has("_testContext")){let{items:e=[],navItemId:r}=this._testContext??{};this.itemIndex=e.findIndex(o=>o.identifier===r),this.items=e,this.view=this._testContext?.view}}_switchView(t){this.dispatchEvent(new CustomEvent("on-test-switch-view",{composed:!0,bubbles:!0,detail:t}))}_requestItem(t){this.dispatchEvent(new CustomEvent("qti-request-test-item",{composed:!0,bubbles:!0,detail:t}))}};n([p({type:Boolean,reflect:!0,aria:"ariaDisabled"})],s.prototype,"disabled",2),n([h(),u({context:m,subscribe:!0})],s.prototype,"_testContext",2),n([h(),u({context:c,subscribe:!0})],s.prototype,"_testElement",2),n([d("_testElement")],s.prototype,"_handleTestElementChange",1);export{s as a};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,b as o,c as r}from"./chunk-LVW3MHTI.js";var h=async s=>{let t=s.substring(0,s.lastIndexOf("/")),e=await o().load(`${s}`).then(n=>n.assessmentTest()),m=await r().load(`${t}/${e.href}`).then(n=>n.htmlDoc()),f=await r().load(`${t}/${e.href}`).then(n=>n.items()),a=`${t}/${e.href}`,c=`${t}/${e.href.substring(0,e.href.lastIndexOf("/"))}`;return{testHTMLDoc:m,testURI:c,testURL:a,items:f,testIdentifier:e.identifier}},d=async s=>i().load(s).then(t=>t.htmlDoc().firstElementChild);export{h as a,d as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=o=>{class r extends o{constructor(...s){super(...s),this.addEventListener("qti-request-test-item",({detail:t})=>{if(!t)return;this._clearLoadedItems();let e=this.testElement.el.querySelector(`qti-assessment-item-ref[identifier="${t}"]`),i=this._loadItemRequest(e.href,!1),a=e.closest("qti-test-part").identifier,m=e.closest("qti-assessment-section").identifier;this._testContext={...this._testContext,navPartId:a,navSectionId:m,navItemId:t,navItemLoading:!0},i?i.then(n=>{e.xmlDoc=n,requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("qti-item-connected",{bubbles:!0,composed:!0}))),this._testContext={...this._testContext,navItemLoading:!1}}).catch(n=>console.error("Failed to load item:",n)):console.info("Load item request was not handled:",e.href)}),this.addEventListener("qti-assessment-test-connected",()=>{let t=this._testContext.navItemId;t||(t=this.testElement.el.querySelector("qti-assessment-item-ref").identifier),this.dispatchEvent(new CustomEvent("qti-request-test-item",{detail:t,bubbles:!0,composed:!0}))})}_clearLoadedItems(){let s=this.testElement.el.querySelectorAll("qti-assessment-test qti-assessment-item-ref");Array.from(s).forEach(t=>{t.xmlDoc=null})}_loadItemRequest(s,t=!0){let e=new CustomEvent("qti-load-item-request",{bubbles:!0,composed:!0,detail:{href:s,promise:null,cancelPreviousRequest:t}});return this.dispatchEvent(e),e.detail.promise}}return r};export{c as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as n,c as l}from"./chunk-L26FOTPN.js";import{a as i}from"./chunk-7LGM2TQA.js";import{e as s}from"./chunk-VI2WKTN4.js";import{css as r,html as m}from"lit";import{customElement as o}from"lit/decorators.js";var t=class extends i{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",e=>{e.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex+1].identifier)})}willUpdate(e){super.willUpdate(e),e.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex<0||this.itemIndex>=this.items.length-1)}render(){return m`<slot></slot>`}};t.styles=r`
|
|
2
|
+
:host {
|
|
3
|
+
${n};
|
|
4
|
+
}
|
|
5
|
+
:host([disabled]) {
|
|
6
|
+
${l};
|
|
7
|
+
}
|
|
8
|
+
`,t=s([o("test-next")],t);export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-JNT54FPI.js";import{e}from"./chunk-VI2WKTN4.js";import{consume as n}from"@lit/context";import{html as i,LitElement as a}from"lit";import{customElement as c,property as r}from"lit/decorators.js";var t=class extends a{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-assessment-test-connected",{detail:this,bubbles:!0,composed:!0}))}render(){return i` <slot></slot>`}};e([r({type:String})],t.prototype,"identifier",2),e([r({type:String})],t.prototype,"title",2),e([n({context:o,subscribe:!0})],t.prototype,"_testContext",2),t=e([c("qti-assessment-test")],t);export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l}from"./chunk-JNT54FPI.js";import{e as t}from"./chunk-VI2WKTN4.js";import{consume as a}from"@lit/context";import{html as i,LitElement as s}from"lit";import{property as o}from"lit/decorators.js";var n={fromAttribute(r){return r==="true"},toAttribute(r){return r?"true":"false"}},e=class extends s{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new Event("qti-assessment-section-connected",{bubbles:!0,composed:!0}))}render(){return i`<slot name="qti-rubric-block"></slot><slot></slot>`}};t([o({type:String})],e.prototype,"identifier",2),t([o({type:String})],e.prototype,"required",2),t([o({type:Boolean,converter:n})],e.prototype,"fixed",2),t([o({type:String})],e.prototype,"title",2),t([o({type:Boolean,converter:n})],e.prototype,"visible",2),t([o({type:Boolean,converter:n,attribute:"keep-together"})],e.prototype,"keepTogether",2),t([a({context:l,subscribe:!0})],e.prototype,"_testContext",2);customElements.get("qti-assessment-section")||customElements.define("qti-assessment-section",e);export{e as a};
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{b as l,c as n}from"./chunk-L26FOTPN.js";import{a as i}from"./chunk-7LGM2TQA.js";import{e as s}from"./chunk-VI2WKTN4.js";import{css as r,html as o}from"lit";import{customElement as m}from"lit/decorators.js";var t=class extends i{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",e=>{e.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex-1].identifier)})}willUpdate(e){super.willUpdate(e),e.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex===0||this.itemIndex===-1)}render(){return o`<slot></slot>`}};t.styles=r`
|
|
2
|
+
:host {
|
|
3
|
+
${l};
|
|
4
|
+
}
|
|
5
|
+
:host([disabled]) {
|
|
6
|
+
${n};
|
|
7
|
+
}
|
|
8
|
+
`,t=s([m("test-prev")],t);export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function p(n,y){let t;return(s,a)=>{let{connectedCallback:r,disconnectedCallback:l}=s;s.connectedCallback=function(){r.call(this);let i=m=>{let u=Array.from(this.querySelectorAll(n)).concat(Array.from(this.shadowRoot?.querySelectorAll(n)||[]));for(let o of m){let d=Array.from(o.addedNodes).map(e=>e),f=Array.from(o.addedNodes).map(e=>e);o.type==="childList"&&d.find(e=>u.includes(e))&&this[a](d,f)}};t=new MutationObserver(i),t.observe(this,{childList:!0,subtree:!0});let c=Array.from(this.querySelectorAll(n)).concat(Array.from(this.shadowRoot?.querySelectorAll(n)||[]));this[a](Array.from(c),[])},s.disconnectedCallback=function(){l.call(this),t.disconnect()}}}export{p as a};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as l}from"./chunk-Y63VPWCG.js";import{a}from"./chunk-25BMUTLC.js";import{c as s}from"./chunk-LVW3MHTI.js";import{e as r}from"./chunk-VI2WKTN4.js";import{LitElement as n,html as i}from"lit";import{customElement as p,property as c,state as o}from"lit/decorators.js";import{until as h}from"lit/directives/until.js";var e=class extends n{constructor(){super(...arguments);this.testURL=null;this.testDoc=null;this.testXML=null;this.templateContent=null}async handleTestURLChange(){if(this.testURL)try{let t=await s().load(this.testURL);this.testDoc=t.htmlDoc()}catch(t){console.error("Error loading or parsing XML:",t)}}handleTestXMLChange(){if(this.testXML)try{this.testDoc=s().parse(this.testXML).htmlDoc()}catch(t){console.error("Error parsing XML:",t)}}async connectedCallback(){super.connectedCallback(),this.initializeTemplateContent(),this.applyStyles(),this.testURL&&this.handleTestURLChange(),this.testXML&&this.handleTestXMLChange()}initializeTemplateContent(){let t=this.querySelector("template");this.templateContent=t?t.content:i``}applyStyles(){let t=new CSSStyleSheet;t.replaceSync(l),this.shadowRoot.adoptedStyleSheets=[t]}render(){return i`
|
|
2
|
+
${this.templateContent}
|
|
3
|
+
<slot></slot>
|
|
4
|
+
${h(this.testDoc,i`<span>Loading...</span>`)}
|
|
5
|
+
`}};r([c({type:String,attribute:"test-url"})],e.prototype,"testURL",2),r([o()],e.prototype,"testDoc",2),r([o()],e.prototype,"testXML",2),r([a("testURL",{waitUntilFirstUpdate:!0})],e.prototype,"handleTestURLChange",1),r([a("testXML",{waitUntilFirstUpdate:!0})],e.prototype,"handleTestXMLChange",1),e=r([p("test-container")],e);export{e as a};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as t}from"@lit/context";var n=t(Symbol("test")),o=t(Symbol("testElement"));export{n as a,o as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t}from"./chunk-VI2WKTN4.js";import{html as r,LitElement as l}from"lit";import{customElement as m}from"lit/decorators.js";var e=class extends l{render(){return r`<slot></slot>`}};e=t([m("qti-item")],e);export{e as a};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{css as r}from"lit";var o=r`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
padding: 0.5rem 1rem;
|
|
6
|
+
border-radius: 0.25rem;
|
|
7
|
+
user-select: none;
|
|
8
|
+
`,t=r`
|
|
9
|
+
background-color: lightgray;
|
|
10
|
+
${o};
|
|
11
|
+
`,n=r`
|
|
12
|
+
cursor: not-allowed;
|
|
13
|
+
opacity: 0.5;
|
|
14
|
+
`,s=r`
|
|
15
|
+
${o};
|
|
16
|
+
border: 1px solid gray;
|
|
17
|
+
`;export{o as a,t as b,n as c,s as d};
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var b=String.raw,T=b`<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
2
|
+
<xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
|
|
3
|
+
<xsl:template match="@*|node()">
|
|
4
|
+
<xsl:copy>
|
|
5
|
+
<xsl:apply-templates select="@*|node()"/>
|
|
6
|
+
</xsl:copy>
|
|
7
|
+
</xsl:template>
|
|
8
|
+
|
|
9
|
+
<!-- remove existing namespaces -->
|
|
10
|
+
<xsl:template match="*">
|
|
11
|
+
<!-- remove element prefix -->
|
|
12
|
+
<xsl:element name="{local-name()}">
|
|
13
|
+
<!-- process attributes -->
|
|
14
|
+
<xsl:for-each select="@*">
|
|
15
|
+
<!-- remove attribute prefix -->
|
|
16
|
+
<xsl:attribute name="{local-name()}">
|
|
17
|
+
<xsl:value-of select="."/>
|
|
18
|
+
</xsl:attribute>
|
|
19
|
+
</xsl:for-each>
|
|
20
|
+
<xsl:apply-templates/>
|
|
21
|
+
</xsl:element>
|
|
22
|
+
</xsl:template>
|
|
23
|
+
</xsl:stylesheet>`;function g(e,r,t){e.querySelectorAll(r).forEach(s=>{let n=`${r}-${t}`,o=h(s,n);s.replaceWith(o)})}function x(e,r){e.querySelectorAll("*").forEach(t=>{let s=t.classList;s&&s.forEach(n=>{if(n.startsWith(`${r}:`)){let o=n.slice(`${r}:`.length),f=`${t.nodeName}-${o}`,l=h(t,f);t.replaceWith(l)}})})}function h(e,r){let t=document.createElement(r);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.appendChild(e.firstChild);return t}function d(e){let r=[];return e.querySelectorAll("qti-assessment-item-ref").forEach(t=>{let s=t.getAttribute("identifier"),n=t.getAttribute("href"),o=t.getAttribute("category");r.push({identifier:s,href:n,category:o})}),r}var p=null;function i(e,r=!1){return r&&p!==null&&p.abort(),new Promise((t,s)=>{let n=new XMLHttpRequest;p=n,n.open("GET",e,!0),n.responseType="document",n.onload=()=>{n.status>=200&&n.status<300?t(n.responseXML):s(n.statusText)},n.onerror=()=>{s(n.statusText)},n.send()})}function a(e){return new DOMParser().parseFromString(e,"text/xml")}function m(e){let r=new XSLTProcessor,t=new DOMParser().parseFromString(T,"text/xml");return r.importStylesheet(t),r.transformToFragment(e,document)}function u(e,r){r.endsWith("/")||(r+="/"),e.querySelectorAll("[src],[href],[primary-path]").forEach(t=>{let s="";t.getAttribute("src")&&(s="src"),t.getAttribute("href")&&(s="href"),t.getAttribute("primary-path")&&(s="primary-path");let n=t.getAttribute(s)?.trim();if(!n.startsWith("data:")&&!n.startsWith("http")){let o=r+encodeURI(n);t.setAttribute(s,o)}})}function A(e){e.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(t=>{let s=document.createComment(t.textContent);t.replaceChild(s,t.firstChild)})}function y(e){e.querySelectorAll("qti-stylesheet").forEach(r=>r.remove())}var D=()=>{let e,r={async load(t,s=!1){return new Promise(n=>{i(t,s).then(o=>(e=o,r.path(t.substring(0,t.lastIndexOf("/"))),n(r)))})},parse(t){return e=a(t),r},path:t=>(u(e,t),r),fn(t){return t(e),r},pciHooks(t){let s=["hook","module"],n=t.substring(0,t.lastIndexOf("/"));for(let o of s)e.querySelectorAll("["+o+"]").forEach(l=>{let c=l.getAttribute(o);!c.startsWith("data:")&&!c.startsWith("http")&&(l.setAttribute("base-url",t),l.setAttribute("module",n+"/"+encodeURI(c+(c.endsWith(".js")?"":".js"))))});return r},extendElementName:(t,s)=>(g(e,t,s),r),extendElementsWithClass:(t="extend")=>(x(e,t),r),customInteraction(t,s){let n=e.querySelector("qti-custom-interaction"),o=n.querySelector("object");return n.setAttribute("data-base-ref",t),n.setAttribute("data-base-item",t+s),n.setAttribute("data",o.getAttribute("data")),n.setAttribute("width",o.getAttribute("width")),n.setAttribute("height",o.getAttribute("height")),n.removeChild(o),r},convertCDATAtoComment(){return A(e),r},stripStyleSheets(){return y(e),r},html(){return new XMLSerializer().serializeToString(m(e))},xml(){return new XMLSerializer().serializeToString(e)},htmlDoc(){return m(e)},xmlDoc(){return e}};return r};var w=()=>{let e,r={async load(t){return new Promise(s=>{i(t).then(n=>(e=n,s(r)))})},parse(t){e=a(t)},assessmentTest(){let t=e.querySelector('resource[type="imsqti_test_xmlv3p0"]');return{href:t.getAttribute("href"),identifier:t.getAttribute("identifier")}}};return r};var F=()=>{let e,r={async load(t){return new Promise((s,n)=>{i(t).then(o=>(e=o,r.path(t.substring(0,t.lastIndexOf("/"))),s(r)))})},parse(t){return e=a(t),r},path:t=>(u(e,t),r),fn(t){return t(e),r},items(){return d(e)},html(){return new XMLSerializer().serializeToString(m(e))},xml(){return new XMLSerializer().serializeToString(e)},htmlDoc(){return m(e)},xmlDoc(){return e}};return r};export{D as a,w as b,F as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-JNT54FPI.js";import{e as t}from"./chunk-VI2WKTN4.js";import{consume as s}from"@lit/context";import{html as a,LitElement as c}from"lit";import{property as r}from"lit/decorators.js";var i={fromAttribute(n){return n==="true"},toAttribute(n){return n?"true":"false"}},e=class extends c{constructor(){super(...arguments);this.weigths=new Map}createRenderRoot(){return this}get assessmentItem(){return this.renderRoot?.querySelector("qti-assessment-item")}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-assessment-item-ref-connected",{bubbles:!0,composed:!0,detail:{identifier:this.identifier,href:this.href,category:this.category}}))}render(){return a`${this.xmlDoc}`}};t([r({type:String})],e.prototype,"category",2),t([r({type:String})],e.prototype,"identifier",2),t([r({type:Boolean,converter:i})],e.prototype,"required",2),t([r({type:Boolean,converter:i})],e.prototype,"fixed",2),t([r({type:String})],e.prototype,"href",2),t([s({context:o,subscribe:!0})],e.prototype,"_testContext",2),t([r({type:Object,attribute:!1})],e.prototype,"xmlDoc",2);customElements.get("qti-assessment-item-ref")||customElements.define("qti-assessment-item-ref",e);export{e as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as o}from"./chunk-Y63VPWCG.js";import{a}from"./chunk-25BMUTLC.js";import{a as r}from"./chunk-LVW3MHTI.js";import{e as i}from"./chunk-VI2WKTN4.js";import{LitElement as s,html as l}from"lit";import{customElement as m,property as p,state as n}from"lit/decorators.js";import{until as c}from"lit/directives/until.js";var e=class extends s{constructor(){super(...arguments);this.itemURL=null;this.itemDoc=null;this.itemXML=null;this.templateContent=null}async handleItemURLChange(){if(this.itemURL)try{let t=await r().load(this.itemURL);this.itemDoc=t.htmlDoc()}catch(t){console.error("Error loading or parsing XML:",t)}}handleItemXMLChange(){if(this.itemXML)try{this.itemDoc=r().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:l``}applyStyles(){let t=new CSSStyleSheet;t.replaceSync(o),this.shadowRoot.adoptedStyleSheets=[t]}render(){return l`
|
|
2
|
+
${this.templateContent}
|
|
3
|
+
<slot></slot>
|
|
4
|
+
${c(this.itemDoc,l`<span>Loading...</span>`)}
|
|
5
|
+
`}};i([p({type:String,attribute:"item-url"})],e.prototype,"itemURL",2),i([n()],e.prototype,"itemDoc",2),i([n()],e.prototype,"itemXML",2),i([a("itemURL",{waitUntilFirstUpdate:!0})],e.prototype,"handleItemURLChange",1),i([a("itemXML",{waitUntilFirstUpdate:!0})],e.prototype,"handleItemXMLChange",1),e=i([m("item-container")],e);export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-3DWLPGTE.js";import{a as r}from"./chunk-7ENNZNJ4.js";import{a as o}from"./chunk-DPR6SGCZ.js";import{a as m}from"./chunk-7BKWTY4S.js";import{e as t}from"./chunk-VI2WKTN4.js";import{html as a}from"lit";import{customElement as s}from"lit/decorators.js";var e=class extends r(o(i(m))){render(){return a`<slot></slot>`}};e=t([s("qti-test")],e);export{e as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as n}from"./chunk-7LGM2TQA.js";import{a}from"./chunk-25BMUTLC.js";import{e as i}from"./chunk-VI2WKTN4.js";import{html as p}from"lit";import{customElement as l,property as r,state as s}from"lit/decorators.js";var t=class extends n{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}render(){return p`
|
|
2
|
+
<label part="label" for="viewSelect">${this.label}</label>
|
|
3
|
+
<select
|
|
4
|
+
part="select"
|
|
5
|
+
id="viewSelect"
|
|
6
|
+
.disabled=${this.disabled}
|
|
7
|
+
@change=${e=>{let o=e.target;this._switchView(o.value)}}
|
|
8
|
+
>
|
|
9
|
+
${this._viewOptions.map(e=>p`<option value="${e}" ?selected=${e===this.view}>${e}</option>`)}
|
|
10
|
+
</select>
|
|
11
|
+
`}};t.DEFAULT_VIEW_OPTIONS=["author","candidate","proctor","scorer","testConstructor","tutor"],i([r({type:String})],t.prototype,"label",2),i([r({type:String,attribute:"view-options"})],t.prototype,"viewOptions",2),i([a("viewOptions",{waitUntilFirstUpdate:!0})],t.prototype,"_handleViewOptionsChange",2),i([s()],t.prototype,"_viewOptions",2),t=i([l("test-view")],t);export{t as a};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as m}from"./chunk-7LGM2TQA.js";import{e as n}from"./chunk-VI2WKTN4.js";import{html as v}from"lit";import{customElement as b,property as l}from"lit/decorators.js";import{prepareTemplate as _}from"stampino";var s=class extends m{constructor(){super();this.maxDisplayedItems=2;this.skipOnCategory="dep-informational";this._internals.ariaLabel="pagination"}createRenderRoot(){return this}render(){let i=this._testContext.items.reduce((t,r)=>{let o=r.category?.split(" ").includes(this.skipOnCategory)?"i":t.counter++;return t.result.push({...r,newIndex:o}),t},{counter:0,result:[]}).result,p=i.findIndex(t=>t.identifier===this._testContext.navItemId),d=Math.max(0,p-this.maxDisplayedItems),u=Math.min(i.length,p+this.maxDisplayedItems+1),h=i.slice(d,u);return v`
|
|
2
|
+
${h.map(t=>{let r=t.variables.find(c=>c.identifier=="SCORE"),e=parseInt(r?.value?.toString()),o=t.variables.find(c=>c.identifier==="completionStatus")?.value,a=t.category!==this.skipOnCategory?"regular":"info",f=this._testContext.navItemId===t.identifier,y=this._testContext.view==="scorer"&&a=="regular"&&e!==void 0&&!isNaN(e)&&e>0,I=this._testContext.view==="scorer"&&a=="regular"&&e!==void 0&&!isNaN(e)&&e<=0,x=this._testContext.view==="candidate"&&o==="completed"&&t.category!==this.skipOnCategory,g={...t,type:a,active:f,correct:y,incorrect:I,answered:x},C=this.firstElementChild;return _(C)({item:g})})}
|
|
3
|
+
`}};n([l({type:Number,attribute:"max-displayed-items"})],s.prototype,"maxDisplayedItems",2),n([l({type:String,attribute:"skip-on-category"})],s.prototype,"skipOnCategory",2),s=n([b("test-paging-buttons-stamp")],s);export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-7ENNZNJ4.js";import{a as o}from"./chunk-DPR6SGCZ.js";import{a as i}from"./chunk-3DWLPGTE.js";import{a as m}from"./chunk-7BKWTY4S.js";import{e as t}from"./chunk-VI2WKTN4.js";import{html as a}from"lit";import{customElement as s}from"lit/decorators.js";var e=class extends r(o(i(m))){render(){return a`<slot></slot>`}};e=t([s("qti-test")],e);export{e as a};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var j=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var n=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var p=(b=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(a,c)=>(typeof require<"u"?require:a)[c]}):b)(function(b){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var q=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),r=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},o=(b,a,c,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of k(a))!m.call(b,d)&&d!==c&&f(b,d,{get:()=>a[d],enumerable:!(e=i(a,d))||e.enumerable});return b};var s=(b,a,c)=>(c=b!=null?j(l(b)):{},o(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var t=(b,a,c,e)=>{for(var d=e>1?void 0:e?i(a,c):a,g=b.length-1,h;g>=0;g--)(h=b[g])&&(d=(e?h(a,c,d):h(d))||d);return e&&d&&f(a,c,d),d};var u=(b,a,c)=>n(b,typeof a!="symbol"?a+"":a,c);export{p as a,q as b,r as c,s as d,t as e,u as f};
|