@citolab/qti-components 8.1.0 → 8.2.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 (56) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +274 -168
  3. package/dist/base.d.ts +5 -5
  4. package/dist/base.js +1 -1
  5. package/dist/{chunk-IXPDMYKH.js → chunk-43XBJ47H.js} +3 -3
  6. package/dist/{chunk-EKXZI26R.js → chunk-7D3NKAGZ.js} +54 -3
  7. package/dist/chunk-7D3NKAGZ.js.map +1 -0
  8. package/dist/{chunk-Q52IJELT.js → chunk-CRLXQZFA.js} +594 -259
  9. package/dist/chunk-CRLXQZFA.js.map +1 -0
  10. package/dist/{chunk-TXIB3SKC.js → chunk-LMGJOBJA.js} +3 -3
  11. package/dist/{chunk-6V3A7NQP.js → chunk-M7K5C522.js} +2 -2
  12. package/dist/{chunk-CF3DXJWM.js → chunk-OIUK5BFU.js} +22 -6
  13. package/dist/{chunk-CF3DXJWM.js.map → chunk-OIUK5BFU.js.map} +1 -1
  14. package/dist/{chunk-MK2I3MQB.js → chunk-OVBG223G.js} +4 -5
  15. package/dist/{chunk-MK2I3MQB.js.map → chunk-OVBG223G.js.map} +1 -1
  16. package/dist/{chunk-4XR2JHCP.js → chunk-Q6ZK4LRH.js} +26 -2
  17. package/dist/chunk-Q6ZK4LRH.js.map +1 -0
  18. package/dist/chunk-TLTYXWW7.js +7 -0
  19. package/dist/chunk-TLTYXWW7.js.map +1 -0
  20. package/dist/{chunk-3IACYIU2.js → chunk-U7YCXDYC.js} +2 -2
  21. package/dist/{chunk-NZLW6EX7.js → chunk-UC3T3NI3.js} +2 -2
  22. package/dist/{chunk-6XJUP55A.js → chunk-YLRMOX6C.js} +3 -3
  23. package/dist/chunk-YLRMOX6C.js.map +1 -0
  24. package/dist/{computed.types.d-DpKIYO6e.d.ts → computed.types.d-CJarqC6s.d.ts} +12 -0
  25. package/dist/corrections.d.ts +14 -4
  26. package/dist/corrections.js +7 -7
  27. package/dist/elements.d.ts +1 -1
  28. package/dist/elements.js +3 -3
  29. package/dist/index.d.ts +5 -5
  30. package/dist/index.js +14 -12
  31. package/dist/interactions.js +3 -3
  32. package/dist/item.css +81 -0
  33. package/dist/item.d.ts +1 -1
  34. package/dist/item.js +4 -4
  35. package/dist/loader.d.ts +1 -1
  36. package/dist/processing.d.ts +3 -3
  37. package/dist/processing.js +2 -2
  38. package/dist/qti-components-jsx.d.ts +7704 -7127
  39. package/dist/{qti-condition-expression.d-aMvBvpc6.d.ts → qti-condition-expression.d-CYwXOUb1.d.ts} +1 -1
  40. package/dist/{qti-expression.d-BietT_8b.d.ts → qti-expression.d-B_-m9emA.d.ts} +11 -1
  41. package/dist/{qti-feedback.d-DZbad0RN.d.ts → qti-feedback.d-B1EIF-fU.d.ts} +1 -0
  42. package/dist/{qti-test.d-_YAlhDbt.d.ts → qti-test.d-C6lCEMRB.d.ts} +38 -3
  43. package/dist/test.d.ts +5 -5
  44. package/dist/test.js +7 -5
  45. package/package.json +9 -9
  46. package/dist/chunk-4XR2JHCP.js.map +0 -1
  47. package/dist/chunk-6XJUP55A.js.map +0 -1
  48. package/dist/chunk-EKXZI26R.js.map +0 -1
  49. package/dist/chunk-IYC7LZV6.js +0 -7
  50. package/dist/chunk-IYC7LZV6.js.map +0 -1
  51. package/dist/chunk-Q52IJELT.js.map +0 -1
  52. /package/dist/{chunk-IXPDMYKH.js.map → chunk-43XBJ47H.js.map} +0 -0
  53. /package/dist/{chunk-TXIB3SKC.js.map → chunk-LMGJOBJA.js.map} +0 -0
  54. /package/dist/{chunk-6V3A7NQP.js.map → chunk-M7K5C522.js.map} +0 -0
  55. /package/dist/{chunk-3IACYIU2.js.map → chunk-U7YCXDYC.js.map} +0 -0
  56. /package/dist/{chunk-NZLW6EX7.js.map → chunk-UC3T3NI3.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { Q as QtiExpression } from './qti-expression.d-BietT_8b.js';
1
+ import { Q as QtiExpression } from './qti-expression.d-B_-m9emA.js';
2
2
 
3
3
  declare abstract class QtiConditionExpression extends QtiExpression<boolean> {
4
4
  calculate(): Readonly<boolean>;
@@ -1,6 +1,6 @@
1
- import { I as ItemContext, V as VariableDeclaration, f as ResponseVariable } from './item.types.d-QU7LljEK.js';
2
1
  import * as lit from 'lit';
3
2
  import { LitElement } from 'lit';
3
+ import { I as ItemContext, V as VariableDeclaration, f as ResponseVariable } from './item.types.d-QU7LljEK.js';
4
4
  import { Q as QtiContext, a as QtiContextType } from './qti.context.d-CejJMlfZ.js';
5
5
 
6
6
  interface TestContext {
@@ -25,6 +25,16 @@ declare abstract class QtiExpression<T> extends LitElement implements QtiExpress
25
25
  protected getResult(): Readonly<T>;
26
26
  protected context?: ItemContext;
27
27
  protected qtiContext?: QtiContext;
28
+ protected _testContext?: TestContext;
29
+ /**
30
+ * Resolve a declared variable from the closest available scope: item-level
31
+ * first, then the test-level outcome variables. So an expression used in an
32
+ * assessmentTest's outcome processing can reference a test-level outcome
33
+ * (e.g. a total set earlier in the same run) — which the QTI variable
34
+ * expression is specified to do. Returns null when unresolved rather than
35
+ * throwing, so callers degrade gracefully.
36
+ */
37
+ protected resolveVariable(identifier: string): VariableDeclaration<string | string[] | null> | null;
28
38
  getVariables: () => (ResponseVariable | VariableDeclaration<QtiContextType>)[];
29
39
  }
30
40
 
@@ -14,6 +14,7 @@ declare abstract class QtiFeedback extends LitElement {
14
14
  protected identifier: string;
15
15
  showStatus: string;
16
16
  private _context?;
17
+ private _computedContext?;
17
18
  connectedCallback(): void;
18
19
  checkShowFeedback(outcomeIdentifier: string): void;
19
20
  }
@@ -3,9 +3,9 @@ import { LitElement, PropertyValues, nothing } from 'lit';
3
3
  import { t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-BL7GGFJj.js';
4
4
  import { QtiAssessmentItem, QtiModalFeedback } from './elements.js';
5
5
  import { TemplateFunction } from '@heximal/templates';
6
- import { T as TestContext, Q as QtiExpression, a as QtiExpressionBase } from './qti-expression.d-BietT_8b.js';
6
+ import { T as TestContext, Q as QtiExpression, a as QtiExpressionBase } from './qti-expression.d-B_-m9emA.js';
7
7
  import { g as VariableValue, b as OutcomeVariable, V as VariableDeclaration } from './item.types.d-QU7LljEK.js';
8
- import { S as SessionContext, C as ComputedContext, a as ComputedItem, V as View } from './computed.types.d-DpKIYO6e.js';
8
+ import { S as SessionContext, C as ComputedContext, a as ComputedItem, V as View } from './computed.types.d-CJarqC6s.js';
9
9
  import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
10
10
  import { Q as QtiRuleBase } from './qti-rule-base.d-ajOnfGXY.js';
11
11
  import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
@@ -66,6 +66,27 @@ declare global {
66
66
  }
67
67
  }
68
68
 
69
+ /**
70
+ * @summary The qti-item-session-control element contains configurations relating to flow of test sessions.
71
+ * @documentation https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/imsqti_asi_v3p0p1_infomodel_v1p0.html#Derived_ItemSessionControl
72
+ */
73
+ declare class QtiItemSessionControl extends LitElement {
74
+ maxAttempts: number;
75
+ showFeedback: boolean;
76
+ allowReview: boolean;
77
+ showSolution: boolean;
78
+ allowComment: boolean;
79
+ allowSkipping: boolean;
80
+ validateResponses: boolean;
81
+ connectedCallback(): Promise<void>;
82
+ render(): lit.TemplateResult<1>;
83
+ }
84
+ declare global {
85
+ interface HTMLElementTagNameMap {
86
+ 'qti-item-session-control': QtiItemSessionControl;
87
+ }
88
+ }
89
+
69
90
  declare class QtiOutcomeProcessing extends LitElement {
70
91
  static styles: lit.CSSResult[];
71
92
  render(): lit.TemplateResult<1>;
@@ -191,6 +212,15 @@ declare class TestNavigation extends LitElement {
191
212
  protected computedContext: ComputedContext;
192
213
  autoScoreItems: boolean;
193
214
  constructor();
215
+ /**
216
+ * Extension point for presentation packages reacting to an ended attempt.
217
+ * `done` is settled here — from the freshly latched optimality and the
218
+ * session-control cascade — because the computed context only catches up on
219
+ * the next update, after this event has finished bubbling.
220
+ */
221
+ protected afterAttemptEnded(_assessmentItem: QtiAssessmentItem | undefined, _computedItem: ComputedItem | undefined, _done: boolean): void;
222
+ /** The computed-context entry for an item, from the session-control cascade. */
223
+ protected computedItemFor(identifier: string): ComputedItem | undefined;
194
224
  /** The currently active assessment item, exposed for optional presentation extensions. */
195
225
  protected get activeAssessmentItem(): QtiAssessmentItem | undefined;
196
226
  render(): lit.TemplateResult<1>;
@@ -298,8 +328,13 @@ declare global {
298
328
  }
299
329
 
300
330
  declare class TestEndAttempt extends LitElement {
331
+ protected computedContext: ComputedContext;
332
+ _internalDisabled: boolean;
333
+ _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext): void;
301
334
  static styles: lit.CSSResult;
302
335
  constructor();
336
+ willUpdate(_changedProperties: Map<string | number | symbol, unknown>): void;
337
+ checkDisabled(): void;
303
338
  render(): lit.TemplateResult<1>;
304
339
  }
305
340
  declare global {
@@ -699,4 +734,4 @@ declare global {
699
734
  }
700
735
  }
701
736
 
702
- export { TestTtsPlay as A, TestTtsPrev as B, TestTtsResume as C, TestTtsStop as D, TestView as E, TestViewToggle as F, type TtsContext as G, ttsContext as H, type ITestNavigationMixin as I, QtiAssessmentItemRef as Q, type SpeechState as S, TestCheckItem as T, QtiAssessmentSection as a, QtiAssessmentTest as b, QtiOutcomeProcessing as c, QtiOutcomeProcessingProcessor as d, QtiTest as e, QtiTestFeedback as f, QtiTestPart as g, QtiTestVariables as h, QtiTestVariablesExpression as i, TestContainer as j, TestEndAttempt as k, TestItemLink as l, TestItemToSpeech as m, TestNavigation as n, TestNext as o, TestPagingButtonsStamp as p, TestPrev as q, TestPrintContext as r, TestPrintVariables as s, TestScoringButtons as t, TestScoringFeedback as u, TestSectionButtonsStamp as v, TestSectionLink as w, TestStamp as x, TestTtsNext as y, TestTtsPause as z };
737
+ export { TestTtsPause as A, TestTtsPlay as B, TestTtsPrev as C, TestTtsResume as D, TestTtsStop as E, TestView as F, TestViewToggle as G, type TtsContext as H, type ITestNavigationMixin as I, ttsContext as J, QtiAssessmentItemRef as Q, type SpeechState as S, TestCheckItem as T, QtiAssessmentSection as a, QtiAssessmentTest as b, QtiItemSessionControl as c, QtiOutcomeProcessing as d, QtiOutcomeProcessingProcessor as e, QtiTest as f, QtiTestFeedback as g, QtiTestPart as h, QtiTestVariables as i, QtiTestVariablesExpression as j, TestContainer as k, TestEndAttempt as l, TestItemLink as m, TestItemToSpeech as n, TestNavigation as o, TestNext as p, TestPagingButtonsStamp as q, TestPrev as r, TestPrintContext as s, TestPrintVariables as t, TestScoringButtons as u, TestScoringFeedback as v, TestSectionButtonsStamp as w, TestSectionLink as x, TestStamp as y, TestTtsNext as z };
package/dist/test.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { I as ITestNavigationMixin } from './qti-test.d-_YAlhDbt.js';
2
- export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, c as QtiOutcomeProcessing, d as QtiOutcomeProcessingProcessor, e as QtiTest, f as QtiTestFeedback, g as QtiTestPart, h as QtiTestVariables, i as QtiTestVariablesExpression, S as SpeechState, T as TestCheckItem, j as TestContainer, k as TestEndAttempt, l as TestItemLink, m as TestItemToSpeech, n as TestNavigation, o as TestNext, p as TestPagingButtonsStamp, q as TestPrev, r as TestPrintContext, s as TestPrintVariables, t as TestScoringButtons, u as TestScoringFeedback, v as TestSectionButtonsStamp, w as TestSectionLink, x as TestStamp, y as TestTtsNext, z as TestTtsPause, A as TestTtsPlay, B as TestTtsPrev, C as TestTtsResume, D as TestTtsStop, E as TestView, F as TestViewToggle, G as TtsContext, H as ttsContext } from './qti-test.d-_YAlhDbt.js';
1
+ import { I as ITestNavigationMixin } from './qti-test.d-C6lCEMRB.js';
2
+ export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, c as QtiItemSessionControl, d as QtiOutcomeProcessing, e as QtiOutcomeProcessingProcessor, f as QtiTest, g as QtiTestFeedback, h as QtiTestPart, i as QtiTestVariables, j as QtiTestVariablesExpression, S as SpeechState, T as TestCheckItem, k as TestContainer, l as TestEndAttempt, m as TestItemLink, n as TestItemToSpeech, o as TestNavigation, p as TestNext, q as TestPagingButtonsStamp, r as TestPrev, s as TestPrintContext, t as TestPrintVariables, u as TestScoringButtons, v as TestScoringFeedback, w as TestSectionButtonsStamp, x as TestSectionLink, y as TestStamp, z as TestTtsNext, A as TestTtsPause, B as TestTtsPlay, C as TestTtsPrev, D as TestTtsResume, E as TestTtsStop, F as TestView, G as TestViewToggle, H as TtsContext, J as ttsContext } from './qti-test.d-C6lCEMRB.js';
3
3
  import { LitElement } from 'lit';
4
4
  import { g as VariableValue, b as OutcomeVariable, V as VariableDeclaration } from './item.types.d-QU7LljEK.js';
5
- import { S as SessionContext } from './computed.types.d-DpKIYO6e.js';
5
+ import { S as SessionContext } from './computed.types.d-CJarqC6s.js';
6
6
  import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
7
- import { T as TestContext } from './qti-expression.d-BietT_8b.js';
7
+ import { T as TestContext } from './qti-expression.d-B_-m9emA.js';
8
8
  import './qti-transform-test.d-BL7GGFJj.js';
9
9
  import './elements.js';
10
10
  import './interaction.interface.d-CvjHM2bi.js';
11
- import './qti-feedback.d-DZbad0RN.js';
11
+ import './qti-feedback.d-B1EIF-fU.js';
12
12
  import './qti-rule-base.d-ajOnfGXY.js';
13
13
  import '@heximal/templates';
14
14
  import './qti.context.d-CejJMlfZ.js';
package/dist/test.js CHANGED
@@ -1,8 +1,9 @@
1
- import "./chunk-NZLW6EX7.js";
1
+ import "./chunk-UC3T3NI3.js";
2
2
  import {
3
3
  QtiAssessmentItemRef,
4
4
  QtiAssessmentSection,
5
5
  QtiAssessmentTest,
6
+ QtiItemSessionControl,
6
7
  QtiOutcomeProcessing,
7
8
  QtiOutcomeProcessingProcessor,
8
9
  QtiTest,
@@ -35,16 +36,17 @@ import {
35
36
  TestView,
36
37
  TestViewToggle,
37
38
  ttsContext
38
- } from "./chunk-Q52IJELT.js";
39
- import "./chunk-6XJUP55A.js";
40
- import "./chunk-IYC7LZV6.js";
39
+ } from "./chunk-CRLXQZFA.js";
40
+ import "./chunk-YLRMOX6C.js";
41
+ import "./chunk-TLTYXWW7.js";
41
42
  import "./chunk-4DB4SC5K.js";
42
43
  import "./chunk-HDEG6BAZ.js";
43
- import "./chunk-EKXZI26R.js";
44
+ import "./chunk-7D3NKAGZ.js";
44
45
  export {
45
46
  QtiAssessmentItemRef,
46
47
  QtiAssessmentSection,
47
48
  QtiAssessmentTest,
49
+ QtiItemSessionControl,
48
50
  QtiOutcomeProcessing,
49
51
  QtiOutcomeProcessingProcessor,
50
52
  QtiTest,
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@citolab/qti-components",
3
3
  "description": "QTI component utilities",
4
- "version": "8.1.0",
4
+ "version": "8.2.0",
5
5
  "author": "",
6
6
  "dependencies": {
7
7
  "@heximal/templates": "^0.1.5",
8
8
  "@lit/context": "^1.1.6",
9
- "lit": "^3.3.2"
9
+ "lit": "^3.3.3"
10
10
  },
11
11
  "devDependencies": {
12
- "@qti-components/base": "^2.1.0",
13
- "@qti-components/corrections": "^0.2.0",
14
- "@qti-components/elements": "^1.6.5",
12
+ "@qti-components/base": "^2.2.0",
13
+ "@qti-components/corrections": "^0.3.0",
14
+ "@qti-components/elements": "^1.7.0",
15
15
  "@qti-components/interactions": "^1.10.4",
16
16
  "@qti-components/item": "^1.4.3",
17
- "@qti-components/test": "^1.5.4",
18
- "@qti-components/processing": "^1.4.0",
17
+ "@qti-components/loader": "^1.3.3",
18
+ "@qti-components/processing": "^1.4.1",
19
+ "@qti-components/test": "^1.6.0",
19
20
  "@qti-components/theme": "^2.1.0",
20
- "@qti-components/transformers": "^1.7.2",
21
- "@qti-components/loader": "^1.3.3"
21
+ "@qti-components/transformers": "^1.7.2"
22
22
  },
23
23
  "exports": {
24
24
  ".": {