@citolab/qti-components 10.0.0-next.12 → 10.0.0-next.14
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 +447 -412
- package/dist/base.d.ts +3 -3
- package/dist/base.js +1 -1
- package/dist/{chunk-5K5JO7OG.js → chunk-6XRNX574.js} +363 -320
- package/dist/chunk-6XRNX574.js.map +1 -0
- package/dist/{chunk-AVZRY5SQ.js → chunk-BZPMN57E.js} +2 -2
- package/dist/{chunk-YOCOLMGB.js → chunk-C7SYDLMG.js} +197 -93
- package/dist/chunk-C7SYDLMG.js.map +1 -0
- package/dist/{chunk-OHRAG2UM.js → chunk-CCI3QMQA.js} +53 -16
- package/dist/chunk-CCI3QMQA.js.map +1 -0
- package/dist/{chunk-RWMY7KRT.js → chunk-HGKLF7SP.js} +2 -2
- package/dist/{chunk-AJ5U5KXR.js → chunk-LEF7AAYZ.js} +2 -2
- package/dist/{chunk-O76BOKAP.js → chunk-MP2SUN7J.js} +199 -90
- package/dist/chunk-MP2SUN7J.js.map +1 -0
- package/dist/{chunk-M7X6TWSX.js → chunk-NYNL5HSR.js} +2 -2
- package/dist/{chunk-T7YSBBAA.js → chunk-O2ENNGKV.js} +3 -2
- package/dist/chunk-O2ENNGKV.js.map +1 -0
- package/dist/chunk-Q4MJCEDE.js +7 -0
- package/dist/chunk-Q4MJCEDE.js.map +1 -0
- package/dist/{chunk-PLP3YX6C.js → chunk-S5GLISQA.js} +2 -2
- package/dist/{chunk-XXJAE6AP.js → chunk-SWNFCQ4G.js} +3 -3
- package/dist/{chunk-LCGPLQLE.js → chunk-TU34FFWF.js} +8 -3
- package/dist/chunk-TU34FFWF.js.map +1 -0
- package/dist/{config.context.d-BvU9r-Mg.d.ts → config.context.d-BniMHSBB.d.ts} +3 -2
- package/dist/corrections.d.ts +17 -7
- package/dist/corrections.js +8 -8
- package/dist/elements.d.ts +54 -12
- package/dist/elements.js +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15 -13
- package/dist/interactions.d.ts +17 -5
- package/dist/interactions.js +3 -3
- package/dist/item.css +69 -24
- package/dist/item.d.ts +3 -3
- package/dist/item.js +4 -4
- package/dist/loader.d.ts +1 -1
- package/dist/processing.d.ts +8 -4
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +323 -108
- package/dist/{qti-item.d-B1gffYCL.d.ts → qti-item.d-BqWYBdV2.d.ts} +1 -1
- package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
- package/dist/{qti-test.d-D5C7W8Lg.d.ts → qti-test.d-C0I1BIdH.d.ts} +58 -6
- package/dist/{qti-text-entry-interaction.d-CU-fAAD1.d.ts → qti-text-entry-interaction.d-V4sWE9TO.d.ts} +37 -9
- package/dist/{record.d-wB9uYs-j.d.ts → record.d-C6m0Y4xr.d.ts} +1 -1
- package/dist/test.d.ts +8 -5
- package/dist/test.js +7 -5
- package/package.json +10 -10
- package/dist/chunk-5K5JO7OG.js.map +0 -1
- package/dist/chunk-LCGPLQLE.js.map +0 -1
- package/dist/chunk-O76BOKAP.js.map +0 -1
- package/dist/chunk-OHRAG2UM.js.map +0 -1
- package/dist/chunk-T7YSBBAA.js.map +0 -1
- package/dist/chunk-YKXVAXSI.js +0 -7
- package/dist/chunk-YKXVAXSI.js.map +0 -1
- package/dist/chunk-YOCOLMGB.js.map +0 -1
- /package/dist/{chunk-AVZRY5SQ.js.map → chunk-BZPMN57E.js.map} +0 -0
- /package/dist/{chunk-RWMY7KRT.js.map → chunk-HGKLF7SP.js.map} +0 -0
- /package/dist/{chunk-AJ5U5KXR.js.map → chunk-LEF7AAYZ.js.map} +0 -0
- /package/dist/{chunk-M7X6TWSX.js.map → chunk-NYNL5HSR.js.map} +0 -0
- /package/dist/{chunk-PLP3YX6C.js.map → chunk-S5GLISQA.js.map} +0 -0
- /package/dist/{chunk-XXJAE6AP.js.map → chunk-SWNFCQ4G.js.map} +0 -0
|
@@ -14,7 +14,6 @@ import type {
|
|
|
14
14
|
import type {
|
|
15
15
|
QtiTemplateConstraint,
|
|
16
16
|
QtiTemplateProcessing,
|
|
17
|
-
QtiResponseProcessing,
|
|
18
17
|
QtiAssessmentItem,
|
|
19
18
|
QtiAssessmentStimulus,
|
|
20
19
|
QtiAssessmentStimulusRef,
|
|
@@ -29,6 +28,7 @@ import type {
|
|
|
29
28
|
QtiModalFeedback,
|
|
30
29
|
QtiOutcomeDeclaration,
|
|
31
30
|
QtiResponseDeclaration,
|
|
31
|
+
QtiResponseProcessing,
|
|
32
32
|
QtiRubricBlock,
|
|
33
33
|
QtiStylesheet,
|
|
34
34
|
QtiTemplateDeclaration,
|
|
@@ -100,6 +100,7 @@ import type {
|
|
|
100
100
|
TestPrintContext,
|
|
101
101
|
TestPrintVariables,
|
|
102
102
|
formatVariableValue,
|
|
103
|
+
TestPrintState,
|
|
103
104
|
TestScoringButtons,
|
|
104
105
|
TestScoringFeedback,
|
|
105
106
|
TestStamp,
|
|
@@ -323,15 +324,6 @@ export type QtiTemplateProcessingSolidJsProps = {
|
|
|
323
324
|
textContent?: string | number | undefined;
|
|
324
325
|
};
|
|
325
326
|
|
|
326
|
-
export type QtiResponseProcessingProps = {};
|
|
327
|
-
|
|
328
|
-
export type QtiResponseProcessingSolidJsProps = {
|
|
329
|
-
/** Set the innerHTML of the element */
|
|
330
|
-
innerHTML?: string | undefined;
|
|
331
|
-
/** Set the textContent of the element */
|
|
332
|
-
textContent?: string | number | undefined;
|
|
333
|
-
};
|
|
334
|
-
|
|
335
327
|
export type QtiAssessmentItemProps = {
|
|
336
328
|
/** */
|
|
337
329
|
identifier?: QtiAssessmentItem["identifier"] | undefined;
|
|
@@ -360,7 +352,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
360
352
|
|
|
361
353
|
/** */
|
|
362
354
|
"onqti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
363
|
-
/**
|
|
355
|
+
/** */
|
|
364
356
|
"onqti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
365
357
|
};
|
|
366
358
|
|
|
@@ -393,7 +385,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
393
385
|
"prop:responses"?: QtiAssessmentItem["responses"] | undefined;
|
|
394
386
|
/** */
|
|
395
387
|
"on:qti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
396
|
-
/**
|
|
388
|
+
/** */
|
|
397
389
|
"on:qti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
398
390
|
|
|
399
391
|
/** Set the innerHTML of the element */
|
|
@@ -470,15 +462,11 @@ export type QtiContextDeclarationSolidJsProps = {
|
|
|
470
462
|
export type QtiCustomOperatorProps = {
|
|
471
463
|
/** */
|
|
472
464
|
"onqti-set-outcome-value"?: ((e: CustomEvent) => void) | undefined;
|
|
473
|
-
/** */
|
|
474
|
-
"onqti-interaction-response"?: ((e: CustomEvent) => void) | undefined;
|
|
475
465
|
};
|
|
476
466
|
|
|
477
467
|
export type QtiCustomOperatorSolidJsProps = {
|
|
478
468
|
/** */
|
|
479
469
|
"on:qti-set-outcome-value"?: ((e: CustomEvent) => void) | undefined;
|
|
480
|
-
/** */
|
|
481
|
-
"on:qti-interaction-response"?: ((e: CustomEvent) => void) | undefined;
|
|
482
470
|
|
|
483
471
|
/** Set the innerHTML of the element */
|
|
484
472
|
innerHTML?: string | undefined;
|
|
@@ -682,6 +670,15 @@ export type QtiResponseDeclarationSolidJsProps = {
|
|
|
682
670
|
textContent?: string | number | undefined;
|
|
683
671
|
};
|
|
684
672
|
|
|
673
|
+
export type QtiResponseProcessingProps = {};
|
|
674
|
+
|
|
675
|
+
export type QtiResponseProcessingSolidJsProps = {
|
|
676
|
+
/** Set the innerHTML of the element */
|
|
677
|
+
innerHTML?: string | undefined;
|
|
678
|
+
/** Set the textContent of the element */
|
|
679
|
+
textContent?: string | number | undefined;
|
|
680
|
+
};
|
|
681
|
+
|
|
685
682
|
export type QtiRubricBlockProps = {
|
|
686
683
|
/** */
|
|
687
684
|
id?: QtiRubricBlock["id"] | undefined;
|
|
@@ -1625,9 +1622,17 @@ export type QtiEndAttemptInteractionProps = {
|
|
|
1625
1622
|
| undefined;
|
|
1626
1623
|
/** */
|
|
1627
1624
|
disabled?: QtiEndAttemptInteraction["disabled"] | undefined;
|
|
1628
|
-
/**
|
|
1625
|
+
/** Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
1626
|
+
uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
1627
|
+
should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
1628
|
+
as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
1629
|
+
[More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction) */
|
|
1629
1630
|
"count-attempt"?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1630
|
-
/**
|
|
1631
|
+
/** Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
1632
|
+
uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
1633
|
+
should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
1634
|
+
as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
1635
|
+
[More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction) */
|
|
1631
1636
|
countAttempt?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1632
1637
|
/** */
|
|
1633
1638
|
title?: QtiEndAttemptInteraction["title"] | undefined;
|
|
@@ -1647,9 +1652,17 @@ export type QtiEndAttemptInteractionSolidJsProps = {
|
|
|
1647
1652
|
| undefined;
|
|
1648
1653
|
/** */
|
|
1649
1654
|
"prop:disabled"?: QtiEndAttemptInteraction["disabled"] | undefined;
|
|
1650
|
-
/**
|
|
1655
|
+
/** Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
1656
|
+
uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
1657
|
+
should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
1658
|
+
as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
1659
|
+
[More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction) */
|
|
1651
1660
|
"attr:count-attempt"?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1652
|
-
/**
|
|
1661
|
+
/** Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
1662
|
+
uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
1663
|
+
should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
1664
|
+
as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
1665
|
+
[More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction) */
|
|
1653
1666
|
"prop:countAttempt"?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1654
1667
|
/** */
|
|
1655
1668
|
"prop:title"?: QtiEndAttemptInteraction["title"] | undefined;
|
|
@@ -2598,7 +2611,8 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2598
2611
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2599
2612
|
re-renders, which reading `dataset` at render time never did.
|
|
2600
2613
|
|
|
2601
|
-
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
2614
|
+
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
2615
|
+
string is a value, not a missing one: `data-prompt=""` shows an empty placeholder. */
|
|
2602
2616
|
"data-prompt"?: QtiInlineChoiceInteraction["dataPrompt"] | undefined;
|
|
2603
2617
|
/** Placeholder shown in the closed combobox before a choice is picked.
|
|
2604
2618
|
|
|
@@ -2606,8 +2620,15 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2606
2620
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2607
2621
|
re-renders, which reading `dataset` at render time never did.
|
|
2608
2622
|
|
|
2609
|
-
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
2623
|
+
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
2624
|
+
string is a value, not a missing one: `data-prompt=""` shows an empty placeholder. */
|
|
2610
2625
|
dataPrompt?: QtiInlineChoiceInteraction["dataPrompt"] | undefined;
|
|
2626
|
+
/** Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
2627
|
+
been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`. */
|
|
2628
|
+
"data-clear-label"?: QtiInlineChoiceInteraction["dataClearLabel"] | undefined;
|
|
2629
|
+
/** Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
2630
|
+
been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`. */
|
|
2631
|
+
dataClearLabel?: QtiInlineChoiceInteraction["dataClearLabel"] | undefined;
|
|
2611
2632
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
2612
2633
|
shuffle?: unknown | undefined;
|
|
2613
2634
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
@@ -2692,7 +2713,8 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2692
2713
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2693
2714
|
re-renders, which reading `dataset` at render time never did.
|
|
2694
2715
|
|
|
2695
|
-
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
2716
|
+
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
2717
|
+
string is a value, not a missing one: `data-prompt=""` shows an empty placeholder. */
|
|
2696
2718
|
"attr:data-prompt"?: QtiInlineChoiceInteraction["dataPrompt"] | undefined;
|
|
2697
2719
|
/** Placeholder shown in the closed combobox before a choice is picked.
|
|
2698
2720
|
|
|
@@ -2700,8 +2722,19 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2700
2722
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2701
2723
|
re-renders, which reading `dataset` at render time never did.
|
|
2702
2724
|
|
|
2703
|
-
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
2725
|
+
Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
2726
|
+
string is a value, not a missing one: `data-prompt=""` shows an empty placeholder. */
|
|
2704
2727
|
"prop:dataPrompt"?: QtiInlineChoiceInteraction["dataPrompt"] | undefined;
|
|
2728
|
+
/** Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
2729
|
+
been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`. */
|
|
2730
|
+
"attr:data-clear-label"?:
|
|
2731
|
+
| QtiInlineChoiceInteraction["dataClearLabel"]
|
|
2732
|
+
| undefined;
|
|
2733
|
+
/** Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
2734
|
+
been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`. */
|
|
2735
|
+
"prop:dataClearLabel"?:
|
|
2736
|
+
| QtiInlineChoiceInteraction["dataClearLabel"]
|
|
2737
|
+
| undefined;
|
|
2705
2738
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
2706
2739
|
"bool:shuffle"?: unknown | undefined;
|
|
2707
2740
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
@@ -4626,16 +4659,28 @@ object, do not mutate it: an in-place change does not notify the components insi
|
|
|
4626
4659
|
};
|
|
4627
4660
|
|
|
4628
4661
|
export type TestEndAttemptProps = {
|
|
4629
|
-
/**
|
|
4662
|
+
/** Ends no attempt until the response is valid and not the default, whatever the item's `allow-skipping` says. */
|
|
4663
|
+
"require-answer"?: TestEndAttempt["requireAnswer"] | undefined;
|
|
4664
|
+
/** Ends no attempt until the response is valid and not the default, whatever the item's `allow-skipping` says. */
|
|
4665
|
+
requireAnswer?: TestEndAttempt["requireAnswer"] | undefined;
|
|
4666
|
+
/** The item-ref identifier whose attempt this button ends; without it, the item it is stamped into, or else the one on screen. */
|
|
4667
|
+
item?: TestEndAttempt["item"] | undefined;
|
|
4668
|
+
/** Reflected: the item's attempt cannot be ended. */
|
|
4630
4669
|
disabled?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4631
|
-
/**
|
|
4670
|
+
/** Reflected: the item's attempt cannot be ended. */
|
|
4632
4671
|
_internalDisabled?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4633
4672
|
};
|
|
4634
4673
|
|
|
4635
4674
|
export type TestEndAttemptSolidJsProps = {
|
|
4636
|
-
/**
|
|
4675
|
+
/** Ends no attempt until the response is valid and not the default, whatever the item's `allow-skipping` says. */
|
|
4676
|
+
"bool:require-answer"?: TestEndAttempt["requireAnswer"] | undefined;
|
|
4677
|
+
/** Ends no attempt until the response is valid and not the default, whatever the item's `allow-skipping` says. */
|
|
4678
|
+
"prop:requireAnswer"?: TestEndAttempt["requireAnswer"] | undefined;
|
|
4679
|
+
/** The item-ref identifier whose attempt this button ends; without it, the item it is stamped into, or else the one on screen. */
|
|
4680
|
+
"prop:item"?: TestEndAttempt["item"] | undefined;
|
|
4681
|
+
/** Reflected: the item's attempt cannot be ended. */
|
|
4637
4682
|
"bool:disabled"?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4638
|
-
/**
|
|
4683
|
+
/** Reflected: the item's attempt cannot be ended. */
|
|
4639
4684
|
"prop:_internalDisabled"?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4640
4685
|
|
|
4641
4686
|
/** Set the innerHTML of the element */
|
|
@@ -4860,6 +4905,15 @@ export type TestPrintVariablesSolidJsProps = {
|
|
|
4860
4905
|
textContent?: string | number | undefined;
|
|
4861
4906
|
};
|
|
4862
4907
|
|
|
4908
|
+
export type TestPrintStateProps = {};
|
|
4909
|
+
|
|
4910
|
+
export type TestPrintStateSolidJsProps = {
|
|
4911
|
+
/** Set the innerHTML of the element */
|
|
4912
|
+
innerHTML?: string | undefined;
|
|
4913
|
+
/** Set the textContent of the element */
|
|
4914
|
+
textContent?: string | number | undefined;
|
|
4915
|
+
};
|
|
4916
|
+
|
|
4863
4917
|
export type TestScoringButtonsProps = {
|
|
4864
4918
|
/** */
|
|
4865
4919
|
view?: TestScoringButtons["view"] | undefined;
|
|
@@ -6311,7 +6365,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
6311
6365
|
|
|
6312
6366
|
/** */
|
|
6313
6367
|
"onqti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
6314
|
-
/**
|
|
6368
|
+
/** */
|
|
6315
6369
|
"onqti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
6316
6370
|
};
|
|
6317
6371
|
|
|
@@ -6348,7 +6402,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
6348
6402
|
"prop:responses"?: QtiAssessmentItemCorrection["responses"] | undefined;
|
|
6349
6403
|
/** */
|
|
6350
6404
|
"on:qti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
6351
|
-
/**
|
|
6405
|
+
/** */
|
|
6352
6406
|
"on:qti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
6353
6407
|
|
|
6354
6408
|
/** Set the innerHTML of the element */
|
|
@@ -6638,8 +6692,10 @@ export type TestShowCorrectResponseProps = {
|
|
|
6638
6692
|
| undefined;
|
|
6639
6693
|
/** */
|
|
6640
6694
|
computedContext?: TestShowCorrectResponse["computedContext"] | undefined;
|
|
6641
|
-
|
|
6642
6695
|
/** */
|
|
6696
|
+
role?: TestShowCorrectResponse["role"] | undefined;
|
|
6697
|
+
|
|
6698
|
+
/** `detail` is `true` to show the correct response, `false` to hide it. */
|
|
6643
6699
|
"ontest-show-correct-response"?: ((e: CustomEvent) => void) | undefined;
|
|
6644
6700
|
};
|
|
6645
6701
|
|
|
@@ -6665,6 +6721,8 @@ export type TestShowCorrectResponseSolidJsProps = {
|
|
|
6665
6721
|
| TestShowCorrectResponse["computedContext"]
|
|
6666
6722
|
| undefined;
|
|
6667
6723
|
/** */
|
|
6724
|
+
"prop:role"?: TestShowCorrectResponse["role"] | undefined;
|
|
6725
|
+
/** `detail` is `true` to show the correct response, `false` to hide it. */
|
|
6668
6726
|
"on:test-show-correct-response"?: ((e: CustomEvent) => void) | undefined;
|
|
6669
6727
|
|
|
6670
6728
|
/** Set the innerHTML of the element */
|
|
@@ -6713,19 +6771,6 @@ export type CustomElements = {
|
|
|
6713
6771
|
QtiTemplateProcessingProps & BaseProps<QtiTemplateProcessing> & BaseEvents
|
|
6714
6772
|
>;
|
|
6715
6773
|
|
|
6716
|
-
/**
|
|
6717
|
-
*
|
|
6718
|
-
*
|
|
6719
|
-
* ## Methods
|
|
6720
|
-
*
|
|
6721
|
-
* Methods that can be called to access component functionality.
|
|
6722
|
-
*
|
|
6723
|
-
* - `process() => void`: undefined
|
|
6724
|
-
*/
|
|
6725
|
-
"qti-response-processing": Partial<
|
|
6726
|
-
QtiResponseProcessingProps & BaseProps<QtiResponseProcessing> & BaseEvents
|
|
6727
|
-
>;
|
|
6728
|
-
|
|
6729
6774
|
/**
|
|
6730
6775
|
*
|
|
6731
6776
|
*
|
|
@@ -6753,13 +6798,18 @@ export type CustomElements = {
|
|
|
6753
6798
|
* Events that will be emitted by the component.
|
|
6754
6799
|
*
|
|
6755
6800
|
* - `qti-assessment-item-connected`: undefined
|
|
6756
|
-
* - `qti-item-context-updated`:
|
|
6801
|
+
* - `qti-item-context-updated`: undefined
|
|
6757
6802
|
*
|
|
6758
6803
|
* ## Methods
|
|
6759
6804
|
*
|
|
6760
6805
|
* Methods that can be called to access component functionality.
|
|
6761
6806
|
*
|
|
6762
|
-
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) =>
|
|
6807
|
+
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) => void`: Scores the attempt. The item does not score itself: its response processing does, like a
|
|
6808
|
+
* backend, and sends the outcomes back in `cito-item-set-outcomes`, which the item applies in one
|
|
6809
|
+
* update. The item keeps the attempt count (QTI info model §2.2.2: the delivery engine maintains
|
|
6810
|
+
* numAttempts) and hands the new count to the run, whose rules may read it. Without response
|
|
6811
|
+
* processing the item only counts the attempt. A run that throws still counts the attempt and applies
|
|
6812
|
+
* no outcomes.
|
|
6763
6813
|
* - `resetResponses() => void`: undefined
|
|
6764
6814
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
6765
6815
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -6872,7 +6922,6 @@ export type CustomElements = {
|
|
|
6872
6922
|
* Events that will be emitted by the component.
|
|
6873
6923
|
*
|
|
6874
6924
|
* - `qti-set-outcome-value`: undefined
|
|
6875
|
-
* - `qti-interaction-response`: undefined
|
|
6876
6925
|
*
|
|
6877
6926
|
* ## Methods
|
|
6878
6927
|
*
|
|
@@ -7026,6 +7075,25 @@ export type CustomElements = {
|
|
|
7026
7075
|
QtiResponseDeclarationProps & BaseProps<QtiResponseDeclaration> & BaseEvents
|
|
7027
7076
|
>;
|
|
7028
7077
|
|
|
7078
|
+
/**
|
|
7079
|
+
* Response processing as the item's own backend: it reads the item context, runs its rules once and
|
|
7080
|
+
* sends the outcomes and the attempt count back in one `cito-item-set-outcomes`. The item applies
|
|
7081
|
+
* them; a host that scores elsewhere sends the same event instead.
|
|
7082
|
+
*
|
|
7083
|
+
* ## Methods
|
|
7084
|
+
*
|
|
7085
|
+
* Methods that can be called to access component functionality.
|
|
7086
|
+
*
|
|
7087
|
+
* - `processResponse({ numAttempts }: { numAttempts: number }) => void`: Scores the attempt on the copy: sets `numAttempts` to the count the item hands over, resets a
|
|
7088
|
+
* non-adaptive item's outcomes to their defaults (QTI info model §2.5), runs the rules and sends
|
|
7089
|
+
* every outcome and `numAttempts` in one `cito-item-set-outcomes`. The item applies them and publishes, which gives this element a
|
|
7090
|
+
* fresh copy. A rule that throws ends the run and the error propagates; nothing is sent, and the
|
|
7091
|
+
* run's writes stay in the copy until the item's next update.
|
|
7092
|
+
*/
|
|
7093
|
+
"qti-response-processing": Partial<
|
|
7094
|
+
QtiResponseProcessingProps & BaseProps<QtiResponseProcessing> & BaseEvents
|
|
7095
|
+
>;
|
|
7096
|
+
|
|
7029
7097
|
/**
|
|
7030
7098
|
*
|
|
7031
7099
|
*
|
|
@@ -7668,13 +7736,21 @@ export type CustomElements = {
|
|
|
7668
7736
|
/**
|
|
7669
7737
|
* A button that ends the current attempt.
|
|
7670
7738
|
*
|
|
7739
|
+
* It follows its item: it cannot be pressed while the item is `disabled` or `readonly`, or once an
|
|
7740
|
+
* adaptive item is done. An adaptive item that sets `completionStatus` to `completed` closes its
|
|
7741
|
+
* session, so no further attempt can start (QTI info model §2.5).
|
|
7742
|
+
*
|
|
7671
7743
|
* ## Attributes & Properties
|
|
7672
7744
|
*
|
|
7673
7745
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
7674
7746
|
*
|
|
7675
7747
|
* - `response-identifier`/`responseIdentifier`: undefined
|
|
7676
7748
|
* - `disabled`: undefined
|
|
7677
|
-
* - `count-attempt`/`countAttempt`:
|
|
7749
|
+
* - `count-attempt`/`countAttempt`: Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
7750
|
+
* uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
7751
|
+
* should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
7752
|
+
* as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
7753
|
+
* [More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction)
|
|
7678
7754
|
* - `title`: undefined
|
|
7679
7755
|
*
|
|
7680
7756
|
* ## Events
|
|
@@ -8278,7 +8354,10 @@ export type CustomElements = {
|
|
|
8278
8354
|
* manifest, the generated types and the Storybook controls — and so that changing it
|
|
8279
8355
|
* re-renders, which reading `dataset` at render time never did.
|
|
8280
8356
|
*
|
|
8281
|
-
* Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
8357
|
+
* Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
8358
|
+
* string is a value, not a missing one: `data-prompt=""` shows an empty placeholder.
|
|
8359
|
+
* - `data-clear-label`/`dataClearLabel`: Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
8360
|
+
* been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`.
|
|
8282
8361
|
* - `shuffle`/`undefined`: Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element.
|
|
8283
8362
|
* - `required`: Whether a choice must be selected for the response to be valid. QTI defaults this to
|
|
8284
8363
|
* false, so an untouched dropdown is a valid empty response unless an author opts in.
|
|
@@ -8342,13 +8421,20 @@ export type CustomElements = {
|
|
|
8342
8421
|
*
|
|
8343
8422
|
* Methods that can be called to access component functionality.
|
|
8344
8423
|
*
|
|
8345
|
-
* - `
|
|
8346
|
-
*
|
|
8424
|
+
* - `menuAutoSizeRows() => HTMLElement[]`: Leaves the prompt row out of the width measurement when the prompt is empty. That row is hidden
|
|
8425
|
+
* while nothing is chosen (measures 0) and a clear glyph once something is (measures a glyph), so
|
|
8426
|
+
* counting it would let the closed field change width on the first choice. Its text is empty
|
|
8427
|
+
* either way, so it has nothing to contribute.
|
|
8428
|
+
* - `shouldAutoSizeMenu() => boolean`: Autosizing is on unless a host turns it off (`configContext.inlineChoiceAutosize: false`), and an
|
|
8429
|
+
* explicit `qti-input-width-*` class always wins. On by default because without it the field sizes
|
|
8430
|
+
* to the option shown, so choosing a longer one widened the field and reflowed the sentence around
|
|
8431
|
+
* it: a state that changed layout.
|
|
8347
8432
|
*
|
|
8348
8433
|
* That second check has to live here rather than in CSS: the measurement is written as an inline
|
|
8349
8434
|
* style on the trigger, and the width classes set the same property on `:host`, so the cascade
|
|
8350
8435
|
* would hand it to the measurement every time. Not writing at all is what makes the class win.
|
|
8351
|
-
* - `menuAutoSizeExtraWidth() => number`: The chevron sits in the trigger and not in the menu, so the menu never
|
|
8436
|
+
* - `menuAutoSizeExtraWidth() => number`: The chevron (and the gap before it) sits in the trigger and not in the menu, so the menu never
|
|
8437
|
+
* measures it.
|
|
8352
8438
|
*
|
|
8353
8439
|
* `offsetWidth`, NOT `getBoundingClientRect().width`: the icon rotates when the menu opens, and a
|
|
8354
8440
|
* client rect reports the TRANSFORMED box — so a chevron caught mid-rotation measures wider than
|
|
@@ -8359,11 +8445,6 @@ export type CustomElements = {
|
|
|
8359
8445
|
* - `reportValidity() => boolean`: undefined
|
|
8360
8446
|
* - `reset() => void`: undefined
|
|
8361
8447
|
* - `menuAutoSizePropertyTarget() => HTMLElement | null`: Where the measured width is written. Inside the shadow root — see the header.
|
|
8362
|
-
* - `menuAutoSizeRows() => HTMLElement[]`: The menu's rows, which is what actually gets measured — one at a time.
|
|
8363
|
-
*
|
|
8364
|
-
* Flat tree, so a `<slot>` is replaced by the elements assigned to it: in the shipped control the
|
|
8365
|
-
* prompt is rendered in the shadow root and the author's options are slotted light DOM, and both
|
|
8366
|
-
* are rows of the same list.
|
|
8367
8448
|
* - `withMenuMeasurable(measure: () => T) => T`: Make the rows measurable, run `measure`, and put everything back.
|
|
8368
8449
|
*
|
|
8369
8450
|
* A hook, because hosts hide their menu differently and a measurement needs layout. The default
|
|
@@ -8385,8 +8466,9 @@ export type CustomElements = {
|
|
|
8385
8466
|
* - `value`: The currently displayed value inside the trigger.
|
|
8386
8467
|
* - `dropdown-icon`: The chevron icon inside the trigger; also carries `dropdown-icon-open` when open.
|
|
8387
8468
|
* - `menu`: The popover element containing the option list.
|
|
8388
|
-
* - `option`: Each option button; also carries `option-prompt` and `option-
|
|
8469
|
+
* - `option`: Each option button; also carries `option-prompt`, `option-selected` and `option-clear` (the prompt row as a clear button, see `data-clear-label`) variants.
|
|
8389
8470
|
* - `option-content`: The content wrapper inside each option.
|
|
8471
|
+
* - `clear-icon`: The x glyph inside the clear row.
|
|
8390
8472
|
*/
|
|
8391
8473
|
"qti-inline-choice-interaction": Partial<
|
|
8392
8474
|
QtiInlineChoiceInteractionProps &
|
|
@@ -9594,13 +9676,34 @@ export type CustomElements = {
|
|
|
9594
9676
|
"qti-test": Partial<QtiTestProps & BaseProps<QtiTest> & BaseEvents>;
|
|
9595
9677
|
|
|
9596
9678
|
/**
|
|
9679
|
+
* A button that ends the attempt of an item: its response is processed, `numAttempts` goes up and
|
|
9680
|
+
* feedback is shown as the item's session control allows. It dispatches `cito-test-end-attempt`,
|
|
9681
|
+
* which `<test-navigation>` handles.
|
|
9597
9682
|
*
|
|
9683
|
+
* Put it inside `<test-navigation>`, either in the toolbar, where it ends the attempt of the item on
|
|
9684
|
+
* screen, or in the `<template item-ref>`, where each item gets its own and it ends the attempt of
|
|
9685
|
+
* that item: with `<qti-test navigate="section">` every item of the section is on screen, each with
|
|
9686
|
+
* its own button. Give it an `item` (an item-ref identifier) to end the attempt of that item instead,
|
|
9687
|
+
* wherever the button sits.
|
|
9688
|
+
*
|
|
9689
|
+
* It is `disabled` by the state of its item: when the attempts allowed by `max-attempts` are used
|
|
9690
|
+
* (non-adaptive items), when the last attempt was already optimal (non-adaptive items), when an
|
|
9691
|
+
* adaptive item is completed, or, when skipping is not allowed, while the response is invalid or
|
|
9692
|
+
* still the default.
|
|
9598
9693
|
*
|
|
9599
9694
|
* ## Attributes & Properties
|
|
9600
9695
|
*
|
|
9601
9696
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
9602
9697
|
*
|
|
9603
|
-
* - `
|
|
9698
|
+
* - `require-answer`/`requireAnswer`: Ends no attempt until the response is valid and not the default, whatever the item's `allow-skipping` says.
|
|
9699
|
+
* - `item`: The item-ref identifier whose attempt this button ends; without it, the item it is stamped into, or else the one on screen.
|
|
9700
|
+
* - `disabled`/`_internalDisabled`: Reflected: the item's attempt cannot be ended.
|
|
9701
|
+
*
|
|
9702
|
+
* ## Slots
|
|
9703
|
+
*
|
|
9704
|
+
* Areas where markup can be added to the component.
|
|
9705
|
+
*
|
|
9706
|
+
* - `(default)`: The label.
|
|
9604
9707
|
*
|
|
9605
9708
|
* ## Methods
|
|
9606
9709
|
*
|
|
@@ -9778,6 +9881,25 @@ export type CustomElements = {
|
|
|
9778
9881
|
TestPrintVariablesProps & BaseProps<TestPrintVariables> & BaseEvents
|
|
9779
9882
|
>;
|
|
9780
9883
|
|
|
9884
|
+
/**
|
|
9885
|
+
* Shows the test's state (`qtiTest.state`) as a tree you can fold open and shut, and keeps it current
|
|
9886
|
+
* on every `cito-test-state-changed`. A debug helper: drop it anywhere inside `<qti-test>`.
|
|
9887
|
+
*
|
|
9888
|
+
* The first two levels start open. A list entry with an `identifier` (an item, a variable) is labelled
|
|
9889
|
+
* by it. The element only lays out the tree; give it a font, colour and height from the page.
|
|
9890
|
+
*
|
|
9891
|
+
* ## CSS Parts
|
|
9892
|
+
*
|
|
9893
|
+
* Custom selectors for styling elements within the component.
|
|
9894
|
+
*
|
|
9895
|
+
* - `key`: the name of a field, or the label of a list entry
|
|
9896
|
+
* - `value`: a value that is not an object or a list
|
|
9897
|
+
* - `count`: the number of entries of a folded object or list
|
|
9898
|
+
*/
|
|
9899
|
+
"test-print-state": Partial<
|
|
9900
|
+
TestPrintStateProps & BaseProps<TestPrintState> & BaseEvents
|
|
9901
|
+
>;
|
|
9902
|
+
|
|
9781
9903
|
/**
|
|
9782
9904
|
*
|
|
9783
9905
|
*
|
|
@@ -11400,7 +11522,8 @@ export type CustomElements = {
|
|
|
11400
11522
|
*
|
|
11401
11523
|
* Methods that can be called to access component functionality.
|
|
11402
11524
|
*
|
|
11403
|
-
* - `shouldProcess() => boolean`:
|
|
11525
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
11526
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
11404
11527
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11405
11528
|
* - `process() => void`: undefined
|
|
11406
11529
|
*/
|
|
@@ -11415,7 +11538,8 @@ export type CustomElements = {
|
|
|
11415
11538
|
*
|
|
11416
11539
|
* Methods that can be called to access component functionality.
|
|
11417
11540
|
*
|
|
11418
|
-
* - `shouldProcess() => boolean`:
|
|
11541
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
11542
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
11419
11543
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11420
11544
|
* - `process() => void`: undefined
|
|
11421
11545
|
*/
|
|
@@ -11681,7 +11805,8 @@ export type CustomElements = {
|
|
|
11681
11805
|
*
|
|
11682
11806
|
* Methods that can be called to access component functionality.
|
|
11683
11807
|
*
|
|
11684
|
-
* - `shouldProcess() => boolean`:
|
|
11808
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
11809
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
11685
11810
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11686
11811
|
* - `process() => void`: undefined
|
|
11687
11812
|
*/
|
|
@@ -11696,7 +11821,8 @@ export type CustomElements = {
|
|
|
11696
11821
|
*
|
|
11697
11822
|
* Methods that can be called to access component functionality.
|
|
11698
11823
|
*
|
|
11699
|
-
* - `shouldProcess() => boolean`:
|
|
11824
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
11825
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
11700
11826
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11701
11827
|
* - `process() => void`: undefined
|
|
11702
11828
|
*/
|
|
@@ -12095,7 +12221,7 @@ export type CustomElements = {
|
|
|
12095
12221
|
* Events that will be emitted by the component.
|
|
12096
12222
|
*
|
|
12097
12223
|
* - `qti-assessment-item-connected`: undefined
|
|
12098
|
-
* - `qti-item-context-updated`:
|
|
12224
|
+
* - `qti-item-context-updated`: undefined
|
|
12099
12225
|
*
|
|
12100
12226
|
* ## Methods
|
|
12101
12227
|
*
|
|
@@ -12103,7 +12229,12 @@ export type CustomElements = {
|
|
|
12103
12229
|
*
|
|
12104
12230
|
* - `showCorrectResponse(show: boolean) => void`: undefined
|
|
12105
12231
|
* - `showCandidateCorrection(show: boolean) => void`: undefined
|
|
12106
|
-
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) =>
|
|
12232
|
+
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) => void`: Scores the attempt. The item does not score itself: its response processing does, like a
|
|
12233
|
+
* backend, and sends the outcomes back in `cito-item-set-outcomes`, which the item applies in one
|
|
12234
|
+
* update. The item keeps the attempt count (QTI info model §2.2.2: the delivery engine maintains
|
|
12235
|
+
* numAttempts) and hands the new count to the run, whose rules may read it. Without response
|
|
12236
|
+
* processing the item only counts the attempt. A run that throws still counts the attempt and applies
|
|
12237
|
+
* no outcomes.
|
|
12107
12238
|
* - `resetResponses() => void`: undefined
|
|
12108
12239
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
12109
12240
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -12296,9 +12427,12 @@ export type CustomElements = {
|
|
|
12296
12427
|
>;
|
|
12297
12428
|
|
|
12298
12429
|
/**
|
|
12299
|
-
*
|
|
12300
|
-
*
|
|
12430
|
+
* A button that shows and hides the correct response of the active item. Put it inside
|
|
12431
|
+
* `<test-navigation>`: it reads the active item from there, and it is disabled when that item
|
|
12432
|
+
* declares no correct response or mapping. It switches back to "show" when the candidate moves on.
|
|
12301
12433
|
*
|
|
12434
|
+
* Needs the corrections build (`@citolab/qti-components/corrections`), whose `<test-navigation>`
|
|
12435
|
+
* passes the request to the active item's `showCorrectResponse(show)`.
|
|
12302
12436
|
*
|
|
12303
12437
|
* ## Attributes & Properties
|
|
12304
12438
|
*
|
|
@@ -12310,12 +12444,13 @@ export type CustomElements = {
|
|
|
12310
12444
|
* - `hideCorrectText`: undefined
|
|
12311
12445
|
* - `noCorrectResponseText`: undefined
|
|
12312
12446
|
* - `computedContext`: undefined (property only)
|
|
12447
|
+
* - `role`: undefined (property only)
|
|
12313
12448
|
*
|
|
12314
12449
|
* ## Events
|
|
12315
12450
|
*
|
|
12316
12451
|
* Events that will be emitted by the component.
|
|
12317
12452
|
*
|
|
12318
|
-
* - `test-show-correct-response`:
|
|
12453
|
+
* - `test-show-correct-response`: `detail` is `true` to show the correct response, `false` to hide it.
|
|
12319
12454
|
*/
|
|
12320
12455
|
"test-show-correct-response": Partial<
|
|
12321
12456
|
TestShowCorrectResponseProps &
|
|
@@ -12375,22 +12510,6 @@ export type CustomElementsSolidJs = {
|
|
|
12375
12510
|
BaseEvents
|
|
12376
12511
|
>;
|
|
12377
12512
|
|
|
12378
|
-
/**
|
|
12379
|
-
*
|
|
12380
|
-
*
|
|
12381
|
-
* ## Methods
|
|
12382
|
-
*
|
|
12383
|
-
* Methods that can be called to access component functionality.
|
|
12384
|
-
*
|
|
12385
|
-
* - `process() => void`: undefined
|
|
12386
|
-
*/
|
|
12387
|
-
"qti-response-processing": Partial<
|
|
12388
|
-
QtiResponseProcessingProps &
|
|
12389
|
-
QtiResponseProcessingSolidJsProps &
|
|
12390
|
-
BaseProps<QtiResponseProcessing> &
|
|
12391
|
-
BaseEvents
|
|
12392
|
-
>;
|
|
12393
|
-
|
|
12394
12513
|
/**
|
|
12395
12514
|
*
|
|
12396
12515
|
*
|
|
@@ -12418,13 +12537,18 @@ export type CustomElementsSolidJs = {
|
|
|
12418
12537
|
* Events that will be emitted by the component.
|
|
12419
12538
|
*
|
|
12420
12539
|
* - `qti-assessment-item-connected`: undefined
|
|
12421
|
-
* - `qti-item-context-updated`:
|
|
12540
|
+
* - `qti-item-context-updated`: undefined
|
|
12422
12541
|
*
|
|
12423
12542
|
* ## Methods
|
|
12424
12543
|
*
|
|
12425
12544
|
* Methods that can be called to access component functionality.
|
|
12426
12545
|
*
|
|
12427
|
-
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) =>
|
|
12546
|
+
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) => void`: Scores the attempt. The item does not score itself: its response processing does, like a
|
|
12547
|
+
* backend, and sends the outcomes back in `cito-item-set-outcomes`, which the item applies in one
|
|
12548
|
+
* update. The item keeps the attempt count (QTI info model §2.2.2: the delivery engine maintains
|
|
12549
|
+
* numAttempts) and hands the new count to the run, whose rules may read it. Without response
|
|
12550
|
+
* processing the item only counts the attempt. A run that throws still counts the attempt and applies
|
|
12551
|
+
* no outcomes.
|
|
12428
12552
|
* - `resetResponses() => void`: undefined
|
|
12429
12553
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
12430
12554
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -12551,7 +12675,6 @@ export type CustomElementsSolidJs = {
|
|
|
12551
12675
|
* Events that will be emitted by the component.
|
|
12552
12676
|
*
|
|
12553
12677
|
* - `qti-set-outcome-value`: undefined
|
|
12554
|
-
* - `qti-interaction-response`: undefined
|
|
12555
12678
|
*
|
|
12556
12679
|
* ## Methods
|
|
12557
12680
|
*
|
|
@@ -12726,6 +12849,28 @@ export type CustomElementsSolidJs = {
|
|
|
12726
12849
|
BaseEvents
|
|
12727
12850
|
>;
|
|
12728
12851
|
|
|
12852
|
+
/**
|
|
12853
|
+
* Response processing as the item's own backend: it reads the item context, runs its rules once and
|
|
12854
|
+
* sends the outcomes and the attempt count back in one `cito-item-set-outcomes`. The item applies
|
|
12855
|
+
* them; a host that scores elsewhere sends the same event instead.
|
|
12856
|
+
*
|
|
12857
|
+
* ## Methods
|
|
12858
|
+
*
|
|
12859
|
+
* Methods that can be called to access component functionality.
|
|
12860
|
+
*
|
|
12861
|
+
* - `processResponse({ numAttempts }: { numAttempts: number }) => void`: Scores the attempt on the copy: sets `numAttempts` to the count the item hands over, resets a
|
|
12862
|
+
* non-adaptive item's outcomes to their defaults (QTI info model §2.5), runs the rules and sends
|
|
12863
|
+
* every outcome and `numAttempts` in one `cito-item-set-outcomes`. The item applies them and publishes, which gives this element a
|
|
12864
|
+
* fresh copy. A rule that throws ends the run and the error propagates; nothing is sent, and the
|
|
12865
|
+
* run's writes stay in the copy until the item's next update.
|
|
12866
|
+
*/
|
|
12867
|
+
"qti-response-processing": Partial<
|
|
12868
|
+
QtiResponseProcessingProps &
|
|
12869
|
+
QtiResponseProcessingSolidJsProps &
|
|
12870
|
+
BaseProps<QtiResponseProcessing> &
|
|
12871
|
+
BaseEvents
|
|
12872
|
+
>;
|
|
12873
|
+
|
|
12729
12874
|
/**
|
|
12730
12875
|
*
|
|
12731
12876
|
*
|
|
@@ -13421,13 +13566,21 @@ export type CustomElementsSolidJs = {
|
|
|
13421
13566
|
/**
|
|
13422
13567
|
* A button that ends the current attempt.
|
|
13423
13568
|
*
|
|
13569
|
+
* It follows its item: it cannot be pressed while the item is `disabled` or `readonly`, or once an
|
|
13570
|
+
* adaptive item is done. An adaptive item that sets `completionStatus` to `completed` closes its
|
|
13571
|
+
* session, so no further attempt can start (QTI info model §2.5).
|
|
13572
|
+
*
|
|
13424
13573
|
* ## Attributes & Properties
|
|
13425
13574
|
*
|
|
13426
13575
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
13427
13576
|
*
|
|
13428
13577
|
* - `response-identifier`/`responseIdentifier`: undefined
|
|
13429
13578
|
* - `disabled`: undefined
|
|
13430
|
-
* - `count-attempt`/`countAttempt`:
|
|
13579
|
+
* - `count-attempt`/`countAttempt`: Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
13580
|
+
* uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
13581
|
+
* should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
13582
|
+
* as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
13583
|
+
* [More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction)
|
|
13431
13584
|
* - `title`: undefined
|
|
13432
13585
|
*
|
|
13433
13586
|
* ## Events
|
|
@@ -14045,7 +14198,10 @@ export type CustomElementsSolidJs = {
|
|
|
14045
14198
|
* manifest, the generated types and the Storybook controls — and so that changing it
|
|
14046
14199
|
* re-renders, which reading `dataset` at render time never did.
|
|
14047
14200
|
*
|
|
14048
|
-
* Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
14201
|
+
* Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
14202
|
+
* string is a value, not a missing one: `data-prompt=""` shows an empty placeholder.
|
|
14203
|
+
* - `data-clear-label`/`dataClearLabel`: Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
14204
|
+
* been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`.
|
|
14049
14205
|
* - `shuffle`/`undefined`: Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element.
|
|
14050
14206
|
* - `required`: Whether a choice must be selected for the response to be valid. QTI defaults this to
|
|
14051
14207
|
* false, so an untouched dropdown is a valid empty response unless an author opts in.
|
|
@@ -14109,13 +14265,20 @@ export type CustomElementsSolidJs = {
|
|
|
14109
14265
|
*
|
|
14110
14266
|
* Methods that can be called to access component functionality.
|
|
14111
14267
|
*
|
|
14112
|
-
* - `
|
|
14113
|
-
*
|
|
14268
|
+
* - `menuAutoSizeRows() => HTMLElement[]`: Leaves the prompt row out of the width measurement when the prompt is empty. That row is hidden
|
|
14269
|
+
* while nothing is chosen (measures 0) and a clear glyph once something is (measures a glyph), so
|
|
14270
|
+
* counting it would let the closed field change width on the first choice. Its text is empty
|
|
14271
|
+
* either way, so it has nothing to contribute.
|
|
14272
|
+
* - `shouldAutoSizeMenu() => boolean`: Autosizing is on unless a host turns it off (`configContext.inlineChoiceAutosize: false`), and an
|
|
14273
|
+
* explicit `qti-input-width-*` class always wins. On by default because without it the field sizes
|
|
14274
|
+
* to the option shown, so choosing a longer one widened the field and reflowed the sentence around
|
|
14275
|
+
* it: a state that changed layout.
|
|
14114
14276
|
*
|
|
14115
14277
|
* That second check has to live here rather than in CSS: the measurement is written as an inline
|
|
14116
14278
|
* style on the trigger, and the width classes set the same property on `:host`, so the cascade
|
|
14117
14279
|
* would hand it to the measurement every time. Not writing at all is what makes the class win.
|
|
14118
|
-
* - `menuAutoSizeExtraWidth() => number`: The chevron sits in the trigger and not in the menu, so the menu never
|
|
14280
|
+
* - `menuAutoSizeExtraWidth() => number`: The chevron (and the gap before it) sits in the trigger and not in the menu, so the menu never
|
|
14281
|
+
* measures it.
|
|
14119
14282
|
*
|
|
14120
14283
|
* `offsetWidth`, NOT `getBoundingClientRect().width`: the icon rotates when the menu opens, and a
|
|
14121
14284
|
* client rect reports the TRANSFORMED box — so a chevron caught mid-rotation measures wider than
|
|
@@ -14126,11 +14289,6 @@ export type CustomElementsSolidJs = {
|
|
|
14126
14289
|
* - `reportValidity() => boolean`: undefined
|
|
14127
14290
|
* - `reset() => void`: undefined
|
|
14128
14291
|
* - `menuAutoSizePropertyTarget() => HTMLElement | null`: Where the measured width is written. Inside the shadow root — see the header.
|
|
14129
|
-
* - `menuAutoSizeRows() => HTMLElement[]`: The menu's rows, which is what actually gets measured — one at a time.
|
|
14130
|
-
*
|
|
14131
|
-
* Flat tree, so a `<slot>` is replaced by the elements assigned to it: in the shipped control the
|
|
14132
|
-
* prompt is rendered in the shadow root and the author's options are slotted light DOM, and both
|
|
14133
|
-
* are rows of the same list.
|
|
14134
14292
|
* - `withMenuMeasurable(measure: () => T) => T`: Make the rows measurable, run `measure`, and put everything back.
|
|
14135
14293
|
*
|
|
14136
14294
|
* A hook, because hosts hide their menu differently and a measurement needs layout. The default
|
|
@@ -14152,8 +14310,9 @@ export type CustomElementsSolidJs = {
|
|
|
14152
14310
|
* - `value`: The currently displayed value inside the trigger.
|
|
14153
14311
|
* - `dropdown-icon`: The chevron icon inside the trigger; also carries `dropdown-icon-open` when open.
|
|
14154
14312
|
* - `menu`: The popover element containing the option list.
|
|
14155
|
-
* - `option`: Each option button; also carries `option-prompt` and `option-
|
|
14313
|
+
* - `option`: Each option button; also carries `option-prompt`, `option-selected` and `option-clear` (the prompt row as a clear button, see `data-clear-label`) variants.
|
|
14156
14314
|
* - `option-content`: The content wrapper inside each option.
|
|
14315
|
+
* - `clear-icon`: The x glyph inside the clear row.
|
|
14157
14316
|
*/
|
|
14158
14317
|
"qti-inline-choice-interaction": Partial<
|
|
14159
14318
|
QtiInlineChoiceInteractionProps &
|
|
@@ -15426,13 +15585,34 @@ export type CustomElementsSolidJs = {
|
|
|
15426
15585
|
>;
|
|
15427
15586
|
|
|
15428
15587
|
/**
|
|
15588
|
+
* A button that ends the attempt of an item: its response is processed, `numAttempts` goes up and
|
|
15589
|
+
* feedback is shown as the item's session control allows. It dispatches `cito-test-end-attempt`,
|
|
15590
|
+
* which `<test-navigation>` handles.
|
|
15429
15591
|
*
|
|
15592
|
+
* Put it inside `<test-navigation>`, either in the toolbar, where it ends the attempt of the item on
|
|
15593
|
+
* screen, or in the `<template item-ref>`, where each item gets its own and it ends the attempt of
|
|
15594
|
+
* that item: with `<qti-test navigate="section">` every item of the section is on screen, each with
|
|
15595
|
+
* its own button. Give it an `item` (an item-ref identifier) to end the attempt of that item instead,
|
|
15596
|
+
* wherever the button sits.
|
|
15597
|
+
*
|
|
15598
|
+
* It is `disabled` by the state of its item: when the attempts allowed by `max-attempts` are used
|
|
15599
|
+
* (non-adaptive items), when the last attempt was already optimal (non-adaptive items), when an
|
|
15600
|
+
* adaptive item is completed, or, when skipping is not allowed, while the response is invalid or
|
|
15601
|
+
* still the default.
|
|
15430
15602
|
*
|
|
15431
15603
|
* ## Attributes & Properties
|
|
15432
15604
|
*
|
|
15433
15605
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
15434
15606
|
*
|
|
15435
|
-
* - `
|
|
15607
|
+
* - `require-answer`/`requireAnswer`: Ends no attempt until the response is valid and not the default, whatever the item's `allow-skipping` says.
|
|
15608
|
+
* - `item`: The item-ref identifier whose attempt this button ends; without it, the item it is stamped into, or else the one on screen.
|
|
15609
|
+
* - `disabled`/`_internalDisabled`: Reflected: the item's attempt cannot be ended.
|
|
15610
|
+
*
|
|
15611
|
+
* ## Slots
|
|
15612
|
+
*
|
|
15613
|
+
* Areas where markup can be added to the component.
|
|
15614
|
+
*
|
|
15615
|
+
* - `(default)`: The label.
|
|
15436
15616
|
*
|
|
15437
15617
|
* ## Methods
|
|
15438
15618
|
*
|
|
@@ -15638,6 +15818,28 @@ export type CustomElementsSolidJs = {
|
|
|
15638
15818
|
BaseEvents
|
|
15639
15819
|
>;
|
|
15640
15820
|
|
|
15821
|
+
/**
|
|
15822
|
+
* Shows the test's state (`qtiTest.state`) as a tree you can fold open and shut, and keeps it current
|
|
15823
|
+
* on every `cito-test-state-changed`. A debug helper: drop it anywhere inside `<qti-test>`.
|
|
15824
|
+
*
|
|
15825
|
+
* The first two levels start open. A list entry with an `identifier` (an item, a variable) is labelled
|
|
15826
|
+
* by it. The element only lays out the tree; give it a font, colour and height from the page.
|
|
15827
|
+
*
|
|
15828
|
+
* ## CSS Parts
|
|
15829
|
+
*
|
|
15830
|
+
* Custom selectors for styling elements within the component.
|
|
15831
|
+
*
|
|
15832
|
+
* - `key`: the name of a field, or the label of a list entry
|
|
15833
|
+
* - `value`: a value that is not an object or a list
|
|
15834
|
+
* - `count`: the number of entries of a folded object or list
|
|
15835
|
+
*/
|
|
15836
|
+
"test-print-state": Partial<
|
|
15837
|
+
TestPrintStateProps &
|
|
15838
|
+
TestPrintStateSolidJsProps &
|
|
15839
|
+
BaseProps<TestPrintState> &
|
|
15840
|
+
BaseEvents
|
|
15841
|
+
>;
|
|
15842
|
+
|
|
15641
15843
|
/**
|
|
15642
15844
|
*
|
|
15643
15845
|
*
|
|
@@ -17418,7 +17620,8 @@ export type CustomElementsSolidJs = {
|
|
|
17418
17620
|
*
|
|
17419
17621
|
* Methods that can be called to access component functionality.
|
|
17420
17622
|
*
|
|
17421
|
-
* - `shouldProcess() => boolean`:
|
|
17623
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
17624
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
17422
17625
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17423
17626
|
* - `process() => void`: undefined
|
|
17424
17627
|
*/
|
|
@@ -17436,7 +17639,8 @@ export type CustomElementsSolidJs = {
|
|
|
17436
17639
|
*
|
|
17437
17640
|
* Methods that can be called to access component functionality.
|
|
17438
17641
|
*
|
|
17439
|
-
* - `shouldProcess() => boolean`:
|
|
17642
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
17643
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
17440
17644
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17441
17645
|
* - `process() => void`: undefined
|
|
17442
17646
|
*/
|
|
@@ -17731,7 +17935,8 @@ export type CustomElementsSolidJs = {
|
|
|
17731
17935
|
*
|
|
17732
17936
|
* Methods that can be called to access component functionality.
|
|
17733
17937
|
*
|
|
17734
|
-
* - `shouldProcess() => boolean`:
|
|
17938
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
17939
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
17735
17940
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17736
17941
|
* - `process() => void`: undefined
|
|
17737
17942
|
*/
|
|
@@ -17749,7 +17954,8 @@ export type CustomElementsSolidJs = {
|
|
|
17749
17954
|
*
|
|
17750
17955
|
* Methods that can be called to access component functionality.
|
|
17751
17956
|
*
|
|
17752
|
-
* - `shouldProcess() => boolean`:
|
|
17957
|
+
* - `shouldProcess() => boolean`: Variables and base values hold a boolean as the string `'true'` or `'false'`, and `'false'` is
|
|
17958
|
+
* truthy, so the condition applies only to `true` itself; `false` and NULL do not.
|
|
17753
17959
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17754
17960
|
* - `process() => void`: undefined
|
|
17755
17961
|
*/
|
|
@@ -18191,7 +18397,7 @@ export type CustomElementsSolidJs = {
|
|
|
18191
18397
|
* Events that will be emitted by the component.
|
|
18192
18398
|
*
|
|
18193
18399
|
* - `qti-assessment-item-connected`: undefined
|
|
18194
|
-
* - `qti-item-context-updated`:
|
|
18400
|
+
* - `qti-item-context-updated`: undefined
|
|
18195
18401
|
*
|
|
18196
18402
|
* ## Methods
|
|
18197
18403
|
*
|
|
@@ -18199,7 +18405,12 @@ export type CustomElementsSolidJs = {
|
|
|
18199
18405
|
*
|
|
18200
18406
|
* - `showCorrectResponse(show: boolean) => void`: undefined
|
|
18201
18407
|
* - `showCandidateCorrection(show: boolean) => void`: undefined
|
|
18202
|
-
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) =>
|
|
18408
|
+
* - `processResponse(countNumAttempts = true, reportValidityAfterScoring = true) => void`: Scores the attempt. The item does not score itself: its response processing does, like a
|
|
18409
|
+
* backend, and sends the outcomes back in `cito-item-set-outcomes`, which the item applies in one
|
|
18410
|
+
* update. The item keeps the attempt count (QTI info model §2.2.2: the delivery engine maintains
|
|
18411
|
+
* numAttempts) and hands the new count to the run, whose rules may read it. Without response
|
|
18412
|
+
* processing the item only counts the attempt. A run that throws still counts the attempt and applies
|
|
18413
|
+
* no outcomes.
|
|
18203
18414
|
* - `resetResponses() => void`: undefined
|
|
18204
18415
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
18205
18416
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -18404,9 +18615,12 @@ export type CustomElementsSolidJs = {
|
|
|
18404
18615
|
>;
|
|
18405
18616
|
|
|
18406
18617
|
/**
|
|
18407
|
-
*
|
|
18408
|
-
*
|
|
18618
|
+
* A button that shows and hides the correct response of the active item. Put it inside
|
|
18619
|
+
* `<test-navigation>`: it reads the active item from there, and it is disabled when that item
|
|
18620
|
+
* declares no correct response or mapping. It switches back to "show" when the candidate moves on.
|
|
18409
18621
|
*
|
|
18622
|
+
* Needs the corrections build (`@citolab/qti-components/corrections`), whose `<test-navigation>`
|
|
18623
|
+
* passes the request to the active item's `showCorrectResponse(show)`.
|
|
18410
18624
|
*
|
|
18411
18625
|
* ## Attributes & Properties
|
|
18412
18626
|
*
|
|
@@ -18418,12 +18632,13 @@ export type CustomElementsSolidJs = {
|
|
|
18418
18632
|
* - `hideCorrectText`: undefined
|
|
18419
18633
|
* - `noCorrectResponseText`: undefined
|
|
18420
18634
|
* - `computedContext`: undefined (property only)
|
|
18635
|
+
* - `role`: undefined (property only)
|
|
18421
18636
|
*
|
|
18422
18637
|
* ## Events
|
|
18423
18638
|
*
|
|
18424
18639
|
* Events that will be emitted by the component.
|
|
18425
18640
|
*
|
|
18426
|
-
* - `test-show-correct-response`:
|
|
18641
|
+
* - `test-show-correct-response`: `detail` is `true` to show the correct response, `false` to hide it.
|
|
18427
18642
|
*/
|
|
18428
18643
|
"test-show-correct-response": Partial<
|
|
18429
18644
|
TestShowCorrectResponseProps &
|