@citolab/qti-components 9.4.0 → 10.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +262 -223
- package/dist/{chunk-XEWGFAS4.js → chunk-AWTQKBC4.js} +66 -26
- package/dist/chunk-AWTQKBC4.js.map +1 -0
- package/dist/{chunk-MSGYZE6L.js → chunk-CNFVA3AA.js} +127 -47
- package/dist/chunk-CNFVA3AA.js.map +1 -0
- package/dist/{chunk-LKHRHFXO.js → chunk-EPSUZIWL.js} +5 -5
- package/dist/{chunk-GNTO3IFM.js → chunk-EUKU5QKV.js} +79 -106
- package/dist/chunk-EUKU5QKV.js.map +1 -0
- package/dist/{chunk-B74SYQB2.js → chunk-F7R7GSWL.js} +2 -2
- package/dist/{chunk-C3JPUV36.js → chunk-GPNWMLLA.js} +2 -2
- package/dist/{chunk-JHPQJDAV.js → chunk-QD3Y6UK3.js} +2 -2
- package/dist/{chunk-B5XHZI2P.js → chunk-SVYHZIJ7.js} +2 -2
- package/dist/{chunk-BMXG7D2N.js → chunk-WNAOVXXN.js} +2 -2
- package/dist/chunk-ZP6QQYSU.js +7 -0
- package/dist/chunk-ZP6QQYSU.js.map +1 -0
- package/dist/corrections.d.ts +2 -2
- package/dist/corrections.js +6 -6
- package/dist/elements.d.ts +64 -2
- package/dist/elements.js +14 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +21 -11
- package/dist/interactions.d.ts +2 -2
- package/dist/interactions.js +2 -2
- package/dist/item.css +11 -0
- package/dist/item.js +3 -3
- package/dist/loader.d.ts +1 -1
- package/dist/qti-components-jsx.d.ts +18 -191
- package/dist/{qti-test.d-Cud5Gvy0.d.ts → qti-test.d-_THYXPzd.d.ts} +5 -7
- 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 +2 -2
- package/dist/test.js +4 -4
- package/package.json +8 -8
- 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-XEWGFAS4.js.map +0 -1
- /package/dist/{chunk-LKHRHFXO.js.map → chunk-EPSUZIWL.js.map} +0 -0
- /package/dist/{chunk-B74SYQB2.js.map → chunk-F7R7GSWL.js.map} +0 -0
- /package/dist/{chunk-C3JPUV36.js.map → chunk-GPNWMLLA.js.map} +0 -0
- /package/dist/{chunk-JHPQJDAV.js.map → chunk-QD3Y6UK3.js.map} +0 -0
- /package/dist/{chunk-B5XHZI2P.js.map → chunk-SVYHZIJ7.js.map} +0 -0
- /package/dist/{chunk-BMXG7D2N.js.map → chunk-WNAOVXXN.js.map} +0 -0
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
QtiTest,
|
|
3
3
|
TestCheckItem,
|
|
4
4
|
TestNavigation
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EUKU5QKV.js";
|
|
6
6
|
import {
|
|
7
7
|
QtiAssessmentItem
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AWTQKBC4.js";
|
|
9
9
|
import {
|
|
10
10
|
QtiAssociateInteraction,
|
|
11
11
|
QtiChoiceInteraction,
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
QtiSimpleChoice,
|
|
29
29
|
QtiSliderInteraction,
|
|
30
30
|
QtiTextEntryInteraction
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CNFVA3AA.js";
|
|
32
32
|
import {
|
|
33
33
|
QtiItem
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-F7R7GSWL.js";
|
|
35
35
|
import {
|
|
36
36
|
watch
|
|
37
37
|
} from "./chunk-4DB4SC5K.js";
|
|
@@ -1661,4 +1661,4 @@ export {
|
|
|
1661
1661
|
QtiTestCorrection,
|
|
1662
1662
|
TestCheckItemCorrection
|
|
1663
1663
|
};
|
|
1664
|
-
//# sourceMappingURL=chunk-
|
|
1664
|
+
//# sourceMappingURL=chunk-EPSUZIWL.js.map
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
QtiModalFeedback
|
|
3
|
-
|
|
2
|
+
QtiModalFeedback,
|
|
3
|
+
dispatchDeclared,
|
|
4
|
+
listenDeclared,
|
|
5
|
+
listenPublic
|
|
6
|
+
} from "./chunk-AWTQKBC4.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";
|
|
@@ -1100,6 +1103,31 @@ 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-item-ref-connected": { kind: "notification", scope: "item", deprecated: "qti-assessment-item-ref-connected" }
|
|
1123
|
+
};
|
|
1124
|
+
function dispatchPublic(target, name, detail) {
|
|
1125
|
+
dispatchDeclared(target, PUBLIC_EVENTS, name, detail);
|
|
1126
|
+
}
|
|
1127
|
+
function listenPublic2(target, name, handler) {
|
|
1128
|
+
listenDeclared(target, PUBLIC_EVENTS, name, handler);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1103
1131
|
// ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
|
|
1104
1132
|
var __decorate = function(decorators, target, key, desc) {
|
|
1105
1133
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1161,11 +1189,11 @@ var QtiAssessmentItemRef = class extends LitElement {
|
|
|
1161
1189
|
this.myTemplate = templateElement ? prepareTemplate(templateElement) : null;
|
|
1162
1190
|
this.requestUpdate();
|
|
1163
1191
|
await this.updateComplete;
|
|
1164
|
-
this
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
})
|
|
1192
|
+
dispatchPublic(this, "cito-item-ref-connected", {
|
|
1193
|
+
identifier: this.identifier,
|
|
1194
|
+
href: this.href,
|
|
1195
|
+
category: this.category
|
|
1196
|
+
});
|
|
1169
1197
|
}
|
|
1170
1198
|
#computedItem() {
|
|
1171
1199
|
for (const testPart of this.computedContext?.testParts ?? []) {
|
|
@@ -1326,11 +1354,7 @@ var QtiAssessmentTest = class extends LitElement3 {
|
|
|
1326
1354
|
async connectedCallback() {
|
|
1327
1355
|
super.connectedCallback();
|
|
1328
1356
|
await this.updateComplete;
|
|
1329
|
-
this
|
|
1330
|
-
detail: this,
|
|
1331
|
-
bubbles: true,
|
|
1332
|
-
composed: true
|
|
1333
|
-
}));
|
|
1357
|
+
dispatchPublic(this, "cito-test-loaded", this);
|
|
1334
1358
|
}
|
|
1335
1359
|
render() {
|
|
1336
1360
|
return html2` <slot></slot>`;
|
|
@@ -1439,7 +1463,7 @@ var QtiNumberSelected = class extends QtiExpression {
|
|
|
1439
1463
|
#connectedTest = null;
|
|
1440
1464
|
constructor() {
|
|
1441
1465
|
super();
|
|
1442
|
-
this
|
|
1466
|
+
listenPublic2(this, "cito-test-loaded", (e) => this.#connectedTest = e.detail);
|
|
1443
1467
|
}
|
|
1444
1468
|
/**
|
|
1445
1469
|
* `qti-assessment-test-connected` bubbles *up* from the test element, and this
|
|
@@ -1576,7 +1600,7 @@ var QtiTestVariables = class extends QtiExpression {
|
|
|
1576
1600
|
#connectedTest = null;
|
|
1577
1601
|
constructor() {
|
|
1578
1602
|
super();
|
|
1579
|
-
this
|
|
1603
|
+
listenPublic2(this, "cito-test-loaded", (e) => this.#connectedTest = e.detail);
|
|
1580
1604
|
}
|
|
1581
1605
|
/**
|
|
1582
1606
|
* `qti-assessment-test-connected` bubbles *up* from the test element, and this
|
|
@@ -1685,19 +1709,15 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1685
1709
|
navigateTo(type, id) {
|
|
1686
1710
|
const targetId = id || this._getDefaultNavigationId(type);
|
|
1687
1711
|
if (targetId) {
|
|
1688
|
-
this
|
|
1689
|
-
detail: { type, id: targetId },
|
|
1690
|
-
bubbles: true,
|
|
1691
|
-
composed: true
|
|
1692
|
-
}));
|
|
1712
|
+
dispatchPublic(this, "cito-test-navigate", { type, id: targetId });
|
|
1693
1713
|
}
|
|
1694
1714
|
}
|
|
1695
1715
|
// ===========================================
|
|
1696
1716
|
// EVENT HANDLER SETUP
|
|
1697
1717
|
// ===========================================
|
|
1698
1718
|
_bindEventHandlers() {
|
|
1699
|
-
this
|
|
1700
|
-
this
|
|
1719
|
+
listenPublic2(this, "cito-test-navigate", this._handleNavigationRequest.bind(this));
|
|
1720
|
+
listenPublic2(this, "cito-test-loaded", this._handleTestConnected.bind(this));
|
|
1701
1721
|
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
1702
1722
|
this.addEventListener("qti-assessment-stimulus-ref-connected", this._handleStimulusRefConnected.bind(this));
|
|
1703
1723
|
}
|
|
@@ -1847,7 +1867,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1847
1867
|
await this._waitForLoadingComplete(navigationId, controller);
|
|
1848
1868
|
if (this._isStaleNavigation(navigationId, controller))
|
|
1849
1869
|
return;
|
|
1850
|
-
this._dispatchTestLoaded(this._loadResults);
|
|
1870
|
+
this._dispatchTestLoaded(this._loadResults, "item", itemId);
|
|
1851
1871
|
}
|
|
1852
1872
|
/**
|
|
1853
1873
|
* Navigate to section with simple state tracking
|
|
@@ -1868,7 +1888,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
1868
1888
|
await this._waitForLoadingComplete(navigationId, controller);
|
|
1869
1889
|
if (this._isStaleNavigation(navigationId, controller))
|
|
1870
1890
|
return;
|
|
1871
|
-
this._dispatchTestLoaded(this._loadResults);
|
|
1891
|
+
this._dispatchTestLoaded(this._loadResults, "section", sectionId);
|
|
1872
1892
|
}
|
|
1873
1893
|
// ===========================================
|
|
1874
1894
|
// LOADING STATE MANAGEMENT
|
|
@@ -2089,11 +2109,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
2089
2109
|
// EVENT DISPATCHING
|
|
2090
2110
|
// ===========================================
|
|
2091
2111
|
_dispatchLoadingStarted(type, id) {
|
|
2092
|
-
this
|
|
2093
|
-
detail: { type, id },
|
|
2094
|
-
bubbles: true,
|
|
2095
|
-
composed: true
|
|
2096
|
-
}));
|
|
2112
|
+
dispatchPublic(this, "cito-test-navigation-started", { type, id });
|
|
2097
2113
|
}
|
|
2098
2114
|
_dispatchLoadingEnded(type, id) {
|
|
2099
2115
|
this.dispatchEvent(new CustomEvent("qti-navigation-loading-ended", {
|
|
@@ -2103,22 +2119,16 @@ var TestNavigationMixin = (superClass) => {
|
|
|
2103
2119
|
}));
|
|
2104
2120
|
}
|
|
2105
2121
|
_dispatchError(error) {
|
|
2106
|
-
this
|
|
2107
|
-
detail: error,
|
|
2108
|
-
bubbles: true,
|
|
2109
|
-
composed: true
|
|
2110
|
-
}));
|
|
2122
|
+
dispatchPublic(this, "cito-test-navigation-failed", error);
|
|
2111
2123
|
}
|
|
2112
|
-
|
|
2124
|
+
/** The items are in the DOM: tell hosts the new position rendered (`cito-test-navigated`) and which items it holds. */
|
|
2125
|
+
_dispatchTestLoaded(results, type, id) {
|
|
2113
2126
|
requestAnimationFrame(() => {
|
|
2114
|
-
this
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
bubbles: true,
|
|
2120
|
-
composed: true
|
|
2121
|
-
}));
|
|
2127
|
+
dispatchPublic(this, "cito-test-rendered", results.map(({ itemRef }) => ({
|
|
2128
|
+
identifier: itemRef?.identifier,
|
|
2129
|
+
element: itemRef
|
|
2130
|
+
})));
|
|
2131
|
+
dispatchPublic(this, "cito-test-navigated", { type, id });
|
|
2122
2132
|
});
|
|
2123
2133
|
}
|
|
2124
2134
|
}
|
|
@@ -2143,11 +2153,11 @@ var TestViewMixin = (superClass) => {
|
|
|
2143
2153
|
constructor(...args) {
|
|
2144
2154
|
super(...args);
|
|
2145
2155
|
this.sessionContext = { ...this.sessionContext, view: "candidate" };
|
|
2146
|
-
this
|
|
2156
|
+
listenPublic2(this, "cito-test-switch-view", (e) => {
|
|
2147
2157
|
this.sessionContext = { ...this.sessionContext, view: e.detail };
|
|
2148
2158
|
this._updateElementView();
|
|
2149
2159
|
});
|
|
2150
|
-
this
|
|
2160
|
+
listenPublic2(this, "cito-test-loaded", () => {
|
|
2151
2161
|
this._updateElementView();
|
|
2152
2162
|
});
|
|
2153
2163
|
this.addEventListener("qti-assessment-item-connected", (e) => {
|
|
@@ -2277,7 +2287,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
2277
2287
|
this.testContext = INITIAL_TEST_CONTEXT;
|
|
2278
2288
|
this.sessionContext = INITIAL_SESSION_CONTEXT;
|
|
2279
2289
|
});
|
|
2280
|
-
this
|
|
2290
|
+
listenPublic2(this, "cito-test-loaded", (e) => {
|
|
2281
2291
|
this._testElement = e.detail;
|
|
2282
2292
|
const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
|
|
2283
2293
|
return {
|
|
@@ -2386,7 +2396,7 @@ var TestStateMixin = (superClass) => {
|
|
|
2386
2396
|
this.#ready = false;
|
|
2387
2397
|
this.#lastEmitted = null;
|
|
2388
2398
|
});
|
|
2389
|
-
this
|
|
2399
|
+
listenPublic2(this, "cito-test-loaded", () => {
|
|
2390
2400
|
if (this.#pending) {
|
|
2391
2401
|
this.#apply(this.#pending);
|
|
2392
2402
|
this.#pending = null;
|
|
@@ -2424,7 +2434,7 @@ var TestStateMixin = (superClass) => {
|
|
|
2424
2434
|
if (serialized === this.#lastEmitted)
|
|
2425
2435
|
return;
|
|
2426
2436
|
this.#lastEmitted = serialized;
|
|
2427
|
-
this
|
|
2437
|
+
dispatchPublic(this, "cito-test-state-changed", state9);
|
|
2428
2438
|
}
|
|
2429
2439
|
#apply(state9) {
|
|
2430
2440
|
for (const saved of state9.test.items)
|
|
@@ -2446,7 +2456,7 @@ var TestStateMixin = (superClass) => {
|
|
|
2446
2456
|
};
|
|
2447
2457
|
}
|
|
2448
2458
|
#requestNavigation(type, id) {
|
|
2449
|
-
this
|
|
2459
|
+
dispatchPublic(this, "cito-test-navigate", { type, id });
|
|
2450
2460
|
}
|
|
2451
2461
|
}
|
|
2452
2462
|
return TestStateClass;
|
|
@@ -2621,7 +2631,7 @@ var TestCheckItem = class extends LitElement9 {
|
|
|
2621
2631
|
constructor() {
|
|
2622
2632
|
super();
|
|
2623
2633
|
this.addEventListener("click", () => {
|
|
2624
|
-
this
|
|
2634
|
+
dispatchPublic(this, "cito-test-end-attempt", {});
|
|
2625
2635
|
const testContainer = this.testHost?.querySelector("test-container");
|
|
2626
2636
|
if (!testContainer)
|
|
2627
2637
|
return;
|
|
@@ -2814,7 +2824,7 @@ var TestEndAttempt = class extends LitElement11 {
|
|
|
2814
2824
|
this.addEventListener("click", (e) => {
|
|
2815
2825
|
e.preventDefault();
|
|
2816
2826
|
if (!this._internalDisabled) {
|
|
2817
|
-
this
|
|
2827
|
+
dispatchPublic(this, "cito-test-end-attempt", {});
|
|
2818
2828
|
}
|
|
2819
2829
|
});
|
|
2820
2830
|
}
|
|
@@ -2895,14 +2905,7 @@ var TestItemLink = class extends LitElement12 {
|
|
|
2895
2905
|
this.addEventListener("click", () => this._requestItem(this.itemId));
|
|
2896
2906
|
}
|
|
2897
2907
|
_requestItem(identifier) {
|
|
2898
|
-
this
|
|
2899
|
-
composed: true,
|
|
2900
|
-
bubbles: true,
|
|
2901
|
-
detail: {
|
|
2902
|
-
type: "item",
|
|
2903
|
-
id: identifier
|
|
2904
|
-
}
|
|
2905
|
-
}));
|
|
2908
|
+
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
2906
2909
|
}
|
|
2907
2910
|
render() {
|
|
2908
2911
|
return html11` <slot></slot> `;
|
|
@@ -3155,6 +3158,7 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3155
3158
|
this.#eventHost = this.#itemRef ?? this.closest("test-navigation") ?? this.testHost ?? this.getRootNode();
|
|
3156
3159
|
this.#eventHost.addEventListener("qti-assessment-item-connected", this.#boundHandleItemConnected);
|
|
3157
3160
|
if (!this.#itemRef) {
|
|
3161
|
+
this.#eventHost.addEventListener("cito-test-navigate", this.#boundHandleNavigation);
|
|
3158
3162
|
this.#eventHost.addEventListener("qti-request-navigation", this.#boundHandleNavigation);
|
|
3159
3163
|
}
|
|
3160
3164
|
}
|
|
@@ -3167,6 +3171,7 @@ var TestItemToSpeech = class extends LitElement13 {
|
|
|
3167
3171
|
this.#stopPicking();
|
|
3168
3172
|
this.#clearAllHighlights();
|
|
3169
3173
|
this.#eventHost?.removeEventListener("qti-assessment-item-connected", this.#boundHandleItemConnected);
|
|
3174
|
+
this.#eventHost?.removeEventListener("cito-test-navigate", this.#boundHandleNavigation);
|
|
3170
3175
|
this.#eventHost?.removeEventListener("qti-request-navigation", this.#boundHandleNavigation);
|
|
3171
3176
|
this.#eventHost = null;
|
|
3172
3177
|
this.#itemRef = null;
|
|
@@ -3810,12 +3815,12 @@ var TestNavigation = class extends LitElement14 {
|
|
|
3810
3815
|
this.configContext = {};
|
|
3811
3816
|
this.autoScoreItems = false;
|
|
3812
3817
|
this.#optimality = /* @__PURE__ */ new Map();
|
|
3813
|
-
this
|
|
3818
|
+
listenPublic2(this, "cito-test-loaded", this.#handleTestConnected.bind(this));
|
|
3814
3819
|
this.addEventListener("qti-assessment-item-connected", this.#handleItemConnected.bind(this));
|
|
3815
|
-
this
|
|
3820
|
+
listenPublic(this, "cito-item-response-changed", this.#handleInteractionChanged.bind(this));
|
|
3816
3821
|
this.addEventListener("qti-item-context-updated", this.#handleItemContextUpdated.bind(this));
|
|
3817
|
-
this
|
|
3818
|
-
this
|
|
3822
|
+
listenPublic2(this, "cito-test-end-attempt", this.#handleTestEndAttempt.bind(this));
|
|
3823
|
+
listenPublic2(this, "cito-test-update-outcome", this.#handleTestUpdateOutcomeVariable.bind(this));
|
|
3819
3824
|
}
|
|
3820
3825
|
/**
|
|
3821
3826
|
* Latch whether an item reached its optimal outcome whenever it has just ended
|
|
@@ -4345,14 +4350,7 @@ var TestNext = class extends LitElement15 {
|
|
|
4345
4350
|
this._internalDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= (this.sectionItems?.length ?? 0) - 1 || isLinearIndividual && !activeItem?.done;
|
|
4346
4351
|
}
|
|
4347
4352
|
_requestItem(identifier) {
|
|
4348
|
-
this
|
|
4349
|
-
composed: true,
|
|
4350
|
-
bubbles: true,
|
|
4351
|
-
detail: {
|
|
4352
|
-
type: "item",
|
|
4353
|
-
id: identifier
|
|
4354
|
-
}
|
|
4355
|
-
}));
|
|
4353
|
+
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
4356
4354
|
}
|
|
4357
4355
|
render() {
|
|
4358
4356
|
return html14`<slot></slot>`;
|
|
@@ -4461,14 +4459,7 @@ var TestPrev = class extends LitElement17 {
|
|
|
4461
4459
|
this._internalDisabled = navigationMode === "linear" || !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;
|
|
4462
4460
|
}
|
|
4463
4461
|
_requestItem(identifier) {
|
|
4464
|
-
this
|
|
4465
|
-
composed: true,
|
|
4466
|
-
bubbles: true,
|
|
4467
|
-
detail: {
|
|
4468
|
-
type: "item",
|
|
4469
|
-
id: identifier
|
|
4470
|
-
}
|
|
4471
|
-
}));
|
|
4462
|
+
dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
|
|
4472
4463
|
}
|
|
4473
4464
|
render() {
|
|
4474
4465
|
return html16`<slot></slot>`;
|
|
@@ -4610,14 +4601,11 @@ var TestScoringButtons = class extends LitElement20 {
|
|
|
4610
4601
|
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
4611
4602
|
const sectionItems = testPart.sections.flatMap((section) => section.items);
|
|
4612
4603
|
const currentItemIdentifier = sectionItems.find((item) => item.active)?.identifier;
|
|
4613
|
-
this
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
},
|
|
4619
|
-
bubbles: true
|
|
4620
|
-
}));
|
|
4604
|
+
dispatchPublic(this, "cito-test-update-outcome", {
|
|
4605
|
+
assessmentItemRefId: currentItemIdentifier,
|
|
4606
|
+
outcomeVariableId: "SCORE",
|
|
4607
|
+
value
|
|
4608
|
+
});
|
|
4621
4609
|
}
|
|
4622
4610
|
render() {
|
|
4623
4611
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
@@ -4768,14 +4756,7 @@ var TestSectionLink = class extends LitElement23 {
|
|
|
4768
4756
|
`;
|
|
4769
4757
|
}
|
|
4770
4758
|
#requestItem(identifier) {
|
|
4771
|
-
this
|
|
4772
|
-
composed: true,
|
|
4773
|
-
bubbles: true,
|
|
4774
|
-
detail: {
|
|
4775
|
-
type: "section",
|
|
4776
|
-
id: identifier
|
|
4777
|
-
}
|
|
4778
|
-
}));
|
|
4759
|
+
dispatchPublic(this, "cito-test-navigate", { type: "section", id: identifier });
|
|
4779
4760
|
}
|
|
4780
4761
|
constructor() {
|
|
4781
4762
|
super();
|
|
@@ -4914,11 +4895,7 @@ var TestView = class extends LitElement25 {
|
|
|
4914
4895
|
}
|
|
4915
4896
|
}
|
|
4916
4897
|
_switchView(view) {
|
|
4917
|
-
this
|
|
4918
|
-
composed: true,
|
|
4919
|
-
bubbles: true,
|
|
4920
|
-
detail: view
|
|
4921
|
-
}));
|
|
4898
|
+
dispatchPublic(this, "cito-test-switch-view", view);
|
|
4922
4899
|
}
|
|
4923
4900
|
render() {
|
|
4924
4901
|
return html24`
|
|
@@ -4976,11 +4953,7 @@ var TestViewToggle = class extends LitElement26 {
|
|
|
4976
4953
|
this.myTemplate = prepareTemplate(templateElement);
|
|
4977
4954
|
}
|
|
4978
4955
|
_switchView(view) {
|
|
4979
|
-
this
|
|
4980
|
-
composed: true,
|
|
4981
|
-
bubbles: true,
|
|
4982
|
-
detail: view
|
|
4983
|
-
}));
|
|
4956
|
+
dispatchPublic(this, "cito-test-switch-view", view);
|
|
4984
4957
|
}
|
|
4985
4958
|
firstUpdated(_changedProperties) {
|
|
4986
4959
|
this.addEventListener("click", () => {
|
|
@@ -5094,4 +5067,4 @@ export {
|
|
|
5094
5067
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
5095
5068
|
*)
|
|
5096
5069
|
*/
|
|
5097
|
-
//# sourceMappingURL=chunk-
|
|
5070
|
+
//# sourceMappingURL=chunk-EUKU5QKV.js.map
|