@citolab/qti-components 6.0.2 → 6.0.3-0
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/ExpressionResult-b1ac7b27.d.ts +23 -0
- package/dist/chunk-DLLHO3W2.js +1 -0
- package/dist/chunk-M3YT56HW.js +1437 -0
- package/dist/custom-elements.json +4123 -17029
- package/dist/index.js +2237 -0
- package/dist/qti-assessment-item-219cef9e.d.ts +102 -0
- package/dist/qti-components/index.d.ts +184 -335
- package/dist/qti-components/index.js +146 -104
- package/dist/qti-components.js +13502 -0
- package/dist/qti-item/index.d.ts +13 -6
- package/dist/qti-item/index.js +1 -17
- package/dist/qti-item-react/index.d.ts +19 -0
- package/dist/qti-item-react/index.js +1 -0
- package/dist/qti-rule-5fe4f91e.d.ts +303 -0
- package/dist/qti-test/index.d.ts +2 -2
- package/dist/qti-test/index.js +13 -11
- package/dist/themes/qti.css +142 -112
- package/dist/vite.svg +1 -0
- package/package.json +1 -1
- package/dist/ExpressionResult-2192c3d8.d.ts +0 -33
- package/dist/chunk-2TX3IEPD.cjs +0 -1
- package/dist/chunk-HOQW4KDA.cjs +0 -1
- package/dist/chunk-JLKCCEGG.cjs +0 -1
- package/dist/chunk-JQY6IKDF.js +0 -1
- package/dist/chunk-L6436D6O.js +0 -1
- package/dist/qti-assessment-item-e9f437d6.d.ts +0 -117
- package/dist/qti-components/index.cjs +0 -403
- package/dist/qti-item/index.cjs +0 -17
- package/dist/qti-test/index.cjs +0 -12
- package/dist/qti-transform/index.cjs +0 -102
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { C as Cardinality, B as BaseType, R as ResponseInteraction } from './ExpressionResult-b1ac7b27.js';
|
|
4
|
+
|
|
5
|
+
interface VariableDeclaration<T> {
|
|
6
|
+
identifier: string;
|
|
7
|
+
cardinality: Cardinality;
|
|
8
|
+
baseType: BaseType;
|
|
9
|
+
value: T;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class QtiMapping extends LitElement {
|
|
13
|
+
defaultValue: number;
|
|
14
|
+
lowerBound: number;
|
|
15
|
+
upperBound: number;
|
|
16
|
+
get mapEntries(): {
|
|
17
|
+
mapKey: string;
|
|
18
|
+
mappedValue: number;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class ResponseVariable implements VariableDeclaration<string | string[]> {
|
|
23
|
+
private _candidateResponse;
|
|
24
|
+
private _mapping;
|
|
25
|
+
private _correctResponse;
|
|
26
|
+
private _cardinality;
|
|
27
|
+
private _identifier;
|
|
28
|
+
private _basetype;
|
|
29
|
+
private _qtiVariable;
|
|
30
|
+
constructor({ mapping, correctResponse, cardinality, baseType, identifier, }: {
|
|
31
|
+
mapping: QtiMapping;
|
|
32
|
+
correctResponse: string | string[];
|
|
33
|
+
cardinality: Cardinality;
|
|
34
|
+
baseType: BaseType;
|
|
35
|
+
identifier: string;
|
|
36
|
+
});
|
|
37
|
+
get mapping(): QtiMapping;
|
|
38
|
+
get correctResponse(): string | string[];
|
|
39
|
+
get cardinality(): Cardinality;
|
|
40
|
+
get baseType(): BaseType;
|
|
41
|
+
get identifier(): string;
|
|
42
|
+
get value(): string | string[];
|
|
43
|
+
set value(val: string | string[]);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class OutcomeVariable implements VariableDeclaration<number> {
|
|
47
|
+
identifier: string;
|
|
48
|
+
cardinality: Cardinality;
|
|
49
|
+
baseType: BaseType;
|
|
50
|
+
value: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @summary The qti-assessment-item element contains all the other QTI 3 item structures.
|
|
55
|
+
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.dltnnj87l0yj
|
|
56
|
+
* @status stable
|
|
57
|
+
* @since 4.0
|
|
58
|
+
*
|
|
59
|
+
* @dependency qti-feedback
|
|
60
|
+
* @dependency qti-responseprocessing
|
|
61
|
+
*
|
|
62
|
+
* @slot - The default slot where all the other QTI 3 item structures go.
|
|
63
|
+
*
|
|
64
|
+
* @event qti-interaction-changed - Emitted when an interaction is changed.
|
|
65
|
+
* @event qti-outcome-changed - Emitted when the radio group receives user input.
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
declare class QtiAssessmentItem extends LitElement {
|
|
69
|
+
variables: VariableDeclaration<(string | string[]) | number>[];
|
|
70
|
+
private feedbackElements;
|
|
71
|
+
private interactionElements;
|
|
72
|
+
disabled: boolean;
|
|
73
|
+
readonly: boolean;
|
|
74
|
+
title: string;
|
|
75
|
+
identifier: string;
|
|
76
|
+
render(): lit_html.TemplateResult<1>;
|
|
77
|
+
_handleDisabledChange: (_: boolean, disabled: boolean) => void;
|
|
78
|
+
_handleReadonlyChange: (_: boolean, readonly: boolean) => void;
|
|
79
|
+
constructor();
|
|
80
|
+
disconnectedCallback(): void;
|
|
81
|
+
private _registerVariable;
|
|
82
|
+
showCorrectResponse(): void;
|
|
83
|
+
processResponse(): boolean;
|
|
84
|
+
set responses(myResponses: ResponseInteraction[]);
|
|
85
|
+
resetInteractions(): void;
|
|
86
|
+
validateResponses(): boolean;
|
|
87
|
+
getVariableValue(identifier: string): string | string[] | number | null;
|
|
88
|
+
getResponse(identifier: string): ResponseVariable | null;
|
|
89
|
+
getOutcome(identifier: string): OutcomeVariable | null;
|
|
90
|
+
private registerFeedbackElement;
|
|
91
|
+
private registerInteractionElement;
|
|
92
|
+
private interactionResponse;
|
|
93
|
+
private outcomeChanged;
|
|
94
|
+
setOutcomeValue(identifier: string, value: number): void;
|
|
95
|
+
}
|
|
96
|
+
declare global {
|
|
97
|
+
interface HTMLElementTagNameMap {
|
|
98
|
+
'qti-assessment-item': QtiAssessmentItem;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export { OutcomeVariable as O, QtiAssessmentItem as Q, ResponseVariable as R, VariableDeclaration as V, QtiMapping as a };
|