@citolab/qti-components 6.3.7 → 6.4.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/{chunk-WEDIB3NH.cjs → chunk-4UAPG3LE.cjs} +59 -708
- package/dist/{chunk-Q5WLROU6.js → chunk-C4LCNAWX.js} +59 -708
- package/dist/chunk-DMECNMIP.js +405 -0
- package/dist/{chunk-6G76D2MI.cjs → chunk-HYQC3D4Z.cjs} +1 -1
- package/dist/{chunk-M4CYU6DC.cjs → chunk-SLKHOXHJ.cjs} +1 -1
- package/dist/{chunk-QROD4MVT.js → chunk-V6U2X6CM.js} +1 -1
- package/dist/chunk-W7PJYSDO.cjs +405 -0
- package/dist/chunk-YWGBLO7P.js +1 -0
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.cts +3 -3
- package/dist/context/index.d.ts +3 -3
- package/dist/context/index.js +1 -1
- package/dist/custom-elements.json +1216 -743
- package/dist/decorators/index.cjs +1 -1
- package/dist/decorators/index.js +1 -1
- package/dist/index.bundled.css +487 -0
- package/dist/index.cjs +368 -1742
- package/dist/index.css +48 -706
- package/dist/index.d.cts +105 -45
- package/dist/index.d.ts +105 -45
- package/dist/index.js +368 -1742
- package/dist/qti-components/index.cjs +35 -33
- package/dist/qti-components/index.d.cts +6 -9
- package/dist/qti-components/index.d.ts +6 -9
- package/dist/qti-components/index.js +59 -57
- package/dist/qti-item/index.cjs +1 -1
- package/dist/qti-item/index.d.cts +33 -2
- package/dist/qti-item/index.d.ts +33 -2
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-item-react/index.cjs +1 -1
- package/dist/qti-item-react/index.d.cts +2 -2
- package/dist/qti-item-react/index.d.ts +2 -2
- package/dist/qti-item-react/index.js +1 -1
- package/dist/{qti-simple-choice-1e52645f.d.ts → qti-simple-choice-216b88b7.d.ts} +3 -1
- package/dist/qti-test/index.cjs +1 -1
- package/dist/qti-test/index.d.cts +44 -50
- package/dist/qti-test/index.d.ts +44 -50
- package/dist/qti-test/index.js +1 -1
- package/dist/qti-test-react/index.cjs +1 -1
- package/dist/qti-test-react/index.d.cts +41 -4
- package/dist/qti-test-react/index.d.ts +41 -4
- package/dist/qti-test-react/index.js +1 -1
- package/dist/qti-transform/index.cjs +1 -1
- package/dist/qti-transform/index.js +1 -1
- package/dist/test-print-variables-7ec6a0d5.d.ts +100 -0
- package/dist/test-print-variables-d61937ce.d.ts +100 -0
- package/package.json +21 -19
- package/dist/chunk-343LZK3D.js +0 -1
- package/dist/chunk-BKBZWUX6.cjs +0 -1
- package/dist/chunk-DPSTDDQZ.js +0 -1
- package/dist/chunk-GKMV5OHL.cjs +0 -1195
- package/dist/chunk-KDPWLV2I.js +0 -1195
- package/dist/chunk-MTPOYN4D.js +0 -0
- package/dist/chunk-TEMU6PXC.cjs +0 -1
- package/dist/qti-test-39419b1a.d.ts +0 -63
- package/dist/qti-test-f4fd5ff3.d.ts +0 -63
package/dist/qti-item/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4UAPG3LEcjs = require('../chunk-4UAPG3LE.cjs');require('../chunk-CCQXZDO6.cjs');require('../chunk-HYQC3D4Z.cjs');exports.QtiItem = _chunk4UAPG3LEcjs.a;
|
|
@@ -1,19 +1,50 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
import { AudienceContext } from '../context/index.cjs';
|
|
4
|
-
import { Q as QtiAssessmentItem } from '../qti-simple-choice-
|
|
5
|
+
import { Q as QtiAssessmentItem } from '../qti-simple-choice-216b88b7.js';
|
|
5
6
|
import 'lit-html/directives/ref';
|
|
6
7
|
|
|
7
8
|
declare class QtiItem extends LitElement {
|
|
9
|
+
/**
|
|
10
|
+
* The location of the item.
|
|
11
|
+
* @attr item-location
|
|
12
|
+
*/
|
|
8
13
|
itemLocation: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the item is disabled.
|
|
16
|
+
*/
|
|
9
17
|
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Updates the element.
|
|
20
|
+
* @param changedProperties - The changed properties.
|
|
21
|
+
*/
|
|
10
22
|
update(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
23
|
+
static styles: lit.CSSResult;
|
|
24
|
+
/**
|
|
25
|
+
* The XML content of the item.
|
|
26
|
+
*/
|
|
11
27
|
protected _xml: string;
|
|
28
|
+
constructor();
|
|
29
|
+
private checkAudienceContext;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the XML content of the item.
|
|
32
|
+
* @param val - The XML content.
|
|
33
|
+
*/
|
|
12
34
|
set xml(val: string);
|
|
35
|
+
/**
|
|
36
|
+
* Sets the CSS content of the item.
|
|
37
|
+
* @param val - The CSS content.
|
|
38
|
+
*/
|
|
13
39
|
set css(val: string);
|
|
40
|
+
/**
|
|
41
|
+
* Returns the assessment item.
|
|
42
|
+
*/
|
|
14
43
|
get assessmentItem(): QtiAssessmentItem | null;
|
|
44
|
+
/**
|
|
45
|
+
* The audience context. describes
|
|
46
|
+
*/
|
|
15
47
|
audienceContext: AudienceContext;
|
|
16
|
-
constructor();
|
|
17
48
|
connectedCallback(): void;
|
|
18
49
|
render: () => lit_html.TemplateResult<1>;
|
|
19
50
|
}
|
package/dist/qti-item/index.d.ts
CHANGED
|
@@ -1,19 +1,50 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
import { AudienceContext } from '../context/index.js';
|
|
4
|
-
import { Q as QtiAssessmentItem } from '../qti-simple-choice-
|
|
5
|
+
import { Q as QtiAssessmentItem } from '../qti-simple-choice-216b88b7.js';
|
|
5
6
|
import 'lit-html/directives/ref';
|
|
6
7
|
|
|
7
8
|
declare class QtiItem extends LitElement {
|
|
9
|
+
/**
|
|
10
|
+
* The location of the item.
|
|
11
|
+
* @attr item-location
|
|
12
|
+
*/
|
|
8
13
|
itemLocation: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the item is disabled.
|
|
16
|
+
*/
|
|
9
17
|
disabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Updates the element.
|
|
20
|
+
* @param changedProperties - The changed properties.
|
|
21
|
+
*/
|
|
10
22
|
update(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
23
|
+
static styles: lit.CSSResult;
|
|
24
|
+
/**
|
|
25
|
+
* The XML content of the item.
|
|
26
|
+
*/
|
|
11
27
|
protected _xml: string;
|
|
28
|
+
constructor();
|
|
29
|
+
private checkAudienceContext;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the XML content of the item.
|
|
32
|
+
* @param val - The XML content.
|
|
33
|
+
*/
|
|
12
34
|
set xml(val: string);
|
|
35
|
+
/**
|
|
36
|
+
* Sets the CSS content of the item.
|
|
37
|
+
* @param val - The CSS content.
|
|
38
|
+
*/
|
|
13
39
|
set css(val: string);
|
|
40
|
+
/**
|
|
41
|
+
* Returns the assessment item.
|
|
42
|
+
*/
|
|
14
43
|
get assessmentItem(): QtiAssessmentItem | null;
|
|
44
|
+
/**
|
|
45
|
+
* The audience context. describes
|
|
46
|
+
*/
|
|
15
47
|
audienceContext: AudienceContext;
|
|
16
|
-
constructor();
|
|
17
48
|
connectedCallback(): void;
|
|
18
49
|
render: () => lit_html.TemplateResult<1>;
|
|
19
50
|
}
|
package/dist/qti-item/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{a}from"../chunk-C4LCNAWX.js";import"../chunk-AWSFYZS5.js";import"../chunk-YWGBLO7P.js";export{a as QtiItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk4UAPG3LEcjs = require('../chunk-4UAPG3LE.cjs');require('../chunk-CCQXZDO6.cjs');require('../chunk-HYQC3D4Z.cjs');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _react3 = require('@lit/react');var s=_react3.createComponent.call(void 0, {tagName:"qti-item",react:_react2.default,elementClass:_chunk4UAPG3LEcjs.a,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onItemFirstUpdated:"qti-item-first-updated"}});exports.QtiItem = s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Ref } from 'react';
|
|
2
2
|
import { QtiItem as QtiItem$1 } from '../qti-item/index.cjs';
|
|
3
|
-
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-
|
|
3
|
+
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-216b88b7.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
import '../context/index.cjs';
|
|
@@ -20,4 +20,4 @@ interface QtiItemProps {
|
|
|
20
20
|
}
|
|
21
21
|
declare const QtiItem: React.ForwardRefExoticComponent<QtiItemProps>;
|
|
22
22
|
|
|
23
|
-
export { QtiItem };
|
|
23
|
+
export { QtiItem, QtiItemProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Ref } from 'react';
|
|
2
2
|
import { QtiItem as QtiItem$1 } from '../qti-item/index.js';
|
|
3
|
-
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-
|
|
3
|
+
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-216b88b7.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
import '../context/index.js';
|
|
@@ -20,4 +20,4 @@ interface QtiItemProps {
|
|
|
20
20
|
}
|
|
21
21
|
declare const QtiItem: React.ForwardRefExoticComponent<QtiItemProps>;
|
|
22
22
|
|
|
23
|
-
export { QtiItem };
|
|
23
|
+
export { QtiItem, QtiItemProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"../chunk-
|
|
1
|
+
import{a as t}from"../chunk-C4LCNAWX.js";import"../chunk-AWSFYZS5.js";import"../chunk-YWGBLO7P.js";import e from"react";import{createComponent as o}from"@lit/react";var s=o({tagName:"qti-item",react:e,elementClass:t,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onItemFirstUpdated:"qti-item-first-updated"}});export{s as QtiItem};
|
|
@@ -227,7 +227,7 @@ declare class QtiAssessmentItem extends LitElement {
|
|
|
227
227
|
set responses(myResponses: ResponseInteraction[]);
|
|
228
228
|
render(): lit_html.TemplateResult<1>;
|
|
229
229
|
constructor();
|
|
230
|
-
showCorrectResponse(): void;
|
|
230
|
+
showCorrectResponse(show: boolean): void;
|
|
231
231
|
processResponse(countNumAttempts?: boolean): boolean;
|
|
232
232
|
resetResponses(): void;
|
|
233
233
|
getResponse(identifier: string): Readonly<ResponseVariable>;
|
|
@@ -307,6 +307,7 @@ declare abstract class Interaction extends LitElement {
|
|
|
307
307
|
readonly: boolean;
|
|
308
308
|
abstract validate(): boolean;
|
|
309
309
|
abstract set response(val: Readonly<string | string[]>);
|
|
310
|
+
set correctResponse(val: Readonly<string | string[]>);
|
|
310
311
|
connectedCallback(): void;
|
|
311
312
|
saveResponse(value: string | string[]): void;
|
|
312
313
|
}
|
|
@@ -370,6 +371,7 @@ declare abstract class Choices extends Interaction {
|
|
|
370
371
|
constructor();
|
|
371
372
|
validate(): boolean;
|
|
372
373
|
set response(responseValue: string | string[]);
|
|
374
|
+
set correctResponse(responseValue: string | string[]);
|
|
373
375
|
connectedCallback(): void;
|
|
374
376
|
disconnectedCallback(): void;
|
|
375
377
|
private _registerChoiceElement;
|
package/dist/qti-test/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW7PJYSDOcjs = require('../chunk-W7PJYSDO.cjs');require('../chunk-4UAPG3LE.cjs');require('../chunk-CCQXZDO6.cjs');require('../chunk-HYQC3D4Z.cjs');exports.QtiAssessmentItemRef = _chunkW7PJYSDOcjs.a; exports.QtiAssessmentTest = _chunkW7PJYSDOcjs.d; exports.QtiTest = _chunkW7PJYSDOcjs.h; exports.QtiTestPart = _chunkW7PJYSDOcjs.e; exports.TestContext = _chunkW7PJYSDOcjs.b; exports.TestItemId = _chunkW7PJYSDOcjs.v; exports.TestManualScoring = _chunkW7PJYSDOcjs.t; exports.TestNext = _chunkW7PJYSDOcjs.i; exports.TestPagingButtons = _chunkW7PJYSDOcjs.n; exports.TestPagingRadio = _chunkW7PJYSDOcjs.m; exports.TestPrev = _chunkW7PJYSDOcjs.j; exports.TestPrintScore = _chunkW7PJYSDOcjs.s; exports.TestPrintVariables = _chunkW7PJYSDOcjs.r; exports.TestProgress = _chunkW7PJYSDOcjs.k; exports.TestScript = _chunkW7PJYSDOcjs.p; exports.TestShowCorrect = _chunkW7PJYSDOcjs.o; exports.TestShowIndex = _chunkW7PJYSDOcjs.q; exports.TestSlider = _chunkW7PJYSDOcjs.l; exports.TestToggleScoring = _chunkW7PJYSDOcjs.u; exports.fetchManifestData = _chunkW7PJYSDOcjs.g; exports.requestItem = _chunkW7PJYSDOcjs.f; exports.testContext = _chunkW7PJYSDOcjs.c;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { T as TestContext } from '../
|
|
2
|
-
export {
|
|
1
|
+
import { T as TestContext } from '../test-print-variables-d61937ce.js';
|
|
2
|
+
export { a as QtiAssessmentItemRef, Q as QtiAssessmentTest, c as TestNext, f as TestPagingButtons, g as TestPagingRadio, b as TestPrev, j as TestPrintVariables, e as TestProgress, i as TestShowCorrect, d as TestShowIndex, h as TestSlider, t as testContext } from '../test-print-variables-d61937ce.js';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
4
|
import { LitElement } from 'lit';
|
|
5
|
-
import '
|
|
5
|
+
import * as haunted_lib_component from 'haunted/lib/component';
|
|
6
|
+
import '../qti-simple-choice-216b88b7.js';
|
|
6
7
|
import 'lit-html/directives/ref';
|
|
7
8
|
import '../qti-item/index.cjs';
|
|
8
9
|
import '../context/index.cjs';
|
|
10
|
+
import '@lit-labs/preact-signals';
|
|
9
11
|
|
|
10
12
|
declare class QtiTestPart extends LitElement {
|
|
11
13
|
loading: boolean;
|
|
@@ -13,47 +15,9 @@ declare class QtiTestPart extends LitElement {
|
|
|
13
15
|
render(): lit_html.TemplateResult<1>;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
declare
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
render(): lit_html.TemplateResult<1>;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare class TestPrev extends LitElement {
|
|
23
|
-
_testContext?: TestContext;
|
|
24
|
-
_requestItem(index: any): void;
|
|
25
|
-
render(): lit_html.TemplateResult<1>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare class QtiTestProgress extends LitElement {
|
|
29
|
-
_testProvider?: TestContext;
|
|
30
|
-
render(): lit_html.TemplateResult<1>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare class QtiTestSlider extends LitElement {
|
|
34
|
-
_testProvider?: TestContext;
|
|
35
|
-
_requestItem(index: any): void;
|
|
36
|
-
render(): lit_html.TemplateResult<1>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare class QtiTestPagingRadio extends LitElement {
|
|
40
|
-
_testProvider?: TestContext;
|
|
41
|
-
protected createRenderRoot(): this;
|
|
42
|
-
_requestItem(index: any): void;
|
|
43
|
-
render(): lit_html.TemplateResult<1>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
declare class QtiTestPagingButtons extends LitElement {
|
|
47
|
-
_testProvider?: TestContext;
|
|
48
|
-
protected createRenderRoot(): this;
|
|
49
|
-
_requestItem(index: any): void;
|
|
50
|
-
render(): lit_html.TemplateResult<1>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare class QtiTestShowCorrect extends LitElement {
|
|
54
|
-
_testProvider?: TestContext;
|
|
55
|
-
render(): lit_html.TemplateResult<1>;
|
|
56
|
-
}
|
|
18
|
+
declare const QtiTest: haunted_lib_component.ComponentConstructor<{
|
|
19
|
+
"package-uri": any;
|
|
20
|
+
}>;
|
|
57
21
|
|
|
58
22
|
declare class TestScript extends LitElement {
|
|
59
23
|
private operatorFunction;
|
|
@@ -63,21 +27,51 @@ declare class TestScript extends LitElement {
|
|
|
63
27
|
handleSlotChange(event: Event): void;
|
|
64
28
|
}
|
|
65
29
|
|
|
66
|
-
declare class
|
|
30
|
+
declare class TestPrintScore extends LitElement {
|
|
67
31
|
_testContext?: TestContext;
|
|
68
32
|
_requestItem(index: any): void;
|
|
69
33
|
render(): lit_html.TemplateResult<1>;
|
|
70
34
|
}
|
|
71
35
|
|
|
72
|
-
declare class
|
|
73
|
-
|
|
36
|
+
declare class TestManualScoring extends LitElement {
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
readonly: boolean;
|
|
39
|
+
value: number;
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
protected textChanged(event: Event): void;
|
|
43
|
+
render(): lit_html.TemplateResult<1>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class TestToggleScoring extends LitElement {
|
|
74
47
|
render(): lit_html.TemplateResult<1>;
|
|
75
48
|
}
|
|
76
49
|
|
|
77
|
-
declare class
|
|
50
|
+
declare class TestItemId extends LitElement {
|
|
78
51
|
_testContext?: TestContext;
|
|
79
|
-
_requestItem(index: any): void;
|
|
80
52
|
render(): lit_html.TemplateResult<1>;
|
|
81
53
|
}
|
|
82
54
|
|
|
83
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Requests an XML item from the specified URL.
|
|
57
|
+
* @param href - The URL of the XML item to request.
|
|
58
|
+
* @returns A Promise that resolves to the XML item as a string.
|
|
59
|
+
*/
|
|
60
|
+
declare function requestItem(href: string): Promise<string>;
|
|
61
|
+
type ManifestData = {
|
|
62
|
+
itemLocation: string;
|
|
63
|
+
testIdentifier: string;
|
|
64
|
+
items: {
|
|
65
|
+
identifier: string;
|
|
66
|
+
href: string;
|
|
67
|
+
category: string;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Fetches manifest data for a given package URI.
|
|
72
|
+
* @param packageUri The URI of the package to fetch manifest data for.
|
|
73
|
+
* @returns A Promise that resolves to a ManifestData object.
|
|
74
|
+
*/
|
|
75
|
+
declare const fetchManifestData: (packageUri: string) => Promise<ManifestData>;
|
|
76
|
+
|
|
77
|
+
export { ManifestData, QtiTest, QtiTestPart, TestContext, TestItemId, TestManualScoring, TestPrintScore, TestScript, TestToggleScoring, fetchManifestData, requestItem };
|
package/dist/qti-test/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { T as TestContext } from '../
|
|
2
|
-
export {
|
|
1
|
+
import { T as TestContext } from '../test-print-variables-7ec6a0d5.js';
|
|
2
|
+
export { a as QtiAssessmentItemRef, Q as QtiAssessmentTest, c as TestNext, f as TestPagingButtons, g as TestPagingRadio, b as TestPrev, j as TestPrintVariables, e as TestProgress, i as TestShowCorrect, d as TestShowIndex, h as TestSlider, t as testContext } from '../test-print-variables-7ec6a0d5.js';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
4
|
import { LitElement } from 'lit';
|
|
5
|
-
import '
|
|
5
|
+
import * as haunted_lib_component from 'haunted/lib/component';
|
|
6
|
+
import '../qti-simple-choice-216b88b7.js';
|
|
6
7
|
import 'lit-html/directives/ref';
|
|
7
8
|
import '../qti-item/index.js';
|
|
8
9
|
import '../context/index.js';
|
|
10
|
+
import '@lit-labs/preact-signals';
|
|
9
11
|
|
|
10
12
|
declare class QtiTestPart extends LitElement {
|
|
11
13
|
loading: boolean;
|
|
@@ -13,47 +15,9 @@ declare class QtiTestPart extends LitElement {
|
|
|
13
15
|
render(): lit_html.TemplateResult<1>;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
declare
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
render(): lit_html.TemplateResult<1>;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare class TestPrev extends LitElement {
|
|
23
|
-
_testContext?: TestContext;
|
|
24
|
-
_requestItem(index: any): void;
|
|
25
|
-
render(): lit_html.TemplateResult<1>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare class QtiTestProgress extends LitElement {
|
|
29
|
-
_testProvider?: TestContext;
|
|
30
|
-
render(): lit_html.TemplateResult<1>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare class QtiTestSlider extends LitElement {
|
|
34
|
-
_testProvider?: TestContext;
|
|
35
|
-
_requestItem(index: any): void;
|
|
36
|
-
render(): lit_html.TemplateResult<1>;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare class QtiTestPagingRadio extends LitElement {
|
|
40
|
-
_testProvider?: TestContext;
|
|
41
|
-
protected createRenderRoot(): this;
|
|
42
|
-
_requestItem(index: any): void;
|
|
43
|
-
render(): lit_html.TemplateResult<1>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
declare class QtiTestPagingButtons extends LitElement {
|
|
47
|
-
_testProvider?: TestContext;
|
|
48
|
-
protected createRenderRoot(): this;
|
|
49
|
-
_requestItem(index: any): void;
|
|
50
|
-
render(): lit_html.TemplateResult<1>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
declare class QtiTestShowCorrect extends LitElement {
|
|
54
|
-
_testProvider?: TestContext;
|
|
55
|
-
render(): lit_html.TemplateResult<1>;
|
|
56
|
-
}
|
|
18
|
+
declare const QtiTest: haunted_lib_component.ComponentConstructor<{
|
|
19
|
+
"package-uri": any;
|
|
20
|
+
}>;
|
|
57
21
|
|
|
58
22
|
declare class TestScript extends LitElement {
|
|
59
23
|
private operatorFunction;
|
|
@@ -63,21 +27,51 @@ declare class TestScript extends LitElement {
|
|
|
63
27
|
handleSlotChange(event: Event): void;
|
|
64
28
|
}
|
|
65
29
|
|
|
66
|
-
declare class
|
|
30
|
+
declare class TestPrintScore extends LitElement {
|
|
67
31
|
_testContext?: TestContext;
|
|
68
32
|
_requestItem(index: any): void;
|
|
69
33
|
render(): lit_html.TemplateResult<1>;
|
|
70
34
|
}
|
|
71
35
|
|
|
72
|
-
declare class
|
|
73
|
-
|
|
36
|
+
declare class TestManualScoring extends LitElement {
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
readonly: boolean;
|
|
39
|
+
value: number;
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
protected textChanged(event: Event): void;
|
|
43
|
+
render(): lit_html.TemplateResult<1>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class TestToggleScoring extends LitElement {
|
|
74
47
|
render(): lit_html.TemplateResult<1>;
|
|
75
48
|
}
|
|
76
49
|
|
|
77
|
-
declare class
|
|
50
|
+
declare class TestItemId extends LitElement {
|
|
78
51
|
_testContext?: TestContext;
|
|
79
|
-
_requestItem(index: any): void;
|
|
80
52
|
render(): lit_html.TemplateResult<1>;
|
|
81
53
|
}
|
|
82
54
|
|
|
83
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Requests an XML item from the specified URL.
|
|
57
|
+
* @param href - The URL of the XML item to request.
|
|
58
|
+
* @returns A Promise that resolves to the XML item as a string.
|
|
59
|
+
*/
|
|
60
|
+
declare function requestItem(href: string): Promise<string>;
|
|
61
|
+
type ManifestData = {
|
|
62
|
+
itemLocation: string;
|
|
63
|
+
testIdentifier: string;
|
|
64
|
+
items: {
|
|
65
|
+
identifier: string;
|
|
66
|
+
href: string;
|
|
67
|
+
category: string;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Fetches manifest data for a given package URI.
|
|
72
|
+
* @param packageUri The URI of the package to fetch manifest data for.
|
|
73
|
+
* @returns A Promise that resolves to a ManifestData object.
|
|
74
|
+
*/
|
|
75
|
+
declare const fetchManifestData: (packageUri: string) => Promise<ManifestData>;
|
|
76
|
+
|
|
77
|
+
export { ManifestData, QtiTest, QtiTestPart, TestContext, TestItemId, TestManualScoring, TestPrintScore, TestScript, TestToggleScoring, fetchManifestData, requestItem };
|
package/dist/qti-test/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v}from"../chunk-DMECNMIP.js";import"../chunk-C4LCNAWX.js";import"../chunk-AWSFYZS5.js";import"../chunk-YWGBLO7P.js";export{a as QtiAssessmentItemRef,d as QtiAssessmentTest,h as QtiTest,e as QtiTestPart,b as TestContext,v as TestItemId,t as TestManualScoring,i as TestNext,n as TestPagingButtons,m as TestPagingRadio,j as TestPrev,s as TestPrintScore,r as TestPrintVariables,k as TestProgress,p as TestScript,o as TestShowCorrect,q as TestShowIndex,l as TestSlider,u as TestToggleScoring,g as fetchManifestData,f as requestItem,c as testContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkW7PJYSDOcjs = require('../chunk-W7PJYSDO.cjs');require('../chunk-4UAPG3LE.cjs');require('../chunk-CCQXZDO6.cjs');require('../chunk-HYQC3D4Z.cjs');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _react3 = require('@lit/react');var l=_react3.createComponent.call(void 0, {tagName:"qti-test",react:_react2.default,elementClass:_chunkW7PJYSDOcjs.h,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onTestFirstUpdated:"qti-assessment-first-updated"}});var b=_react3.createComponent.call(void 0, {tagName:"qti-assessment-test",react:_react2.default,elementClass:_chunkW7PJYSDOcjs.d,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onItemFirstUpdated:"qti-item-first-updated",onTestRequestItem:"on-test-set-item",onTestFirstUpdated:"qti-assessment-first-updated"}});exports.QtiAssessmentTest = b; exports.QtiTest = l;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import React, { Ref } from 'react';
|
|
2
|
-
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-
|
|
3
|
-
import { T as TestContext, Q as
|
|
1
|
+
import React, { Ref, DOMAttributes } from 'react';
|
|
2
|
+
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-216b88b7.js';
|
|
3
|
+
import { T as TestContext, Q as QtiAssessmentTest$1, a as QtiAssessmentItemRef, b as TestPrev, c as TestNext, d as TestShowIndex, e as TestProgress, f as TestPagingButtons, g as TestPagingRadio, h as TestSlider, i as TestShowCorrect, j as TestPrintVariables } from '../test-print-variables-d61937ce.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
import 'lit-html/directives/ref';
|
|
7
7
|
import '../qti-item/index.cjs';
|
|
8
8
|
import '../context/index.cjs';
|
|
9
|
+
import '@lit-labs/preact-signals';
|
|
9
10
|
|
|
10
11
|
interface QtiTestProps {
|
|
11
12
|
children?: any;
|
|
12
13
|
className?: string;
|
|
13
14
|
context?: TestContext;
|
|
14
|
-
ref?: Ref<
|
|
15
|
+
ref?: Ref<any | undefined>;
|
|
15
16
|
onOutcomeChanged?: (e: CustomEvent<OutcomeChangedDetails>) => void;
|
|
16
17
|
onInteractionChanged?: (e: CustomEvent<InteractionChangedDetails>) => void;
|
|
17
18
|
onTestFirstUpdated?: (e: CustomEvent<QtiAssessmentTest$1>) => void;
|
|
@@ -21,11 +22,47 @@ declare const QtiTest: React.ForwardRefExoticComponent<QtiTestProps>;
|
|
|
21
22
|
interface OutcomeChangedDetailsExtended extends OutcomeChangedDetails {
|
|
22
23
|
identifier: string;
|
|
23
24
|
}
|
|
25
|
+
type CustomElement<T> = Partial<T & DOMAttributes<T> & {
|
|
26
|
+
children: any;
|
|
27
|
+
}>;
|
|
28
|
+
declare global {
|
|
29
|
+
namespace JSX {
|
|
30
|
+
interface IntrinsicElements {
|
|
31
|
+
['qti-test-part']: CustomElement<{
|
|
32
|
+
identifier: string;
|
|
33
|
+
}>;
|
|
34
|
+
['qti-assessment-section']: CustomElement<{
|
|
35
|
+
identifier: string;
|
|
36
|
+
title: string;
|
|
37
|
+
visible: string;
|
|
38
|
+
required: string;
|
|
39
|
+
}>;
|
|
40
|
+
['qti-assessment-item-ref']: CustomElement<{
|
|
41
|
+
identifier: string;
|
|
42
|
+
href: string;
|
|
43
|
+
key: string;
|
|
44
|
+
'item-location': string;
|
|
45
|
+
category?: string;
|
|
46
|
+
ref: (el: any) => Map<string, QtiAssessmentItemRef>;
|
|
47
|
+
}>;
|
|
48
|
+
['test-prev']: CustomElement<TestPrev>;
|
|
49
|
+
['test-next']: CustomElement<TestNext>;
|
|
50
|
+
'test-show-index': CustomElement<TestShowIndex>;
|
|
51
|
+
'test-progress': CustomElement<TestProgress>;
|
|
52
|
+
'test-paging-buttons': CustomElement<TestPagingButtons>;
|
|
53
|
+
'test-paging-radio': CustomElement<TestPagingRadio>;
|
|
54
|
+
'test-slider': CustomElement<TestSlider>;
|
|
55
|
+
'test-show-correct': CustomElement<TestShowCorrect>;
|
|
56
|
+
'test-print-variables': CustomElement<TestPrintVariables>;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
24
60
|
interface QtiAssessmentTestProps {
|
|
25
61
|
children?: any;
|
|
26
62
|
className?: string;
|
|
27
63
|
context?: TestContext;
|
|
28
64
|
ref?: Ref<QtiAssessmentTest$1 | undefined>;
|
|
65
|
+
identifier: string;
|
|
29
66
|
onOutcomeChanged?: (e: CustomEvent<OutcomeChangedDetails>) => void;
|
|
30
67
|
onInteractionChanged?: (e: CustomEvent<InteractionChangedDetails>) => void;
|
|
31
68
|
onTestRequestItem?: (e: CustomEvent<{
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import React, { Ref } from 'react';
|
|
2
|
-
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-
|
|
3
|
-
import { T as TestContext, Q as
|
|
1
|
+
import React, { Ref, DOMAttributes } from 'react';
|
|
2
|
+
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-216b88b7.js';
|
|
3
|
+
import { T as TestContext, Q as QtiAssessmentTest$1, a as QtiAssessmentItemRef, b as TestPrev, c as TestNext, d as TestShowIndex, e as TestProgress, f as TestPagingButtons, g as TestPagingRadio, h as TestSlider, i as TestShowCorrect, j as TestPrintVariables } from '../test-print-variables-7ec6a0d5.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
import 'lit-html/directives/ref';
|
|
7
7
|
import '../qti-item/index.js';
|
|
8
8
|
import '../context/index.js';
|
|
9
|
+
import '@lit-labs/preact-signals';
|
|
9
10
|
|
|
10
11
|
interface QtiTestProps {
|
|
11
12
|
children?: any;
|
|
12
13
|
className?: string;
|
|
13
14
|
context?: TestContext;
|
|
14
|
-
ref?: Ref<
|
|
15
|
+
ref?: Ref<any | undefined>;
|
|
15
16
|
onOutcomeChanged?: (e: CustomEvent<OutcomeChangedDetails>) => void;
|
|
16
17
|
onInteractionChanged?: (e: CustomEvent<InteractionChangedDetails>) => void;
|
|
17
18
|
onTestFirstUpdated?: (e: CustomEvent<QtiAssessmentTest$1>) => void;
|
|
@@ -21,11 +22,47 @@ declare const QtiTest: React.ForwardRefExoticComponent<QtiTestProps>;
|
|
|
21
22
|
interface OutcomeChangedDetailsExtended extends OutcomeChangedDetails {
|
|
22
23
|
identifier: string;
|
|
23
24
|
}
|
|
25
|
+
type CustomElement<T> = Partial<T & DOMAttributes<T> & {
|
|
26
|
+
children: any;
|
|
27
|
+
}>;
|
|
28
|
+
declare global {
|
|
29
|
+
namespace JSX {
|
|
30
|
+
interface IntrinsicElements {
|
|
31
|
+
['qti-test-part']: CustomElement<{
|
|
32
|
+
identifier: string;
|
|
33
|
+
}>;
|
|
34
|
+
['qti-assessment-section']: CustomElement<{
|
|
35
|
+
identifier: string;
|
|
36
|
+
title: string;
|
|
37
|
+
visible: string;
|
|
38
|
+
required: string;
|
|
39
|
+
}>;
|
|
40
|
+
['qti-assessment-item-ref']: CustomElement<{
|
|
41
|
+
identifier: string;
|
|
42
|
+
href: string;
|
|
43
|
+
key: string;
|
|
44
|
+
'item-location': string;
|
|
45
|
+
category?: string;
|
|
46
|
+
ref: (el: any) => Map<string, QtiAssessmentItemRef>;
|
|
47
|
+
}>;
|
|
48
|
+
['test-prev']: CustomElement<TestPrev>;
|
|
49
|
+
['test-next']: CustomElement<TestNext>;
|
|
50
|
+
'test-show-index': CustomElement<TestShowIndex>;
|
|
51
|
+
'test-progress': CustomElement<TestProgress>;
|
|
52
|
+
'test-paging-buttons': CustomElement<TestPagingButtons>;
|
|
53
|
+
'test-paging-radio': CustomElement<TestPagingRadio>;
|
|
54
|
+
'test-slider': CustomElement<TestSlider>;
|
|
55
|
+
'test-show-correct': CustomElement<TestShowCorrect>;
|
|
56
|
+
'test-print-variables': CustomElement<TestPrintVariables>;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
24
60
|
interface QtiAssessmentTestProps {
|
|
25
61
|
children?: any;
|
|
26
62
|
className?: string;
|
|
27
63
|
context?: TestContext;
|
|
28
64
|
ref?: Ref<QtiAssessmentTest$1 | undefined>;
|
|
65
|
+
identifier: string;
|
|
29
66
|
onOutcomeChanged?: (e: CustomEvent<OutcomeChangedDetails>) => void;
|
|
30
67
|
onInteractionChanged?: (e: CustomEvent<InteractionChangedDetails>) => void;
|
|
31
68
|
onTestRequestItem?: (e: CustomEvent<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,
|
|
1
|
+
import{d as t,h as e}from"../chunk-DMECNMIP.js";import"../chunk-C4LCNAWX.js";import"../chunk-AWSFYZS5.js";import"../chunk-YWGBLO7P.js";import s from"react";import{createComponent as n}from"@lit/react";var l=n({tagName:"qti-test",react:s,elementClass:e,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onTestFirstUpdated:"qti-assessment-first-updated"}});import i from"react";import{createComponent as o}from"@lit/react";var b=o({tagName:"qti-assessment-test",react:i,elementClass:t,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onItemFirstUpdated:"qti-item-first-updated",onTestRequestItem:"on-test-set-item",onTestFirstUpdated:"qti-assessment-first-updated"}});export{b as QtiAssessmentTest,l as QtiTest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCCQXZDO6cjs = require('../chunk-CCQXZDO6.cjs');require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCCQXZDO6cjs = require('../chunk-CCQXZDO6.cjs');require('../chunk-HYQC3D4Z.cjs');exports.qtiTransform = _chunkCCQXZDO6cjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-AWSFYZS5.js";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-AWSFYZS5.js";import"../chunk-YWGBLO7P.js";export{a as qtiTransform};
|