@citolab/qti-components 7.14.2 → 7.15.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.
Files changed (147) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +4070 -4048
  3. package/custom-elements.json +10320 -25886
  4. package/dist/base.d.ts +8 -0
  5. package/dist/base.js +50 -0
  6. package/dist/{chunks/chunk-7567ZPN6.js → chunk-2DOYPVF5.js} +252 -136
  7. package/dist/chunk-2DOYPVF5.js.map +1 -0
  8. package/dist/chunk-2ZEJ3RR5.js +89 -0
  9. package/dist/chunk-2ZEJ3RR5.js.map +1 -0
  10. package/dist/{chunks/chunk-Z2FFXTKX.js → chunk-352OTVTY.js} +1483 -445
  11. package/dist/chunk-352OTVTY.js.map +1 -0
  12. package/dist/{chunks/chunk-2X2C5WI5.js → chunk-C2HQFI2C.js} +939 -3842
  13. package/dist/chunk-C2HQFI2C.js.map +1 -0
  14. package/dist/chunk-DWIRLYDS.js +20 -0
  15. package/dist/chunk-DWIRLYDS.js.map +1 -0
  16. package/dist/{chunks/chunk-H2JE6IVU.js → chunk-EUXUH3YW.js} +1 -1
  17. package/dist/chunk-F44CI35W.js +145 -0
  18. package/dist/chunk-F44CI35W.js.map +1 -0
  19. package/dist/{chunks/chunk-XBPO6E25.js → chunk-INKI27D5.js} +6 -5
  20. package/dist/chunk-INKI27D5.js.map +1 -0
  21. package/dist/chunk-JEUY3MYB.js +2010 -0
  22. package/dist/chunk-JEUY3MYB.js.map +1 -0
  23. package/dist/chunk-O4XIWHTF.js +1139 -0
  24. package/dist/chunk-O4XIWHTF.js.map +1 -0
  25. package/dist/chunk-RI47B4ZT.js +1753 -0
  26. package/dist/chunk-RI47B4ZT.js.map +1 -0
  27. package/dist/{qti-loader/index.js → chunk-VEV4DGPH.js} +6 -6
  28. package/dist/chunk-VEV4DGPH.js.map +1 -0
  29. package/dist/{chunks/chunk-PT5ASWGQ.js → chunk-W4SQRNWO.js} +105 -2
  30. package/dist/chunk-W4SQRNWO.js.map +1 -0
  31. package/dist/elements.d.ts +1 -0
  32. package/dist/elements.js +42 -0
  33. package/dist/index.d.ts +8 -24
  34. package/dist/index.js +118 -284
  35. package/dist/index.js.map +1 -1
  36. package/dist/interactions.d.ts +1 -0
  37. package/dist/interactions.js +72 -0
  38. package/dist/item.css +8 -0
  39. package/dist/item.d.ts +1 -0
  40. package/dist/item.js +23 -0
  41. package/dist/loader.d.ts +1 -0
  42. package/dist/loader.js +11 -0
  43. package/dist/processing.d.ts +1 -0
  44. package/dist/processing.js +103 -0
  45. package/dist/qti-components-jsx.d.ts +1540 -2452
  46. package/dist/test.d.ts +1 -0
  47. package/dist/{qti-test/index.js → test.js} +11 -19
  48. package/dist/transformers.d.ts +1 -0
  49. package/dist/{qti-transformers/index.js → transformers.js} +3 -3
  50. package/dist/vscode.html-custom-data.json +469 -631
  51. package/package.json +71 -167
  52. package/LICENSE.md +0 -674
  53. package/dist/chunks/chunk-2X2C5WI5.js.map +0 -1
  54. package/dist/chunks/chunk-4OGJBG35.js +0 -8
  55. package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
  56. package/dist/chunks/chunk-7567ZPN6.js.map +0 -1
  57. package/dist/chunks/chunk-BHJSX3Q6.js +0 -8
  58. package/dist/chunks/chunk-BHJSX3Q6.js.map +0 -1
  59. package/dist/chunks/chunk-C5RLRG3L.js +0 -10
  60. package/dist/chunks/chunk-C5RLRG3L.js.map +0 -1
  61. package/dist/chunks/chunk-CJADUWEC.js +0 -10
  62. package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
  63. package/dist/chunks/chunk-DVQQ7I6Y.js +0 -8
  64. package/dist/chunks/chunk-DVQQ7I6Y.js.map +0 -1
  65. package/dist/chunks/chunk-ELDMXTUQ.js +0 -31
  66. package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
  67. package/dist/chunks/chunk-GAAFN7QF.js +0 -146
  68. package/dist/chunks/chunk-GAAFN7QF.js.map +0 -1
  69. package/dist/chunks/chunk-H6KHXSIO.js +0 -8
  70. package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
  71. package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
  72. package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
  73. package/dist/chunks/chunk-NJNQOQUU.js +0 -8
  74. package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
  75. package/dist/chunks/chunk-P4QBOVQ2.js +0 -206
  76. package/dist/chunks/chunk-P4QBOVQ2.js.map +0 -1
  77. package/dist/chunks/chunk-PT5ASWGQ.js.map +0 -1
  78. package/dist/chunks/chunk-SV4K25ZI.js +0 -19
  79. package/dist/chunks/chunk-SV4K25ZI.js.map +0 -1
  80. package/dist/chunks/chunk-XBPO6E25.js.map +0 -1
  81. package/dist/chunks/chunk-YD7FVKDP.js +0 -236
  82. package/dist/chunks/chunk-YD7FVKDP.js.map +0 -1
  83. package/dist/chunks/chunk-Z2FFXTKX.js.map +0 -1
  84. package/dist/exports/computed-item.context.d.ts +0 -23
  85. package/dist/exports/computed-item.context.js +0 -8
  86. package/dist/exports/computed.context.d.ts +0 -34
  87. package/dist/exports/computed.context.js +0 -8
  88. package/dist/exports/config.context.d.ts +0 -14
  89. package/dist/exports/config.context.js +0 -8
  90. package/dist/exports/expression-result.d.ts +0 -19
  91. package/dist/exports/expression-result.js +0 -1
  92. package/dist/exports/interaction.d.ts +0 -46
  93. package/dist/exports/interaction.interface.d.ts +0 -13
  94. package/dist/exports/interaction.interface.js +0 -1
  95. package/dist/exports/interaction.js +0 -12
  96. package/dist/exports/item.context.d.ts +0 -11
  97. package/dist/exports/item.context.js +0 -8
  98. package/dist/exports/qti-assessment-item.context.d.ts +0 -9
  99. package/dist/exports/qti-assessment-item.context.js +0 -8
  100. package/dist/exports/qti-condition-expression.d.ts +0 -14
  101. package/dist/exports/qti-condition-expression.js +0 -11
  102. package/dist/exports/qti-condition-expression.js.map +0 -1
  103. package/dist/exports/qti-expression.d.ts +0 -23
  104. package/dist/exports/qti-expression.js +0 -10
  105. package/dist/exports/qti-expression.js.map +0 -1
  106. package/dist/exports/qti-test.d.ts +0 -12
  107. package/dist/exports/qti-test.js +0 -1
  108. package/dist/exports/qti-test.js.map +0 -1
  109. package/dist/exports/qti.context.d.ts +0 -14
  110. package/dist/exports/qti.context.js +0 -8
  111. package/dist/exports/qti.context.js.map +0 -1
  112. package/dist/exports/session.context.d.ts +0 -15
  113. package/dist/exports/session.context.js +0 -10
  114. package/dist/exports/session.context.js.map +0 -1
  115. package/dist/exports/test.context.d.ts +0 -16
  116. package/dist/exports/test.context.js +0 -10
  117. package/dist/exports/test.context.js.map +0 -1
  118. package/dist/exports/variables.d.ts +0 -2
  119. package/dist/exports/variables.js +0 -1
  120. package/dist/exports/variables.js.map +0 -1
  121. package/dist/qti-assessment-item-l-mN3teH.d.ts +0 -105
  122. package/dist/qti-components/index.d.ts +0 -1522
  123. package/dist/qti-components/index.js +0 -214
  124. package/dist/qti-components/index.js.map +0 -1
  125. package/dist/qti-item/index.d.ts +0 -114
  126. package/dist/qti-item/index.js +0 -19
  127. package/dist/qti-item/index.js.map +0 -1
  128. package/dist/qti-loader/index.d.ts +0 -21
  129. package/dist/qti-loader/index.js.map +0 -1
  130. package/dist/qti-modal-feedback-PKbhO-3w.d.ts +0 -30
  131. package/dist/qti-test/index.d.ts +0 -480
  132. package/dist/qti-test/index.js.map +0 -1
  133. package/dist/qti-test-Db7oNIWY.d.ts +0 -120
  134. package/dist/qti-transform-test-Bz9A3hmD.d.ts +0 -63
  135. package/dist/qti-transformers/index.d.ts +0 -18
  136. package/dist/qti-transformers/index.js.map +0 -1
  137. package/dist/variables-BCkyLoXK.d.ts +0 -55
  138. package/readme.md +0 -59
  139. /package/dist/{chunks/chunk-H2JE6IVU.js.map → base.js.map} +0 -0
  140. /package/dist/{exports/computed-item.context.js.map → chunk-EUXUH3YW.js.map} +0 -0
  141. /package/dist/{exports/computed.context.js.map → elements.js.map} +0 -0
  142. /package/dist/{exports/config.context.js.map → interactions.js.map} +0 -0
  143. /package/dist/{exports/expression-result.js.map → item.js.map} +0 -0
  144. /package/dist/{exports/interaction.interface.js.map → loader.js.map} +0 -0
  145. /package/dist/{exports/interaction.js.map → processing.js.map} +0 -0
  146. /package/dist/{exports/item.context.js.map → test.js.map} +0 -0
  147. /package/dist/{exports/qti-assessment-item.context.js.map → transformers.js.map} +0 -0
