@citolab/qti-components 7.10.0 → 7.11.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/index.global.js +1 -1
- package/cdn/index.js +2 -2
- package/dist/chunks/{chunk-TWFYYDV7.js → chunk-TFNRSY74.js} +19 -13
- package/dist/chunks/chunk-TFNRSY74.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/qti-components/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-TWFYYDV7.js.map +0 -1
package/cdn/index.js
CHANGED
|
@@ -506,7 +506,7 @@ Make sure to test your application with a production build as repeat registratio
|
|
|
506
506
|
</select>
|
|
507
507
|
|
|
508
508
|
${yt(this.correctOption)}
|
|
509
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("on-dropdown-selected",this.choiceSelected)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("on-dropdown-selected",this.choiceSelected)}willUpdate(e){(e.has("configContext")||e.has("dataPrompt"))&&this._updateOptions()}_updateOptions(){let e=Array.from(this.querySelectorAll("qti-inline-choice")),t=this.dataPrompt||this.configContext?.inlineChoicePrompt||"select"
|
|
509
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("on-dropdown-selected",this.choiceSelected)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("on-dropdown-selected",this.choiceSelected)}willUpdate(e){(e.has("configContext")||e.has("dataPrompt"))&&this._updateOptions()}_updateOptions(){let e=Array.from(this.querySelectorAll("qti-inline-choice")),t=this.dataPrompt||this.configContext?.inlineChoicePrompt||"select";!this.options||this.options.length===0?this.options=[{textContent:t,value:"",selected:!1},...e.map(i=>({textContent:i.innerHTML,value:i.getAttribute("identifier"),selected:!1}))]:this.options=this.options.map(i=>i.value===""?{...i,textContent:t}:i)}validate(){let e=this.options.find(t=>t.selected);return e?e.value!=="":!1}reset(){this.options=this.options.map((e,t)=>({...e,selected:t===0}))}set response(e){this.options=this.options.map(t=>(e&&e===t.value&&(t.selected=!0),t))}get response(){return this.options.find(e=>e.selected)?.value||null}toggleInternalCorrectResponse(e){if(this.correctResponse=e&&this.responseVariable?.correctResponse?.toString(),!this.correctResponse){this.correctOption="";return}this.correctOption=`<span part="correct-option" style="border:1px solid var(--qti-correct); border-radius:4px; padding: 2px 4px; margin: 4px; display:inline-block">${this.options.find(t=>this.correctResponse===t.value).textContent}</span>`}choiceSelected(e){let t=e.target.value;this.options=this.options.map(i=>({...i,selected:i.value===t})),this.saveResponse(t)}};ye.inputWidthClass=["","qti-input-width-2","qti-input-width-1","qti-input-width-3","qti-input-width-4","qti-input-width-6","qti-input-width-10","qti-input-width-15","qti-input-width-20","qti-input-width-72"],c([E()],ye.prototype,"options",2),c([E()],ye.prototype,"correctOption",2),c([u({attribute:"data-prompt",type:String})],ye.prototype,"dataPrompt",2),c([_({context:ne,subscribe:!0}),u({attribute:!1})],ye.prototype,"configContext",2),ye=c([g("qti-inline-choice-interaction")],ye);var sr=class extends v{static get styles(){return[x`
|
|
510
510
|
:host {
|
|
511
511
|
display: block;
|
|
512
512
|
cursor: pointer;
|
|
@@ -5432,7 +5432,7 @@ div.full-correct-response-inline {
|
|
|
5432
5432
|
:host([disabled]) {
|
|
5433
5433
|
${Qo};
|
|
5434
5434
|
}
|
|
5435
|
-
`,c([_({context:kt,subscribe:!0})],re.prototype,"computedContext",2),c([u({type:Boolean,reflect:!0})],re.prototype,"shown",2),c([u({type:Boolean,reflect:!0})],re.prototype,"disabled",2),c([u({type:String})],re.prototype,"showCorrectText",2),c([u({type:String})],re.prototype,"hideCorrectText",2),c([u({type:String})],re.prototype,"noCorrectResponseText",2),re=c([g("item-show-correct-response")],re);var St=class extends v{constructor(){super();this.configContext={};this._onItemContextChanged=this._handleItemContextChanged.bind(this);this._onAssessmentItemConnected=this._handleAssessmentItemConnected.bind(this);this._onHandleShowCorrectResponse=this._handleShowCorrectResponse.bind(this);this._onHandleShowCandidateCorrection=this._handleShowCandidateCorrection.bind(this);this._onHandleSwitchCorrectResponseMode=this._handleSwitchCorrectResponseMode.bind(this);this.addEventListener("qti-item-context-updated",this._onItemContextChanged),this.addEventListener("qti-assessment-item-connected",this._onAssessmentItemConnected),this.addEventListener("item-show-correct-response",this._onHandleShowCorrectResponse),this.addEventListener("item-show-candidate-correction",this._onHandleShowCandidateCorrection),this.addEventListener("item-switch-correct-response-mode",this._onHandleSwitchCorrectResponseMode)}_handleItemContextChanged(e){this._updateItemVariablesInTestContext(e.detail.itemContext.identifier,e.detail?.itemContext?.variables||[])}_handleAssessmentItemConnected(e){let t=e.detail._context.variables;this._qtiAssessmentItem=e.detail,this.computedContext=this.computedContext?.identifier===this._qtiAssessmentItem.identifier?{...this.computedContext,title:this._qtiAssessmentItem.title}:{identifier:this._qtiAssessmentItem.identifier,title:this._qtiAssessmentItem.title,adaptive:this._qtiAssessmentItem.getAttribute("adaptive")?.toLowerCase()==="true"||!1,variables:t,correctResponseMode:"internal"},this._updateItemVariablesInTestContext(this._qtiAssessmentItem.identifier,t||[])}_handleShowCorrectResponse(e){this._qtiAssessmentItem&&this._qtiAssessmentItem.showCorrectResponse(e.detail)}_handleShowCandidateCorrection(e){this._qtiAssessmentItem&&this._qtiAssessmentItem.showCandidateCorrection(e.detail)}_handleSwitchCorrectResponseMode(e){this._handleShowCorrectResponse(new CustomEvent("item-show-correct-response",{detail:!1,bubbles:!0})),this.configContext={...this.configContext,correctResponseMode:e.detail}}_updateItemVariablesInTestContext(e,t){let i=t?.find(p=>p.identifier=="SCORE")?.value,s=parseFloat(i?.toString()),n=t?.find(p=>p.identifier==="completionStatus")?.value,a=s!==void 0&&!isNaN(s)&&s>0,l=s!==void 0&&!isNaN(s)&&s<=0,d=n==="completed";this.computedContext={...this.computedContext,identifier:e,correct:a,incorrect:l,completed:d,variables:t}}render(){return h`<slot></slot>`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-item-context-changed",this._onItemContextChanged),this.removeEventListener("qti-assessment-item-connected",this._onAssessmentItemConnected)}};c([E(),X({context:kt})],St.prototype,"computedContext",2),c([E(),X({context:ne})],St.prototype,"configContext",2),St=c([g("qti-item")],St);var en={name:"@citolab/qti-components",repository:{type:"git",url:"git+https://github.com/Citolab/qti-components.git"},description:"QTI webcomponents",author:{name:"Patrick de Klein"},contributors:[{name:"Sander Looise"},{name:"Marcel Hoekstra"}],license:"GPLv3",private:!1,engines:{node:">=22.0.0"},version:"7.10.0",type:"module",main:"./dist/index.js",types:"./dist/index.d.ts",sideEffects:!0,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./exports/*":{import:"./dist/exports/*"},"./qti-components":{types:"./dist/qti-components/index.d.ts",import:"./dist/qti-components/index.js"},"./qti-item":{types:"./dist/qti-item/index.d.ts",import:"./dist/qti-item/index.js"},"./qti-test":{types:"./dist/qti-test/index.d.ts",import:"./dist/qti-test/index.js"},"./qti-loader":{types:"./dist/qti-loader/index.d.ts",import:"./dist/qti-loader/index.js"},"./qti-transformers":{types:"./dist/qti-transformers/index.d.ts",import:"./dist/qti-transformers/index.js"},"./customElements":"./custom-elements.json","./react":"./dist/qti-components-jsx.d.ts","./item.css":"./dist/item.css","./cdn/*":"./cdn/*","./package.json":"./package.json"},files:["dist","cdn","custom-elements.json"],scripts:{storybook:"run-p storybook:dev cem:watch",watch:'nodemon --watch src --ext ts,css --exec "run-s tsup cem css && yalc push"',"-----------------------cmds--":"-","pre-commit":"run-s lint stylelint madge","commit-msg":"commitlint --edit","build-storybook":"npm run cem && storybook build","-----------------------scripts--":"-",build:"run-p cem css tsup","storybook:dev":"storybook dev -p 6006",cem:"cem analyze","cem:watch":"cem analyze --watch",css:"postcss src/item.css -d dist -m",ci:"npm ci",tsup:"tsup",publint:"publint",lint:"eslint src/**/*.ts",stylelint:'stylelint "src/**/*.css"',test:"vitest run",attw:"attw --profile esm-only --pack --exclude-entrypoints ./item.css ./react",chromatic:"node chromatic-runner.cjs",clean:"rm -rf dist cdn",madge:"madge --circular --extensions ts src",commitlint:"commitlint --edit","-----------------------npm--":"-",prepare:"husky"},peerDependencies:{"@heximal/templates":"^0.1.5","@lit/context":"^1.1.3",lit:"^3.2.1"},devDependencies:{"@arethetypeswrong/cli":"^0.18.2","@chromatic-com/storybook":"^4.1.1","@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@custom-elements-manifest/analyzer":"^0.10.4","@eslint/js":"^9.29.0","@heximal/templates":"0.1.5","@lit/context":"^1.1.5","@open-wc/lit-helpers":"^0.7.0","@storybook/addon-a11y":"^9.1.5","@storybook/addon-docs":"^9.1.5","@storybook/addon-links":"^9.1.5","@storybook/addon-themes":"^9.1.5","@storybook/addon-vitest":"^9.1.5","@storybook/web-components-vite":"^9.1.5","@swc/core":"^1.12.1","@testing-library/dom":"^10.4.0","@types/dom-view-transitions":"^1.0.6","@types/node":"^24.0.3","@vitest/browser":"^3.2.4","@vitest/coverage-v8":"^3.2.4","@vitest/ui":"^3.2.4","@wc-toolkit/cem-inheritance":"^1.1.0","@wc-toolkit/cem-sorter":"^1.0.1","@wc-toolkit/cem-utilities":"^1.3.0","@wc-toolkit/changelog":"^1.0.1","@wc-toolkit/jsx-types":"^1.2.2","@wc-toolkit/storybook-helpers":"^9.0.0","@wc-toolkit/type-parser":"^1.1.0",autoprefixer:"^10.4.21",chromatic:"^13.0.0","custom-element-vs-code-integration":"^1.5.0","custom-elements-manifest-deprecator":"^1.2.0",dotenv:"^16.5.0",eslint:"^9.29.0","eslint-import-resolver-typescript":"^4.4.3","eslint-plugin-import":"^2.31.0","eslint-plugin-lit":"^2.1.1","eslint-plugin-lit-a11y":"^5.0.1","eslint-plugin-react":"^7.37.5","eslint-plugin-sort-imports-es6-autofix":"^0.6.0","eslint-plugin-storybook":"^9.1.5","eslint-plugin-wc":"^3.0.1","fast-xml-parser":"^5.2.5",globals:"^16.2.0",globby:"^14.1.0",husky:"^9.1.7",lit:"^3.3.0",madge:"^8.0.0",nodemon:"^3.1.10","npm-run-all":"^4.1.5","path-browserify":"^1.0.1","pkg-pr-new":"^0.0.51",playwright:"^1.53.0",postcss:"^8.5.6","postcss-class-apply":"^4.0.1","postcss-cli":"^11.0.1","postcss-import":"^16.1.1","postcss-nesting":"^13.0.2",prettier:"3.5.3","prettier-v2":"npm:prettier@2.8.8",publint:"^0.3.12","remark-gfm":"^4.0.1","shadow-dom-testing-library":"^1.12.0",storybook:"^9.1.5","storybook-addon-tag-badges":"^2.0.1",stylelint:"^16.20.0","stylelint-config-standard":"^38.0.0","stylelint-prettier":"^5.0.3",tsup:"^8.5.0",typescript:"^5.8.3","typescript-eslint":"^8.34.1",vite:"^6.3.5","vite-tsconfig-paths":"^5.1.4",vitest:"^3.2.4",yalc:"^1.0.0-pre.53"},optionalDependencies:{"@rollup/rollup-linux-x64-gnu":"^4.43.0"},customElements:"custom-elements.json",bugs:{url:"https://github.com/Citolab/qti-components/issues"},homepage:"https://github.com/Citolab/qti-components#readme",overrides:{storybook:"$storybook"}};console.info("%cC\xBFTO%cLab%c: qti-components v%c%s%c loaded",'font-family: "PT Sans", font-weight:bold; color:green; font-size: smaller;vertical-align: sub',"font-weight:bold; color:green","font-weight:unset","font-weight:bold; color:#2563eb",en.version,"font-weight:unset");export{Ji as INITIAL_TEST_CONTEXT,Re as ItemContainer,re as ItemShowCorrectResponse,Rt as PrintItemVariables,Jr as QtiAnd,G as QtiAssessmentItem,_e as QtiAssessmentItemRef,Te as QtiAssessmentSection,pt as QtiAssessmentStimulusRef,et as QtiAssessmentTest,Jt as QtiAssociableHotspot,ut as QtiAssociateInteraction,Kr as QtiBaseValue,mt as QtiChoiceInteraction,Br as QtiCompanionMaterialsInfo,Xi as QtiContainerSize,Gi as QtiContains,oi as QtiContentBody,Yi as QtiCorrect,ve as QtiCustomInteraction,Wt as QtiCustomOperator,qt as QtiDefault,vs as QtiDelete,$e as QtiEndAttemptInteraction,Qr as QtiEqual,Zr as QtiEqualRounded,U as QtiExtendedTextInteraction,Gt as QtiFeedbackBlock,Yt as QtiFeedbackInline,is as QtiFieldValue,gt as QtiGap,ht as QtiGapImg,Kt as QtiGapMatchInteraction,ft as QtiGapText,Zi as QtiGcd,ce as QtiGraphicAssociateInteraction,Zt as QtiGraphicGapMatchInteraction,Qt as QtiGraphicOrderInteraction,Qi as QtiGt,es as QtiGte,Qe as QtiHotspotChoice,er as QtiHotspotInteraction,rr as QtiHottext,tr as QtiHottextInteraction,br as QtiIndex,sr as QtiInlineChoice,ye as QtiInlineChoiceInteraction,rs as QtiIsNull,St as QtiItem,cr as QtiItemBody,ur as QtiLookupOutcomeValue,ss as QtiLt,os as QtiLte,ei as QtiMapResponse,ti as QtiMapResponsePoint,ns as QtiMatch,xe as QtiMatchInteraction,ri as QtiMathOperator,or as QtiMediaInteraction,as as QtiMember,Ze as QtiModalFeedback,ls as QtiMultiple,cs as QtiNot,ts as QtiNull,ds as QtiOr,qe as QtiOrderInteraction,ps as QtiOrdered,he as QtiOutcomeDeclaration,dr as QtiOutcomeProcessing,Fi as QtiOutcomeProcessingProcessor,z as QtiPortableCustomInteraction,Vi as QtiPositionObjectInteraction,nr as QtiPositionObjectStage,us as QtiPower,gr as QtiPrintedVariable,ms as QtiProduct,Gr as QtiPrompt,bs as QtiRandom,Et as QtiRandomInteger,Ui as QtiResponseCondition,we as QtiResponseDeclaration,mr as QtiResponseElse,Wi as QtiResponseElseIf,hr as QtiResponseIf,pr as QtiResponseProcessing,Ki as QtiRound,fr as QtiRoundTo,me as QtiRubricBlock,pe as QtiRule,de as QtiSelectPointInteraction,ji as QtiSetOutcomeValue,Bi as QtiSetOutcomeValueRule,Ve as QtiSimpleAssociableChoice,Ee as QtiSimpleChoice,Ce as QtiSliderInteraction,si as QtiStringMatch,ni as QtiStylesheet,ii as QtiSubtract,hs as QtiSum,fs as QtiSumExpression,ai as QtiTest,Er as QtiTestFeedback,Ae as QtiTestPart,J as QtiTextEntryInteraction,lr as QtiUploadInteraction,gs as QtiVariable,kr as TestCheckItem,ke as TestContainer,Cr as TestEndAttempt,wt as TestItemLink,Q as TestNavigation,ze as TestNext,wr as TestPagingButtonsStamp,Fe as TestPrev,Tr as TestPrintContext,_t as TestPrintVariables,it as TestScoringButtons,At as TestScoringFeedback,_r as TestSectionButtonsStamp,Tt as TestSectionLink,te as TestShowCorrectResponse,rt as TestStamp,W as TestView,Ar as TestViewToggle,Mn as qtiAndMixin,In as qtiSubtractMixin,ue as testContext};
|
|
5435
|
+
`,c([_({context:kt,subscribe:!0})],re.prototype,"computedContext",2),c([u({type:Boolean,reflect:!0})],re.prototype,"shown",2),c([u({type:Boolean,reflect:!0})],re.prototype,"disabled",2),c([u({type:String})],re.prototype,"showCorrectText",2),c([u({type:String})],re.prototype,"hideCorrectText",2),c([u({type:String})],re.prototype,"noCorrectResponseText",2),re=c([g("item-show-correct-response")],re);var St=class extends v{constructor(){super();this.configContext={};this._onItemContextChanged=this._handleItemContextChanged.bind(this);this._onAssessmentItemConnected=this._handleAssessmentItemConnected.bind(this);this._onHandleShowCorrectResponse=this._handleShowCorrectResponse.bind(this);this._onHandleShowCandidateCorrection=this._handleShowCandidateCorrection.bind(this);this._onHandleSwitchCorrectResponseMode=this._handleSwitchCorrectResponseMode.bind(this);this.addEventListener("qti-item-context-updated",this._onItemContextChanged),this.addEventListener("qti-assessment-item-connected",this._onAssessmentItemConnected),this.addEventListener("item-show-correct-response",this._onHandleShowCorrectResponse),this.addEventListener("item-show-candidate-correction",this._onHandleShowCandidateCorrection),this.addEventListener("item-switch-correct-response-mode",this._onHandleSwitchCorrectResponseMode)}_handleItemContextChanged(e){this._updateItemVariablesInTestContext(e.detail.itemContext.identifier,e.detail?.itemContext?.variables||[])}_handleAssessmentItemConnected(e){let t=e.detail._context.variables;this._qtiAssessmentItem=e.detail,this.computedContext=this.computedContext?.identifier===this._qtiAssessmentItem.identifier?{...this.computedContext,title:this._qtiAssessmentItem.title}:{identifier:this._qtiAssessmentItem.identifier,title:this._qtiAssessmentItem.title,adaptive:this._qtiAssessmentItem.getAttribute("adaptive")?.toLowerCase()==="true"||!1,variables:t,correctResponseMode:"internal"},this._updateItemVariablesInTestContext(this._qtiAssessmentItem.identifier,t||[])}_handleShowCorrectResponse(e){this._qtiAssessmentItem&&this._qtiAssessmentItem.showCorrectResponse(e.detail)}_handleShowCandidateCorrection(e){this._qtiAssessmentItem&&this._qtiAssessmentItem.showCandidateCorrection(e.detail)}_handleSwitchCorrectResponseMode(e){this._handleShowCorrectResponse(new CustomEvent("item-show-correct-response",{detail:!1,bubbles:!0})),this.configContext={...this.configContext,correctResponseMode:e.detail}}_updateItemVariablesInTestContext(e,t){let i=t?.find(p=>p.identifier=="SCORE")?.value,s=parseFloat(i?.toString()),n=t?.find(p=>p.identifier==="completionStatus")?.value,a=s!==void 0&&!isNaN(s)&&s>0,l=s!==void 0&&!isNaN(s)&&s<=0,d=n==="completed";this.computedContext={...this.computedContext,identifier:e,correct:a,incorrect:l,completed:d,variables:t}}render(){return h`<slot></slot>`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-item-context-changed",this._onItemContextChanged),this.removeEventListener("qti-assessment-item-connected",this._onAssessmentItemConnected)}};c([E(),X({context:kt})],St.prototype,"computedContext",2),c([E(),X({context:ne})],St.prototype,"configContext",2),St=c([g("qti-item")],St);var en={name:"@citolab/qti-components",repository:{type:"git",url:"git+https://github.com/Citolab/qti-components.git"},description:"QTI webcomponents",author:{name:"Patrick de Klein"},contributors:[{name:"Sander Looise"},{name:"Marcel Hoekstra"}],license:"GPLv3",private:!1,engines:{node:">=22.0.0"},version:"7.11.0",type:"module",main:"./dist/index.js",types:"./dist/index.d.ts",sideEffects:!0,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./exports/*":{import:"./dist/exports/*"},"./qti-components":{types:"./dist/qti-components/index.d.ts",import:"./dist/qti-components/index.js"},"./qti-item":{types:"./dist/qti-item/index.d.ts",import:"./dist/qti-item/index.js"},"./qti-test":{types:"./dist/qti-test/index.d.ts",import:"./dist/qti-test/index.js"},"./qti-loader":{types:"./dist/qti-loader/index.d.ts",import:"./dist/qti-loader/index.js"},"./qti-transformers":{types:"./dist/qti-transformers/index.d.ts",import:"./dist/qti-transformers/index.js"},"./customElements":"./custom-elements.json","./react":"./dist/qti-components-jsx.d.ts","./item.css":"./dist/item.css","./cdn/*":"./cdn/*","./package.json":"./package.json"},files:["dist","cdn","custom-elements.json"],scripts:{storybook:"run-p storybook:dev cem:watch",watch:'nodemon --watch src --ext ts,css --exec "run-s tsup cem css && yalc push"',"-----------------------cmds--":"-","pre-commit":"run-s lint stylelint madge","commit-msg":"commitlint --edit","build-storybook":"npm run cem && storybook build","-----------------------scripts--":"-",build:"run-p cem css tsup","storybook:dev":"storybook dev -p 6006",cem:"cem analyze","cem:watch":"cem analyze --watch",css:"postcss src/item.css -d dist -m",ci:"npm ci",tsup:"tsup",publint:"publint",lint:"eslint src/**/*.ts",stylelint:'stylelint "src/**/*.css"',test:"vitest run",attw:"attw --profile esm-only --pack --exclude-entrypoints ./item.css ./react",chromatic:"node chromatic-runner.cjs",clean:"rm -rf dist cdn",madge:"madge --circular --extensions ts src",commitlint:"commitlint --edit","-----------------------npm--":"-",prepare:"husky"},peerDependencies:{"@heximal/templates":"^0.1.5","@lit/context":"^1.1.3",lit:"^3.2.1"},devDependencies:{"@arethetypeswrong/cli":"^0.18.2","@chromatic-com/storybook":"^4.1.1","@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@custom-elements-manifest/analyzer":"^0.10.4","@eslint/js":"^9.29.0","@heximal/templates":"0.1.5","@lit/context":"^1.1.5","@open-wc/lit-helpers":"^0.7.0","@storybook/addon-a11y":"^9.1.5","@storybook/addon-docs":"^9.1.5","@storybook/addon-links":"^9.1.5","@storybook/addon-themes":"^9.1.5","@storybook/addon-vitest":"^9.1.5","@storybook/web-components-vite":"^9.1.5","@swc/core":"^1.12.1","@testing-library/dom":"^10.4.0","@types/dom-view-transitions":"^1.0.6","@types/node":"^24.0.3","@vitest/browser":"^3.2.4","@vitest/coverage-v8":"^3.2.4","@vitest/ui":"^3.2.4","@wc-toolkit/cem-inheritance":"^1.1.0","@wc-toolkit/cem-sorter":"^1.0.1","@wc-toolkit/cem-utilities":"^1.3.0","@wc-toolkit/changelog":"^1.0.1","@wc-toolkit/jsx-types":"^1.2.2","@wc-toolkit/storybook-helpers":"^9.0.0","@wc-toolkit/type-parser":"^1.1.0",autoprefixer:"^10.4.21",chromatic:"^13.0.0","custom-element-vs-code-integration":"^1.5.0","custom-elements-manifest-deprecator":"^1.2.0",dotenv:"^16.5.0",eslint:"^9.29.0","eslint-import-resolver-typescript":"^4.4.3","eslint-plugin-import":"^2.31.0","eslint-plugin-lit":"^2.1.1","eslint-plugin-lit-a11y":"^5.0.1","eslint-plugin-react":"^7.37.5","eslint-plugin-sort-imports-es6-autofix":"^0.6.0","eslint-plugin-storybook":"^9.1.5","eslint-plugin-wc":"^3.0.1","fast-xml-parser":"^5.2.5",globals:"^16.2.0",globby:"^14.1.0",husky:"^9.1.7",lit:"^3.3.0",madge:"^8.0.0",nodemon:"^3.1.10","npm-run-all":"^4.1.5","path-browserify":"^1.0.1","pkg-pr-new":"^0.0.51",playwright:"^1.53.0",postcss:"^8.5.6","postcss-class-apply":"^4.0.1","postcss-cli":"^11.0.1","postcss-import":"^16.1.1","postcss-nesting":"^13.0.2",prettier:"3.5.3","prettier-v2":"npm:prettier@2.8.8",publint:"^0.3.12","remark-gfm":"^4.0.1","shadow-dom-testing-library":"^1.12.0",storybook:"^9.1.5","storybook-addon-tag-badges":"^2.0.1",stylelint:"^16.20.0","stylelint-config-standard":"^38.0.0","stylelint-prettier":"^5.0.3",tsup:"^8.5.0",typescript:"^5.8.3","typescript-eslint":"^8.34.1",vite:"^6.3.5","vite-tsconfig-paths":"^5.1.4",vitest:"^3.2.4",yalc:"^1.0.0-pre.53"},optionalDependencies:{"@rollup/rollup-linux-x64-gnu":"^4.43.0"},customElements:"custom-elements.json",bugs:{url:"https://github.com/Citolab/qti-components/issues"},homepage:"https://github.com/Citolab/qti-components#readme",overrides:{storybook:"$storybook"}};console.info("%cC\xBFTO%cLab%c: qti-components v%c%s%c loaded",'font-family: "PT Sans", font-weight:bold; color:green; font-size: smaller;vertical-align: sub',"font-weight:bold; color:green","font-weight:unset","font-weight:bold; color:#2563eb",en.version,"font-weight:unset");export{Ji as INITIAL_TEST_CONTEXT,Re as ItemContainer,re as ItemShowCorrectResponse,Rt as PrintItemVariables,Jr as QtiAnd,G as QtiAssessmentItem,_e as QtiAssessmentItemRef,Te as QtiAssessmentSection,pt as QtiAssessmentStimulusRef,et as QtiAssessmentTest,Jt as QtiAssociableHotspot,ut as QtiAssociateInteraction,Kr as QtiBaseValue,mt as QtiChoiceInteraction,Br as QtiCompanionMaterialsInfo,Xi as QtiContainerSize,Gi as QtiContains,oi as QtiContentBody,Yi as QtiCorrect,ve as QtiCustomInteraction,Wt as QtiCustomOperator,qt as QtiDefault,vs as QtiDelete,$e as QtiEndAttemptInteraction,Qr as QtiEqual,Zr as QtiEqualRounded,U as QtiExtendedTextInteraction,Gt as QtiFeedbackBlock,Yt as QtiFeedbackInline,is as QtiFieldValue,gt as QtiGap,ht as QtiGapImg,Kt as QtiGapMatchInteraction,ft as QtiGapText,Zi as QtiGcd,ce as QtiGraphicAssociateInteraction,Zt as QtiGraphicGapMatchInteraction,Qt as QtiGraphicOrderInteraction,Qi as QtiGt,es as QtiGte,Qe as QtiHotspotChoice,er as QtiHotspotInteraction,rr as QtiHottext,tr as QtiHottextInteraction,br as QtiIndex,sr as QtiInlineChoice,ye as QtiInlineChoiceInteraction,rs as QtiIsNull,St as QtiItem,cr as QtiItemBody,ur as QtiLookupOutcomeValue,ss as QtiLt,os as QtiLte,ei as QtiMapResponse,ti as QtiMapResponsePoint,ns as QtiMatch,xe as QtiMatchInteraction,ri as QtiMathOperator,or as QtiMediaInteraction,as as QtiMember,Ze as QtiModalFeedback,ls as QtiMultiple,cs as QtiNot,ts as QtiNull,ds as QtiOr,qe as QtiOrderInteraction,ps as QtiOrdered,he as QtiOutcomeDeclaration,dr as QtiOutcomeProcessing,Fi as QtiOutcomeProcessingProcessor,z as QtiPortableCustomInteraction,Vi as QtiPositionObjectInteraction,nr as QtiPositionObjectStage,us as QtiPower,gr as QtiPrintedVariable,ms as QtiProduct,Gr as QtiPrompt,bs as QtiRandom,Et as QtiRandomInteger,Ui as QtiResponseCondition,we as QtiResponseDeclaration,mr as QtiResponseElse,Wi as QtiResponseElseIf,hr as QtiResponseIf,pr as QtiResponseProcessing,Ki as QtiRound,fr as QtiRoundTo,me as QtiRubricBlock,pe as QtiRule,de as QtiSelectPointInteraction,ji as QtiSetOutcomeValue,Bi as QtiSetOutcomeValueRule,Ve as QtiSimpleAssociableChoice,Ee as QtiSimpleChoice,Ce as QtiSliderInteraction,si as QtiStringMatch,ni as QtiStylesheet,ii as QtiSubtract,hs as QtiSum,fs as QtiSumExpression,ai as QtiTest,Er as QtiTestFeedback,Ae as QtiTestPart,J as QtiTextEntryInteraction,lr as QtiUploadInteraction,gs as QtiVariable,kr as TestCheckItem,ke as TestContainer,Cr as TestEndAttempt,wt as TestItemLink,Q as TestNavigation,ze as TestNext,wr as TestPagingButtonsStamp,Fe as TestPrev,Tr as TestPrintContext,_t as TestPrintVariables,it as TestScoringButtons,At as TestScoringFeedback,_r as TestSectionButtonsStamp,Tt as TestSectionLink,te as TestShowCorrectResponse,rt as TestStamp,W as TestView,Ar as TestViewToggle,Mn as qtiAndMixin,In as qtiSubtractMixin,ue as testContext};
|
|
5436
5436
|
/*! Bundled license information:
|
|
5437
5437
|
|
|
5438
5438
|
@lit/context/lib/context-request-event.js:
|
|
@@ -3363,18 +3363,24 @@ var QtiInlineChoiceInteraction = class extends Interaction {
|
|
|
3363
3363
|
_updateOptions() {
|
|
3364
3364
|
const choices = Array.from(this.querySelectorAll("qti-inline-choice"));
|
|
3365
3365
|
const prompt = this.dataPrompt || this.configContext?.inlineChoicePrompt || "select";
|
|
3366
|
-
this.options
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3366
|
+
if (!this.options || this.options.length === 0) {
|
|
3367
|
+
this.options = [
|
|
3368
|
+
{
|
|
3369
|
+
textContent: prompt,
|
|
3370
|
+
value: "",
|
|
3371
|
+
selected: false
|
|
3372
|
+
},
|
|
3373
|
+
...choices.map((choice) => ({
|
|
3374
|
+
textContent: choice.innerHTML,
|
|
3375
|
+
value: choice.getAttribute("identifier"),
|
|
3376
|
+
selected: false
|
|
3377
|
+
}))
|
|
3378
|
+
];
|
|
3379
|
+
} else {
|
|
3380
|
+
this.options = this.options.map((o) => {
|
|
3381
|
+
return o.value === "" ? { ...o, textContent: prompt } : o;
|
|
3382
|
+
});
|
|
3383
|
+
}
|
|
3378
3384
|
}
|
|
3379
3385
|
validate() {
|
|
3380
3386
|
const selectedOption = this.options.find((option) => option.selected);
|
|
@@ -8816,4 +8822,4 @@ export {
|
|
|
8816
8822
|
QtiOutcomeDeclaration,
|
|
8817
8823
|
QtiResponseDeclaration
|
|
8818
8824
|
};
|
|
8819
|
-
//# sourceMappingURL=chunk-
|
|
8825
|
+
//# sourceMappingURL=chunk-TFNRSY74.js.map
|