@citolab/qti-components 10.0.0-next.20 → 10.0.0-next.22

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  qtiTestElements
3
- } from "./chunk-ORQFZNJW.js";
3
+ } from "./chunk-373IRT4X.js";
4
4
 
5
5
  // ../qti-test/dist/register.js
6
6
  for (const { tag, ctor } of qtiTestElements) {
@@ -8,4 +8,4 @@ for (const { tag, ctor } of qtiTestElements) {
8
8
  customElements.define(tag, ctor);
9
9
  }
10
10
  }
11
- //# sourceMappingURL=chunk-GJWA6LLT.js.map
11
+ //# sourceMappingURL=chunk-BB2ZSJXP.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  QtiTest,
3
3
  TestNavigation
4
- } from "./chunk-ORQFZNJW.js";
4
+ } from "./chunk-373IRT4X.js";
5
5
  import {
6
6
  QtiAssessmentItem
7
7
  } from "./chunk-H6DO5UHC.js";
@@ -1686,4 +1686,4 @@ export {
1686
1686
  TestNavigationCorrection,
1687
1687
  QtiTestCorrection
1688
1688
  };
1689
- //# sourceMappingURL=chunk-Y6Q3F2S7.js.map
1689
+ //# sourceMappingURL=chunk-L73QXB6G.js.map
@@ -63,8 +63,6 @@ type ComputedContext = {
63
63
  completed?: boolean;
64
64
  /** This section's own item-refs, not those of its subsections; empty for a section that only holds sections. */
65
65
  items: ComputedItem[];
66
- navigationMode: 'linear' | 'nonlinear';
67
- submissionMode: 'individual' | 'simultaneous';
68
66
  allowSkipping?: boolean;
69
67
  }[];
70
68
  }[];
@@ -7,8 +7,8 @@ import { QtiAssessmentItem } from './elements.js';
7
7
  import { Q as QtiItem } from './qti-item.d-CxP6KtCH.js';
8
8
  import './public-events.d-3dGip9pd.js';
9
9
  import { V as View, C as ComputedItemContext } from './session.context.d-9gRdGK4T.js';
10
- import { l as QtiTest, r as TestNavigation } from './qti-test.d-sskv-dEN.js';
11
- import { a as ComputedItem, C as ComputedContext } from './computed.types.d-6Ht-HNRx.js';
10
+ import { l as QtiTest, r as TestNavigation } from './qti-test.d-CN2JZwAz.js';
11
+ import { a as ComputedItem, C as ComputedContext } from './computed.types.d-6qQNFbu1.js';
12
12
  import './config.context.d-Dm11aAuw.js';
13
13
  import './interaction.interface.d-CvjHM2bi.js';
14
14
  import './variables.d-DWHlTszN.js';
@@ -33,10 +33,10 @@ import {
33
33
  TestNavigationCorrection,
34
34
  TestShowCorrectResponse,
35
35
  correctionPart
36
- } from "./chunk-Y6Q3F2S7.js";
36
+ } from "./chunk-L73QXB6G.js";
37
37
  import {
38
38
  qtiTestElements
39
- } from "./chunk-ORQFZNJW.js";
39
+ } from "./chunk-373IRT4X.js";
40
40
  import "./chunk-J6VX4N7M.js";
41
41
  import {
42
42
  qtiContentElements
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { I as ITestNavigationMixin, a as ITestStateMixin, b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev, u as TestSubmit } from './qti-test.d-sskv-dEN.js';
1
+ export { I as ITestNavigationMixin, a as ITestStateMixin, b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev, u as TestSubmit } from './qti-test.d-CN2JZwAz.js';
2
2
  export { IMyQtiTest, IQtiTest, ITestProcessingMixin, pluginElements } from './test.js';
3
- export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, p as pluginState } from './qti-test-state-CF9S8X9C.js';
3
+ export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, p as pluginState } from './qti-test-state-C71K8UNC.js';
4
4
  export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-CxP6KtCH.js';
5
5
  export { ItemViewMixin } from './item.js';
6
6
  export { F as FeedbackEventDetail, P as PUBLIC_ITEM_EVENTS, a as PublicEventDeclaration, b as PublicItemEventMap, c as PublicItemEventName, R as RubricPlacement, d as dispatchDeclared, e as dispatchPublic, l as listenDeclared, f as listenPublic } from './public-events.d-3dGip9pd.js';
@@ -12,7 +12,7 @@ export { qtiTransformManifest } from './transformers.js';
12
12
  export { ManifestInfo, getItemByUri, getManifestInfo } from './loader.js';
