@citolab/qti-components 10.0.0-next.2 → 10.0.0-next.21
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 +4334 -2688
- package/dist/base.d.ts +39 -13
- package/dist/base.js +14 -1
- package/dist/{chunk-RU6332MD.js → chunk-2A52V5TQ.js} +4 -4
- package/dist/{chunk-2KP5UU5A.js → chunk-55WWIRLN.js} +117 -92
- package/dist/chunk-55WWIRLN.js.map +1 -0
- package/dist/{chunk-MI7774NV.js → chunk-5BP2A7BI.js} +2 -2
- package/dist/{chunk-35WWWFS6.js → chunk-DAESCCLR.js} +2 -2
- package/dist/chunk-DJ7PB252.js +7 -0
- package/dist/chunk-DJ7PB252.js.map +1 -0
- package/dist/{chunk-TDWJ6WZA.js → chunk-GPC53O7P.js} +166 -10
- package/dist/chunk-GPC53O7P.js.map +1 -0
- package/dist/{chunk-6U3YPHXU.js → chunk-H6DO5UHC.js} +277 -154
- package/dist/chunk-H6DO5UHC.js.map +1 -0
- package/dist/chunk-J6VX4N7M.js +197 -0
- package/dist/chunk-J6VX4N7M.js.map +1 -0
- package/dist/{chunk-3ZNECUPV.js → chunk-JIDSFFFD.js} +2 -2
- package/dist/{chunk-FD4AB6TM.js → chunk-KQ2LED4X.js} +2 -2
- package/dist/{chunk-6K3QWJHH.js → chunk-LPYZVKHX.js} +48 -7
- package/dist/chunk-LPYZVKHX.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-K3VKQ6QF.js → chunk-TB2OI3ED.js} +677 -1894
- package/dist/chunk-TB2OI3ED.js.map +1 -0
- package/dist/{chunk-GBZNFSFY.js → chunk-TSJGL6FI.js} +2 -2
- package/dist/{chunk-RSMYGGQK.js → chunk-TZCOXFPB.js} +1590 -610
- package/dist/chunk-TZCOXFPB.js.map +1 -0
- package/dist/chunk-UCXLDQYA.js +56 -0
- package/dist/chunk-UCXLDQYA.js.map +1 -0
- package/dist/chunk-WWY2H2YO.js +7 -0
- package/dist/chunk-WWY2H2YO.js.map +1 -0
- package/dist/{chunk-LFVPS7KB.js → chunk-XWRZP2RM.js} +2 -2
- package/dist/{chunk-TLAVOBEM.js → chunk-ZRORBAHB.js} +122 -3
- package/dist/chunk-ZRORBAHB.js.map +1 -0
- package/dist/computed.types.d-6Ht-HNRx.d.ts +80 -0
- package/dist/{config.context.d-BvU9r-Mg.d.ts → config.context.d-Dm11aAuw.d.ts} +21 -3
- package/dist/corrections.d.ts +137 -24
- package/dist/corrections.js +12 -12
- package/dist/corrections.js.map +1 -1
- package/dist/elements.d.ts +66 -73
- package/dist/elements.js +9 -6
- package/dist/index.d.ts +21 -17
- package/dist/index.js +47 -61
- package/dist/interactions.d.ts +98 -19
- package/dist/interactions.js +8 -3
- package/dist/item.css +1948 -1946
- package/dist/item.d.ts +8 -6
- package/dist/item.js +6 -5
- package/dist/item.types.d-Zc6ZQDhu.d.ts +25 -0
- package/dist/loader.d.ts +5 -3
- package/dist/loader.js +3 -2
- package/dist/processing.d.ts +19 -7
- package/dist/processing.js +4 -3
- package/dist/public-events.d-3dGip9pd.d.ts +105 -0
- package/dist/qti-components-jsx.d.ts +1780 -1727
- package/dist/{qti-condition-expression.d-VJH6cWxf.d.ts → qti-condition-expression.d-7Kd4LBxn.d.ts} +1 -1
- package/dist/{qti-expression.d-BPxEp8HU.d.ts → qti-expression.d-iH3w6mqf.d.ts} +2 -1
- package/dist/{qti-feedback.d-wMYNVkkj.d.ts → qti-feedback.d-CT0W-8Gm.d.ts} +8 -1
- package/dist/{qti-item.d-DgC1AQbY.d.ts → qti-item.d-CxP6KtCH.d.ts} +3 -2
- package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
- package/dist/qti-test-state-CF9S8X9C.d.ts +68 -0
- package/dist/qti-test-state.d-D8Q89RzZ.d.ts +57 -0
- package/dist/{qti-test.d-DkpBNcsv.d.ts → qti-test.d-DBT-YpRu.d.ts} +124 -485
- package/dist/{qti-text-entry-interaction.d-q8u5BiVK.d.ts → qti-text-entry-interaction.d-m0EFv9no.d.ts} +221 -73
- package/dist/{qti-transform-test.d-BL7GGFJj.d.ts → qti-transform-test.d-Bb9vnLzP.d.ts} +1 -0
- package/dist/{interaction.d-g6XG0T0Z.d.ts → record.d-N1Bq7e1f.d.ts} +67 -4
- package/dist/{session.context.d-D5080LVx.d.ts → session.context.d-9gRdGK4T.d.ts} +7 -1
- package/dist/test-plugin-api.d.ts +134 -0
- package/dist/test-plugin-api.js +19 -0
- package/dist/test-plugin-api.js.map +1 -0
- package/dist/test.d.ts +26 -57
- package/dist/test.js +19 -48
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +2 -1
- package/dist/{item.types.d-B55QkJ92.d.ts → variables.d-DWHlTszN.d.ts} +8 -24
- package/package.json +16 -11
- package/dist/chunk-2KP5UU5A.js.map +0 -1
- package/dist/chunk-6K3QWJHH.js.map +0 -1
- package/dist/chunk-6U3YPHXU.js.map +0 -1
- package/dist/chunk-K3VKQ6QF.js.map +0 -1
- package/dist/chunk-RSMYGGQK.js.map +0 -1
- package/dist/chunk-TDWJ6WZA.js.map +0 -1
- package/dist/chunk-TLAVOBEM.js.map +0 -1
- package/dist/chunk-ZP6QQYSU.js +0 -7
- package/dist/chunk-ZP6QQYSU.js.map +0 -1
- package/dist/computed.types.d-gJrBeUMG.d.ts +0 -42
- /package/dist/{chunk-RU6332MD.js.map → chunk-2A52V5TQ.js.map} +0 -0
- /package/dist/{chunk-MI7774NV.js.map → chunk-5BP2A7BI.js.map} +0 -0
- /package/dist/{chunk-35WWWFS6.js.map → chunk-DAESCCLR.js.map} +0 -0
- /package/dist/{chunk-3ZNECUPV.js.map → chunk-JIDSFFFD.js.map} +0 -0
- /package/dist/{chunk-FD4AB6TM.js.map → chunk-KQ2LED4X.js.map} +0 -0
- /package/dist/{chunk-GBZNFSFY.js.map → chunk-TSJGL6FI.js.map} +0 -0
- /package/dist/{chunk-LFVPS7KB.js.map → chunk-XWRZP2RM.js.map} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, CSSResultGroup, PropertyValues } from 'lit';
|
|
3
|
-
import { I as Interaction } from './
|
|
3
|
+
import { I as Interaction, c as ValidityTrigger, b as RecordValue } from './record.d-N1Bq7e1f.js';
|
|
4
4
|
import { V as ValidatableInteraction } from './interaction.interface.d-CvjHM2bi.js';
|
|
5
|
-
import { C as ConfigContext } from './config.context.d-
|
|
6
|
-
import { B as BaseType, a as Cardinality,
|
|
5
|
+
import { C as ConfigContext } from './config.context.d-Dm11aAuw.js';
|
|
6
|
+
import { B as BaseType, a as Cardinality, Q as QtiAreaMapEntry } from './variables.d-DWHlTszN.js';
|
|
7
|
+
import { I as ItemContext } from './item.types.d-Zc6ZQDhu.js';
|
|
7
8
|
import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
|
|
8
9
|
import * as lit_directives_ref_js from 'lit/directives/ref.js';
|
|
9
10
|
|
|
@@ -99,9 +100,21 @@ declare global {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
declare const QtiHotspotChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
103
|
+
/**
|
|
104
|
+
* A clickable area on the image of `qti-hotspot-interaction` or `qti-graphic-order-interaction`.
|
|
105
|
+
*
|
|
106
|
+
* @customElement qti-hotspot-choice
|
|
107
|
+
* @cssstate checked - Chosen by the candidate.
|
|
108
|
+
* @cssstate disabled - Switched off by the interaction.
|
|
109
|
+
* @cssstate readonly - Frozen by the interaction.
|
|
110
|
+
* @attr {number} data-order - Graphic order: the 1-based position the candidate gave this choice.
|
|
111
|
+
* A theme prints it with `attr(data-order)`. Reflected from the `order` property; the old
|
|
112
|
+
* `aria-ordervalue` spelling (not an ARIA attribute) is written too for one major.
|
|
113
|
+
*/
|
|
102
114
|
declare class QtiHotspotChoice extends QtiHotspotChoice_base {
|
|
103
115
|
static styles: CSSResultGroup;
|
|
104
116
|
order: number;
|
|
117
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
105
118
|
}
|
|
106
119
|
declare global {
|
|
107
120
|
interface HTMLElementTagNameMap {
|
|
@@ -208,7 +221,6 @@ declare const QtiSimpleChoice_base: (abstract new (...args: any[]) => ActiveElem
|
|
|
208
221
|
*/
|
|
209
222
|
declare class QtiSimpleChoice extends QtiSimpleChoice_base {
|
|
210
223
|
static styles: CSSResultGroup;
|
|
211
|
-
static shadowRootOptions: ShadowRootInit;
|
|
212
224
|
templateIdentifier: string | null;
|
|
213
225
|
showHide: string | null;
|
|
214
226
|
fixed: boolean;
|
|
@@ -245,7 +257,7 @@ interface DragDropState {
|
|
|
245
257
|
* Target identifier -> how many chips it holds for capacity purposes.
|
|
246
258
|
*
|
|
247
259
|
* Deliberately *not* `dragsByTarget[id].length`. Capacity counts
|
|
248
|
-
* `max(draggablesSelector matches, [
|
|
260
|
+
* `max(draggablesSelector matches, [data-draggable] matches)`, because a dropped clone may not
|
|
249
261
|
* match the interaction's structural selector (match-interaction's nested choices do; a bare
|
|
250
262
|
* clone elsewhere may only carry the attribute). Response serialisation uses the selector
|
|
251
263
|
* only. Collapsing the two would silently change `matchMax` behaviour.
|
|
@@ -419,7 +431,7 @@ type DragDropCore = Interaction & {
|
|
|
419
431
|
initiateDrag(dragElement: HTMLElement, startX: number, startY: number, inputType: 'mouse' | 'touch', eventSource?: 'pointer' | 'mouse' | 'touch', pointerId?: number, startedFromTrustedEvent?: boolean): void;
|
|
420
432
|
createDragClone(element: HTMLElement, rect: DOMRect): HTMLElement;
|
|
421
433
|
updateClonePosition(clientX: number, clientY: number): void;
|
|
422
|
-
activateAllDroppables(): void;
|
|
434
|
+
activateAllDroppables(fromDroppable?: boolean): void;
|
|
423
435
|
setupMoveObservables(inputType: 'mouse' | 'touch', eventSource?: 'pointer' | 'mouse' | 'touch'): void;
|
|
424
436
|
};
|
|
425
437
|
interface DragState {
|
|
@@ -456,7 +468,9 @@ type DragDropSlotted = DragDropCore & DropzoneAutoSize & {
|
|
|
456
468
|
disableAnimations: boolean;
|
|
457
469
|
enableFlipAnimations: boolean;
|
|
458
470
|
validate(): boolean;
|
|
459
|
-
reportValidity(
|
|
471
|
+
reportValidity(options?: {
|
|
472
|
+
trigger?: ValidityTrigger;
|
|
473
|
+
}): boolean;
|
|
460
474
|
reset(): void;
|
|
461
475
|
saveResponse(value?: string | string[]): void;
|
|
462
476
|
shouldTreatBlockedMaxAsInvalid(): boolean;
|
|
@@ -507,11 +521,15 @@ declare const QtiAssociateInteraction_base: (abstract new (...args: any[]) => Dr
|
|
|
507
521
|
* @slot prompt - The prompt shown above the choices.
|
|
508
522
|
* @slot qti-simple-associable-choice - The associable choice sources.
|
|
509
523
|
*
|
|
510
|
-
* @csspart
|
|
524
|
+
* @csspart bank - The slot holding the unplaced chips (was `drags`).
|
|
511
525
|
* @csspart drops - The container holding all drop targets.
|
|
512
|
-
* @csspart
|
|
513
|
-
* @csspart drop - Each individual drop target.
|
|
526
|
+
* @csspart row - One left/right drop pair (was `drop-row`).
|
|
527
|
+
* @csspart drop - Each individual drop target. Tokens: `filled`, `full`, `drag-active`, `drag-over`
|
|
528
|
+
* (a plain div cannot carry `:state()`, so the state names are part tokens here).
|
|
514
529
|
* @csspart message - Live validation message region (role="alert").
|
|
530
|
+
* @cssstate disabled - The interaction is switched off.
|
|
531
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
532
|
+
* @cssstate drag-active - A drag is in progress (was `dragzone-active`, `dragzone-enabled`).
|
|
515
533
|
*/
|
|
516
534
|
declare class QtiAssociateInteraction extends QtiAssociateInteraction_base {
|
|
517
535
|
#private;
|
|
@@ -566,8 +584,10 @@ declare const QtiChoiceInteraction_base: (abstract new (...args: any[]) => {}) &
|
|
|
566
584
|
* @slot - Default slot for `qti-simple-choice` elements.
|
|
567
585
|
*
|
|
568
586
|
* @csspart prompt - Wrapper around the prompt slot.
|
|
569
|
-
* @csspart
|
|
587
|
+
* @csspart choices - The slot holding the choices (was `slot`).
|
|
570
588
|
* @csspart message - Live validation message region (role="alert").
|
|
589
|
+
* @cssstate disabled - The interaction is switched off.
|
|
590
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
571
591
|
*/
|
|
572
592
|
declare class QtiChoiceInteraction extends QtiChoiceInteraction_base implements ChoicesInterface {
|
|
573
593
|
#private;
|
|
@@ -618,6 +638,9 @@ declare global {
|
|
|
618
638
|
* @slot prompt - The prompt shown above the textarea.
|
|
619
639
|
*
|
|
620
640
|
* @csspart textarea - The textarea input element.
|
|
641
|
+
* @csspart message - The validation message, hidden until `reportValidity` shows it.
|
|
642
|
+
* @cssstate disabled - The interaction is switched off.
|
|
643
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
621
644
|
*/
|
|
622
645
|
declare class QtiExtendedTextInteraction extends Interaction {
|
|
623
646
|
#private;
|
|
@@ -650,7 +673,9 @@ declare class QtiExtendedTextInteraction extends Interaction {
|
|
|
650
673
|
get value(): string | null;
|
|
651
674
|
set value(val: string | null);
|
|
652
675
|
validate(): boolean;
|
|
653
|
-
reportValidity(
|
|
676
|
+
reportValidity(options?: {
|
|
677
|
+
trigger?: ValidityTrigger;
|
|
678
|
+
}): boolean;
|
|
654
679
|
/** The prompt, above the field. */
|
|
655
680
|
protected renderPrompt(): unknown;
|
|
656
681
|
/** The field itself. */
|
|
@@ -690,12 +715,18 @@ declare const QtiGapMatchInteraction_base: (abstract new (...args: any[]) => Dra
|
|
|
690
715
|
* @slot drags - The draggable choice sources.
|
|
691
716
|
* @slot - Default slot for the drop targets (gaps).
|
|
692
717
|
*
|
|
693
|
-
* @csspart
|
|
694
|
-
* @csspart drops - Wrapper around the drop targets slot.
|
|
718
|
+
* @csspart bank - The slot holding the unplaced chips (was `drags`).
|
|
719
|
+
* @csspart drops - Wrapper around the drop targets slot. The targets themselves are `qti-gap`
|
|
720
|
+
* elements in the light DOM; they carry their own states (`drop`, `filled`, `full`, …).
|
|
695
721
|
* @csspart message - Live validation message region (role="alert").
|
|
722
|
+
* @cssstate disabled - The interaction is switched off.
|
|
723
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
724
|
+
* @cssstate drag-active - A drag is in progress (was `dragzone-active`, `dragzone-enabled`).
|
|
696
725
|
*/
|
|
697
726
|
declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
|
|
698
727
|
static styles: CSSResultGroup;
|
|
728
|
+
/** QTI's default (information model §5.57). */
|
|
729
|
+
maxAssociations: number;
|
|
699
730
|
render(): lit.TemplateResult<1>;
|
|
700
731
|
}
|
|
701
732
|
declare global {
|
|
@@ -710,10 +741,19 @@ declare global {
|
|
|
710
741
|
* @slot prompt - The prompt shown above the image.
|
|
711
742
|
* @slot - Default slot for hotspot choices layered over the image.
|
|
712
743
|
*
|
|
713
|
-
* @csspart line - Each line drawn by the candidate.
|
|
714
|
-
*
|
|
715
|
-
* @csspart point -
|
|
744
|
+
* @csspart line - Each line drawn by the candidate. Tokens: `answer-key` on a line of the correct
|
|
745
|
+
* response, drawn by `qti-corrections` (was the part `correct-line`).
|
|
746
|
+
* @csspart point - The in-progress line from the first chosen hotspot to the pointer.
|
|
747
|
+
*
|
|
748
|
+
* Interaction: click (or Enter / Space on a focused point) a point to start a line, then another
|
|
749
|
+
* point to finish it. The chosen start point carries `:state(checked)`; clicking it again, Escape,
|
|
750
|
+
* or a click on the image away from the points cancels. A point that already takes its `match-max`
|
|
751
|
+
* lines carries `:state(full)` and cannot start or end another. Click a line (or focus it and press
|
|
752
|
+
* Enter, Space, Delete or Backspace) to remove it. The response is `pair`, undirected: "B A" is the
|
|
753
|
+
* existing "A B", and a point cannot be paired with itself.
|
|
716
754
|
* @csspart message - Live validation message region (role="alert").
|
|
755
|
+
* @cssstate disabled - The interaction is switched off.
|
|
756
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
717
757
|
*/
|
|
718
758
|
declare class QtiGraphicAssociateInteraction extends Interaction {
|
|
719
759
|
#private;
|
|
@@ -723,8 +763,15 @@ declare class QtiGraphicAssociateInteraction extends Interaction {
|
|
|
723
763
|
grImage: any[];
|
|
724
764
|
private _response;
|
|
725
765
|
constructor();
|
|
766
|
+
/** Fewest associations a valid response holds (QTI `min-associations`, default 0). */
|
|
767
|
+
minAssociations: number;
|
|
768
|
+
/** Most associations a candidate can draw (QTI `max-associations`, default 1; 0 = no limit). */
|
|
769
|
+
maxAssociations: number;
|
|
726
770
|
reset(): void;
|
|
727
771
|
validate(): boolean;
|
|
772
|
+
reportValidity(options?: {
|
|
773
|
+
trigger?: ValidityTrigger;
|
|
774
|
+
}): boolean;
|
|
728
775
|
set response(val: string | string[] | null);
|
|
729
776
|
get response(): string[] | null;
|
|
730
777
|
/** Extension hook for optional SVG lines rendered above the candidate response. */
|
|
@@ -748,12 +795,31 @@ declare const QtiGraphicGapMatchInteraction_base: (abstract new (...args: any[])
|
|
|
748
795
|
* @slot - Default slot for the base image and hotspots.
|
|
749
796
|
*
|
|
750
797
|
* @csspart image - Wrapper around the image slot.
|
|
751
|
-
* @csspart
|
|
798
|
+
* @csspart bank - The slot holding the unplaced chips (was `drags`).
|
|
752
799
|
* @csspart message - Live validation message region (role="alert").
|
|
800
|
+
* @cssstate disabled - The interaction is switched off.
|
|
801
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
802
|
+
* @cssstate drag-active - A drag is in progress (was `dragzone-active`, `dragzone-enabled`).
|
|
753
803
|
*/
|
|
754
804
|
declare class QtiGraphicGapMatchInteraction extends QtiGraphicGapMatchInteraction_base {
|
|
755
805
|
#private;
|
|
756
806
|
static styles: CSSResultGroup;
|
|
807
|
+
/** QTI's default (information model §5.60). */
|
|
808
|
+
maxAssociations: number;
|
|
809
|
+
/**
|
|
810
|
+
* A hotspot's box is its authored `coords`, always (CONFIGURABILITY.md §4). The measured
|
|
811
|
+
* `--qti-dropzone-min-*` reservation is a floor on the hotspot's `min-width`/`min-height`, and it
|
|
812
|
+
* beat the percentage box from `positionShapes` as soon as the graphic rendered narrower than its
|
|
813
|
+
* declared width: a 275px chip kept a 17% hotspot at 275px over a 482px map. Chips are sized to
|
|
814
|
+
* their hotspots through `--qti-graphic-scale` instead.
|
|
815
|
+
*/
|
|
816
|
+
autoSizeDropzones: boolean;
|
|
817
|
+
/**
|
|
818
|
+
* Rendered width of the graphic over its declared width: the factor the drop areas are scaled by.
|
|
819
|
+
* Published as `--qti-graphic-scale` on both slots, so it reaches a chip in the bank and one placed
|
|
820
|
+
* in a hotspot (qti-gap-img.styles.ts), without writing to the light-DOM host.
|
|
821
|
+
*/
|
|
822
|
+
private _graphicScale;
|
|
757
823
|
render(): lit.TemplateResult<1>;
|
|
758
824
|
shouldReturnToInventoryOnInventoryDrop(): boolean;
|
|
759
825
|
connectedCallback(): void;
|
|
@@ -776,6 +842,8 @@ declare const QtiGraphicOrderInteraction_base: (abstract new (...args: any[]) =>
|
|
|
776
842
|
* @slot - Default slot for the image and hotspot choices.
|
|
777
843
|
*
|
|
778
844
|
* @csspart message - Live validation message region (role="alert").
|
|
845
|
+
* @cssstate disabled - The interaction is switched off.
|
|
846
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
779
847
|
*/
|
|
780
848
|
declare class QtiGraphicOrderInteraction extends QtiGraphicOrderInteraction_base {
|
|
781
849
|
#private;
|
|
@@ -805,6 +873,10 @@ declare const QtiHotspotInteraction_base: (abstract new (...args: any[]) => Choi
|
|
|
805
873
|
*
|
|
806
874
|
* @slot prompt - The prompt shown above the image.
|
|
807
875
|
* @slot - Default slot for the image and hotspot choices.
|
|
876
|
+
*
|
|
877
|
+
* @csspart message - Live validation message region (role="alert").
|
|
878
|
+
* @cssstate disabled - The interaction is switched off.
|
|
879
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
808
880
|
*/
|
|
809
881
|
declare class QtiHotspotInteraction extends QtiHotspotInteraction_base {
|
|
810
882
|
#private;
|
|
@@ -835,6 +907,8 @@ declare const QtiHottextInteraction_base: (abstract new (...args: any[]) => Choi
|
|
|
835
907
|
* @slot - Default slot for the mixed content and `qti-hottext` choices.
|
|
836
908
|
*
|
|
837
909
|
* @csspart message - Live validation message region (role="alert").
|
|
910
|
+
* @cssstate disabled - The interaction is switched off.
|
|
911
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
838
912
|
*/
|
|
839
913
|
declare class QtiHottextInteraction extends QtiHottextInteraction_base {
|
|
840
914
|
static styles: CSSResultGroup;
|
|
@@ -854,7 +928,11 @@ declare const QtiInlineChoiceInteraction_base: (abstract new (...args: any[]) =>
|
|
|
854
928
|
*
|
|
855
929
|
* @attr {string} response-identifier - Required. Identifier of the bound response variable.
|
|
856
930
|
* @attr {string} data-prompt - Placeholder shown before a choice is picked. Falls back to
|
|
857
|
-
* the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
931
|
+
* the item configuration's `inlineChoicePrompt`, then to `select`. An empty value
|
|
932
|
+
* (`data-prompt=""`) is kept: the placeholder is then empty, and the menu leaves the empty
|
|
933
|
+
* prompt row out until a choice is made; from then on that row is a clear button (an x glyph).
|
|
934
|
+
* @attr {string} [data-clear-label=Clear] - Accessible name of the clear row shown, in place of an
|
|
935
|
+
* empty `data-prompt`, once a choice is made. Selecting that row clears the answer.
|
|
858
936
|
* @attr {boolean} [shuffle=false] - Requests option shuffling. Applied by the transform
|
|
859
937
|
* pipeline (`qti-transformers`), not by this element.
|
|
860
938
|
* @attr {boolean} [required=false] - Whether a choice must be selected for the response to be
|
|
@@ -866,10 +944,19 @@ declare const QtiInlineChoiceInteraction_base: (abstract new (...args: any[]) =>
|
|
|
866
944
|
*
|
|
867
945
|
* @csspart trigger - The dropdown trigger button.
|
|
868
946
|
* @csspart value - The currently displayed value inside the trigger.
|
|
869
|
-
* @csspart
|
|
947
|
+
* @csspart icon - The chevron inside the trigger (was `dropdown-icon`). Tokens: `open` while the
|
|
948
|
+
* menu is open (was `dropdown-icon-open`).
|
|
870
949
|
* @csspart menu - The popover element containing the option list.
|
|
871
|
-
* @csspart option -
|
|
872
|
-
*
|
|
950
|
+
* @csspart option - The prompt row in the menu: the way back to "nothing chosen". Tokens: `prompt`;
|
|
951
|
+
* `selected` while nothing is chosen; `clear` when the row is the clear button (see
|
|
952
|
+
* `data-clear-label`). Were `option-prompt`, `option-selected`, `option-clear`. The other rows
|
|
953
|
+
* are `qti-inline-choice` elements and carry their own parts and states.
|
|
954
|
+
* @csspart option-content - The content wrapper inside the prompt row.
|
|
955
|
+
* @csspart clear-icon - The x glyph inside the clear row.
|
|
956
|
+
* @csspart message - The validation message, hidden until `reportValidity` shows it.
|
|
957
|
+
* @cssstate disabled - The interaction is switched off.
|
|
958
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
959
|
+
* @cssstate open - The menu is open. The chosen option carries `checked`, on the `qti-inline-choice`.
|
|
873
960
|
*/
|
|
874
961
|
declare class QtiInlineChoiceInteraction extends QtiInlineChoiceInteraction_base {
|
|
875
962
|
#private;
|
|
@@ -888,9 +975,15 @@ declare class QtiInlineChoiceInteraction extends QtiInlineChoiceInteraction_base
|
|
|
888
975
|
* manifest, the generated types and the Storybook controls — and so that changing it
|
|
889
976
|
* re-renders, which reading `dataset` at render time never did.
|
|
890
977
|
*
|
|
891
|
-
* Falls back to the item configuration's `inlineChoicePrompt`, then to `select`.
|
|
978
|
+
* Falls back to the item configuration's `inlineChoicePrompt`, then to `select`. An empty
|
|
979
|
+
* string is a value, not a missing one: `data-prompt=""` shows an empty placeholder.
|
|
892
980
|
*/
|
|
893
981
|
dataPrompt: string;
|
|
982
|
+
/**
|
|
983
|
+
* Accessible name of the clear row: the prompt row when `data-prompt` is empty and a choice has
|
|
984
|
+
* been made. It has no text to read, only an x glyph, so it needs a name. Defaults to `Clear`.
|
|
985
|
+
*/
|
|
986
|
+
dataClearLabel: string;
|
|
894
987
|
protected _handleDataPromptChange: () => void;
|
|
895
988
|
/**
|
|
896
989
|
* Whether a choice must be selected for the response to be valid. QTI defaults this to
|
|
@@ -914,7 +1007,13 @@ declare class QtiInlineChoiceInteraction extends QtiInlineChoiceInteraction_base
|
|
|
914
1007
|
protected _handleRequiredChange: () => void;
|
|
915
1008
|
/** The closed combobox — the box showing the chosen option. */
|
|
916
1009
|
protected renderTrigger(): unknown;
|
|
917
|
-
/**
|
|
1010
|
+
/**
|
|
1011
|
+
* The popover listbox. Its first row is the prompt — the way back to "nothing chosen", as the
|
|
1012
|
+
* spec's figure of an open dropdown shows it. With an empty prompt there is nothing to read, so:
|
|
1013
|
+
* while nothing is chosen the row is hidden (it would read as an empty option, and there is
|
|
1014
|
+
* nothing to clear), and once something is chosen it is a clear button — an x glyph named by
|
|
1015
|
+
* `data-clear-label`. Either way selecting it does the same: `#selectValue('')`.
|
|
1016
|
+
*/
|
|
918
1017
|
protected renderMenu(): unknown;
|
|
919
1018
|
/** Hidden until `Interaction.reportValidity` shows it. */
|
|
920
1019
|
protected renderValidationMessage(): unknown;
|
|
@@ -924,8 +1023,17 @@ declare class QtiInlineChoiceInteraction extends QtiInlineChoiceInteraction_base
|
|
|
924
1023
|
willUpdate(changed: PropertyValues): void;
|
|
925
1024
|
updated(changed: PropertyValues): void;
|
|
926
1025
|
/**
|
|
927
|
-
*
|
|
928
|
-
*
|
|
1026
|
+
* Leaves the prompt row out of the width measurement when the prompt is empty. That row is hidden
|
|
1027
|
+
* while nothing is chosen (measures 0) and a clear glyph once something is (measures a glyph), so
|
|
1028
|
+
* counting it would let the closed field change width on the first choice. Its text is empty
|
|
1029
|
+
* either way, so it has nothing to contribute.
|
|
1030
|
+
*/
|
|
1031
|
+
menuAutoSizeRows(): HTMLElement[];
|
|
1032
|
+
/**
|
|
1033
|
+
* Autosizing is on unless a host turns it off (`configContext.inlineChoiceAutosize: false`), and an
|
|
1034
|
+
* explicit `qti-input-width-*` class always wins. On by default because without it the field sizes
|
|
1035
|
+
* to the option shown, so choosing a longer one widened the field and reflowed the sentence around
|
|
1036
|
+
* it: a state that changed layout.
|
|
929
1037
|
*
|
|
930
1038
|
* That second check has to live here rather than in CSS: the measurement is written as an inline
|
|
931
1039
|
* style on the trigger, and the width classes set the same property on `:host`, so the cascade
|
|
@@ -933,7 +1041,8 @@ declare class QtiInlineChoiceInteraction extends QtiInlineChoiceInteraction_base
|
|
|
933
1041
|
*/
|
|
934
1042
|
shouldAutoSizeMenu(): boolean;
|
|
935
1043
|
/**
|
|
936
|
-
* The chevron sits in the trigger and not in the menu, so the menu never
|
|
1044
|
+
* The chevron (and the gap before it) sits in the trigger and not in the menu, so the menu never
|
|
1045
|
+
* measures it.
|
|
937
1046
|
*
|
|
938
1047
|
* `offsetWidth`, NOT `getBoundingClientRect().width`: the icon rotates when the menu opens, and a
|
|
939
1048
|
* client rect reports the TRANSFORMED box — so a chevron caught mid-rotation measures wider than
|
|
@@ -943,7 +1052,9 @@ declare class QtiInlineChoiceInteraction extends QtiInlineChoiceInteraction_base
|
|
|
943
1052
|
*/
|
|
944
1053
|
menuAutoSizeExtraWidth(): number;
|
|
945
1054
|
validate(): boolean;
|
|
946
|
-
reportValidity(
|
|
1055
|
+
reportValidity(options?: {
|
|
1056
|
+
trigger?: ValidityTrigger;
|
|
1057
|
+
}): boolean;
|
|
947
1058
|
reset(): void;
|
|
948
1059
|
/**
|
|
949
1060
|
* Captures an attribute-set response before slotted options have been
|
|
@@ -967,15 +1078,17 @@ declare const QtiMatchInteraction_base: (abstract new (...args: any[]) => DragDr
|
|
|
967
1078
|
* @customElement qti-match-interaction
|
|
968
1079
|
*
|
|
969
1080
|
* @attr {string} response-identifier - Required. Identifier of the bound response variable.
|
|
970
|
-
* @attr {number} [max-associations=
|
|
971
|
-
* means unlimited. QTI's
|
|
972
|
-
*
|
|
973
|
-
* @attr {
|
|
1081
|
+
* @attr {number} [max-associations=1] - Maximum pairings across the whole interaction; `0`
|
|
1082
|
+
* means unlimited. Without the attribute it is QTI's default of 1 (information model §5.89).
|
|
1083
|
+
* @attr {number} [min-associations=0] - Minimum pairings for a valid response (QTI's default).
|
|
1084
|
+
* @attr {string} data-first-column-header - QTI shared vocabulary, with `qti-match-tabular`: the
|
|
1085
|
+
* text of the table's top-left cell.
|
|
974
1086
|
* @attr {boolean} [shuffle=false] - Requests shuffling of both match sets. Applied by the
|
|
975
1087
|
* transform pipeline (`qti-transformers`), not by this element.
|
|
976
|
-
* @attr {'qti-match-tabular'|'qti-choices-top'|'qti-choices-bottom'|'qti-choices-left'|'qti-choices-right'} class -
|
|
1088
|
+
* @attr {'qti-match-tabular'|'qti-header-hidden'|'qti-choices-top'|'qti-choices-bottom'|'qti-choices-left'|'qti-choices-right'} class -
|
|
977
1089
|
* QTI shared presentation vocabulary. `qti-match-tabular` renders a checkbox/radio grid
|
|
978
|
-
* instead of drag-and-drop
|
|
1090
|
+
* instead of drag-and-drop, and with it `qti-header-hidden` leaves out the column-header row;
|
|
1091
|
+
* the `qti-choices-*` values position the source set.
|
|
979
1092
|
* @attr {boolean} [auto-size-dropzones=false] - Extension, not QTI. Sizes every drop target to
|
|
980
1093
|
* the widest chip so placement does not reflow the layout. The mixin default is `true`; this
|
|
981
1094
|
* interaction is the one that overrides it to `false`, because a match target is a category card
|
|
@@ -989,19 +1102,22 @@ declare const QtiMatchInteraction_base: (abstract new (...args: any[]) => DragDr
|
|
|
989
1102
|
* @slot - Default slot for the two match sets (drag-and-drop mode).
|
|
990
1103
|
*
|
|
991
1104
|
* @csspart grid - The tabular grid container.
|
|
992
|
-
* @csspart corner - The top-left corner cell of the grid
|
|
993
|
-
* @csspart
|
|
994
|
-
* @csspart
|
|
995
|
-
* @csspart rows
|
|
996
|
-
* @csspart
|
|
997
|
-
* @csspart
|
|
998
|
-
* @csspart
|
|
999
|
-
* @csspart control - The visible checkbox/radio box (tabular mode).
|
|
1000
|
-
*
|
|
1001
|
-
* `::part(control radio checked correct)`. These mirror the custom-state vocabulary;
|
|
1002
|
-
* are plain spans in the shadow root, so they cannot carry real `:state()`.
|
|
1003
|
-
* @csspart control-mark - The inner mark element; carries the same
|
|
1105
|
+
* @csspart corner - The top-left corner cell of the grid; shows `data-first-column-header`.
|
|
1106
|
+
* @csspart columns - Wrapper row for the column headers (was `cols-wrap`).
|
|
1107
|
+
* @csspart column-header - The column header slot (was `c-header`).
|
|
1108
|
+
* @csspart rows - Wrapper column for the row headers (was `rows-wrap`).
|
|
1109
|
+
* @csspart row-header - The row header slot (was `r-header`).
|
|
1110
|
+
* @csspart cells - The interactive cell grid area (was `checkbox-grid`).
|
|
1111
|
+
* @csspart cell - Each cell's label element (was `input-cell`).
|
|
1112
|
+
* @csspart control - The visible checkbox/radio box (tabular mode). Tokens: `radio` | `checkbox`,
|
|
1113
|
+
* `checked`, `candidate-correct` | `candidate-incorrect` — e.g.
|
|
1114
|
+
* `::part(control radio checked candidate-correct)`. These mirror the custom-state vocabulary;
|
|
1115
|
+
* the cells are plain spans in the shadow root, so they cannot carry real `:state()`.
|
|
1116
|
+
* @csspart control-mark - The inner mark element; carries the same tokens as `control`.
|
|
1004
1117
|
* @csspart message - Live validation message region (role="alert").
|
|
1118
|
+
* @cssstate disabled - The interaction is switched off.
|
|
1119
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
1120
|
+
* @cssstate drag-active - A drag is in progress (was `dragzone-active`, `dragzone-enabled`).
|
|
1005
1121
|
*/
|
|
1006
1122
|
declare class QtiMatchInteraction extends QtiMatchInteraction_base {
|
|
1007
1123
|
static styles: CSSResultGroup;
|
|
@@ -1018,10 +1134,14 @@ declare class QtiMatchInteraction extends QtiMatchInteraction_base {
|
|
|
1018
1134
|
* their drops are exactly the widest chip plus the inset.
|
|
1019
1135
|
*/
|
|
1020
1136
|
autoSizeDropzones: boolean;
|
|
1137
|
+
/** QTI's defaults (information model §5.89). */
|
|
1138
|
+
maxAssociations: number;
|
|
1139
|
+
minAssociations: number;
|
|
1021
1140
|
protected sourceChoices: QtiSimpleAssociableChoice[];
|
|
1022
1141
|
protected targetChoices: QtiSimpleAssociableChoice[];
|
|
1023
1142
|
protected lastCheckedRadio: HTMLInputElement | null;
|
|
1024
1143
|
class: string;
|
|
1144
|
+
dataFirstColumnHeader: string;
|
|
1025
1145
|
protected _response: string | string[];
|
|
1026
1146
|
get response(): string[];
|
|
1027
1147
|
set response(val: string[]);
|
|
@@ -1077,11 +1197,16 @@ declare const QtiOrderInteraction_base: (abstract new (...args: any[]) => DragDr
|
|
|
1077
1197
|
* @slot prompt - The prompt shown above the interaction.
|
|
1078
1198
|
* @slot drags - The draggable choice sources.
|
|
1079
1199
|
*
|
|
1080
|
-
* @csspart container - The outer container wrapping
|
|
1081
|
-
* @csspart
|
|
1200
|
+
* @csspart container - The outer container wrapping the bank and the drops.
|
|
1201
|
+
* @csspart bank - The slot holding the unplaced chips (was `drags`).
|
|
1082
1202
|
* @csspart drops - The drop-target region.
|
|
1083
|
-
* @csspart drop - Each individual drop target.
|
|
1084
|
-
*
|
|
1203
|
+
* @csspart drop - Each individual drop target. Tokens: `filled`, `full`, `drag-active`, `drag-over`
|
|
1204
|
+
* (a plain div cannot carry `:state()`, so the state names are part tokens here).
|
|
1205
|
+
* @csspart chip - A choice placed into a drop target (was `drag`).
|
|
1206
|
+
* @csspart message - Live validation message region (role="alert").
|
|
1207
|
+
* @cssstate disabled - The interaction is switched off.
|
|
1208
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
1209
|
+
* @cssstate drag-active - A drag is in progress (was `dragzone-active`, `dragzone-enabled`).
|
|
1085
1210
|
*/
|
|
1086
1211
|
declare class QtiOrderInteraction extends QtiOrderInteraction_base {
|
|
1087
1212
|
static styles: lit.CSSResult[];
|
|
@@ -1111,10 +1236,11 @@ type PciInteractionStatus = 'interacting' | 'suspended' | 'closed' | 'solution'
|
|
|
1111
1236
|
* Correct response of a response declaration, mirroring `qti-correct-response`.
|
|
1112
1237
|
*
|
|
1113
1238
|
* `value` holds the authored `qti-value` content: a single value for `single`
|
|
1114
|
-
* cardinality,
|
|
1239
|
+
* cardinality, a field map (`{ time: '4.0', point: '460 245' }`) for `record`
|
|
1240
|
+
* cardinality, and an array of values for every other cardinality.
|
|
1115
1241
|
*/
|
|
1116
1242
|
interface PciCorrectResponse {
|
|
1117
|
-
value: string | string[]
|
|
1243
|
+
value: string | string[] | Record<string, string | string[] | null>;
|
|
1118
1244
|
}
|
|
1119
1245
|
/**
|
|
1120
1246
|
* Response declaration passed into the `getInstance` configuration so a PCI can
|
|
@@ -1207,6 +1333,21 @@ declare type QtiVariableJSON = {
|
|
|
1207
1333
|
record?: QtiRecordItem[] | null;
|
|
1208
1334
|
};
|
|
1209
1335
|
|
|
1336
|
+
/** Text for an inline `<script>`: a `</script` inside it would end the element early. */
|
|
1337
|
+
declare const inlineScriptText: (text: string) => string;
|
|
1338
|
+
/** Text for an inline `<style>`: a `</style` inside it would end the element early. */
|
|
1339
|
+
declare const inlineStyleText: (text: string) => string;
|
|
1340
|
+
/** A response value as this interaction holds it: a record response is its field map. */
|
|
1341
|
+
type PciResponseValue = string | string[] | RecordValue;
|
|
1342
|
+
/**
|
|
1343
|
+
* Portable custom interaction (PCI): hosts a third-party interaction module.
|
|
1344
|
+
*
|
|
1345
|
+
* No parts: the PCI renders its own markup into the default slot (or into an iframe) and the
|
|
1346
|
+
* element adds nothing of its own to theme.
|
|
1347
|
+
*
|
|
1348
|
+
* @cssstate disabled - The interaction is switched off.
|
|
1349
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
1350
|
+
*/
|
|
1210
1351
|
declare class QtiPortableCustomInteraction extends Interaction {
|
|
1211
1352
|
#private;
|
|
1212
1353
|
protected _iframeLoaded: boolean;
|
|
@@ -1222,6 +1363,7 @@ declare class QtiPortableCustomInteraction extends Interaction {
|
|
|
1222
1363
|
customInteractionTypeIdentifier: string;
|
|
1223
1364
|
requirePathsJson: string;
|
|
1224
1365
|
requireShimJson: string;
|
|
1366
|
+
/** A RequireJS to load in the iframe instead of the inlined copy (src/vendor/require-js.ts). */
|
|
1225
1367
|
requireJsUrl: string;
|
|
1226
1368
|
baseUrl: string;
|
|
1227
1369
|
useDefaultPaths: boolean;
|
|
@@ -1249,10 +1391,6 @@ declare class QtiPortableCustomInteraction extends Interaction {
|
|
|
1249
1391
|
* Get direct child elements by tag name
|
|
1250
1392
|
*/
|
|
1251
1393
|
private getDirectChildrenByTag;
|
|
1252
|
-
/**
|
|
1253
|
-
* Coerce a scalar value to the expected base-type when possible
|
|
1254
|
-
*/
|
|
1255
|
-
private coerceBaseValue;
|
|
1256
1394
|
/**
|
|
1257
1395
|
* Normalize an input into a list form
|
|
1258
1396
|
*/
|
|
@@ -1261,14 +1399,6 @@ declare class QtiPortableCustomInteraction extends Interaction {
|
|
|
1261
1399
|
* Convert a variable value to QtiVariableJSON
|
|
1262
1400
|
*/
|
|
1263
1401
|
private variableToQtiVariableJSON;
|
|
1264
|
-
/**
|
|
1265
|
-
* Convert a record object into QtiVariableJSON
|
|
1266
|
-
*/
|
|
1267
|
-
private recordToQtiVariableJSON;
|
|
1268
|
-
/**
|
|
1269
|
-
* Build a record entry from an arbitrary value
|
|
1270
|
-
*/
|
|
1271
|
-
private recordEntryFromValue;
|
|
1272
1402
|
/**
|
|
1273
1403
|
* Extract default QTI_CONTEXT values from qti-context-declaration elements
|
|
1274
1404
|
*/
|
|
@@ -1288,7 +1418,7 @@ declare class QtiPortableCustomInteraction extends Interaction {
|
|
|
1288
1418
|
/**
|
|
1289
1419
|
* Converts response variables to QtiVariableJSON
|
|
1290
1420
|
*/
|
|
1291
|
-
protected responseVariablesToQtiVariableJSON(input:
|
|
1421
|
+
protected responseVariablesToQtiVariableJSON(input: PciResponseValue, cardinality: Cardinality, baseType: BaseType, fieldBaseTypes?: Record<string, BaseType>): QtiVariableJSON;
|
|
1292
1422
|
validate(): boolean;
|
|
1293
1423
|
set value(v: string | null);
|
|
1294
1424
|
get value(): string | null;
|
|
@@ -1430,7 +1560,11 @@ declare global {
|
|
|
1430
1560
|
* @slot prompt - The prompt shown above the image.
|
|
1431
1561
|
* @slot - Default slot for the base image.
|
|
1432
1562
|
*
|
|
1433
|
-
* @csspart point - Each selected point marker.
|
|
1563
|
+
* @csspart point - Each selected point marker. Tokens: `candidate-correct` |
|
|
1564
|
+
* `candidate-incorrect` when `qti-corrections` has marked it.
|
|
1565
|
+
* @csspart message - The validation message, hidden until `reportValidity` shows it.
|
|
1566
|
+
* @cssstate disabled - The interaction is switched off.
|
|
1567
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
1434
1568
|
* @cssprop --qti-select-point-icon - Marker mask image (SVG data URL). Should be a solid silhouette for color inheritance.
|
|
1435
1569
|
* @cssprop --qti-select-point-marker-size - Marker size.
|
|
1436
1570
|
* @cssprop --qti-select-point-marker-anchor - Vertical translate anchor (`-100%` for bottom tip, `-50%` for center).
|
|
@@ -1455,6 +1589,11 @@ declare class QtiSelectPointInteraction extends Interaction {
|
|
|
1455
1589
|
*/
|
|
1456
1590
|
areaMappings: string | null;
|
|
1457
1591
|
private _areaEntries;
|
|
1592
|
+
/**
|
|
1593
|
+
* Every route into the response (a click, a removed marker, a restore, a reset) updates the form
|
|
1594
|
+
* value and the validity; a click or a removal also reports, as a change.
|
|
1595
|
+
*/
|
|
1596
|
+
protected _handleResponseChange: () => void;
|
|
1458
1597
|
protected _handleAreaMappingsChange: () => void;
|
|
1459
1598
|
protected get _effectiveAreaEntries(): QtiAreaMapEntry[];
|
|
1460
1599
|
connectedCallback(): void;
|
|
@@ -1470,7 +1609,9 @@ declare class QtiSelectPointInteraction extends Interaction {
|
|
|
1470
1609
|
protected positionOverlayElements(elements: Iterable<HTMLElement>): void;
|
|
1471
1610
|
render(): lit.TemplateResult<1>;
|
|
1472
1611
|
validate(): boolean;
|
|
1473
|
-
reportValidity(
|
|
1612
|
+
reportValidity(options?: {
|
|
1613
|
+
trigger?: ValidityTrigger;
|
|
1614
|
+
}): boolean;
|
|
1474
1615
|
firstUpdated(): void;
|
|
1475
1616
|
disconnectedCallback(): void;
|
|
1476
1617
|
}
|
|
@@ -1489,9 +1630,11 @@ declare global {
|
|
|
1489
1630
|
* @csspart bounds - The min/max bounds label wrapper.
|
|
1490
1631
|
* @csspart ticks - The tick marks along the rail.
|
|
1491
1632
|
* @csspart rail - The rail element the knob slides along.
|
|
1492
|
-
* @csspart knob - The draggable knob.
|
|
1493
|
-
*
|
|
1494
|
-
* @csspart
|
|
1633
|
+
* @csspart knob - The draggable knob. Tokens: `answer-key` on the ghost knob `qti-corrections`
|
|
1634
|
+
* draws at the correct response (was the part `knob-correct`).
|
|
1635
|
+
* @csspart value - The current value display.
|
|
1636
|
+
* @cssstate disabled - The interaction is switched off.
|
|
1637
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
1495
1638
|
*/
|
|
1496
1639
|
declare class QtiSliderInteraction extends Interaction {
|
|
1497
1640
|
#private;
|
|
@@ -1539,9 +1682,12 @@ declare global {
|
|
|
1539
1682
|
* single-line input has no formatting to render: it can show neither preserved line breaks nor
|
|
1540
1683
|
* markup. The field is always plain text, so this is not planned either.
|
|
1541
1684
|
*
|
|
1542
|
-
* @csspart answer - The answer
|
|
1685
|
+
* @csspart answer-key - The correct answer, revealed above the field when the correct response is
|
|
1686
|
+
* shown (was `answer`).
|
|
1543
1687
|
* @csspart input - The text input element.
|
|
1544
1688
|
* @csspart message - The validation message, hidden until `reportValidity` shows it.
|
|
1689
|
+
* @cssstate disabled - The interaction is switched off.
|
|
1690
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
1545
1691
|
*/
|
|
1546
1692
|
declare class QtiTextEntryInteraction extends Interaction {
|
|
1547
1693
|
static styles: CSSResultGroup;
|
|
@@ -1565,7 +1711,9 @@ declare class QtiTextEntryInteraction extends Interaction {
|
|
|
1565
1711
|
protected renderValidationMessage(): unknown;
|
|
1566
1712
|
render(): lit.TemplateResult<1>;
|
|
1567
1713
|
protected textChanged(event: Event): void;
|
|
1568
|
-
reportValidity(
|
|
1714
|
+
reportValidity(options?: {
|
|
1715
|
+
trigger?: ValidityTrigger;
|
|
1716
|
+
}): boolean;
|
|
1569
1717
|
reset(): void;
|
|
1570
1718
|
}
|
|
1571
1719
|
declare global {
|
|
@@ -1574,4 +1722,4 @@ declare global {
|
|
|
1574
1722
|
}
|
|
1575
1723
|
}
|
|
1576
1724
|
|
|
1577
|
-
export { type Choice as C, type Orientation as O, QtiAssociableHotspot as Q, QtiAssociateInteraction as a, QtiChoiceInteraction as b, QtiExtendedTextInteraction as c, QtiGap as d, QtiGapImg as e, QtiGapMatchInteraction as f, QtiGapText as g, QtiGraphicAssociateInteraction as h, QtiGraphicGapMatchInteraction as i, QtiGraphicOrderInteraction as j, QtiHotspotChoice as k, QtiHotspotInteraction as l, QtiHottext as m, QtiHottextInteraction as n, QtiInlineChoice as o, QtiInlineChoiceInteraction as p, QtiMatchInteraction as q, QtiOrderInteraction as r, QtiPortableCustomInteraction as s, QtiPrompt as t, QtiSelectPointInteraction as u, QtiSimpleAssociableChoice as v, QtiSimpleChoice as w, QtiSliderInteraction as x, QtiTextEntryInteraction as y,
|
|
1725
|
+
export { inlineStyleText as A, QtiPortableCustomInteractionTest as B, type Choice as C, type Orientation as O, QtiAssociableHotspot as Q, QtiAssociateInteraction as a, QtiChoiceInteraction as b, QtiExtendedTextInteraction as c, QtiGap as d, QtiGapImg as e, QtiGapMatchInteraction as f, QtiGapText as g, QtiGraphicAssociateInteraction as h, QtiGraphicGapMatchInteraction as i, QtiGraphicOrderInteraction as j, QtiHotspotChoice as k, QtiHotspotInteraction as l, QtiHottext as m, QtiHottextInteraction as n, QtiInlineChoice as o, QtiInlineChoiceInteraction as p, QtiMatchInteraction as q, QtiOrderInteraction as r, QtiPortableCustomInteraction as s, QtiPrompt as t, QtiSelectPointInteraction as u, QtiSimpleAssociableChoice as v, QtiSimpleChoice as w, QtiSliderInteraction as x, QtiTextEntryInteraction as y, inlineScriptText as z };
|
|
@@ -27,6 +27,7 @@ type transformItemApi = {
|
|
|
27
27
|
convertCDATAtoComment: () => transformItemApi;
|
|
28
28
|
shuffleInteractions: (seed?: string | number | null) => transformItemApi;
|
|
29
29
|
stripStyleSheets: () => transformItemApi;
|
|
30
|
+
validateBindings: () => transformItemApi;
|
|
30
31
|
html: () => string;
|
|
31
32
|
xml: () => string;
|
|
32
33
|
htmlDoc: (registry?: CustomElementRegistry) => DocumentFragment;
|