@citolab/qti-components 9.4.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 +290 -243
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -1
- package/dist/{chunk-C3JPUV36.js → chunk-35WWWFS6.js} +2 -2
- package/dist/{chunk-3BAQWO5C.js → chunk-6K3QWJHH.js} +2 -2
- package/dist/{chunk-XEWGFAS4.js → chunk-6U3YPHXU.js} +67 -27
- package/dist/chunk-6U3YPHXU.js.map +1 -0
- package/dist/{chunk-GNTO3IFM.js → chunk-CKJ7M7JQ.js} +571 -375
- package/dist/chunk-CKJ7M7JQ.js.map +1 -0
- package/dist/{chunk-BMXG7D2N.js → chunk-FD4AB6TM.js} +2 -2
- package/dist/{chunk-LKHRHFXO.js → chunk-FWR6HZQS.js} +6 -6
- package/dist/{chunk-B5XHZI2P.js → chunk-GBZNFSFY.js} +2 -2
- package/dist/{chunk-ACRN7YJM.js → chunk-MI7774NV.js} +2 -2
- package/dist/{chunk-MSGYZE6L.js → chunk-RSMYGGQK.js} +128 -48
- package/dist/chunk-RSMYGGQK.js.map +1 -0
- package/dist/{chunk-B74SYQB2.js → chunk-RU6332MD.js} +3 -3
- package/dist/{chunk-R7MMMDP7.js → chunk-TDWJ6WZA.js} +20 -2
- package/dist/chunk-TDWJ6WZA.js.map +1 -0
- package/dist/{chunk-JHPQJDAV.js → chunk-YYIS6FDP.js} +2 -2
- package/dist/chunk-ZP6QQYSU.js +7 -0
- package/dist/chunk-ZP6QQYSU.js.map +1 -0
- package/dist/corrections.d.ts +3 -3
- package/dist/corrections.js +8 -8
- package/dist/elements.d.ts +64 -2
- package/dist/elements.js +15 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +28 -14
- package/dist/interactions.d.ts +2 -2
- package/dist/interactions.js +3 -3
- package/dist/item.css +11 -0
- package/dist/item.js +4 -4
- package/dist/loader.d.ts +1 -1
- package/dist/processing.d.ts +2 -2
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +138 -191
- 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-Cud5Gvy0.d.ts → qti-test.d-DkpBNcsv.d.ts} +67 -9
- package/dist/{qti-text-entry-interaction.d-DKvz9ncv.d.ts → qti-text-entry-interaction.d-q8u5BiVK.d.ts} +11 -2
- package/dist/test.d.ts +3 -3
- package/dist/test.js +9 -5
- package/package.json +10 -10
- package/dist/chunk-A32YH4H5.js +0 -7
- package/dist/chunk-A32YH4H5.js.map +0 -1
- package/dist/chunk-GNTO3IFM.js.map +0 -1
- package/dist/chunk-MSGYZE6L.js.map +0 -1
- package/dist/chunk-R7MMMDP7.js.map +0 -1
- package/dist/chunk-XEWGFAS4.js.map +0 -1
- /package/dist/{chunk-C3JPUV36.js.map → chunk-35WWWFS6.js.map} +0 -0
- /package/dist/{chunk-3BAQWO5C.js.map → chunk-6K3QWJHH.js.map} +0 -0
- /package/dist/{chunk-BMXG7D2N.js.map → chunk-FD4AB6TM.js.map} +0 -0
- /package/dist/{chunk-LKHRHFXO.js.map → chunk-FWR6HZQS.js.map} +0 -0
- /package/dist/{chunk-B5XHZI2P.js.map → chunk-GBZNFSFY.js.map} +0 -0
- /package/dist/{chunk-ACRN7YJM.js.map → chunk-MI7774NV.js.map} +0 -0
- /package/dist/{chunk-B74SYQB2.js.map → chunk-RU6332MD.js.map} +0 -0
- /package/dist/{chunk-JHPQJDAV.js.map → chunk-YYIS6FDP.js.map} +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
QtiModalFeedback
|
|
3
|
-
|
|
2
|
+
QtiModalFeedback,
|
|
3
|
+
dispatchDeclared,
|
|
4
|
+
listenDeclared,
|
|
5
|
+
listenPublic
|
|
6
|
+
} from "./chunk-6U3YPHXU.js";
|
|
4
7
|
import {
|
|
5
8
|
item_css_default
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZP6QQYSU.js";
|
|
7
10
|
import {
|
|
8
11
|
watch
|
|
9
12
|
} from "./chunk-4DB4SC5K.js";
|
|
@@ -21,7 +24,7 @@ import {
|
|
|
21
24
|
qtiContext,
|
|
22
25
|
sessionContext,
|
|
23
26
|
testContext
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TDWJ6WZA.js";
|
|
25
28
|
|
|
26
29
|
// ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
|
|
27
30
|
import { LitElement, nothing as nothing2 } from "lit";
|
|
@@ -633,18 +636,18 @@ var EvalAstFactory = class {
|
|
|
633
636
|
}
|
|
634
637
|
const value = this.right.evaluate(scope);
|
|
635
638
|
let receiver = void 0;
|
|
636
|
-
let
|
|
639
|
+
let property21;
|
|
637
640
|
if (this.left.type === "Getter") {
|
|
638
641
|
receiver = this.left.receiver.evaluate(scope);
|
|
639
|
-
|
|
642
|
+
property21 = this.left.name;
|
|
640
643
|
} else if (this.left.type === "Index") {
|
|
641
644
|
receiver = this.left.receiver.evaluate(scope);
|
|
642
|
-
|
|
645
|
+
property21 = this.left.argument.evaluate(scope);
|
|
643
646
|
} else if (this.left.type === "ID") {
|
|
644
647
|
receiver = scope;
|
|
645
|
-
|
|
648
|
+
property21 = this.left.value;
|
|
646
649
|
}
|
|
647
|
-
return receiver === void 0 ? void 0 : receiver[
|
|
650
|
+
return receiver === void 0 ? void 0 : receiver[property21] = value;
|
|
648
651
|
}
|
|
649
652
|
return f(this.left.evaluate(scope), this.right.evaluate(scope));
|
|
650
653
|
},
|
|
@@ -1100,6 +1103,33 @@ var makeLitTemplate = (template) => {
|
|
|
1100
1103
|
import { createContext } from "@lit/context";
|
|
1101
1104
|
var testHostContext = createContext(/* @__PURE__ */ Symbol("testHost"));
|
|
1102
1105
|
|
|
1106
|
+
// ../qti-test/dist/public-events.js
|
|
1107
|
+
var PUBLIC_EVENTS = {
|
|
1108
|
+
"cito-test-navigate": { kind: "request", scope: "test", deprecated: "qti-request-navigation" },
|
|
1109
|
+
"cito-test-end-attempt": { kind: "request", scope: "test", deprecated: "test-end-attempt" },
|
|
1110
|
+
"cito-test-update-outcome": { kind: "request", scope: "test", deprecated: "test-update-outcome-variable" },
|
|
1111
|
+
"cito-test-switch-view": { kind: "request", scope: "test", deprecated: "on-test-switch-view" },
|
|
1112
|
+
"cito-test-navigated": { kind: "notification", scope: "test" },
|
|
1113
|
+
"cito-test-navigation-started": {
|
|
1114
|
+
kind: "notification",
|
|
1115
|
+
scope: "test",
|
|
1116
|
+
deprecated: "qti-navigation-loading-started"
|
|
1117
|
+
},
|
|
1118
|
+
"cito-test-navigation-failed": { kind: "notification", scope: "test", deprecated: "qti-navigation-error" },
|
|
1119
|
+
"cito-test-rendered": { kind: "notification", scope: "test", deprecated: "qti-test-loaded" },
|
|
1120
|
+
"cito-test-loaded": { kind: "notification", scope: "test", deprecated: "qti-assessment-test-connected" },
|
|
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" },
|
|
1124
|
+
"cito-item-ref-connected": { kind: "notification", scope: "item", deprecated: "qti-assessment-item-ref-connected" }
|
|
1125
|
+
};
|
|
1126
|
+
function dispatchPublic(target, name, detail) {
|
|
1127
|
+
dispatchDeclared(target, PUBLIC_EVENTS, name, detail);
|
|
1128
|
+
}
|
|
1129
|
+
function listenPublic2(target, name, handler) {
|
|
1130
|
+
listenDeclared(target, PUBLIC_EVENTS, name, handler);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1103
1133
|
// ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
|
|
1104
1134
|
var __decorate = function(decorators, target, key, desc) {
|
|
1105
1135
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1161,11 +1191,11 @@ var QtiAssessmentItemRef = class extends LitElement {
|
|
|
1161
1191
|
this.myTemplate = templateElement ? prepareTemplate(templateElement) : null;
|
|
1162
1192
|
this.requestUpdate();
|
|
1163
1193
|
await this.updateComplete;
|
|
1164
|
-
this
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
})
|
|
1194
|
+
dispatchPublic(this, "cito-item-ref-connected", {
|
|
1195
|
+
identifier: this.identifier,
|
|
1196
|
+
href: this.href,
|
|
1197
|
+
category: this.category
|
|
1198
|
+
});
|
|
1169
1199
|
}
|
|
1170
1200
|
#computedItem() {
|
|
1171
1201
|
for (const testPart of this.computedContext?.testParts ?? []) {
|
|
@@ -1326,11 +1356,7 @@ var QtiAssessmentTest = class extends LitElement3 {
|
|
|
1326
1356
|
async connectedCallback() {
|
|
1327
1357
|
super.connectedCallback();
|
|
1328
1358
|
await this.updateComplete;
|
|
1329
|
-
this
|
|
1330
|
-
detail: this,
|
|
1331
|
-
bubbles: true,
|
|
1332
|
-
composed: true
|
|
1333
|
-
}));
|
|
1359
|
+
dispatchPublic(this, "cito-test-loaded", this);
|
|
1334
1360
|
}
|
|
1335
1361
|
render() {
|
|
1336
1362
|
return html2` <slot></slot>`;
|
|
@@ -1346,15 +1372,75 @@ __decorate3([
|
|
|
1346
1372
|
consume3({ context: testContext, subscribe: true })
|
|
1347
1373
|
], QtiAssessmentTest.prototype, "_testContext", void 0);
|
|
1348
1374
|
|
|
1349
|
-
// ../qti-test/dist/components/qti-
|
|
1350
|
-
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";
|
|
1351
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
|
|
1352
1396
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
1353
1397
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1354
1398
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1355
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;
|
|
1356
1400
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1357
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
|
+
};
|
|
1358
1444
|
var stringToBooleanConverter3 = {
|
|
1359
1445
|
fromAttribute(value) {
|
|
1360
1446
|
return value === "true";
|
|
@@ -1363,7 +1449,7 @@ var stringToBooleanConverter3 = {
|
|
|
1363
1449
|
return value ? "true" : "false";
|
|
1364
1450
|
}
|
|
1365
1451
|
};
|
|
1366
|
-
var QtiItemSessionControl = class extends
|
|
1452
|
+
var QtiItemSessionControl = class extends LitElement5 {
|
|
1367
1453
|
constructor() {
|
|
1368
1454
|
super(...arguments);
|
|
1369
1455
|
this.maxAttempts = 1;
|
|
@@ -1384,29 +1470,29 @@ var QtiItemSessionControl = class extends LitElement4 {
|
|
|
1384
1470
|
}));
|
|
1385
1471
|
}
|
|
1386
1472
|
render() {
|
|
1387
|
-
return
|
|
1473
|
+
return html4`<slot></slot>`;
|
|
1388
1474
|
}
|
|
1389
1475
|
};
|
|
1390
|
-
|
|
1391
|
-
|
|
1476
|
+
__decorate5([
|
|
1477
|
+
property5({ type: Number, attribute: "max-attempts" })
|
|
1392
1478
|
], QtiItemSessionControl.prototype, "maxAttempts", void 0);
|
|
1393
|
-
|
|
1394
|
-
|
|
1479
|
+
__decorate5([
|
|
1480
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "show-feedback" })
|
|
1395
1481
|
], QtiItemSessionControl.prototype, "showFeedback", void 0);
|
|
1396
|
-
|
|
1397
|
-
|
|
1482
|
+
__decorate5([
|
|
1483
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "allow-review" })
|
|
1398
1484
|
], QtiItemSessionControl.prototype, "allowReview", void 0);
|
|
1399
|
-
|
|
1400
|
-
|
|
1485
|
+
__decorate5([
|
|
1486
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "show-solution" })
|
|
1401
1487
|
], QtiItemSessionControl.prototype, "showSolution", void 0);
|
|
1402
|
-
|
|
1403
|
-
|
|
1488
|
+
__decorate5([
|
|
1489
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "allow-comment" })
|
|
1404
1490
|
], QtiItemSessionControl.prototype, "allowComment", void 0);
|
|
1405
|
-
|
|
1406
|
-
|
|
1491
|
+
__decorate5([
|
|
1492
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "allow-skipping" })
|
|
1407
1493
|
], QtiItemSessionControl.prototype, "allowSkipping", void 0);
|
|
1408
|
-
|
|
1409
|
-
|
|
1494
|
+
__decorate5([
|
|
1495
|
+
property5({ type: Boolean, converter: stringToBooleanConverter3, attribute: "validate-responses" })
|
|
1410
1496
|
], QtiItemSessionControl.prototype, "validateResponses", void 0);
|
|
1411
1497
|
|
|
1412
1498
|
// ../qti-test/dist/internal/item-ref-selection.js
|
|
@@ -1439,7 +1525,7 @@ var QtiNumberSelected = class extends QtiExpression {
|
|
|
1439
1525
|
#connectedTest = null;
|
|
1440
1526
|
constructor() {
|
|
1441
1527
|
super();
|
|
1442
|
-
this
|
|
1528
|
+
listenPublic2(this, "cito-test-loaded", (e) => this.#connectedTest = e.detail);
|
|
1443
1529
|
}
|
|
1444
1530
|
/**
|
|
1445
1531
|
* `qti-assessment-test-connected` bubbles *up* from the test element, and this
|
|
@@ -1463,12 +1549,31 @@ var QtiNumberSelected = class extends QtiExpression {
|
|
|
1463
1549
|
}
|
|
1464
1550
|
};
|
|
1465
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
|
+
|
|
1466
1571
|
// ../qti-test/dist/components/qti-outcome-processing/qti-outcome-processing.js
|
|
1467
|
-
import { css, html as
|
|
1468
|
-
var QtiOutcomeProcessing = class extends
|
|
1572
|
+
import { css as css3, html as html6, LitElement as LitElement7 } from "lit";
|
|
1573
|
+
var QtiOutcomeProcessing = class extends LitElement7 {
|
|
1469
1574
|
static {
|
|
1470
1575
|
this.styles = [
|
|
1471
|
-
|
|
1576
|
+
css3`
|
|
1472
1577
|
:host {
|
|
1473
1578
|
display: none;
|
|
1474
1579
|
}
|
|
@@ -1476,7 +1581,7 @@ var QtiOutcomeProcessing = class extends LitElement5 {
|
|
|
1476
1581
|
];
|
|
1477
1582
|
}
|
|
1478
1583
|
render() {
|
|
1479
|
-
return
|
|
1584
|
+
return html6`<slot></slot>`;
|
|
1480
1585
|
}
|
|
1481
1586
|
process() {
|
|
1482
1587
|
const logic = new QtiOutcomeProcessingProcessor();
|
|
@@ -1498,30 +1603,30 @@ var QtiOutcomeProcessingProcessor = class {
|
|
|
1498
1603
|
};
|
|
1499
1604
|
|
|
1500
1605
|
// ../qti-test/dist/components/qti-test-feedback/qti-test-feedback.js
|
|
1501
|
-
import { css as
|
|
1606
|
+
import { css as css4, html as html7 } from "lit";
|
|
1502
1607
|
var QtiTestFeedback = class extends QtiModalFeedback {
|
|
1503
1608
|
static {
|
|
1504
|
-
this.styles =
|
|
1609
|
+
this.styles = css4`
|
|
1505
1610
|
:host {
|
|
1506
1611
|
color: gray;
|
|
1507
1612
|
}
|
|
1508
1613
|
`;
|
|
1509
1614
|
}
|
|
1510
1615
|
render() {
|
|
1511
|
-
return
|
|
1616
|
+
return html7``;
|
|
1512
1617
|
}
|
|
1513
1618
|
};
|
|
1514
1619
|
|
|
1515
1620
|
// ../qti-test/dist/components/qti-test-part/qti-test-part.js
|
|
1516
|
-
import { html as
|
|
1517
|
-
import { property as
|
|
1518
|
-
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) {
|
|
1519
1624
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1520
1625
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1521
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;
|
|
1522
1627
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1523
1628
|
};
|
|
1524
|
-
var QtiTestPart = class extends
|
|
1629
|
+
var QtiTestPart = class extends LitElement8 {
|
|
1525
1630
|
constructor() {
|
|
1526
1631
|
super(...arguments);
|
|
1527
1632
|
this.identifier = "";
|
|
@@ -1548,25 +1653,25 @@ var QtiTestPart = class extends LitElement6 {
|
|
|
1548
1653
|
}));
|
|
1549
1654
|
}
|
|
1550
1655
|
render() {
|
|
1551
|
-
return
|
|
1656
|
+
return html8` <slot></slot>`;
|
|
1552
1657
|
}
|
|
1553
1658
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1659
|
+
__decorate6([
|
|
1660
|
+
property6({ type: String })
|
|
1556
1661
|
], QtiTestPart.prototype, "identifier", void 0);
|
|
1557
|
-
|
|
1558
|
-
|
|
1662
|
+
__decorate6([
|
|
1663
|
+
property6({ type: String })
|
|
1559
1664
|
], QtiTestPart.prototype, "class", void 0);
|
|
1560
|
-
|
|
1561
|
-
|
|
1665
|
+
__decorate6([
|
|
1666
|
+
property6({ type: String, attribute: "navigation-mode" })
|
|
1562
1667
|
], QtiTestPart.prototype, "navigationMode", void 0);
|
|
1563
|
-
|
|
1564
|
-
|
|
1668
|
+
__decorate6([
|
|
1669
|
+
property6({ type: String, attribute: "submission-mode" })
|
|
1565
1670
|
], QtiTestPart.prototype, "submissionMode", void 0);
|
|
1566
1671
|
|
|
1567
1672
|
// ../qti-test/dist/components/qti-test-variables/qti-test-variables.js
|
|
1568
1673
|
import { consume as consume4 } from "@lit/context";
|
|
1569
|
-
var
|
|
1674
|
+
var __decorate7 = function(decorators, target, key, desc) {
|
|
1570
1675
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1571
1676
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1572
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;
|
|
@@ -1576,7 +1681,7 @@ var QtiTestVariables = class extends QtiExpression {
|
|
|
1576
1681
|
#connectedTest = null;
|
|
1577
1682
|
constructor() {
|
|
1578
1683
|
super();
|
|
1579
|
-
this
|
|
1684
|
+
listenPublic2(this, "cito-test-loaded", (e) => this.#connectedTest = e.detail);
|
|
1580
1685
|
}
|
|
1581
1686
|
/**
|
|
1582
1687
|
* `qti-assessment-test-connected` bubbles *up* from the test element, and this
|
|
@@ -1607,7 +1712,7 @@ var QtiTestVariables = class extends QtiExpression {
|
|
|
1607
1712
|
return this.getResult();
|
|
1608
1713
|
}
|
|
1609
1714
|
};
|
|
1610
|
-
|
|
1715
|
+
__decorate7([
|
|
1611
1716
|
consume4({ context: testContext, subscribe: true })
|
|
1612
1717
|
], QtiTestVariables.prototype, "_testContext", void 0);
|
|
1613
1718
|
var QtiTestVariablesExpression = class {
|
|
@@ -1641,12 +1746,104 @@ var QTI_TEST_STATE_VERSION = 1;
|
|
|
1641
1746
|
|
|
1642
1747
|
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
1643
1748
|
import { ContextProvider, provide as provide2 } from "@lit/context";
|
|
1644
|
-
import { html as
|
|
1749
|
+
import { html as html9, LitElement as LitElement10 } from "lit";
|
|
1645
1750
|
import { state as state2 } from "lit/decorators.js";
|
|
1646
1751
|
|
|
1647
1752
|
// ../qti-test/dist/mixins/test-navigation.mixin.js
|
|
1648
|
-
import { property as
|
|
1649
|
-
|
|
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) {
|
|
1650
1847
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1651
1848
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1652
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;
|
|
@@ -1685,19 +1882,15 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1685
1882
|
navigateTo(type, id) {
|
|
1686
1883
|
const targetId = id || this._getDefaultNavigationId(type);
|
|
1687
1884
|
if (targetId) {
|
|
1688
|
-
this
|
|
1689
|
-
detail: { type, id: targetId },
|
|
1690
|
-
bubbles: true,
|
|
1691
|
-
composed: true
|
|
1692
|
-
}));
|
|
1885
|
+
dispatchPublic(this, "cito-test-navigate", { type, id: targetId });
|
|
1693
1886
|
}
|
|
1694
1887
|
}
|
|
1695
1888
|
// ===========================================
|
|
1696
1889
|
// EVENT HANDLER SETUP
|
|
1697
1890
|
// ===========================================
|
|
1698
1891
|
_bindEventHandlers() {
|
|
1699
|
-
this
|
|
1700
|
-
this
|
|
1892
|
+
listenPublic2(this, "cito-test-navigate", this._handleNavigationRequest.bind(this));
|
|
1893
|
+
listenPublic2(this, "cito-test-loaded", this._handleTestConnected.bind(this));
|
|
1701
1894
|
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
1702
1895
|
this.addEventListener("qti-assessment-stimulus-ref-connected", this._handleStimulusRefConnected.bind(this));
|
|
1703
1896
|
}
|
|
@@ -1768,7 +1961,20 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1768
1961
|
_initializeNavigation() {
|
|
1769
1962
|
if (!this.navigate)
|
|
1770
1963
|
return;
|
|
1771
|
-
|
|
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
|
+
}
|
|
1772
1978
|
if (id) {
|
|
1773
1979
|
this.navigateTo(this.navigate, id);
|
|
1774
1980
|
}
|
|
@@ -1797,13 +2003,43 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1797
2003
|
}
|
|
1798
2004
|
return true;
|
|
1799
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
|
+
}
|
|
1800
2028
|
/**
|
|
1801
2029
|
* Main navigation request handler with proper lifecycle management
|
|
1802
2030
|
*/
|
|
1803
2031
|
async _handleNavigationRequest({ detail }) {
|
|
1804
2032
|
if (!detail?.id)
|
|
1805
2033
|
return;
|
|
1806
|
-
|
|
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)) {
|
|
1807
2043
|
this._handleNavigationError(new Error("Navigation restricted in linear mode"), detail.type, detail.id);
|
|
1808
2044
|
return;
|
|
1809
2045
|
}
|
|
@@ -1811,16 +2047,19 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1811
2047
|
const navigationId = ++this._navigationId;
|
|
1812
2048
|
const controller = new AbortController();
|
|
1813
2049
|
try {
|
|
1814
|
-
this._dispatchLoadingStarted(detail.type,
|
|
2050
|
+
this._dispatchLoadingStarted(detail.type, target);
|
|
1815
2051
|
this._activeController = controller;
|
|
1816
|
-
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
|
+
}
|
|
1817
2056
|
} catch (error) {
|
|
1818
|
-
this._handleNavigationError(error, detail.type,
|
|
2057
|
+
this._handleNavigationError(error, detail.type, target);
|
|
1819
2058
|
} finally {
|
|
1820
2059
|
if (this._activeController === controller) {
|
|
1821
2060
|
this._activeController = null;
|
|
1822
2061
|
}
|
|
1823
|
-
this._dispatchLoadingEnded(detail.type,
|
|
2062
|
+
this._dispatchLoadingEnded(detail.type, target);
|
|
1824
2063
|
}
|
|
1825
2064
|
}
|
|
1826
2065
|
_handleNavigationError(error, type, id) {
|
|
@@ -1847,7 +2086,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1847
2086
|
await this._waitForLoadingComplete(navigationId, controller);
|
|
1848
2087
|
if (this._isStaleNavigation(navigationId, controller))
|
|
1849
2088
|
return;
|
|
1850
|
-
this._dispatchTestLoaded(this._loadResults);
|
|
2089
|
+
this._dispatchTestLoaded(this._loadResults, "item", itemId);
|
|
1851
2090
|
}
|
|
1852
2091
|
/**
|
|
1853
2092
|
* Navigate to section with simple state tracking
|
|
@@ -1868,7 +2107,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1868
2107
|
await this._waitForLoadingComplete(navigationId, controller);
|
|
1869
2108
|
if (this._isStaleNavigation(navigationId, controller))
|
|
1870
2109
|
return;
|
|
1871
|
-
this._dispatchTestLoaded(this._loadResults);
|
|
2110
|
+
this._dispatchTestLoaded(this._loadResults, "section", sectionId);
|
|
1872
2111
|
}
|
|
1873
2112
|
// ===========================================
|
|
1874
2113
|
// LOADING STATE MANAGEMENT
|
|
@@ -2089,11 +2328,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
2089
2328
|
// EVENT DISPATCHING
|
|
2090
2329
|
// ===========================================
|
|
2091
2330
|
_dispatchLoadingStarted(type, id) {
|
|
2092
|
-
this
|
|
2093
|
-
detail: { type, id },
|
|
2094
|
-
bubbles: true,
|
|
2095
|
-
composed: true
|
|
2096
|
-
}));
|
|
2331
|
+
dispatchPublic(this, "cito-test-navigation-started", { type, id });
|
|
2097
2332
|
}
|
|
2098
2333
|
_dispatchLoadingEnded(type, id) {
|
|
2099
2334
|
this.dispatchEvent(new CustomEvent("qti-navigation-loading-ended", {
|
|
@@ -2103,36 +2338,30 @@ var TestNavigationMixin = (superClass) => {
|
|
|
2103
2338
|
}));
|
|
2104
2339
|
}
|
|
2105
2340
|
_dispatchError(error) {
|
|
2106
|
-
this
|
|
2107
|
-
detail: error,
|
|
2108
|
-
bubbles: true,
|
|
2109
|
-
composed: true
|
|
2110
|
-
}));
|
|
2341
|
+
dispatchPublic(this, "cito-test-navigation-failed", error);
|
|
2111
2342
|
}
|
|
2112
|
-
|
|
2343
|
+
/** The items are in the DOM: tell hosts the new position rendered (`cito-test-navigated`) and which items it holds. */
|
|
2344
|
+
_dispatchTestLoaded(results, type, id) {
|
|
2113
2345
|
requestAnimationFrame(() => {
|
|
2114
|
-
this
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
bubbles: true,
|
|
2120
|
-
composed: true
|
|
2121
|
-
}));
|
|
2346
|
+
dispatchPublic(this, "cito-test-rendered", results.map(({ itemRef }) => ({
|
|
2347
|
+
identifier: itemRef?.identifier,
|
|
2348
|
+
element: itemRef
|
|
2349
|
+
})));
|
|
2350
|
+
dispatchPublic(this, "cito-test-navigated", { type, id });
|
|
2122
2351
|
});
|
|
2123
2352
|
}
|
|
2124
2353
|
}
|
|
2125
|
-
|
|
2126
|
-
|
|
2354
|
+
__decorate8([
|
|
2355
|
+
property7({ type: String })
|
|
2127
2356
|
], TestNavigationClass.prototype, "navigate", void 0);
|
|
2128
|
-
|
|
2129
|
-
|
|
2357
|
+
__decorate8([
|
|
2358
|
+
property7({ type: Number })
|
|
2130
2359
|
], TestNavigationClass.prototype, "requestTimeout", void 0);
|
|
2131
|
-
|
|
2132
|
-
|
|
2360
|
+
__decorate8([
|
|
2361
|
+
property7({ attribute: false })
|
|
2133
2362
|
], TestNavigationClass.prototype, "postLoadTransformCallback", void 0);
|
|
2134
|
-
|
|
2135
|
-
|
|
2363
|
+
__decorate8([
|
|
2364
|
+
property7({ attribute: false })
|
|
2136
2365
|
], TestNavigationClass.prototype, "postLoadTestTransformCallback", void 0);
|
|
2137
2366
|
return TestNavigationClass;
|
|
2138
2367
|
};
|
|
@@ -2143,11 +2372,11 @@ var TestViewMixin = (superClass) => {
|
|
|
2143
2372
|
constructor(...args) {
|
|
2144
2373
|
super(...args);
|
|
2145
2374
|
this.sessionContext = { ...this.sessionContext, view: "candidate" };
|
|
2146
|
-
this
|
|
2375
|
+
listenPublic2(this, "cito-test-switch-view", (e) => {
|
|
2147
2376
|
this.sessionContext = { ...this.sessionContext, view: e.detail };
|
|
2148
2377
|
this._updateElementView();
|
|
2149
2378
|
});
|
|
2150
|
-
this
|
|
2379
|
+
listenPublic2(this, "cito-test-loaded", () => {
|
|
2151
2380
|
this._updateElementView();
|
|
2152
2381
|
});
|
|
2153
2382
|
this.addEventListener("qti-assessment-item-connected", (e) => {
|
|
@@ -2187,9 +2416,9 @@ var TestViewMixin = (superClass) => {
|
|
|
2187
2416
|
|
|
2188
2417
|
// ../qti-test/dist/mixins/test-base.js
|
|
2189
2418
|
import { provide } from "@lit/context";
|
|
2190
|
-
import { LitElement as
|
|
2191
|
-
import { property as
|
|
2192
|
-
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) {
|
|
2193
2422
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2194
2423
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2195
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;
|
|
@@ -2277,7 +2506,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
2277
2506
|
this.testContext = INITIAL_TEST_CONTEXT;
|
|
2278
2507
|
this.sessionContext = INITIAL_SESSION_CONTEXT;
|
|
2279
2508
|
});
|
|
2280
|
-
this
|
|
2509
|
+
listenPublic2(this, "cito-test-loaded", (e) => {
|
|
2281
2510
|
this._testElement = e.detail;
|
|
2282
2511
|
const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
|
|
2283
2512
|
return {
|
|
@@ -2330,17 +2559,17 @@ var TestBaseMixin = (superClass) => {
|
|
|
2330
2559
|
this.dispatchEvent(new CustomEvent("qti-test-context-updated", { detail: this.testContext, bubbles: false, composed: false }));
|
|
2331
2560
|
}
|
|
2332
2561
|
}
|
|
2333
|
-
|
|
2334
|
-
|
|
2562
|
+
__decorate9([
|
|
2563
|
+
property8({ attribute: false, type: Object }),
|
|
2335
2564
|
provide({ context: testContext })
|
|
2336
2565
|
], TestBaseClass.prototype, "testContext", void 0);
|
|
2337
|
-
|
|
2338
|
-
|
|
2566
|
+
__decorate9([
|
|
2567
|
+
property8({ attribute: false, type: Object }),
|
|
2339
2568
|
provide({ context: sessionContext })
|
|
2340
2569
|
], TestBaseClass.prototype, "sessionContext", void 0);
|
|
2341
2570
|
return TestBaseClass;
|
|
2342
2571
|
};
|
|
2343
|
-
var TestBase = class extends TestBaseMixin(
|
|
2572
|
+
var TestBase = class extends TestBaseMixin(LitElement9) {
|
|
2344
2573
|
};
|
|
2345
2574
|
|
|
2346
2575
|
// ../qti-test/dist/mixins/test-state.mixin.js
|
|
@@ -2386,7 +2615,7 @@ var TestStateMixin = (superClass) => {
|
|
|
2386
2615
|
this.#ready = false;
|
|
2387
2616
|
this.#lastEmitted = null;
|
|
2388
2617
|
});
|
|
2389
|
-
this
|
|
2618
|
+
listenPublic2(this, "cito-test-loaded", () => {
|
|
2390
2619
|
if (this.#pending) {
|
|
2391
2620
|
this.#apply(this.#pending);
|
|
2392
2621
|
this.#pending = null;
|
|
@@ -2424,7 +2653,7 @@ var TestStateMixin = (superClass) => {
|
|
|
2424
2653
|
if (serialized === this.#lastEmitted)
|
|
2425
2654
|
return;
|
|
2426
2655
|
this.#lastEmitted = serialized;
|
|
2427
|
-
this
|
|
2656
|
+
dispatchPublic(this, "cito-test-state-changed", state9);
|
|
2428
2657
|
}
|
|
2429
2658
|
#apply(state9) {
|
|
2430
2659
|
for (const saved of state9.test.items)
|
|
@@ -2446,7 +2675,7 @@ var TestStateMixin = (superClass) => {
|
|
|
2446
2675
|
};
|
|
2447
2676
|
}
|
|
2448
2677
|
#requestNavigation(type, id) {
|
|
2449
|
-
this
|
|
2678
|
+
dispatchPublic(this, "cito-test-navigate", { type, id });
|
|
2450
2679
|
}
|
|
2451
2680
|
}
|
|
2452
2681
|
return TestStateClass;
|
|
@@ -2508,13 +2737,13 @@ var TestProcessingMixin = (superClass) => {
|
|
|
2508
2737
|
};
|
|
2509
2738
|
|
|
2510
2739
|
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
2511
|
-
var
|
|
2740
|
+
var __decorate10 = function(decorators, target, key, desc) {
|
|
2512
2741
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2513
2742
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2514
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;
|
|
2515
2744
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2516
2745
|
};
|
|
2517
|
-
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestStateMixin(TestBaseMixin(
|
|
2746
|
+
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestStateMixin(TestBaseMixin(LitElement10))))) {
|
|
2518
2747
|
// TODO: Properly implement IQtiTest interface
|
|
2519
2748
|
// export class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
|
|
2520
2749
|
constructor() {
|
|
@@ -2539,25 +2768,25 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
|
|
|
2539
2768
|
this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
|
|
2540
2769
|
}
|
|
2541
2770
|
render() {
|
|
2542
|
-
return
|
|
2771
|
+
return html9`<slot></slot>`;
|
|
2543
2772
|
}
|
|
2544
2773
|
};
|
|
2545
|
-
|
|
2774
|
+
__decorate10([
|
|
2546
2775
|
state2(),
|
|
2547
2776
|
provide2({ context: configContext })
|
|
2548
2777
|
], QtiTest.prototype, "configContext", void 0);
|
|
2549
|
-
|
|
2778
|
+
__decorate10([
|
|
2550
2779
|
state2(),
|
|
2551
2780
|
provide2({ context: qtiContext })
|
|
2552
2781
|
], QtiTest.prototype, "qtiContext", void 0);
|
|
2553
2782
|
|
|
2554
2783
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
2555
2784
|
import { consume as consume5 } from "@lit/context";
|
|
2556
|
-
import { css as
|
|
2785
|
+
import { css as css6, html as html10, LitElement as LitElement11 } from "lit";
|
|
2557
2786
|
|
|
2558
2787
|
// ../qti-test/dist/components/styles.js
|
|
2559
|
-
import { css as
|
|
2560
|
-
var form =
|
|
2788
|
+
import { css as css5 } from "lit";
|
|
2789
|
+
var form = css5`
|
|
2561
2790
|
display: inline-flex;
|
|
2562
2791
|
align-items: center;
|
|
2563
2792
|
justify-content: center;
|
|
@@ -2571,39 +2800,39 @@ var form = css3`
|
|
|
2571
2800
|
user-select: none;
|
|
2572
2801
|
border-radius: var(--test-button-border-radius, var(--qti-component-border-radius, 0.2rem));
|
|
2573
2802
|
`;
|
|
2574
|
-
var btn =
|
|
2803
|
+
var btn = css5`
|
|
2575
2804
|
${form};
|
|
2576
2805
|
background-color: var(--test-button-background-color, var(--qti-component-background-color, #fff));
|
|
2577
2806
|
color: var(--test-button-color, var(--qti-component-color, inherit));
|
|
2578
2807
|
border: var(--qti-component-border-width, 1px) var(--qti-component-border-style, solid)
|
|
2579
2808
|
var(--test-button-border-color, var(--qti-component-border-color, #0175aa));
|
|
2580
2809
|
`;
|
|
2581
|
-
var btnInteractive =
|
|
2810
|
+
var btnInteractive = css5`
|
|
2582
2811
|
background-color: var(--test-button-hover-background-color, var(--qti-bg-active, #f2f8fb));
|
|
2583
2812
|
`;
|
|
2584
|
-
var focusRing =
|
|
2813
|
+
var focusRing = css5`
|
|
2585
2814
|
outline: var(--qti-focus-border-width, 2px) solid var(--qti-focus-color, #007ac3);
|
|
2586
2815
|
outline-offset: 2px;
|
|
2587
2816
|
`;
|
|
2588
|
-
var dis =
|
|
2817
|
+
var dis = css5`
|
|
2589
2818
|
cursor: not-allowed;
|
|
2590
2819
|
opacity: 0.45;
|
|
2591
2820
|
`;
|
|
2592
|
-
var ind =
|
|
2821
|
+
var ind = css5`
|
|
2593
2822
|
${form};
|
|
2594
2823
|
border: 1px solid gray;
|
|
2595
2824
|
`;
|
|
2596
2825
|
|
|
2597
2826
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
2598
|
-
var
|
|
2827
|
+
var __decorate11 = function(decorators, target, key, desc) {
|
|
2599
2828
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2600
2829
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2601
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;
|
|
2602
2831
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2603
2832
|
};
|
|
2604
|
-
var TestCheckItem = class extends
|
|
2833
|
+
var TestCheckItem = class extends LitElement11 {
|
|
2605
2834
|
static {
|
|
2606
|
-
this.styles =
|
|
2835
|
+
this.styles = css6`
|
|
2607
2836
|
:host {
|
|
2608
2837
|
${btn};
|
|
2609
2838
|
}
|
|
@@ -2621,7 +2850,7 @@ var TestCheckItem = class extends LitElement9 {
|
|
|
2621
2850
|
constructor() {
|
|
2622
2851
|
super();
|
|
2623
2852
|
this.addEventListener("click", () => {
|
|
2624
|
-
this
|
|
2853
|
+
dispatchPublic(this, "cito-test-end-attempt", {});
|
|
2625
2854
|
const testContainer = this.testHost?.querySelector("test-container");
|
|
2626
2855
|
if (!testContainer)
|
|
2627
2856
|
return;
|
|
@@ -2632,25 +2861,25 @@ var TestCheckItem = class extends LitElement9 {
|
|
|
2632
2861
|
});
|
|
2633
2862
|
}
|
|
2634
2863
|
render() {
|
|
2635
|
-
return
|
|
2864
|
+
return html10` <slot></slot> `;
|
|
2636
2865
|
}
|
|
2637
2866
|
};
|
|
2638
|
-
|
|
2867
|
+
__decorate11([
|
|
2639
2868
|
consume5({ context: testHostContext, subscribe: true })
|
|
2640
2869
|
], TestCheckItem.prototype, "testHost", void 0);
|
|
2641
2870
|
|
|
2642
2871
|
// ../qti-test/dist/components/test-container/test-container.js
|
|
2643
2872
|
import { consume as consume6 } from "@lit/context";
|
|
2644
|
-
import { LitElement as
|
|
2645
|
-
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";
|
|
2646
2875
|
import { until } from "lit/directives/until.js";
|
|
2647
|
-
var
|
|
2876
|
+
var __decorate12 = function(decorators, target, key, desc) {
|
|
2648
2877
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2649
2878
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2650
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;
|
|
2651
2880
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2652
2881
|
};
|
|
2653
|
-
var TestContainer = class extends
|
|
2882
|
+
var TestContainer = class extends LitElement12 {
|
|
2654
2883
|
constructor() {
|
|
2655
2884
|
super(...arguments);
|
|
2656
2885
|
this.customElementRegistry = null;
|
|
@@ -2735,7 +2964,7 @@ var TestContainer = class extends LitElement10 {
|
|
|
2735
2964
|
}
|
|
2736
2965
|
#initializeTemplateContent() {
|
|
2737
2966
|
const template = this.querySelector("template");
|
|
2738
|
-
this.#templateContent = template ? template.content :
|
|
2967
|
+
this.#templateContent = template ? template.content : html11``;
|
|
2739
2968
|
}
|
|
2740
2969
|
#applyStyles() {
|
|
2741
2970
|
const sheet = new CSSStyleSheet();
|
|
@@ -2743,57 +2972,57 @@ var TestContainer = class extends LitElement10 {
|
|
|
2743
2972
|
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
2744
2973
|
}
|
|
2745
2974
|
render() {
|
|
2746
|
-
return
|
|
2975
|
+
return html11`
|
|
2747
2976
|
${this.#templateContent}
|
|
2748
2977
|
<slot></slot>
|
|
2749
|
-
${until(this.testDoc,
|
|
2978
|
+
${until(this.testDoc, html11`<span>Loading...</span>`)}
|
|
2750
2979
|
`;
|
|
2751
2980
|
}
|
|
2752
2981
|
};
|
|
2753
|
-
|
|
2754
|
-
|
|
2982
|
+
__decorate12([
|
|
2983
|
+
property9({ attribute: false })
|
|
2755
2984
|
], TestContainer.prototype, "customElementRegistry", void 0);
|
|
2756
|
-
|
|
2757
|
-
|
|
2985
|
+
__decorate12([
|
|
2986
|
+
property9({ type: String, attribute: "test-url" })
|
|
2758
2987
|
], TestContainer.prototype, "testURL", void 0);
|
|
2759
|
-
|
|
2988
|
+
__decorate12([
|
|
2760
2989
|
state3()
|
|
2761
2990
|
], TestContainer.prototype, "testDoc", void 0);
|
|
2762
|
-
|
|
2991
|
+
__decorate12([
|
|
2763
2992
|
state3()
|
|
2764
2993
|
], TestContainer.prototype, "testXML", void 0);
|
|
2765
|
-
|
|
2994
|
+
__decorate12([
|
|
2766
2995
|
consume6({ context: testHostContext, subscribe: true })
|
|
2767
2996
|
], TestContainer.prototype, "testHost", void 0);
|
|
2768
|
-
|
|
2997
|
+
__decorate12([
|
|
2769
2998
|
state3(),
|
|
2770
2999
|
consume6({ context: qtiContext, subscribe: true })
|
|
2771
3000
|
], TestContainer.prototype, "qtiContext", void 0);
|
|
2772
|
-
|
|
3001
|
+
__decorate12([
|
|
2773
3002
|
watch("testURL", { waitUntilFirstUpdate: true })
|
|
2774
3003
|
], TestContainer.prototype, "handleTestURLChange", null);
|
|
2775
|
-
|
|
3004
|
+
__decorate12([
|
|
2776
3005
|
watch("testXML", { waitUntilFirstUpdate: true })
|
|
2777
3006
|
], TestContainer.prototype, "handleTestXMLChange", null);
|
|
2778
3007
|
|
|
2779
3008
|
// ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
|
|
2780
|
-
import { css as
|
|
2781
|
-
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";
|
|
2782
3011
|
import { consume as consume7 } from "@lit/context";
|
|
2783
|
-
var
|
|
3012
|
+
var __decorate13 = function(decorators, target, key, desc) {
|
|
2784
3013
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2785
3014
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2786
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;
|
|
2787
3016
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2788
3017
|
};
|
|
2789
|
-
var TestEndAttempt = class extends
|
|
3018
|
+
var TestEndAttempt = class extends LitElement13 {
|
|
2790
3019
|
_handleTestElementChange(_oldValue, newValue) {
|
|
2791
3020
|
if (newValue) {
|
|
2792
3021
|
this.requestUpdate();
|
|
2793
3022
|
}
|
|
2794
3023
|
}
|
|
2795
3024
|
static {
|
|
2796
|
-
this.styles =
|
|
3025
|
+
this.styles = css7`
|
|
2797
3026
|
:host {
|
|
2798
3027
|
${btn};
|
|
2799
3028
|
}
|
|
@@ -2814,7 +3043,7 @@ var TestEndAttempt = class extends LitElement11 {
|
|
|
2814
3043
|
this.addEventListener("click", (e) => {
|
|
2815
3044
|
e.preventDefault();
|
|
2816
3045
|
if (!this._internalDisabled) {
|
|
2817
|
-
this
|
|
3046
|
+
dispatchPublic(this, "cito-test-end-attempt", {});
|
|
2818
3047
|
}
|
|
2819
3048
|
});
|
|
2820
3049
|
}
|
|
@@ -2849,32 +3078,32 @@ var TestEndAttempt = class extends LitElement11 {
|
|
|
2849
3078
|
}
|
|
2850
3079
|
}
|
|
2851
3080
|
render() {
|
|
2852
|
-
return
|
|
3081
|
+
return html12` <slot></slot> `;
|
|
2853
3082
|
}
|
|
2854
3083
|
};
|
|
2855
|
-
|
|
3084
|
+
__decorate13([
|
|
2856
3085
|
consume7({ context: computedContext, subscribe: true }),
|
|
2857
|
-
|
|
3086
|
+
property10({ attribute: false })
|
|
2858
3087
|
], TestEndAttempt.prototype, "computedContext", void 0);
|
|
2859
|
-
|
|
2860
|
-
|
|
3088
|
+
__decorate13([
|
|
3089
|
+
property10({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
2861
3090
|
], TestEndAttempt.prototype, "_internalDisabled", void 0);
|
|
2862
|
-
|
|
3091
|
+
__decorate13([
|
|
2863
3092
|
watch("computedContext")
|
|
2864
3093
|
], TestEndAttempt.prototype, "_handleTestElementChange", null);
|
|
2865
3094
|
|
|
2866
3095
|
// ../qti-test/dist/components/test-item-link/test-item-link.js
|
|
2867
|
-
import { css as
|
|
2868
|
-
import { property as
|
|
2869
|
-
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) {
|
|
2870
3099
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2871
3100
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2872
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;
|
|
2873
3102
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2874
3103
|
};
|
|
2875
|
-
var TestItemLink = class extends
|
|
3104
|
+
var TestItemLink = class extends LitElement14 {
|
|
2876
3105
|
static {
|
|
2877
|
-
this.styles =
|
|
3106
|
+
this.styles = css8`
|
|
2878
3107
|
:host {
|
|
2879
3108
|
${btn};
|
|
2880
3109
|
}
|
|
@@ -2895,29 +3124,22 @@ var TestItemLink = class extends LitElement12 {
|
|
|
2895
3124
|
this.addEventListener("click", () => this._requestItem(this.itemId));
|
|
2896
3125
|
}
|
|
2897
3126
|
_requestItem(identifier) {
|
|
2898
|
-
this
|
|
2899
|
-
composed: true,
|
|
2900
|
-
bubbles: true,
|
|
2901
|
-
detail: {
|
|
2902
|
-
type: "item",
|
|
2903
|
-
id: identifier
|
|
2904
|
-
}
|
|
2905
|
-
}));
|
|
3127
|
+
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
2906
3128
|
}
|
|
2907
3129
|
render() {
|
|
2908
|
-
return
|
|
3130
|
+
return html13` <slot></slot> `;
|
|
2909
3131
|
}
|
|
2910
3132
|
};
|
|
2911
|
-
|
|
2912
|
-
|
|
3133
|
+
__decorate14([
|
|
3134
|
+
property11({ type: String, attribute: "item-id" })
|
|
2913
3135
|
], TestItemLink.prototype, "itemId", void 0);
|
|
2914
3136
|
|
|
2915
3137
|
// ../qti-test/dist/components/test-item-to-speech/test-item-to-speech.js
|
|
2916
|
-
import { html as
|
|
3138
|
+
import { html as html14, LitElement as LitElement15, css as css9 } from "lit";
|
|
2917
3139
|
import { consume as consume8, provide as provide3, createContext as createContext2 } from "@lit/context";
|
|
2918
|
-
import { property as
|
|
3140
|
+
import { property as property12, state as state4 } from "lit/decorators.js";
|
|
2919
3141
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
2920
|
-
var
|
|
3142
|
+
var __decorate15 = function(decorators, target, key, desc) {
|
|
2921
3143
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2922
3144
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2923
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;
|
|
@@ -2946,14 +3168,14 @@ var ICONS = {
|
|
|
2946
3168
|
pick: "M5 3l13 7-5.5 1.6 3.4 6.6-2.4 1.3-3.4-6.7L6 17z"
|
|
2947
3169
|
};
|
|
2948
3170
|
var iconContent = (icon, label) => {
|
|
2949
|
-
const svg =
|
|
3171
|
+
const svg = html14`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
|
2950
3172
|
<path d="${ICONS[icon]}"></path>
|
|
2951
3173
|
</svg>`;
|
|
2952
|
-
return
|
|
3174
|
+
return html14`${svg}<span class="label">${label}</span>`;
|
|
2953
3175
|
};
|
|
2954
|
-
var TtsButtonBase = class extends
|
|
3176
|
+
var TtsButtonBase = class extends LitElement15 {
|
|
2955
3177
|
static {
|
|
2956
|
-
this.styles =
|
|
3178
|
+
this.styles = css9`
|
|
2957
3179
|
:host {
|
|
2958
3180
|
display: inline-flex;
|
|
2959
3181
|
}
|
|
@@ -3017,15 +3239,15 @@ var TtsButtonBase = class extends LitElement13 {
|
|
|
3017
3239
|
this.#internals.states.add("picking");
|
|
3018
3240
|
}
|
|
3019
3241
|
};
|
|
3020
|
-
|
|
3021
|
-
|
|
3242
|
+
__decorate15([
|
|
3243
|
+
property12({ type: String })
|
|
3022
3244
|
], TtsButtonBase.prototype, "label", void 0);
|
|
3023
|
-
|
|
3245
|
+
__decorate15([
|
|
3024
3246
|
consume8({ context: ttsContext, subscribe: true })
|
|
3025
3247
|
], TtsButtonBase.prototype, "_tts", void 0);
|
|
3026
|
-
var TestItemToSpeech = class extends
|
|
3248
|
+
var TestItemToSpeech = class extends LitElement15 {
|
|
3027
3249
|
static {
|
|
3028
|
-
this.styles =
|
|
3250
|
+
this.styles = css9`
|
|
3029
3251
|
:host {
|
|
3030
3252
|
display: inline-flex;
|
|
3031
3253
|
flex-wrap: wrap;
|
|
@@ -3155,6 +3377,7 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3155
3377
|
this.#eventHost = this.#itemRef ?? this.closest("test-navigation") ?? this.testHost ?? this.getRootNode();
|
|
3156
3378
|
this.#eventHost.addEventListener("qti-assessment-item-connected", this.#boundHandleItemConnected);
|
|
3157
3379
|
if (!this.#itemRef) {
|
|
3380
|
+
this.#eventHost.addEventListener("cito-test-navigate", this.#boundHandleNavigation);
|
|
3158
3381
|
this.#eventHost.addEventListener("qti-request-navigation", this.#boundHandleNavigation);
|
|
3159
3382
|
}
|
|
3160
3383
|
}
|
|
@@ -3167,6 +3390,7 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3167
3390
|
this.#stopPicking();
|
|
3168
3391
|
this.#clearAllHighlights();
|
|
3169
3392
|
this.#eventHost?.removeEventListener("qti-assessment-item-connected", this.#boundHandleItemConnected);
|
|
3393
|
+
this.#eventHost?.removeEventListener("cito-test-navigate", this.#boundHandleNavigation);
|
|
3170
3394
|
this.#eventHost?.removeEventListener("qti-request-navigation", this.#boundHandleNavigation);
|
|
3171
3395
|
this.#eventHost = null;
|
|
3172
3396
|
this.#itemRef = null;
|
|
@@ -3176,7 +3400,7 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3176
3400
|
this.#contentMode = false;
|
|
3177
3401
|
}
|
|
3178
3402
|
render() {
|
|
3179
|
-
return
|
|
3403
|
+
return html14`<slot></slot>`;
|
|
3180
3404
|
}
|
|
3181
3405
|
/**
|
|
3182
3406
|
* An item (re)rendered. If it is ours — e.g. after navigating to the item already shown — the
|
|
@@ -3613,16 +3837,16 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3613
3837
|
}
|
|
3614
3838
|
}
|
|
3615
3839
|
};
|
|
3616
|
-
|
|
3617
|
-
|
|
3840
|
+
__decorate15([
|
|
3841
|
+
property12({ type: String })
|
|
3618
3842
|
], TestItemToSpeech.prototype, "language", void 0);
|
|
3619
|
-
|
|
3843
|
+
__decorate15([
|
|
3620
3844
|
consume8({ context: sessionContext, subscribe: true })
|
|
3621
3845
|
], TestItemToSpeech.prototype, "_sessionContext", void 0);
|
|
3622
|
-
|
|
3846
|
+
__decorate15([
|
|
3623
3847
|
consume8({ context: testHostContext, subscribe: true })
|
|
3624
3848
|
], TestItemToSpeech.prototype, "testHost", void 0);
|
|
3625
|
-
|
|
3849
|
+
__decorate15([
|
|
3626
3850
|
state4(),
|
|
3627
3851
|
provide3({ context: ttsContext })
|
|
3628
3852
|
], TestItemToSpeech.prototype, "_ttsContext", void 0);
|
|
@@ -3639,19 +3863,19 @@ var TestTtsPlay = class extends TtsButtonBase {
|
|
|
3639
3863
|
}
|
|
3640
3864
|
render() {
|
|
3641
3865
|
const playing = this._tts?.state === "playing";
|
|
3642
|
-
return
|
|
3866
|
+
return html14`
|
|
3643
3867
|
<button part="button" aria-label=${ifDefined(playing ? this.pauseLabel : this.label)} @click=${this.#toggle}>
|
|
3644
|
-
${playing ?
|
|
3868
|
+
${playing ? html14`<slot name="pause">${iconContent("pause", this.pauseLabel ?? "Pause")}</slot>` : html14`<slot name="play">${iconContent("play", this.label ?? "Play")}</slot>`}
|
|
3645
3869
|
</button>
|
|
3646
3870
|
`;
|
|
3647
3871
|
}
|
|
3648
3872
|
};
|
|
3649
|
-
|
|
3650
|
-
|
|
3873
|
+
__decorate15([
|
|
3874
|
+
property12({ type: String, attribute: "pause-label" })
|
|
3651
3875
|
], TestTtsPlay.prototype, "pauseLabel", void 0);
|
|
3652
3876
|
var TestTtsPause = class extends TtsButtonBase {
|
|
3653
3877
|
render() {
|
|
3654
|
-
return
|
|
3878
|
+
return html14`
|
|
3655
3879
|
<button
|
|
3656
3880
|
part="button"
|
|
3657
3881
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3665,7 +3889,7 @@ var TestTtsPause = class extends TtsButtonBase {
|
|
|
3665
3889
|
};
|
|
3666
3890
|
var TestTtsResume = class extends TtsButtonBase {
|
|
3667
3891
|
render() {
|
|
3668
|
-
return
|
|
3892
|
+
return html14`
|
|
3669
3893
|
<button
|
|
3670
3894
|
part="button"
|
|
3671
3895
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3680,7 +3904,7 @@ var TestTtsResume = class extends TtsButtonBase {
|
|
|
3680
3904
|
var TestTtsStop = class extends TtsButtonBase {
|
|
3681
3905
|
render() {
|
|
3682
3906
|
const idle = this._tts?.state === "idle" && !this._tts?.picking;
|
|
3683
|
-
return
|
|
3907
|
+
return html14`
|
|
3684
3908
|
<button part="button" aria-label=${ifDefined(this.label)} ?disabled=${idle} @click=${() => this._tts?.stop()}>
|
|
3685
3909
|
<slot>${iconContent("stop", this.label ?? "Stop")}</slot>
|
|
3686
3910
|
</button>
|
|
@@ -3691,7 +3915,7 @@ var TestTtsPrev = class extends TtsButtonBase {
|
|
|
3691
3915
|
render() {
|
|
3692
3916
|
const collected = (this._tts?.elementCount ?? 0) > 0;
|
|
3693
3917
|
const atStart = (this._tts?.currentElementIndex ?? 0) === 0;
|
|
3694
|
-
return
|
|
3918
|
+
return html14`
|
|
3695
3919
|
<button
|
|
3696
3920
|
part="button"
|
|
3697
3921
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3707,7 +3931,7 @@ var TestTtsNext = class extends TtsButtonBase {
|
|
|
3707
3931
|
render() {
|
|
3708
3932
|
const count = this._tts?.elementCount ?? 0;
|
|
3709
3933
|
const atEnd = count > 0 && (this._tts?.currentElementIndex ?? 0) >= count - 1;
|
|
3710
|
-
return
|
|
3934
|
+
return html14`
|
|
3711
3935
|
<button
|
|
3712
3936
|
part="button"
|
|
3713
3937
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3721,7 +3945,7 @@ var TestTtsNext = class extends TtsButtonBase {
|
|
|
3721
3945
|
};
|
|
3722
3946
|
var TestTtsPick = class extends TtsButtonBase {
|
|
3723
3947
|
render() {
|
|
3724
|
-
return
|
|
3948
|
+
return html14`
|
|
3725
3949
|
<button
|
|
3726
3950
|
part="button"
|
|
3727
3951
|
aria-label=${ifDefined(this.label)}
|
|
@@ -3736,9 +3960,9 @@ var TestTtsPick = class extends TtsButtonBase {
|
|
|
3736
3960
|
|
|
3737
3961
|
// ../qti-test/dist/components/test-navigation/test-navigation.js
|
|
3738
3962
|
import { ContextConsumer, consume as consume9, provide as provide4 } from "@lit/context";
|
|
3739
|
-
import { html as
|
|
3740
|
-
import { property as
|
|
3741
|
-
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) {
|
|
3742
3966
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3743
3967
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3744
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;
|
|
@@ -3747,7 +3971,7 @@ var __decorate15 = function(decorators, target, key, desc) {
|
|
|
3747
3971
|
var newQtiContext = () => ({
|
|
3748
3972
|
QTI_CONTEXT: { testIdentifier: "", candidateIdentifier: "", environmentIdentifier: "default" }
|
|
3749
3973
|
});
|
|
3750
|
-
var TestNavigation = class extends
|
|
3974
|
+
var TestNavigation = class extends LitElement16 {
|
|
3751
3975
|
/**
|
|
3752
3976
|
* @deprecated Set `qtiContext` on `qti-test`, which provides it. This is an alias for the
|
|
3753
3977
|
* enclosing test's: reading returns it, writing replaces it, so a host that has always set the
|
|
@@ -3810,12 +4034,12 @@ var TestNavigation = class extends LitElement14 {
|
|
|
3810
4034
|
this.configContext = {};
|
|
3811
4035
|
this.autoScoreItems = false;
|
|
3812
4036
|
this.#optimality = /* @__PURE__ */ new Map();
|
|
3813
|
-
this
|
|
4037
|
+
listenPublic2(this, "cito-test-loaded", this.#handleTestConnected.bind(this));
|
|
3814
4038
|
this.addEventListener("qti-assessment-item-connected", this.#handleItemConnected.bind(this));
|
|
3815
|
-
this
|
|
4039
|
+
listenPublic(this, "cito-item-response-changed", this.#handleInteractionChanged.bind(this));
|
|
3816
4040
|
this.addEventListener("qti-item-context-updated", this.#handleItemContextUpdated.bind(this));
|
|
3817
|
-
this
|
|
3818
|
-
this
|
|
4041
|
+
listenPublic2(this, "cito-test-end-attempt", this.#handleTestEndAttempt.bind(this));
|
|
4042
|
+
listenPublic2(this, "cito-test-update-outcome", this.#handleTestUpdateOutcomeVariable.bind(this));
|
|
3819
4043
|
}
|
|
3820
4044
|
/**
|
|
3821
4045
|
* Latch whether an item reached its optimal outcome whenever it has just ended
|
|
@@ -3893,7 +4117,7 @@ var TestNavigation = class extends LitElement14 {
|
|
|
3893
4117
|
}
|
|
3894
4118
|
}
|
|
3895
4119
|
render() {
|
|
3896
|
-
return
|
|
4120
|
+
return html15`<slot></slot>`;
|
|
3897
4121
|
}
|
|
3898
4122
|
/* PK: on test connected we can build the computed context */
|
|
3899
4123
|
#handleTestConnected(event) {
|
|
@@ -4248,50 +4472,50 @@ var TestNavigation = class extends LitElement14 {
|
|
|
4248
4472
|
return Number.isNaN(parsed) ? null : parsed;
|
|
4249
4473
|
}
|
|
4250
4474
|
};
|
|
4251
|
-
|
|
4252
|
-
|
|
4475
|
+
__decorate16([
|
|
4476
|
+
property13({ type: String })
|
|
4253
4477
|
], TestNavigation.prototype, "identifier", void 0);
|
|
4254
|
-
|
|
4478
|
+
__decorate16([
|
|
4255
4479
|
state5()
|
|
4256
4480
|
], TestNavigation.prototype, "initContext", void 0);
|
|
4257
|
-
|
|
4481
|
+
__decorate16([
|
|
4258
4482
|
state5(),
|
|
4259
4483
|
consume9({ context: configContext, subscribe: true })
|
|
4260
4484
|
], TestNavigation.prototype, "configContext", void 0);
|
|
4261
|
-
|
|
4485
|
+
__decorate16([
|
|
4262
4486
|
state5(),
|
|
4263
4487
|
consume9({ context: testContext, subscribe: true })
|
|
4264
4488
|
], TestNavigation.prototype, "_testContext", void 0);
|
|
4265
|
-
|
|
4489
|
+
__decorate16([
|
|
4266
4490
|
state5(),
|
|
4267
4491
|
consume9({ context: sessionContext, subscribe: true })
|
|
4268
4492
|
], TestNavigation.prototype, "_sessionContext", void 0);
|
|
4269
|
-
|
|
4493
|
+
__decorate16([
|
|
4270
4494
|
state5(),
|
|
4271
4495
|
provide4({ context: computedContext })
|
|
4272
4496
|
], TestNavigation.prototype, "computedContext", void 0);
|
|
4273
|
-
|
|
4274
|
-
|
|
4497
|
+
__decorate16([
|
|
4498
|
+
property13({ type: Boolean, attribute: "auto-score-items" })
|
|
4275
4499
|
], TestNavigation.prototype, "autoScoreItems", void 0);
|
|
4276
4500
|
|
|
4277
4501
|
// ../qti-test/dist/components/test-next/test-next.js
|
|
4278
|
-
import { css as
|
|
4279
|
-
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";
|
|
4280
4504
|
import { consume as consume10 } from "@lit/context";
|
|
4281
|
-
var
|
|
4505
|
+
var __decorate17 = function(decorators, target, key, desc) {
|
|
4282
4506
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4283
4507
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4284
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;
|
|
4285
4509
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4286
4510
|
};
|
|
4287
|
-
var TestNext = class extends
|
|
4511
|
+
var TestNext = class extends LitElement17 {
|
|
4288
4512
|
_handleTestElementChange(_oldValue, newValue) {
|
|
4289
4513
|
if (newValue) {
|
|
4290
4514
|
this.requestUpdate();
|
|
4291
4515
|
}
|
|
4292
4516
|
}
|
|
4293
4517
|
static {
|
|
4294
|
-
this.styles =
|
|
4518
|
+
this.styles = css10`
|
|
4295
4519
|
:host {
|
|
4296
4520
|
${btn};
|
|
4297
4521
|
}
|
|
@@ -4345,39 +4569,32 @@ var TestNext = class extends LitElement15 {
|
|
|
4345
4569
|
this._internalDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= (this.sectionItems?.length ?? 0) - 1 || isLinearIndividual && !activeItem?.done;
|
|
4346
4570
|
}
|
|
4347
4571
|
_requestItem(identifier) {
|
|
4348
|
-
this
|
|
4349
|
-
composed: true,
|
|
4350
|
-
bubbles: true,
|
|
4351
|
-
detail: {
|
|
4352
|
-
type: "item",
|
|
4353
|
-
id: identifier
|
|
4354
|
-
}
|
|
4355
|
-
}));
|
|
4572
|
+
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
4356
4573
|
}
|
|
4357
4574
|
render() {
|
|
4358
|
-
return
|
|
4575
|
+
return html16`<slot></slot>`;
|
|
4359
4576
|
}
|
|
4360
4577
|
};
|
|
4361
|
-
|
|
4362
|
-
|
|
4578
|
+
__decorate17([
|
|
4579
|
+
property14({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
4363
4580
|
], TestNext.prototype, "_internalDisabled", void 0);
|
|
4364
|
-
|
|
4581
|
+
__decorate17([
|
|
4365
4582
|
consume10({ context: computedContext, subscribe: true })
|
|
4366
4583
|
], TestNext.prototype, "computedContext", void 0);
|
|
4367
|
-
|
|
4584
|
+
__decorate17([
|
|
4368
4585
|
watch("computedContext")
|
|
4369
4586
|
], TestNext.prototype, "_handleTestElementChange", null);
|
|
4370
4587
|
|
|
4371
4588
|
// ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
|
|
4372
|
-
import { html as
|
|
4589
|
+
import { html as html17, LitElement as LitElement18 } from "lit";
|
|
4373
4590
|
import { consume as consume11 } from "@lit/context";
|
|
4374
|
-
var
|
|
4591
|
+
var __decorate18 = function(decorators, target, key, desc) {
|
|
4375
4592
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4376
4593
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4377
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;
|
|
4378
4595
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4379
4596
|
};
|
|
4380
|
-
var TestPagingButtonsStamp = class extends
|
|
4597
|
+
var TestPagingButtonsStamp = class extends LitElement18 {
|
|
4381
4598
|
#internals;
|
|
4382
4599
|
createRenderRoot() {
|
|
4383
4600
|
return this;
|
|
@@ -4394,33 +4611,33 @@ var TestPagingButtonsStamp = class extends LitElement16 {
|
|
|
4394
4611
|
}
|
|
4395
4612
|
render() {
|
|
4396
4613
|
if (!this.computedContext)
|
|
4397
|
-
return
|
|
4614
|
+
return html17``;
|
|
4398
4615
|
const items = this.computedContext.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items));
|
|
4399
|
-
return
|
|
4616
|
+
return html17` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
|
|
4400
4617
|
}
|
|
4401
4618
|
};
|
|
4402
|
-
|
|
4619
|
+
__decorate18([
|
|
4403
4620
|
consume11({ context: computedContext, subscribe: true })
|
|
4404
4621
|
], TestPagingButtonsStamp.prototype, "computedContext", void 0);
|
|
4405
4622
|
|
|
4406
4623
|
// ../qti-test/dist/components/test-prev/test-prev.js
|
|
4407
|
-
import { css as
|
|
4408
|
-
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";
|
|
4409
4626
|
import { consume as consume12 } from "@lit/context";
|
|
4410
|
-
var
|
|
4627
|
+
var __decorate19 = function(decorators, target, key, desc) {
|
|
4411
4628
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4412
4629
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4413
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;
|
|
4414
4631
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4415
4632
|
};
|
|
4416
|
-
var TestPrev = class extends
|
|
4633
|
+
var TestPrev = class extends LitElement19 {
|
|
4417
4634
|
_handleTestElementChange(_oldValue, newValue) {
|
|
4418
4635
|
if (newValue) {
|
|
4419
4636
|
this.requestUpdate();
|
|
4420
4637
|
}
|
|
4421
4638
|
}
|
|
4422
4639
|
static {
|
|
4423
|
-
this.styles =
|
|
4640
|
+
this.styles = css11`
|
|
4424
4641
|
:host {
|
|
4425
4642
|
${btn};
|
|
4426
4643
|
}
|
|
@@ -4461,61 +4678,54 @@ var TestPrev = class extends LitElement17 {
|
|
|
4461
4678
|
this._internalDisabled = navigationMode === "linear" || !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;
|
|
4462
4679
|
}
|
|
4463
4680
|
_requestItem(identifier) {
|
|
4464
|
-
this
|
|
4465
|
-
composed: true,
|
|
4466
|
-
bubbles: true,
|
|
4467
|
-
detail: {
|
|
4468
|
-
type: "item",
|
|
4469
|
-
id: identifier
|
|
4470
|
-
}
|
|
4471
|
-
}));
|
|
4681
|
+
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
4472
4682
|
}
|
|
4473
4683
|
render() {
|
|
4474
|
-
return
|
|
4684
|
+
return html18`<slot></slot>`;
|
|
4475
4685
|
}
|
|
4476
4686
|
};
|
|
4477
|
-
|
|
4478
|
-
|
|
4687
|
+
__decorate19([
|
|
4688
|
+
property15({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
4479
4689
|
], TestPrev.prototype, "_internalDisabled", void 0);
|
|
4480
|
-
|
|
4690
|
+
__decorate19([
|
|
4481
4691
|
consume12({ context: computedContext, subscribe: true })
|
|
4482
4692
|
], TestPrev.prototype, "computedContext", void 0);
|
|
4483
|
-
|
|
4693
|
+
__decorate19([
|
|
4484
4694
|
watch("computedContext")
|
|
4485
4695
|
], TestPrev.prototype, "_handleTestElementChange", null);
|
|
4486
4696
|
|
|
4487
4697
|
// ../qti-test/dist/components/test-print-context/test-print-context.js
|
|
4488
|
-
import { html as
|
|
4698
|
+
import { html as html19, LitElement as LitElement20 } from "lit";
|
|
4489
4699
|
import { consume as consume13 } from "@lit/context";
|
|
4490
4700
|
import { state as state6 } from "lit/decorators.js";
|
|
4491
|
-
var
|
|
4701
|
+
var __decorate20 = function(decorators, target, key, desc) {
|
|
4492
4702
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4493
4703
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4494
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;
|
|
4495
4705
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4496
4706
|
};
|
|
4497
|
-
var TestPrintContext = class extends
|
|
4707
|
+
var TestPrintContext = class extends LitElement20 {
|
|
4498
4708
|
render() {
|
|
4499
|
-
return
|
|
4709
|
+
return html19` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
|
|
4500
4710
|
}
|
|
4501
4711
|
};
|
|
4502
|
-
|
|
4712
|
+
__decorate20([
|
|
4503
4713
|
state6(),
|
|
4504
4714
|
consume13({ context: computedContext, subscribe: true })
|
|
4505
4715
|
], TestPrintContext.prototype, "computedContext", void 0);
|
|
4506
4716
|
|
|
4507
4717
|
// ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
|
|
4508
|
-
import { html as
|
|
4718
|
+
import { html as html20, css as css12, LitElement as LitElement21 } from "lit";
|
|
4509
4719
|
import { consume as consume14 } from "@lit/context";
|
|
4510
|
-
var
|
|
4720
|
+
var __decorate21 = function(decorators, target, key, desc) {
|
|
4511
4721
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4512
4722
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4513
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;
|
|
4514
4724
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4515
4725
|
};
|
|
4516
|
-
var TestPrintVariables = class extends
|
|
4726
|
+
var TestPrintVariables = class extends LitElement21 {
|
|
4517
4727
|
static {
|
|
4518
|
-
this.styles =
|
|
4728
|
+
this.styles = css12`
|
|
4519
4729
|
table {
|
|
4520
4730
|
width: 100%;
|
|
4521
4731
|
border-collapse: collapse;
|
|
@@ -4541,10 +4751,10 @@ var TestPrintVariables = class extends LitElement19 {
|
|
|
4541
4751
|
render() {
|
|
4542
4752
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
4543
4753
|
if (!activeItem || !activeItem.variables)
|
|
4544
|
-
return
|
|
4754
|
+
return html20``;
|
|
4545
4755
|
const responseVariables = activeItem.variables.filter((v) => v.type === "response");
|
|
4546
4756
|
const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
|
|
4547
|
-
const renderTable = (variables, title) =>
|
|
4757
|
+
const renderTable = (variables, title) => html20`
|
|
4548
4758
|
<h3>${title}</h3>
|
|
4549
4759
|
<table>
|
|
4550
4760
|
<thead>
|
|
@@ -4561,7 +4771,7 @@ var TestPrintVariables = class extends LitElement19 {
|
|
|
4561
4771
|
const correctResponse = v.correctResponse ? Array.isArray(v.correctResponse) ? v.correctResponse.join(", ") : v.correctResponse : "";
|
|
4562
4772
|
const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
|
|
4563
4773
|
const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
|
|
4564
|
-
return
|
|
4774
|
+
return html20`
|
|
4565
4775
|
<tr>
|
|
4566
4776
|
<td>${v.identifier}</td>
|
|
4567
4777
|
<td>${Array.isArray(v.value) ? v.value.join(", ") : v.value}</td>
|
|
@@ -4574,26 +4784,26 @@ var TestPrintVariables = class extends LitElement19 {
|
|
|
4574
4784
|
</tbody>
|
|
4575
4785
|
</table>
|
|
4576
4786
|
`;
|
|
4577
|
-
return
|
|
4787
|
+
return html20`
|
|
4578
4788
|
${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
|
|
4579
4789
|
`;
|
|
4580
4790
|
}
|
|
4581
4791
|
};
|
|
4582
|
-
|
|
4792
|
+
__decorate21([
|
|
4583
4793
|
consume14({ context: computedContext, subscribe: true })
|
|
4584
4794
|
], TestPrintVariables.prototype, "computedContext", void 0);
|
|
4585
4795
|
|
|
4586
4796
|
// ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
|
|
4587
|
-
import { html as
|
|
4797
|
+
import { html as html21, LitElement as LitElement22, nothing as nothing3 } from "lit";
|
|
4588
4798
|
import { consume as consume15 } from "@lit/context";
|
|
4589
|
-
import { property as
|
|
4590
|
-
var
|
|
4799
|
+
import { property as property16 } from "lit/decorators.js";
|
|
4800
|
+
var __decorate22 = function(decorators, target, key, desc) {
|
|
4591
4801
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4592
4802
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4593
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;
|
|
4594
4804
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4595
4805
|
};
|
|
4596
|
-
var TestScoringButtons = class extends
|
|
4806
|
+
var TestScoringButtons = class extends LitElement22 {
|
|
4597
4807
|
createRenderRoot() {
|
|
4598
4808
|
return this;
|
|
4599
4809
|
}
|
|
@@ -4610,19 +4820,16 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4610
4820
|
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
4611
4821
|
const sectionItems = testPart.sections.flatMap((section) => section.items);
|
|
4612
4822
|
const currentItemIdentifier = sectionItems.find((item) => item.active)?.identifier;
|
|
4613
|
-
this
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
},
|
|
4619
|
-
bubbles: true
|
|
4620
|
-
}));
|
|
4823
|
+
dispatchPublic(this, "cito-test-update-outcome", {
|
|
4824
|
+
assessmentItemRefId: currentItemIdentifier,
|
|
4825
|
+
outcomeVariableId: "SCORE",
|
|
4826
|
+
value
|
|
4827
|
+
});
|
|
4621
4828
|
}
|
|
4622
4829
|
render() {
|
|
4623
4830
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
4624
4831
|
if (!activeItem || !activeItem.variables)
|
|
4625
|
-
return
|
|
4832
|
+
return html21``;
|
|
4626
4833
|
const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
4627
4834
|
const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
|
|
4628
4835
|
const score = scoreOutcome?.value;
|
|
@@ -4630,7 +4837,7 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4630
4837
|
if (!maxScore || !scoreOutcome)
|
|
4631
4838
|
return nothing3;
|
|
4632
4839
|
const scores = [...Array(Number(maxScore) + 1).keys()];
|
|
4633
|
-
return
|
|
4840
|
+
return html21`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing3}`;
|
|
4634
4841
|
}
|
|
4635
4842
|
constructor() {
|
|
4636
4843
|
super();
|
|
@@ -4646,27 +4853,27 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4646
4853
|
});
|
|
4647
4854
|
}
|
|
4648
4855
|
};
|
|
4649
|
-
|
|
4650
|
-
|
|
4856
|
+
__decorate22([
|
|
4857
|
+
property16({ type: String, attribute: "view" })
|
|
4651
4858
|
], TestScoringButtons.prototype, "view", void 0);
|
|
4652
|
-
|
|
4653
|
-
|
|
4859
|
+
__decorate22([
|
|
4860
|
+
property16({ type: Boolean })
|
|
4654
4861
|
], TestScoringButtons.prototype, "disabled", void 0);
|
|
4655
|
-
|
|
4862
|
+
__decorate22([
|
|
4656
4863
|
consume15({ context: computedContext, subscribe: true })
|
|
4657
4864
|
], TestScoringButtons.prototype, "computedContext", void 0);
|
|
4658
4865
|
|
|
4659
4866
|
// ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
|
|
4660
4867
|
import { consume as consume16 } from "@lit/context";
|
|
4661
|
-
import { html as
|
|
4662
|
-
import { property as
|
|
4663
|
-
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) {
|
|
4664
4871
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4665
4872
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4666
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;
|
|
4667
4874
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4668
4875
|
};
|
|
4669
|
-
var TestScoringFeedback = class extends
|
|
4876
|
+
var TestScoringFeedback = class extends LitElement23 {
|
|
4670
4877
|
constructor() {
|
|
4671
4878
|
super(...arguments);
|
|
4672
4879
|
this.view = null;
|
|
@@ -4674,9 +4881,9 @@ var TestScoringFeedback = class extends LitElement21 {
|
|
|
4674
4881
|
render() {
|
|
4675
4882
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
4676
4883
|
if (!activeItem || !activeItem.variables)
|
|
4677
|
-
return
|
|
4884
|
+
return html22``;
|
|
4678
4885
|
if (activeItem["category"] === "dep-informational")
|
|
4679
|
-
return
|
|
4886
|
+
return html22`<div>${this.dataset.informational}</div>`;
|
|
4680
4887
|
const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
|
|
4681
4888
|
const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
|
|
4682
4889
|
const score = parseFloat(scoreOutcome?.value);
|
|
@@ -4696,26 +4903,26 @@ var TestScoringFeedback = class extends LitElement21 {
|
|
|
4696
4903
|
}
|
|
4697
4904
|
return this.dataset.inProgress;
|
|
4698
4905
|
};
|
|
4699
|
-
return
|
|
4906
|
+
return html22`<div>${feedbackText()}</div>`;
|
|
4700
4907
|
}
|
|
4701
4908
|
};
|
|
4702
|
-
|
|
4909
|
+
__decorate23([
|
|
4703
4910
|
consume16({ context: computedContext, subscribe: true })
|
|
4704
4911
|
], TestScoringFeedback.prototype, "computedContext", void 0);
|
|
4705
|
-
|
|
4706
|
-
|
|
4912
|
+
__decorate23([
|
|
4913
|
+
property17({ type: String, attribute: "view" })
|
|
4707
4914
|
], TestScoringFeedback.prototype, "view", void 0);
|
|
4708
4915
|
|
|
4709
4916
|
// ../qti-test/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js
|
|
4710
|
-
import { html as
|
|
4917
|
+
import { html as html23, LitElement as LitElement24 } from "lit";
|
|
4711
4918
|
import { consume as consume17 } from "@lit/context";
|
|
4712
|
-
var
|
|
4919
|
+
var __decorate24 = function(decorators, target, key, desc) {
|
|
4713
4920
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4714
4921
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4715
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;
|
|
4716
4923
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4717
4924
|
};
|
|
4718
|
-
var TestSectionButtonsStamp = class extends
|
|
4925
|
+
var TestSectionButtonsStamp = class extends LitElement24 {
|
|
4719
4926
|
#internals;
|
|
4720
4927
|
createRenderRoot() {
|
|
4721
4928
|
return this;
|
|
@@ -4732,27 +4939,27 @@ var TestSectionButtonsStamp = class extends LitElement22 {
|
|
|
4732
4939
|
}
|
|
4733
4940
|
render() {
|
|
4734
4941
|
if (!this.computedContext)
|
|
4735
|
-
return
|
|
4942
|
+
return html23``;
|
|
4736
4943
|
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
4737
|
-
return
|
|
4944
|
+
return html23` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
4738
4945
|
}
|
|
4739
4946
|
};
|
|
4740
|
-
|
|
4947
|
+
__decorate24([
|
|
4741
4948
|
consume17({ context: computedContext, subscribe: true })
|
|
4742
4949
|
], TestSectionButtonsStamp.prototype, "computedContext", void 0);
|
|
4743
4950
|
|
|
4744
4951
|
// ../qti-test/dist/components/test-section-link/test-section-link.js
|
|
4745
|
-
import { css as
|
|
4746
|
-
import { property as
|
|
4747
|
-
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) {
|
|
4748
4955
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4749
4956
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4750
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;
|
|
4751
4958
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4752
4959
|
};
|
|
4753
|
-
var TestSectionLink = class extends
|
|
4960
|
+
var TestSectionLink = class extends LitElement25 {
|
|
4754
4961
|
static {
|
|
4755
|
-
this.styles =
|
|
4962
|
+
this.styles = css13`
|
|
4756
4963
|
:host {
|
|
4757
4964
|
${btn};
|
|
4758
4965
|
}
|
|
@@ -4768,14 +4975,7 @@ var TestSectionLink = class extends LitElement23 {
|
|
|
4768
4975
|
`;
|
|
4769
4976
|
}
|
|
4770
4977
|
#requestItem(identifier) {
|
|
4771
|
-
this
|
|
4772
|
-
composed: true,
|
|
4773
|
-
bubbles: true,
|
|
4774
|
-
detail: {
|
|
4775
|
-
type: "section",
|
|
4776
|
-
id: identifier
|
|
4777
|
-
}
|
|
4778
|
-
}));
|
|
4978
|
+
dispatchPublic(this, "cito-test-navigate", { type: "section", id: identifier });
|
|
4779
4979
|
}
|
|
4780
4980
|
constructor() {
|
|
4781
4981
|
super();
|
|
@@ -4783,24 +4983,24 @@ var TestSectionLink = class extends LitElement23 {
|
|
|
4783
4983
|
this.addEventListener("click", () => this.#requestItem(this.sectionId));
|
|
4784
4984
|
}
|
|
4785
4985
|
render() {
|
|
4786
|
-
return
|
|
4986
|
+
return html24` <slot></slot> `;
|
|
4787
4987
|
}
|
|
4788
4988
|
};
|
|
4789
|
-
|
|
4790
|
-
|
|
4989
|
+
__decorate25([
|
|
4990
|
+
property18({ type: String, attribute: "section-id" })
|
|
4791
4991
|
], TestSectionLink.prototype, "sectionId", void 0);
|
|
4792
4992
|
|
|
4793
4993
|
// ../qti-test/dist/components/test-stamp/test-stamp.js
|
|
4794
|
-
import { html as
|
|
4795
|
-
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";
|
|
4796
4996
|
import { consume as consume18 } from "@lit/context";
|
|
4797
|
-
var
|
|
4997
|
+
var __decorate26 = function(decorators, target, key, desc) {
|
|
4798
4998
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4799
4999
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4800
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;
|
|
4801
5001
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4802
5002
|
};
|
|
4803
|
-
var TestStamp = class extends
|
|
5003
|
+
var TestStamp = class extends LitElement26 {
|
|
4804
5004
|
constructor() {
|
|
4805
5005
|
super(...arguments);
|
|
4806
5006
|
this.debug = false;
|
|
@@ -4863,33 +5063,33 @@ var TestStamp = class extends LitElement24 {
|
|
|
4863
5063
|
}));
|
|
4864
5064
|
}
|
|
4865
5065
|
render() {
|
|
4866
|
-
return
|
|
5066
|
+
return html25` ${this.debug ? html25`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing4}
|
|
4867
5067
|
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing4}`;
|
|
4868
5068
|
}
|
|
4869
5069
|
};
|
|
4870
|
-
|
|
4871
|
-
|
|
5070
|
+
__decorate26([
|
|
5071
|
+
property19({ type: Boolean, reflect: true })
|
|
4872
5072
|
], TestStamp.prototype, "debug", void 0);
|
|
4873
|
-
|
|
5073
|
+
__decorate26([
|
|
4874
5074
|
state7(),
|
|
4875
5075
|
consume18({ context: computedContext, subscribe: true })
|
|
4876
5076
|
], TestStamp.prototype, "computedContext", void 0);
|
|
4877
|
-
|
|
5077
|
+
__decorate26([
|
|
4878
5078
|
state7()
|
|
4879
5079
|
], TestStamp.prototype, "stampContext", void 0);
|
|
4880
5080
|
|
|
4881
5081
|
// ../qti-test/dist/components/test-view-toggle/test-view.js
|
|
4882
|
-
import { html as
|
|
4883
|
-
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";
|
|
4884
5084
|
import { consume as consume19 } from "@lit/context";
|
|
4885
|
-
var
|
|
5085
|
+
var __decorate27 = function(decorators, target, key, desc) {
|
|
4886
5086
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4887
5087
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4888
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;
|
|
4889
5089
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4890
5090
|
};
|
|
4891
5091
|
var _a;
|
|
4892
|
-
var TestView = class extends
|
|
5092
|
+
var TestView = class extends LitElement27 {
|
|
4893
5093
|
constructor() {
|
|
4894
5094
|
super(...arguments);
|
|
4895
5095
|
this.label = "view";
|
|
@@ -4914,14 +5114,10 @@ var TestView = class extends LitElement25 {
|
|
|
4914
5114
|
}
|
|
4915
5115
|
}
|
|
4916
5116
|
_switchView(view) {
|
|
4917
|
-
this
|
|
4918
|
-
composed: true,
|
|
4919
|
-
bubbles: true,
|
|
4920
|
-
detail: view
|
|
4921
|
-
}));
|
|
5117
|
+
dispatchPublic(this, "cito-test-switch-view", view);
|
|
4922
5118
|
}
|
|
4923
5119
|
render() {
|
|
4924
|
-
return
|
|
5120
|
+
return html26`
|
|
4925
5121
|
<label part="label" for="viewSelect">${this.label}</label>
|
|
4926
5122
|
<select
|
|
4927
5123
|
part="select"
|
|
@@ -4931,38 +5127,38 @@ var TestView = class extends LitElement25 {
|
|
|
4931
5127
|
this._switchView(el.value);
|
|
4932
5128
|
}}
|
|
4933
5129
|
>
|
|
4934
|
-
${this._viewOptions.map((v) =>
|
|
5130
|
+
${this._viewOptions.map((v) => html26`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
|
|
4935
5131
|
</select>
|
|
4936
5132
|
`;
|
|
4937
5133
|
}
|
|
4938
5134
|
};
|
|
4939
5135
|
_a = TestView;
|
|
4940
|
-
|
|
5136
|
+
__decorate27([
|
|
4941
5137
|
consume19({ context: sessionContext, subscribe: true })
|
|
4942
5138
|
], TestView.prototype, "sessionContext", void 0);
|
|
4943
|
-
|
|
4944
|
-
|
|
5139
|
+
__decorate27([
|
|
5140
|
+
property20({ type: String })
|
|
4945
5141
|
], TestView.prototype, "label", void 0);
|
|
4946
|
-
|
|
4947
|
-
|
|
5142
|
+
__decorate27([
|
|
5143
|
+
property20({ type: String, attribute: "view-options" })
|
|
4948
5144
|
], TestView.prototype, "viewOptions", void 0);
|
|
4949
|
-
|
|
5145
|
+
__decorate27([
|
|
4950
5146
|
watch("viewOptions", { waitUntilFirstUpdate: true })
|
|
4951
5147
|
], TestView.prototype, "_handleViewOptionsChange", void 0);
|
|
4952
|
-
|
|
5148
|
+
__decorate27([
|
|
4953
5149
|
state8()
|
|
4954
5150
|
], TestView.prototype, "_viewOptions", void 0);
|
|
4955
5151
|
|
|
4956
5152
|
// ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
|
|
4957
5153
|
import { consume as consume20 } from "@lit/context";
|
|
4958
|
-
import { html as
|
|
4959
|
-
var
|
|
5154
|
+
import { html as html27, LitElement as LitElement28, nothing as nothing5 } from "lit";
|
|
5155
|
+
var __decorate28 = function(decorators, target, key, desc) {
|
|
4960
5156
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4961
5157
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4962
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;
|
|
4963
5159
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4964
5160
|
};
|
|
4965
|
-
var TestViewToggle = class extends
|
|
5161
|
+
var TestViewToggle = class extends LitElement28 {
|
|
4966
5162
|
createRenderRoot() {
|
|
4967
5163
|
return this;
|
|
4968
5164
|
}
|
|
@@ -4976,11 +5172,7 @@ var TestViewToggle = class extends LitElement26 {
|
|
|
4976
5172
|
this.myTemplate = prepareTemplate(templateElement);
|
|
4977
5173
|
}
|
|
4978
5174
|
_switchView(view) {
|
|
4979
|
-
this
|
|
4980
|
-
composed: true,
|
|
4981
|
-
bubbles: true,
|
|
4982
|
-
detail: view
|
|
4983
|
-
}));
|
|
5175
|
+
dispatchPublic(this, "cito-test-switch-view", view);
|
|
4984
5176
|
}
|
|
4985
5177
|
firstUpdated(_changedProperties) {
|
|
4986
5178
|
this.addEventListener("click", () => {
|
|
@@ -4992,12 +5184,12 @@ var TestViewToggle = class extends LitElement26 {
|
|
|
4992
5184
|
});
|
|
4993
5185
|
}
|
|
4994
5186
|
render() {
|
|
4995
|
-
return
|
|
5187
|
+
return html27`${this.myTemplate ? this.myTemplate({
|
|
4996
5188
|
view: this.sessionContext?.view
|
|
4997
5189
|
}) : nothing5}`;
|
|
4998
5190
|
}
|
|
4999
5191
|
};
|
|
5000
|
-
|
|
5192
|
+
__decorate28([
|
|
5001
5193
|
consume20({ context: sessionContext, subscribe: true })
|
|
5002
5194
|
], TestViewToggle.prototype, "sessionContext", void 0);
|
|
5003
5195
|
|
|
@@ -5006,9 +5198,11 @@ var qtiTestElements = [
|
|
|
5006
5198
|
{ tag: "qti-assessment-item-ref", ctor: QtiAssessmentItemRef },
|
|
5007
5199
|
{ tag: "qti-assessment-section", ctor: QtiAssessmentSection },
|
|
5008
5200
|
{ tag: "qti-assessment-test", ctor: QtiAssessmentTest },
|
|
5201
|
+
{ tag: "qti-branch-rule", ctor: QtiBranchRule },
|
|
5009
5202
|
{ tag: "qti-item-session-control", ctor: QtiItemSessionControl },
|
|
5010
5203
|
{ tag: "qti-number-selected", ctor: QtiNumberSelected },
|
|
5011
5204
|
{ tag: "qti-outcome-processing", ctor: QtiOutcomeProcessing },
|
|
5205
|
+
{ tag: "qti-pre-condition", ctor: QtiPreCondition },
|
|
5012
5206
|
{ tag: "qti-test", ctor: QtiTest },
|
|
5013
5207
|
{ tag: "qti-test-feedback", ctor: QtiTestFeedback },
|
|
5014
5208
|
{ tag: "qti-test-part", ctor: QtiTestPart },
|
|
@@ -5044,8 +5238,10 @@ export {
|
|
|
5044
5238
|
QtiAssessmentItemRef,
|
|
5045
5239
|
QtiAssessmentSection,
|
|
5046
5240
|
QtiAssessmentTest,
|
|
5241
|
+
QtiBranchRule,
|
|
5047
5242
|
QtiItemSessionControl,
|
|
5048
5243
|
QtiNumberSelected,
|
|
5244
|
+
QtiPreCondition,
|
|
5049
5245
|
QtiOutcomeProcessing,
|
|
5050
5246
|
QtiOutcomeProcessingProcessor,
|
|
5051
5247
|
QtiTestFeedback,
|
|
@@ -5094,4 +5290,4 @@ export {
|
|
|
5094
5290
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
5095
5291
|
*)
|
|
5096
5292
|
*/
|
|
5097
|
-
//# sourceMappingURL=chunk-
|
|
5293
|
+
//# sourceMappingURL=chunk-CKJ7M7JQ.js.map
|