13
13
  export { CustomOperator, CustomOperatorValue, CustomStateSetShim, CustomStateSupport, IsNullOrUndefined, STATE_ALIASES, ScoringHelper, boxSizing, classifyCustomStateSupport, computedContext, computedItemContext, convertNumberToUniversalFormat, decimalSeparator, dropRegion, getCustomOperator, hasState, installCustomStateSetFallback, itemContext, registerCustomOperator, removeDoubleSlashes, setState, unregisterCustomOperator, validationMessage } from './base.js';
14
14
  export { C as ComputedItemContext, I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-9gRdGK4T.js';
15
- export { C as ComputedContext, a as ComputedItem, S as SessionControl } from './computed.types.d-6Ht-HNRx.js';
15
+ export { C as ComputedContext, a as ComputedItem, S as SessionControl } from './computed.types.d-6qQNFbu1.js';
16
16
  export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-Dm11aAuw.js';
17
17
  export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, V as ValidityKind, c as ValidityTrigger, i as inferRecordFieldBaseType, d as interactionContext, e as isRecordValue, r as readRecordFieldValues } from './record.d-N1Bq7e1f.js';
18
18
  export { I as ItemContext, i as itemContextVariables } from './item.types.d-Zc6ZQDhu.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-GJWA6LLT.js";
1
+ import "./chunk-BB2ZSJXP.js";
2
2
  import {
3
3
  pluginState
4
4
  } from "./chunk-DJ7PB252.js";
@@ -37,7 +37,7 @@ import {
37
37
  TestNavigationCorrection,
38
38
  TestShowCorrectResponse,
39
39
  correctionPart
40
- } from "./chunk-Y6Q3F2S7.js";
40
+ } from "./chunk-L73QXB6G.js";
41
41
  import {
42
42
  QTI_TEST_STATE_VERSION,
43
43
  QtiAssessmentItemRef,
@@ -62,7 +62,7 @@ import {
62
62
  TestPrev,
63
63
  TestSubmit,
64
64
  pluginElements
65
- } from "./chunk-ORQFZNJW.js";
65
+ } from "./chunk-373IRT4X.js";
66
66
  import "./chunk-J6VX4N7M.js";
67
67
  import "./chunk-TSJGL6FI.js";
