@citolab/qti-components 7.0.1 → 7.0.3
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 +8297 -0
- package/dist/custom-elements.json +27271 -0
- package/dist/{qti-test/index.d.ts → index.d.ts} +170 -4
- package/dist/index.js +17164 -0
- package/dist/index.js.map +1 -0
- package/dist/item.css +257 -46
- package/dist/{qti-loader → loader}/index.d.ts +1 -1
- package/dist/qti-components-jsx.d.ts +33 -61
- package/dist/{qti-simple-choice-CynLWb8d.d.cts → qti-simple-choice-UTrFa_RQ.d.ts} +11 -19
- package/dist/vscode.html-custom-data.json +15 -11
- package/package.json +41 -58
- package/readme.md +55 -0
- package/README.md +0 -85
- package/cdn/index.min.cjs +0 -4489
- package/cdn/index.min.js +0 -4489
- package/dist/qti-components/index.cjs +0 -6704
- package/dist/qti-components/index.cjs.map +0 -1
- package/dist/qti-components/index.d.cts +0 -150
- package/dist/qti-components/index.d.ts +0 -150
- package/dist/qti-components/index.js +0 -6593
- package/dist/qti-components/index.js.map +0 -1
- package/dist/qti-item/index.cjs +0 -89
- package/dist/qti-item/index.cjs.map +0 -1
- package/dist/qti-item/index.d.cts +0 -24
- package/dist/qti-item/index.d.ts +0 -24
- package/dist/qti-item/index.js +0 -65
- package/dist/qti-item/index.js.map +0 -1
- package/dist/qti-loader/index.cjs +0 -332
- package/dist/qti-loader/index.cjs.map +0 -1
- package/dist/qti-loader/index.d.cts +0 -20
- package/dist/qti-simple-choice-CynLWb8d.d.ts +0 -1185
- package/dist/qti-test/index.cjs +0 -4632
- package/dist/qti-test/index.cjs.map +0 -1
- package/dist/qti-test/index.d.cts +0 -304
- package/dist/qti-test/index.js +0 -4599
- package/dist/qti-test/index.js.map +0 -1
- package/dist/qti-transformers/index.cjs +0 -316
- package/dist/qti-transformers/index.cjs.map +0 -1
- package/dist/qti-transformers/index.d.cts +0 -75
- /package/dist/{qti-loader → loader}/index.js +0 -0
- /package/dist/{qti-loader → loader}/index.js.map +0 -0
- /package/dist/{qti-transformers → transformers}/index.d.ts +0 -0
- /package/dist/{qti-transformers → transformers}/index.js +0 -0
- /package/dist/{qti-transformers → transformers}/index.js.map +0 -0
|
@@ -1,18 +1,167 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
-
import { I as ItemContext, V as VariableDeclaration, p as QtiAssessmentItem } from '../qti-simple-choice-CynLWb8d.js';
|
|
3
2
|
import * as lit from 'lit';
|
|
4
3
|
import { LitElement } from 'lit';
|
|
4
|
+
import { Q as QtiRule, a as QtiRuleBase, b as QtiExpressionBase, c as QtiExpression, B as BaseType, d as QtiConditionExpression, R as ResponseVariable, V as VariableDeclaration, I as ItemContext, e as QtiAssessmentItem } from './qti-simple-choice-UTrFa_RQ.js';
|
|
5
|
+
export { s as ActiveElementMixin, A as ActiveElementMixinInterface, C as Calculate, n as Cardinality, r as ChoiceInterface, ai as Interaction, f as InteractionChangedDetails, M as Multiple, m as Ordered, N as Orientation, O as OutcomeChangedDetails, p as OutcomeVariable, X as QtiAnd, q as QtiAssessmentStimulusRef, aj as QtiAssociableHotspot, a1 as QtiAssociateInteraction, P as QtiChoiceInteraction, y as QtiCompanionMaterialsInfo, z as QtiContentBody, a2 as QtiCustomInteraction, ah as QtiCustomOperator, a3 as QtiEndAttemptInteraction, H as QtiExtendedTextInteraction, E as QtiFeedbackBlock, F as QtiFeedbackInline, ak as QtiGap, al as QtiGapImg, a4 as QtiGapMatchInteraction, am as QtiGapText, a5 as QtiGraphicAssociateInteraction, a6 as QtiGraphicGapMatchInteraction, a7 as QtiGraphicOrderInteraction, an as QtiHotspotChoice, a8 as QtiHotspotInteraction, ao as QtiHottext, K as QtiHottextInteraction, ap as QtiInlineChoice, L as QtiInlineChoiceInteraction, g as QtiInteractionChanged, t as QtiItemBody, W as QtiLookupOutcomeValue, Z as QtiMapping, a9 as QtiMatchInteraction, aa as QtiMediaInteraction, G as QtiModalFeedback, ab as QtiOrderInteraction, h as QtiOutcomeChanged, w as QtiOutcomeDeclaration, S as QtiOutcomeProcessing, T as QtiOutcomeProcessingProcessor, a0 as QtiPortableCustomInteraction, ac as QtiPositionObjectStage, u as QtiPrompt, x as QtiResponseDeclaration, U as QtiResponseProcessing, D as QtiRubricBlock, ad as QtiSelectPointInteraction, aq as QtiSimpleAssociableChoice, ar as QtiSimpleChoice, ae as QtiSliderInteraction, v as QtiStylesheet, _ as QtiSubtract, J as QtiTextEntryInteraction, j as ResponseInteraction, o as VariableValue, i as directedPair, k as float, l as integer, ag as itemContext, af as itemContextVariables, Y as qtiAndMixin, $ as qtiSubtractMixin } from './qti-simple-choice-UTrFa_RQ.js';
|
|
5
6
|
import 'lit-html/directives/ref.js';
|
|
6
7
|
|
|
8
|
+
declare class QtiResponseCondition extends QtiRule {
|
|
9
|
+
render(): lit_html.TemplateResult<1>;
|
|
10
|
+
process(): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class QtiSetOutcomeValue extends QtiRule {
|
|
14
|
+
process(): void;
|
|
15
|
+
}
|
|
16
|
+
declare class QtiSetOutcomeValueRule<T> implements QtiRuleBase {
|
|
17
|
+
private expression;
|
|
18
|
+
constructor(expression: QtiExpressionBase<T>);
|
|
19
|
+
process(): any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class QtiResponseElse extends LitElement {
|
|
23
|
+
render(): lit_html.TemplateResult<1>;
|
|
24
|
+
calculate(): boolean;
|
|
25
|
+
getSubRules(): QtiRule[];
|
|
26
|
+
process(): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class QtiResponseIf extends QtiResponseElse {
|
|
30
|
+
calculate(): boolean;
|
|
31
|
+
getSubRules(): QtiRule[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class QtiResponseElseIf extends QtiResponseIf {
|
|
35
|
+
render(): lit_html.TemplateResult<1>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class QtiBaseValue extends QtiExpression<string> {
|
|
39
|
+
baseType: BaseType;
|
|
40
|
+
getResult(): string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class QtiContains extends QtiConditionExpression {
|
|
44
|
+
getResult(): boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class QtiCorrect extends QtiExpression<string | string[]> {
|
|
48
|
+
get interpretation(): string;
|
|
49
|
+
getResult(): string | string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class QtiEqualRounded extends QtiExpression<boolean> {
|
|
53
|
+
roundingMode: 'decimalPlaces' | 'significantFigures';
|
|
54
|
+
get figures(): number;
|
|
55
|
+
getResult(): boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare class QtiEqual extends QtiExpression<boolean> {
|
|
59
|
+
toleranceMode: 'exact' | 'relative' | 'absolute';
|
|
60
|
+
getResult(): boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class QtiGt extends QtiExpression<boolean> {
|
|
64
|
+
getResult(): boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class QtiGte extends QtiConditionExpression {
|
|
68
|
+
getResult(): boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class QtiIsNull extends QtiExpression<boolean> {
|
|
72
|
+
getResult(): boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare class QtiLt extends QtiExpression<boolean> {
|
|
76
|
+
getResult(): boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare class QtiLte extends QtiConditionExpression {
|
|
80
|
+
getResult(): boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare class QtiMapResponse extends QtiExpression<number> {
|
|
84
|
+
identifier: string;
|
|
85
|
+
getResult(): number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare class QtiMatch extends QtiExpression<boolean> {
|
|
89
|
+
getResult(): boolean;
|
|
90
|
+
static match(valueToMap: ResponseVariable, correctValueInfo: ResponseVariable): boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare class QtiMember extends QtiExpression<boolean | null> {
|
|
94
|
+
getResult(): boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare class QtiMultiple extends QtiExpression<VariableDeclaration<string | string[]>[]> {
|
|
98
|
+
getResult(): ResponseVariable[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class QtiNot extends QtiExpression<boolean> {
|
|
102
|
+
render(): lit_html.TemplateResult<1>;
|
|
103
|
+
getResult(): boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare class QtiOr extends QtiConditionExpression {
|
|
107
|
+
getResult(): boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare class QtiOrdered extends QtiExpression<ResponseVariable[]> {
|
|
111
|
+
getResult(): ResponseVariable[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare class QtiPrintedVariable extends LitElement {
|
|
115
|
+
identifier: string;
|
|
116
|
+
protected context?: ItemContext;
|
|
117
|
+
render(): lit_html.TemplateResult<1>;
|
|
118
|
+
calculate(): VariableDeclaration<string | string[]>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare class QtiProduct extends QtiExpression<number> {
|
|
122
|
+
getResult(): number;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class QtiStringMatch extends QtiExpression<boolean> {
|
|
126
|
+
caseSensitive: string;
|
|
127
|
+
getResult(): boolean;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare class QtiSum extends QtiExpression<number> {
|
|
131
|
+
private _expression;
|
|
132
|
+
constructor();
|
|
133
|
+
getResult(): number;
|
|
134
|
+
}
|
|
135
|
+
declare class QtiSumExpression implements QtiExpressionBase<number> {
|
|
136
|
+
private expressions;
|
|
137
|
+
constructor(expressions: QtiExpressionBase<number>[]);
|
|
138
|
+
calculate(): number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare class QtiVariable extends QtiExpression<string | string[]> {
|
|
142
|
+
getResult(): Readonly<string | string[]>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare class QtiPositionObjectInteraction extends LitElement {
|
|
146
|
+
render(): lit_html.TemplateResult<1>;
|
|
147
|
+
static styles: lit.CSSResult[];
|
|
148
|
+
}
|
|
149
|
+
|
|
7
150
|
interface TestContext {
|
|
8
151
|
items: (ItemContext & {
|
|
9
152
|
category?: string;
|
|
10
153
|
})[];
|
|
11
154
|
testOutcomeVariables: VariableDeclaration<string | string[]>[];
|
|
12
155
|
}
|
|
156
|
+
declare const testContext: {
|
|
157
|
+
__context__: Readonly<TestContext>;
|
|
158
|
+
};
|
|
13
159
|
type TestElement = {
|
|
14
160
|
el: QtiAssessmentTest;
|
|
15
161
|
};
|
|
162
|
+
declare const testElement: {
|
|
163
|
+
__context__: Readonly<TestElement>;
|
|
164
|
+
};
|
|
16
165
|
|
|
17
166
|
declare class QtiAssessmentItemRef extends LitElement {
|
|
18
167
|
category?: string;
|
|
@@ -130,8 +279,6 @@ declare const QtiTest_base: (abstract new (...args: any[]) => {}) & (abstract ne
|
|
|
130
279
|
*
|
|
131
280
|
* @attr {string} testURL - the relative location to the QTI assessment.xml file
|
|
132
281
|
*
|
|
133
|
-
* @tag qti-player
|
|
134
|
-
*
|
|
135
282
|
* ### Features
|
|
136
283
|
*
|
|
137
284
|
* - **Dynamic Template Loading**:
|
|
@@ -301,4 +448,23 @@ declare global {
|
|
|
301
448
|
}
|
|
302
449
|
}
|
|
303
450
|
|
|
304
|
-
|
|
451
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
452
|
+
interface QtiItemInterface {
|
|
453
|
+
identifier?: string;
|
|
454
|
+
href?: string;
|
|
455
|
+
xmlDoc: DocumentFragment;
|
|
456
|
+
assessmentItem: QtiAssessmentItem | null;
|
|
457
|
+
}
|
|
458
|
+
declare function QtiItemMixin<T extends Constructor<LitElement>>(Base: T): Constructor<QtiItemInterface> & T;
|
|
459
|
+
|
|
460
|
+
declare const QtiItem_base: (new (...args: any[]) => QtiItemInterface) & typeof LitElement;
|
|
461
|
+
declare class QtiItem extends QtiItem_base {
|
|
462
|
+
connectedCallback(): void;
|
|
463
|
+
}
|
|
464
|
+
declare global {
|
|
465
|
+
interface HTMLElementTagNameMap {
|
|
466
|
+
'qti-item': QtiItem;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export { BaseType, ItemContext, QtiAssessmentItem, QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiBaseValue, QtiConditionExpression, QtiContains, QtiCorrect, QtiEqual, QtiEqualRounded, QtiExpression, QtiExpressionBase, QtiGt, QtiGte, QtiIsNull, QtiItem, type QtiItemInterface, QtiItemMixin, QtiLt, QtiLte, QtiMapResponse, QtiMatch, QtiMember, QtiMultiple, QtiNot, QtiOr, QtiOrdered, QtiPositionObjectInteraction, QtiPrintedVariable, QtiProduct, QtiResponseCondition, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiRule, QtiRuleBase, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiStringMatch, QtiSum, QtiSumExpression, QtiTest, QtiTestPart, QtiVariable, ResponseVariable, TestContainer, type TestContext, type TestElement, TestItemLink, TestNext, TestPagingButtonsStamp, TestPrev, TestView, VariableDeclaration, testContext, testElement };
|