@citolab/qti-components 7.3.18 → 7.3.19
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-23JT53R2.js +1 -0
- package/cdn/chunks/chunk-2OA2G5PN.js +5 -0
- package/cdn/chunks/chunk-3HIY5HSB.js +1 -0
- package/cdn/chunks/chunk-3ZLIRREM.js +1466 -0
- package/cdn/chunks/chunk-4F3OLGZ4.js +5 -0
- package/cdn/chunks/chunk-6IY26BVE.js +23 -0
- package/cdn/chunks/chunk-7HEAECQ2.js +1466 -0
- package/cdn/chunks/chunk-7T6OJ2OQ.js +1482 -0
- package/cdn/chunks/chunk-B7NVY4AR.js +23 -0
- package/cdn/chunks/chunk-BFMN6REI.js +5 -0
- package/cdn/chunks/chunk-BSK7IIBZ.js +1 -0
- package/cdn/chunks/chunk-CYSQXIRZ.js +5 -0
- package/cdn/chunks/chunk-E6IOJ4MV.js +23 -0
- package/cdn/chunks/chunk-ECKBRC27.js +1482 -0
- package/cdn/chunks/chunk-ECLB2ECD.js +5 -0
- package/cdn/chunks/chunk-FDOVZYP4.js +5 -0
- package/cdn/chunks/chunk-FVIBMJDJ.js +5 -0
- package/cdn/chunks/chunk-GTSQO7SP.js +1 -0
- package/cdn/chunks/chunk-GVZHKB2Y.js +1482 -0
- package/cdn/chunks/chunk-IMHR3S57.js +1 -0
- package/cdn/chunks/chunk-JG53AUXR.js +1 -0
- package/cdn/chunks/chunk-JVW572MO.js +1 -0
- package/cdn/chunks/chunk-KM5SOM7G.js +1482 -0
- package/cdn/chunks/chunk-KY6SSNGO.js +5 -0
- package/cdn/chunks/chunk-M544CJHK.js +5 -0
- package/cdn/chunks/chunk-N4LMZHIZ.js +5 -0
- package/cdn/chunks/chunk-ODYPYZCY.js +5 -0
- package/cdn/chunks/chunk-P5MQE2M6.js +5 -0
- package/cdn/chunks/chunk-RKU2XDKG.js +2 -0
- package/cdn/chunks/chunk-SVVO2SFS.js +1 -0
- package/cdn/chunks/chunk-V2NH5MXS.js +5 -0
- package/cdn/chunks/chunk-VB3GRBCX.js +1 -0
- package/cdn/chunks/chunk-XHSJOTCJ.js +5 -0
- package/cdn/chunks/chunk-XLFLYMNJ.js +1482 -0
- 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/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/test-container.js +1 -1
- package/cdn/qti-test/components/test-navigation.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/core/index.js +1 -1
- package/cdn/qti-transformers/index.js +1 -1
- package/dist/chunks/chunk-2EGQQQHL.js +31 -0
- package/dist/chunks/chunk-2EGQQQHL.js.map +1 -0
- package/dist/chunks/chunk-45FDEM7M.js +94 -0
- package/dist/chunks/chunk-45FDEM7M.js.map +1 -0
- package/dist/chunks/chunk-4B4DRCXO.js +94 -0
- package/dist/chunks/chunk-4B4DRCXO.js.map +1 -0
- package/dist/chunks/chunk-5IYIGX6A.js +94 -0
- package/dist/chunks/chunk-5IYIGX6A.js.map +1 -0
- package/dist/chunks/chunk-AH3ZDQHQ.js +913 -0
- package/dist/chunks/chunk-AH3ZDQHQ.js.map +1 -0
- package/dist/chunks/chunk-BAZMB7Z3.js +8009 -0
- package/dist/chunks/chunk-BAZMB7Z3.js.map +1 -0
- package/dist/chunks/chunk-BXUNJ6XB.js +78 -0
- package/dist/chunks/chunk-BXUNJ6XB.js.map +1 -0
- package/dist/chunks/chunk-CTESMSQO.js +56 -0
- package/dist/chunks/chunk-CTESMSQO.js.map +1 -0
- package/dist/chunks/chunk-CVMIO3DA.js +913 -0
- package/dist/chunks/chunk-CVMIO3DA.js.map +1 -0
- package/dist/chunks/chunk-DJWEI2NH.js +502 -0
- package/dist/chunks/chunk-DJWEI2NH.js.map +1 -0
- package/dist/chunks/chunk-E6V3JHVT.js +31 -0
- package/dist/chunks/chunk-E6V3JHVT.js.map +1 -0
- package/dist/chunks/chunk-EFY3NEXY.js +94 -0
- package/dist/chunks/chunk-EFY3NEXY.js.map +1 -0
- package/dist/chunks/chunk-EXBK4TXV.js +273 -0
- package/dist/chunks/chunk-EXBK4TXV.js.map +1 -0
- package/dist/chunks/chunk-FXO6HW6L.js +8084 -0
- package/dist/chunks/chunk-FXO6HW6L.js.map +1 -0
- package/dist/chunks/chunk-GIY6GNXQ.js +913 -0
- package/dist/chunks/chunk-GIY6GNXQ.js.map +1 -0
- package/dist/chunks/chunk-GT6TR4B6.js +94 -0
- package/dist/chunks/chunk-GT6TR4B6.js.map +1 -0
- package/dist/chunks/chunk-H67RKRFW.js +94 -0
- package/dist/chunks/chunk-H67RKRFW.js.map +1 -0
- package/dist/chunks/chunk-I5EA6DJB.js +92 -0
- package/dist/chunks/chunk-I5EA6DJB.js.map +1 -0
- package/dist/chunks/chunk-LU5A5PN5.js +8084 -0
- package/dist/chunks/chunk-LU5A5PN5.js.map +1 -0
- package/dist/chunks/chunk-NBENQI27.js +273 -0
- package/dist/chunks/chunk-NBENQI27.js.map +1 -0
- package/dist/chunks/chunk-NEAO4XCM.js +913 -0
- package/dist/chunks/chunk-NEAO4XCM.js.map +1 -0
- package/dist/chunks/chunk-NPZ3WHOS.js +94 -0
- package/dist/chunks/chunk-NPZ3WHOS.js.map +1 -0
- package/dist/chunks/chunk-OGAKPUCC.js +502 -0
- package/dist/chunks/chunk-OGAKPUCC.js.map +1 -0
- package/dist/chunks/chunk-RL3NBBKW.js +913 -0
- package/dist/chunks/chunk-RL3NBBKW.js.map +1 -0
- package/dist/chunks/chunk-SV356YP4.js +31 -0
- package/dist/chunks/chunk-SV356YP4.js.map +1 -0
- package/dist/chunks/chunk-TU6COU44.js +82 -0
- package/dist/chunks/chunk-TU6COU44.js.map +1 -0
- package/dist/chunks/chunk-VEASE2VL.js +913 -0
- package/dist/chunks/chunk-VEASE2VL.js.map +1 -0
- package/dist/chunks/chunk-VHSCCVNF.js +8024 -0
- package/dist/chunks/chunk-VHSCCVNF.js.map +1 -0
- package/dist/chunks/chunk-VRR4ODZY.js +8009 -0
- package/dist/chunks/chunk-VRR4ODZY.js.map +1 -0
- package/dist/chunks/chunk-WFUXZ4UT.js +502 -0
- package/dist/chunks/chunk-WFUXZ4UT.js.map +1 -0
- package/dist/chunks/chunk-Y3UM2YVB.js +8025 -0
- package/dist/chunks/chunk-Y3UM2YVB.js.map +1 -0
- package/dist/exports/computed-item.context.d.ts +1 -1
- package/dist/exports/computed.context.d.ts +2 -2
- package/dist/exports/interaction.d.ts +1 -1
- package/dist/exports/item.context.d.ts +1 -1
- package/dist/exports/qti-assessment-item.context.d.ts +1 -1
- package/dist/exports/qti-condition-expression.d.ts +1 -1
- package/dist/exports/qti-expression.d.ts +1 -1
- package/dist/exports/qti-test.d.ts +2 -2
- package/dist/exports/session.context.d.ts +2 -2
- package/dist/exports/test.context.d.ts +1 -1
- package/dist/exports/variables.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/qti-components/index.d.ts +2 -2
- package/dist/qti-components/index.js +2 -2
- package/dist/qti-item/components/item-container.js +2 -2
- package/dist/qti-item/components/item-show-correct-response.d.ts +1 -1
- package/dist/qti-item/components/print-item-variables.d.ts +1 -1
- package/dist/qti-item/core/index.d.ts +1 -1
- package/dist/qti-item/core/index.js +3 -3
- package/dist/qti-loader/index.d.ts +1 -1
- package/dist/qti-loader/index.js +2 -2
- package/dist/qti-response-declaration-CIPGNbno.d.ts +1361 -0
- package/dist/qti-response-declaration-CXb5CI4-.d.ts +1361 -0
- package/dist/qti-test/components/index.d.ts +2 -2
- package/dist/qti-test/components/index.js +5 -5
- 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 +2 -2
- package/dist/qti-test/components/test-prev.d.ts +2 -2
- 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-scoring-feedback.js +1 -1
- package/dist/qti-test/components/test-show-correct-response.d.ts +2 -2
- package/dist/qti-test/core/index.d.ts +3 -3
- package/dist/qti-test/core/index.js +3 -3
- package/dist/qti-test-feedback-Ddb0QQyz.d.ts +91 -0
- package/dist/qti-test-feedback-TcrkevLg.d.ts +91 -0
- package/dist/qti-transformers/index.d.ts +17 -1
- package/dist/qti-transformers/index.js +1 -1
- package/package.json +1 -1
package/cdn/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as No,b as Oo,c as Po,d as Qo,e as Ro,f as So}from"./chunks/chunk-
|
|
1
|
+
import{a as No,b as Oo,c as Po,d as Qo,e as Ro,f as So}from"./chunks/chunk-CYSQXIRZ.js";import{a as hr,b as ir}from"./chunks/chunk-SVVO2SFS.js";import{a as gr}from"./chunks/chunk-VB3GRBCX.js";import{a as br}from"./chunks/chunk-2OA2G5PN.js";import{a as dr}from"./chunks/chunk-C3UTBQLI.js";import{a as cr}from"./chunks/chunk-VWTYL7A3.js";import"./chunks/chunk-TC54XTRL.js";import"./chunks/chunk-PUI3LIFH.js";import{a as mr}from"./chunks/chunk-RTHQAQWR.js";import{a as tr}from"./chunks/chunk-BJRPEBBQ.js";import{a as Wo}from"./chunks/chunk-SB62LFF7.js";import{a as Vo}from"./chunks/chunk-W4QXZT2Y.js";import{a as fr}from"./chunks/chunk-H5VQY4UD.js";import{a as or}from"./chunks/chunk-IYTC7IL7.js";import{a as pr}from"./chunks/chunk-23JT53R2.js";import{a as xr}from"./chunks/chunk-BSK7IIBZ.js";import{a as rr}from"./chunks/chunk-7543U7PC.js";import{a as er}from"./chunks/chunk-34G25RYG.js";import{a as Zo}from"./chunks/chunk-PMW5NIBL.js";import{a as ar}from"./chunks/chunk-Q54YYIH7.js";import{a as $o}from"./chunks/chunk-N4LMZHIZ.js";import{a as Yo}from"./chunks/chunk-QIEEN6C7.js";import{a as Xo}from"./chunks/chunk-2VU43EIZ.js";import{a as To}from"./chunks/chunk-JG53AUXR.js";import{a as Uo}from"./chunks/chunk-DS3TJWSG.js";import"./chunks/chunk-FTIKZVQS.js";import"./chunks/chunk-U5Y5T4ZS.js";import{a as _o}from"./chunks/chunk-YNBLRM6A.js";import"./chunks/chunk-AV6ISYP4.js";import"./chunks/chunk-BUBRM6YY.js";import"./chunks/chunk-CZDMOYYF.js";import{a as Lo,b as Mo}from"./chunks/chunk-QQR6POPY.js";import{$ as eo,A as D,Aa as Eo,B as E,Ba as Fo,C as F,Ca as Go,D as G,Da as Ho,E as H,Ea as Io,F as I,Fa as Jo,G as J,Ga as Ko,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,R as U,S as V,T as W,U as X,V as Y,W as Z,X as _,Y as $,Z as oo,_ as ro,a as o,aa as fo,b as m,ba as mo,c as p,ca as po,d as t,da as to,e as x,ea as xo,f as a,fa as ao,g as b,ga as bo,h as c,ha as co,i as d,ia as go,j as g,ja as ho,k as h,ka as io,l as i,la as jo,m as j,ma as ko,n as k,na as lo,o as l,oa as no,p as n,pa as qo,q,qa as so,r as s,ra as uo,s as u,sa as vo,t as v,ta as wo,u as w,ua as yo,v as y,va as zo,w as z,wa as Ao,x as A,xa as Bo,y as B,ya as Co,z as C,za as Do}from"./chunks/chunk-XLFLYMNJ.js";import"./chunks/chunk-EHK76KRT.js";import"./chunks/chunk-6BGG2JJR.js";import"./chunks/chunk-XUJ7TXHW.js";import{a as r,b as e,c as f}from"./chunks/chunk-E6IOJ4MV.js";import"./chunks/chunk-KPDSL2FK.js";import"./chunks/chunk-MEYBMNBF.js";import"./chunks/chunk-QQCGUVEV.js";import"./chunks/chunk-TCHROQU3.js";import"./chunks/chunk-P6SSTAJ2.js";import"./chunks/chunk-7ME56ODO.js";import"./chunks/chunk-7WJYJA45.js";import"./chunks/chunk-3BEVQM67.js";import"./chunks/chunk-42P7F3FC.js";import"./chunks/chunk-65CZNGQC.js";import"./chunks/chunk-KWPDTFYH.js";import"./chunks/chunk-JR322KXH.js";export{Lo as INITIAL_TEST_CONTEXT,br as ItemContainer,dr as ItemShowCorrectResponse,cr as PrintItemVariables,oo as QtiAnd,o as QtiAssessmentItem,Oo as QtiAssessmentItemRef,Po as QtiAssessmentSection,m as QtiAssessmentStimulusRef,Qo as QtiAssessmentTest,c as QtiAssociableHotspot,d as QtiAssociateInteraction,eo as QtiBaseValue,g as QtiChoiceInteraction,p as QtiCompanionMaterialsInfo,fo as QtiContains,Go as QtiContentBody,mo as QtiCorrect,h as QtiCustomInteraction,t as QtiCustomOperator,Eo as QtiDelete,i as QtiEndAttemptInteraction,to as QtiEqual,po as QtiEqualRounded,j as QtiExtendedTextInteraction,x as QtiFeedbackBlock,a as QtiFeedbackInline,q as QtiGap,k as QtiGapImg,l as QtiGapMatchInteraction,n as QtiGapText,s as QtiGraphicAssociateInteraction,u as QtiGraphicGapMatchInteraction,v as QtiGraphicOrderInteraction,xo as QtiGt,ao as QtiGte,w as QtiHotspotChoice,y as QtiHotspotInteraction,A as QtiHottext,z as QtiHottextInteraction,Fo as QtiIndex,C as QtiInlineChoice,B as QtiInlineChoiceInteraction,bo as QtiIsNull,gr as QtiItem,P as QtiItemBody,V as QtiLookupOutcomeValue,co as QtiLt,go as QtiLte,ho as QtiMapResponse,io as QtiMapResponsePoint,jo as QtiMatch,E as QtiMatchInteraction,F as QtiMediaInteraction,ko as QtiMember,b as QtiModalFeedback,lo as QtiMultiple,no as QtiNot,qo as QtiOr,G as QtiOrderInteraction,so as QtiOrdered,Jo as QtiOutcomeDeclaration,Q as QtiOutcomeProcessing,R as QtiOutcomeProcessingProcessor,H as QtiPortableCustomInteraction,I as QtiPositionObjectInteraction,J as QtiPositionObjectStage,uo as QtiPrintedVariable,vo as QtiProduct,S as QtiPrompt,Do as QtiRandom,W as QtiResponseCondition,Ko as QtiResponseDeclaration,Z as QtiResponseElse,$ as QtiResponseElseIf,_ as QtiResponseIf,T as QtiResponseProcessing,Ho as QtiRubricBlock,U as QtiRule,K as QtiSelectPointInteraction,X as QtiSetOutcomeValue,Y as QtiSetOutcomeValueRule,D as QtiSimpleAssociableChoice,L as QtiSimpleChoice,M as QtiSliderInteraction,zo as QtiStringMatch,Io as QtiStylesheet,wo as QtiSubtract,Ao as QtiSum,Bo as QtiSumExpression,No as QtiTest,So as QtiTestFeedback,Ro as QtiTestPart,N as QtiTextEntryInteraction,O as QtiUploadInteraction,Co as QtiVariable,ar as TestCheckItem,$o as TestContainer,Yo as TestEndAttempt,Xo as TestItemLink,To as TestNavigation,Uo as TestNext,_o as TestPagingButtonsStamp,Vo as TestPrev,fr as TestPrintContext,or as TestPrintVariables,pr as TestScoringButtons,xr as TestScoringFeedback,rr as TestSectionButtonsStamp,er as TestSectionLink,Zo as TestShowCorrectResponse,mr as TestStamp,Wo as TestView,tr as TestViewToggle,ir as getItemByUri,hr as getManifestInfo,ro as qtiAndMixin,yo as qtiSubtractMixin,r as qtiTransformItem,e as qtiTransformManifest,f as qtiTransformTest,Mo as testContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunks/chunk-
|
|
1
|
+
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunks/chunk-XLFLYMNJ.js";import"../chunks/chunk-EHK76KRT.js";import"../chunks/chunk-6BGG2JJR.js";import"../chunks/chunk-XUJ7TXHW.js";import"../chunks/chunk-E6IOJ4MV.js";import"../chunks/chunk-KPDSL2FK.js";import"../chunks/chunk-MEYBMNBF.js";import"../chunks/chunk-QQCGUVEV.js";import"../chunks/chunk-7ME56ODO.js";import"../chunks/chunk-7WJYJA45.js";import"../chunks/chunk-3BEVQM67.js";import"../chunks/chunk-42P7F3FC.js";import"../chunks/chunk-65CZNGQC.js";import"../chunks/chunk-KWPDTFYH.js";import"../chunks/chunk-JR322KXH.js";export{Z as QtiAnd,a as QtiAssessmentItem,b as QtiAssessmentStimulusRef,h as QtiAssociableHotspot,i as QtiAssociateInteraction,$ as QtiBaseValue,j as QtiChoiceInteraction,c as QtiCompanionMaterialsInfo,aa as QtiContains,Ca as QtiContentBody,ba as QtiCorrect,k as QtiCustomInteraction,d as QtiCustomOperator,Aa as QtiDelete,l as QtiEndAttemptInteraction,da as QtiEqual,ca as QtiEqualRounded,m as QtiExtendedTextInteraction,e as QtiFeedbackBlock,f as QtiFeedbackInline,q as QtiGap,n as QtiGapImg,o as QtiGapMatchInteraction,p as QtiGapText,r as QtiGraphicAssociateInteraction,s as QtiGraphicGapMatchInteraction,t as QtiGraphicOrderInteraction,ea as QtiGt,fa as QtiGte,u as QtiHotspotChoice,v as QtiHotspotInteraction,x as QtiHottext,w as QtiHottextInteraction,Ba as QtiIndex,z as QtiInlineChoice,y as QtiInlineChoiceInteraction,ga as QtiIsNull,M as QtiItemBody,S as QtiLookupOutcomeValue,ha as QtiLt,ia as QtiLte,ja as QtiMapResponse,ka as QtiMapResponsePoint,la as QtiMatch,B as QtiMatchInteraction,C as QtiMediaInteraction,ma as QtiMember,g as QtiModalFeedback,na as QtiMultiple,oa as QtiNot,pa as QtiOr,D as QtiOrderInteraction,qa as QtiOrdered,Fa as QtiOutcomeDeclaration,N as QtiOutcomeProcessing,O as QtiOutcomeProcessingProcessor,E as QtiPortableCustomInteraction,F as QtiPositionObjectInteraction,G as QtiPositionObjectStage,ra as QtiPrintedVariable,sa as QtiProduct,P as QtiPrompt,za as QtiRandom,T as QtiResponseCondition,Ga as QtiResponseDeclaration,W as QtiResponseElse,Y as QtiResponseElseIf,X as QtiResponseIf,Q as QtiResponseProcessing,Da as QtiRubricBlock,R as QtiRule,H as QtiSelectPointInteraction,U as QtiSetOutcomeValue,V as QtiSetOutcomeValueRule,A as QtiSimpleAssociableChoice,I as QtiSimpleChoice,J as QtiSliderInteraction,va as QtiStringMatch,Ea as QtiStylesheet,ta as QtiSubtract,wa as QtiSum,xa as QtiSumExpression,K as QtiTextEntryInteraction,L as QtiUploadInteraction,ya as QtiVariable,_ as qtiAndMixin,ua as qtiSubtractMixin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk-
|
|
1
|
+
import{a}from"../../chunks/chunk-2OA2G5PN.js";import"../../chunks/chunk-BUBRM6YY.js";import"../../chunks/chunk-6BGG2JJR.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-E6IOJ4MV.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{a as ItemContainer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"../../chunks/chunk-
|
|
1
|
+
import{a as d}from"../../chunks/chunk-VB3GRBCX.js";import{a}from"../../chunks/chunk-2OA2G5PN.js";import{a as c}from"../../chunks/chunk-C3UTBQLI.js";import{a as b}from"../../chunks/chunk-VWTYL7A3.js";import"../../chunks/chunk-TC54XTRL.js";import"../../chunks/chunk-BUBRM6YY.js";import"../../chunks/chunk-6BGG2JJR.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-E6IOJ4MV.js";import"../../chunks/chunk-TCHROQU3.js";import"../../chunks/chunk-7WJYJA45.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{a as ItemContainer,c as ItemShowCorrectResponse,b as PrintItemVariables,d as QtiItem};
|
package/cdn/qti-loader/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunks/chunk-
|
|
1
|
+
import{a,b}from"../chunks/chunk-SVVO2SFS.js";import"../chunks/chunk-E6IOJ4MV.js";import"../chunks/chunk-JR322KXH.js";export{b as getItemByUri,a as getManifestInfo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunks/chunk-PUI3LIFH.js";import{a as n}from"../../chunks/chunk-RTHQAQWR.js";import{a as p}from"../../chunks/chunk-BJRPEBBQ.js";import{a as d}from"../../chunks/chunk-SB62LFF7.js";import{a as c}from"../../chunks/chunk-W4QXZT2Y.js";import{a as m}from"../../chunks/chunk-H5VQY4UD.js";import{a as j}from"../../chunks/chunk-IYTC7IL7.js";import{a as o}from"../../chunks/chunk-
|
|
1
|
+
import"../../chunks/chunk-PUI3LIFH.js";import{a as n}from"../../chunks/chunk-RTHQAQWR.js";import{a as p}from"../../chunks/chunk-BJRPEBBQ.js";import{a as d}from"../../chunks/chunk-SB62LFF7.js";import{a as c}from"../../chunks/chunk-W4QXZT2Y.js";import{a as m}from"../../chunks/chunk-H5VQY4UD.js";import{a as j}from"../../chunks/chunk-IYTC7IL7.js";import{a as o}from"../../chunks/chunk-23JT53R2.js";import{a as q}from"../../chunks/chunk-BSK7IIBZ.js";import{a as k}from"../../chunks/chunk-7543U7PC.js";import{a as l}from"../../chunks/chunk-34G25RYG.js";import{a as g}from"../../chunks/chunk-PMW5NIBL.js";import{a as r}from"../../chunks/chunk-Q54YYIH7.js";import{a as i}from"../../chunks/chunk-N4LMZHIZ.js";import{a as f}from"../../chunks/chunk-QIEEN6C7.js";import{a as e}from"../../chunks/chunk-2VU43EIZ.js";import{a}from"../../chunks/chunk-JG53AUXR.js";import{a as b}from"../../chunks/chunk-DS3TJWSG.js";import"../../chunks/chunk-FTIKZVQS.js";import"../../chunks/chunk-U5Y5T4ZS.js";import{a as h}from"../../chunks/chunk-YNBLRM6A.js";import"../../chunks/chunk-AV6ISYP4.js";import"../../chunks/chunk-BUBRM6YY.js";import"../../chunks/chunk-CZDMOYYF.js";import"../../chunks/chunk-QQR6POPY.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6BGG2JJR.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-E6IOJ4MV.js";import"../../chunks/chunk-P6SSTAJ2.js";import"../../chunks/chunk-7ME56ODO.js";import"../../chunks/chunk-7WJYJA45.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{r as TestCheckItem,i as TestContainer,f as TestEndAttempt,e as TestItemLink,a as TestNavigation,b as TestNext,h as TestPagingButtonsStamp,c as TestPrev,m as TestPrintContext,j as TestPrintVariables,o as TestScoringButtons,q as TestScoringFeedback,k as TestSectionButtonsStamp,l as TestSectionLink,g as TestShowCorrectResponse,n as TestStamp,d as TestView,p as TestViewToggle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk-
|
|
1
|
+
import{a}from"../../chunks/chunk-N4LMZHIZ.js";import"../../chunks/chunk-BUBRM6YY.js";import"../../chunks/chunk-6BGG2JJR.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-E6IOJ4MV.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{a as TestContainer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk-
|
|
1
|
+
import{a}from"../../chunks/chunk-JG53AUXR.js";import"../../chunks/chunk-CZDMOYYF.js";import"../../chunks/chunk-QQR6POPY.js";import"../../chunks/chunk-P6SSTAJ2.js";import"../../chunks/chunk-7ME56ODO.js";import"../../chunks/chunk-7WJYJA45.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{a as TestNavigation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk-
|
|
1
|
+
import{a}from"../../chunks/chunk-23JT53R2.js";import"../../chunks/chunk-AV6ISYP4.js";import"../../chunks/chunk-P6SSTAJ2.js";import"../../chunks/chunk-7WJYJA45.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{a as TestScoringButtons};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk-
|
|
1
|
+
import{a}from"../../chunks/chunk-BSK7IIBZ.js";import"../../chunks/chunk-P6SSTAJ2.js";import"../../chunks/chunk-7WJYJA45.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-JR322KXH.js";export{a as TestScoringFeedback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h}from"../../chunks/chunk-
|
|
1
|
+
import{a as c,b as d,c as e,d as f,e as g,f as h}from"../../chunks/chunk-CYSQXIRZ.js";import"../../chunks/chunk-AV6ISYP4.js";import"../../chunks/chunk-CZDMOYYF.js";import{a,b}from"../../chunks/chunk-QQR6POPY.js";import"../../chunks/chunk-XLFLYMNJ.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6BGG2JJR.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-E6IOJ4MV.js";import"../../chunks/chunk-KPDSL2FK.js";import"../../chunks/chunk-MEYBMNBF.js";import"../../chunks/chunk-QQCGUVEV.js";import"../../chunks/chunk-7ME56ODO.js";import"../../chunks/chunk-7WJYJA45.js";import"../../chunks/chunk-3BEVQM67.js";import"../../chunks/chunk-42P7F3FC.js";import"../../chunks/chunk-65CZNGQC.js";import"../../chunks/chunk-KWPDTFYH.js";import"../../chunks/chunk-JR322KXH.js";export{a as INITIAL_TEST_CONTEXT,d as QtiAssessmentItemRef,e as QtiAssessmentSection,f as QtiAssessmentTest,c as QtiTest,h as QtiTestFeedback,g as QtiTestPart,b as testContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunks/chunk-
|
|
1
|
+
import{a,b,c}from"../chunks/chunk-E6IOJ4MV.js";import"../chunks/chunk-JR322KXH.js";export{a as qtiTransformItem,b as qtiTransformManifest,c as qtiTransformTest};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
qtiTransformItem,
|
|
3
|
+
qtiTransformManifest,
|
|
4
|
+
qtiTransformTest
|
|
5
|
+
} from "./chunk-DJWEI2NH.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/qti-loader/qti-loader.ts
|
|
8
|
+
var getManifestInfo = async (manifestURL) => {
|
|
9
|
+
const baseURI = manifestURL.substring(0, manifestURL.lastIndexOf("/"));
|
|
10
|
+
const test = await qtiTransformManifest().load(`${manifestURL}`).then((api) => api.assessmentTest());
|
|
11
|
+
const testHTMLDoc = await qtiTransformTest().load(`${baseURI}/${test.href}`).then((api) => api.htmlDoc());
|
|
12
|
+
const items = await qtiTransformTest().load(`${baseURI}/${test.href}`).then((api) => api.items());
|
|
13
|
+
const testURL = `${baseURI}/${test.href}`;
|
|
14
|
+
const testURI = `${baseURI}/${test.href.substring(0, test.href.lastIndexOf("/"))}`;
|
|
15
|
+
return {
|
|
16
|
+
testHTMLDoc,
|
|
17
|
+
testURI,
|
|
18
|
+
testURL,
|
|
19
|
+
items,
|
|
20
|
+
testIdentifier: test.identifier
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
var getItemByUri = async (itemUri) => {
|
|
24
|
+
return qtiTransformItem().load(itemUri).promise.then((api) => api.htmlDoc().firstElementChild);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
getManifestInfo,
|
|
29
|
+
getItemByUri
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-2EGQQQHL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-loader/qti-loader.ts"],"sourcesContent":["import { qtiTransformItem, qtiTransformTest } from '../qti-transformers';\nimport { qtiTransformManifest } from '../qti-transformers/qti-transform-manifest';\n\nimport type { QtiAssessmentItem } from '../qti-components';\n\nexport type ManifestInfo = {\n testIdentifier: string;\n testHTMLDoc: DocumentFragment;\n testURI: string;\n testURL: string;\n items: {\n identifier: string;\n href: string;\n category: string;\n }[];\n};\n\n// Utility function to ensure package URIs end with a '/'\n// const normalizeUri = (uri: string) => (uri.endsWith('/') ? uri : `${uri}/`);\n\n// Fetches assessment data from the manifest\nexport const getManifestInfo = async (manifestURL: string): Promise<ManifestInfo> => {\n const baseURI = manifestURL.substring(0, manifestURL.lastIndexOf('/'));\n\n const test = await qtiTransformManifest()\n .load(`${manifestURL}`)\n .then(api => api.assessmentTest());\n\n const testHTMLDoc = await qtiTransformTest()\n .load(`${baseURI}/${test.href}`)\n .then(api => api.htmlDoc());\n\n const items = await qtiTransformTest()\n .load(`${baseURI}/${test.href}`)\n .then(api => api.items());\n\n const testURL = `${baseURI}/${test.href}`;\n const testURI = `${baseURI}/${test.href.substring(0, test.href.lastIndexOf('/'))}`;\n\n return {\n testHTMLDoc,\n testURI,\n testURL,\n items,\n testIdentifier: test.identifier\n };\n};\n\n// Fetches a single item by URI\nexport const getItemByUri = async (itemUri: string): Promise<QtiAssessmentItem> => {\n return qtiTransformItem()\n .load(itemUri)\n .promise.then(api => api.htmlDoc().firstElementChild as QtiAssessmentItem);\n};\n"],"mappings":";;;;;;;AAqBO,IAAM,kBAAkB,OAAO,gBAA+C;AACnF,QAAM,UAAU,YAAY,UAAU,GAAG,YAAY,YAAY,GAAG,CAAC;AAErE,QAAM,OAAO,MAAM,qBAAqB,EACrC,KAAK,GAAG,WAAW,EAAE,EACrB,KAAK,SAAO,IAAI,eAAe,CAAC;AAEnC,QAAM,cAAc,MAAM,iBAAiB,EACxC,KAAK,GAAG,OAAO,IAAI,KAAK,IAAI,EAAE,EAC9B,KAAK,SAAO,IAAI,QAAQ,CAAC;AAE5B,QAAM,QAAQ,MAAM,iBAAiB,EAClC,KAAK,GAAG,OAAO,IAAI,KAAK,IAAI,EAAE,EAC9B,KAAK,SAAO,IAAI,MAAM,CAAC;AAE1B,QAAM,UAAU,GAAG,OAAO,IAAI,KAAK,IAAI;AACvC,QAAM,UAAU,GAAG,OAAO,IAAI,KAAK,KAAK,UAAU,GAAG,KAAK,KAAK,YAAY,GAAG,CAAC,CAAC;AAEhF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,KAAK;AAAA,EACvB;AACF;AAGO,IAAM,eAAe,OAAO,YAAgD;AACjF,SAAO,iBAAiB,EACrB,KAAK,OAAO,EACZ,QAAQ,KAAK,SAAO,IAAI,QAAQ,EAAE,iBAAsC;AAC7E;","names":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-AZIKAG7K.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
+
import { html, LitElement, nothing } from "lit";
|
|
10
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "@heximal/templates";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestStamp = class extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.debug = false;
|
|
17
|
+
this.stampContext = {
|
|
18
|
+
view: "candidate",
|
|
19
|
+
activeItem: {},
|
|
20
|
+
activeSection: {
|
|
21
|
+
items: []
|
|
22
|
+
},
|
|
23
|
+
activeTestpart: {
|
|
24
|
+
items: [],
|
|
25
|
+
sections: []
|
|
26
|
+
},
|
|
27
|
+
test: {}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
createRenderRoot() {
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
|
+
const templateElement = this.querySelector("template");
|
|
36
|
+
if (!templateElement) {
|
|
37
|
+
this.myTemplate = null;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
41
|
+
}
|
|
42
|
+
willUpdate(_changedProperties) {
|
|
43
|
+
if (!this.computedContext) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
47
|
+
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
48
|
+
const activeItem = activeSection?.items.find((item) => item.active);
|
|
49
|
+
const { variables, ...augmentedItem } = activeItem || {};
|
|
50
|
+
if (!activeTestPart || !activeSection || !activeItem) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const augmentedTestPart = {
|
|
54
|
+
...activeTestPart,
|
|
55
|
+
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
|
|
56
|
+
sections: activeTestPart.sections.map((section) => ({
|
|
57
|
+
...section,
|
|
58
|
+
items: section.items.map(({ variables: variables2, ...rest }) => rest)
|
|
59
|
+
}))
|
|
60
|
+
};
|
|
61
|
+
const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
|
|
62
|
+
const { testParts, ...activeTest } = this.computedContext;
|
|
63
|
+
this.stampContext = {
|
|
64
|
+
view: this.computedContext.view,
|
|
65
|
+
activeItem: augmentedItem,
|
|
66
|
+
activeSection: augmentedSection,
|
|
67
|
+
activeTestpart: augmentedTestPart,
|
|
68
|
+
test: activeTest
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
console.log("value of stampContext", this.stampContext);
|
|
73
|
+
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
74
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
__decorateClass([
|
|
78
|
+
property({ type: Boolean, reflect: true })
|
|
79
|
+
], TestStamp.prototype, "debug", 2);
|
|
80
|
+
__decorateClass([
|
|
81
|
+
state(),
|
|
82
|
+
consume({ context: computedContext, subscribe: true })
|
|
83
|
+
], TestStamp.prototype, "computedContext", 2);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
state()
|
|
86
|
+
], TestStamp.prototype, "stampContext", 2);
|
|
87
|
+
TestStamp = __decorateClass([
|
|
88
|
+
customElement("test-stamp")
|
|
89
|
+
], TestStamp);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
TestStamp
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-45FDEM7M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from '@heximal/templates';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from '@heximal/templates';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: [],\n sections: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n if (!activeTestPart || !activeSection || !activeItem) {\n return;\n }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n console.log('value of stampContext', this.stampContext);\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO,CAAC;AAAA,QACR,UAAU,CAAC;AAAA,MACb;AAAA,MACA,MAAM,CAAC;AAAA,IACT;AAAA;AAAA,EAIU,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAAW,oBAA0C;AAC7D,QAAI,CAAC,KAAK,iBAAiB;AACzB;AAAA,IACF;AACA,UAAM,iBAAiB,KAAK,gBAAgB,UAAU,KAAK,cAAY,SAAS,MAAM;AACtF,UAAM,gBAAgB,gBAAgB,SAAS,KAAK,aAAW,QAAQ,MAAM;AAC7E,UAAM,aAAa,eAAe,MAAM,KAAK,UAAQ,KAAK,MAAM;AAChE,UAAM,EAAE,WAAW,GAAG,cAAc,IAAI,cAAc,CAAC;AAEvD,QAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,YAAY;AACpD;AAAA,IACF;AAEA,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,OAAO,eAAe,SAAS,QAAQ,aAAW,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,CAAC;AAAA,MACrG,UAAU,eAAe,SAAS,IAAI,cAAY;AAAA,QAChD,GAAG;AAAA,QACH,OAAO,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI;AAAA,MAC3D,EAAE;AAAA,IACJ;AAEA,UAAM,mBAAmB,EAAE,GAAG,eAAe,OAAO,cAAc,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,EAAE;AAC9G,UAAM,EAAE,WAAW,GAAG,WAAW,IAAI,KAAK;AAE1C,SAAK,eAAe;AAAA,MAClB,MAAM,KAAK,gBAAgB;AAAA,MAC3B,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AACP,YAAQ,IAAI,yBAAyB,KAAK,YAAY;AAEtD,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AAlFS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
item_default
|
|
3
|
+
} from "./chunk-6TDSFDGN.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
+
import {
|
|
8
|
+
qtiTransformTest
|
|
9
|
+
} from "./chunk-OGAKPUCC.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-container.ts
|
|
15
|
+
import { LitElement, html } from "lit";
|
|
16
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
17
|
+
import { until } from "lit/directives/until.js";
|
|
18
|
+
var TestContainer = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.testURL = null;
|
|
22
|
+
this.testDoc = null;
|
|
23
|
+
this.testXML = null;
|
|
24
|
+
/** Template content if provided */
|
|
25
|
+
this.templateContent = null;
|
|
26
|
+
}
|
|
27
|
+
async handleTestURLChange() {
|
|
28
|
+
if (!this.testURL) return;
|
|
29
|
+
try {
|
|
30
|
+
const api = await qtiTransformTest().load(this.testURL);
|
|
31
|
+
this.testDoc = api.htmlDoc();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Error loading or parsing XML:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
handleTestXMLChange() {
|
|
37
|
+
if (!this.testXML) return;
|
|
38
|
+
try {
|
|
39
|
+
this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Error parsing XML:", error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.initializeTemplateContent();
|
|
47
|
+
this.applyStyles();
|
|
48
|
+
if (this.testURL) {
|
|
49
|
+
this.handleTestURLChange();
|
|
50
|
+
}
|
|
51
|
+
if (this.testXML) {
|
|
52
|
+
this.handleTestXMLChange();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
initializeTemplateContent() {
|
|
56
|
+
const template = this.querySelector("template");
|
|
57
|
+
this.templateContent = template ? template.content : html``;
|
|
58
|
+
}
|
|
59
|
+
applyStyles() {
|
|
60
|
+
const sheet = new CSSStyleSheet();
|
|
61
|
+
sheet.replaceSync(item_default);
|
|
62
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return html`
|
|
66
|
+
${this.templateContent}
|
|
67
|
+
<slot></slot>
|
|
68
|
+
${until(this.testDoc, html`<span>Loading...</span>`)}
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ type: String, attribute: "test-url" })
|
|
74
|
+
], TestContainer.prototype, "testURL", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
state()
|
|
77
|
+
], TestContainer.prototype, "testDoc", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
state()
|
|
80
|
+
], TestContainer.prototype, "testXML", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("testURL", { waitUntilFirstUpdate: true })
|
|
83
|
+
], TestContainer.prototype, "handleTestURLChange", 1);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
watch("testXML", { waitUntilFirstUpdate: true })
|
|
86
|
+
], TestContainer.prototype, "handleTestXMLChange", 1);
|
|
87
|
+
TestContainer = __decorateClass([
|
|
88
|
+
customElement("test-container")
|
|
89
|
+
], TestContainer);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
TestContainer
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-4B4DRCXO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\n\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformTest } from '../../qti-transformers';\n\n/**\n * `<test-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-test` will be placed inside the shadow DOM of this element.\n * The element loads the test from the provided URL and renders it inside the shadow DOM.\n *\n * ```html\n * <qti-test>\n * <test-navigation>\n * <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n * </test-navigation>\n * </qti-test>\n * ```\n */\n@customElement('test-container')\nexport class TestContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'test-url' })\n testURL: string = null;\n\n /** A parsed HTML document */\n @state()\n testDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n testXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('testURL', { waitUntilFirstUpdate: true })\n protected async handleTestURLChange() {\n if (!this.testURL) return;\n try {\n const api = await qtiTransformTest().load(this.testURL);\n this.testDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('testXML', { waitUntilFirstUpdate: true })\n protected handleTestXMLChange() {\n if (!this.testXML) return;\n try {\n this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.testURL) {\n this.handleTestURLChange();\n }\n if (this.testXML) {\n this.handleTestXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.testDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-container': TestContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAoBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,MAAM,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACtD,WAAK,UAAU,IAAI,QAAQ;AAAA,IAC7B,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;AAC9B,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,WAAK,UAAU,iBAAiB,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ;AAAA,IAChE,SAAS,OAAO;AACd,cAAQ,MAAM,sBAAsB,KAAK;AAAA,IAC3C;AAAA,EACF;AAAA,EAEA,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,SAAK,0BAA0B;AAC/B,SAAK,YAAY;AACjB,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AACA,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAEQ,4BAA4B;AAClC,UAAM,WAAW,KAAK,cAAc,UAAU;AAC9C,SAAK,kBAAkB,WAAW,SAAS,UAAU;AAAA,EACvD;AAAA,EAEQ,cAAc;AACpB,UAAM,QAAQ,IAAI,cAAc;AAChC,UAAM,YAAY,YAAO;AACzB,SAAK,WAAW,qBAAqB,CAAC,KAAK;AAAA,EAC7C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,QACH,KAAK,eAAe;AAAA;AAAA,QAEpB,MAAM,KAAK,SAAS,6BAA6B,CAAC;AAAA;AAAA,EAExD;AACF;AAhEE;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW,CAAC;AAAA,GAFtC,cAGX;AAIA;AAAA,EADC,MAAM;AAAA,GANI,cAOX;AAIA;AAAA,EADC,MAAM;AAAA,GAVI,cAWX;AAMgB;AAAA,EADf,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhBrC,cAiBK;AAWN;AAAA,EADT,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3BrC,cA4BD;AA5BC,gBAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
item_default
|
|
3
|
+
} from "./chunk-6TDSFDGN.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
+
import {
|
|
8
|
+
qtiTransformItem
|
|
9
|
+
} from "./chunk-DJWEI2NH.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-item/components/item-container.ts
|
|
15
|
+
import { LitElement, html } from "lit";
|
|
16
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
17
|
+
import { until } from "lit/directives/until.js";
|
|
18
|
+
var ItemContainer = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.itemURL = null;
|
|
22
|
+
this.itemDoc = null;
|
|
23
|
+
this.itemXML = null;
|
|
24
|
+
/** Template content if provided */
|
|
25
|
+
this.templateContent = null;
|
|
26
|
+
}
|
|
27
|
+
async handleItemURLChange() {
|
|
28
|
+
if (!this.itemURL) return;
|
|
29
|
+
try {
|
|
30
|
+
const { promise: api } = await qtiTransformItem().load(this.itemURL);
|
|
31
|
+
this.itemDoc = (await api).htmlDoc();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Error loading or parsing XML:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
handleItemXMLChange() {
|
|
37
|
+
if (!this.itemXML) return;
|
|
38
|
+
try {
|
|
39
|
+
this.itemDoc = qtiTransformItem().parse(this.itemXML).htmlDoc();
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Error parsing XML:", error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.initializeTemplateContent();
|
|
47
|
+
this.applyStyles();
|
|
48
|
+
if (this.itemURL) {
|
|
49
|
+
this.handleItemURLChange();
|
|
50
|
+
}
|
|
51
|
+
if (this.itemXML) {
|
|
52
|
+
this.handleItemXMLChange();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
initializeTemplateContent() {
|
|
56
|
+
const template = this.querySelector("template");
|
|
57
|
+
this.templateContent = template ? template.content : html``;
|
|
58
|
+
}
|
|
59
|
+
applyStyles() {
|
|
60
|
+
const sheet = new CSSStyleSheet();
|
|
61
|
+
sheet.replaceSync(item_default);
|
|
62
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return html`
|
|
66
|
+
${this.templateContent}
|
|
67
|
+
<slot></slot>
|
|
68
|
+
${until(this.itemDoc, html`<span>Loading...</span>`)}
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ type: String, attribute: "item-url" })
|
|
74
|
+
], ItemContainer.prototype, "itemURL", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
state()
|
|
77
|
+
], ItemContainer.prototype, "itemDoc", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
state()
|
|
80
|
+
], ItemContainer.prototype, "itemXML", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("itemURL", { waitUntilFirstUpdate: true })
|
|
83
|
+
], ItemContainer.prototype, "handleItemURLChange", 1);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
watch("itemXML", { waitUntilFirstUpdate: true })
|
|
86
|
+
], ItemContainer.prototype, "handleItemXMLChange", 1);
|
|
87
|
+
ItemContainer = __decorateClass([
|
|
88
|
+
customElement("item-container")
|
|
89
|
+
], ItemContainer);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
ItemContainer
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-5IYIGX6A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-item/components/item-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\n\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformItem } from '../../qti-transformers';\n\n/**\n * `<item-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-item` will be placed inside the shadow DOM of this element.\n * The element loads the item from the provided URL and renders it inside the shadow DOM.\n *\n * ### Styling\n * Add a class to the element for styling.\n *\n * ```html\n * <qti-item>\n * <item-container class=\"m-4 bg-white\" item-url=\"./path/to/item.xml\"></item-container>\n * </qti-item>\n * ```\n */\n@customElement('item-container')\nexport class ItemContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'item-url' })\n itemURL: string = null;\n\n /** A parsed HTML document */\n @state()\n itemDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n itemXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('itemURL', { waitUntilFirstUpdate: true })\n protected async handleItemURLChange() {\n if (!this.itemURL) return;\n try {\n const { promise: api } = await qtiTransformItem().load(this.itemURL);\n this.itemDoc = (await api).htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('itemXML', { waitUntilFirstUpdate: true })\n protected handleItemXMLChange() {\n if (!this.itemXML) return;\n try {\n this.itemDoc = qtiTransformItem().parse(this.itemXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.itemURL) {\n this.handleItemURLChange();\n }\n if (this.itemXML) {\n this.handleItemXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.itemDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'item-container': ItemContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAqBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,EAAE,SAAS,IAAI,IAAI,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACnE,WAAK,WAAW,MAAM,KAAK,QAAQ;AAAA,IACrC,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;AAC9B,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,WAAK,UAAU,iBAAiB,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ;AAAA,IAChE,SAAS,OAAO;AACd,cAAQ,MAAM,sBAAsB,KAAK;AAAA,IAC3C;AAAA,EACF;AAAA,EAEA,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,SAAK,0BAA0B;AAC/B,SAAK,YAAY;AACjB,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AACA,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAEQ,4BAA4B;AAClC,UAAM,WAAW,KAAK,cAAc,UAAU;AAC9C,SAAK,kBAAkB,WAAW,SAAS,UAAU;AAAA,EACvD;AAAA,EAEQ,cAAc;AACpB,UAAM,QAAQ,IAAI,cAAc;AAChC,UAAM,YAAY,YAAO;AACzB,SAAK,WAAW,qBAAqB,CAAC,KAAK;AAAA,EAC7C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,QACH,KAAK,eAAe;AAAA;AAAA,QAEpB,MAAM,KAAK,SAAS,6BAA6B,CAAC;AAAA;AAAA,EAExD;AACF;AAhEE;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW,CAAC;AAAA,GAFtC,cAGX;AAIA;AAAA,EADC,MAAM;AAAA,GANI,cAOX;AAIA;AAAA,EADC,MAAM;AAAA,GAVI,cAWX;AAMgB;AAAA,EADf,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhBrC,cAiBK;AAWN;AAAA,EADT,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3BrC,cA4BD;AA5BC,gBAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
|