68
68
  import {
@@ -4421,14 +4421,6 @@ export type QtiAssessmentSectionProps = {
4421
4421
  /** */
4422
4422
  keepTogether?: QtiAssessmentSection["keepTogether"] | undefined;
4423
4423
  /** */
4424
- "navigation-mode"?: QtiAssessmentSection["navigationMode"] | undefined;
4425
- /** */
4426
- navigationMode?: QtiAssessmentSection["navigationMode"] | undefined;
4427
- /** */
4428
- "submission-mode"?: QtiAssessmentSection["submissionMode"] | undefined;
4429
- /** */
4430
- submissionMode?: QtiAssessmentSection["submissionMode"] | undefined;
4431
- /** */
4432
4424
  title?: QtiAssessmentSection["title"] | undefined;
4433
4425
  /** */
4434
4426
  _testContext?: QtiAssessmentSection["_testContext"] | undefined;
@@ -4451,14 +4443,6 @@ export type QtiAssessmentSectionSolidJsProps = {
4451
4443
  /** */
4452
4444
  "prop:keepTogether"?: QtiAssessmentSection["keepTogether"] | undefined;
4453
4445
  /** */
4454
- "attr:navigation-mode"?: QtiAssessmentSection["navigationMode"] | undefined;
4455
- /** */
4456
- "prop:navigationMode"?: QtiAssessmentSection["navigationMode"] | undefined;
4457
- /** */
4458
- "attr:submission-mode"?: QtiAssessmentSection["submissionMode"] | undefined;
4459
- /** */
4460
- "prop:submissionMode"?: QtiAssessmentSection["submissionMode"] | undefined;
4461
- /** */
4462
4446
  "prop:title"?: QtiAssessmentSection["title"] | undefined;
4463
4447
  /** */
4464
4448
  "prop:_testContext"?: QtiAssessmentSection["_testContext"] | undefined;
@@ -9486,8 +9470,6 @@ export type CustomElements = {
9486
9470
  * - `fixed`: undefined
9487
9471
  * - `visible`: undefined
9488
9472
  * - `keep-together`/`keepTogether`: undefined
9489
- * - `navigation-mode`/`navigationMode`: undefined
9490
- * - `submission-mode`/`submissionMode`: undefined
9491
9473
  * - `title`: undefined (property only)
9492
9474
  * - `_testContext`: undefined (property only)
9493
9475
  *
@@ -15349,8 +15331,6 @@ export type CustomElementsSolidJs = {
15349
15331
  * - `fixed`: undefined
15350
15332
  * - `visible`: undefined
15351
15333
  * - `keep-together`/`keepTogether`: undefined
15352
- * - `navigation-mode`/`navigationMode`: undefined
15353
- * - `submission-mode`/`submissionMode`: undefined
15354
15334
  * - `title`: undefined (property only)
15355
15335
  * - `_testContext`: undefined (property only)
15356
15336
  *
@@ -1,4 +1,4 @@
1
- import { C as ComputedContext } from './computed.types.d-6Ht-HNRx.js';
1
+ import { C as ComputedContext } from './computed.types.d-6qQNFbu1.js';
2
2
  import { a as QtiTestPluginState$1 } from './qti-test-state.d-D8Q89RzZ.js';
3
3
 
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  import * as lit from 'lit';
2
2
  import { LitElement, PropertyValues } from 'lit';
3
3
  import { b as transformTestApi, t as transformItemApi } from './qti-transform-test.d-Bb9vnLzP.js';
4
- import { C as ComputedContext, a as ComputedItem } from './computed.types.d-6Ht-HNRx.js';
4
+ import { C as ComputedContext, a as ComputedItem } from './computed.types.d-6qQNFbu1.js';
5
5
  import './public-events.d-3dGip9pd.js';
6
6
  import { QtiAssessmentItem, QtiModalFeedback } from './elements.js';
7
7
  import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
@@ -119,8 +119,6 @@ declare class QtiAssessmentSection extends LitElement {
119
119
  set title(value: string);
120
120
  visible: boolean;
121
121
  keepTogether: boolean;
122
- navigationMode?: 'linear' | 'nonlinear';
123
- submissionMode?: 'individual' | 'simultaneous';
124
122
  _testContext?: TestContext;
125
123
  connectedCallback(): Promise<void>;
126
124
  render(): lit.TemplateResult<1>;
@@ -398,6 +396,41 @@ interface ITestStateMixin {
398
396
  state: QtiTestState;
399
397
  }
400
398
 
399
+ /**
400
+ * What a `qti-assessment-item` says about itself, read from its XML when it is fetched: no live
401
+ * state, nothing that needs the item rendered. Plain JSON, so a server can read the same file.
402
+ *
403
+ * Experimental (0.x): roadmap 1 phase T1; see `plans/test-model.md`.
404
+ */
405
+ interface ItemFacts {
406
+ /** The item's own `identifier`, which may differ from the item-ref's. */
407
+ identifier: string;
408
+ /** `adaptive`; false when absent (XSD default). */
409
+ adaptive: boolean;
410
+ /** `time-dependent`; false when absent. */
411
+ timeDependent: boolean;
412
+ /**
413
+ * A response declaration has a correct response, or a mapping with a map entry, or an area
414
+ * mapping with an area-map entry: something to compare a response with.
415
+ */
416
+ hasCorrectResponse: boolean;
417
+ /** The item has `qti-response-processing`. */
418
+ hasResponseProcessing: boolean;
419
+ /** `external-scored` on the `SCORE` outcome declaration, or null when not externally scored. */
420
+ externalScored: 'human' | 'externalMachine' | null;
421
+ /** `label`, or null when absent. */
422
+ label: string | null;
423
+ /** `title`; empty when absent. */
424
+ title: string;
425
+ }
426
+
427
+ /**
428
+ * The facts of every item fetched so far, by item-ref identifier, read from the item XML when
429
+ * `qti-test` loads it (`readItemFacts`). `test-navigation` puts them on the `computedContext` items.
430
+ * A new map on every change, so subscribers are notified. Internal: not exported, not API.
431
+ */
432
+ type ItemFactsByRef = ReadonlyMap<string, ItemFacts>;
433
+
401
434
  declare class TestNavigation extends LitElement {
402
435
  #private;
403
436
  identifier: string | undefined;
@@ -417,6 +450,8 @@ declare class TestNavigation extends LitElement {
417
450
  configContext: ConfigContext;
418
451
  protected _testContext?: TestContext;
419
452
  protected _sessionContext?: SessionContext;
453
+ /** Read from each item's XML when `qti-test` fetches it; see `itemFactsContext`. */
454
+ protected _itemFacts?: ItemFactsByRef;
420
455
  protected computedContext: ComputedContext;
421
456
  autoScoreItems: boolean;
422
457
  constructor();
@@ -1,10 +1,10 @@
1
1
  import { V as View } from './session.context.d-9gRdGK4T.js';
2
2
  import { a as PublicEventDeclaration } from './public-events.d-3dGip9pd.js';
3
3
  import { Q as QtiTestState } from './qti-test-state.d-D8Q89RzZ.js';
4
- export { a as QtiTestPluginState, b as QtiTestState, p as pluginState } from './qti-test-state-CF9S8X9C.js';
4
+ export { a as QtiTestPluginState, b as QtiTestState, p as pluginState } from './qti-test-state-C71K8UNC.js';
5
5
  import * as lit from 'lit';
6
6
  import './variables.d-DWHlTszN.js';
7
- import './computed.types.d-6Ht-HNRx.js';
7
+ import './computed.types.d-6qQNFbu1.js';
8
8
 
9
9
  /**
10
10
  * The public events of the test. The name tells you it is public: everything here starts with
package/dist/test.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { u as TestSubmit, v as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-sskv-dEN.js';
2
- export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev } from './qti-test.d-sskv-dEN.js';
3
- export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, p as pluginState } from './qti-test-state-CF9S8X9C.js';
1
+ import { u as TestSubmit, v as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-CN2JZwAz.js';
2
+ export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev } from './qti-test.d-CN2JZwAz.js';
3
+ export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, p as pluginState } from './qti-test-state-C71K8UNC.js';
4
4
  import { LitElement } from 'lit';
5
5
  import { b as OutcomeVariable, V as VariableDeclaration } from './variables.d-DWHlTszN.js';
6
6
  import { S as SessionContext } from './session.context.d-9gRdGK4T.js';
@@ -8,7 +8,7 @@ import { C as ConfigContext } from './config.context.d-Dm11aAuw.js';
8
8
  import { I as ItemContext } from './item.types.d-Zc6ZQDhu.js';
9
9
  import { T as TestContext } from './qti-expression.d-iH3w6mqf.js';
10
10
  import './qti-transform-test.d-Bb9vnLzP.js';
11
- import './computed.types.d-6Ht-HNRx.js';
11
+ import './computed.types.d-6qQNFbu1.js';
12
12
  import './public-events.d-3dGip9pd.js';
13
13
  import './elements.js';
14
14
  import './interaction.interface.d-CvjHM2bi.js';
package/dist/test.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-GJWA6LLT.js";
1
+ import "./chunk-BB2ZSJXP.js";
2
2
  import {
3
3
  pluginState
4
4
  } from "./chunk-DJ7PB252.js";
@@ -26,7 +26,7 @@ import {
26
26
  TestPrev,
27
27
  TestSubmit,
28
28
  pluginElements
29
- } from "./chunk-ORQFZNJW.js";
29
+ } from "./chunk-373IRT4X.js";
30
30
  import "./chunk-J6VX4N7M.js";
31
31
  import "./chunk-H6DO5UHC.js";
32
32
  import "./chunk-UCXLDQYA.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@citolab/qti-components",
3
3
  "description": "QTI component utilities",
4
- "version": "10.0.0-next.20",
4
+ "version": "10.0.0-next.22",
5
5
  "author": "",
6
6
  "dependencies": {
7
7
  "@heximal/templates": "^0.1.5",
@@ -10,15 +10,15 @@
10
10
  "lit-html": "^3.3.1"
11
11
  },
12
12
  "devDependencies": {
13
- "@qti-components/base": "^3.0.0-next.8",
13
+ "@qti-components/base": "^3.0.0-next.9",
14
14
  "@qti-components/corrections": "^1.0.0-next.11",
15
- "@qti-components/delivery": "^0.1.0-next.0",
15
+ "@qti-components/delivery": "^0.1.0-next.1",
16
16
  "@qti-components/elements": "^2.0.0-next.7",
17
17
  "@qti-components/interactions": "^1.10.5-next.8",
18
18
  "@qti-components/item": "^1.5.1-next.7",
19
19
  "@qti-components/loader": "^1.3.4-next.2",
20
20
  "@qti-components/processing": "^1.6.1-next.5",
21
- "@qti-components/test": "^2.0.0-next.16",
21
+ "@qti-components/test": "^2.0.0-next.18",
22
22
  "@qti-components/theme": "^3.0.0-next.6",
23
23
  "@qti-components/transformers": "^1.8.0-next.1"
24
24
  },