@@ -1,12 +0,0 @@
1
- import {
2
- Correctness,
3
- Interaction
4
- } from "../chunks/chunk-P4QBOVQ2.js";
5
- import "../chunks/chunk-NJNQOQUU.js";
6
- import "../chunks/chunk-BHJSX3Q6.js";
7
- import "../chunks/chunk-H2JE6IVU.js";
8
- export {
9
- Correctness,
10
- Interaction
11
- };
12
- //# sourceMappingURL=interaction.js.map
@@ -1,11 +0,0 @@
1
- import { V as VariableDeclaration } from '../variables-BCkyLoXK.js';
2
- import './expression-result.js';
3
-
4
- interface ItemContext {
5
- identifier?: string;
6
- href?: string;
7
- variables?: ReadonlyArray<VariableDeclaration<string | string[] | null>>;
8
- }
9
- declare const itemContextVariables: VariableDeclaration<string | string[]>[];
10
-
11
- export { type ItemContext, itemContextVariables };
@@ -1,8 +0,0 @@
1
- import {
2
- itemContextVariables
3
- } from "../chunks/chunk-JQ6HWGRY.js";
4
- import "../chunks/chunk-H2JE6IVU.js";
5
- export {
6
- itemContextVariables
7
- };
8
- //# sourceMappingURL=item.context.js.map
@@ -1,9 +0,0 @@
1
- import { ItemContext } from './item.context.js';
2
- import '../variables-BCkyLoXK.js';
3
- import './expression-result.js';
4
-
5
- declare const itemContext: {
6
- __context__: ItemContext;
7
- };
8
-
9
- export { itemContext };
@@ -1,8 +0,0 @@
1
- import {
2
- itemContext
3
- } from "../chunks/chunk-NJNQOQUU.js";
4
- import "../chunks/chunk-H2JE6IVU.js";
5
- export {
6
- itemContext
7
- };
8
- //# sourceMappingURL=qti-assessment-item.context.js.map
@@ -1,14 +0,0 @@
1
- import { QtiExpression } from './qti-expression.js';
2
- import 'lit-html';
3
- import 'lit';
4
- import './qti.context.js';
5
- import '../variables-BCkyLoXK.js';
6
- import './expression-result.js';
7
- import './item.context.js';
8
-
9
- declare abstract class QtiConditionExpression extends QtiExpression<boolean> {
10
- calculate(): Readonly<boolean>;
11
- getResult(): Readonly<boolean>;
12
- }
13
-
14
- export { QtiConditionExpression };
@@ -1,11 +0,0 @@
1
- import {
2
- QtiConditionExpression
3
- } from "../chunks/chunk-SV4K25ZI.js";
4
- import "../chunks/chunk-GAAFN7QF.js";
5
- import "../chunks/chunk-H6KHXSIO.js";
6
- import "../chunks/chunk-NJNQOQUU.js";
7
- import "../chunks/chunk-H2JE6IVU.js";
8
- export {
9
- QtiConditionExpression
10
- };
11
- //# sourceMappingURL=qti-condition-expression.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,23 +0,0 @@
1
- import * as lit_html from 'lit-html';
2
- import * as lit from 'lit';
3
- import { LitElement } from 'lit';
4
- import { QtiContext, QtiContextType } from './qti.context.js';
5
- import { R as ResponseVariable, V as VariableDeclaration } from '../variables-BCkyLoXK.js';
6
- import { ItemContext } from './item.context.js';
7
- import './expression-result.js';
8
-
9
- interface QtiExpressionBase<T> {
10
- calculate(): Readonly<T>;
11
- }
12
- declare abstract class QtiExpression<T> extends LitElement implements QtiExpressionBase<T> {
13
- protected result: any;
14
- static styles: lit.CSSResult;
15
- render(): lit_html.TemplateResult<1>;
16
- calculate(): Readonly<T>;
17
- protected getResult(): Readonly<T>;
18
- protected context?: ItemContext;
19
- protected qtiContext?: QtiContext;
20
- getVariables: () => (ResponseVariable | VariableDeclaration<QtiContextType>)[];
21
- }
22
-
23
- export { QtiExpression, type QtiExpressionBase };
@@ -1,10 +0,0 @@
1
- import {
2
- QtiExpression
3
- } from "../chunks/chunk-GAAFN7QF.js";
4
- import "../chunks/chunk-H6KHXSIO.js";
5
- import "../chunks/chunk-NJNQOQUU.js";
6
- import "../chunks/chunk-H2JE6IVU.js";
7
- export {
8
- QtiExpression
9
- };
10
- //# sourceMappingURL=qti-expression.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,12 +0,0 @@
1
- export { I as IQtiTest, f as ITestNavigationMixin, g as ITestProcessingMixin, e as QtiTest } from '../qti-test-Db7oNIWY.js';
2
- import 'lit';
3
- import './test.context.js';
4
- import './session.context.js';
5
- import '../variables-BCkyLoXK.js';
6
- import '../qti-transform-test-Bz9A3hmD.js';
7
- import '../qti-assessment-item-l-mN3teH.js';
8
- import 'lit-html';
9
- import './expression-result.js';
10
- import '@heximal/templates';
11
- import '../qti-modal-feedback-PKbhO-3w.js';
12
- import './item.context.js';
@@ -1 +0,0 @@
1
- //# sourceMappingURL=qti-test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,14 +0,0 @@
1
- type QtiContextType = {
2
- testIdentifier: string;
3
- candidateIdentifier: string;
4
- environmentIdentifier: string;
5
- [key: string]: string | string[];
6
- };
7
- interface QtiContext {
8
- QTI_CONTEXT: QtiContextType;
9
- }
10
- declare const qtiContext: {
11
- __context__: Readonly<QtiContext>;
12
- };
13
-
14
- export { type QtiContext, type QtiContextType, qtiContext };
@@ -1,8 +0,0 @@
1
- import {
2
- qtiContext
3
- } from "../chunks/chunk-H6KHXSIO.js";
4
- import "../chunks/chunk-H2JE6IVU.js";
5
- export {
6
- qtiContext
7
- };
8
- //# sourceMappingURL=qti.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,15 +0,0 @@
1
- type View = 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor' | '';
2
- interface SessionContext {
3
- navPartId?: string | null;
4
- navSectionId?: string | null;
5
- navItemRefId?: string | null;
6
- navItemLoading?: boolean;
7
- navTestLoading?: boolean;
8
- view?: View;
9
- }
10
- declare const INITIAL_SESSION_CONTEXT: Readonly<SessionContext>;
11
- declare const sessionContext: {
12
- __context__: Readonly<SessionContext>;
13
- };
14
-
15
- export { INITIAL_SESSION_CONTEXT, type SessionContext, type View, sessionContext };
@@ -1,10 +0,0 @@
1
- import {
2
- INITIAL_SESSION_CONTEXT,
3
- sessionContext
4
- } from "../chunks/chunk-C5RLRG3L.js";
5
- import "../chunks/chunk-H2JE6IVU.js";
6
- export {
7
- INITIAL_SESSION_CONTEXT,
8
- sessionContext
9
- };
10
- //# sourceMappingURL=session.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,16 +0,0 @@
1
- import { ItemContext } from './item.context.js';
2
- import { V as VariableDeclaration } from '../variables-BCkyLoXK.js';
3
- import './expression-result.js';
4
-
5
- interface TestContext {
6
- items: (ItemContext & {
7
- category?: string;
8
- })[];
9
- testOutcomeVariables?: VariableDeclaration<string | string[] | null>[];
10
- }
11
- declare const INITIAL_TEST_CONTEXT: Readonly<TestContext>;
12
- declare const testContext: {
13
- __context__: Readonly<TestContext>;
14
- };
15
-
16
- export { INITIAL_TEST_CONTEXT, type TestContext, testContext };
@@ -1,10 +0,0 @@
1
- import {
2
- INITIAL_TEST_CONTEXT,
3
- testContext
4
- } from "../chunks/chunk-CJADUWEC.js";
5
- import "../chunks/chunk-H2JE6IVU.js";
6
- export {
7
- INITIAL_TEST_CONTEXT,
8
- testContext
9
- };
10
- //# sourceMappingURL=test.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,2 +0,0 @@
1
- export { O as OutcomeVariable, R as ResponseVariable, T as TemplateVariable, V as VariableDeclaration, e as VariableValue } from '../variables-BCkyLoXK.js';
2
- import './expression-result.js';
@@ -1 +0,0 @@
1
- //# sourceMappingURL=variables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,105 +0,0 @@
1
- import * as lit_html from 'lit-html';
2
- import { LitElement } from 'lit';
3
- import { ResponseInteraction } from './exports/expression-result.js';
4
- import { e as VariableValue, R as ResponseVariable, O as OutcomeVariable, V as VariableDeclaration } from './variables-BCkyLoXK.js';
5
-
6
- /**
7
- * @summary The qti-assessment-item element contains all the other QTI 3 item structures.
8
- * @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.dltnnj87l0yj
9
- *
10
- * @dependency qti-feedback
11
- * @dependency qti-responseprocessing
12
- *
13
- * @event qti-item-context-updated - Emitted when through a user action the itemContext is updated,
14
- * typically on interaction with the interactions, or calling response processing.
15
- */
16
- declare class QtiAssessmentItem extends LitElement {
17
- private _itemTitle;
18
- private _templateProcessing;
19
- identifier: string;
20
- adaptive: 'true' | 'false';
21
- timeDependent: 'true' | 'false' | null;
22
- get title(): string;
23
- set title(value: string);
24
- disabled: boolean;
25
- protected _handleDisabledChange: (_: boolean, disabled: boolean) => void;
26
- readonly: boolean;
27
- protected _handleReadonlyChange: (_: boolean, readonly: boolean) => void;
28
- private _context;
29
- /**
30
- * Sets the identifier for the assessment item reference if this item is in a test.
31
- *
32
- * @param identifier - The identifier for the assessment item reference.
33
- */
34
- set assessmentItemRefId(identifier: string);
35
- get assessmentItemRefId(): string;
36
- get variables(): VariableValue<string | string[] | null>[];
37
- set variables(value: VariableValue<string | string[] | null>[]);
38
- private _initialContext;
39
- private _feedbackElements;
40
- private _interactionElements;
41
- /** @deprecated use variables property instead */
42
- set responses(myResponses: ResponseInteraction[]);
43
- render(): lit_html.TemplateResult<1>;
44
- connectedCallback(): void;
45
- disconnectedCallback(): void;
46
- private _attachEventListeners;
47
- private _removeEventListeners;
48
- private _handleRegisterVariable;
49
- private _handleRegisterFeedback;
50
- private _handleRegisterInteraction;
51
- private _handleEndAttempt;
52
- private _handleSetOutcomeValue;
53
- private _handleUpdateResponseVariable;
54
- /**
55
- * Toggles the display of correct responses for all interactions.
56
- * @param show - A boolean indicating whether to show or hide correct responses.
57
- */
58
- showCorrectResponse(show: boolean): void;
59
- /**
60
- * Toggles the display of the candidate correction for all interactions.
61
- * @param show - A boolean indicating whether to show or hide candidate correction.
62
- */
63
- showCandidateCorrection(show: boolean): void;
64
- private _processTemplates;
65
- processResponse(countNumAttempts?: boolean, reportValidityAfterScoring?: boolean): boolean;
66
- resetResponses(): void;
67
- protected getResponse(identifier: string): Readonly<ResponseVariable>;
68
- protected getOutcome(identifier: string): Readonly<OutcomeVariable>;
69
- protected getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>>;
70
- /**
71
- * Updates the response variable with the specified identifier to the given value.
72
- *
73
- * @protected
74
- *
75
- * This method is intended for internal use within the class and subclasses.
76
- * It should not be called externally by third parties.
77
- *
78
- * @param identifier - The identifier of the response variable to update.
79
- * @param value - The new value for the response variable.
80
- */
81
- updateResponseVariable(identifier: string, value: string | string[] | undefined): void;
82
- setOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
83
- /**
84
- * Updates the outcome variable with the specified identifier to the given value.
85
- *
86
- * @protected
87
- *
88
- * This method is intended for internal use within the class and subclasses.
89
- * It should not be called externally by third parties.
90
- *
91
- * @param identifier - The identifier of the response variable to update.
92
- * @param value - The new value for the response variable.
93
- */
94
- updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
95
- validate(reportValidity?: boolean): boolean;
96
- reportValidity(): void;
97
- private _getCompletionStatus;
98
- }
99
- declare global {
100
- interface HTMLElementTagNameMap {
101
- 'qti-assessment-item': QtiAssessmentItem;
102
- }
103
- }
104
-
105
- export { QtiAssessmentItem as Q };