@citolab/qti-components 10.0.0-next.4 → 10.0.0-next.5
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 +330 -297
- package/dist/base.d.ts +4 -4
- package/dist/base.js +1 -1
- package/dist/{chunk-UTW5VDTD.js → chunk-A2AP6CUL.js} +2097 -2031
- package/dist/chunk-A2AP6CUL.js.map +1 -0
- package/dist/{chunk-MI7774NV.js → chunk-CXTHPEUN.js} +2 -2
- package/dist/{chunk-FD4AB6TM.js → chunk-F7QDRKCR.js} +2 -2
- package/dist/{chunk-RU6332MD.js → chunk-JNZ3HSFI.js} +2 -2
- package/dist/{chunk-TDWJ6WZA.js → chunk-JZZMY3FA.js} +1 -1
- package/dist/chunk-JZZMY3FA.js.map +1 -0
- package/dist/{chunk-F7FKSHZS.js → chunk-KB2NJTSD.js} +6 -6
- package/dist/{chunk-GBZNFSFY.js → chunk-O5HGNYB2.js} +2 -2
- package/dist/{chunk-6U3YPHXU.js → chunk-QU23PPEZ.js} +2 -2
- package/dist/{chunk-6K3QWJHH.js → chunk-R7ZCUQU2.js} +2 -2
- package/dist/{chunk-RSMYGGQK.js → chunk-WC3P4KCV.js} +2 -2
- package/dist/{chunk-KQSR6LZH.js → chunk-WV53LUE3.js} +2 -2
- package/dist/{chunk-35WWWFS6.js → chunk-WVDQLBMT.js} +2 -2
- package/dist/{computed.types.d-gJrBeUMG.d.ts → computed.types.d-DvxBgnze.d.ts} +10 -1
- package/dist/corrections.d.ts +4 -4
- package/dist/corrections.js +7 -7
- package/dist/elements.js +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.js +22 -18
- package/dist/interactions.js +3 -3
- package/dist/item.d.ts +2 -2
- package/dist/item.js +3 -3
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +740 -756
- package/dist/{qti-item.d-DgC1AQbY.d.ts → qti-item.d-klsgIEKQ.d.ts} +1 -1
- package/dist/{qti-test.d-7YudNPea.d.ts → qti-test.d-Cra3sS-2.d.ts} +124 -104
- package/dist/{session.context.d-D5080LVx.d.ts → session.context.d-DYAdqSer.d.ts} +6 -0
- package/dist/test.d.ts +111 -6
- package/dist/test.js +14 -10
- package/package.json +8 -8
- package/dist/chunk-TDWJ6WZA.js.map +0 -1
- package/dist/chunk-UTW5VDTD.js.map +0 -1
- /package/dist/{chunk-MI7774NV.js.map → chunk-CXTHPEUN.js.map} +0 -0
- /package/dist/{chunk-FD4AB6TM.js.map → chunk-F7QDRKCR.js.map} +0 -0
- /package/dist/{chunk-RU6332MD.js.map → chunk-JNZ3HSFI.js.map} +0 -0
- /package/dist/{chunk-F7FKSHZS.js.map → chunk-KB2NJTSD.js.map} +0 -0
- /package/dist/{chunk-GBZNFSFY.js.map → chunk-O5HGNYB2.js.map} +0 -0
- /package/dist/{chunk-6U3YPHXU.js.map → chunk-QU23PPEZ.js.map} +0 -0
- /package/dist/{chunk-6K3QWJHH.js.map → chunk-R7ZCUQU2.js.map} +0 -0
- /package/dist/{chunk-RSMYGGQK.js.map → chunk-WC3P4KCV.js.map} +0 -0
- /package/dist/{chunk-KQSR6LZH.js.map → chunk-WV53LUE3.js.map} +0 -0
- /package/dist/{chunk-35WWWFS6.js.map → chunk-WVDQLBMT.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
|
|
4
|
-
import { C as ComputedItemContext, V as View } from './session.context.d-
|
|
4
|
+
import { C as ComputedItemContext, V as View } from './session.context.d-DYAdqSer.js';
|
|
5
5
|
import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
|
|
6
6
|
import { QtiAssessmentItem } from './elements.js';
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, PropertyValues, nothing } from 'lit';
|
|
3
3
|
import { b as transformTestApi, t as transformItemApi } from './qti-transform-test.d-BL7GGFJj.js';
|
|
4
|
-
import { C as ComputedContext, a as ComputedItem } from './computed.types.d-
|
|
4
|
+
import { C as ComputedContext, a as ComputedItem } from './computed.types.d-DvxBgnze.js';
|
|
5
5
|
import { QtiAssessmentItem, QtiModalFeedback } from './elements.js';
|
|
6
6
|
import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
|
|
7
7
|
import { T as TestContext, Q as QtiExpression, a as QtiExpressionBase } from './qti-expression.d-BPxEp8HU.js';
|
|
8
8
|
import { TemplateFunction } from '@heximal/templates';
|
|
9
9
|
import { h as VariableValue, b as ItemContext, c as OutcomeVariable, V as VariableDeclaration } from './item.types.d-B55QkJ92.js';
|
|
10
|
-
import { S as SessionContext, V as View } from './session.context.d-
|
|
10
|
+
import { S as SessionContext, V as View } from './session.context.d-DYAdqSer.js';
|
|
11
11
|
import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
|
|
12
12
|
import { b as QtiRuleBase } from './qti-rule-base.d-Bdzg8eGH.js';
|
|
13
13
|
|
|
@@ -417,8 +417,19 @@ interface QtiTestStateValue {
|
|
|
417
417
|
identifier: string;
|
|
418
418
|
value: string | string[] | null;
|
|
419
419
|
}
|
|
420
|
-
/**
|
|
420
|
+
/**
|
|
421
|
+
* What each plugin keeps in the state, by plugin name. Empty here: a plugin adds its own entry by
|
|
422
|
+
* augmenting this interface (`declare module` on the module that declares it, with
|
|
423
|
+
* `interface QtiTestPluginState { bookmarks: string[] }`), and reads it with
|
|
424
|
+
* `pluginState(computedContext, 'bookmarks')`. The test never reads an entry; it
|
|
425
|
+
* stores and restores it, so a value must survive `JSON.stringify`.
|
|
426
|
+
*/
|
|
427
|
+
interface QtiTestPluginState {
|
|
428
|
+
}
|
|
429
|
+
/** Where the candidate is, and what plugins keep. */
|
|
421
430
|
interface QtiTestStateSession {
|
|
431
|
+
/** Plugin entries by plugin name. Entries of plugins that are not loaded are kept as they are. */
|
|
432
|
+
plugins?: Partial<QtiTestPluginState> & Record<string, unknown>;
|
|
422
433
|
navPartId?: string | null;
|
|
423
434
|
navSectionId?: string | null;
|
|
424
435
|
navItemRefId?: string | null;
|
|
@@ -549,26 +560,6 @@ declare global {
|
|
|
549
560
|
}
|
|
550
561
|
}
|
|
551
562
|
|
|
552
|
-
declare class TestView extends LitElement {
|
|
553
|
-
#private;
|
|
554
|
-
static DEFAULT_VIEW_OPTIONS: string[];
|
|
555
|
-
private sessionContext;
|
|
556
|
-
/** label accompanying the select view dropdown */
|
|
557
|
-
label: string;
|
|
558
|
-
/** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */
|
|
559
|
-
viewOptions: string;
|
|
560
|
-
protected _handleViewOptionsChange: () => void;
|
|
561
|
-
connectedCallback(): void;
|
|
562
|
-
private _viewOptions;
|
|
563
|
-
protected _switchView(view: string): void;
|
|
564
|
-
render(): lit.TemplateResult<1>;
|
|
565
|
-
}
|
|
566
|
-
declare global {
|
|
567
|
-
interface HTMLElementTagNameMap {
|
|
568
|
-
'test-view': TestView;
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
|
|
572
563
|
declare class TestItemLink extends LitElement {
|
|
573
564
|
static styles: lit.CSSResult;
|
|
574
565
|
private itemId;
|
|
@@ -598,24 +589,6 @@ declare global {
|
|
|
598
589
|
}
|
|
599
590
|
}
|
|
600
591
|
|
|
601
|
-
/**
|
|
602
|
-
* @deprecated test-paging-buttons-stamp is deprecated and will be removed in the future.
|
|
603
|
-
*/
|
|
604
|
-
declare class TestPagingButtonsStamp extends LitElement {
|
|
605
|
-
#private;
|
|
606
|
-
private computedContext;
|
|
607
|
-
myTemplate: TemplateFunction;
|
|
608
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
609
|
-
constructor();
|
|
610
|
-
connectedCallback(): void;
|
|
611
|
-
render(): lit.TemplateResult<1>;
|
|
612
|
-
}
|
|
613
|
-
declare global {
|
|
614
|
-
interface HTMLElementTagNameMap {
|
|
615
|
-
'test-paging-buttons-stamp': TestPagingButtonsStamp;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
|
|
619
592
|
/**
|
|
620
593
|
* `<test-container>` is a custom element designed for hosting the qti-assessment-item.
|
|
621
594
|
* The `qti-assessment-test` will be placed inside the shadow DOM of this element.
|
|
@@ -655,45 +628,82 @@ declare global {
|
|
|
655
628
|
}
|
|
656
629
|
}
|
|
657
630
|
|
|
658
|
-
declare class
|
|
659
|
-
|
|
631
|
+
declare class TestSectionLink extends LitElement {
|
|
632
|
+
#private;
|
|
660
633
|
static styles: lit.CSSResult;
|
|
634
|
+
private sectionId;
|
|
635
|
+
constructor();
|
|
661
636
|
render(): lit.TemplateResult<1>;
|
|
662
637
|
}
|
|
663
638
|
declare global {
|
|
664
639
|
interface HTMLElementTagNameMap {
|
|
665
|
-
'test-
|
|
640
|
+
'test-section-link': TestSectionLink;
|
|
666
641
|
}
|
|
667
642
|
}
|
|
668
643
|
|
|
644
|
+
declare module '../../types/qti-test-state' {
|
|
645
|
+
interface QtiTestPluginState {
|
|
646
|
+
/** Item-ref identifiers the candidate marked to come back to, in the order they were marked. */
|
|
647
|
+
bookmarks: string[];
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
/** The item-ref identifiers bookmarked so far. For a host's own navigation: mark these. */
|
|
651
|
+
declare const bookmarkedItems: (context: Pick<ComputedContext, "plugins"> | undefined) => string[];
|
|
669
652
|
/**
|
|
670
|
-
*
|
|
653
|
+
* A toggle that marks the item on screen to come back to. The marks live in the test's state under
|
|
654
|
+
* `bookmarks` (`session.plugins.bookmarks`), so a host that stores `state` stores them, and a
|
|
655
|
+
* reloaded test shows them again.
|
|
656
|
+
*
|
|
657
|
+
* Put it inside `<test-navigation>`, either in the toolbar, where it marks the item on screen, or in
|
|
658
|
+
* the `<template item-ref>`, where each item gets its own and it marks that item. It is a button
|
|
659
|
+
* (`role="button"`, `aria-pressed`) and reflects `bookmarked` on the host for styling; its content is
|
|
660
|
+
* the label. In the toolbar it is `disabled` while no item is on screen. A host's own navigation reads
|
|
661
|
+
* the marks with `bookmarkedItems(computedContext)`.
|
|
662
|
+
*
|
|
663
|
+
* Give it an `item` (an item-ref identifier) to mark that item instead, wherever the button sits: in a
|
|
664
|
+
* stamp template that lists the items of a section, `<test-bookmark item="{{ item.identifier }}">`
|
|
665
|
+
* puts a button next to each one.
|
|
666
|
+
*
|
|
667
|
+
* @slot - The label.
|
|
668
|
+
* @attr item - The item-ref identifier this button marks; without it, the item it is stamped into, or else the one on screen.
|
|
669
|
+
* @attr bookmarked - Reflected: the item on screen is bookmarked.
|
|
670
|
+
* @attr disabled - Reflected: there is no item on screen.
|
|
671
671
|
*/
|
|
672
|
-
declare class
|
|
672
|
+
declare class TestBookmark extends LitElement {
|
|
673
673
|
#private;
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
674
|
+
protected computedContext?: ComputedContext;
|
|
675
|
+
item?: string;
|
|
676
|
+
bookmarked: boolean;
|
|
677
|
+
disabled: boolean;
|
|
678
|
+
static styles: lit.CSSResult;
|
|
677
679
|
constructor();
|
|
678
680
|
connectedCallback(): void;
|
|
681
|
+
protected willUpdate(): void;
|
|
682
|
+
protected updated(): void;
|
|
679
683
|
render(): lit.TemplateResult<1>;
|
|
680
684
|
}
|
|
681
685
|
declare global {
|
|
682
686
|
interface HTMLElementTagNameMap {
|
|
683
|
-
'test-
|
|
687
|
+
'test-bookmark': TestBookmark;
|
|
684
688
|
}
|
|
685
689
|
}
|
|
686
690
|
|
|
687
|
-
|
|
688
|
-
|
|
691
|
+
/**
|
|
692
|
+
* Ends the attempt on the current item and switches the test to `view` (default `scorer`), which
|
|
693
|
+
* reveals the `[view]` content for that view, such as a scorer's rubric. The view stays until
|
|
694
|
+
* something switches it back (`test-view-toggle`).
|
|
695
|
+
*
|
|
696
|
+
* @attr view - The view to switch to after the attempt ended.
|
|
697
|
+
*/
|
|
698
|
+
declare class TestCheckItem extends LitElement {
|
|
699
|
+
view: View;
|
|
689
700
|
static styles: lit.CSSResult;
|
|
690
|
-
private sectionId;
|
|
691
701
|
constructor();
|
|
692
702
|
render(): lit.TemplateResult<1>;
|
|
693
703
|
}
|
|
694
704
|
declare global {
|
|
695
705
|
interface HTMLElementTagNameMap {
|
|
696
|
-
'test-
|
|
706
|
+
'test-check-item': TestCheckItem;
|
|
697
707
|
}
|
|
698
708
|
}
|
|
699
709
|
|
|
@@ -707,6 +717,45 @@ declare global {
|
|
|
707
717
|
}
|
|
708
718
|
}
|
|
709
719
|
|
|
720
|
+
declare class TestPrintVariables extends LitElement {
|
|
721
|
+
computedContext?: ComputedContext;
|
|
722
|
+
static styles: lit.CSSResult;
|
|
723
|
+
render(): lit.TemplateResult<1>;
|
|
724
|
+
}
|
|
725
|
+
declare global {
|
|
726
|
+
interface HTMLElementTagNameMap {
|
|
727
|
+
'test-print-item-variables': TestPrintVariables;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
declare class TestScoringButtons extends LitElement {
|
|
732
|
+
#private;
|
|
733
|
+
view: string;
|
|
734
|
+
disabled: boolean;
|
|
735
|
+
myTemplate: TemplateFunction | null;
|
|
736
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
737
|
+
connectedCallback(): void;
|
|
738
|
+
protected computedContext?: ComputedContext;
|
|
739
|
+
render(): lit.TemplateResult<1> | typeof nothing;
|
|
740
|
+
constructor();
|
|
741
|
+
}
|
|
742
|
+
declare global {
|
|
743
|
+
interface HTMLElementTagNameMap {
|
|
744
|
+
'test-scoring-buttons': TestScoringButtons;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
declare class TestScoringFeedback extends LitElement {
|
|
749
|
+
protected computedContext?: ComputedContext;
|
|
750
|
+
view: View;
|
|
751
|
+
render(): lit.TemplateResult<1>;
|
|
752
|
+
}
|
|
753
|
+
declare global {
|
|
754
|
+
interface HTMLElementTagNameMap {
|
|
755
|
+
'test-scoring-feedback': TestScoringFeedback;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
710
759
|
/**
|
|
711
760
|
* A custom web component that renders a test stamp using the Lit framework.
|
|
712
761
|
* This component is deprecated and will be removed in the future.
|
|
@@ -733,20 +782,23 @@ declare global {
|
|
|
733
782
|
}
|
|
734
783
|
}
|
|
735
784
|
|
|
736
|
-
declare class
|
|
785
|
+
declare class TestView extends LitElement {
|
|
737
786
|
#private;
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
787
|
+
static DEFAULT_VIEW_OPTIONS: string[];
|
|
788
|
+
private sessionContext;
|
|
789
|
+
/** label accompanying the select view dropdown */
|
|
790
|
+
label: string;
|
|
791
|
+
/** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */
|
|
792
|
+
viewOptions: string;
|
|
793
|
+
protected _handleViewOptionsChange: () => void;
|
|
742
794
|
connectedCallback(): void;
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
795
|
+
private _viewOptions;
|
|
796
|
+
protected _switchView(view: string): void;
|
|
797
|
+
render(): lit.TemplateResult<1>;
|
|
746
798
|
}
|
|
747
799
|
declare global {
|
|
748
800
|
interface HTMLElementTagNameMap {
|
|
749
|
-
'test-
|
|
801
|
+
'test-view': TestView;
|
|
750
802
|
}
|
|
751
803
|
}
|
|
752
804
|
|
|
@@ -765,36 +817,6 @@ declare global {
|
|
|
765
817
|
}
|
|
766
818
|
}
|
|
767
819
|
|
|
768
|
-
declare class TestScoringFeedback extends LitElement {
|
|
769
|
-
protected computedContext?: ComputedContext;
|
|
770
|
-
view: View;
|
|
771
|
-
render(): lit.TemplateResult<1>;
|
|
772
|
-
}
|
|
773
|
-
declare global {
|
|
774
|
-
interface HTMLElementTagNameMap {
|
|
775
|
-
'test-scoring-feedback': TestScoringFeedback;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* Ends the attempt on the current item and switches the test to `view` (default `scorer`), which
|
|
781
|
-
* reveals the `[view]` content for that view, such as a scorer's rubric. The view stays until
|
|
782
|
-
* something switches it back (`test-view-toggle`).
|
|
783
|
-
*
|
|
784
|
-
* @attr view - The view to switch to after the attempt ended.
|
|
785
|
-
*/
|
|
786
|
-
declare class TestCheckItem extends LitElement {
|
|
787
|
-
view: View;
|
|
788
|
-
static styles: lit.CSSResult;
|
|
789
|
-
constructor();
|
|
790
|
-
render(): lit.TemplateResult<1>;
|
|
791
|
-
}
|
|
792
|
-
declare global {
|
|
793
|
-
interface HTMLElementTagNameMap {
|
|
794
|
-
'test-check-item': TestCheckItem;
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
|
|
798
820
|
type SpeechState = 'idle' | 'playing' | 'paused';
|
|
799
821
|
interface TtsContext {
|
|
800
822
|
state: SpeechState;
|
|
@@ -814,9 +836,6 @@ interface TtsContext {
|
|
|
814
836
|
togglePick(): void;
|
|
815
837
|
}
|
|
816
838
|
|
|
817
|
-
declare const ttsContext: {
|
|
818
|
-
__context__: TtsContext;
|
|
819
|
-
};
|
|
820
839
|
/**
|
|
821
840
|
* Base class shared by all TTS control elements. Consumes `ttsContext` and
|
|
822
841
|
* mirrors the current speech state onto CSS custom states so each child can
|
|
@@ -885,10 +904,9 @@ declare abstract class TtsButtonBase extends LitElement {
|
|
|
885
904
|
* 3. **Inside a `qti-assessment-item-ref`** — e.g. in a `<template item-ref>` on `<qti-test>`,
|
|
886
905
|
* so every item gets a player of its own: the player reads that item, and only that item.
|
|
887
906
|
* The navigation cursor is ignored; speech stops when the player leaves the page with its item.
|
|
888
|
-
* 4. **Anywhere else
|
|
889
|
-
* and reads the item
|
|
890
|
-
*
|
|
891
|
-
* item from the top.
|
|
907
|
+
* 4. **Anywhere else inside `<test-navigation>`** — e.g. a toolbar: the player follows the
|
|
908
|
+
* navigation cursor and reads the active item of the computed context. Navigating stops
|
|
909
|
+
* speech and starts the next item from the top.
|
|
892
910
|
*
|
|
893
911
|
* ```html
|
|
894
912
|
* <!-- 1. a player for the shared reading text -->
|
|
@@ -944,9 +962,11 @@ declare class TestItemToSpeech extends LitElement {
|
|
|
944
962
|
static styles: lit.CSSResult;
|
|
945
963
|
/** Fallback language when neither the item content nor the document declares one. */
|
|
946
964
|
language: string;
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
965
|
+
/**
|
|
966
|
+
* The test as `test-navigation` computes it: which item is active, and where it is rendered
|
|
967
|
+
* (`itemElement`). Updated on navigation and whenever an item is rendered.
|
|
968
|
+
*/
|
|
969
|
+
protected _computedContext?: ComputedContext;
|
|
950
970
|
_ttsContext: TtsContext;
|
|
951
971
|
constructor();
|
|
952
972
|
willUpdate(changed: PropertyValues): void;
|
|
@@ -1130,4 +1150,4 @@ declare global {
|
|
|
1130
1150
|
}
|
|
1131
1151
|
}
|
|
1132
1152
|
|
|
1133
|
-
export { TestScoringButtons as A, TestScoringFeedback as B,
|
|
1153
|
+
export { TestScoringButtons as A, TestScoringFeedback as B, TestSectionLink as C, TestStamp as D, TestTtsNext as E, TestTtsPause as F, TestTtsPick as G, TestTtsPlay as H, type ITestNavigationMixin as I, TestTtsPrev as J, TestTtsResume as K, TestTtsStop as L, TestView as M, TestViewToggle as N, bookmarkedItems as O, type QtiTestPluginState as P, QtiAssessmentItemRef as Q, type ItemVariableValue as R, TestBookmark as T, type ITestStateMixin as a, type ItemRefTemplateModel as b, QtiAssessmentSection as c, QtiAssessmentTest as d, QtiBranchRule as e, QtiItemSessionControl as f, QtiNumberPresented as g, QtiNumberSelected as h, QtiOutcomeProcessing as i, QtiOutcomeProcessingProcessor as j, QtiPreCondition as k, QtiTest as l, QtiTestFeedback as m, QtiTestPart as n, QtiTestVariables as o, QtiTestVariablesExpression as p, TestCheckItem as q, TestContainer as r, TestEndAttempt as s, TestItemLink as t, TestItemToSpeech as u, TestNavigation as v, TestNext as w, TestPrev as x, TestPrintContext as y, TestPrintVariables as z };
|
|
@@ -26,6 +26,12 @@ interface SessionContext {
|
|
|
26
26
|
/** @deprecated Never set by the library. Removed in the next major. */
|
|
27
27
|
navTestLoading?: boolean;
|
|
28
28
|
view?: View;
|
|
29
|
+
/**
|
|
30
|
+
* What test plugins keep, by plugin name: JSON the test stores and restores without reading it.
|
|
31
|
+
* Part of the persisted state (`QtiTestState.session.plugins`); written through the
|
|
32
|
+
* `cito-test-update-plugin-state` request.
|
|
33
|
+
*/
|
|
34
|
+
plugins?: Readonly<Record<string, unknown>>;
|
|
29
35
|
}
|
|
30
36
|
declare const INITIAL_SESSION_CONTEXT: Readonly<SessionContext>;
|
|
31
37
|
declare const sessionContext: {
|
package/dist/test.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression,
|
|
1
|
+
import { u as TestItemToSpeech, E as TestTtsNext, F as TestTtsPause, G as TestTtsPick, H as TestTtsPlay, J as TestTtsPrev, K as TestTtsResume, L as TestTtsStop, q as TestCheckItem, T as TestBookmark, y as TestPrintContext, z as TestPrintVariables, A as TestScoringButtons, B as TestScoringFeedback, D as TestStamp, M as TestView, N as TestViewToggle, P as QtiTestPluginState$1, R as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-Cra3sS-2.js';
|
|
2
|
+
export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, r as TestContainer, s as TestEndAttempt, t as TestItemLink, v as TestNavigation, w as TestNext, x as TestPrev, C as TestSectionLink, O as bookmarkedItems } from './qti-test.d-Cra3sS-2.js';
|
|
3
|
+
import { C as ComputedContext } from './computed.types.d-DvxBgnze.js';
|
|
3
4
|
import { LitElement } from 'lit';
|
|
4
5
|
import { b as ItemContext, c as OutcomeVariable, V as VariableDeclaration } from './item.types.d-B55QkJ92.js';
|
|
5
|
-
import { S as SessionContext } from './session.context.d-
|
|
6
|
+
import { S as SessionContext } from './session.context.d-DYAdqSer.js';
|
|
6
7
|
import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
|
|
7
8
|
import { T as TestContext } from './qti-expression.d-BPxEp8HU.js';
|
|
8
9
|
import './qti-transform-test.d-BL7GGFJj.js';
|
|
9
|
-
import './computed.types.d-gJrBeUMG.js';
|
|
10
10
|
import './elements.js';
|
|
11
11
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
12
12
|
import './qti-feedback.d-wMYNVkkj.js';
|
|
@@ -14,6 +14,100 @@ import './qti-rule-base.d-Bdzg8eGH.js';
|
|
|
14
14
|
import './qti.context.d-CejJMlfZ.js';
|
|
15
15
|
import '@heximal/templates';
|
|
16
16
|
|
|
17
|
+
/** The text-to-speech elements, for registering them yourself (e.g. in a scoped registry). Defines nothing. */
|
|
18
|
+
declare const ttsElements: readonly [{
|
|
19
|
+
readonly tag: "test-item-to-speech";
|
|
20
|
+
readonly ctor: typeof TestItemToSpeech;
|
|
21
|
+
}, {
|
|
22
|
+
readonly tag: "test-tts-next";
|
|
23
|
+
readonly ctor: typeof TestTtsNext;
|
|
24
|
+
}, {
|
|
25
|
+
readonly tag: "test-tts-pause";
|
|
26
|
+
readonly ctor: typeof TestTtsPause;
|
|
27
|
+
}, {
|
|
28
|
+
readonly tag: "test-tts-pick";
|
|
29
|
+
readonly ctor: typeof TestTtsPick;
|
|
30
|
+
}, {
|
|
31
|
+
readonly tag: "test-tts-play";
|
|
32
|
+
readonly ctor: typeof TestTtsPlay;
|
|
33
|
+
}, {
|
|
34
|
+
readonly tag: "test-tts-prev";
|
|
35
|
+
readonly ctor: typeof TestTtsPrev;
|
|
36
|
+
}, {
|
|
37
|
+
readonly tag: "test-tts-resume";
|
|
38
|
+
readonly ctor: typeof TestTtsResume;
|
|
39
|
+
}, {
|
|
40
|
+
readonly tag: "test-tts-stop";
|
|
41
|
+
readonly ctor: typeof TestTtsStop;
|
|
42
|
+
}];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Every test plugin's elements in one list. `qti-test` registers them with the rest of its
|
|
46
|
+
* elements, and a scoped registry can use the list directly. Defines nothing.
|
|
47
|
+
*
|
|
48
|
+
* A plugin is the set of files listed for it in `plugin-boundary.spec.ts` (`PLUGINS`); this file is
|
|
49
|
+
* the one place that names them all.
|
|
50
|
+
*/
|
|
51
|
+
declare const pluginElements: readonly [{
|
|
52
|
+
readonly tag: "test-check-item";
|
|
53
|
+
readonly ctor: typeof TestCheckItem;
|
|
54
|
+
}, {
|
|
55
|
+
readonly tag: "test-bookmark";
|
|
56
|
+
readonly ctor: typeof TestBookmark;
|
|
57
|
+
}, {
|
|
58
|
+
readonly tag: "test-print-context";
|
|
59
|
+
readonly ctor: typeof TestPrintContext;
|
|
60
|
+
}, {
|
|
61
|
+
readonly tag: "test-print-item-variables";
|
|
62
|
+
readonly ctor: typeof TestPrintVariables;
|
|
63
|
+
}, {
|
|
64
|
+
readonly tag: "test-scoring-buttons";
|
|
65
|
+
readonly ctor: typeof TestScoringButtons;
|
|
66
|
+
}, {
|
|
67
|
+
readonly tag: "test-scoring-feedback";
|
|
68
|
+
readonly ctor: typeof TestScoringFeedback;
|
|
69
|
+
}, {
|
|
70
|
+
readonly tag: "test-stamp";
|
|
71
|
+
readonly ctor: typeof TestStamp;
|
|
72
|
+
}, {
|
|
73
|
+
readonly tag: "test-view";
|
|
74
|
+
readonly ctor: typeof TestView;
|
|
75
|
+
}, {
|
|
76
|
+
readonly tag: "test-view-toggle";
|
|
77
|
+
readonly ctor: typeof TestViewToggle;
|
|
78
|
+
}, {
|
|
79
|
+
readonly tag: "test-item-to-speech";
|
|
80
|
+
readonly ctor: typeof TestItemToSpeech;
|
|
81
|
+
}, {
|
|
82
|
+
readonly tag: "test-tts-next";
|
|
83
|
+
readonly ctor: typeof TestTtsNext;
|
|
84
|
+
}, {
|
|
85
|
+
readonly tag: "test-tts-pause";
|
|
86
|
+
readonly ctor: typeof TestTtsPause;
|
|
87
|
+
}, {
|
|
88
|
+
readonly tag: "test-tts-pick";
|
|
89
|
+
readonly ctor: typeof TestTtsPick;
|
|
90
|
+
}, {
|
|
91
|
+
readonly tag: "test-tts-play";
|
|
92
|
+
readonly ctor: typeof TestTtsPlay;
|
|
93
|
+
}, {
|
|
94
|
+
readonly tag: "test-tts-prev";
|
|
95
|
+
readonly ctor: typeof TestTtsPrev;
|
|
96
|
+
}, {
|
|
97
|
+
readonly tag: "test-tts-resume";
|
|
98
|
+
readonly ctor: typeof TestTtsResume;
|
|
99
|
+
}, {
|
|
100
|
+
readonly tag: "test-tts-stop";
|
|
101
|
+
readonly ctor: typeof TestTtsStop;
|
|
102
|
+
}];
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A plugin's entry in the state, typed through `QtiTestPluginState`, or `undefined` before the
|
|
106
|
+
* plugin has stored anything. Read it from `computedContext`; write it by dispatching
|
|
107
|
+
* `cito-test-update-plugin-state` (`dispatchPublic`).
|
|
108
|
+
*/
|
|
109
|
+
declare const pluginState: <K extends keyof QtiTestPluginState$1 & string>(context: Pick<ComputedContext, "plugins"> | undefined, plugin: K) => QtiTestPluginState$1[K] | undefined;
|
|
110
|
+
|
|
17
111
|
interface IQtiTest extends LitElement, ITestNavigationMixin, ITestProcessingMixin, ITestStateMixin, IMyQtiTest {
|
|
18
112
|
}
|
|
19
113
|
interface IMyQtiTest {
|
|
@@ -68,12 +162,23 @@ interface QtiTestStateValue {
|
|
|
68
162
|
identifier: string;
|
|
69
163
|
value: string | string[] | null;
|
|
70
164
|
}
|
|
71
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* What each plugin keeps in the state, by plugin name. Empty here: a plugin adds its own entry by
|
|
167
|
+
* augmenting this interface (`declare module` on the module that declares it, with
|
|
168
|
+
* `interface QtiTestPluginState { bookmarks: string[] }`), and reads it with
|
|
169
|
+
* `pluginState(computedContext, 'bookmarks')`. The test never reads an entry; it
|
|
170
|
+
* stores and restores it, so a value must survive `JSON.stringify`.
|
|
171
|
+
*/
|
|
172
|
+
interface QtiTestPluginState {
|
|
173
|
+
}
|
|
174
|
+
/** Where the candidate is, and what plugins keep. */
|
|
72
175
|
interface QtiTestStateSession {
|
|
176
|
+
/** Plugin entries by plugin name. Entries of plugins that are not loaded are kept as they are. */
|
|
177
|
+
plugins?: Partial<QtiTestPluginState> & Record<string, unknown>;
|
|
73
178
|
navPartId?: string | null;
|
|
74
179
|
navSectionId?: string | null;
|
|
75
180
|
navItemRefId?: string | null;
|
|
76
181
|
}
|
|
77
182
|
declare const QTI_TEST_STATE_VERSION = 1;
|
|
78
183
|
|
|
79
|
-
export { type IMyQtiTest, type IQtiTest, ITestNavigationMixin, type ITestProcessingMixin, ITestStateMixin, QTI_TEST_STATE_VERSION, type QtiTestState, type QtiTestStateItem, type QtiTestStateSession, type QtiTestStateValue };
|
|
184
|
+
export { type IMyQtiTest, type IQtiTest, ITestNavigationMixin, type ITestProcessingMixin, ITestStateMixin, QTI_TEST_STATE_VERSION, type QtiTestPluginState, type QtiTestState, type QtiTestStateItem, type QtiTestStateSession, type QtiTestStateValue, TestBookmark, TestCheckItem, TestItemToSpeech, TestPrintContext, TestPrintVariables, TestScoringButtons, TestScoringFeedback, TestStamp, TestTtsNext, TestTtsPause, TestTtsPick, TestTtsPlay, TestTtsPrev, TestTtsResume, TestTtsStop, TestView, TestViewToggle, pluginElements, pluginState, ttsElements };
|
package/dist/test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-WV53LUE3.js";
|
|
2
2
|
import {
|
|
3
3
|
QTI_TEST_STATE_VERSION,
|
|
4
4
|
QtiAssessmentItemRef,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
QtiTestPart,
|
|
17
17
|
QtiTestVariables,
|
|
18
18
|
QtiTestVariablesExpression,
|
|
19
|
+
TestBookmark,
|
|
19
20
|
TestCheckItem,
|
|
20
21
|
TestContainer,
|
|
21
22
|
TestEndAttempt,
|
|
@@ -23,13 +24,11 @@ import {
|
|
|
23
24
|
TestItemToSpeech,
|
|
24
25
|
TestNavigation,
|
|
25
26
|
TestNext,
|
|
26
|
-
TestPagingButtonsStamp,
|
|
27
27
|
TestPrev,
|
|
28
28
|
TestPrintContext,
|
|
29
29
|
TestPrintVariables,
|
|
30
30
|
TestScoringButtons,
|
|
31
31
|
TestScoringFeedback,
|
|
32
|
-
TestSectionButtonsStamp,
|
|
33
32
|
TestSectionLink,
|
|
34
33
|
TestStamp,
|
|
35
34
|
TestTtsNext,
|
|
@@ -41,13 +40,16 @@ import {
|
|
|
41
40
|
TestTtsStop,
|
|
42
41
|
TestView,
|
|
43
42
|
TestViewToggle,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
bookmarkedItems,
|
|
44
|
+
pluginElements,
|
|
45
|
+
pluginState,
|
|
46
|
+
ttsElements
|
|
47
|
+
} from "./chunk-A2AP6CUL.js";
|
|
48
|
+
import "./chunk-QU23PPEZ.js";
|
|
47
49
|
import "./chunk-ZP6QQYSU.js";
|
|
48
50
|
import "./chunk-4DB4SC5K.js";
|
|
49
51
|
import "./chunk-TLAVOBEM.js";
|
|
50
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-JZZMY3FA.js";
|
|
51
53
|
export {
|
|
52
54
|
QTI_TEST_STATE_VERSION,
|
|
53
55
|
QtiAssessmentItemRef,
|
|
@@ -65,6 +67,7 @@ export {
|
|
|
65
67
|
QtiTestPart,
|
|
66
68
|
QtiTestVariables,
|
|
67
69
|
QtiTestVariablesExpression,
|
|
70
|
+
TestBookmark,
|
|
68
71
|
TestCheckItem,
|
|
69
72
|
TestContainer,
|
|
70
73
|
TestEndAttempt,
|
|
@@ -72,13 +75,11 @@ export {
|
|
|
72
75
|
TestItemToSpeech,
|
|
73
76
|
TestNavigation,
|
|
74
77
|
TestNext,
|
|
75
|
-
TestPagingButtonsStamp,
|
|
76
78
|
TestPrev,
|
|
77
79
|
TestPrintContext,
|
|
78
80
|
TestPrintVariables,
|
|
79
81
|
TestScoringButtons,
|
|
80
82
|
TestScoringFeedback,
|
|
81
|
-
TestSectionButtonsStamp,
|
|
82
83
|
TestSectionLink,
|
|
83
84
|
TestStamp,
|
|
84
85
|
TestTtsNext,
|
|
@@ -90,6 +91,9 @@ export {
|
|
|
90
91
|
TestTtsStop,
|
|
91
92
|
TestView,
|
|
92
93
|
TestViewToggle,
|
|
93
|
-
|
|
94
|
+
bookmarkedItems,
|
|
95
|
+
pluginElements,
|
|
96
|
+
pluginState,
|
|
97
|
+
ttsElements
|
|
94
98
|
};
|
|
95
99
|
//# sourceMappingURL=test.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/qti-components",
|
|
3
3
|
"description": "QTI component utilities",
|
|
4
|
-
"version": "10.0.0-next.
|
|
4
|
+
"version": "10.0.0-next.5",
|
|
5
5
|
"author": "",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@heximal/templates": "^0.1.5",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"lit-html": "^3.3.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@qti-components/base": "^2.
|
|
14
|
-
"@qti-components/corrections": "^0.4.1-next.
|
|
15
|
-
"@qti-components/elements": "^1.10.0-next.
|
|
16
|
-
"@qti-components/interactions": "^1.10.5-next.
|
|
17
|
-
"@qti-components/item": "^1.5.1-next.
|
|
13
|
+
"@qti-components/base": "^2.5.0-next.1",
|
|
14
|
+
"@qti-components/corrections": "^0.4.1-next.3",
|
|
15
|
+
"@qti-components/elements": "^1.10.0-next.2",
|
|
16
|
+
"@qti-components/interactions": "^1.10.5-next.2",
|
|
17
|
+
"@qti-components/item": "^1.5.1-next.2",
|
|
18
18
|
"@qti-components/loader": "^1.3.4-next.0",
|
|
19
|
-
"@qti-components/processing": "^1.6.1-next.
|
|
20
|
-
"@qti-components/test": "^2.0.0-next.
|
|
19
|
+
"@qti-components/processing": "^1.6.1-next.1",
|
|
20
|
+
"@qti-components/test": "^2.0.0-next.5",
|
|
21
21
|
"@qti-components/theme": "^2.2.2-next.0",
|
|
22
22
|
"@qti-components/transformers": "^1.7.3"
|
|
23
23
|
},
|