@citolab/qti-components 7.16.0 → 7.16.1
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/dist/base.d.ts +48 -8
- package/dist/base.js +49 -2
- package/dist/base.js.map +1 -1
- package/dist/chunk-2DOYPVF5.js +481 -0
- package/dist/chunk-2DOYPVF5.js.map +1 -0
- package/dist/chunk-2ZEJ3RR5.js +89 -0
- package/dist/chunk-2ZEJ3RR5.js.map +1 -0
- package/dist/chunk-352OTVTY.js +3330 -0
- package/dist/chunk-352OTVTY.js.map +1 -0
- package/dist/chunk-C2HQFI2C.js +5927 -0
- package/dist/chunk-C2HQFI2C.js.map +1 -0
- package/dist/chunk-DWIRLYDS.js +20 -0
- package/dist/chunk-DWIRLYDS.js.map +1 -0
- package/dist/chunk-EUXUH3YW.js +15 -0
- package/dist/chunk-EUXUH3YW.js.map +1 -0
- package/dist/chunk-F44CI35W.js +145 -0
- package/dist/chunk-F44CI35W.js.map +1 -0
- package/dist/chunk-INKI27D5.js +493 -0
- package/dist/chunk-INKI27D5.js.map +1 -0
- package/dist/chunk-JEUY3MYB.js +2010 -0
- package/dist/chunk-JEUY3MYB.js.map +1 -0
- package/dist/chunk-O4XIWHTF.js +1139 -0
- package/dist/chunk-O4XIWHTF.js.map +1 -0
- package/dist/chunk-RI47B4ZT.js +1753 -0
- package/dist/chunk-RI47B4ZT.js.map +1 -0
- package/dist/chunk-VEV4DGPH.js +31 -0
- package/dist/chunk-VEV4DGPH.js.map +1 -0
- package/dist/chunk-W4SQRNWO.js +3844 -0
- package/dist/chunk-W4SQRNWO.js.map +1 -0
- package/dist/computed-item.context-CiddHLPz.d.ts +22 -0
- package/dist/computed.context-CH09_LCR.d.ts +45 -0
- package/dist/config.context-DAdkDDf5.d.ts +14 -0
- package/dist/elements.d.ts +318 -1
- package/dist/elements.js +41 -2
- package/dist/elements.js.map +1 -1
- package/dist/index.d.ts +21 -8
- package/dist/index.js +327 -9
- package/dist/index.js.map +1 -1
- package/dist/interaction-C5Up6-68.d.ts +56 -0
- package/dist/interactions.d.ts +913 -1
- package/dist/interactions.js +71 -2
- package/dist/interactions.js.map +1 -1
- package/dist/item.context-BRKXBC3m.d.ts +10 -0
- package/dist/item.d.ts +147 -1
- package/dist/item.js +22 -2
- package/dist/item.js.map +1 -1
- package/dist/loader.d.ts +21 -1
- package/dist/loader.js +10 -2
- package/dist/loader.js.map +1 -1
- package/dist/processing.d.ts +393 -1
- package/dist/processing.js +102 -2
- package/dist/processing.js.map +1 -1
- package/dist/qti-feedback-B4cMzOcq.d.ts +21 -0
- package/dist/qti-rule-base-dL4opfvi.d.ts +39 -0
- package/dist/qti-transform-test-Bz9A3hmD.d.ts +63 -0
- package/dist/test.context-Bpw1HNAZ.d.ts +28 -0
- package/dist/test.d.ts +569 -1
- package/dist/test.js +60 -2
- package/dist/test.js.map +1 -1
- package/dist/transformers.d.ts +18 -1
- package/dist/transformers.js +11 -2
- package/dist/transformers.js.map +1 -1
- package/dist/variables-CusMRnyJ.d.ts +69 -0
- package/package.json +8 -14
package/dist/interactions.js
CHANGED
|
@@ -1,3 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
QtiAssociableHotspot,
|
|
3
|
+
QtiAssociateInteraction,
|
|
4
|
+
QtiChoiceInteraction,
|
|
5
|
+
QtiCustomInteraction,
|
|
6
|
+
QtiEndAttemptInteraction,
|
|
7
|
+
QtiExtendedTextInteraction,
|
|
8
|
+
QtiGap,
|
|
9
|
+
QtiGapImg,
|
|
10
|
+
QtiGapMatchInteraction,
|
|
11
|
+
QtiGapText,
|
|
12
|
+
QtiGraphicAssociateInteraction,
|
|
13
|
+
QtiGraphicGapMatchInteraction,
|
|
14
|
+
QtiGraphicOrderInteraction,
|
|
15
|
+
QtiHotspotChoice,
|
|
16
|
+
QtiHotspotInteraction,
|
|
17
|
+
QtiHottext,
|
|
18
|
+
QtiHottextInteraction,
|
|
19
|
+
QtiInlineChoice,
|
|
20
|
+
QtiInlineChoiceInteraction,
|
|
21
|
+
QtiMatchInteraction,
|
|
22
|
+
QtiMediaInteraction,
|
|
23
|
+
QtiOrderInteraction,
|
|
24
|
+
QtiPortableCustomInteraction,
|
|
25
|
+
QtiPositionObjectInteraction,
|
|
26
|
+
QtiPositionObjectStage,
|
|
27
|
+
QtiSelectPointInteraction,
|
|
28
|
+
QtiSimpleAssociableChoice,
|
|
29
|
+
QtiSimpleChoice,
|
|
30
|
+
QtiSliderInteraction,
|
|
31
|
+
QtiTextEntryInteraction,
|
|
32
|
+
QtiUploadInteraction
|
|
33
|
+
} from "./chunk-C2HQFI2C.js";
|
|
34
|
+
import "./chunk-DWIRLYDS.js";
|
|
35
|
+
import "./chunk-F44CI35W.js";
|
|
36
|
+
import "./chunk-2ZEJ3RR5.js";
|
|
37
|
+
import "./chunk-JEUY3MYB.js";
|
|
38
|
+
import "./chunk-EUXUH3YW.js";
|
|
39
|
+
export {
|
|
40
|
+
QtiAssociableHotspot,
|
|
41
|
+
QtiAssociateInteraction,
|
|
42
|
+
QtiChoiceInteraction,
|
|
43
|
+
QtiCustomInteraction,
|
|
44
|
+
QtiEndAttemptInteraction,
|
|
45
|
+
QtiExtendedTextInteraction,
|
|
46
|
+
QtiGap,
|
|
47
|
+
QtiGapImg,
|
|
48
|
+
QtiGapMatchInteraction,
|
|
49
|
+
QtiGapText,
|
|
50
|
+
QtiGraphicAssociateInteraction,
|
|
51
|
+
QtiGraphicGapMatchInteraction,
|
|
52
|
+
QtiGraphicOrderInteraction,
|
|
53
|
+
QtiHotspotChoice,
|
|
54
|
+
QtiHotspotInteraction,
|
|
55
|
+
QtiHottext,
|
|
56
|
+
QtiHottextInteraction,
|
|
57
|
+
QtiInlineChoice,
|
|
58
|
+
QtiInlineChoiceInteraction,
|
|
59
|
+
QtiMatchInteraction,
|
|
60
|
+
QtiMediaInteraction,
|
|
61
|
+
QtiOrderInteraction,
|
|
62
|
+
QtiPortableCustomInteraction,
|
|
63
|
+
QtiPositionObjectInteraction,
|
|
64
|
+
QtiPositionObjectStage,
|
|
65
|
+
QtiSelectPointInteraction,
|
|
66
|
+
QtiSimpleAssociableChoice,
|
|
67
|
+
QtiSimpleChoice,
|
|
68
|
+
QtiSliderInteraction,
|
|
69
|
+
QtiTextEntryInteraction,
|
|
70
|
+
QtiUploadInteraction
|
|
71
|
+
};
|
|
3
72
|
//# sourceMappingURL=interactions.js.map
|
package/dist/interactions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h as VariableDeclaration } from './variables-CusMRnyJ.js';
|
|
2
|
+
|
|
3
|
+
interface ItemContext {
|
|
4
|
+
identifier?: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
variables?: ReadonlyArray<VariableDeclaration<string | string[] | null>>;
|
|
7
|
+
}
|
|
8
|
+
declare const itemContextVariables: VariableDeclaration<string | string[]>[];
|
|
9
|
+
|
|
10
|
+
export { type ItemContext as I, itemContextVariables as i };
|
package/dist/item.d.ts
CHANGED
|
@@ -1 +1,147 @@
|
|
|
1
|
-
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { C as ComputedItemContext } from './computed-item.context-CiddHLPz.js';
|
|
4
|
+
import { a as ConfigContext } from './config.context-DAdkDDf5.js';
|
|
5
|
+
import './variables-CusMRnyJ.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* `<item-container>` is a custom element designed for hosting the qti-assessment-item.
|
|
9
|
+
* The `qti-assessment-item` will be placed inside the shadow DOM of this element.
|
|
10
|
+
* The element loads the item from the provided URL and renders it inside the shadow DOM.
|
|
11
|
+
*
|
|
12
|
+
* ### Styling
|
|
13
|
+
* Add a class to the element for styling.
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <qti-item>
|
|
17
|
+
* <item-container class="m-4 bg-white" item-url="./path/to/item.xml"></item-container>
|
|
18
|
+
* </qti-item>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare class ItemContainer extends LitElement {
|
|
22
|
+
/** URL of the item to load */
|
|
23
|
+
itemURL: string;
|
|
24
|
+
/** A parsed HTML document */
|
|
25
|
+
itemDoc: DocumentFragment;
|
|
26
|
+
/** The raw XML string */
|
|
27
|
+
itemXML: string;
|
|
28
|
+
/** Template content if provided */
|
|
29
|
+
private templateContent;
|
|
30
|
+
protected handleItemURLChange(): Promise<void>;
|
|
31
|
+
protected handleItemXMLChange(): void;
|
|
32
|
+
connectedCallback(): Promise<void>;
|
|
33
|
+
private initializeTemplateContent;
|
|
34
|
+
private applyStyles;
|
|
35
|
+
render(): lit.TemplateResult<1>;
|
|
36
|
+
}
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
'item-container': ItemContainer;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class ItemCorrectResponseMode extends LitElement {
|
|
44
|
+
private itemContext;
|
|
45
|
+
label: string;
|
|
46
|
+
private _options;
|
|
47
|
+
private _switchMode;
|
|
48
|
+
render(): lit.TemplateResult<1>;
|
|
49
|
+
}
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
'item-correct-response-mode': ItemCorrectResponseMode;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class ItemShowCandidateCorrection extends LitElement {
|
|
57
|
+
computedContext?: ComputedItemContext;
|
|
58
|
+
static styles: lit.CSSResult;
|
|
59
|
+
shown: boolean;
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
showCandidateCorrectionText: string;
|
|
62
|
+
hideCandidateCorrectionText: string;
|
|
63
|
+
noCorrectResponseText: string;
|
|
64
|
+
private _hasCorrectResponse;
|
|
65
|
+
private _previousActiveItem;
|
|
66
|
+
constructor();
|
|
67
|
+
updated(): void;
|
|
68
|
+
private _toggleState;
|
|
69
|
+
private _getDisplayedText;
|
|
70
|
+
render(): lit.TemplateResult<1>;
|
|
71
|
+
}
|
|
72
|
+
declare global {
|
|
73
|
+
interface HTMLElementTagNameMap {
|
|
74
|
+
'item-show-candidate-correction': ItemShowCandidateCorrection;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare class ItemShowCorrectResponse extends LitElement {
|
|
79
|
+
computedContext?: ComputedItemContext;
|
|
80
|
+
static styles: lit.CSSResult;
|
|
81
|
+
shown: boolean;
|
|
82
|
+
disabled: boolean;
|
|
83
|
+
showCorrectText: string;
|
|
84
|
+
hideCorrectText: string;
|
|
85
|
+
noCorrectResponseText: string;
|
|
86
|
+
private _hasCorrectResponse;
|
|
87
|
+
private _previousActiveItem;
|
|
88
|
+
updated(): void;
|
|
89
|
+
private _toggleState;
|
|
90
|
+
private _getDisplayedText;
|
|
91
|
+
render(): lit.TemplateResult<1>;
|
|
92
|
+
}
|
|
93
|
+
declare global {
|
|
94
|
+
interface HTMLElementTagNameMap {
|
|
95
|
+
'item-show-correct-response': ItemShowCorrectResponse;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare class ItemPrintVariables extends LitElement {
|
|
100
|
+
protected computedContext?: ComputedItemContext;
|
|
101
|
+
static styles: lit.CSSResult;
|
|
102
|
+
render(): lit.TemplateResult<1>;
|
|
103
|
+
}
|
|
104
|
+
declare global {
|
|
105
|
+
interface HTMLElementTagNameMap {
|
|
106
|
+
'item-print-variables': ItemPrintVariables;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* `<qti-item>` is a custom element designed for rendering a single `qti-assessment-item`.
|
|
112
|
+
* It can also host some functionalities to interact with the item like scoring, showing feedback, etc.
|
|
113
|
+
* Placing a mandatory `<item-container>` inside '<qti-item>' will load or parse the item and render it.
|
|
114
|
+
* See `<item-container>` for more details.
|
|
115
|
+
*
|
|
116
|
+
* ```html
|
|
117
|
+
* <qti-item>
|
|
118
|
+
* <item-container class="m-4 bg-white" item-url="./path/to/item.xml"></item-container>
|
|
119
|
+
* </qti-item>
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
declare class QtiItem extends LitElement {
|
|
123
|
+
computedContext: ComputedItemContext;
|
|
124
|
+
private _qtiAssessmentItem?;
|
|
125
|
+
configContext: ConfigContext;
|
|
126
|
+
private _onItemContextChanged;
|
|
127
|
+
private _onAssessmentItemConnected;
|
|
128
|
+
private _onHandleShowCorrectResponse;
|
|
129
|
+
private _onHandleShowCandidateCorrection;
|
|
130
|
+
private _onHandleSwitchCorrectResponseMode;
|
|
131
|
+
constructor();
|
|
132
|
+
private _handleItemContextChanged;
|
|
133
|
+
private _handleAssessmentItemConnected;
|
|
134
|
+
private _handleShowCorrectResponse;
|
|
135
|
+
private _handleShowCandidateCorrection;
|
|
136
|
+
private _handleSwitchCorrectResponseMode;
|
|
137
|
+
private _updateItemVariablesInTestContext;
|
|
138
|
+
render(): lit.TemplateResult<1>;
|
|
139
|
+
disconnectedCallback(): void;
|
|
140
|
+
}
|
|
141
|
+
declare global {
|
|
142
|
+
interface HTMLElementTagNameMap {
|
|
143
|
+
'qti-item': QtiItem;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export { ItemContainer, ItemCorrectResponseMode, ItemPrintVariables, ItemShowCandidateCorrection, ItemShowCorrectResponse, QtiItem };
|
package/dist/item.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
ItemContainer,
|
|
3
|
+
ItemCorrectResponseMode,
|
|
4
|
+
ItemPrintVariables,
|
|
5
|
+
ItemShowCandidateCorrection,
|
|
6
|
+
ItemShowCorrectResponse,
|
|
7
|
+
QtiItem
|
|
8
|
+
} from "./chunk-2DOYPVF5.js";
|
|
9
|
+
import "./chunk-W4SQRNWO.js";
|
|
10
|
+
import "./chunk-F44CI35W.js";
|
|
11
|
+
import "./chunk-2ZEJ3RR5.js";
|
|
12
|
+
import "./chunk-INKI27D5.js";
|
|
13
|
+
import "./chunk-JEUY3MYB.js";
|
|
14
|
+
import "./chunk-EUXUH3YW.js";
|
|
15
|
+
export {
|
|
16
|
+
ItemContainer,
|
|
17
|
+
ItemCorrectResponseMode,
|
|
18
|
+
ItemPrintVariables,
|
|
19
|
+
ItemShowCandidateCorrection,
|
|
20
|
+
ItemShowCorrectResponse,
|
|
21
|
+
QtiItem
|
|
22
|
+
};
|
|
3
23
|
//# sourceMappingURL=item.js.map
|
package/dist/item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/loader.d.ts
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { QtiAssessmentItem } from './elements.js';
|
|
2
|
+
import 'lit';
|
|
3
|
+
import './variables-CusMRnyJ.js';
|
|
4
|
+
import './qti-feedback-B4cMzOcq.js';
|
|
5
|
+
import './item.context-BRKXBC3m.js';
|
|
6
|
+
|
|
7
|
+
type ManifestInfo = {
|
|
8
|
+
testIdentifier: string;
|
|
9
|
+
testHTMLDoc: DocumentFragment;
|
|
10
|
+
testURI: string;
|
|
11
|
+
testURL: string;
|
|
12
|
+
items: {
|
|
13
|
+
identifier: string;
|
|
14
|
+
href: string;
|
|
15
|
+
category: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
declare const getManifestInfo: (manifestURL: string) => Promise<ManifestInfo>;
|
|
19
|
+
declare const getItemByUri: (itemUri: string) => Promise<QtiAssessmentItem>;
|
|
20
|
+
|
|
21
|
+
export { type ManifestInfo, getItemByUri, getManifestInfo };
|
package/dist/loader.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
getItemByUri,
|
|
3
|
+
getManifestInfo
|
|
4
|
+
} from "./chunk-VEV4DGPH.js";
|
|
5
|
+
import "./chunk-INKI27D5.js";
|
|
6
|
+
import "./chunk-EUXUH3YW.js";
|
|
7
|
+
export {
|
|
8
|
+
getItemByUri,
|
|
9
|
+
getManifestInfo
|
|
10
|
+
};
|
|
3
11
|
//# sourceMappingURL=loader.js.map
|
package/dist/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|