@citolab/qti-components 10.0.0-next.0 → 10.0.0-next.1
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 +191 -183
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -1
- package/dist/{chunk-GPNWMLLA.js → chunk-35WWWFS6.js} +2 -2
- package/dist/{chunk-3BAQWO5C.js → chunk-6K3QWJHH.js} +2 -2
- package/dist/{chunk-AWTQKBC4.js → chunk-6U3YPHXU.js} +2 -2
- package/dist/{chunk-EUKU5QKV.js → chunk-CKJ7M7JQ.js} +494 -271
- package/dist/chunk-CKJ7M7JQ.js.map +1 -0
- package/dist/{chunk-WNAOVXXN.js → chunk-FD4AB6TM.js} +2 -2
- package/dist/{chunk-EPSUZIWL.js → chunk-FWR6HZQS.js} +6 -6
- package/dist/{chunk-SVYHZIJ7.js → chunk-GBZNFSFY.js} +2 -2
- package/dist/{chunk-ACRN7YJM.js → chunk-MI7774NV.js} +2 -2
- package/dist/{chunk-CNFVA3AA.js → chunk-RSMYGGQK.js} +2 -2
- package/dist/{chunk-F7R7GSWL.js → chunk-RU6332MD.js} +2 -2
- package/dist/{chunk-R7MMMDP7.js → chunk-TDWJ6WZA.js} +20 -2
- package/dist/chunk-TDWJ6WZA.js.map +1 -0
- package/dist/{chunk-QD3Y6UK3.js → chunk-YYIS6FDP.js} +2 -2
- package/dist/corrections.d.ts +2 -2
- package/dist/corrections.js +7 -7
- package/dist/elements.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +16 -12
- package/dist/interactions.js +3 -3
- package/dist/item.js +3 -3
- package/dist/processing.d.ts +2 -2
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +120 -0
- package/dist/{qti-condition-expression.d-L7yb3Rzy.d.ts → qti-condition-expression.d-VJH6cWxf.d.ts} +1 -1
- package/dist/{qti-expression.d-CuaLjZ6g.d.ts → qti-expression.d-BPxEp8HU.d.ts} +7 -0
- package/dist/{qti-test.d-_THYXPzd.d.ts → qti-test.d-DkpBNcsv.d.ts} +62 -2
- package/dist/test.d.ts +3 -3
- package/dist/test.js +8 -4
- package/package.json +8 -8
- package/dist/chunk-EUKU5QKV.js.map +0 -1
- package/dist/chunk-R7MMMDP7.js.map +0 -1
- /package/dist/{chunk-GPNWMLLA.js.map → chunk-35WWWFS6.js.map} +0 -0
- /package/dist/{chunk-3BAQWO5C.js.map → chunk-6K3QWJHH.js.map} +0 -0
- /package/dist/{chunk-AWTQKBC4.js.map → chunk-6U3YPHXU.js.map} +0 -0
- /package/dist/{chunk-WNAOVXXN.js.map → chunk-FD4AB6TM.js.map} +0 -0
- /package/dist/{chunk-EPSUZIWL.js.map → chunk-FWR6HZQS.js.map} +0 -0
- /package/dist/{chunk-SVYHZIJ7.js.map → chunk-GBZNFSFY.js.map} +0 -0
- /package/dist/{chunk-ACRN7YJM.js.map → chunk-MI7774NV.js.map} +0 -0
- /package/dist/{chunk-CNFVA3AA.js.map → chunk-RSMYGGQK.js.map} +0 -0
- /package/dist/{chunk-F7R7GSWL.js.map → chunk-RU6332MD.js.map} +0 -0
- /package/dist/{chunk-QD3Y6UK3.js.map → chunk-YYIS6FDP.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
dispatchDeclared,
|
|
4
4
|
listenDeclared,
|
|
5
5
|
listenPublic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6U3YPHXU.js";
|
|
7
7
|
import {
|
|
8
8
|
item_css_default
|
|
9
9
|
} from "./chunk-ZP6QQYSU.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
qtiContext,
|
|
25
25
|
sessionContext,
|
|
26
26
|
testContext
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TDWJ6WZA.js";
|
|
28
28
|
|
|
29
29
|
// ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
|
|
30
30
|
import { LitElement, nothing as nothing2 } from "lit";
|
|
@@ -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 property21;
|
|
640
640
|
if (this.left.type === "Getter") {
|
|
641
641
|
receiver = this.left.receiver.evaluate(scope);
|
|
642
|
-
|
|
642
|
+
property21 = this.left.name;
|
|
643
643
|
} else if (this.left.type === "Index") {
|
|
644
644
|
receiver = this.left.receiver.evaluate(scope);
|
|
645
|
-
|
|
645
|
+
property21 = this.left.argument.evaluate(scope);
|
|
646
646
|
} else if (this.left.type === "ID") {
|
|
647
647
|
receiver = scope;
|
|
648
|
-
|
|
648
|
+
property21 = this.left.value;
|
|
649
649
|
}
|
|
650
|
-
return receiver === void 0 ? void 0 : receiver[
|
|
650
|
+
return receiver === void 0 ? void 0 : receiver[property21] = value;
|
|
651
651
|
}
|
|
652
652
|
return f(this.left.evaluate(scope), this.right.evaluate(scope));
|
|
653
653
|
},
|
|
@@ -1119,6 +1119,8 @@ var PUBLIC_EVENTS = {
|
|
|
1119
1119
|
"cito-test-rendered": { kind: "notification", scope: "test", deprecated: "qti-test-loaded" },
|
|
1120
1120
|
"cito-test-loaded": { kind: "notification", scope: "test", deprecated: "qti-assessment-test-connected" },
|
|
1121
1121
|
"cito-test-state-changed": { kind: "notification", scope: "test", deprecated: "qti-state-changed" },
|
|
1122
|
+
"cito-test-items-skipped": { kind: "notification", scope: "test" },
|
|
1123
|
+
"cito-test-end-reached": { kind: "notification", scope: "test" },
|
|
1122
1124
|
"cito-item-ref-connected": { kind: "notification", scope: "item", deprecated: "qti-assessment-item-ref-connected" }
|
|
1123
1125
|
};
|
|
1124
1126
|
function dispatchPublic(target, name, detail) {
|
|
@@ -1370,15 +1372,75 @@ __decorate3([
|
|
|
1370
1372
|
consume3({ context: testContext, subscribe: true })
|
|
1371
1373
|
], QtiAssessmentTest.prototype, "_testContext", void 0);
|
|
1372
1374
|
|
|
1373
|
-
// ../qti-test/dist/components/qti-
|
|
1374
|
-
import { html as html3, LitElement as LitElement4 } from "lit";
|
|
1375
|
+
// ../qti-test/dist/components/qti-branch-rule/qti-branch-rule.js
|
|
1376
|
+
import { css, html as html3, LitElement as LitElement4 } from "lit";
|
|
1375
1377
|
import { property as property4 } from "lit/decorators.js";
|
|
1378
|
+
|
|
1379
|
+
// ../qti-test/dist/internal/evaluate-condition.js
|
|
1380
|
+
function evaluateBooleanChild(element, onError) {
|
|
1381
|
+
const expression = element.firstElementChild;
|
|
1382
|
+
if (!expression || typeof expression.calculate !== "function") {
|
|
1383
|
+
console.warn(`<${element.localName}> has no evaluable expression child`, element);
|
|
1384
|
+
return onError;
|
|
1385
|
+
}
|
|
1386
|
+
try {
|
|
1387
|
+
const result = expression.calculate();
|
|
1388
|
+
return result === true || result === "true";
|
|
1389
|
+
} catch (error) {
|
|
1390
|
+
console.warn(`<${element.localName}> could not evaluate its expression`, error);
|
|
1391
|
+
return onError;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
// ../qti-test/dist/components/qti-branch-rule/qti-branch-rule.js
|
|
1376
1396
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
1377
1397
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1378
1398
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1379
1399
|
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;
|
|
1380
1400
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1381
1401
|
};
|
|
1402
|
+
var QtiBranchRule = class extends LitElement4 {
|
|
1403
|
+
constructor() {
|
|
1404
|
+
super(...arguments);
|
|
1405
|
+
this.target = "";
|
|
1406
|
+
}
|
|
1407
|
+
static {
|
|
1408
|
+
this.EXIT_SECTION = "EXIT_SECTION";
|
|
1409
|
+
}
|
|
1410
|
+
static {
|
|
1411
|
+
this.EXIT_TESTPART = "EXIT_TESTPART";
|
|
1412
|
+
}
|
|
1413
|
+
static {
|
|
1414
|
+
this.EXIT_TEST = "EXIT_TEST";
|
|
1415
|
+
}
|
|
1416
|
+
static {
|
|
1417
|
+
this.styles = css`
|
|
1418
|
+
:host {
|
|
1419
|
+
display: none;
|
|
1420
|
+
}
|
|
1421
|
+
`;
|
|
1422
|
+
}
|
|
1423
|
+
/** `true` when the test should jump to `target`. */
|
|
1424
|
+
evaluate() {
|
|
1425
|
+
return evaluateBooleanChild(this, false);
|
|
1426
|
+
}
|
|
1427
|
+
render() {
|
|
1428
|
+
return html3`<slot></slot>`;
|
|
1429
|
+
}
|
|
1430
|
+
};
|
|
1431
|
+
__decorate4([
|
|
1432
|
+
property4({ type: String })
|
|
1433
|
+
], QtiBranchRule.prototype, "target", void 0);
|
|
1434
|
+
|
|
1435
|
+
// ../qti-test/dist/components/qti-item-session-control/qti-item-session-control.js
|
|
1436
|
+
import { html as html4, LitElement as LitElement5 } from "lit";
|
|
1437
|
+
import { property as property5 } from "lit/decorators.js";
|
|
1438
|
+
var __decorate5 = function(decorators, target, key, desc) {
|
|
1439
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1440
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1441
|
+
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;
|
|
1442
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1443
|
+
};
|
|
1382
1444
|
var stringToBooleanConverter3 = {
|
|
1383
1445
|
fromAttribute(value) {
|
|
1384
1446
|
return value === "true";
|
|
@@ -1387,7 +1449,7 @@ var stringToBooleanConverter3 = {
|
|
|
1387
1449
|
return value ? "true" : "false";
|
|
1388
1450
|
}
|
|
1389
1451
|
};
|
|
1390
|
-
var QtiItemSessionControl = class extends
|
|
1452
|
+
var QtiItemSessionControl = class extends LitElement5 {
|
|
1391
1453
|
constructor() {
|
|
1392
1454
|
super(...arguments);
|
|
1393
1455
|
this.maxAttempts = 1;
|
|
@@ -1408,29 +1470,29 @@ var QtiItemSessionControl = class extends LitElement4 {
|
|
|
1408
1470
|
}));
|
|
1409
1471
|
}
|
|
1410
1472
|
render() {
|
|
1411
|
-
return
|
|
1473
|
+
return html4`<slot></slot>`;
|
|
1412
1474
|
}
|
|
1413
1475
|
};
|
|
1414
|
-
|
|
1415
|
-
|
|
1476
|
+
__decorate5([
|
|
1477
|
+
property5({ type: Number, attribute: "max-attempts" })
|
|
1416
1478
|
], QtiItemSessionControl.prototype, "maxAttempts", void 0);
|
|
1417
|
-
|
|
1418
|
-
|
|
1479
|
+
__decorate5([
|
|
1480
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "show-feedback" })
|
|
1419
1481
|
], QtiItemSessionControl.prototype, "showFeedback", void 0);
|
|
1420
|
-
|
|
1421
|
-
|
|
1482
|
+
__decorate5([
|
|
1483
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "allow-review" })
|
|
1422
1484
|
], QtiItemSessionControl.prototype, "allowReview", void 0);
|
|
1423
|
-
|
|
1424
|
-
|
|
1485
|
+
__decorate5([
|
|
1486
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "show-solution" })
|
|
1425
1487
|
], QtiItemSessionControl.prototype, "showSolution", void 0);
|
|
1426
|
-
|
|
1427
|
-
|
|
1488
|
+
__decorate5([
|
|
1489
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "allow-comment" })
|
|
1428
1490
|
], QtiItemSessionControl.prototype, "allowComment", void 0);
|
|
1429
|
-
|
|
1430
|
-
|
|
1491
|
+
__decorate5([
|
|
1492
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "allow-skipping" })
|
|
1431
1493
|
], QtiItemSessionControl.prototype, "allowSkipping", void 0);
|
|
1432
|
-
|
|
1433
|
-
|
|
1494
|
+
__decorate5([
|
|
1495
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "validate-responses" })
|
|
1434
1496
|
], QtiItemSessionControl.prototype, "validateResponses", void 0);
|
|
1435
1497
|
|
|
1436
1498
|
// ../qti-test/dist/internal/item-ref-selection.js
|
|
@@ -1487,12 +1549,31 @@ var QtiNumberSelected = class extends QtiExpression {
|
|
|
1487
1549
|
}
|
|
1488
1550
|
};
|
|
1489
1551
|
|
|
1552
|
+
// ../qti-test/dist/components/qti-pre-condition/qti-pre-condition.js
|
|
1553
|
+
import { css as css2, html as html5, LitElement as LitElement6 } from "lit";
|
|
1554
|
+
var QtiPreCondition = class extends LitElement6 {
|
|
1555
|
+
static {
|
|
1556
|
+
this.styles = css2`
|
|
1557
|
+
:host {
|
|
1558
|
+
display: none;
|
|
1559
|
+
}
|
|
1560
|
+
`;
|
|
1561
|
+
}
|
|
1562
|
+
/** `true` when the parent may be presented. */
|
|
1563
|
+
evaluate() {
|
|
1564
|
+
return evaluateBooleanChild(this, true);
|
|
1565
|
+
}
|
|
1566
|
+
render() {
|
|
1567
|
+
return html5`<slot></slot>`;
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1490
1571
|
// ../qti-test/dist/components/qti-outcome-processing/qti-outcome-processing.js
|
|
1491
|
-
import { css, html as
|
|
1492
|
-
var QtiOutcomeProcessing = class extends
|
|
1572
|
+
import { css as css3, html as html6, LitElement as LitElement7 } from "lit";
|
|
1573
|
+
var QtiOutcomeProcessing = class extends LitElement7 {
|
|
1493
1574
|
static {
|
|
1494
1575
|
this.styles = [
|
|
1495
|
-
|
|
1576
|
+
css3`
|
|
1496
1577
|
:host {
|
|
1497
1578
|
display: none;
|
|
1498
1579
|
}
|
|
@@ -1500,7 +1581,7 @@ var QtiOutcomeProcessing = class extends LitElement5 {
|
|
|
1500
1581
|
];
|
|
1501
1582
|
}
|
|
1502
1583
|
render() {
|
|
1503
|
-
return
|
|
1584
|
+
return html6`<slot></slot>`;
|
|
1504
1585
|
}
|
|
1505
1586
|
process() {
|
|
1506
1587
|
const logic = new QtiOutcomeProcessingProcessor();
|
|
@@ -1522,30 +1603,30 @@ var QtiOutcomeProcessingProcessor = class {
|
|
|
1522
1603
|
};
|
|
1523
1604
|
|
|
1524
1605
|
// ../qti-test/dist/components/qti-test-feedback/qti-test-feedback.js
|
|
1525
|
-
import { css as
|
|
1606
|
+
import { css as css4, html as html7 } from "lit";
|
|
1526
1607
|
var QtiTestFeedback = class extends QtiModalFeedback {
|
|
1527
1608
|
static {
|
|
1528
|
-
this.styles =
|
|
1609
|
+
this.styles = css4`
|
|
1529
1610
|
:host {
|
|
1530
1611
|
color: gray;
|
|
1531
1612
|
}
|
|
1532
1613
|
`;
|
|
1533
1614
|
}
|
|
1534
1615
|
render() {
|
|
1535
|
-
return
|
|
1616
|
+
return html7``;
|
|
1536
1617
|
}
|
|
1537
1618
|
};
|
|
1538
1619
|
|
|
1539
1620
|
// ../qti-test/dist/components/qti-test-part/qti-test-part.js
|
|
1540
|
-
import { html as
|
|
1541
|
-
import { property as
|
|
1542
|
-
var
|
|
1621
|
+
import { html as html8, LitElement as LitElement8 } from "lit";
|
|
1622
|
+
import { property as property6 } from "lit/decorators.js";
|
|
1623
|
+
var __decorate6 = function(decorators, target, key, desc) {
|
|
1543
1624
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1544
1625
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1545
1626
|
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;
|
|
1546
1627
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1547
1628
|
};
|
|
1548
|
-
var QtiTestPart = class extends
|
|
1629
|
+
var QtiTestPart = class extends LitElement8 {
|
|
1549
1630
|
constructor() {
|
|
1550
1631
|
super(...arguments);
|
|
1551
1632
|
this.identifier = "";
|
|
@@ -1572,25 +1653,25 @@ var QtiTestPart = class extends LitElement6 {
|
|
|
1572
1653
|
}));
|
|
1573
1654
|
}
|
|
1574
1655
|
render() {
|
|
1575
|
-
return
|
|
1656
|
+
return html8` <slot></slot>`;
|
|
1576
1657
|
}
|
|
1577
1658
|
};
|
|
1578
|
-
|
|
1579
|
-
|
|
1659
|
+
__decorate6([
|
|
1660
|
+
property6({ type: String })
|
|
1580
1661
|
], QtiTestPart.prototype, "identifier", void 0);
|
|
1581
|
-
|
|
1582
|
-
|
|
1662
|
+
__decorate6([
|
|
1663
|
+
property6({ type: String })
|
|
1583
1664
|
], QtiTestPart.prototype, "class", void 0);
|
|
1584
|
-
|
|
1585
|
-
|
|
1665
|
+
__decorate6([
|
|
1666
|
+
property6({ type: String, attribute: "navigation-mode" })
|
|
1586
1667
|
], QtiTestPart.prototype, "navigationMode", void 0);
|
|
1587
|
-
|
|
1588
|
-
|
|
1668
|
+
__decorate6([
|
|
1669
|
+
property6({ type: String, attribute: "submission-mode" })
|
|
1589
1670
|
], QtiTestPart.prototype, "submissionMode", void 0);
|
|
1590
1671
|
|
|
1591
1672
|
// ../qti-test/dist/components/qti-test-variables/qti-test-variables.js
|
|
1592
1673
|
import { consume as consume4 } from "@lit/context";
|
|
1593
|
-
var
|
|
1674
|
+
var __decorate7 = function(decorators, target, key, desc) {
|
|
1594
1675
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1595
1676
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1596
1677
|
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;
|
|
@@ -1631,7 +1712,7 @@ var QtiTestVariables = class extends QtiExpression {
|
|
|
1631
1712
|
return this.getResult();
|
|
1632
1713
|
}
|
|
1633
1714
|
};
|
|
1634
|
-
|
|
1715
|
+
__decorate7([
|
|
1635
1716
|
consume4({ context: testContext, subscribe: true })
|
|
1636
1717
|
], QtiTestVariables.prototype, "_testContext", void 0);
|
|
1637
1718
|
var QtiTestVariablesExpression = class {
|
|
@@ -1665,12 +1746,104 @@ var QTI_TEST_STATE_VERSION = 1;
|
|
|
1665
1746
|
|
|
1666
1747
|
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
1667
1748
|
import { ContextProvider, provide as provide2 } from "@lit/context";
|
|
1668
|
-
import { html as
|
|
1749
|
+
import { html as html9, LitElement as LitElement10 } from "lit";
|
|
1669
1750
|
import { state as state2 } from "lit/decorators.js";
|
|
1670
1751
|
|
|
1671
1752
|
// ../qti-test/dist/mixins/test-navigation.mixin.js
|
|
1672
|
-
import { property as
|
|
1673
|
-
|
|
1753
|
+
import { property as property7 } from "lit/decorators.js";
|
|
1754
|
+
|
|
1755
|
+
// ../qti-test/dist/internal/item-sequencing.js
|
|
1756
|
+
var SECTION = "qti-assessment-section";
|
|
1757
|
+
var TEST_PART = "qti-test-part";
|
|
1758
|
+
var idOf = (ref) => ref.identifier || ref.getAttribute("identifier") || "";
|
|
1759
|
+
function resolveNextItem(refs, current) {
|
|
1760
|
+
const from = refs[current];
|
|
1761
|
+
let start = current + 1;
|
|
1762
|
+
const rule = firstFiringBranchRule(from, refs, current);
|
|
1763
|
+
if (rule) {
|
|
1764
|
+
const target = branchTargetIndex(rule, refs, current);
|
|
1765
|
+
if (target === null)
|
|
1766
|
+
return { id: null, skipped: refs.slice(current + 1).map(idOf) };
|
|
1767
|
+
if (target > current)
|
|
1768
|
+
start = target;
|
|
1769
|
+
else
|
|
1770
|
+
console.warn(`qti-branch-rule target "${rule.target}" is not ahead of "${idOf(from)}", ignored`);
|
|
1771
|
+
}
|
|
1772
|
+
const skipped = refs.slice(current + 1, start).map(idOf);
|
|
1773
|
+
for (let i = start; i < refs.length; i++) {
|
|
1774
|
+
if (preConditionsPass(refs[i], from))
|
|
1775
|
+
return { id: idOf(refs[i]), skipped };
|
|
1776
|
+
skipped.push(idOf(refs[i]));
|
|
1777
|
+
}
|
|
1778
|
+
return { id: null, skipped };
|
|
1779
|
+
}
|
|
1780
|
+
function resolveFirstItem(refs) {
|
|
1781
|
+
const skipped = [];
|
|
1782
|
+
for (const ref of refs) {
|
|
1783
|
+
if (preConditionsPass(ref, null))
|
|
1784
|
+
return { id: idOf(ref), skipped };
|
|
1785
|
+
skipped.push(idOf(ref));
|
|
1786
|
+
}
|
|
1787
|
+
return { id: null, skipped };
|
|
1788
|
+
}
|
|
1789
|
+
function firstFiringBranchRule(itemRef, refs, current) {
|
|
1790
|
+
const owners = [itemRef];
|
|
1791
|
+
for (let el = itemRef.parentElement; el && (el.localName === SECTION || el.localName === TEST_PART); el = el.parentElement) {
|
|
1792
|
+
if (el.contains(refs[current + 1] ?? null))
|
|
1793
|
+
break;
|
|
1794
|
+
owners.push(el);
|
|
1795
|
+
}
|
|
1796
|
+
for (const owner of owners) {
|
|
1797
|
+
for (const rule of owner.querySelectorAll(":scope > qti-branch-rule")) {
|
|
1798
|
+
if (rule.evaluate?.())
|
|
1799
|
+
return rule;
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
return null;
|
|
1803
|
+
}
|
|
1804
|
+
function branchTargetIndex(rule, refs, current) {
|
|
1805
|
+
const owner = rule.parentElement;
|
|
1806
|
+
const firstAfter = (container) => {
|
|
1807
|
+
if (!container)
|
|
1808
|
+
return null;
|
|
1809
|
+
const last = refs.findLastIndex((ref) => container.contains(ref));
|
|
1810
|
+
return last + 1 < refs.length ? last + 1 : null;
|
|
1811
|
+
};
|
|
1812
|
+
switch (rule.target) {
|
|
1813
|
+
case QtiBranchRule.EXIT_TEST:
|
|
1814
|
+
return null;
|
|
1815
|
+
case QtiBranchRule.EXIT_TESTPART:
|
|
1816
|
+
return firstAfter(owner.closest(TEST_PART));
|
|
1817
|
+
case QtiBranchRule.EXIT_SECTION: {
|
|
1818
|
+
const section = owner.localName === SECTION ? owner : owner.closest(SECTION);
|
|
1819
|
+
return firstAfter(section ?? owner);
|
|
1820
|
+
}
|
|
1821
|
+
default: {
|
|
1822
|
+
const byRef = refs.findIndex((ref) => idOf(ref) === rule.target);
|
|
1823
|
+
if (byRef >= 0)
|
|
1824
|
+
return byRef;
|
|
1825
|
+
const container = [
|
|
1826
|
+
...owner.closest("qti-assessment-test")?.querySelectorAll(`${SECTION}, ${TEST_PART}`) ?? []
|
|
1827
|
+
].find((el) => el.getAttribute("identifier") === rule.target);
|
|
1828
|
+
const inside = container ? refs.findIndex((ref) => container.contains(ref)) : -1;
|
|
1829
|
+
if (inside >= 0)
|
|
1830
|
+
return inside;
|
|
1831
|
+
console.warn(`qti-branch-rule target "${rule.target}" not found`);
|
|
1832
|
+
return current + 1;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
function preConditionsPass(itemRef, from) {
|
|
1837
|
+
const owners = [itemRef];
|
|
1838
|
+
for (let el = itemRef.parentElement; el && (el.localName === SECTION || el.localName === TEST_PART); el = el.parentElement) {
|
|
1839
|
+
if (!from || !el.contains(from))
|
|
1840
|
+
owners.push(el);
|
|
1841
|
+
}
|
|
1842
|
+
return owners.every((owner) => [...owner.querySelectorAll(":scope > qti-pre-condition")].every((condition) => condition.evaluate?.() ?? true));
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
// ../qti-test/dist/mixins/test-navigation.mixin.js
|
|
1846
|
+
var __decorate8 = function(decorators, target, key, desc) {
|
|
1674
1847
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1675
1848
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1676
1849
|
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;
|
|
@@ -1788,7 +1961,20 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1788
1961
|
_initializeNavigation() {
|
|
1789
1962
|
if (!this.navigate)
|
|
1790
1963
|
return;
|
|
1791
|
-
|
|
1964
|
+
let id = this._getDefaultNavigationId(this.navigate);
|
|
1965
|
+
if (this.navigate === "item" && this._testElement && !this.sessionContext?.navItemRefId) {
|
|
1966
|
+
const refs = [...this._testElement.querySelectorAll("qti-assessment-item-ref")];
|
|
1967
|
+
if (refs[0]?.closest("qti-test-part")?.getAttribute("navigation-mode") === "linear") {
|
|
1968
|
+
const first = resolveFirstItem(refs);
|
|
1969
|
+
if (first.skipped.length)
|
|
1970
|
+
dispatchPublic(this, "cito-test-items-skipped", { ids: first.skipped });
|
|
1971
|
+
if (first.id === null) {
|
|
1972
|
+
dispatchPublic(this, "cito-test-end-reached", {});
|
|
1973
|
+
return;
|
|
1974
|
+
}
|
|
1975
|
+
id = first.id;
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1792
1978
|
if (id) {
|
|
1793
1979
|
this.navigateTo(this.navigate, id);
|
|
1794
1980
|
}
|
|
@@ -1817,13 +2003,43 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1817
2003
|
}
|
|
1818
2004
|
return true;
|
|
1819
2005
|
}
|
|
2006
|
+
/**
|
|
2007
|
+
* A "next" step in a linear test part (a request for item i+1 while item i is active) goes
|
|
2008
|
+
* through the branch rules and pre-conditions. Deep links, item links and nonlinear parts are
|
|
2009
|
+
* left alone: the spec ignores both in nonlinear mode.
|
|
2010
|
+
*
|
|
2011
|
+
* @returns the item to present instead, `null` when the test has no eligible item left, or
|
|
2012
|
+
* `undefined` when the request is not a "next" step.
|
|
2013
|
+
*/
|
|
2014
|
+
_resolveLinearNext(type, id) {
|
|
2015
|
+
if (type !== "item" || !this._testElement)
|
|
2016
|
+
return void 0;
|
|
2017
|
+
const refs = [...this._testElement.querySelectorAll("qti-assessment-item-ref")];
|
|
2018
|
+
const current = refs.findIndex((ref) => idOf(ref) === this.sessionContext?.navItemRefId);
|
|
2019
|
+
if (current < 0 || !refs[current + 1] || idOf(refs[current + 1]) !== id)
|
|
2020
|
+
return void 0;
|
|
2021
|
+
if (refs[current].closest("qti-test-part")?.getAttribute("navigation-mode") !== "linear")
|
|
2022
|
+
return void 0;
|
|
2023
|
+
const next = resolveNextItem(refs, current);
|
|
2024
|
+
if (next.id === id)
|
|
2025
|
+
return void 0;
|
|
2026
|
+
return next;
|
|
2027
|
+
}
|
|
1820
2028
|
/**
|
|
1821
2029
|
* Main navigation request handler with proper lifecycle management
|
|
1822
2030
|
*/
|
|
1823
2031
|
async _handleNavigationRequest({ detail }) {
|
|
1824
2032
|
if (!detail?.id)
|
|
1825
2033
|
return;
|
|
1826
|
-
|
|
2034
|
+
const resolved = this._resolveLinearNext(detail.type, detail.id);
|
|
2035
|
+
if (resolved?.id === null) {
|
|
2036
|
+
if (resolved.skipped.length)
|
|
2037
|
+
dispatchPublic(this, "cito-test-items-skipped", { ids: resolved.skipped });
|
|
2038
|
+
dispatchPublic(this, "cito-test-end-reached", {});
|
|
2039
|
+
return;
|
|
2040
|
+
}
|
|
2041
|
+
const target = resolved?.id ?? detail.id;
|
|
2042
|
+
if (!resolved && this._isLinearNavigationRestricted(detail.type, target)) {
|
|
1827
2043
|
this._handleNavigationError(new Error("Navigation restricted in linear mode"), detail.type, detail.id);
|
|
1828
2044
|
return;
|
|
1829
2045
|
}
|
|
@@ -1831,16 +2047,19 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1831
2047
|
const navigationId = ++this._navigationId;
|
|
1832
2048
|
const controller = new AbortController();
|
|
1833
2049
|
try {
|
|
1834
|
-
this._dispatchLoadingStarted(detail.type,
|
|
2050
|
+
this._dispatchLoadingStarted(detail.type, target);
|
|
1835
2051
|
this._activeController = controller;
|
|
1836
|
-
await this._executeNavigation(detail.type,
|
|
2052
|
+
await this._executeNavigation(detail.type, target, navigationId, controller);
|
|
2053
|
+
if (resolved?.skipped.length && navigationId === this._navigationId && !controller.signal.aborted) {
|
|
2054
|
+
dispatchPublic(this, "cito-test-items-skipped", { ids: resolved.skipped });
|
|
2055
|
+
}
|
|
1837
2056
|
} catch (error) {
|
|
1838
|
-
this._handleNavigationError(error, detail.type,
|
|
2057
|
+
this._handleNavigationError(error, detail.type, target);
|
|
1839
2058
|
} finally {
|
|
1840
2059
|
if (this._activeController === controller) {
|
|
1841
2060
|
this._activeController = null;
|
|
1842
2061
|
}
|
|
1843
|
-
this._dispatchLoadingEnded(detail.type,
|
|
2062
|
+
this._dispatchLoadingEnded(detail.type, target);
|
|
1844
2063
|
}
|
|
1845
2064
|
}
|
|
1846
2065
|
_handleNavigationError(error, type, id) {
|
|
@@ -2132,17 +2351,17 @@ var TestNavigationMixin = (superClass) => {
|
|
|
2132
2351
|
});
|
|
2133
2352
|
}
|
|
2134
2353
|
}
|
|
2135
|
-
|
|
2136
|
-
|
|
2354
|
+
__decorate8([
|
|
2355
|
+
property7({ type: String })
|
|
2137
2356
|
], TestNavigationClass.prototype, "navigate", void 0);
|
|
2138
|
-
|
|
2139
|
-
|
|
2357
|
+
__decorate8([
|
|
2358
|
+
property7({ type: Number })
|
|
2140
2359
|
], TestNavigationClass.prototype, "requestTimeout", void 0);
|
|
2141
|
-
|
|
2142
|
-
|
|
2360
|
+
__decorate8([
|
|
2361
|
+
property7({ attribute: false })
|
|
2143
2362
|
], TestNavigationClass.prototype, "postLoadTransformCallback", void 0);
|
|
2144
|
-
|
|
2145
|
-
|
|
2363
|
+
__decorate8([
|
|
2364
|
+
property7({ attribute: false })
|
|
2146
2365
|
], TestNavigationClass.prototype, "postLoadTestTransformCallback", void 0);
|
|
2147
2366
|
return TestNavigationClass;
|
|
2148
2367
|
};
|
|
@@ -2197,9 +2416,9 @@ var TestViewMixin = (superClass) => {
|
|
|
2197
2416
|
|
|
2198
2417
|
// ../qti-test/dist/mixins/test-base.js
|
|
2199
2418
|
import { provide } from "@lit/context";
|
|
2200
|
-
import { LitElement as
|
|
2201
|
-
import { property as
|
|
2202
|
-
var
|
|
2419
|
+
import { LitElement as LitElement9 } from "lit";
|
|
2420
|
+
import { property as property8 } from "lit/decorators.js";
|
|
2421
|
+
var __decorate9 = function(decorators, target, key, desc) {
|
|
2203
2422
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2204
2423
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2205
2424
|
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;
|
|
@@ -2340,17 +2559,17 @@ var TestBaseMixin = (superClass) => {
|
|
|
2340
2559
|
this.dispatchEvent(new CustomEvent("qti-test-context-updated", { detail: this.testContext, bubbles: false, composed: false }));
|
|
2341
2560
|
}
|
|
2342
2561
|
}
|
|
2343
|
-
|
|
2344
|
-
|
|
2562
|
+
__decorate9([
|
|
2563
|
+
property8({ attribute: false, type: Object }),
|
|
2345
2564
|
provide({ context: testContext })
|
|
2346
2565
|
], TestBaseClass.prototype, "testContext", void 0);
|
|
2347
|
-
|
|
2348
|
-
|
|
2566
|
+
__decorate9([
|
|
2567
|
+
property8({ attribute: false, type: Object }),
|
|
2349
2568
|
provide({ context: sessionContext })
|
|
2350
2569
|
], TestBaseClass.prototype, "sessionContext", void 0);
|
|
2351
2570
|
return TestBaseClass;
|
|
2352
2571
|
};
|
|
2353
|
-
var TestBase = class extends TestBaseMixin(
|
|
2572
|
+
var TestBase = class extends TestBaseMixin(LitElement9) {
|
|
2354
2573
|
};
|
|
2355
2574
|
|
|
2356
2575
|
// ../qti-test/dist/mixins/test-state.mixin.js
|
|
@@ -2518,13 +2737,13 @@ var TestProcessingMixin = (superClass) => {
|
|
|
2518
2737
|
};
|
|
2519
2738
|
|
|
2520
2739
|
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
2521
|
-
var
|
|
2740
|
+
var __decorate10 = function(decorators, target, key, desc) {
|
|
2522
2741
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2523
2742
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2524
2743
|
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;
|
|
2525
2744
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2526
2745
|
};
|
|
2527
|
-
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestStateMixin(TestBaseMixin(
|
|
2746
|
+
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestStateMixin(TestBaseMixin(LitElement10))))) {
|
|
2528
2747
|
// TODO: Properly implement IQtiTest interface
|
|
2529
2748
|
// export class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
|
|
2530
2749
|
constructor() {
|
|
@@ -2549,25 +2768,25 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
|
|
|
2549
2768
|
this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
|
|
2550
2769
|
}
|
|
2551
2770
|
render() {
|
|
2552
|
-
return
|
|
2771
|
+
return html9`<slot></slot>`;
|
|
2553
2772
|
}
|
|
2554
2773
|
};
|
|
2555
|
-
|
|
2774
|
+
__decorate10([
|
|
2556
2775
|
state2(),
|
|
2557
2776
|
provide2({ context: configContext })
|
|
2558
2777
|
], QtiTest.prototype, "configContext", void 0);
|
|
2559
|
-
|
|
2778
|
+
__decorate10([
|
|
2560
2779
|
state2(),
|
|
2561
2780
|
provide2({ context: qtiContext })
|
|
2562
2781
|
], QtiTest.prototype, "qtiContext", void 0);
|
|
2563
2782
|
|
|
2564
2783
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
2565
2784
|
import { consume as consume5 } from "@lit/context";
|
|
2566
|
-
import { css as
|
|
2785
|
+
import { css as css6, html as html10, LitElement as LitElement11 } from "lit";
|
|
2567
2786
|
|
|
2568
2787
|
// ../qti-test/dist/components/styles.js
|
|
2569
|
-
import { css as
|
|
2570
|
-
var form =
|
|
2788
|
+
import { css as css5 } from "lit";
|
|
2789
|
+
var form = css5`
|
|
2571
2790
|
display: inline-flex;
|
|
2572
2791
|
align-items: center;
|
|
2573
2792
|
justify-content: center;
|
|
@@ -2581,39 +2800,39 @@ var form = css3`
|
|
|
2581
2800
|
user-select: none;
|
|
2582
2801
|
border-radius: var(--test-button-border-radius, var(--qti-component-border-radius, 0.2rem));
|
|
2583
2802
|
`;
|
|
2584
|
-
var btn =
|
|
2803
|
+
var btn = css5`
|
|
2585
2804
|
${form};
|
|
2586
2805
|
background-color: var(--test-button-background-color, var(--qti-component-background-color, #fff));
|
|
2587
2806
|
color: var(--test-button-color, var(--qti-component-color, inherit));
|
|
2588
2807
|
border: var(--qti-component-border-width, 1px) var(--qti-component-border-style, solid)
|
|
2589
2808
|
var(--test-button-border-color, var(--qti-component-border-color, #0175aa));
|
|
2590
2809
|
`;
|
|
2591
|
-
var btnInteractive =
|
|
2810
|
+
var btnInteractive = css5`
|
|
2592
2811
|
background-color: var(--test-button-hover-background-color, var(--qti-bg-active, #f2f8fb));
|
|
2593
2812
|
`;
|
|
2594
|
-
var focusRing =
|
|
2813
|
+
var focusRing = css5`
|
|
2595
2814
|
outline: var(--qti-focus-border-width, 2px) solid var(--qti-focus-color, #007ac3);
|
|
2596
2815
|
outline-offset: 2px;
|
|
2597
2816
|
`;
|
|
2598
|
-
var dis =
|
|
2817
|
+
var dis = css5`
|
|
2599
2818
|
cursor: not-allowed;
|
|
2600
2819
|
opacity: 0.45;
|
|
2601
2820
|
`;
|
|
2602
|
-
var ind =
|
|
2821
|
+
var ind = css5`
|
|
2603
2822
|
${form};
|
|
2604
2823
|
border: 1px solid gray;
|
|
2605
2824
|
`;
|
|
2606
2825
|
|
|
2607
2826
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
2608
|
-
var
|
|
2827
|
+
var __decorate11 = function(decorators, target, key, desc) {
|
|
2609
2828
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2610
2829
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2611
2830
|
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;
|
|
2612
2831
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2613
2832
|
};
|
|
2614
|
-
var TestCheckItem = class extends
|
|
2833
|
+
var TestCheckItem = class extends LitElement11 {
|
|
2615
2834
|
static {
|
|
2616
|
-
this.styles =
|
|
2835
|
+
this.styles = css6`
|
|
2617
2836
|
:host {
|
|
2618
2837
|
${btn};
|
|
2619
2838
|
}
|
|
@@ -2642,25 +2861,25 @@ var TestCheckItem = class extends LitElement9 {
|
|
|
2642
2861
|
});
|
|
2643
2862
|
}
|
|
2644
2863
|
render() {
|
|
2645
|
-
return
|
|
2864
|
+
return html10` <slot></slot> `;
|
|
2646
2865
|
}
|
|
2647
2866
|
};
|
|
2648
|
-
|
|
2867
|
+
__decorate11([
|
|
2649
2868
|
consume5({ context: testHostContext, subscribe: true })
|
|
2650
2869
|
], TestCheckItem.prototype, "testHost", void 0);
|
|
2651
2870
|
|
|
2652
2871
|
// ../qti-test/dist/components/test-container/test-container.js
|
|
2653
2872
|
import { consume as consume6 } from "@lit/context";
|
|
2654
|
-
import { LitElement as
|
|
2655
|
-
import { property as
|
|
2873
|
+
import { LitElement as LitElement12, html as html11 } from "lit";
|
|
2874
|
+
import { property as property9, state as state3 } from "lit/decorators.js";
|
|
2656
2875
|
import { until } from "lit/directives/until.js";
|
|
2657
|
-
var
|
|
2876
|
+
var __decorate12 = function(decorators, target, key, desc) {
|
|
2658
2877
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2659
2878
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2660
2879
|
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;
|
|
2661
2880
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2662
2881
|
};
|
|
2663
|
-
var TestContainer = class extends
|
|
2882
|
+
var TestContainer = class extends LitElement12 {
|
|
2664
2883
|
constructor() {
|
|
2665
2884
|
super(...arguments);
|
|
2666
2885
|
this.customElementRegistry = null;
|
|
@@ -2745,7 +2964,7 @@ var TestContainer = class extends LitElement10 {
|
|
|
2745
2964
|
}
|
|
2746
2965
|
#initializeTemplateContent() {
|
|
2747
2966
|
const template = this.querySelector("template");
|
|
2748
|
-
this.#templateContent = template ? template.content :
|
|
2967
|
+
this.#templateContent = template ? template.content : html11``;
|
|
2749
2968
|
}
|
|
2750
2969
|
#applyStyles() {
|
|
2751
2970
|
const sheet = new CSSStyleSheet();
|
|
@@ -2753,57 +2972,57 @@ var TestContainer = class extends LitElement10 {
|
|
|
2753
2972
|
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
2754
2973
|
}
|
|
2755
2974
|
render() {
|
|
2756
|
-
return
|
|
2975
|
+
return html11`
|
|
2757
2976
|
${this.#templateContent}
|
|
2758
2977
|
<slot></slot>
|
|
2759
|
-
${until(this.testDoc,
|
|
2978
|
+
${until(this.testDoc, html11`<span>Loading...</span>`)}
|
|
2760
2979
|
`;
|
|
2761
2980
|
}
|
|
2762
2981
|
};
|
|
2763
|
-
|
|
2764
|
-
|
|
2982
|
+
__decorate12([
|
|
2983
|
+
property9({ attribute: false })
|
|
2765
2984
|
], TestContainer.prototype, "customElementRegistry", void 0);
|
|
2766
|
-
|
|
2767
|
-
|
|
2985
|
+
__decorate12([
|
|
2986
|
+
property9({ type: String, attribute: "test-url" })
|
|
2768
2987
|
], TestContainer.prototype, "testURL", void 0);
|
|
2769
|
-
|
|
2988
|
+
__decorate12([
|
|
2770
2989
|
state3()
|
|
2771
2990
|
], TestContainer.prototype, "testDoc", void 0);
|
|
2772
|
-
|
|
2991
|
+
__decorate12([
|
|
2773
2992
|
state3()
|
|
2774
2993
|
], TestContainer.prototype, "testXML", void 0);
|
|
2775
|
-
|
|
2994
|
+
__decorate12([
|
|
2776
2995
|
consume6({ context: testHostContext, subscribe: true })
|
|
2777
2996
|
], TestContainer.prototype, "testHost", void 0);
|
|
2778
|
-
|
|
2997
|
+
__decorate12([
|
|
2779
2998
|
state3(),
|
|
2780
2999
|
consume6({ context: qtiContext, subscribe: true })
|
|
2781
3000
|
], TestContainer.prototype, "qtiContext", void 0);
|
|
2782
|
-
|
|
3001
|
+
__decorate12([
|
|
2783
3002
|
watch("testURL", { waitUntilFirstUpdate: true })
|
|
2784
3003
|
], TestContainer.prototype, "handleTestURLChange", null);
|
|
2785
|
-
|
|
3004
|
+
__decorate12([
|
|
2786
3005
|
watch("testXML", { waitUntilFirstUpdate: true })
|
|
2787
3006
|
], TestContainer.prototype, "handleTestXMLChange", null);
|
|
2788
3007
|
|
|
2789
3008
|
// ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
|
|
2790
|
-
import { css as
|
|
2791
|
-
import { property as
|
|
3009
|
+
import { css as css7, html as html12, LitElement as LitElement13 } from "lit";
|
|
3010
|
+
import { property as property10 } from "lit/decorators.js";
|
|
2792
3011
|
import { consume as consume7 } from "@lit/context";
|
|
2793
|
-
var
|
|
3012
|
+
var __decorate13 = function(decorators, target, key, desc) {
|
|
2794
3013
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2795
3014
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2796
3015
|
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;
|
|
2797
3016
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2798
3017
|
};
|
|
2799
|
-
var TestEndAttempt = class extends
|
|
3018
|
+
var TestEndAttempt = class extends LitElement13 {
|
|
2800
3019
|
_handleTestElementChange(_oldValue, newValue) {
|
|
2801
3020
|
if (newValue) {
|
|
2802
3021
|
this.requestUpdate();
|
|
2803
3022
|
}
|
|
2804
3023
|
}
|
|
2805
3024
|
static {
|
|
2806
|
-
this.styles =
|
|
3025
|
+
this.styles = css7`
|
|
2807
3026
|
:host {
|
|
2808
3027
|
${btn};
|
|
2809
3028
|
}
|
|
@@ -2859,32 +3078,32 @@ var TestEndAttempt = class extends LitElement11 {
|
|
|
2859
3078
|
}
|
|
2860
3079
|
}
|
|
2861
3080
|
render() {
|
|
2862
|
-
return
|
|
3081
|
+
return html12` <slot></slot> `;
|
|
2863
3082
|
}
|
|
2864
3083
|
};
|
|
2865
|
-
|
|
3084
|
+
__decorate13([
|
|
2866
3085
|
consume7({ context: computedContext, subscribe: true }),
|
|
2867
|
-
|
|
3086
|
+
property10({ attribute: false })
|
|
2868
3087
|
], TestEndAttempt.prototype, "computedContext", void 0);
|
|
2869
|
-
|
|
2870
|
-
|
|
3088
|
+
__decorate13([
|
|
3089
|
+
property10({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
2871
3090
|
], TestEndAttempt.prototype, "_internalDisabled", void 0);
|
|
2872
|
-
|
|
3091
|
+
__decorate13([
|
|
2873
3092
|
watch("computedContext")
|
|
2874
3093
|
], TestEndAttempt.prototype, "_handleTestElementChange", null);
|
|
2875
3094
|
|
|
2876
3095
|
// ../qti-test/dist/components/test-item-link/test-item-link.js
|
|
2877
|
-
import { css as
|
|
2878
|
-
import { property as
|
|
2879
|
-
var
|
|
3096
|
+
import { css as css8, html as html13, LitElement as LitElement14 } from "lit";
|
|
3097
|
+
import { property as property11 } from "lit/decorators.js";
|
|
3098
|
+
var __decorate14 = function(decorators, target, key, desc) {
|
|
2880
3099
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2881
3100
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2882
3101
|
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;
|
|
2883
3102
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2884
3103
|
};
|
|
2885
|
-
var TestItemLink = class extends
|
|
3104
|
+
var TestItemLink = class extends LitElement14 {
|
|
2886
3105
|
static {
|
|
2887
|
-
this.styles =
|
|
3106
|
+
this.styles = css8`
|
|
2888
3107
|
:host {
|
|
2889
3108
|
${btn};
|
|
2890
3109
|
}
|
|
@@ -2908,19 +3127,19 @@ var TestItemLink = class extends LitElement12 {
|
|
|
2908
3127
|
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
2909
3128
|
}
|
|
2910
3129
|
render() {
|
|
2911
|
-
return
|
|
3130
|
+
return html13` <slot></slot> `;
|
|
2912
3131
|
}
|
|
2913
3132
|
};
|
|
2914
|
-
|
|
2915
|
-
|
|
3133
|
+
__decorate14([
|
|
3134
|
+
property11({ type: String, attribute: "item-id" })
|
|
2916
3135
|
], TestItemLink.prototype, "itemId", void 0);
|
|
2917
3136
|
|
|
2918
3137
|
// ../qti-test/dist/components/test-item-to-speech/test-item-to-speech.js
|
|
2919
|
-
import { html as
|
|
3138
|
+
import { html as html14, LitElement as LitElement15, css as css9 } from "lit";
|
|
2920
3139
|
import { consume as consume8, provide as provide3, createContext as createContext2 } from "@lit/context";
|
|
2921
|
-
import { property as
|
|
3140
|
+
import { property as property12, state as state4 } from "lit/decorators.js";
|
|
2922
3141
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
2923
|
-
var
|
|
3142
|
+
var __decorate15 = function(decorators, target, key, desc) {
|
|
2924
3143
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2925
3144
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2926
3145
|
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;
|
|
@@ -2949,14 +3168,14 @@ var ICONS = {
|
|
|
2949
3168
|
pick: "M5 3l13 7-5.5 1.6 3.4 6.6-2.4 1.3-3.4-6.7L6 17z"
|
|
2950
3169
|
};
|
|
2951
3170
|
var iconContent = (icon, label) => {
|
|
2952
|
-
const svg =
|
|
3171
|
+
const svg = html14`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
2953
3172
|
<path d="${ICONS[icon]}"></path>
|
|
2954
3173
|
</svg>`;
|
|
2955
|
-
return
|
|
3174
|
+
return html14`${svg}<span class="label">${label}</span>`;
|
|
2956
3175
|
};
|
|
2957
|
-
var TtsButtonBase = class extends
|
|
3176
|
+
var TtsButtonBase = class extends LitElement15 {
|
|
2958
3177
|
static {
|
|
2959
|
-
this.styles =
|
|
3178
|
+
this.styles = css9`
|
|
2960
3179
|
:host {
|
|
2961
3180
|
display: inline-flex;
|
|
2962
3181
|
}
|
|
@@ -3020,15 +3239,15 @@ var TtsButtonBase = class extends LitElement13 {
|
|
|
3020
3239
|
this.#internals.states.add("picking");
|
|
3021
3240
|
}
|
|
3022
3241
|
};
|
|
3023
|
-
|
|
3024
|
-
|
|
3242
|
+
__decorate15([
|
|
3243
|
+
property12({ type: String })
|
|
3025
3244
|
], TtsButtonBase.prototype, "label", void 0);
|
|
3026
|
-
|
|
3245
|
+
__decorate15([
|
|
3027
3246
|
consume8({ context: ttsContext, subscribe: true })
|
|
3028
3247
|
], TtsButtonBase.prototype, "_tts", void 0);
|
|
3029
|
-
var TestItemToSpeech = class extends
|
|
3248
|
+
var TestItemToSpeech = class extends LitElement15 {
|
|
3030
3249
|
static {
|
|
3031
|
-
this.styles =
|
|
3250
|
+
this.styles = css9`
|
|
3032
3251
|
:host {
|
|
3033
3252
|
display: inline-flex;
|
|
3034
3253
|
flex-wrap: wrap;
|
|
@@ -3181,7 +3400,7 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3181
3400
|
this.#contentMode = false;
|
|
3182
3401
|
}
|
|
3183
3402
|
render() {
|
|
3184
|
-
return
|
|
3403
|
+
return html14`<slot></slot>`;
|
|
3185
3404
|
}
|
|
3186
3405
|
/**
|
|
3187
3406
|
* An item (re)rendered. If it is ours — e.g. after navigating to the item already shown — the
|
|
@@ -3618,16 +3837,16 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3618
3837
|
}
|
|
3619
3838
|
}
|
|
3620
3839
|
};
|
|
3621
|
-
|
|
3622
|
-
|
|
3840
|
+
__decorate15([
|
|
3841
|
+
property12({ type: String })
|
|
3623
3842
|
], TestItemToSpeech.prototype, "language", void 0);
|
|
3624
|
-
|
|
3843
|
+
__decorate15([
|
|
3625
3844
|
consume8({ context: sessionContext, subscribe: true })
|
|
3626
3845
|
], TestItemToSpeech.prototype, "_sessionContext", void 0);
|
|
3627
|
-
|
|
3846
|
+
__decorate15([
|
|
3628
3847
|
consume8({ context: testHostContext, subscribe: true })
|
|
3629
3848
|
], TestItemToSpeech.prototype, "testHost", void 0);
|
|
3630
|
-
|
|
3849
|
+
__decorate15([
|
|
3631
3850
|
state4(),
|
|
3632
3851
|
provide3({ context: ttsContext })
|
|
3633
3852
|
], TestItemToSpeech.prototype, "_ttsContext", void 0);
|
|
@@ -3644,19 +3863,19 @@ var TestTtsPlay = class extends TtsButtonBase {
|
|
|
3644
3863
|
}
|
|
3645
3864
|
render() {
|
|
3646
3865
|
const playing = this._tts?.state === "playing";
|
|
3647
|
-
return
|
|
3866
|
+
return html14`
|
|
3648
3867
|
<button part="button" aria-label=${ifDefined(playing ? this.pauseLabel : this.label)} @click=${this.#toggle}>
|
|
3649
|
-
${playing ?
|
|
3868
|
+
${playing ? html14`<slot name="pause">${iconContent("pause", this.pauseLabel ?? "Pause")}</slot>` : html14`<slot name="play">${iconContent("play", this.label ?? "Play")}</slot>`}
|
|
3650
3869
|
</button>
|
|
3651
3870
|
`;
|
|
3652
3871
|
}
|
|
3653
3872
|
};
|
|
3654
|
-
|
|
3655
|
-
|
|
3873
|
+
__decorate15([
|
|
3874
|
+
property12({ type: String, attribute: "pause-label" })
|
|
3656
3875
|
], TestTtsPlay.prototype, "pauseLabel", void 0);
|
|
3657
3876
|
var TestTtsPause = class extends TtsButtonBase {
|
|
3658
3877
|
render() {
|
|
3659
|
-
return
|
|
3878
|
+
return html14`
|
|
3660
3879
|
<button
|
|
3661
3880
|
part="button"
|
|
3662
3881
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3670,7 +3889,7 @@ var TestTtsPause = class extends TtsButtonBase {
|
|
|
3670
3889
|
};
|
|
3671
3890
|
var TestTtsResume = class extends TtsButtonBase {
|
|
3672
3891
|
render() {
|
|
3673
|
-
return
|
|
3892
|
+
return html14`
|
|
3674
3893
|
<button
|
|
3675
3894
|
part="button"
|
|
3676
3895
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3685,7 +3904,7 @@ var TestTtsResume = class extends TtsButtonBase {
|
|
|
3685
3904
|
var TestTtsStop = class extends TtsButtonBase {
|
|
3686
3905
|
render() {
|
|
3687
3906
|
const idle = this._tts?.state === "idle" && !this._tts?.picking;
|
|
3688
|
-
return
|
|
3907
|
+
return html14`
|
|
3689
3908
|
<button part="button" aria-label=${ifDefined(this.label)} ?disabled=${idle} @click=${() => this._tts?.stop()}>
|
|
3690
3909
|
<slot>${iconContent("stop", this.label ?? "Stop")}</slot>
|
|
3691
3910
|
</button>
|
|
@@ -3696,7 +3915,7 @@ var TestTtsPrev = class extends TtsButtonBase {
|
|
|
3696
3915
|
render() {
|
|
3697
3916
|
const collected = (this._tts?.elementCount ?? 0) > 0;
|
|
3698
3917
|
const atStart = (this._tts?.currentElementIndex ?? 0) === 0;
|
|
3699
|
-
return
|
|
3918
|
+
return html14`
|
|
3700
3919
|
<button
|
|
3701
3920
|
part="button"
|
|
3702
3921
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3712,7 +3931,7 @@ var TestTtsNext = class extends TtsButtonBase {
|
|
|
3712
3931
|
render() {
|
|
3713
3932
|
const count = this._tts?.elementCount ?? 0;
|
|
3714
3933
|
const atEnd = count > 0 && (this._tts?.currentElementIndex ?? 0) >= count - 1;
|
|
3715
|
-
return
|
|
3934
|
+
return html14`
|
|
3716
3935
|
<button
|
|
3717
3936
|
part="button"
|
|
3718
3937
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3726,7 +3945,7 @@ var TestTtsNext = class extends TtsButtonBase {
|
|
|
3726
3945
|
};
|
|
3727
3946
|
var TestTtsPick = class extends TtsButtonBase {
|
|
3728
3947
|
render() {
|
|
3729
|
-
return
|
|
3948
|
+
return html14`
|
|
3730
3949
|
<button
|
|
3731
3950
|
part="button"
|
|
3732
3951
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3741,9 +3960,9 @@ var TestTtsPick = class extends TtsButtonBase {
|
|
|
3741
3960
|
|
|
3742
3961
|
// ../qti-test/dist/components/test-navigation/test-navigation.js
|
|
3743
3962
|
import { ContextConsumer, consume as consume9, provide as provide4 } from "@lit/context";
|
|
3744
|
-
import { html as
|
|
3745
|
-
import { property as
|
|
3746
|
-
var
|
|
3963
|
+
import { html as html15, LitElement as LitElement16 } from "lit";
|
|
3964
|
+
import { property as property13, state as state5 } from "lit/decorators.js";
|
|
3965
|
+
var __decorate16 = function(decorators, target, key, desc) {
|
|
3747
3966
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3748
3967
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3749
3968
|
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;
|
|
@@ -3752,7 +3971,7 @@ var __decorate15 = function(decorators, target, key, desc) {
|
|
|
3752
3971
|
var newQtiContext = () => ({
|
|
3753
3972
|
QTI_CONTEXT: { testIdentifier: "", candidateIdentifier: "", environmentIdentifier: "default" }
|
|
3754
3973
|
});
|
|
3755
|
-
var TestNavigation = class extends
|
|
3974
|
+
var TestNavigation = class extends LitElement16 {
|
|
3756
3975
|
/**
|
|
3757
3976
|
* @deprecated Set `qtiContext` on `qti-test`, which provides it. This is an alias for the
|
|
3758
3977
|
* enclosing test's: reading returns it, writing replaces it, so a host that has always set the
|
|
@@ -3898,7 +4117,7 @@ var TestNavigation = class extends LitElement14 {
|
|
|
3898
4117
|
}
|
|
3899
4118
|
}
|
|
3900
4119
|
render() {
|
|
3901
|
-
return
|
|
4120
|
+
return html15`<slot></slot>`;
|
|
3902
4121
|
}
|
|
3903
4122
|
/* PK: on test connected we can build the computed context */
|
|
3904
4123
|
#handleTestConnected(event) {
|
|
@@ -4253,50 +4472,50 @@ var TestNavigation = class extends LitElement14 {
|
|
|
4253
4472
|
return Number.isNaN(parsed) ? null : parsed;
|
|
4254
4473
|
}
|
|
4255
4474
|
};
|
|
4256
|
-
|
|
4257
|
-
|
|
4475
|
+
__decorate16([
|
|
4476
|
+
property13({ type: String })
|
|
4258
4477
|
], TestNavigation.prototype, "identifier", void 0);
|
|
4259
|
-
|
|
4478
|
+
__decorate16([
|
|
4260
4479
|
state5()
|
|
4261
4480
|
], TestNavigation.prototype, "initContext", void 0);
|
|
4262
|
-
|
|
4481
|
+
__decorate16([
|
|
4263
4482
|
state5(),
|
|
4264
4483
|
consume9({ context: configContext, subscribe: true })
|
|
4265
4484
|
], TestNavigation.prototype, "configContext", void 0);
|
|
4266
|
-
|
|
4485
|
+
__decorate16([
|
|
4267
4486
|
state5(),
|
|
4268
4487
|
consume9({ context: testContext, subscribe: true })
|
|
4269
4488
|
], TestNavigation.prototype, "_testContext", void 0);
|
|
4270
|
-
|
|
4489
|
+
__decorate16([
|
|
4271
4490
|
state5(),
|
|
4272
4491
|
consume9({ context: sessionContext, subscribe: true })
|
|
4273
4492
|
], TestNavigation.prototype, "_sessionContext", void 0);
|
|
4274
|
-
|
|
4493
|
+
__decorate16([
|
|
4275
4494
|
state5(),
|
|
4276
4495
|
provide4({ context: computedContext })
|
|
4277
4496
|
], TestNavigation.prototype, "computedContext", void 0);
|
|
4278
|
-
|
|
4279
|
-
|
|
4497
|
+
__decorate16([
|
|
4498
|
+
property13({ type: Boolean, attribute: "auto-score-items" })
|
|
4280
4499
|
], TestNavigation.prototype, "autoScoreItems", void 0);
|
|
4281
4500
|
|
|
4282
4501
|
// ../qti-test/dist/components/test-next/test-next.js
|
|
4283
|
-
import { css as
|
|
4284
|
-
import { property as
|
|
4502
|
+
import { css as css10, html as html16, LitElement as LitElement17 } from "lit";
|
|
4503
|
+
import { property as property14 } from "lit/decorators.js";
|
|
4285
4504
|
import { consume as consume10 } from "@lit/context";
|
|
4286
|
-
var
|
|
4505
|
+
var __decorate17 = function(decorators, target, key, desc) {
|
|
4287
4506
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4288
4507
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4289
4508
|
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;
|
|
4290
4509
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4291
4510
|
};
|
|
4292
|
-
var TestNext = class extends
|
|
4511
|
+
var TestNext = class extends LitElement17 {
|
|
4293
4512
|
_handleTestElementChange(_oldValue, newValue) {
|
|
4294
4513
|
if (newValue) {
|
|
4295
4514
|
this.requestUpdate();
|
|
4296
4515
|
}
|
|
4297
4516
|
}
|
|
4298
4517
|
static {
|
|
4299
|
-
this.styles =
|
|
4518
|
+
this.styles = css10`
|
|
4300
4519
|
:host {
|
|
4301
4520
|
${btn};
|
|
4302
4521
|
}
|
|
@@ -4353,29 +4572,29 @@ var TestNext = class extends LitElement15 {
|
|
|
4353
4572
|
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
4354
4573
|
}
|
|
4355
4574
|
render() {
|
|
4356
|
-
return
|
|
4575
|
+
return html16`<slot></slot>`;
|
|
4357
4576
|
}
|
|
4358
4577
|
};
|
|
4359
|
-
|
|
4360
|
-
|
|
4578
|
+
__decorate17([
|
|
4579
|
+
property14({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
4361
4580
|
], TestNext.prototype, "_internalDisabled", void 0);
|
|
4362
|
-
|
|
4581
|
+
__decorate17([
|
|
4363
4582
|
consume10({ context: computedContext, subscribe: true })
|
|
4364
4583
|
], TestNext.prototype, "computedContext", void 0);
|
|
4365
|
-
|
|
4584
|
+
__decorate17([
|
|
4366
4585
|
watch("computedContext")
|
|
4367
4586
|
], TestNext.prototype, "_handleTestElementChange", null);
|
|
4368
4587
|
|
|
4369
4588
|
// ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
|
|
4370
|
-
import { html as
|
|
4589
|
+
import { html as html17, LitElement as LitElement18 } from "lit";
|
|
4371
4590
|
import { consume as consume11 } from "@lit/context";
|
|
4372
|
-
var
|
|
4591
|
+
var __decorate18 = function(decorators, target, key, desc) {
|
|
4373
4592
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4374
4593
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4375
4594
|
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;
|
|
4376
4595
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4377
4596
|
};
|
|
4378
|
-
var TestPagingButtonsStamp = class extends
|
|
4597
|
+
var TestPagingButtonsStamp = class extends LitElement18 {
|
|
4379
4598
|
#internals;
|
|
4380
4599
|
createRenderRoot() {
|
|
4381
4600
|
return this;
|
|
@@ -4392,33 +4611,33 @@ var TestPagingButtonsStamp = class extends LitElement16 {
|
|
|
4392
4611
|
}
|
|
4393
4612
|
render() {
|
|
4394
4613
|
if (!this.computedContext)
|
|
4395
|
-
return
|
|
4614
|
+
return html17``;
|
|
4396
4615
|
const items = this.computedContext.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items));
|
|
4397
|
-
return
|
|
4616
|
+
return html17` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
|
|
4398
4617
|
}
|
|
4399
4618
|
};
|
|
4400
|
-
|
|
4619
|
+
__decorate18([
|
|
4401
4620
|
consume11({ context: computedContext, subscribe: true })
|
|
4402
4621
|
], TestPagingButtonsStamp.prototype, "computedContext", void 0);
|
|
4403
4622
|
|
|
4404
4623
|
// ../qti-test/dist/components/test-prev/test-prev.js
|
|
4405
|
-
import { css as
|
|
4406
|
-
import { property as
|
|
4624
|
+
import { css as css11, html as html18, LitElement as LitElement19 } from "lit";
|
|
4625
|
+
import { property as property15 } from "lit/decorators.js";
|
|
4407
4626
|
import { consume as consume12 } from "@lit/context";
|
|
4408
|
-
var
|
|
4627
|
+
var __decorate19 = function(decorators, target, key, desc) {
|
|
4409
4628
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4410
4629
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4411
4630
|
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;
|
|
4412
4631
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4413
4632
|
};
|
|
4414
|
-
var TestPrev = class extends
|
|
4633
|
+
var TestPrev = class extends LitElement19 {
|
|
4415
4634
|
_handleTestElementChange(_oldValue, newValue) {
|
|
4416
4635
|
if (newValue) {
|
|
4417
4636
|
this.requestUpdate();
|
|
4418
4637
|
}
|
|
4419
4638
|
}
|
|
4420
4639
|
static {
|
|
4421
|
-
this.styles =
|
|
4640
|
+
this.styles = css11`
|
|
4422
4641
|
:host {
|
|
4423
4642
|
${btn};
|
|
4424
4643
|
}
|
|
@@ -4462,51 +4681,51 @@ var TestPrev = class extends LitElement17 {
|
|
|
4462
4681
|
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
4463
4682
|
}
|
|
4464
4683
|
render() {
|
|
4465
|
-
return
|
|
4684
|
+
return html18`<slot></slot>`;
|
|
4466
4685
|
}
|
|
4467
4686
|
};
|
|
4468
|
-
|
|
4469
|
-
|
|
4687
|
+
__decorate19([
|
|
4688
|
+
property15({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
4470
4689
|
], TestPrev.prototype, "_internalDisabled", void 0);
|
|
4471
|
-
|
|
4690
|
+
__decorate19([
|
|
4472
4691
|
consume12({ context: computedContext, subscribe: true })
|
|
4473
4692
|
], TestPrev.prototype, "computedContext", void 0);
|
|
4474
|
-
|
|
4693
|
+
__decorate19([
|
|
4475
4694
|
watch("computedContext")
|
|
4476
4695
|
], TestPrev.prototype, "_handleTestElementChange", null);
|
|
4477
4696
|
|
|
4478
4697
|
// ../qti-test/dist/components/test-print-context/test-print-context.js
|
|
4479
|
-
import { html as
|
|
4698
|
+
import { html as html19, LitElement as LitElement20 } from "lit";
|
|
4480
4699
|
import { consume as consume13 } from "@lit/context";
|
|
4481
4700
|
import { state as state6 } from "lit/decorators.js";
|
|
4482
|
-
var
|
|
4701
|
+
var __decorate20 = function(decorators, target, key, desc) {
|
|
4483
4702
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4484
4703
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4485
4704
|
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;
|
|
4486
4705
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4487
4706
|
};
|
|
4488
|
-
var TestPrintContext = class extends
|
|
4707
|
+
var TestPrintContext = class extends LitElement20 {
|
|
4489
4708
|
render() {
|
|
4490
|
-
return
|
|
4709
|
+
return html19` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
|
|
4491
4710
|
}
|
|
4492
4711
|
};
|
|
4493
|
-
|
|
4712
|
+
__decorate20([
|
|
4494
4713
|
state6(),
|
|
4495
4714
|
consume13({ context: computedContext, subscribe: true })
|
|
4496
4715
|
], TestPrintContext.prototype, "computedContext", void 0);
|
|
4497
4716
|
|
|
4498
4717
|
// ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
|
|
4499
|
-
import { html as
|
|
4718
|
+
import { html as html20, css as css12, LitElement as LitElement21 } from "lit";
|
|
4500
4719
|
import { consume as consume14 } from "@lit/context";
|
|
4501
|
-
var
|
|
4720
|
+
var __decorate21 = function(decorators, target, key, desc) {
|
|
4502
4721
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4503
4722
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4504
4723
|
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;
|
|
4505
4724
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4506
4725
|
};
|
|
4507
|
-
var TestPrintVariables = class extends
|
|
4726
|
+
var TestPrintVariables = class extends LitElement21 {
|
|
4508
4727
|
static {
|
|
4509
|
-
this.styles =
|
|
4728
|
+
this.styles = css12`
|
|
4510
4729
|
table {
|
|
4511
4730
|
width: 100%;
|
|
4512
4731
|
border-collapse: collapse;
|
|
@@ -4532,10 +4751,10 @@ var TestPrintVariables = class extends LitElement19 {
|
|
|
4532
4751
|
render() {
|
|
4533
4752
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
4534
4753
|
if (!activeItem || !activeItem.variables)
|
|
4535
|
-
return
|
|
4754
|
+
return html20``;
|
|
4536
4755
|
const responseVariables = activeItem.variables.filter((v) => v.type === "response");
|
|
4537
4756
|
const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
|
|
4538
|
-
const renderTable = (variables, title) =>
|
|
4757
|
+
const renderTable = (variables, title) => html20`
|
|
4539
4758
|
<h3>${title}</h3>
|
|
4540
4759
|
<table>
|
|
4541
4760
|
<thead>
|
|
@@ -4552,7 +4771,7 @@ var TestPrintVariables = class extends LitElement19 {
|
|
|
4552
4771
|
const correctResponse = v.correctResponse ? Array.isArray(v.correctResponse) ? v.correctResponse.join(", ") : v.correctResponse : "";
|
|
4553
4772
|
const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
|
|
4554
4773
|
const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
|
|
4555
|
-
return
|
|
4774
|
+
return html20`
|
|
4556
4775
|
<tr>
|
|
4557
4776
|
<td>${v.identifier}</td>
|
|
4558
4777
|
<td>${Array.isArray(v.value) ? v.value.join(", ") : v.value}</td>
|
|
@@ -4565,26 +4784,26 @@ var TestPrintVariables = class extends LitElement19 {
|
|
|
4565
4784
|
</tbody>
|
|
4566
4785
|
</table>
|
|
4567
4786
|
`;
|
|
4568
|
-
return
|
|
4787
|
+
return html20`
|
|
4569
4788
|
${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
|
|
4570
4789
|
`;
|
|
4571
4790
|
}
|
|
4572
4791
|
};
|
|
4573
|
-
|
|
4792
|
+
__decorate21([
|
|
4574
4793
|
consume14({ context: computedContext, subscribe: true })
|
|
4575
4794
|
], TestPrintVariables.prototype, "computedContext", void 0);
|
|
4576
4795
|
|
|
4577
4796
|
// ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
|
|
4578
|
-
import { html as
|
|
4797
|
+
import { html as html21, LitElement as LitElement22, nothing as nothing3 } from "lit";
|
|
4579
4798
|
import { consume as consume15 } from "@lit/context";
|
|
4580
|
-
import { property as
|
|
4581
|
-
var
|
|
4799
|
+
import { property as property16 } from "lit/decorators.js";
|
|
4800
|
+
var __decorate22 = function(decorators, target, key, desc) {
|
|
4582
4801
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4583
4802
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4584
4803
|
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;
|
|
4585
4804
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4586
4805
|
};
|
|
4587
|
-
var TestScoringButtons = class extends
|
|
4806
|
+
var TestScoringButtons = class extends LitElement22 {
|
|
4588
4807
|
createRenderRoot() {
|
|
4589
4808
|
return this;
|
|
4590
4809
|
}
|
|
@@ -4610,7 +4829,7 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4610
4829
|
render() {
|
|
4611
4830
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
4612
4831
|
if (!activeItem || !activeItem.variables)
|
|
4613
|
-
return
|
|
4832
|
+
return html21``;
|
|
4614
4833
|
const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
4615
4834
|
const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
|
|
4616
4835
|
const score = scoreOutcome?.value;
|
|
@@ -4618,7 +4837,7 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4618
4837
|
if (!maxScore || !scoreOutcome)
|
|
4619
4838
|
return nothing3;
|
|
4620
4839
|
const scores = [...Array(Number(maxScore) + 1).keys()];
|
|
4621
|
-
return
|
|
4840
|
+
return html21`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing3}`;
|
|
4622
4841
|
}
|
|
4623
4842
|
constructor() {
|
|
4624
4843
|
super();
|
|
@@ -4634,27 +4853,27 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4634
4853
|
});
|
|
4635
4854
|
}
|
|
4636
4855
|
};
|
|
4637
|
-
|
|
4638
|
-
|
|
4856
|
+
__decorate22([
|
|
4857
|
+
property16({ type: String, attribute: "view" })
|
|
4639
4858
|
], TestScoringButtons.prototype, "view", void 0);
|
|
4640
|
-
|
|
4641
|
-
|
|
4859
|
+
__decorate22([
|
|
4860
|
+
property16({ type: Boolean })
|
|
4642
4861
|
], TestScoringButtons.prototype, "disabled", void 0);
|
|
4643
|
-
|
|
4862
|
+
__decorate22([
|
|
4644
4863
|
consume15({ context: computedContext, subscribe: true })
|
|
4645
4864
|
], TestScoringButtons.prototype, "computedContext", void 0);
|
|
4646
4865
|
|
|
4647
4866
|
// ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
|
|
4648
4867
|
import { consume as consume16 } from "@lit/context";
|
|
4649
|
-
import { html as
|
|
4650
|
-
import { property as
|
|
4651
|
-
var
|
|
4868
|
+
import { html as html22, LitElement as LitElement23 } from "lit";
|
|
4869
|
+
import { property as property17 } from "lit/decorators.js";
|
|
4870
|
+
var __decorate23 = function(decorators, target, key, desc) {
|
|
4652
4871
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4653
4872
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4654
4873
|
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;
|
|
4655
4874
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4656
4875
|
};
|
|
4657
|
-
var TestScoringFeedback = class extends
|
|
4876
|
+
var TestScoringFeedback = class extends LitElement23 {
|
|
4658
4877
|
constructor() {
|
|
4659
4878
|
super(...arguments);
|
|
4660
4879
|
this.view = null;
|
|
@@ -4662,9 +4881,9 @@ var TestScoringFeedback = class extends LitElement21 {
|
|
|
4662
4881
|
render() {
|
|
4663
4882
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
4664
4883
|
if (!activeItem || !activeItem.variables)
|
|
4665
|
-
return
|
|
4884
|
+
return html22``;
|
|
4666
4885
|
if (activeItem["category"] === "dep-informational")
|
|
4667
|
-
return
|
|
4886
|
+
return html22`<div>${this.dataset.informational}</div>`;
|
|
4668
4887
|
const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
|
|
4669
4888
|
const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
|
|
4670
4889
|
const score = parseFloat(scoreOutcome?.value);
|
|
@@ -4684,26 +4903,26 @@ var TestScoringFeedback = class extends LitElement21 {
|
|
|
4684
4903
|
}
|
|
4685
4904
|
return this.dataset.inProgress;
|
|
4686
4905
|
};
|
|
4687
|
-
return
|
|
4906
|
+
return html22`<div>${feedbackText()}</div>`;
|
|
4688
4907
|
}
|
|
4689
4908
|
};
|
|
4690
|
-
|
|
4909
|
+
__decorate23([
|
|
4691
4910
|
consume16({ context: computedContext, subscribe: true })
|
|
4692
4911
|
], TestScoringFeedback.prototype, "computedContext", void 0);
|
|
4693
|
-
|
|
4694
|
-
|
|
4912
|
+
__decorate23([
|
|
4913
|
+
property17({ type: String, attribute: "view" })
|
|
4695
4914
|
], TestScoringFeedback.prototype, "view", void 0);
|
|
4696
4915
|
|
|
4697
4916
|
// ../qti-test/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js
|
|
4698
|
-
import { html as
|
|
4917
|
+
import { html as html23, LitElement as LitElement24 } from "lit";
|
|
4699
4918
|
import { consume as consume17 } from "@lit/context";
|
|
4700
|
-
var
|
|
4919
|
+
var __decorate24 = function(decorators, target, key, desc) {
|
|
4701
4920
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4702
4921
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4703
4922
|
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;
|
|
4704
4923
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4705
4924
|
};
|
|
4706
|
-
var TestSectionButtonsStamp = class extends
|
|
4925
|
+
var TestSectionButtonsStamp = class extends LitElement24 {
|
|
4707
4926
|
#internals;
|
|
4708
4927
|
createRenderRoot() {
|
|
4709
4928
|
return this;
|
|
@@ -4720,27 +4939,27 @@ var TestSectionButtonsStamp = class extends LitElement22 {
|
|
|
4720
4939
|
}
|
|
4721
4940
|
render() {
|
|
4722
4941
|
if (!this.computedContext)
|
|
4723
|
-
return
|
|
4942
|
+
return html23``;
|
|
4724
4943
|
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
4725
|
-
return
|
|
4944
|
+
return html23` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
4726
4945
|
}
|
|
4727
4946
|
};
|
|
4728
|
-
|
|
4947
|
+
__decorate24([
|
|
4729
4948
|
consume17({ context: computedContext, subscribe: true })
|
|
4730
4949
|
], TestSectionButtonsStamp.prototype, "computedContext", void 0);
|
|
4731
4950
|
|
|
4732
4951
|
// ../qti-test/dist/components/test-section-link/test-section-link.js
|
|
4733
|
-
import { css as
|
|
4734
|
-
import { property as
|
|
4735
|
-
var
|
|
4952
|
+
import { css as css13, html as html24, LitElement as LitElement25 } from "lit";
|
|
4953
|
+
import { property as property18 } from "lit/decorators.js";
|
|
4954
|
+
var __decorate25 = function(decorators, target, key, desc) {
|
|
4736
4955
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4737
4956
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4738
4957
|
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;
|
|
4739
4958
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4740
4959
|
};
|
|
4741
|
-
var TestSectionLink = class extends
|
|
4960
|
+
var TestSectionLink = class extends LitElement25 {
|
|
4742
4961
|
static {
|
|
4743
|
-
this.styles =
|
|
4962
|
+
this.styles = css13`
|
|
4744
4963
|
:host {
|
|
4745
4964
|
${btn};
|
|
4746
4965
|
}
|
|
@@ -4764,24 +4983,24 @@ var TestSectionLink = class extends LitElement23 {
|
|
|
4764
4983
|
this.addEventListener("click", () => this.#requestItem(this.sectionId));
|
|
4765
4984
|
}
|
|
4766
4985
|
render() {
|
|
4767
|
-
return
|
|
4986
|
+
return html24` <slot></slot> `;
|
|
4768
4987
|
}
|
|
4769
4988
|
};
|
|
4770
|
-
|
|
4771
|
-
|
|
4989
|
+
__decorate25([
|
|
4990
|
+
property18({ type: String, attribute: "section-id" })
|
|
4772
4991
|
], TestSectionLink.prototype, "sectionId", void 0);
|
|
4773
4992
|
|
|
4774
4993
|
// ../qti-test/dist/components/test-stamp/test-stamp.js
|
|
4775
|
-
import { html as
|
|
4776
|
-
import { property as
|
|
4994
|
+
import { html as html25, LitElement as LitElement26, nothing as nothing4 } from "lit";
|
|
4995
|
+
import { property as property19, state as state7 } from "lit/decorators.js";
|
|
4777
4996
|
import { consume as consume18 } from "@lit/context";
|
|
4778
|
-
var
|
|
4997
|
+
var __decorate26 = function(decorators, target, key, desc) {
|
|
4779
4998
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4780
4999
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4781
5000
|
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;
|
|
4782
5001
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4783
5002
|
};
|
|
4784
|
-
var TestStamp = class extends
|
|
5003
|
+
var TestStamp = class extends LitElement26 {
|
|
4785
5004
|
constructor() {
|
|
4786
5005
|
super(...arguments);
|
|
4787
5006
|
this.debug = false;
|
|
@@ -4844,33 +5063,33 @@ var TestStamp = class extends LitElement24 {
|
|
|
4844
5063
|
}));
|
|
4845
5064
|
}
|
|
4846
5065
|
render() {
|
|
4847
|
-
return
|
|
5066
|
+
return html25` ${this.debug ? html25`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing4}
|
|
4848
5067
|
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing4}`;
|
|
4849
5068
|
}
|
|
4850
5069
|
};
|
|
4851
|
-
|
|
4852
|
-
|
|
5070
|
+
__decorate26([
|
|
5071
|
+
property19({ type: Boolean, reflect: true })
|
|
4853
5072
|
], TestStamp.prototype, "debug", void 0);
|
|
4854
|
-
|
|
5073
|
+
__decorate26([
|
|
4855
5074
|
state7(),
|
|
4856
5075
|
consume18({ context: computedContext, subscribe: true })
|
|
4857
5076
|
], TestStamp.prototype, "computedContext", void 0);
|
|
4858
|
-
|
|
5077
|
+
__decorate26([
|
|
4859
5078
|
state7()
|
|
4860
5079
|
], TestStamp.prototype, "stampContext", void 0);
|
|
4861
5080
|
|
|
4862
5081
|
// ../qti-test/dist/components/test-view-toggle/test-view.js
|
|
4863
|
-
import { html as
|
|
4864
|
-
import { property as
|
|
5082
|
+
import { html as html26, LitElement as LitElement27 } from "lit";
|
|
5083
|
+
import { property as property20, state as state8 } from "lit/decorators.js";
|
|
4865
5084
|
import { consume as consume19 } from "@lit/context";
|
|
4866
|
-
var
|
|
5085
|
+
var __decorate27 = function(decorators, target, key, desc) {
|
|
4867
5086
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4868
5087
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4869
5088
|
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;
|
|
4870
5089
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4871
5090
|
};
|
|
4872
5091
|
var _a;
|
|
4873
|
-
var TestView = class extends
|
|
5092
|
+
var TestView = class extends LitElement27 {
|
|
4874
5093
|
constructor() {
|
|
4875
5094
|
super(...arguments);
|
|
4876
5095
|
this.label = "view";
|
|
@@ -4898,7 +5117,7 @@ var TestView = class extends LitElement25 {
|
|
|
4898
5117
|
dispatchPublic(this, "cito-test-switch-view", view);
|
|
4899
5118
|
}
|
|
4900
5119
|
render() {
|
|
4901
|
-
return
|
|
5120
|
+
return html26`
|
|
4902
5121
|
<label part="label" for="viewSelect">${this.label}</label>
|
|
4903
5122
|
<select
|
|
4904
5123
|
part="select"
|
|
@@ -4908,38 +5127,38 @@ var TestView = class extends LitElement25 {
|
|
|
4908
5127
|
this._switchView(el.value);
|
|
4909
5128
|
}}
|
|
4910
5129
|
>
|
|
4911
|
-
${this._viewOptions.map((v) =>
|
|
5130
|
+
${this._viewOptions.map((v) => html26`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
|
|
4912
5131
|
</select>
|
|
4913
5132
|
`;
|
|
4914
5133
|
}
|
|
4915
5134
|
};
|
|
4916
5135
|
_a = TestView;
|
|
4917
|
-
|
|
5136
|
+
__decorate27([
|
|
4918
5137
|
consume19({ context: sessionContext, subscribe: true })
|
|
4919
5138
|
], TestView.prototype, "sessionContext", void 0);
|
|
4920
|
-
|
|
4921
|
-
|
|
5139
|
+
__decorate27([
|
|
5140
|
+
property20({ type: String })
|
|
4922
5141
|
], TestView.prototype, "label", void 0);
|
|
4923
|
-
|
|
4924
|
-
|
|
5142
|
+
__decorate27([
|
|
5143
|
+
property20({ type: String, attribute: "view-options" })
|
|
4925
5144
|
], TestView.prototype, "viewOptions", void 0);
|
|
4926
|
-
|
|
5145
|
+
__decorate27([
|
|
4927
5146
|
watch("viewOptions", { waitUntilFirstUpdate: true })
|
|
4928
5147
|
], TestView.prototype, "_handleViewOptionsChange", void 0);
|
|
4929
|
-
|
|
5148
|
+
__decorate27([
|
|
4930
5149
|
state8()
|
|
4931
5150
|
], TestView.prototype, "_viewOptions", void 0);
|
|
4932
5151
|
|
|
4933
5152
|
// ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
|
|
4934
5153
|
import { consume as consume20 } from "@lit/context";
|
|
4935
|
-
import { html as
|
|
4936
|
-
var
|
|
5154
|
+
import { html as html27, LitElement as LitElement28, nothing as nothing5 } from "lit";
|
|
5155
|
+
var __decorate28 = function(decorators, target, key, desc) {
|
|
4937
5156
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4938
5157
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4939
5158
|
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;
|
|
4940
5159
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4941
5160
|
};
|
|
4942
|
-
var TestViewToggle = class extends
|
|
5161
|
+
var TestViewToggle = class extends LitElement28 {
|
|
4943
5162
|
createRenderRoot() {
|
|
4944
5163
|
return this;
|
|
4945
5164
|
}
|
|
@@ -4965,12 +5184,12 @@ var TestViewToggle = class extends LitElement26 {
|
|
|
4965
5184
|
});
|
|
4966
5185
|
}
|
|
4967
5186
|
render() {
|
|
4968
|
-
return
|
|
5187
|
+
return html27`${this.myTemplate ? this.myTemplate({
|
|
4969
5188
|
view: this.sessionContext?.view
|
|
4970
5189
|
}) : nothing5}`;
|
|
4971
5190
|
}
|
|
4972
5191
|
};
|
|
4973
|
-
|
|
5192
|
+
__decorate28([
|
|
4974
5193
|
consume20({ context: sessionContext, subscribe: true })
|
|
4975
5194
|
], TestViewToggle.prototype, "sessionContext", void 0);
|
|
4976
5195
|
|
|
@@ -4979,9 +5198,11 @@ var qtiTestElements = [
|
|
|
4979
5198
|
{ tag: "qti-assessment-item-ref", ctor: QtiAssessmentItemRef },
|
|
4980
5199
|
{ tag: "qti-assessment-section", ctor: QtiAssessmentSection },
|
|
4981
5200
|
{ tag: "qti-assessment-test", ctor: QtiAssessmentTest },
|
|
5201
|
+
{ tag: "qti-branch-rule", ctor: QtiBranchRule },
|
|
4982
5202
|
{ tag: "qti-item-session-control", ctor: QtiItemSessionControl },
|
|
4983
5203
|
{ tag: "qti-number-selected", ctor: QtiNumberSelected },
|
|
4984
5204
|
{ tag: "qti-outcome-processing", ctor: QtiOutcomeProcessing },
|
|
5205
|
+
{ tag: "qti-pre-condition", ctor: QtiPreCondition },
|
|
4985
5206
|
{ tag: "qti-test", ctor: QtiTest },
|
|
4986
5207
|
{ tag: "qti-test-feedback", ctor: QtiTestFeedback },
|
|
4987
5208
|
{ tag: "qti-test-part", ctor: QtiTestPart },
|
|
@@ -5017,8 +5238,10 @@ export {
|
|
|
5017
5238
|
QtiAssessmentItemRef,
|
|
5018
5239
|
QtiAssessmentSection,
|
|
5019
5240
|
QtiAssessmentTest,
|
|
5241
|
+
QtiBranchRule,
|
|
5020
5242
|
QtiItemSessionControl,
|
|
5021
5243
|
QtiNumberSelected,
|
|
5244
|
+
QtiPreCondition,
|
|
5022
5245
|
QtiOutcomeProcessing,
|
|
5023
5246
|
QtiOutcomeProcessingProcessor,
|
|
5024
5247
|
QtiTestFeedback,
|
|
@@ -5067,4 +5290,4 @@ export {
|
|
|
5067
5290
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
5068
5291
|
*)
|
|
5069
5292
|
*/
|
|
5070
|
-
//# sourceMappingURL=chunk-
|
|
5293
|
+
//# sourceMappingURL=chunk-CKJ7M7JQ.js.map
|