@citolab/qti-components 10.0.0-next.1 → 10.0.0-next.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 +158 -158
- package/dist/{chunk-FWR6HZQS.js → chunk-D3BYGEQU.js} +2 -2
- package/dist/{chunk-YYIS6FDP.js → chunk-OQDBARD5.js} +2 -2
- package/dist/{chunk-CKJ7M7JQ.js → chunk-SIE3E4FG.js} +284 -180
- package/dist/chunk-SIE3E4FG.js.map +1 -0
- package/dist/corrections.d.ts +1 -1
- package/dist/corrections.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -3
- package/dist/qti-components-jsx.d.ts +99 -2
- package/dist/{qti-test.d-DkpBNcsv.d.ts → qti-test.d-86TlaMlI.d.ts} +40 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +4 -2
- package/package.json +2 -2
- package/dist/chunk-CKJ7M7JQ.js.map +0 -1
- /package/dist/{chunk-FWR6HZQS.js.map → chunk-D3BYGEQU.js.map} +0 -0
- /package/dist/{chunk-YYIS6FDP.js.map → chunk-OQDBARD5.js.map} +0 -0
|
@@ -636,18 +636,18 @@ var EvalAstFactory = class {
|
|
|
636
636
|
}
|
|
637
637
|
const value = this.right.evaluate(scope);
|
|
638
638
|
let receiver = void 0;
|
|
639
|
-
let
|
|
639
|
+
let property22;
|
|
640
640
|
if (this.left.type === "Getter") {
|
|
641
641
|
receiver = this.left.receiver.evaluate(scope);
|
|
642
|
-
|
|
642
|
+
property22 = this.left.name;
|
|
643
643
|
} else if (this.left.type === "Index") {
|
|
644
644
|
receiver = this.left.receiver.evaluate(scope);
|
|
645
|
-
|
|
645
|
+
property22 = this.left.argument.evaluate(scope);
|
|
646
646
|
} else if (this.left.type === "ID") {
|
|
647
647
|
receiver = scope;
|
|
648
|
-
|
|
648
|
+
property22 = this.left.value;
|
|
649
649
|
}
|
|
650
|
-
return receiver === void 0 ? void 0 : receiver[
|
|
650
|
+
return receiver === void 0 ? void 0 : receiver[property22] = value;
|
|
651
651
|
}
|
|
652
652
|
return f(this.left.evaluate(scope), this.right.evaluate(scope));
|
|
653
653
|
},
|
|
@@ -1495,6 +1495,9 @@ __decorate5([
|
|
|
1495
1495
|
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "validate-responses" })
|
|
1496
1496
|
], QtiItemSessionControl.prototype, "validateResponses", void 0);
|
|
1497
1497
|
|
|
1498
|
+
// ../qti-test/dist/components/qti-number-presented/qti-number-presented.js
|
|
1499
|
+
import { consume as consume4 } from "@lit/context";
|
|
1500
|
+
|
|
1498
1501
|
// ../qti-test/dist/internal/item-ref-selection.js
|
|
1499
1502
|
var categoryList = (value) => value?.split(/\s+/).filter(Boolean) ?? [];
|
|
1500
1503
|
var selectionFrom = (element) => ({
|
|
@@ -1520,6 +1523,43 @@ var selectItemRefs = (testElement, { sectionIdentifier, includeCategories, exclu
|
|
|
1520
1523
|
});
|
|
1521
1524
|
};
|
|
1522
1525
|
|
|
1526
|
+
// ../qti-test/dist/components/qti-number-presented/qti-number-presented.js
|
|
1527
|
+
var __decorate6 = function(decorators, target, key, desc) {
|
|
1528
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1529
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1530
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1531
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1532
|
+
};
|
|
1533
|
+
var QtiNumberPresented = class extends QtiExpression {
|
|
1534
|
+
#connectedTest = null;
|
|
1535
|
+
constructor() {
|
|
1536
|
+
super();
|
|
1537
|
+
listenPublic2(this, "cito-test-loaded", (e) => this.#connectedTest = e.detail);
|
|
1538
|
+
}
|
|
1539
|
+
/** The test this expression is in: handed over by a test harness, or found up the tree in a real document. */
|
|
1540
|
+
get #testElement() {
|
|
1541
|
+
return this.#connectedTest ?? this.closest("qti-assessment-test");
|
|
1542
|
+
}
|
|
1543
|
+
getResult() {
|
|
1544
|
+
const testElement = this.#testElement;
|
|
1545
|
+
if (!testElement) {
|
|
1546
|
+
console.warn("qti-number-presented: no enclosing qti-assessment-test, nothing to count");
|
|
1547
|
+
return 0;
|
|
1548
|
+
}
|
|
1549
|
+
const presented = new Set((this._testContext?.items ?? []).filter((item) => {
|
|
1550
|
+
const status = item.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
1551
|
+
return status != null && status !== "not_attempted";
|
|
1552
|
+
}).map((item) => item.identifier));
|
|
1553
|
+
return selectItemRefs(testElement, selectionFrom(this)).filter((itemRef) => presented.has(itemRef.identifier)).length;
|
|
1554
|
+
}
|
|
1555
|
+
calculate() {
|
|
1556
|
+
return this.getResult();
|
|
1557
|
+
}
|
|
1558
|
+
};
|
|
1559
|
+
__decorate6([
|
|
1560
|
+
consume4({ context: testContext, subscribe: true })
|
|
1561
|
+
], QtiNumberPresented.prototype, "_testContext", void 0);
|
|
1562
|
+
|
|
1523
1563
|
// ../qti-test/dist/components/qti-number-selected/qti-number-selected.js
|
|
1524
1564
|
var QtiNumberSelected = class extends QtiExpression {
|
|
1525
1565
|
#connectedTest = null;
|
|
@@ -1604,7 +1644,18 @@ var QtiOutcomeProcessingProcessor = class {
|
|
|
1604
1644
|
|
|
1605
1645
|
// ../qti-test/dist/components/qti-test-feedback/qti-test-feedback.js
|
|
1606
1646
|
import { css as css4, html as html7 } from "lit";
|
|
1647
|
+
import { property as property6 } from "lit/decorators.js";
|
|
1648
|
+
var __decorate7 = function(decorators, target, key, desc) {
|
|
1649
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1650
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1651
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1652
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1653
|
+
};
|
|
1607
1654
|
var QtiTestFeedback = class extends QtiModalFeedback {
|
|
1655
|
+
constructor() {
|
|
1656
|
+
super(...arguments);
|
|
1657
|
+
this.access = "atEnd";
|
|
1658
|
+
}
|
|
1608
1659
|
static {
|
|
1609
1660
|
this.styles = css4`
|
|
1610
1661
|
:host {
|
|
@@ -1612,15 +1663,26 @@ var QtiTestFeedback = class extends QtiModalFeedback {
|
|
|
1612
1663
|
}
|
|
1613
1664
|
`;
|
|
1614
1665
|
}
|
|
1666
|
+
/**
|
|
1667
|
+
* Whether this feedback applies for a value of its `outcome-identifier`: with `show-hide="show"`
|
|
1668
|
+
* when the value is (or, for a container, holds) its `identifier`; with `hide` when it is not.
|
|
1669
|
+
*/
|
|
1670
|
+
matches(value) {
|
|
1671
|
+
const found = Array.isArray(value) ? value.includes(this.identifier) : value != null && value === this.identifier;
|
|
1672
|
+
return this.showHide === "hide" ? !found : found;
|
|
1673
|
+
}
|
|
1615
1674
|
render() {
|
|
1616
1675
|
return html7``;
|
|
1617
1676
|
}
|
|
1618
1677
|
};
|
|
1678
|
+
__decorate7([
|
|
1679
|
+
property6({ type: String })
|
|
1680
|
+
], QtiTestFeedback.prototype, "access", void 0);
|
|
1619
1681
|
|
|
1620
1682
|
// ../qti-test/dist/components/qti-test-part/qti-test-part.js
|
|
1621
1683
|
import { html as html8, LitElement as LitElement8 } from "lit";
|
|
1622
|
-
import { property as
|
|
1623
|
-
var
|
|
1684
|
+
import { property as property7 } from "lit/decorators.js";
|
|
1685
|
+
var __decorate8 = function(decorators, target, key, desc) {
|
|
1624
1686
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1625
1687
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1626
1688
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1656,22 +1718,22 @@ var QtiTestPart = class extends LitElement8 {
|
|
|
1656
1718
|
return html8` <slot></slot>`;
|
|
1657
1719
|
}
|
|
1658
1720
|
};
|
|
1659
|
-
|
|
1660
|
-
|
|
1721
|
+
__decorate8([
|
|
1722
|
+
property7({ type: String })
|
|
1661
1723
|
], QtiTestPart.prototype, "identifier", void 0);
|
|
1662
|
-
|
|
1663
|
-
|
|
1724
|
+
__decorate8([
|
|
1725
|
+
property7({ type: String })
|
|
1664
1726
|
], QtiTestPart.prototype, "class", void 0);
|
|
1665
|
-
|
|
1666
|
-
|
|
1727
|
+
__decorate8([
|
|
1728
|
+
property7({ type: String, attribute: "navigation-mode" })
|
|
1667
1729
|
], QtiTestPart.prototype, "navigationMode", void 0);
|
|
1668
|
-
|
|
1669
|
-
|
|
1730
|
+
__decorate8([
|
|
1731
|
+
property7({ type: String, attribute: "submission-mode" })
|
|
1670
1732
|
], QtiTestPart.prototype, "submissionMode", void 0);
|
|
1671
1733
|
|
|
1672
1734
|
// ../qti-test/dist/components/qti-test-variables/qti-test-variables.js
|
|
1673
|
-
import { consume as
|
|
1674
|
-
var
|
|
1735
|
+
import { consume as consume5 } from "@lit/context";
|
|
1736
|
+
var __decorate9 = function(decorators, target, key, desc) {
|
|
1675
1737
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1676
1738
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1677
1739
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1712,8 +1774,8 @@ var QtiTestVariables = class extends QtiExpression {
|
|
|
1712
1774
|
return this.getResult();
|
|
1713
1775
|
}
|
|
1714
1776
|
};
|
|
1715
|
-
|
|
1716
|
-
|
|
1777
|
+
__decorate9([
|
|
1778
|
+
consume5({ context: testContext, subscribe: true })
|
|
1717
1779
|
], QtiTestVariables.prototype, "_testContext", void 0);
|
|
1718
1780
|
var QtiTestVariablesExpression = class {
|
|
1719
1781
|
constructor(testContext2, itemVariable, includedItems) {
|
|
@@ -1750,7 +1812,7 @@ import { html as html9, LitElement as LitElement10 } from "lit";
|
|
|
1750
1812
|
import { state as state2 } from "lit/decorators.js";
|
|
1751
1813
|
|
|
1752
1814
|
// ../qti-test/dist/mixins/test-navigation.mixin.js
|
|
1753
|
-
import { property as
|
|
1815
|
+
import { property as property8 } from "lit/decorators.js";
|
|
1754
1816
|
|
|
1755
1817
|
// ../qti-test/dist/internal/item-sequencing.js
|
|
1756
1818
|
var SECTION = "qti-assessment-section";
|
|
@@ -1843,7 +1905,7 @@ function preConditionsPass(itemRef, from) {
|
|
|
1843
1905
|
}
|
|
1844
1906
|
|
|
1845
1907
|
// ../qti-test/dist/mixins/test-navigation.mixin.js
|
|
1846
|
-
var
|
|
1908
|
+
var __decorate10 = function(decorators, target, key, desc) {
|
|
1847
1909
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1848
1910
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1849
1911
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2351,17 +2413,17 @@ var TestNavigationMixin = (superClass) => {
|
|
|
2351
2413
|
});
|
|
2352
2414
|
}
|
|
2353
2415
|
}
|
|
2354
|
-
|
|
2355
|
-
|
|
2416
|
+
__decorate10([
|
|
2417
|
+
property8({ type: String })
|
|
2356
2418
|
], TestNavigationClass.prototype, "navigate", void 0);
|
|
2357
|
-
|
|
2358
|
-
|
|
2419
|
+
__decorate10([
|
|
2420
|
+
property8({ type: Number })
|
|
2359
2421
|
], TestNavigationClass.prototype, "requestTimeout", void 0);
|
|
2360
|
-
|
|
2361
|
-
|
|
2422
|
+
__decorate10([
|
|
2423
|
+
property8({ attribute: false })
|
|
2362
2424
|
], TestNavigationClass.prototype, "postLoadTransformCallback", void 0);
|
|
2363
|
-
|
|
2364
|
-
|
|
2425
|
+
__decorate10([
|
|
2426
|
+
property8({ attribute: false })
|
|
2365
2427
|
], TestNavigationClass.prototype, "postLoadTestTransformCallback", void 0);
|
|
2366
2428
|
return TestNavigationClass;
|
|
2367
2429
|
};
|
|
@@ -2417,8 +2479,8 @@ var TestViewMixin = (superClass) => {
|
|
|
2417
2479
|
// ../qti-test/dist/mixins/test-base.js
|
|
2418
2480
|
import { provide } from "@lit/context";
|
|
2419
2481
|
import { LitElement as LitElement9 } from "lit";
|
|
2420
|
-
import { property as
|
|
2421
|
-
var
|
|
2482
|
+
import { property as property9 } from "lit/decorators.js";
|
|
2483
|
+
var __decorate11 = function(decorators, target, key, desc) {
|
|
2422
2484
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2423
2485
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2424
2486
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2444,6 +2506,8 @@ var TestBaseMixin = (superClass) => {
|
|
|
2444
2506
|
} else {
|
|
2445
2507
|
const newVariables = [...assessmentItem.variables];
|
|
2446
2508
|
for (const variable of itemContext.variables) {
|
|
2509
|
+
if (variable.identifier === "completionStatus" && variable.value === "not_attempted")
|
|
2510
|
+
continue;
|
|
2447
2511
|
const currentVariable = newVariables.find((v) => v.identifier === variable.identifier);
|
|
2448
2512
|
if (currentVariable) {
|
|
2449
2513
|
currentVariable.value = variable.value;
|
|
@@ -2452,6 +2516,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
2452
2516
|
}
|
|
2453
2517
|
}
|
|
2454
2518
|
assessmentItem.variables = newVariables;
|
|
2519
|
+
this.#leaveNotAttempted(identifier, newVariables.find((v) => v.identifier === "completionStatus")?.value);
|
|
2455
2520
|
if (itemContext.state) {
|
|
2456
2521
|
assessmentItem.state = itemContext.state;
|
|
2457
2522
|
}
|
|
@@ -2558,13 +2623,29 @@ var TestBaseMixin = (superClass) => {
|
|
|
2558
2623
|
};
|
|
2559
2624
|
this.dispatchEvent(new CustomEvent("qti-test-context-updated", { detail: this.testContext, bubbles: false, composed: false }));
|
|
2560
2625
|
}
|
|
2626
|
+
/** Write the presented item's own status over a `not_attempted` the test context still holds for it. */
|
|
2627
|
+
#leaveNotAttempted(identifier, status) {
|
|
2628
|
+
if (typeof status !== "string" || status === "not_attempted")
|
|
2629
|
+
return;
|
|
2630
|
+
const item = this.testContext.items.find((i) => i.identifier === identifier);
|
|
2631
|
+
const current = item?.variables.find((v) => v.identifier === "completionStatus");
|
|
2632
|
+
if (current?.value !== "not_attempted")
|
|
2633
|
+
return;
|
|
2634
|
+
this.testContext = {
|
|
2635
|
+
...this.testContext,
|
|
2636
|
+
items: this.testContext.items.map((i) => i.identifier !== identifier ? i : {
|
|
2637
|
+
...i,
|
|
2638
|
+
variables: i.variables.map((v) => v.identifier === "completionStatus" ? { ...v, value: status } : v)
|
|
2639
|
+
})
|
|
2640
|
+
};
|
|
2641
|
+
}
|
|
2561
2642
|
}
|
|
2562
|
-
|
|
2563
|
-
|
|
2643
|
+
__decorate11([
|
|
2644
|
+
property9({ attribute: false, type: Object }),
|
|
2564
2645
|
provide({ context: testContext })
|
|
2565
2646
|
], TestBaseClass.prototype, "testContext", void 0);
|
|
2566
|
-
|
|
2567
|
-
|
|
2647
|
+
__decorate11([
|
|
2648
|
+
property9({ attribute: false, type: Object }),
|
|
2568
2649
|
provide({ context: sessionContext })
|
|
2569
2650
|
], TestBaseClass.prototype, "sessionContext", void 0);
|
|
2570
2651
|
return TestBaseClass;
|
|
@@ -2706,6 +2787,15 @@ var TestProcessingMixin = (superClass) => {
|
|
|
2706
2787
|
outcomeProcessor?.process();
|
|
2707
2788
|
return true;
|
|
2708
2789
|
}
|
|
2790
|
+
/**
|
|
2791
|
+
* The `qti-test-feedback` elements that apply now, read from the test outcomes: run
|
|
2792
|
+
* `outcomeProcessing()` first. `access` narrows them to the end of the test (`atEnd`) or to
|
|
2793
|
+
* while it runs (`during`); without it, both.
|
|
2794
|
+
*/
|
|
2795
|
+
getTestFeedback(access) {
|
|
2796
|
+
const feedback = Array.from((this._testElement ?? this).querySelectorAll("qti-test-feedback") ?? []);
|
|
2797
|
+
return feedback.filter((fb) => (!access || fb.access === access) && fb.matches(this.getOutcome(fb.outcomeIdentifier)?.value));
|
|
2798
|
+
}
|
|
2709
2799
|
/* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
|
|
2710
2800
|
updateOutcomeVariable(identifier, value) {
|
|
2711
2801
|
const outcomeVariable = this.getOutcome(identifier);
|
|
@@ -2737,7 +2827,7 @@ var TestProcessingMixin = (superClass) => {
|
|
|
2737
2827
|
};
|
|
2738
2828
|
|
|
2739
2829
|
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
2740
|
-
var
|
|
2830
|
+
var __decorate12 = function(decorators, target, key, desc) {
|
|
2741
2831
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2742
2832
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2743
2833
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2771,17 +2861,17 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
|
|
|
2771
2861
|
return html9`<slot></slot>`;
|
|
2772
2862
|
}
|
|
2773
2863
|
};
|
|
2774
|
-
|
|
2864
|
+
__decorate12([
|
|
2775
2865
|
state2(),
|
|
2776
2866
|
provide2({ context: configContext })
|
|
2777
2867
|
], QtiTest.prototype, "configContext", void 0);
|
|
2778
|
-
|
|
2868
|
+
__decorate12([
|
|
2779
2869
|
state2(),
|
|
2780
2870
|
provide2({ context: qtiContext })
|
|
2781
2871
|
], QtiTest.prototype, "qtiContext", void 0);
|
|
2782
2872
|
|
|
2783
2873
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
2784
|
-
import { consume as
|
|
2874
|
+
import { consume as consume6 } from "@lit/context";
|
|
2785
2875
|
import { css as css6, html as html10, LitElement as LitElement11 } from "lit";
|
|
2786
2876
|
|
|
2787
2877
|
// ../qti-test/dist/components/styles.js
|
|
@@ -2824,7 +2914,7 @@ var ind = css5`
|
|
|
2824
2914
|
`;
|
|
2825
2915
|
|
|
2826
2916
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
2827
|
-
var
|
|
2917
|
+
var __decorate13 = function(decorators, target, key, desc) {
|
|
2828
2918
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2829
2919
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2830
2920
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2864,16 +2954,16 @@ var TestCheckItem = class extends LitElement11 {
|
|
|
2864
2954
|
return html10` <slot></slot> `;
|
|
2865
2955
|
}
|
|
2866
2956
|
};
|
|
2867
|
-
|
|
2868
|
-
|
|
2957
|
+
__decorate13([
|
|
2958
|
+
consume6({ context: testHostContext, subscribe: true })
|
|
2869
2959
|
], TestCheckItem.prototype, "testHost", void 0);
|
|
2870
2960
|
|
|
2871
2961
|
// ../qti-test/dist/components/test-container/test-container.js
|
|
2872
|
-
import { consume as
|
|
2962
|
+
import { consume as consume7 } from "@lit/context";
|
|
2873
2963
|
import { LitElement as LitElement12, html as html11 } from "lit";
|
|
2874
|
-
import { property as
|
|
2964
|
+
import { property as property10, state as state3 } from "lit/decorators.js";
|
|
2875
2965
|
import { until } from "lit/directives/until.js";
|
|
2876
|
-
var
|
|
2966
|
+
var __decorate14 = function(decorators, target, key, desc) {
|
|
2877
2967
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2878
2968
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2879
2969
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2979,37 +3069,37 @@ var TestContainer = class extends LitElement12 {
|
|
|
2979
3069
|
`;
|
|
2980
3070
|
}
|
|
2981
3071
|
};
|
|
2982
|
-
|
|
2983
|
-
|
|
3072
|
+
__decorate14([
|
|
3073
|
+
property10({ attribute: false })
|
|
2984
3074
|
], TestContainer.prototype, "customElementRegistry", void 0);
|
|
2985
|
-
|
|
2986
|
-
|
|
3075
|
+
__decorate14([
|
|
3076
|
+
property10({ type: String, attribute: "test-url" })
|
|
2987
3077
|
], TestContainer.prototype, "testURL", void 0);
|
|
2988
|
-
|
|
3078
|
+
__decorate14([
|
|
2989
3079
|
state3()
|
|
2990
3080
|
], TestContainer.prototype, "testDoc", void 0);
|
|
2991
|
-
|
|
3081
|
+
__decorate14([
|
|
2992
3082
|
state3()
|
|
2993
3083
|
], TestContainer.prototype, "testXML", void 0);
|
|
2994
|
-
|
|
2995
|
-
|
|
3084
|
+
__decorate14([
|
|
3085
|
+
consume7({ context: testHostContext, subscribe: true })
|
|
2996
3086
|
], TestContainer.prototype, "testHost", void 0);
|
|
2997
|
-
|
|
3087
|
+
__decorate14([
|
|
2998
3088
|
state3(),
|
|
2999
|
-
|
|
3089
|
+
consume7({ context: qtiContext, subscribe: true })
|
|
3000
3090
|
], TestContainer.prototype, "qtiContext", void 0);
|
|
3001
|
-
|
|
3091
|
+
__decorate14([
|
|
3002
3092
|
watch("testURL", { waitUntilFirstUpdate: true })
|
|
3003
3093
|
], TestContainer.prototype, "handleTestURLChange", null);
|
|
3004
|
-
|
|
3094
|
+
__decorate14([
|
|
3005
3095
|
watch("testXML", { waitUntilFirstUpdate: true })
|
|
3006
3096
|
], TestContainer.prototype, "handleTestXMLChange", null);
|
|
3007
3097
|
|
|
3008
3098
|
// ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
|
|
3009
3099
|
import { css as css7, html as html12, LitElement as LitElement13 } from "lit";
|
|
3010
|
-
import { property as
|
|
3011
|
-
import { consume as
|
|
3012
|
-
var
|
|
3100
|
+
import { property as property11 } from "lit/decorators.js";
|
|
3101
|
+
import { consume as consume8 } from "@lit/context";
|
|
3102
|
+
var __decorate15 = function(decorators, target, key, desc) {
|
|
3013
3103
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3014
3104
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3015
3105
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3067,6 +3157,10 @@ var TestEndAttempt = class extends LitElement13 {
|
|
|
3067
3157
|
this._internalDisabled = true;
|
|
3068
3158
|
return;
|
|
3069
3159
|
}
|
|
3160
|
+
if (activeItem.adaptive && activeItem.completionStatus === "completed") {
|
|
3161
|
+
this._internalDisabled = true;
|
|
3162
|
+
return;
|
|
3163
|
+
}
|
|
3070
3164
|
if (!activeItem.adaptive && maxAttempts > 0 && numAttempts >= maxAttempts) {
|
|
3071
3165
|
this._internalDisabled = true;
|
|
3072
3166
|
return;
|
|
@@ -3081,21 +3175,21 @@ var TestEndAttempt = class extends LitElement13 {
|
|
|
3081
3175
|
return html12` <slot></slot> `;
|
|
3082
3176
|
}
|
|
3083
3177
|
};
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3178
|
+
__decorate15([
|
|
3179
|
+
consume8({ context: computedContext, subscribe: true }),
|
|
3180
|
+
property11({ attribute: false })
|
|
3087
3181
|
], TestEndAttempt.prototype, "computedContext", void 0);
|
|
3088
|
-
|
|
3089
|
-
|
|
3182
|
+
__decorate15([
|
|
3183
|
+
property11({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
3090
3184
|
], TestEndAttempt.prototype, "_internalDisabled", void 0);
|
|
3091
|
-
|
|
3185
|
+
__decorate15([
|
|
3092
3186
|
watch("computedContext")
|
|
3093
3187
|
], TestEndAttempt.prototype, "_handleTestElementChange", null);
|
|
3094
3188
|
|
|
3095
3189
|
// ../qti-test/dist/components/test-item-link/test-item-link.js
|
|
3096
3190
|
import { css as css8, html as html13, LitElement as LitElement14 } from "lit";
|
|
3097
|
-
import { property as
|
|
3098
|
-
var
|
|
3191
|
+
import { property as property12 } from "lit/decorators.js";
|
|
3192
|
+
var __decorate16 = function(decorators, target, key, desc) {
|
|
3099
3193
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3100
3194
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3101
3195
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3130,16 +3224,16 @@ var TestItemLink = class extends LitElement14 {
|
|
|
3130
3224
|
return html13` <slot></slot> `;
|
|
3131
3225
|
}
|
|
3132
3226
|
};
|
|
3133
|
-
|
|
3134
|
-
|
|
3227
|
+
__decorate16([
|
|
3228
|
+
property12({ type: String, attribute: "item-id" })
|
|
3135
3229
|
], TestItemLink.prototype, "itemId", void 0);
|
|
3136
3230
|
|
|
3137
3231
|
// ../qti-test/dist/components/test-item-to-speech/test-item-to-speech.js
|
|
3138
3232
|
import { html as html14, LitElement as LitElement15, css as css9 } from "lit";
|
|
3139
|
-
import { consume as
|
|
3140
|
-
import { property as
|
|
3233
|
+
import { consume as consume9, provide as provide3, createContext as createContext2 } from "@lit/context";
|
|
3234
|
+
import { property as property13, state as state4 } from "lit/decorators.js";
|
|
3141
3235
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3142
|
-
var
|
|
3236
|
+
var __decorate17 = function(decorators, target, key, desc) {
|
|
3143
3237
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3144
3238
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3145
3239
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3239,11 +3333,11 @@ var TtsButtonBase = class extends LitElement15 {
|
|
|
3239
3333
|
this.#internals.states.add("picking");
|
|
3240
3334
|
}
|
|
3241
3335
|
};
|
|
3242
|
-
|
|
3243
|
-
|
|
3336
|
+
__decorate17([
|
|
3337
|
+
property13({ type: String })
|
|
3244
3338
|
], TtsButtonBase.prototype, "label", void 0);
|
|
3245
|
-
|
|
3246
|
-
|
|
3339
|
+
__decorate17([
|
|
3340
|
+
consume9({ context: ttsContext, subscribe: true })
|
|
3247
3341
|
], TtsButtonBase.prototype, "_tts", void 0);
|
|
3248
3342
|
var TestItemToSpeech = class extends LitElement15 {
|
|
3249
3343
|
static {
|
|
@@ -3837,16 +3931,16 @@ var TestItemToSpeech = class extends LitElement15 {
|
|
|
3837
3931
|
}
|
|
3838
3932
|
}
|
|
3839
3933
|
};
|
|
3840
|
-
|
|
3841
|
-
|
|
3934
|
+
__decorate17([
|
|
3935
|
+
property13({ type: String })
|
|
3842
3936
|
], TestItemToSpeech.prototype, "language", void 0);
|
|
3843
|
-
|
|
3844
|
-
|
|
3937
|
+
__decorate17([
|
|
3938
|
+
consume9({ context: sessionContext, subscribe: true })
|
|
3845
3939
|
], TestItemToSpeech.prototype, "_sessionContext", void 0);
|
|
3846
|
-
|
|
3847
|
-
|
|
3940
|
+
__decorate17([
|
|
3941
|
+
consume9({ context: testHostContext, subscribe: true })
|
|
3848
3942
|
], TestItemToSpeech.prototype, "testHost", void 0);
|
|
3849
|
-
|
|
3943
|
+
__decorate17([
|
|
3850
3944
|
state4(),
|
|
3851
3945
|
provide3({ context: ttsContext })
|
|
3852
3946
|
], TestItemToSpeech.prototype, "_ttsContext", void 0);
|
|
@@ -3870,8 +3964,8 @@ var TestTtsPlay = class extends TtsButtonBase {
|
|
|
3870
3964
|
`;
|
|
3871
3965
|
}
|
|
3872
3966
|
};
|
|
3873
|
-
|
|
3874
|
-
|
|
3967
|
+
__decorate17([
|
|
3968
|
+
property13({ type: String, attribute: "pause-label" })
|
|
3875
3969
|
], TestTtsPlay.prototype, "pauseLabel", void 0);
|
|
3876
3970
|
var TestTtsPause = class extends TtsButtonBase {
|
|
3877
3971
|
render() {
|
|
@@ -3959,10 +4053,10 @@ var TestTtsPick = class extends TtsButtonBase {
|
|
|
3959
4053
|
};
|
|
3960
4054
|
|
|
3961
4055
|
// ../qti-test/dist/components/test-navigation/test-navigation.js
|
|
3962
|
-
import { ContextConsumer, consume as
|
|
4056
|
+
import { ContextConsumer, consume as consume10, provide as provide4 } from "@lit/context";
|
|
3963
4057
|
import { html as html15, LitElement as LitElement16 } from "lit";
|
|
3964
|
-
import { property as
|
|
3965
|
-
var
|
|
4058
|
+
import { property as property14, state as state5 } from "lit/decorators.js";
|
|
4059
|
+
var __decorate18 = function(decorators, target, key, desc) {
|
|
3966
4060
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3967
4061
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3968
4062
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4058,7 +4152,8 @@ var TestNavigation = class extends LitElement16 {
|
|
|
4058
4152
|
this.#optimality.set(itemContext.identifier, optimality);
|
|
4059
4153
|
const computedItem = this.computedItemFor(itemContext.identifier);
|
|
4060
4154
|
const numAttempts = Number(itemContext.variables?.find((v) => v.identifier === "numAttempts")?.value) || 0;
|
|
4061
|
-
|
|
4155
|
+
const completionStatus = itemContext.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
4156
|
+
this.afterAttemptEnded(event.composedPath()[0]?.closest("qti-assessment-item"), computedItem, this.#isItemDone(numAttempts, optimality, computedItem?.maxAttempts, computedItem?.adaptive, completionStatus));
|
|
4062
4157
|
}
|
|
4063
4158
|
/**
|
|
4064
4159
|
* Extension point for presentation packages reacting to an ended attempt.
|
|
@@ -4361,7 +4456,7 @@ var TestNavigation = class extends LitElement16 {
|
|
|
4361
4456
|
if (numAttempts > 0)
|
|
4362
4457
|
this.#optimality.set(computedItem.identifier, optimality);
|
|
4363
4458
|
}
|
|
4364
|
-
const done = this.#isItemDone(numAttempts, optimality, computedItem.maxAttempts);
|
|
4459
|
+
const done = this.#isItemDone(numAttempts, optimality, computedItem.maxAttempts, computedItem.adaptive, completionStatus);
|
|
4365
4460
|
return {
|
|
4366
4461
|
...computedItem,
|
|
4367
4462
|
completionStatus,
|
|
@@ -4409,10 +4504,17 @@ var TestNavigation = class extends LitElement16 {
|
|
|
4409
4504
|
* `optimality` reflects the last *ended attempt* (see #optimality), not the
|
|
4410
4505
|
* live selection — so a freshly-picked optimal answer doesn't count as done
|
|
4411
4506
|
* until test-end-attempt evaluates it.
|
|
4507
|
+
*
|
|
4508
|
+
* Adaptive items decide this themselves: max-attempts does not apply to them
|
|
4509
|
+
* (QTI 3, itemSessionControl), and a wrong attempt may be the step that leads
|
|
4510
|
+
* on to the next part of the item. They are done once their response
|
|
4511
|
+
* processing sets completionStatus to 'completed'.
|
|
4412
4512
|
*/
|
|
4413
|
-
#isItemDone(numAttempts, optimality, maxAttempts) {
|
|
4513
|
+
#isItemDone(numAttempts, optimality, maxAttempts, adaptive, completionStatus) {
|
|
4414
4514
|
if (numAttempts === 0)
|
|
4415
4515
|
return false;
|
|
4516
|
+
if (adaptive)
|
|
4517
|
+
return completionStatus === "completed";
|
|
4416
4518
|
if (optimality !== "suboptimal")
|
|
4417
4519
|
return true;
|
|
4418
4520
|
const max = maxAttempts ?? 1;
|
|
@@ -4472,37 +4574,37 @@ var TestNavigation = class extends LitElement16 {
|
|
|
4472
4574
|
return Number.isNaN(parsed) ? null : parsed;
|
|
4473
4575
|
}
|
|
4474
4576
|
};
|
|
4475
|
-
|
|
4476
|
-
|
|
4577
|
+
__decorate18([
|
|
4578
|
+
property14({ type: String })
|
|
4477
4579
|
], TestNavigation.prototype, "identifier", void 0);
|
|
4478
|
-
|
|
4580
|
+
__decorate18([
|
|
4479
4581
|
state5()
|
|
4480
4582
|
], TestNavigation.prototype, "initContext", void 0);
|
|
4481
|
-
|
|
4583
|
+
__decorate18([
|
|
4482
4584
|
state5(),
|
|
4483
|
-
|
|
4585
|
+
consume10({ context: configContext, subscribe: true })
|
|
4484
4586
|
], TestNavigation.prototype, "configContext", void 0);
|
|
4485
|
-
|
|
4587
|
+
__decorate18([
|
|
4486
4588
|
state5(),
|
|
4487
|
-
|
|
4589
|
+
consume10({ context: testContext, subscribe: true })
|
|
4488
4590
|
], TestNavigation.prototype, "_testContext", void 0);
|
|
4489
|
-
|
|
4591
|
+
__decorate18([
|
|
4490
4592
|
state5(),
|
|
4491
|
-
|
|
4593
|
+
consume10({ context: sessionContext, subscribe: true })
|
|
4492
4594
|
], TestNavigation.prototype, "_sessionContext", void 0);
|
|
4493
|
-
|
|
4595
|
+
__decorate18([
|
|
4494
4596
|
state5(),
|
|
4495
4597
|
provide4({ context: computedContext })
|
|
4496
4598
|
], TestNavigation.prototype, "computedContext", void 0);
|
|
4497
|
-
|
|
4498
|
-
|
|
4599
|
+
__decorate18([
|
|
4600
|
+
property14({ type: Boolean, attribute: "auto-score-items" })
|
|
4499
4601
|
], TestNavigation.prototype, "autoScoreItems", void 0);
|
|
4500
4602
|
|
|
4501
4603
|
// ../qti-test/dist/components/test-next/test-next.js
|
|
4502
4604
|
import { css as css10, html as html16, LitElement as LitElement17 } from "lit";
|
|
4503
|
-
import { property as
|
|
4504
|
-
import { consume as
|
|
4505
|
-
var
|
|
4605
|
+
import { property as property15 } from "lit/decorators.js";
|
|
4606
|
+
import { consume as consume11 } from "@lit/context";
|
|
4607
|
+
var __decorate19 = function(decorators, target, key, desc) {
|
|
4506
4608
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4507
4609
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4508
4610
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4575,20 +4677,20 @@ var TestNext = class extends LitElement17 {
|
|
|
4575
4677
|
return html16`<slot></slot>`;
|
|
4576
4678
|
}
|
|
4577
4679
|
};
|
|
4578
|
-
|
|
4579
|
-
|
|
4680
|
+
__decorate19([
|
|
4681
|
+
property15({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
4580
4682
|
], TestNext.prototype, "_internalDisabled", void 0);
|
|
4581
|
-
|
|
4582
|
-
|
|
4683
|
+
__decorate19([
|
|
4684
|
+
consume11({ context: computedContext, subscribe: true })
|
|
4583
4685
|
], TestNext.prototype, "computedContext", void 0);
|
|
4584
|
-
|
|
4686
|
+
__decorate19([
|
|
4585
4687
|
watch("computedContext")
|
|
4586
4688
|
], TestNext.prototype, "_handleTestElementChange", null);
|
|
4587
4689
|
|
|
4588
4690
|
// ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
|
|
4589
4691
|
import { html as html17, LitElement as LitElement18 } from "lit";
|
|
4590
|
-
import { consume as
|
|
4591
|
-
var
|
|
4692
|
+
import { consume as consume12 } from "@lit/context";
|
|
4693
|
+
var __decorate20 = function(decorators, target, key, desc) {
|
|
4592
4694
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4593
4695
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4594
4696
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4616,15 +4718,15 @@ var TestPagingButtonsStamp = class extends LitElement18 {
|
|
|
4616
4718
|
return html17` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
|
|
4617
4719
|
}
|
|
4618
4720
|
};
|
|
4619
|
-
|
|
4620
|
-
|
|
4721
|
+
__decorate20([
|
|
4722
|
+
consume12({ context: computedContext, subscribe: true })
|
|
4621
4723
|
], TestPagingButtonsStamp.prototype, "computedContext", void 0);
|
|
4622
4724
|
|
|
4623
4725
|
// ../qti-test/dist/components/test-prev/test-prev.js
|
|
4624
4726
|
import { css as css11, html as html18, LitElement as LitElement19 } from "lit";
|
|
4625
|
-
import { property as
|
|
4626
|
-
import { consume as
|
|
4627
|
-
var
|
|
4727
|
+
import { property as property16 } from "lit/decorators.js";
|
|
4728
|
+
import { consume as consume13 } from "@lit/context";
|
|
4729
|
+
var __decorate21 = function(decorators, target, key, desc) {
|
|
4628
4730
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4629
4731
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4630
4732
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4684,21 +4786,21 @@ var TestPrev = class extends LitElement19 {
|
|
|
4684
4786
|
return html18`<slot></slot>`;
|
|
4685
4787
|
}
|
|
4686
4788
|
};
|
|
4687
|
-
|
|
4688
|
-
|
|
4789
|
+
__decorate21([
|
|
4790
|
+
property16({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
4689
4791
|
], TestPrev.prototype, "_internalDisabled", void 0);
|
|
4690
|
-
|
|
4691
|
-
|
|
4792
|
+
__decorate21([
|
|
4793
|
+
consume13({ context: computedContext, subscribe: true })
|
|
4692
4794
|
], TestPrev.prototype, "computedContext", void 0);
|
|
4693
|
-
|
|
4795
|
+
__decorate21([
|
|
4694
4796
|
watch("computedContext")
|
|
4695
4797
|
], TestPrev.prototype, "_handleTestElementChange", null);
|
|
4696
4798
|
|
|
4697
4799
|
// ../qti-test/dist/components/test-print-context/test-print-context.js
|
|
4698
4800
|
import { html as html19, LitElement as LitElement20 } from "lit";
|
|
4699
|
-
import { consume as
|
|
4801
|
+
import { consume as consume14 } from "@lit/context";
|
|
4700
4802
|
import { state as state6 } from "lit/decorators.js";
|
|
4701
|
-
var
|
|
4803
|
+
var __decorate22 = function(decorators, target, key, desc) {
|
|
4702
4804
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4703
4805
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4704
4806
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4709,15 +4811,15 @@ var TestPrintContext = class extends LitElement20 {
|
|
|
4709
4811
|
return html19` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
|
|
4710
4812
|
}
|
|
4711
4813
|
};
|
|
4712
|
-
|
|
4814
|
+
__decorate22([
|
|
4713
4815
|
state6(),
|
|
4714
|
-
|
|
4816
|
+
consume14({ context: computedContext, subscribe: true })
|
|
4715
4817
|
], TestPrintContext.prototype, "computedContext", void 0);
|
|
4716
4818
|
|
|
4717
4819
|
// ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
|
|
4718
4820
|
import { html as html20, css as css12, LitElement as LitElement21 } from "lit";
|
|
4719
|
-
import { consume as
|
|
4720
|
-
var
|
|
4821
|
+
import { consume as consume15 } from "@lit/context";
|
|
4822
|
+
var __decorate23 = function(decorators, target, key, desc) {
|
|
4721
4823
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4722
4824
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4723
4825
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4789,15 +4891,15 @@ var TestPrintVariables = class extends LitElement21 {
|
|
|
4789
4891
|
`;
|
|
4790
4892
|
}
|
|
4791
4893
|
};
|
|
4792
|
-
|
|
4793
|
-
|
|
4894
|
+
__decorate23([
|
|
4895
|
+
consume15({ context: computedContext, subscribe: true })
|
|
4794
4896
|
], TestPrintVariables.prototype, "computedContext", void 0);
|
|
4795
4897
|
|
|
4796
4898
|
// ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
|
|
4797
4899
|
import { html as html21, LitElement as LitElement22, nothing as nothing3 } from "lit";
|
|
4798
|
-
import { consume as
|
|
4799
|
-
import { property as
|
|
4800
|
-
var
|
|
4900
|
+
import { consume as consume16 } from "@lit/context";
|
|
4901
|
+
import { property as property17 } from "lit/decorators.js";
|
|
4902
|
+
var __decorate24 = function(decorators, target, key, desc) {
|
|
4801
4903
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4802
4904
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4803
4905
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4853,21 +4955,21 @@ var TestScoringButtons = class extends LitElement22 {
|
|
|
4853
4955
|
});
|
|
4854
4956
|
}
|
|
4855
4957
|
};
|
|
4856
|
-
|
|
4857
|
-
|
|
4958
|
+
__decorate24([
|
|
4959
|
+
property17({ type: String, attribute: "view" })
|
|
4858
4960
|
], TestScoringButtons.prototype, "view", void 0);
|
|
4859
|
-
|
|
4860
|
-
|
|
4961
|
+
__decorate24([
|
|
4962
|
+
property17({ type: Boolean })
|
|
4861
4963
|
], TestScoringButtons.prototype, "disabled", void 0);
|
|
4862
|
-
|
|
4863
|
-
|
|
4964
|
+
__decorate24([
|
|
4965
|
+
consume16({ context: computedContext, subscribe: true })
|
|
4864
4966
|
], TestScoringButtons.prototype, "computedContext", void 0);
|
|
4865
4967
|
|
|
4866
4968
|
// ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
|
|
4867
|
-
import { consume as
|
|
4969
|
+
import { consume as consume17 } from "@lit/context";
|
|
4868
4970
|
import { html as html22, LitElement as LitElement23 } from "lit";
|
|
4869
|
-
import { property as
|
|
4870
|
-
var
|
|
4971
|
+
import { property as property18 } from "lit/decorators.js";
|
|
4972
|
+
var __decorate25 = function(decorators, target, key, desc) {
|
|
4871
4973
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4872
4974
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4873
4975
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4906,17 +5008,17 @@ var TestScoringFeedback = class extends LitElement23 {
|
|
|
4906
5008
|
return html22`<div>${feedbackText()}</div>`;
|
|
4907
5009
|
}
|
|
4908
5010
|
};
|
|
4909
|
-
|
|
4910
|
-
|
|
5011
|
+
__decorate25([
|
|
5012
|
+
consume17({ context: computedContext, subscribe: true })
|
|
4911
5013
|
], TestScoringFeedback.prototype, "computedContext", void 0);
|
|
4912
|
-
|
|
4913
|
-
|
|
5014
|
+
__decorate25([
|
|
5015
|
+
property18({ type: String, attribute: "view" })
|
|
4914
5016
|
], TestScoringFeedback.prototype, "view", void 0);
|
|
4915
5017
|
|
|
4916
5018
|
// ../qti-test/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js
|
|
4917
5019
|
import { html as html23, LitElement as LitElement24 } from "lit";
|
|
4918
|
-
import { consume as
|
|
4919
|
-
var
|
|
5020
|
+
import { consume as consume18 } from "@lit/context";
|
|
5021
|
+
var __decorate26 = function(decorators, target, key, desc) {
|
|
4920
5022
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4921
5023
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4922
5024
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4944,14 +5046,14 @@ var TestSectionButtonsStamp = class extends LitElement24 {
|
|
|
4944
5046
|
return html23` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
4945
5047
|
}
|
|
4946
5048
|
};
|
|
4947
|
-
|
|
4948
|
-
|
|
5049
|
+
__decorate26([
|
|
5050
|
+
consume18({ context: computedContext, subscribe: true })
|
|
4949
5051
|
], TestSectionButtonsStamp.prototype, "computedContext", void 0);
|
|
4950
5052
|
|
|
4951
5053
|
// ../qti-test/dist/components/test-section-link/test-section-link.js
|
|
4952
5054
|
import { css as css13, html as html24, LitElement as LitElement25 } from "lit";
|
|
4953
|
-
import { property as
|
|
4954
|
-
var
|
|
5055
|
+
import { property as property19 } from "lit/decorators.js";
|
|
5056
|
+
var __decorate27 = function(decorators, target, key, desc) {
|
|
4955
5057
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4956
5058
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4957
5059
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -4986,15 +5088,15 @@ var TestSectionLink = class extends LitElement25 {
|
|
|
4986
5088
|
return html24` <slot></slot> `;
|
|
4987
5089
|
}
|
|
4988
5090
|
};
|
|
4989
|
-
|
|
4990
|
-
|
|
5091
|
+
__decorate27([
|
|
5092
|
+
property19({ type: String, attribute: "section-id" })
|
|
4991
5093
|
], TestSectionLink.prototype, "sectionId", void 0);
|
|
4992
5094
|
|
|
4993
5095
|
// ../qti-test/dist/components/test-stamp/test-stamp.js
|
|
4994
5096
|
import { html as html25, LitElement as LitElement26, nothing as nothing4 } from "lit";
|
|
4995
|
-
import { property as
|
|
4996
|
-
import { consume as
|
|
4997
|
-
var
|
|
5097
|
+
import { property as property20, state as state7 } from "lit/decorators.js";
|
|
5098
|
+
import { consume as consume19 } from "@lit/context";
|
|
5099
|
+
var __decorate28 = function(decorators, target, key, desc) {
|
|
4998
5100
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4999
5101
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5000
5102
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -5067,22 +5169,22 @@ var TestStamp = class extends LitElement26 {
|
|
|
5067
5169
|
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing4}`;
|
|
5068
5170
|
}
|
|
5069
5171
|
};
|
|
5070
|
-
|
|
5071
|
-
|
|
5172
|
+
__decorate28([
|
|
5173
|
+
property20({ type: Boolean, reflect: true })
|
|
5072
5174
|
], TestStamp.prototype, "debug", void 0);
|
|
5073
|
-
|
|
5175
|
+
__decorate28([
|
|
5074
5176
|
state7(),
|
|
5075
|
-
|
|
5177
|
+
consume19({ context: computedContext, subscribe: true })
|
|
5076
5178
|
], TestStamp.prototype, "computedContext", void 0);
|
|
5077
|
-
|
|
5179
|
+
__decorate28([
|
|
5078
5180
|
state7()
|
|
5079
5181
|
], TestStamp.prototype, "stampContext", void 0);
|
|
5080
5182
|
|
|
5081
5183
|
// ../qti-test/dist/components/test-view-toggle/test-view.js
|
|
5082
5184
|
import { html as html26, LitElement as LitElement27 } from "lit";
|
|
5083
|
-
import { property as
|
|
5084
|
-
import { consume as
|
|
5085
|
-
var
|
|
5185
|
+
import { property as property21, state as state8 } from "lit/decorators.js";
|
|
5186
|
+
import { consume as consume20 } from "@lit/context";
|
|
5187
|
+
var __decorate29 = function(decorators, target, key, desc) {
|
|
5086
5188
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5087
5189
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5088
5190
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -5133,26 +5235,26 @@ var TestView = class extends LitElement27 {
|
|
|
5133
5235
|
}
|
|
5134
5236
|
};
|
|
5135
5237
|
_a = TestView;
|
|
5136
|
-
|
|
5137
|
-
|
|
5238
|
+
__decorate29([
|
|
5239
|
+
consume20({ context: sessionContext, subscribe: true })
|
|
5138
5240
|
], TestView.prototype, "sessionContext", void 0);
|
|
5139
|
-
|
|
5140
|
-
|
|
5241
|
+
__decorate29([
|
|
5242
|
+
property21({ type: String })
|
|
5141
5243
|
], TestView.prototype, "label", void 0);
|
|
5142
|
-
|
|
5143
|
-
|
|
5244
|
+
__decorate29([
|
|
5245
|
+
property21({ type: String, attribute: "view-options" })
|
|
5144
5246
|
], TestView.prototype, "viewOptions", void 0);
|
|
5145
|
-
|
|
5247
|
+
__decorate29([
|
|
5146
5248
|
watch("viewOptions", { waitUntilFirstUpdate: true })
|
|
5147
5249
|
], TestView.prototype, "_handleViewOptionsChange", void 0);
|
|
5148
|
-
|
|
5250
|
+
__decorate29([
|
|
5149
5251
|
state8()
|
|
5150
5252
|
], TestView.prototype, "_viewOptions", void 0);
|
|
5151
5253
|
|
|
5152
5254
|
// ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
|
|
5153
|
-
import { consume as
|
|
5255
|
+
import { consume as consume21 } from "@lit/context";
|
|
5154
5256
|
import { html as html27, LitElement as LitElement28, nothing as nothing5 } from "lit";
|
|
5155
|
-
var
|
|
5257
|
+
var __decorate30 = function(decorators, target, key, desc) {
|
|
5156
5258
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5157
5259
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5158
5260
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -5189,8 +5291,8 @@ var TestViewToggle = class extends LitElement28 {
|
|
|
5189
5291
|
}) : nothing5}`;
|
|
5190
5292
|
}
|
|
5191
5293
|
};
|
|
5192
|
-
|
|
5193
|
-
|
|
5294
|
+
__decorate30([
|
|
5295
|
+
consume21({ context: sessionContext, subscribe: true })
|
|
5194
5296
|
], TestViewToggle.prototype, "sessionContext", void 0);
|
|
5195
5297
|
|
|
5196
5298
|
// ../qti-test/dist/elements.js
|
|
@@ -5200,6 +5302,7 @@ var qtiTestElements = [
|
|
|
5200
5302
|
{ tag: "qti-assessment-test", ctor: QtiAssessmentTest },
|
|
5201
5303
|
{ tag: "qti-branch-rule", ctor: QtiBranchRule },
|
|
5202
5304
|
{ tag: "qti-item-session-control", ctor: QtiItemSessionControl },
|
|
5305
|
+
{ tag: "qti-number-presented", ctor: QtiNumberPresented },
|
|
5203
5306
|
{ tag: "qti-number-selected", ctor: QtiNumberSelected },
|
|
5204
5307
|
{ tag: "qti-outcome-processing", ctor: QtiOutcomeProcessing },
|
|
5205
5308
|
{ tag: "qti-pre-condition", ctor: QtiPreCondition },
|
|
@@ -5240,6 +5343,7 @@ export {
|
|
|
5240
5343
|
QtiAssessmentTest,
|
|
5241
5344
|
QtiBranchRule,
|
|
5242
5345
|
QtiItemSessionControl,
|
|
5346
|
+
QtiNumberPresented,
|
|
5243
5347
|
QtiNumberSelected,
|
|
5244
5348
|
QtiPreCondition,
|
|
5245
5349
|
QtiOutcomeProcessing,
|
|
@@ -5290,4 +5394,4 @@ export {
|
|
|
5290
5394
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
5291
5395
|
*)
|
|
5292
5396
|
*/
|
|
5293
|
-
//# sourceMappingURL=chunk-
|
|
5397
|
+
//# sourceMappingURL=chunk-SIE3E4FG.js.map
|