@citolab/qti-components 10.0.0-next.13 → 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 +383 -399
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/{chunk-Y5DZTCDP.js → chunk-6XRNX574.js} +224 -257
- package/dist/chunk-6XRNX574.js.map +1 -0
- package/dist/{chunk-G6LTYTJR.js → chunk-BZPMN57E.js} +2 -2
- package/dist/{chunk-AKX4YMWU.js → chunk-C7SYDLMG.js} +197 -93
- package/dist/chunk-C7SYDLMG.js.map +1 -0
- package/dist/{chunk-H3GITIPE.js → chunk-CCI3QMQA.js} +23 -7
- package/dist/chunk-CCI3QMQA.js.map +1 -0
- package/dist/{chunk-FLAD6SC6.js → chunk-HGKLF7SP.js} +2 -2
- package/dist/{chunk-K4WLYVDT.js → chunk-LEF7AAYZ.js} +2 -2
- package/dist/{chunk-HOGJ5ZNW.js → chunk-MP2SUN7J.js} +193 -86
- package/dist/chunk-MP2SUN7J.js.map +1 -0
- package/dist/{chunk-PHRHLDQB.js → chunk-NYNL5HSR.js} +2 -2
- package/dist/{chunk-WUIA4OOX.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-EIBGCCXH.js → chunk-S5GLISQA.js} +2 -2
- package/dist/{chunk-PYHKCIYN.js → chunk-SWNFCQ4G.js} +3 -3
- package/dist/{chunk-MDBNEEPH.js → chunk-TU34FFWF.js} +8 -3
- package/dist/chunk-TU34FFWF.js.map +1 -0
- package/dist/corrections.d.ts +3 -3
- package/dist/corrections.js +8 -8
- package/dist/elements.d.ts +54 -12
- package/dist/elements.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +13 -13
- package/dist/interactions.d.ts +15 -3
- package/dist/interactions.js +3 -3
- package/dist/item.css +33 -8
- package/dist/item.d.ts +1 -1
- 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 +245 -97
- package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
- package/dist/{qti-test.d-B6AGSQlk.d.ts → qti-test.d-C0I1BIdH.d.ts} +29 -3
- package/dist/{qti-text-entry-interaction.d-B44Z3qUG.d.ts → qti-text-entry-interaction.d-V4sWE9TO.d.ts} +31 -5
- package/dist/test.d.ts +3 -3
- package/dist/test.js +5 -5
- package/package.json +10 -10
- package/dist/chunk-AKX4YMWU.js.map +0 -1
- package/dist/chunk-DVLSXMXD.js +0 -7
- package/dist/chunk-DVLSXMXD.js.map +0 -1
- package/dist/chunk-H3GITIPE.js.map +0 -1
- package/dist/chunk-HOGJ5ZNW.js.map +0 -1
- package/dist/chunk-MDBNEEPH.js.map +0 -1
- package/dist/chunk-WUIA4OOX.js.map +0 -1
- package/dist/chunk-Y5DZTCDP.js.map +0 -1
- /package/dist/{chunk-G6LTYTJR.js.map → chunk-BZPMN57E.js.map} +0 -0
- /package/dist/{chunk-FLAD6SC6.js.map → chunk-HGKLF7SP.js.map} +0 -0
- /package/dist/{chunk-K4WLYVDT.js.map → chunk-LEF7AAYZ.js.map} +0 -0
- /package/dist/{chunk-PHRHLDQB.js.map → chunk-NYNL5HSR.js.map} +0 -0
- /package/dist/{chunk-EIBGCCXH.js.map → chunk-S5GLISQA.js.map} +0 -0
- /package/dist/{chunk-PYHKCIYN.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,
|
|
@@ -324,15 +324,6 @@ export type QtiTemplateProcessingSolidJsProps = {
|
|
|
324
324
|
textContent?: string | number | undefined;
|
|
325
325
|
};
|
|
326
326
|
|
|
327
|
-
export type QtiResponseProcessingProps = {};
|
|
328
|
-
|
|
329
|
-
export type QtiResponseProcessingSolidJsProps = {
|
|
330
|
-
/** Set the innerHTML of the element */
|
|
331
|
-
innerHTML?: string | undefined;
|
|
332
|
-
/** Set the textContent of the element */
|
|
333
|
-
textContent?: string | number | undefined;
|
|
334
|
-
};
|
|
335
|
-
|
|
336
327
|
export type QtiAssessmentItemProps = {
|
|
337
328
|
/** */
|
|
338
329
|
identifier?: QtiAssessmentItem["identifier"] | undefined;
|
|
@@ -361,7 +352,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
361
352
|
|
|
362
353
|
/** */
|
|
363
354
|
"onqti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
364
|
-
/**
|
|
355
|
+
/** */
|
|
365
356
|
"onqti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
366
357
|
};
|
|
367
358
|
|
|
@@ -394,7 +385,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
394
385
|
"prop:responses"?: QtiAssessmentItem["responses"] | undefined;
|
|
395
386
|
/** */
|
|
396
387
|
"on:qti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
397
|
-
/**
|
|
388
|
+
/** */
|
|
398
389
|
"on:qti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
399
390
|
|
|
400
391
|
/** Set the innerHTML of the element */
|
|
@@ -471,15 +462,11 @@ export type QtiContextDeclarationSolidJsProps = {
|
|
|
471
462
|
export type QtiCustomOperatorProps = {
|
|
472
463
|
/** */
|
|
473
464
|
"onqti-set-outcome-value"?: ((e: CustomEvent) => void) | undefined;
|
|
474
|
-
/** */
|
|
475
|
-
"onqti-interaction-response"?: ((e: CustomEvent) => void) | undefined;
|
|
476
465
|
};
|
|
477
466
|
|
|
478
467
|
export type QtiCustomOperatorSolidJsProps = {
|
|
479
468
|
/** */
|
|
480
469
|
"on:qti-set-outcome-value"?: ((e: CustomEvent) => void) | undefined;
|
|
481
|
-
/** */
|
|
482
|
-
"on:qti-interaction-response"?: ((e: CustomEvent) => void) | undefined;
|
|
483
470
|
|
|
484
471
|
/** Set the innerHTML of the element */
|
|
485
472
|
innerHTML?: string | undefined;
|
|
@@ -683,6 +670,15 @@ export type QtiResponseDeclarationSolidJsProps = {
|
|
|
683
670
|
textContent?: string | number | undefined;
|
|
684
671
|
};
|
|
685
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
|
+
|
|
686
682
|
export type QtiRubricBlockProps = {
|
|
687
683
|
/** */
|
|
688
684
|
id?: QtiRubricBlock["id"] | undefined;
|
|
@@ -1626,9 +1622,17 @@ export type QtiEndAttemptInteractionProps = {
|
|
|
1626
1622
|
| undefined;
|
|
1627
1623
|
/** */
|
|
1628
1624
|
disabled?: QtiEndAttemptInteraction["disabled"] | undefined;
|
|
1629
|
-
/**
|
|
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) */
|
|
1630
1630
|
"count-attempt"?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1631
|
-
/**
|
|
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) */
|
|
1632
1636
|
countAttempt?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1633
1637
|
/** */
|
|
1634
1638
|
title?: QtiEndAttemptInteraction["title"] | undefined;
|
|
@@ -1648,9 +1652,17 @@ export type QtiEndAttemptInteractionSolidJsProps = {
|
|
|
1648
1652
|
| undefined;
|
|
1649
1653
|
/** */
|
|
1650
1654
|
"prop:disabled"?: QtiEndAttemptInteraction["disabled"] | undefined;
|
|
1651
|
-
/**
|
|
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) */
|
|
1652
1660
|
"attr:count-attempt"?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1653
|
-
/**
|
|
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) */
|
|
1654
1666
|
"prop:countAttempt"?: QtiEndAttemptInteraction["countAttempt"] | undefined;
|
|
1655
1667
|
/** */
|
|
1656
1668
|
"prop:title"?: QtiEndAttemptInteraction["title"] | undefined;
|
|
@@ -2599,7 +2611,8 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2599
2611
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2600
2612
|
re-renders, which reading `dataset` at render time never did.
|
|
2601
2613
|
|
|
2602
|
-
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. */
|
|
2603
2616
|
"data-prompt"?: QtiInlineChoiceInteraction["dataPrompt"] | undefined;
|
|
2604
2617
|
/** Placeholder shown in the closed combobox before a choice is picked.
|
|
2605
2618
|
|
|
@@ -2607,8 +2620,15 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2607
2620
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2608
2621
|
re-renders, which reading `dataset` at render time never did.
|
|
2609
2622
|
|
|
2610
|
-
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. */
|
|
2611
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;
|
|
2612
2632
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
2613
2633
|
shuffle?: unknown | undefined;
|
|
2614
2634
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
@@ -2693,7 +2713,8 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2693
2713
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2694
2714
|
re-renders, which reading `dataset` at render time never did.
|
|
2695
2715
|
|
|
2696
|
-
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. */
|
|
2697
2718
|
"attr:data-prompt"?: QtiInlineChoiceInteraction["dataPrompt"] | undefined;
|
|
2698
2719
|
/** Placeholder shown in the closed combobox before a choice is picked.
|
|
2699
2720
|
|
|
@@ -2701,8 +2722,19 @@ Declared rather than read straight off `dataset` so it reaches the custom elemen
|
|
|
2701
2722
|
manifest, the generated types and the Storybook controls — and so that changing it
|
|
2702
2723
|
re-renders, which reading `dataset` at render time never did.
|
|
2703
2724
|
|
|
2704
|
-
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. */
|
|
2705
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;
|
|
2706
2738
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
2707
2739
|
"bool:shuffle"?: unknown | undefined;
|
|
2708
2740
|
/** Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element. */
|
|
@@ -4627,16 +4659,28 @@ object, do not mutate it: an in-place change does not notify the components insi
|
|
|
4627
4659
|
};
|
|
4628
4660
|
|
|
4629
4661
|
export type TestEndAttemptProps = {
|
|
4630
|
-
/**
|
|
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. */
|
|
4631
4669
|
disabled?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4632
|
-
/**
|
|
4670
|
+
/** Reflected: the item's attempt cannot be ended. */
|
|
4633
4671
|
_internalDisabled?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4634
4672
|
};
|
|
4635
4673
|
|
|
4636
4674
|
export type TestEndAttemptSolidJsProps = {
|
|
4637
|
-
/**
|
|
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. */
|
|
4638
4682
|
"bool:disabled"?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4639
|
-
/**
|
|
4683
|
+
/** Reflected: the item's attempt cannot be ended. */
|
|
4640
4684
|
"prop:_internalDisabled"?: TestEndAttempt["_internalDisabled"] | undefined;
|
|
4641
4685
|
|
|
4642
4686
|
/** Set the innerHTML of the element */
|
|
@@ -6321,7 +6365,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
6321
6365
|
|
|
6322
6366
|
/** */
|
|
6323
6367
|
"onqti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
6324
|
-
/**
|
|
6368
|
+
/** */
|
|
6325
6369
|
"onqti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
6326
6370
|
};
|
|
6327
6371
|
|
|
@@ -6358,7 +6402,7 @@ follow, so the item keeps no list of them to set it on. */
|
|
|
6358
6402
|
"prop:responses"?: QtiAssessmentItemCorrection["responses"] | undefined;
|
|
6359
6403
|
/** */
|
|
6360
6404
|
"on:qti-assessment-item-connected"?: ((e: CustomEvent) => void) | undefined;
|
|
6361
|
-
/**
|
|
6405
|
+
/** */
|
|
6362
6406
|
"on:qti-item-context-updated"?: ((e: CustomEvent) => void) | undefined;
|
|
6363
6407
|
|
|
6364
6408
|
/** Set the innerHTML of the element */
|
|
@@ -6727,19 +6771,6 @@ export type CustomElements = {
|
|
|
6727
6771
|
QtiTemplateProcessingProps & BaseProps<QtiTemplateProcessing> & BaseEvents
|
|
6728
6772
|
>;
|
|
6729
6773
|
|
|
6730
|
-
/**
|
|
6731
|
-
*
|
|
6732
|
-
*
|
|
6733
|
-
* ## Methods
|
|
6734
|
-
*
|
|
6735
|
-
* Methods that can be called to access component functionality.
|
|
6736
|
-
*
|
|
6737
|
-
* - `process() => void`: undefined
|
|
6738
|
-
*/
|
|
6739
|
-
"qti-response-processing": Partial<
|
|
6740
|
-
QtiResponseProcessingProps & BaseProps<QtiResponseProcessing> & BaseEvents
|
|
6741
|
-
>;
|
|
6742
|
-
|
|
6743
6774
|
/**
|
|
6744
6775
|
*
|
|
6745
6776
|
*
|
|
@@ -6767,13 +6798,18 @@ export type CustomElements = {
|
|
|
6767
6798
|
* Events that will be emitted by the component.
|
|
6768
6799
|
*
|
|
6769
6800
|
* - `qti-assessment-item-connected`: undefined
|
|
6770
|
-
* - `qti-item-context-updated`:
|
|
6801
|
+
* - `qti-item-context-updated`: undefined
|
|
6771
6802
|
*
|
|
6772
6803
|
* ## Methods
|
|
6773
6804
|
*
|
|
6774
6805
|
* Methods that can be called to access component functionality.
|
|
6775
6806
|
*
|
|
6776
|
-
* - `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.
|
|
6777
6813
|
* - `resetResponses() => void`: undefined
|
|
6778
6814
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
6779
6815
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -6886,7 +6922,6 @@ export type CustomElements = {
|
|
|
6886
6922
|
* Events that will be emitted by the component.
|
|
6887
6923
|
*
|
|
6888
6924
|
* - `qti-set-outcome-value`: undefined
|
|
6889
|
-
* - `qti-interaction-response`: undefined
|
|
6890
6925
|
*
|
|
6891
6926
|
* ## Methods
|
|
6892
6927
|
*
|
|
@@ -7040,6 +7075,25 @@ export type CustomElements = {
|
|
|
7040
7075
|
QtiResponseDeclarationProps & BaseProps<QtiResponseDeclaration> & BaseEvents
|
|
7041
7076
|
>;
|
|
7042
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
|
+
|
|
7043
7097
|
/**
|
|
7044
7098
|
*
|
|
7045
7099
|
*
|
|
@@ -7682,13 +7736,21 @@ export type CustomElements = {
|
|
|
7682
7736
|
/**
|
|
7683
7737
|
* A button that ends the current attempt.
|
|
7684
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
|
+
*
|
|
7685
7743
|
* ## Attributes & Properties
|
|
7686
7744
|
*
|
|
7687
7745
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
7688
7746
|
*
|
|
7689
7747
|
* - `response-identifier`/`responseIdentifier`: undefined
|
|
7690
7748
|
* - `disabled`: undefined
|
|
7691
|
-
* - `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)
|
|
7692
7754
|
* - `title`: undefined
|
|
7693
7755
|
*
|
|
7694
7756
|
* ## Events
|
|
@@ -8292,7 +8354,10 @@ export type CustomElements = {
|
|
|
8292
8354
|
* manifest, the generated types and the Storybook controls — and so that changing it
|
|
8293
8355
|
* re-renders, which reading `dataset` at render time never did.
|
|
8294
8356
|
*
|
|
8295
|
-
* 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`.
|
|
8296
8361
|
* - `shuffle`/`undefined`: Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element.
|
|
8297
8362
|
* - `required`: Whether a choice must be selected for the response to be valid. QTI defaults this to
|
|
8298
8363
|
* false, so an untouched dropdown is a valid empty response unless an author opts in.
|
|
@@ -8356,6 +8421,10 @@ export type CustomElements = {
|
|
|
8356
8421
|
*
|
|
8357
8422
|
* Methods that can be called to access component functionality.
|
|
8358
8423
|
*
|
|
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.
|
|
8359
8428
|
* - `shouldAutoSizeMenu() => boolean`: Autosizing is on unless a host turns it off (`configContext.inlineChoiceAutosize: false`), and an
|
|
8360
8429
|
* explicit `qti-input-width-*` class always wins. On by default because without it the field sizes
|
|
8361
8430
|
* to the option shown, so choosing a longer one widened the field and reflowed the sentence around
|
|
@@ -8364,7 +8433,8 @@ export type CustomElements = {
|
|
|
8364
8433
|
* That second check has to live here rather than in CSS: the measurement is written as an inline
|
|
8365
8434
|
* style on the trigger, and the width classes set the same property on `:host`, so the cascade
|
|
8366
8435
|
* would hand it to the measurement every time. Not writing at all is what makes the class win.
|
|
8367
|
-
* - `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.
|
|
8368
8438
|
*
|
|
8369
8439
|
* `offsetWidth`, NOT `getBoundingClientRect().width`: the icon rotates when the menu opens, and a
|
|
8370
8440
|
* client rect reports the TRANSFORMED box — so a chevron caught mid-rotation measures wider than
|
|
@@ -8375,11 +8445,6 @@ export type CustomElements = {
|
|
|
8375
8445
|
* - `reportValidity() => boolean`: undefined
|
|
8376
8446
|
* - `reset() => void`: undefined
|
|
8377
8447
|
* - `menuAutoSizePropertyTarget() => HTMLElement | null`: Where the measured width is written. Inside the shadow root — see the header.
|
|
8378
|
-
* - `menuAutoSizeRows() => HTMLElement[]`: The menu's rows, which is what actually gets measured — one at a time.
|
|
8379
|
-
*
|
|
8380
|
-
* Flat tree, so a `<slot>` is replaced by the elements assigned to it: in the shipped control the
|
|
8381
|
-
* prompt is rendered in the shadow root and the author's options are slotted light DOM, and both
|
|
8382
|
-
* are rows of the same list.
|
|
8383
8448
|
* - `withMenuMeasurable(measure: () => T) => T`: Make the rows measurable, run `measure`, and put everything back.
|
|
8384
8449
|
*
|
|
8385
8450
|
* A hook, because hosts hide their menu differently and a measurement needs layout. The default
|
|
@@ -8401,8 +8466,9 @@ export type CustomElements = {
|
|
|
8401
8466
|
* - `value`: The currently displayed value inside the trigger.
|
|
8402
8467
|
* - `dropdown-icon`: The chevron icon inside the trigger; also carries `dropdown-icon-open` when open.
|
|
8403
8468
|
* - `menu`: The popover element containing the option list.
|
|
8404
|
-
* - `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.
|
|
8405
8470
|
* - `option-content`: The content wrapper inside each option.
|
|
8471
|
+
* - `clear-icon`: The x glyph inside the clear row.
|
|
8406
8472
|
*/
|
|
8407
8473
|
"qti-inline-choice-interaction": Partial<
|
|
8408
8474
|
QtiInlineChoiceInteractionProps &
|
|
@@ -9610,13 +9676,34 @@ export type CustomElements = {
|
|
|
9610
9676
|
"qti-test": Partial<QtiTestProps & BaseProps<QtiTest> & BaseEvents>;
|
|
9611
9677
|
|
|
9612
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.
|
|
9613
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.
|
|
9614
9693
|
*
|
|
9615
9694
|
* ## Attributes & Properties
|
|
9616
9695
|
*
|
|
9617
9696
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
9618
9697
|
*
|
|
9619
|
-
* - `
|
|
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.
|
|
9620
9707
|
*
|
|
9621
9708
|
* ## Methods
|
|
9622
9709
|
*
|
|
@@ -11435,7 +11522,8 @@ export type CustomElements = {
|
|
|
11435
11522
|
*
|
|
11436
11523
|
* Methods that can be called to access component functionality.
|
|
11437
11524
|
*
|
|
11438
|
-
* - `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.
|
|
11439
11527
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11440
11528
|
* - `process() => void`: undefined
|
|
11441
11529
|
*/
|
|
@@ -11450,7 +11538,8 @@ export type CustomElements = {
|
|
|
11450
11538
|
*
|
|
11451
11539
|
* Methods that can be called to access component functionality.
|
|
11452
11540
|
*
|
|
11453
|
-
* - `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.
|
|
11454
11543
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11455
11544
|
* - `process() => void`: undefined
|
|
11456
11545
|
*/
|
|
@@ -11716,7 +11805,8 @@ export type CustomElements = {
|
|
|
11716
11805
|
*
|
|
11717
11806
|
* Methods that can be called to access component functionality.
|
|
11718
11807
|
*
|
|
11719
|
-
* - `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.
|
|
11720
11810
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11721
11811
|
* - `process() => void`: undefined
|
|
11722
11812
|
*/
|
|
@@ -11731,7 +11821,8 @@ export type CustomElements = {
|
|
|
11731
11821
|
*
|
|
11732
11822
|
* Methods that can be called to access component functionality.
|
|
11733
11823
|
*
|
|
11734
|
-
* - `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.
|
|
11735
11826
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
11736
11827
|
* - `process() => void`: undefined
|
|
11737
11828
|
*/
|
|
@@ -12130,7 +12221,7 @@ export type CustomElements = {
|
|
|
12130
12221
|
* Events that will be emitted by the component.
|
|
12131
12222
|
*
|
|
12132
12223
|
* - `qti-assessment-item-connected`: undefined
|
|
12133
|
-
* - `qti-item-context-updated`:
|
|
12224
|
+
* - `qti-item-context-updated`: undefined
|
|
12134
12225
|
*
|
|
12135
12226
|
* ## Methods
|
|
12136
12227
|
*
|
|
@@ -12138,7 +12229,12 @@ export type CustomElements = {
|
|
|
12138
12229
|
*
|
|
12139
12230
|
* - `showCorrectResponse(show: boolean) => void`: undefined
|
|
12140
12231
|
* - `showCandidateCorrection(show: boolean) => void`: undefined
|
|
12141
|
-
* - `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.
|
|
12142
12238
|
* - `resetResponses() => void`: undefined
|
|
12143
12239
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
12144
12240
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -12414,22 +12510,6 @@ export type CustomElementsSolidJs = {
|
|
|
12414
12510
|
BaseEvents
|
|
12415
12511
|
>;
|
|
12416
12512
|
|
|
12417
|
-
/**
|
|
12418
|
-
*
|
|
12419
|
-
*
|
|
12420
|
-
* ## Methods
|
|
12421
|
-
*
|
|
12422
|
-
* Methods that can be called to access component functionality.
|
|
12423
|
-
*
|
|
12424
|
-
* - `process() => void`: undefined
|
|
12425
|
-
*/
|
|
12426
|
-
"qti-response-processing": Partial<
|
|
12427
|
-
QtiResponseProcessingProps &
|
|
12428
|
-
QtiResponseProcessingSolidJsProps &
|
|
12429
|
-
BaseProps<QtiResponseProcessing> &
|
|
12430
|
-
BaseEvents
|
|
12431
|
-
>;
|
|
12432
|
-
|
|
12433
12513
|
/**
|
|
12434
12514
|
*
|
|
12435
12515
|
*
|
|
@@ -12457,13 +12537,18 @@ export type CustomElementsSolidJs = {
|
|
|
12457
12537
|
* Events that will be emitted by the component.
|
|
12458
12538
|
*
|
|
12459
12539
|
* - `qti-assessment-item-connected`: undefined
|
|
12460
|
-
* - `qti-item-context-updated`:
|
|
12540
|
+
* - `qti-item-context-updated`: undefined
|
|
12461
12541
|
*
|
|
12462
12542
|
* ## Methods
|
|
12463
12543
|
*
|
|
12464
12544
|
* Methods that can be called to access component functionality.
|
|
12465
12545
|
*
|
|
12466
|
-
* - `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.
|
|
12467
12552
|
* - `resetResponses() => void`: undefined
|
|
12468
12553
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
12469
12554
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|
|
@@ -12590,7 +12675,6 @@ export type CustomElementsSolidJs = {
|
|
|
12590
12675
|
* Events that will be emitted by the component.
|
|
12591
12676
|
*
|
|
12592
12677
|
* - `qti-set-outcome-value`: undefined
|
|
12593
|
-
* - `qti-interaction-response`: undefined
|
|
12594
12678
|
*
|
|
12595
12679
|
* ## Methods
|
|
12596
12680
|
*
|
|
@@ -12765,6 +12849,28 @@ export type CustomElementsSolidJs = {
|
|
|
12765
12849
|
BaseEvents
|
|
12766
12850
|
>;
|
|
12767
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
|
+
|
|
12768
12874
|
/**
|
|
12769
12875
|
*
|
|
12770
12876
|
*
|
|
@@ -13460,13 +13566,21 @@ export type CustomElementsSolidJs = {
|
|
|
13460
13566
|
/**
|
|
13461
13567
|
* A button that ends the current attempt.
|
|
13462
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
|
+
*
|
|
13463
13573
|
* ## Attributes & Properties
|
|
13464
13574
|
*
|
|
13465
13575
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
13466
13576
|
*
|
|
13467
13577
|
* - `response-identifier`/`responseIdentifier`: undefined
|
|
13468
13578
|
* - `disabled`: undefined
|
|
13469
|
-
* - `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)
|
|
13470
13584
|
* - `title`: undefined
|
|
13471
13585
|
*
|
|
13472
13586
|
* ## Events
|
|
@@ -14084,7 +14198,10 @@ export type CustomElementsSolidJs = {
|
|
|
14084
14198
|
* manifest, the generated types and the Storybook controls — and so that changing it
|
|
14085
14199
|
* re-renders, which reading `dataset` at render time never did.
|
|
14086
14200
|
*
|
|
14087
|
-
* 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`.
|
|
14088
14205
|
* - `shuffle`/`undefined`: Requests option shuffling. Applied by the transform pipeline (`qti-transformers`), not by this element.
|
|
14089
14206
|
* - `required`: Whether a choice must be selected for the response to be valid. QTI defaults this to
|
|
14090
14207
|
* false, so an untouched dropdown is a valid empty response unless an author opts in.
|
|
@@ -14148,6 +14265,10 @@ export type CustomElementsSolidJs = {
|
|
|
14148
14265
|
*
|
|
14149
14266
|
* Methods that can be called to access component functionality.
|
|
14150
14267
|
*
|
|
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.
|
|
14151
14272
|
* - `shouldAutoSizeMenu() => boolean`: Autosizing is on unless a host turns it off (`configContext.inlineChoiceAutosize: false`), and an
|
|
14152
14273
|
* explicit `qti-input-width-*` class always wins. On by default because without it the field sizes
|
|
14153
14274
|
* to the option shown, so choosing a longer one widened the field and reflowed the sentence around
|
|
@@ -14156,7 +14277,8 @@ export type CustomElementsSolidJs = {
|
|
|
14156
14277
|
* That second check has to live here rather than in CSS: the measurement is written as an inline
|
|
14157
14278
|
* style on the trigger, and the width classes set the same property on `:host`, so the cascade
|
|
14158
14279
|
* would hand it to the measurement every time. Not writing at all is what makes the class win.
|
|
14159
|
-
* - `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.
|
|
14160
14282
|
*
|
|
14161
14283
|
* `offsetWidth`, NOT `getBoundingClientRect().width`: the icon rotates when the menu opens, and a
|
|
14162
14284
|
* client rect reports the TRANSFORMED box — so a chevron caught mid-rotation measures wider than
|
|
@@ -14167,11 +14289,6 @@ export type CustomElementsSolidJs = {
|
|
|
14167
14289
|
* - `reportValidity() => boolean`: undefined
|
|
14168
14290
|
* - `reset() => void`: undefined
|
|
14169
14291
|
* - `menuAutoSizePropertyTarget() => HTMLElement | null`: Where the measured width is written. Inside the shadow root — see the header.
|
|
14170
|
-
* - `menuAutoSizeRows() => HTMLElement[]`: The menu's rows, which is what actually gets measured — one at a time.
|
|
14171
|
-
*
|
|
14172
|
-
* Flat tree, so a `<slot>` is replaced by the elements assigned to it: in the shipped control the
|
|
14173
|
-
* prompt is rendered in the shadow root and the author's options are slotted light DOM, and both
|
|
14174
|
-
* are rows of the same list.
|
|
14175
14292
|
* - `withMenuMeasurable(measure: () => T) => T`: Make the rows measurable, run `measure`, and put everything back.
|
|
14176
14293
|
*
|
|
14177
14294
|
* A hook, because hosts hide their menu differently and a measurement needs layout. The default
|
|
@@ -14193,8 +14310,9 @@ export type CustomElementsSolidJs = {
|
|
|
14193
14310
|
* - `value`: The currently displayed value inside the trigger.
|
|
14194
14311
|
* - `dropdown-icon`: The chevron icon inside the trigger; also carries `dropdown-icon-open` when open.
|
|
14195
14312
|
* - `menu`: The popover element containing the option list.
|
|
14196
|
-
* - `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.
|
|
14197
14314
|
* - `option-content`: The content wrapper inside each option.
|
|
14315
|
+
* - `clear-icon`: The x glyph inside the clear row.
|
|
14198
14316
|
*/
|
|
14199
14317
|
"qti-inline-choice-interaction": Partial<
|
|
14200
14318
|
QtiInlineChoiceInteractionProps &
|
|
@@ -15467,13 +15585,34 @@ export type CustomElementsSolidJs = {
|
|
|
15467
15585
|
>;
|
|
15468
15586
|
|
|
15469
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.
|
|
15470
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.
|
|
15471
15602
|
*
|
|
15472
15603
|
* ## Attributes & Properties
|
|
15473
15604
|
*
|
|
15474
15605
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
15475
15606
|
*
|
|
15476
|
-
* - `
|
|
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.
|
|
15477
15616
|
*
|
|
15478
15617
|
* ## Methods
|
|
15479
15618
|
*
|
|
@@ -17481,7 +17620,8 @@ export type CustomElementsSolidJs = {
|
|
|
17481
17620
|
*
|
|
17482
17621
|
* Methods that can be called to access component functionality.
|
|
17483
17622
|
*
|
|
17484
|
-
* - `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.
|
|
17485
17625
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17486
17626
|
* - `process() => void`: undefined
|
|
17487
17627
|
*/
|
|
@@ -17499,7 +17639,8 @@ export type CustomElementsSolidJs = {
|
|
|
17499
17639
|
*
|
|
17500
17640
|
* Methods that can be called to access component functionality.
|
|
17501
17641
|
*
|
|
17502
|
-
* - `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.
|
|
17503
17644
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17504
17645
|
* - `process() => void`: undefined
|
|
17505
17646
|
*/
|
|
@@ -17794,7 +17935,8 @@ export type CustomElementsSolidJs = {
|
|
|
17794
17935
|
*
|
|
17795
17936
|
* Methods that can be called to access component functionality.
|
|
17796
17937
|
*
|
|
17797
|
-
* - `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.
|
|
17798
17940
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17799
17941
|
* - `process() => void`: undefined
|
|
17800
17942
|
*/
|
|
@@ -17812,7 +17954,8 @@ export type CustomElementsSolidJs = {
|
|
|
17812
17954
|
*
|
|
17813
17955
|
* Methods that can be called to access component functionality.
|
|
17814
17956
|
*
|
|
17815
|
-
* - `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.
|
|
17816
17959
|
* - `getSubRules() => QtiRule[]`: The sub-rules to process when this branch applies.
|
|
17817
17960
|
* - `process() => void`: undefined
|
|
17818
17961
|
*/
|
|
@@ -18254,7 +18397,7 @@ export type CustomElementsSolidJs = {
|
|
|
18254
18397
|
* Events that will be emitted by the component.
|
|
18255
18398
|
*
|
|
18256
18399
|
* - `qti-assessment-item-connected`: undefined
|
|
18257
|
-
* - `qti-item-context-updated`:
|
|
18400
|
+
* - `qti-item-context-updated`: undefined
|
|
18258
18401
|
*
|
|
18259
18402
|
* ## Methods
|
|
18260
18403
|
*
|
|
@@ -18262,7 +18405,12 @@ export type CustomElementsSolidJs = {
|
|
|
18262
18405
|
*
|
|
18263
18406
|
* - `showCorrectResponse(show: boolean) => void`: undefined
|
|
18264
18407
|
* - `showCandidateCorrection(show: boolean) => void`: undefined
|
|
18265
|
-
* - `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.
|
|
18266
18414
|
* - `resetResponses() => void`: undefined
|
|
18267
18415
|
* - `getOutcome(identifier: string) => Readonly<OutcomeVariable>`: undefined
|
|
18268
18416
|
* - `updateTemplateVariable(identifier: string, value: string | string[] | undefined) => void`: Updates the template variable with the specified identifier to the given value.
|