@citolab/qti-components 8.0.1 → 8.0.2
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 +103 -103
- package/dist/base.d.ts +3 -3
- package/dist/base.js +1 -1
- package/dist/chunk-4DB4SC5K.js +100 -0
- package/dist/chunk-4DB4SC5K.js.map +1 -0
- package/dist/{chunk-WVVMNF74.js → chunk-7AVWRQIS.js} +188 -160
- package/dist/{chunk-WVVMNF74.js.map → chunk-7AVWRQIS.js.map} +1 -1
- package/dist/{chunk-CAO4JRLY.js → chunk-BQFWCZFH.js} +2 -2
- package/dist/{chunk-LVBIQDPM.js → chunk-CK7AV2UJ.js} +147 -101
- package/dist/chunk-CK7AV2UJ.js.map +1 -0
- package/dist/{chunk-7HC5SMCU.js → chunk-G6GFQDVN.js} +1 -96
- package/dist/chunk-G6GFQDVN.js.map +1 -0
- package/dist/{chunk-RXGDQDOV.js → chunk-HBSWJC3B.js} +478 -392
- package/dist/chunk-HBSWJC3B.js.map +1 -0
- package/dist/chunk-HQESINXH.js +834 -0
- package/dist/chunk-HQESINXH.js.map +1 -0
- package/dist/{chunk-XU7HNT4F.js → chunk-J5SQLKNP.js} +145 -119
- package/dist/{chunk-XU7HNT4F.js.map → chunk-J5SQLKNP.js.map} +1 -1
- package/dist/{chunk-V5G7X53Y.js → chunk-NJQHUUTN.js} +2 -2
- package/dist/{chunk-QECOPVPO.js → chunk-RSVRS5AK.js} +59 -58
- package/dist/chunk-RSVRS5AK.js.map +1 -0
- package/dist/{chunk-F4BNJWYN.js → chunk-TWPXES3S.js} +642 -673
- package/dist/chunk-TWPXES3S.js.map +1 -0
- package/dist/{chunk-NA2N2WSG.js → chunk-VAE6HBKR.js} +176 -152
- package/dist/{chunk-NA2N2WSG.js.map → chunk-VAE6HBKR.js.map} +1 -1
- package/dist/{chunk-3AJOQCDU.js → chunk-ZII6M3SN.js} +2 -2
- package/dist/{computed.types.d-rKLSPvVG.d.ts → computed.types.d-DpKIYO6e.d.ts} +2 -0
- package/dist/corrections.d.ts +12 -29
- package/dist/corrections.js +8 -9
- package/dist/elements.d.ts +86 -86
- package/dist/elements.js +4 -5
- package/dist/index.d.ts +6 -37
- package/dist/index.js +13 -14
- package/dist/{interaction.d-D4MstYRz.d.ts → interaction.d-CJiMv8H7.d.ts} +13 -2
- package/dist/interactions.d.ts +11 -1299
- package/dist/interactions.js +4 -5
- package/dist/item.d.ts +3 -3
- package/dist/item.js +5 -5
- package/dist/processing.js +2 -2
- package/dist/qti-components-jsx.d.ts +759 -739
- package/dist/qti-test.d-_YAlhDbt.d.ts +702 -0
- package/dist/qti-text-entry-interaction.d-BGdfV9qG.d.ts +1567 -0
- package/dist/test.d.ts +11 -678
- package/dist/test.js +6 -7
- package/package.json +8 -7
- package/dist/chunk-64XSIBGO.js +0 -241
- package/dist/chunk-64XSIBGO.js.map +0 -1
- package/dist/chunk-7HC5SMCU.js.map +0 -1
- package/dist/chunk-F4BNJWYN.js.map +0 -1
- package/dist/chunk-H3J7LFRO.js +0 -2243
- package/dist/chunk-H3J7LFRO.js.map +0 -1
- package/dist/chunk-LVBIQDPM.js.map +0 -1
- package/dist/chunk-QECOPVPO.js.map +0 -1
- package/dist/chunk-RXGDQDOV.js.map +0 -1
- package/dist/chunk-X3E5HXG2.js +0 -20
- package/dist/chunk-X3E5HXG2.js.map +0 -1
- /package/dist/{chunk-CAO4JRLY.js.map → chunk-BQFWCZFH.js.map} +0 -0
- /package/dist/{chunk-V5G7X53Y.js.map → chunk-NJQHUUTN.js.map} +0 -0
- /package/dist/{chunk-3AJOQCDU.js.map → chunk-ZII6M3SN.js.map} +0 -0
|
@@ -1,45 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QtiModalFeedback
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7AVWRQIS.js";
|
|
4
4
|
import {
|
|
5
|
-
item_default
|
|
6
|
-
|
|
7
|
-
} from "./chunk-7HC5SMCU.js";
|
|
5
|
+
item_default
|
|
6
|
+
} from "./chunk-G6GFQDVN.js";
|
|
8
7
|
import {
|
|
9
8
|
watch
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4DB4SC5K.js";
|
|
11
10
|
import {
|
|
12
11
|
qtiTransformItem,
|
|
13
12
|
qtiTransformTest
|
|
14
13
|
} from "./chunk-IJD53WY6.js";
|
|
15
14
|
import {
|
|
16
|
-
A,
|
|
17
|
-
E,
|
|
18
15
|
INITIAL_SESSION_CONTEXT,
|
|
19
16
|
INITIAL_TEST_CONTEXT,
|
|
20
17
|
QtiExpression,
|
|
21
|
-
T,
|
|
22
|
-
Z,
|
|
23
|
-
c,
|
|
24
18
|
computedContext,
|
|
25
19
|
configContext,
|
|
26
|
-
e,
|
|
27
|
-
i,
|
|
28
|
-
i2,
|
|
29
|
-
n,
|
|
30
|
-
n2,
|
|
31
20
|
qtiContext,
|
|
32
|
-
r,
|
|
33
21
|
sessionContext,
|
|
34
22
|
testContext
|
|
35
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HQESINXH.js";
|
|
36
24
|
|
|
37
25
|
// ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
|
|
26
|
+
import { LitElement } from "lit";
|
|
27
|
+
import { property } from "lit/decorators.js";
|
|
38
28
|
var __decorate = function(decorators, target, key, desc) {
|
|
39
|
-
var
|
|
40
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
41
|
-
else for (var
|
|
42
|
-
return
|
|
29
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
30
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31
|
+
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;
|
|
32
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
43
33
|
};
|
|
44
34
|
var stringToBooleanConverter = {
|
|
45
35
|
fromAttribute(value) {
|
|
@@ -49,7 +39,7 @@ var stringToBooleanConverter = {
|
|
|
49
39
|
return value ? "true" : "false";
|
|
50
40
|
}
|
|
51
41
|
};
|
|
52
|
-
var QtiAssessmentItemRef = class extends
|
|
42
|
+
var QtiAssessmentItemRef = class extends LitElement {
|
|
53
43
|
constructor() {
|
|
54
44
|
super(...arguments);
|
|
55
45
|
this.weigths = /* @__PURE__ */ new Map();
|
|
@@ -74,30 +64,33 @@ var QtiAssessmentItemRef = class extends i2 {
|
|
|
74
64
|
}
|
|
75
65
|
};
|
|
76
66
|
__decorate([
|
|
77
|
-
|
|
67
|
+
property({ type: String })
|
|
78
68
|
], QtiAssessmentItemRef.prototype, "category", void 0);
|
|
79
69
|
__decorate([
|
|
80
|
-
|
|
70
|
+
property({ type: String })
|
|
81
71
|
], QtiAssessmentItemRef.prototype, "identifier", void 0);
|
|
82
72
|
__decorate([
|
|
83
|
-
|
|
73
|
+
property({ type: Boolean, converter: stringToBooleanConverter })
|
|
84
74
|
], QtiAssessmentItemRef.prototype, "required", void 0);
|
|
85
75
|
__decorate([
|
|
86
|
-
|
|
76
|
+
property({ type: Boolean, converter: stringToBooleanConverter })
|
|
87
77
|
], QtiAssessmentItemRef.prototype, "fixed", void 0);
|
|
88
78
|
__decorate([
|
|
89
|
-
|
|
79
|
+
property({ type: String })
|
|
90
80
|
], QtiAssessmentItemRef.prototype, "href", void 0);
|
|
91
81
|
__decorate([
|
|
92
|
-
|
|
82
|
+
property({ type: Object, attribute: false })
|
|
93
83
|
], QtiAssessmentItemRef.prototype, "xmlDoc", void 0);
|
|
94
84
|
|
|
95
85
|
// ../qti-test/dist/components/qti-assessment-section/qti-assessment-section.js
|
|
86
|
+
import { consume } from "@lit/context";
|
|
87
|
+
import { html, LitElement as LitElement2 } from "lit";
|
|
88
|
+
import { property as property2 } from "lit/decorators.js";
|
|
96
89
|
var __decorate2 = function(decorators, target, key, desc) {
|
|
97
|
-
var
|
|
98
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
99
|
-
else for (var
|
|
100
|
-
return
|
|
90
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
91
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
92
|
+
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;
|
|
93
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
101
94
|
};
|
|
102
95
|
var stringToBooleanConverter2 = {
|
|
103
96
|
fromAttribute(value) {
|
|
@@ -107,7 +100,7 @@ var stringToBooleanConverter2 = {
|
|
|
107
100
|
return value ? "true" : "false";
|
|
108
101
|
}
|
|
109
102
|
};
|
|
110
|
-
var QtiAssessmentSection = class extends
|
|
103
|
+
var QtiAssessmentSection = class extends LitElement2 {
|
|
111
104
|
get title() {
|
|
112
105
|
return this.#title;
|
|
113
106
|
}
|
|
@@ -127,36 +120,45 @@ var QtiAssessmentSection = class extends i2 {
|
|
|
127
120
|
}));
|
|
128
121
|
}
|
|
129
122
|
render() {
|
|
130
|
-
return
|
|
123
|
+
return html`<slot name="qti-rubric-block"></slot><slot></slot>`;
|
|
131
124
|
}
|
|
132
125
|
};
|
|
133
126
|
__decorate2([
|
|
134
|
-
|
|
127
|
+
property2({ type: String })
|
|
135
128
|
], QtiAssessmentSection.prototype, "identifier", void 0);
|
|
136
129
|
__decorate2([
|
|
137
|
-
|
|
130
|
+
property2({ type: String })
|
|
138
131
|
], QtiAssessmentSection.prototype, "required", void 0);
|
|
139
132
|
__decorate2([
|
|
140
|
-
|
|
133
|
+
property2({ type: Boolean, converter: stringToBooleanConverter2 })
|
|
141
134
|
], QtiAssessmentSection.prototype, "fixed", void 0);
|
|
142
135
|
__decorate2([
|
|
143
|
-
|
|
136
|
+
property2({ type: Boolean, converter: stringToBooleanConverter2 })
|
|
144
137
|
], QtiAssessmentSection.prototype, "visible", void 0);
|
|
145
138
|
__decorate2([
|
|
146
|
-
|
|
139
|
+
property2({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
|
|
147
140
|
], QtiAssessmentSection.prototype, "keepTogether", void 0);
|
|
148
141
|
__decorate2([
|
|
149
|
-
|
|
142
|
+
property2({ type: String, attribute: "navigation-mode" })
|
|
143
|
+
], QtiAssessmentSection.prototype, "navigationMode", void 0);
|
|
144
|
+
__decorate2([
|
|
145
|
+
property2({ type: String, attribute: "submission-mode" })
|
|
146
|
+
], QtiAssessmentSection.prototype, "submissionMode", void 0);
|
|
147
|
+
__decorate2([
|
|
148
|
+
consume({ context: testContext, subscribe: true })
|
|
150
149
|
], QtiAssessmentSection.prototype, "_testContext", void 0);
|
|
151
150
|
|
|
152
151
|
// ../qti-test/dist/components/qti-assessment-test/qti-assessment-test.js
|
|
152
|
+
import { consume as consume2 } from "@lit/context";
|
|
153
|
+
import { html as html2, LitElement as LitElement3 } from "lit";
|
|
154
|
+
import { property as property3 } from "lit/decorators.js";
|
|
153
155
|
var __decorate3 = function(decorators, target, key, desc) {
|
|
154
|
-
var
|
|
155
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
156
|
-
else for (var
|
|
157
|
-
return
|
|
156
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
157
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
158
|
+
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;
|
|
159
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
158
160
|
};
|
|
159
|
-
var QtiAssessmentTest = class extends
|
|
161
|
+
var QtiAssessmentTest = class extends LitElement3 {
|
|
160
162
|
get title() {
|
|
161
163
|
return this.#title;
|
|
162
164
|
}
|
|
@@ -176,24 +178,25 @@ var QtiAssessmentTest = class extends i2 {
|
|
|
176
178
|
}));
|
|
177
179
|
}
|
|
178
180
|
render() {
|
|
179
|
-
return
|
|
181
|
+
return html2` <slot></slot>`;
|
|
180
182
|
}
|
|
181
183
|
};
|
|
182
184
|
__decorate3([
|
|
183
|
-
|
|
185
|
+
property3({ type: String })
|
|
184
186
|
], QtiAssessmentTest.prototype, "identifier", void 0);
|
|
185
187
|
__decorate3([
|
|
186
|
-
|
|
188
|
+
property3({ type: String })
|
|
187
189
|
], QtiAssessmentTest.prototype, "title", null);
|
|
188
190
|
__decorate3([
|
|
189
|
-
|
|
191
|
+
consume2({ context: testContext, subscribe: true })
|
|
190
192
|
], QtiAssessmentTest.prototype, "_testContext", void 0);
|
|
191
193
|
|
|
192
194
|
// ../qti-test/dist/components/qti-outcome-processing/qti-outcome-processing.js
|
|
193
|
-
|
|
195
|
+
import { css, html as html3, LitElement as LitElement4 } from "lit";
|
|
196
|
+
var QtiOutcomeProcessing = class extends LitElement4 {
|
|
194
197
|
static {
|
|
195
198
|
this.styles = [
|
|
196
|
-
|
|
199
|
+
css`
|
|
197
200
|
:host {
|
|
198
201
|
display: none;
|
|
199
202
|
}
|
|
@@ -201,7 +204,7 @@ var QtiOutcomeProcessing = class extends i2 {
|
|
|
201
204
|
];
|
|
202
205
|
}
|
|
203
206
|
render() {
|
|
204
|
-
return
|
|
207
|
+
return html3`<slot></slot>`;
|
|
205
208
|
}
|
|
206
209
|
process() {
|
|
207
210
|
const logic = new QtiOutcomeProcessingProcessor();
|
|
@@ -218,27 +221,30 @@ var QtiOutcomeProcessingProcessor = class {
|
|
|
218
221
|
};
|
|
219
222
|
|
|
220
223
|
// ../qti-test/dist/components/qti-test-feedback/qti-test-feedback.js
|
|
224
|
+
import { css as css2, html as html4 } from "lit";
|
|
221
225
|
var QtiTestFeedback = class extends QtiModalFeedback {
|
|
222
226
|
static {
|
|
223
|
-
this.styles =
|
|
227
|
+
this.styles = css2`
|
|
224
228
|
:host {
|
|
225
229
|
color: gray;
|
|
226
230
|
}
|
|
227
231
|
`;
|
|
228
232
|
}
|
|
229
233
|
render() {
|
|
230
|
-
return
|
|
234
|
+
return html4``;
|
|
231
235
|
}
|
|
232
236
|
};
|
|
233
237
|
|
|
234
238
|
// ../qti-test/dist/components/qti-test-part/qti-test-part.js
|
|
239
|
+
import { html as html5, LitElement as LitElement5 } from "lit";
|
|
240
|
+
import { property as property4 } from "lit/decorators.js";
|
|
235
241
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
236
|
-
var
|
|
237
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
238
|
-
else for (var
|
|
239
|
-
return
|
|
242
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
243
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
244
|
+
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;
|
|
245
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
240
246
|
};
|
|
241
|
-
var QtiTestPart = class extends
|
|
247
|
+
var QtiTestPart = class extends LitElement5 {
|
|
242
248
|
constructor() {
|
|
243
249
|
super(...arguments);
|
|
244
250
|
this.identifier = "";
|
|
@@ -265,34 +271,35 @@ var QtiTestPart = class extends i2 {
|
|
|
265
271
|
}));
|
|
266
272
|
}
|
|
267
273
|
render() {
|
|
268
|
-
return
|
|
274
|
+
return html5` <slot></slot>`;
|
|
269
275
|
}
|
|
270
276
|
};
|
|
271
277
|
__decorate4([
|
|
272
|
-
|
|
278
|
+
property4({ type: String })
|
|
273
279
|
], QtiTestPart.prototype, "identifier", void 0);
|
|
274
280
|
__decorate4([
|
|
275
|
-
|
|
281
|
+
property4({ type: String })
|
|
276
282
|
], QtiTestPart.prototype, "class", void 0);
|
|
277
283
|
__decorate4([
|
|
278
|
-
|
|
284
|
+
property4({ type: String, attribute: "navigation-mode" })
|
|
279
285
|
], QtiTestPart.prototype, "navigationMode", void 0);
|
|
280
286
|
__decorate4([
|
|
281
|
-
|
|
287
|
+
property4({ type: String, attribute: "submission-mode" })
|
|
282
288
|
], QtiTestPart.prototype, "submissionMode", void 0);
|
|
283
289
|
|
|
284
290
|
// ../qti-test/dist/components/qti-test-variables/qti-test-variables.js
|
|
291
|
+
import { consume as consume3 } from "@lit/context";
|
|
285
292
|
var __decorate5 = function(decorators, target, key, desc) {
|
|
286
|
-
var
|
|
287
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
288
|
-
else for (var
|
|
289
|
-
return
|
|
293
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
294
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
295
|
+
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;
|
|
296
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
290
297
|
};
|
|
291
298
|
var QtiTestVariables = class extends QtiExpression {
|
|
292
299
|
#testElement;
|
|
293
300
|
constructor() {
|
|
294
301
|
super();
|
|
295
|
-
this.addEventListener("qti-assessment-test-connected", (
|
|
302
|
+
this.addEventListener("qti-assessment-test-connected", (e) => this.#testElement = e.detail);
|
|
296
303
|
}
|
|
297
304
|
getResult() {
|
|
298
305
|
const includedCategories = this.getAttribute("include-category")?.split(" ") ?? [];
|
|
@@ -328,7 +335,7 @@ var QtiTestVariables = class extends QtiExpression {
|
|
|
328
335
|
}
|
|
329
336
|
};
|
|
330
337
|
__decorate5([
|
|
331
|
-
|
|
338
|
+
consume3({ context: testContext, subscribe: true })
|
|
332
339
|
], QtiTestVariables.prototype, "_testContext", void 0);
|
|
333
340
|
var QtiTestVariablesExpression = class {
|
|
334
341
|
constructor(testContext2, itemVariable, includedItems) {
|
|
@@ -343,7 +350,7 @@ var QtiTestVariablesExpression = class {
|
|
|
343
350
|
items.forEach((item) => {
|
|
344
351
|
if (uniqueItems.includes(item.identifier)) {
|
|
345
352
|
const variable = item.variables.find((vr) => vr.identifier === this.itemVariable);
|
|
346
|
-
const weight = this.includedItems.find((
|
|
353
|
+
const weight = this.includedItems.find((i) => i.item === item.identifier)?.weight ?? 1;
|
|
347
354
|
if (variable) {
|
|
348
355
|
total += Number(variable.value) * weight;
|
|
349
356
|
}
|
|
@@ -353,12 +360,18 @@ var QtiTestVariablesExpression = class {
|
|
|
353
360
|
}
|
|
354
361
|
};
|
|
355
362
|
|
|
363
|
+
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
364
|
+
import { provide as provide2 } from "@lit/context";
|
|
365
|
+
import { html as html6, LitElement as LitElement7 } from "lit";
|
|
366
|
+
import { state } from "lit/decorators.js";
|
|
367
|
+
|
|
356
368
|
// ../qti-test/dist/mixins/test-navigation.mixin.js
|
|
369
|
+
import { property as property5 } from "lit/decorators.js";
|
|
357
370
|
var __decorate6 = function(decorators, target, key, desc) {
|
|
358
|
-
var
|
|
359
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
360
|
-
else for (var
|
|
361
|
-
return
|
|
371
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
372
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
373
|
+
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;
|
|
374
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
362
375
|
};
|
|
363
376
|
var TestNavigationMixin = (superClass) => {
|
|
364
377
|
class TestNavigationClass extends superClass {
|
|
@@ -409,15 +422,15 @@ var TestNavigationMixin = (superClass) => {
|
|
|
409
422
|
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
410
423
|
this.addEventListener("qti-assessment-stimulus-ref-connected", this._handleStimulusRefConnected.bind(this));
|
|
411
424
|
}
|
|
412
|
-
_handleTestConnected(
|
|
413
|
-
this._testElement =
|
|
425
|
+
_handleTestConnected(e) {
|
|
426
|
+
this._testElement = e.detail;
|
|
414
427
|
this._initializeNavigation();
|
|
415
428
|
}
|
|
416
429
|
/**
|
|
417
430
|
* Handle item connection events - track connected items and discover stimulus references
|
|
418
431
|
*/
|
|
419
|
-
_handleItemConnected(
|
|
420
|
-
const itemRef =
|
|
432
|
+
_handleItemConnected(e) {
|
|
433
|
+
const itemRef = e.detail;
|
|
421
434
|
this._loadingState.connectedItems++;
|
|
422
435
|
const stimulusRefs = itemRef.querySelectorAll("qti-assessment-stimulus-ref");
|
|
423
436
|
this._loadingState.expectedStimulus += stimulusRefs.length;
|
|
@@ -426,9 +439,9 @@ var TestNavigationMixin = (superClass) => {
|
|
|
426
439
|
/**
|
|
427
440
|
* Handle stimulus reference connection events with duplicate prevention
|
|
428
441
|
*/
|
|
429
|
-
async _handleStimulusRefConnected(
|
|
430
|
-
|
|
431
|
-
const { element, item } =
|
|
442
|
+
async _handleStimulusRefConnected(e) {
|
|
443
|
+
e.preventDefault();
|
|
444
|
+
const { element, item } = e;
|
|
432
445
|
console.info("Stimulus ref connected:", {
|
|
433
446
|
identifier: element.identifier,
|
|
434
447
|
href: element.href,
|
|
@@ -481,12 +494,40 @@ var TestNavigationMixin = (superClass) => {
|
|
|
481
494
|
this.navigateTo(this.navigate, id);
|
|
482
495
|
}
|
|
483
496
|
}
|
|
497
|
+
_isLinearNavigationRestricted(type, targetId) {
|
|
498
|
+
const currentItemId = this.sessionContext?.navItemRefId;
|
|
499
|
+
if (!currentItemId)
|
|
500
|
+
return false;
|
|
501
|
+
if (type === "item" && targetId === currentItemId)
|
|
502
|
+
return false;
|
|
503
|
+
const currentItemRef = this._testElement?.querySelector(`qti-assessment-item-ref[identifier="${currentItemId}"]`);
|
|
504
|
+
if (!currentItemRef)
|
|
505
|
+
return false;
|
|
506
|
+
const section = currentItemRef.closest("qti-assessment-section");
|
|
507
|
+
const testPart = currentItemRef.closest("qti-test-part");
|
|
508
|
+
const navigationMode = section?.navigationMode || section?.getAttribute("navigation-mode") || testPart?.navigationMode || testPart?.getAttribute("navigation-mode") || "nonlinear";
|
|
509
|
+
if (navigationMode !== "linear")
|
|
510
|
+
return false;
|
|
511
|
+
const allItemRefs = Array.from(this._testElement?.querySelectorAll("qti-assessment-item-ref") || []);
|
|
512
|
+
const currentIndex = allItemRefs.findIndex((ref) => ref.identifier === currentItemId);
|
|
513
|
+
if (type === "item") {
|
|
514
|
+
const targetIndex = allItemRefs.findIndex((ref) => ref.identifier === targetId);
|
|
515
|
+
if (targetIndex === -1 || currentIndex === -1)
|
|
516
|
+
return false;
|
|
517
|
+
return targetIndex !== currentIndex + 1;
|
|
518
|
+
}
|
|
519
|
+
return true;
|
|
520
|
+
}
|
|
484
521
|
/**
|
|
485
522
|
* Main navigation request handler with proper lifecycle management
|
|
486
523
|
*/
|
|
487
524
|
async _handleNavigationRequest({ detail }) {
|
|
488
525
|
if (!detail?.id)
|
|
489
526
|
return;
|
|
527
|
+
if (this._isLinearNavigationRestricted(detail.type, detail.id)) {
|
|
528
|
+
this._handleNavigationError(new Error("Navigation restricted in linear mode"), detail.type, detail.id);
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
490
531
|
this._cancelPreviousNavigation();
|
|
491
532
|
const navigationId = ++this._navigationId;
|
|
492
533
|
const controller = new AbortController();
|
|
@@ -679,7 +720,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
679
720
|
const itemId = itemRef?.identifier;
|
|
680
721
|
if (!itemRef || !itemId)
|
|
681
722
|
return;
|
|
682
|
-
const savedState = this.testContext.items.find((
|
|
723
|
+
const savedState = this.testContext.items.find((i) => i.identifier === itemId)?.state;
|
|
683
724
|
if (savedState === void 0)
|
|
684
725
|
return;
|
|
685
726
|
itemRef.updateComplete.then(() => {
|
|
@@ -805,16 +846,16 @@ var TestNavigationMixin = (superClass) => {
|
|
|
805
846
|
}
|
|
806
847
|
}
|
|
807
848
|
__decorate6([
|
|
808
|
-
|
|
849
|
+
property5({ type: String })
|
|
809
850
|
], TestNavigationClass.prototype, "navigate", void 0);
|
|
810
851
|
__decorate6([
|
|
811
|
-
|
|
852
|
+
property5({ type: Number })
|
|
812
853
|
], TestNavigationClass.prototype, "requestTimeout", void 0);
|
|
813
854
|
__decorate6([
|
|
814
|
-
|
|
855
|
+
property5({ attribute: false })
|
|
815
856
|
], TestNavigationClass.prototype, "postLoadTransformCallback", void 0);
|
|
816
857
|
__decorate6([
|
|
817
|
-
|
|
858
|
+
property5({ attribute: false })
|
|
818
859
|
], TestNavigationClass.prototype, "postLoadTestTransformCallback", void 0);
|
|
819
860
|
return TestNavigationClass;
|
|
820
861
|
};
|
|
@@ -825,16 +866,16 @@ var TestViewMixin = (superClass) => {
|
|
|
825
866
|
constructor(...args) {
|
|
826
867
|
super(...args);
|
|
827
868
|
this.sessionContext = { ...this.sessionContext, view: "candidate" };
|
|
828
|
-
this.addEventListener("on-test-switch-view", (
|
|
829
|
-
this.sessionContext = { ...this.sessionContext, view:
|
|
869
|
+
this.addEventListener("on-test-switch-view", (e) => {
|
|
870
|
+
this.sessionContext = { ...this.sessionContext, view: e.detail };
|
|
830
871
|
this._updateElementView();
|
|
831
872
|
});
|
|
832
873
|
this.addEventListener("qti-assessment-test-connected", () => {
|
|
833
874
|
this._updateElementView();
|
|
834
875
|
});
|
|
835
|
-
this.addEventListener("qti-assessment-item-connected", (
|
|
876
|
+
this.addEventListener("qti-assessment-item-connected", (e) => {
|
|
836
877
|
this._updateElementView();
|
|
837
|
-
this._setCorrectResponseVisibility(
|
|
878
|
+
this._setCorrectResponseVisibility(e.detail);
|
|
838
879
|
});
|
|
839
880
|
}
|
|
840
881
|
willUpdate(changedProperties) {
|
|
@@ -868,11 +909,14 @@ var TestViewMixin = (superClass) => {
|
|
|
868
909
|
};
|
|
869
910
|
|
|
870
911
|
// ../qti-test/dist/mixins/test-base.js
|
|
912
|
+
import { provide } from "@lit/context";
|
|
913
|
+
import { LitElement as LitElement6 } from "lit";
|
|
914
|
+
import { property as property6 } from "lit/decorators.js";
|
|
871
915
|
var __decorate7 = function(decorators, target, key, desc) {
|
|
872
|
-
var
|
|
873
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
874
|
-
else for (var
|
|
875
|
-
return
|
|
916
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
917
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
918
|
+
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;
|
|
919
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
876
920
|
};
|
|
877
921
|
var TestBaseMixin = (superClass) => {
|
|
878
922
|
class TestBaseClass extends superClass {
|
|
@@ -884,7 +928,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
884
928
|
const context = assessmentItem._context;
|
|
885
929
|
const identifier = context.identifier;
|
|
886
930
|
const fullVariables = context.variables;
|
|
887
|
-
const itemContext = this.testContext.items.find((
|
|
931
|
+
const itemContext = this.testContext.items.find((i) => i?.identifier === identifier);
|
|
888
932
|
if (!itemContext) {
|
|
889
933
|
console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
|
|
890
934
|
return;
|
|
@@ -920,12 +964,12 @@ var TestBaseMixin = (superClass) => {
|
|
|
920
964
|
}
|
|
921
965
|
}
|
|
922
966
|
_initializeEventListeners() {
|
|
923
|
-
this.addEventListener("qti-assessment-test-connected", (
|
|
967
|
+
this.addEventListener("qti-assessment-test-connected", (e) => {
|
|
924
968
|
this.testContext = INITIAL_TEST_CONTEXT;
|
|
925
969
|
this.sessionContext = INITIAL_SESSION_CONTEXT;
|
|
926
970
|
if (this.testContext && this.testContext.items.length > 0)
|
|
927
971
|
return;
|
|
928
|
-
this._testElement =
|
|
972
|
+
this._testElement = e.detail;
|
|
929
973
|
const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
|
|
930
974
|
return {
|
|
931
975
|
href: itemRef.href,
|
|
@@ -942,19 +986,19 @@ var TestBaseMixin = (superClass) => {
|
|
|
942
986
|
});
|
|
943
987
|
this.testContext = { ...this.testContext, items };
|
|
944
988
|
});
|
|
945
|
-
this.addEventListener("qti-assessment-item-connected", (
|
|
946
|
-
const assessmentItem =
|
|
989
|
+
this.addEventListener("qti-assessment-item-connected", (e) => {
|
|
990
|
+
const assessmentItem = e.detail;
|
|
947
991
|
const assessmentRefId = assessmentItem.closest("qti-assessment-item-ref")?.identifier;
|
|
948
992
|
if (assessmentRefId) {
|
|
949
993
|
assessmentItem.assessmentItemRefId = assessmentRefId;
|
|
950
994
|
}
|
|
951
|
-
this._updateItemInTestContext(
|
|
995
|
+
this._updateItemInTestContext(e.detail);
|
|
952
996
|
});
|
|
953
|
-
this.addEventListener("qti-item-context-updated", (
|
|
954
|
-
this._updateItemVariablesInTestContext(
|
|
997
|
+
this.addEventListener("qti-item-context-updated", (e) => {
|
|
998
|
+
this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables, e.detail.itemContext.state);
|
|
955
999
|
});
|
|
956
1000
|
}
|
|
957
|
-
_updateItemVariablesInTestContext(identifier, variables,
|
|
1001
|
+
_updateItemVariablesInTestContext(identifier, variables, state8) {
|
|
958
1002
|
this.testContext = {
|
|
959
1003
|
...this.testContext,
|
|
960
1004
|
// Spread existing test context properties
|
|
@@ -969,7 +1013,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
969
1013
|
const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
|
|
970
1014
|
return matchingVariable ? { ...matchingVariable, ...variable } : variable;
|
|
971
1015
|
}),
|
|
972
|
-
...
|
|
1016
|
+
...state8 !== void 0 ? { state: state8 ? { ...state8 } : void 0 } : {}
|
|
973
1017
|
};
|
|
974
1018
|
})
|
|
975
1019
|
};
|
|
@@ -977,16 +1021,16 @@ var TestBaseMixin = (superClass) => {
|
|
|
977
1021
|
}
|
|
978
1022
|
}
|
|
979
1023
|
__decorate7([
|
|
980
|
-
|
|
981
|
-
|
|
1024
|
+
property6({ attribute: false, type: Object }),
|
|
1025
|
+
provide({ context: testContext })
|
|
982
1026
|
], TestBaseClass.prototype, "testContext", void 0);
|
|
983
1027
|
__decorate7([
|
|
984
|
-
|
|
985
|
-
|
|
1028
|
+
property6({ attribute: false, type: Object }),
|
|
1029
|
+
provide({ context: sessionContext })
|
|
986
1030
|
], TestBaseClass.prototype, "sessionContext", void 0);
|
|
987
1031
|
return TestBaseClass;
|
|
988
1032
|
};
|
|
989
|
-
var TestBase = class extends TestBaseMixin(
|
|
1033
|
+
var TestBase = class extends TestBaseMixin(LitElement6) {
|
|
990
1034
|
};
|
|
991
1035
|
|
|
992
1036
|
// ../qti-test/dist/mixins/test-processing.mixin.js
|
|
@@ -994,17 +1038,17 @@ var TestProcessingMixin = (superClass) => {
|
|
|
994
1038
|
class TestProcessingElement extends superClass {
|
|
995
1039
|
constructor(...args) {
|
|
996
1040
|
super(...args);
|
|
997
|
-
this.addEventListener("qti-register-variable", (
|
|
1041
|
+
this.addEventListener("qti-register-variable", (e) => {
|
|
998
1042
|
this.testContext = {
|
|
999
1043
|
...this.testContext,
|
|
1000
|
-
testOutcomeVariables: [...this.testContext.testOutcomeVariables || [],
|
|
1044
|
+
testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e.detail.variable]
|
|
1001
1045
|
};
|
|
1002
|
-
|
|
1046
|
+
e.stopPropagation();
|
|
1003
1047
|
});
|
|
1004
|
-
this.addEventListener("qti-set-outcome-value", (
|
|
1005
|
-
const { outcomeIdentifier, value } =
|
|
1048
|
+
this.addEventListener("qti-set-outcome-value", (e) => {
|
|
1049
|
+
const { outcomeIdentifier, value } = e.detail;
|
|
1006
1050
|
this.updateOutcomeVariable(outcomeIdentifier, value);
|
|
1007
|
-
|
|
1051
|
+
e.stopPropagation();
|
|
1008
1052
|
});
|
|
1009
1053
|
}
|
|
1010
1054
|
outcomeProcessing() {
|
|
@@ -1046,12 +1090,12 @@ var TestProcessingMixin = (superClass) => {
|
|
|
1046
1090
|
|
|
1047
1091
|
// ../qti-test/dist/components/qti-test/qti-test.js
|
|
1048
1092
|
var __decorate8 = function(decorators, target, key, desc) {
|
|
1049
|
-
var
|
|
1050
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1051
|
-
else for (var
|
|
1052
|
-
return
|
|
1093
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1094
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1095
|
+
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;
|
|
1096
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1053
1097
|
};
|
|
1054
|
-
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBaseMixin(
|
|
1098
|
+
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBaseMixin(LitElement7)))) {
|
|
1055
1099
|
constructor() {
|
|
1056
1100
|
super(...arguments);
|
|
1057
1101
|
this.configContext = {};
|
|
@@ -1066,16 +1110,20 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
|
|
|
1066
1110
|
this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
|
|
1067
1111
|
}
|
|
1068
1112
|
render() {
|
|
1069
|
-
return
|
|
1113
|
+
return html6`<slot></slot>`;
|
|
1070
1114
|
}
|
|
1071
1115
|
};
|
|
1072
1116
|
__decorate8([
|
|
1073
|
-
|
|
1074
|
-
|
|
1117
|
+
state(),
|
|
1118
|
+
provide2({ context: configContext })
|
|
1075
1119
|
], QtiTest.prototype, "configContext", void 0);
|
|
1076
1120
|
|
|
1121
|
+
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
1122
|
+
import { css as css4, html as html7, LitElement as LitElement8 } from "lit";
|
|
1123
|
+
|
|
1077
1124
|
// ../qti-test/dist/components/styles.js
|
|
1078
|
-
|
|
1125
|
+
import { css as css3 } from "lit";
|
|
1126
|
+
var form = css3`
|
|
1079
1127
|
display: inline-flex;
|
|
1080
1128
|
align-items: center;
|
|
1081
1129
|
cursor: pointer;
|
|
@@ -1083,23 +1131,23 @@ var form = i`
|
|
|
1083
1131
|
border-radius: 0.25rem;
|
|
1084
1132
|
user-select: none;
|
|
1085
1133
|
`;
|
|
1086
|
-
var btn =
|
|
1134
|
+
var btn = css3`
|
|
1087
1135
|
background-color: lightgray;
|
|
1088
1136
|
${form};
|
|
1089
1137
|
`;
|
|
1090
|
-
var dis =
|
|
1138
|
+
var dis = css3`
|
|
1091
1139
|
cursor: not-allowed;
|
|
1092
1140
|
opacity: 0.8;
|
|
1093
1141
|
`;
|
|
1094
|
-
var ind =
|
|
1142
|
+
var ind = css3`
|
|
1095
1143
|
${form};
|
|
1096
1144
|
border: 1px solid gray;
|
|
1097
1145
|
`;
|
|
1098
1146
|
|
|
1099
1147
|
// ../qti-test/dist/components/test-check-item/test-check-item.js
|
|
1100
|
-
var TestCheckItem = class extends
|
|
1148
|
+
var TestCheckItem = class extends LitElement8 {
|
|
1101
1149
|
static {
|
|
1102
|
-
this.styles =
|
|
1150
|
+
this.styles = css4`
|
|
1103
1151
|
:host {
|
|
1104
1152
|
${btn};
|
|
1105
1153
|
}
|
|
@@ -1121,18 +1169,22 @@ var TestCheckItem = class extends i2 {
|
|
|
1121
1169
|
});
|
|
1122
1170
|
}
|
|
1123
1171
|
render() {
|
|
1124
|
-
return
|
|
1172
|
+
return html7` <slot></slot> `;
|
|
1125
1173
|
}
|
|
1126
1174
|
};
|
|
1127
1175
|
|
|
1128
1176
|
// ../qti-test/dist/components/test-container/test-container.js
|
|
1177
|
+
import { consume as consume4 } from "@lit/context";
|
|
1178
|
+
import { LitElement as LitElement9, html as html8 } from "lit";
|
|
1179
|
+
import { property as property7, state as state2 } from "lit/decorators.js";
|
|
1180
|
+
import { until } from "lit/directives/until.js";
|
|
1129
1181
|
var __decorate9 = function(decorators, target, key, desc) {
|
|
1130
|
-
var
|
|
1131
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1132
|
-
else for (var
|
|
1133
|
-
return
|
|
1182
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1183
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1184
|
+
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;
|
|
1185
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1134
1186
|
};
|
|
1135
|
-
var TestContainer = class extends
|
|
1187
|
+
var TestContainer = class extends LitElement9 {
|
|
1136
1188
|
constructor() {
|
|
1137
1189
|
super(...arguments);
|
|
1138
1190
|
this.customElementRegistry = null;
|
|
@@ -1200,7 +1252,7 @@ var TestContainer = class extends i2 {
|
|
|
1200
1252
|
}
|
|
1201
1253
|
#initializeTemplateContent() {
|
|
1202
1254
|
const template = this.querySelector("template");
|
|
1203
|
-
this.#templateContent = template ? template.content :
|
|
1255
|
+
this.#templateContent = template ? template.content : html8``;
|
|
1204
1256
|
}
|
|
1205
1257
|
#applyStyles() {
|
|
1206
1258
|
const sheet = new CSSStyleSheet();
|
|
@@ -1208,28 +1260,28 @@ var TestContainer = class extends i2 {
|
|
|
1208
1260
|
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
1209
1261
|
}
|
|
1210
1262
|
render() {
|
|
1211
|
-
return
|
|
1263
|
+
return html8`
|
|
1212
1264
|
${this.#templateContent}
|
|
1213
1265
|
<slot></slot>
|
|
1214
|
-
${
|
|
1266
|
+
${until(this.testDoc, html8`<span>Loading...</span>`)}
|
|
1215
1267
|
`;
|
|
1216
1268
|
}
|
|
1217
1269
|
};
|
|
1218
1270
|
__decorate9([
|
|
1219
|
-
|
|
1271
|
+
property7({ attribute: false })
|
|
1220
1272
|
], TestContainer.prototype, "customElementRegistry", void 0);
|
|
1221
1273
|
__decorate9([
|
|
1222
|
-
|
|
1274
|
+
property7({ type: String, attribute: "test-url" })
|
|
1223
1275
|
], TestContainer.prototype, "testURL", void 0);
|
|
1224
1276
|
__decorate9([
|
|
1225
|
-
|
|
1277
|
+
state2()
|
|
1226
1278
|
], TestContainer.prototype, "testDoc", void 0);
|
|
1227
1279
|
__decorate9([
|
|
1228
|
-
|
|
1280
|
+
state2()
|
|
1229
1281
|
], TestContainer.prototype, "testXML", void 0);
|
|
1230
1282
|
__decorate9([
|
|
1231
|
-
|
|
1232
|
-
|
|
1283
|
+
state2(),
|
|
1284
|
+
consume4({ context: qtiContext, subscribe: true })
|
|
1233
1285
|
], TestContainer.prototype, "qtiContext", void 0);
|
|
1234
1286
|
__decorate9([
|
|
1235
1287
|
watch("testURL", { waitUntilFirstUpdate: true })
|
|
@@ -1239,9 +1291,10 @@ __decorate9([
|
|
|
1239
1291
|
], TestContainer.prototype, "handleTestXMLChange", null);
|
|
1240
1292
|
|
|
1241
1293
|
// ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
|
|
1242
|
-
|
|
1294
|
+
import { css as css5, html as html9, LitElement as LitElement10 } from "lit";
|
|
1295
|
+
var TestEndAttempt = class extends LitElement10 {
|
|
1243
1296
|
static {
|
|
1244
|
-
this.styles =
|
|
1297
|
+
this.styles = css5`
|
|
1245
1298
|
:host {
|
|
1246
1299
|
${btn};
|
|
1247
1300
|
}
|
|
@@ -1255,20 +1308,22 @@ var TestEndAttempt = class extends i2 {
|
|
|
1255
1308
|
this.addEventListener("click", () => this.dispatchEvent(new CustomEvent("test-end-attempt", { bubbles: true })));
|
|
1256
1309
|
}
|
|
1257
1310
|
render() {
|
|
1258
|
-
return
|
|
1311
|
+
return html9` <slot></slot> `;
|
|
1259
1312
|
}
|
|
1260
1313
|
};
|
|
1261
1314
|
|
|
1262
1315
|
// ../qti-test/dist/components/test-item-link/test-item-link.js
|
|
1316
|
+
import { css as css6, html as html10, LitElement as LitElement11 } from "lit";
|
|
1317
|
+
import { property as property8 } from "lit/decorators.js";
|
|
1263
1318
|
var __decorate10 = function(decorators, target, key, desc) {
|
|
1264
|
-
var
|
|
1265
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1266
|
-
else for (var
|
|
1267
|
-
return
|
|
1319
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1320
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1321
|
+
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;
|
|
1322
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1268
1323
|
};
|
|
1269
|
-
var TestItemLink = class extends
|
|
1324
|
+
var TestItemLink = class extends LitElement11 {
|
|
1270
1325
|
static {
|
|
1271
|
-
this.styles =
|
|
1326
|
+
this.styles = css6`
|
|
1272
1327
|
:host {
|
|
1273
1328
|
${btn};
|
|
1274
1329
|
}
|
|
@@ -1293,19 +1348,22 @@ var TestItemLink = class extends i2 {
|
|
|
1293
1348
|
}));
|
|
1294
1349
|
}
|
|
1295
1350
|
render() {
|
|
1296
|
-
return
|
|
1351
|
+
return html10` <slot></slot> `;
|
|
1297
1352
|
}
|
|
1298
1353
|
};
|
|
1299
1354
|
__decorate10([
|
|
1300
|
-
|
|
1355
|
+
property8({ type: String, attribute: "item-id" })
|
|
1301
1356
|
], TestItemLink.prototype, "itemId", void 0);
|
|
1302
1357
|
|
|
1303
1358
|
// ../qti-test/dist/components/test-item-to-speech/test-item-to-speech.js
|
|
1359
|
+
import { html as html11, LitElement as LitElement12, css as css7 } from "lit";
|
|
1360
|
+
import { consume as consume5, provide as provide3, createContext } from "@lit/context";
|
|
1361
|
+
import { property as property9, state as state3 } from "lit/decorators.js";
|
|
1304
1362
|
var __decorate11 = function(decorators, target, key, desc) {
|
|
1305
|
-
var
|
|
1306
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1307
|
-
else for (var
|
|
1308
|
-
return
|
|
1363
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1364
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1365
|
+
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;
|
|
1366
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1309
1367
|
};
|
|
1310
1368
|
var HIGHLIGHT_ELEMENT = "tts-element";
|
|
1311
1369
|
var HIGHLIGHT_WORD = "tts-word";
|
|
@@ -1320,10 +1378,10 @@ function getHighlightSheet() {
|
|
|
1320
1378
|
}
|
|
1321
1379
|
return highlightSheet;
|
|
1322
1380
|
}
|
|
1323
|
-
var ttsContext =
|
|
1324
|
-
var TtsButtonBase = class extends
|
|
1381
|
+
var ttsContext = createContext(/* @__PURE__ */ Symbol("tts-context"));
|
|
1382
|
+
var TtsButtonBase = class extends LitElement12 {
|
|
1325
1383
|
static {
|
|
1326
|
-
this.styles =
|
|
1384
|
+
this.styles = css7`
|
|
1327
1385
|
:host {
|
|
1328
1386
|
display: inline-block;
|
|
1329
1387
|
}
|
|
@@ -1346,9 +1404,9 @@ var TtsButtonBase = class extends i2 {
|
|
|
1346
1404
|
}
|
|
1347
1405
|
};
|
|
1348
1406
|
__decorate11([
|
|
1349
|
-
|
|
1407
|
+
consume5({ context: ttsContext, subscribe: true })
|
|
1350
1408
|
], TtsButtonBase.prototype, "_tts", void 0);
|
|
1351
|
-
var TestItemToSpeech = class extends
|
|
1409
|
+
var TestItemToSpeech = class extends LitElement12 {
|
|
1352
1410
|
#internals;
|
|
1353
1411
|
#itemElements;
|
|
1354
1412
|
#boundHandleItemConnected;
|
|
@@ -1422,7 +1480,7 @@ var TestItemToSpeech = class extends i2 {
|
|
|
1422
1480
|
this.#itemElements.clear();
|
|
1423
1481
|
}
|
|
1424
1482
|
render() {
|
|
1425
|
-
return
|
|
1483
|
+
return html11`<slot></slot>`;
|
|
1426
1484
|
}
|
|
1427
1485
|
#handleItemConnected(event) {
|
|
1428
1486
|
const item = event.detail;
|
|
@@ -1431,12 +1489,12 @@ var TestItemToSpeech = class extends i2 {
|
|
|
1431
1489
|
}
|
|
1432
1490
|
}
|
|
1433
1491
|
/** Update speech state on both the context (notifies children) and the host's CSS custom states. */
|
|
1434
|
-
#setSpeechState(
|
|
1435
|
-
this._ttsContext = { ...this._ttsContext, state };
|
|
1492
|
+
#setSpeechState(state8) {
|
|
1493
|
+
this._ttsContext = { ...this._ttsContext, state: state8 };
|
|
1436
1494
|
this.#internals.states.delete("idle");
|
|
1437
1495
|
this.#internals.states.delete("playing");
|
|
1438
1496
|
this.#internals.states.delete("paused");
|
|
1439
|
-
this.#internals.states.add(
|
|
1497
|
+
this.#internals.states.add(state8);
|
|
1440
1498
|
}
|
|
1441
1499
|
/** Push currentElementIndex and elementCount into context so children can react. */
|
|
1442
1500
|
#updateContext() {
|
|
@@ -1489,7 +1547,7 @@ var TestItemToSpeech = class extends i2 {
|
|
|
1489
1547
|
element.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1490
1548
|
this.#highlightElement(element);
|
|
1491
1549
|
this.#textNodes = this.#collectTextNodes(element);
|
|
1492
|
-
const text = this.#textNodes.map((
|
|
1550
|
+
const text = this.#textNodes.map((n) => n.textContent ?? "").join("");
|
|
1493
1551
|
if (!text.trim()) {
|
|
1494
1552
|
this.#speakElement(index + 1);
|
|
1495
1553
|
return;
|
|
@@ -1577,7 +1635,7 @@ var TestItemToSpeech = class extends i2 {
|
|
|
1577
1635
|
return;
|
|
1578
1636
|
this.#ensureHighlightStyles();
|
|
1579
1637
|
this.#wordHighlight.clear();
|
|
1580
|
-
const text = this.#textNodes.map((
|
|
1638
|
+
const text = this.#textNodes.map((n) => n.textContent ?? "").join("");
|
|
1581
1639
|
const endIndex = charIndex + (charLength > 0 ? charLength : this.#wordLengthAt(charIndex, text));
|
|
1582
1640
|
let offset = 0;
|
|
1583
1641
|
let startNode = null;
|
|
@@ -1645,14 +1703,14 @@ var TestItemToSpeech = class extends i2 {
|
|
|
1645
1703
|
}
|
|
1646
1704
|
};
|
|
1647
1705
|
__decorate11([
|
|
1648
|
-
|
|
1706
|
+
property9({ type: String })
|
|
1649
1707
|
], TestItemToSpeech.prototype, "language", void 0);
|
|
1650
1708
|
__decorate11([
|
|
1651
|
-
|
|
1709
|
+
consume5({ context: sessionContext, subscribe: true })
|
|
1652
1710
|
], TestItemToSpeech.prototype, "_sessionContext", void 0);
|
|
1653
1711
|
__decorate11([
|
|
1654
|
-
|
|
1655
|
-
|
|
1712
|
+
state3(),
|
|
1713
|
+
provide3({ context: ttsContext })
|
|
1656
1714
|
], TestItemToSpeech.prototype, "_ttsContext", void 0);
|
|
1657
1715
|
var TestTtsPlay = class extends TtsButtonBase {
|
|
1658
1716
|
#toggle() {
|
|
@@ -1667,16 +1725,16 @@ var TestTtsPlay = class extends TtsButtonBase {
|
|
|
1667
1725
|
}
|
|
1668
1726
|
render() {
|
|
1669
1727
|
const playing = this._tts?.state === "playing";
|
|
1670
|
-
return
|
|
1728
|
+
return html11`
|
|
1671
1729
|
<button part="button" @click=${this.#toggle}>
|
|
1672
|
-
${playing ?
|
|
1730
|
+
${playing ? html11`<slot name="pause">⏸</slot>` : html11`<slot name="play">▶</slot>`}
|
|
1673
1731
|
</button>
|
|
1674
1732
|
`;
|
|
1675
1733
|
}
|
|
1676
1734
|
};
|
|
1677
1735
|
var TestTtsPause = class extends TtsButtonBase {
|
|
1678
1736
|
render() {
|
|
1679
|
-
return
|
|
1737
|
+
return html11`
|
|
1680
1738
|
<button part="button" ?disabled=${this._tts?.state !== "playing"} @click=${() => this._tts?.pause()}>
|
|
1681
1739
|
<slot>⏸</slot>
|
|
1682
1740
|
</button>
|
|
@@ -1685,7 +1743,7 @@ var TestTtsPause = class extends TtsButtonBase {
|
|
|
1685
1743
|
};
|
|
1686
1744
|
var TestTtsResume = class extends TtsButtonBase {
|
|
1687
1745
|
render() {
|
|
1688
|
-
return
|
|
1746
|
+
return html11`
|
|
1689
1747
|
<button part="button" ?disabled=${this._tts?.state !== "paused"} @click=${() => this._tts?.resume()}>
|
|
1690
1748
|
<slot>▶</slot>
|
|
1691
1749
|
</button>
|
|
@@ -1694,7 +1752,7 @@ var TestTtsResume = class extends TtsButtonBase {
|
|
|
1694
1752
|
};
|
|
1695
1753
|
var TestTtsStop = class extends TtsButtonBase {
|
|
1696
1754
|
render() {
|
|
1697
|
-
return
|
|
1755
|
+
return html11`
|
|
1698
1756
|
<button part="button" ?disabled=${this._tts?.state === "idle"} @click=${() => this._tts?.stop()}>
|
|
1699
1757
|
<slot>■</slot>
|
|
1700
1758
|
</button>
|
|
@@ -1705,7 +1763,7 @@ var TestTtsPrev = class extends TtsButtonBase {
|
|
|
1705
1763
|
render() {
|
|
1706
1764
|
const atStart = (this._tts?.currentElementIndex ?? 0) === 0;
|
|
1707
1765
|
const noElements = (this._tts?.elementCount ?? 0) === 0;
|
|
1708
|
-
return
|
|
1766
|
+
return html11`
|
|
1709
1767
|
<button part="button" ?disabled=${noElements || atStart} @click=${() => this._tts?.prevElement()}>
|
|
1710
1768
|
<slot>◀◀</slot>
|
|
1711
1769
|
</button>
|
|
@@ -1716,7 +1774,7 @@ var TestTtsNext = class extends TtsButtonBase {
|
|
|
1716
1774
|
render() {
|
|
1717
1775
|
const atEnd = (this._tts?.elementCount ?? 0) > 0 && (this._tts?.currentElementIndex ?? 0) >= (this._tts?.elementCount ?? 0) - 1;
|
|
1718
1776
|
const noElements = (this._tts?.elementCount ?? 0) === 0;
|
|
1719
|
-
return
|
|
1777
|
+
return html11`
|
|
1720
1778
|
<button part="button" ?disabled=${noElements || atEnd} @click=${() => this._tts?.nextElement()}>
|
|
1721
1779
|
<slot>▶▶</slot>
|
|
1722
1780
|
</button>
|
|
@@ -1725,13 +1783,16 @@ var TestTtsNext = class extends TtsButtonBase {
|
|
|
1725
1783
|
};
|
|
1726
1784
|
|
|
1727
1785
|
// ../qti-test/dist/components/test-navigation/test-navigation.js
|
|
1786
|
+
import { consume as consume6, provide as provide4 } from "@lit/context";
|
|
1787
|
+
import { html as html12, LitElement as LitElement13 } from "lit";
|
|
1788
|
+
import { property as property10, state as state4 } from "lit/decorators.js";
|
|
1728
1789
|
var __decorate12 = function(decorators, target, key, desc) {
|
|
1729
|
-
var
|
|
1730
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1731
|
-
else for (var
|
|
1732
|
-
return
|
|
1790
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1791
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1792
|
+
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;
|
|
1793
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1733
1794
|
};
|
|
1734
|
-
var TestNavigation = class extends
|
|
1795
|
+
var TestNavigation = class extends LitElement13 {
|
|
1735
1796
|
#testElement;
|
|
1736
1797
|
constructor() {
|
|
1737
1798
|
super();
|
|
@@ -1786,7 +1847,7 @@ var TestNavigation = class extends i2 {
|
|
|
1786
1847
|
}
|
|
1787
1848
|
}
|
|
1788
1849
|
render() {
|
|
1789
|
-
return
|
|
1850
|
+
return html12`<slot></slot>`;
|
|
1790
1851
|
}
|
|
1791
1852
|
/* PK: on test connected we can build the computed context */
|
|
1792
1853
|
#handleTestConnected(event) {
|
|
@@ -1837,8 +1898,10 @@ var TestNavigation = class extends i2 {
|
|
|
1837
1898
|
active: false,
|
|
1838
1899
|
identifier: section.identifier,
|
|
1839
1900
|
title: section.title,
|
|
1901
|
+
navigationMode: section.navigationMode,
|
|
1902
|
+
submissionMode: section.submissionMode,
|
|
1840
1903
|
items: itemElements.map((item) => ({
|
|
1841
|
-
...this.initContext?.find((
|
|
1904
|
+
...this.initContext?.find((i) => i.identifier === item.identifier),
|
|
1842
1905
|
active: false,
|
|
1843
1906
|
identifier: item.identifier,
|
|
1844
1907
|
categories: item.category ? item.category?.split(" ") : [],
|
|
@@ -1906,10 +1969,10 @@ var TestNavigation = class extends i2 {
|
|
|
1906
1969
|
const scoreOutcome = itemElement.querySelector("qti-outcome-declaration[identifier='SCORE']");
|
|
1907
1970
|
const externalScored = scoreOutcome?.getAttribute("externalScored");
|
|
1908
1971
|
const responseDeclarations = itemElement.querySelectorAll("qti-response-declaration");
|
|
1909
|
-
const containsCorrectResponse = Array.from(responseDeclarations).some((
|
|
1910
|
-
const containsMapping = Array.from(responseDeclarations).some((
|
|
1911
|
-
const mapping =
|
|
1912
|
-
const areaMapping =
|
|
1972
|
+
const containsCorrectResponse = Array.from(responseDeclarations).some((r) => r.querySelector("qti-correct-response"));
|
|
1973
|
+
const containsMapping = Array.from(responseDeclarations).some((r) => {
|
|
1974
|
+
const mapping = r.querySelector("qti-mapping");
|
|
1975
|
+
const areaMapping = r.querySelector("qti-area-mapping");
|
|
1913
1976
|
return mapping?.querySelector("qti-map-entry") || areaMapping?.querySelector("qti-area-map-entry");
|
|
1914
1977
|
});
|
|
1915
1978
|
const hasCorrectResponse = containsCorrectResponse || containsMapping;
|
|
@@ -1949,13 +2012,13 @@ var TestNavigation = class extends i2 {
|
|
|
1949
2012
|
return {
|
|
1950
2013
|
...section,
|
|
1951
2014
|
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
1952
|
-
completed: section.items.every((item) => this._testContext.items.find((
|
|
2015
|
+
completed: section.items.every((item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"),
|
|
1953
2016
|
items: section.items.map((item) => {
|
|
1954
|
-
const itemContext = this._testContext?.items.find((
|
|
2017
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
1955
2018
|
const computedItem = {
|
|
1956
2019
|
...item,
|
|
1957
2020
|
...itemContext,
|
|
1958
|
-
...this.initContext?.find((
|
|
2021
|
+
...this.initContext?.find((i) => i.identifier === item.identifier)
|
|
1959
2022
|
};
|
|
1960
2023
|
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
1961
2024
|
const score = rawscore === void 0 || rawscore === null ? null : parseFloat(rawscore?.toString());
|
|
@@ -1993,50 +2056,53 @@ var TestNavigation = class extends i2 {
|
|
|
1993
2056
|
}
|
|
1994
2057
|
};
|
|
1995
2058
|
__decorate12([
|
|
1996
|
-
|
|
2059
|
+
property10({ type: String })
|
|
1997
2060
|
], TestNavigation.prototype, "identifier", void 0);
|
|
1998
2061
|
__decorate12([
|
|
1999
|
-
|
|
2062
|
+
state4()
|
|
2000
2063
|
], TestNavigation.prototype, "initContext", void 0);
|
|
2001
2064
|
__decorate12([
|
|
2002
|
-
|
|
2003
|
-
|
|
2065
|
+
state4(),
|
|
2066
|
+
provide4({ context: qtiContext })
|
|
2004
2067
|
], TestNavigation.prototype, "qtiContext", void 0);
|
|
2005
2068
|
__decorate12([
|
|
2006
|
-
|
|
2007
|
-
|
|
2069
|
+
state4(),
|
|
2070
|
+
consume6({ context: configContext, subscribe: true })
|
|
2008
2071
|
], TestNavigation.prototype, "configContext", void 0);
|
|
2009
2072
|
__decorate12([
|
|
2010
|
-
|
|
2011
|
-
|
|
2073
|
+
state4(),
|
|
2074
|
+
consume6({ context: testContext, subscribe: true })
|
|
2012
2075
|
], TestNavigation.prototype, "_testContext", void 0);
|
|
2013
2076
|
__decorate12([
|
|
2014
|
-
|
|
2015
|
-
|
|
2077
|
+
state4(),
|
|
2078
|
+
consume6({ context: sessionContext, subscribe: true })
|
|
2016
2079
|
], TestNavigation.prototype, "_sessionContext", void 0);
|
|
2017
2080
|
__decorate12([
|
|
2018
|
-
|
|
2019
|
-
|
|
2081
|
+
state4(),
|
|
2082
|
+
provide4({ context: computedContext })
|
|
2020
2083
|
], TestNavigation.prototype, "computedContext", void 0);
|
|
2021
2084
|
__decorate12([
|
|
2022
|
-
|
|
2085
|
+
property10({ type: Boolean, attribute: "auto-score-items" })
|
|
2023
2086
|
], TestNavigation.prototype, "autoScoreItems", void 0);
|
|
2024
2087
|
|
|
2025
2088
|
// ../qti-test/dist/components/test-next/test-next.js
|
|
2089
|
+
import { css as css8, html as html13, LitElement as LitElement14 } from "lit";
|
|
2090
|
+
import { property as property11 } from "lit/decorators.js";
|
|
2091
|
+
import { consume as consume7 } from "@lit/context";
|
|
2026
2092
|
var __decorate13 = function(decorators, target, key, desc) {
|
|
2027
|
-
var
|
|
2028
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2029
|
-
else for (var
|
|
2030
|
-
return
|
|
2093
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2094
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2095
|
+
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;
|
|
2096
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2031
2097
|
};
|
|
2032
|
-
var TestNext = class extends
|
|
2098
|
+
var TestNext = class extends LitElement14 {
|
|
2033
2099
|
_handleTestElementChange(_oldValue, newValue) {
|
|
2034
2100
|
if (newValue) {
|
|
2035
|
-
this.
|
|
2101
|
+
this.requestUpdate();
|
|
2036
2102
|
}
|
|
2037
2103
|
}
|
|
2038
2104
|
static {
|
|
2039
|
-
this.styles =
|
|
2105
|
+
this.styles = css8`
|
|
2040
2106
|
:host {
|
|
2041
2107
|
${btn};
|
|
2042
2108
|
}
|
|
@@ -2052,8 +2118,8 @@ var TestNext = class extends i2 {
|
|
|
2052
2118
|
this.#internals = this.attachInternals();
|
|
2053
2119
|
this.#internals.role = "button";
|
|
2054
2120
|
this.#internals.ariaLabel = "Next item";
|
|
2055
|
-
this.addEventListener("click", (
|
|
2056
|
-
|
|
2121
|
+
this.addEventListener("click", (e) => {
|
|
2122
|
+
e.preventDefault();
|
|
2057
2123
|
if (!this._internalDisabled)
|
|
2058
2124
|
this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);
|
|
2059
2125
|
});
|
|
@@ -2073,7 +2139,16 @@ var TestNext = class extends i2 {
|
|
|
2073
2139
|
this.checkDisabled();
|
|
2074
2140
|
}
|
|
2075
2141
|
checkDisabled() {
|
|
2076
|
-
|
|
2142
|
+
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
2143
|
+
if (!testPart)
|
|
2144
|
+
return;
|
|
2145
|
+
const activeSection = testPart.sections.find((s) => s.active);
|
|
2146
|
+
const navigationMode = activeSection?.navigationMode || testPart.navigationMode;
|
|
2147
|
+
const submissionMode = activeSection?.submissionMode || testPart.submissionMode;
|
|
2148
|
+
const activeItem = this.sectionItems[this.itemIndex];
|
|
2149
|
+
const isLinearIndividual = navigationMode === "linear" && submissionMode === "individual";
|
|
2150
|
+
const numAttempts = Number(activeItem?.variables.find((v) => v.identifier === "numAttempts")?.value) || 0;
|
|
2151
|
+
this._internalDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= (this.sectionItems?.length ?? 0) - 1 || isLinearIndividual && numAttempts === 0;
|
|
2077
2152
|
}
|
|
2078
2153
|
_requestItem(identifier) {
|
|
2079
2154
|
this.dispatchEvent(new CustomEvent("qti-request-navigation", {
|
|
@@ -2086,19 +2161,25 @@ var TestNext = class extends i2 {
|
|
|
2086
2161
|
}));
|
|
2087
2162
|
}
|
|
2088
2163
|
render() {
|
|
2089
|
-
return
|
|
2164
|
+
return html13`<slot></slot>`;
|
|
2090
2165
|
}
|
|
2091
2166
|
};
|
|
2092
2167
|
__decorate13([
|
|
2093
|
-
|
|
2168
|
+
property11({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
2094
2169
|
], TestNext.prototype, "_internalDisabled", void 0);
|
|
2095
2170
|
__decorate13([
|
|
2096
|
-
|
|
2171
|
+
consume7({ context: computedContext, subscribe: true })
|
|
2097
2172
|
], TestNext.prototype, "computedContext", void 0);
|
|
2098
2173
|
__decorate13([
|
|
2099
2174
|
watch("computedContext")
|
|
2100
2175
|
], TestNext.prototype, "_handleTestElementChange", null);
|
|
2101
2176
|
|
|
2177
|
+
// ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
|
|
2178
|
+
import { html as html14, LitElement as LitElement15 } from "lit";
|
|
2179
|
+
|
|
2180
|
+
// ../../node_modules/.pnpm/@heximal+templates@0.1.5/node_modules/@heximal/templates/index.js
|
|
2181
|
+
import { render as renderLit, nothing } from "lit-html";
|
|
2182
|
+
|
|
2102
2183
|
// ../../node_modules/.pnpm/@heximal+expressions@0.1.5/node_modules/@heximal/expressions/lib/constants.js
|
|
2103
2184
|
var KEYWORDS = ["this"];
|
|
2104
2185
|
var UNARY_OPERATORS = ["+", "-", "!"];
|
|
@@ -2583,7 +2664,7 @@ var Parser = class {
|
|
|
2583
2664
|
if (this._matches(Kind.ARROW)) {
|
|
2584
2665
|
this.#advance();
|
|
2585
2666
|
const body = this.#parseExpression();
|
|
2586
|
-
const params = expressions?.map((
|
|
2667
|
+
const params = expressions?.map((e) => e.value) ?? [];
|
|
2587
2668
|
return this.#ast.arrowFunction(params, body);
|
|
2588
2669
|
} else {
|
|
2589
2670
|
return this.#ast.paren(expressions[0]);
|
|
@@ -2687,13 +2768,13 @@ var EvalAstFactory = class {
|
|
|
2687
2768
|
}
|
|
2688
2769
|
};
|
|
2689
2770
|
}
|
|
2690
|
-
binary(l, op,
|
|
2771
|
+
binary(l, op, r) {
|
|
2691
2772
|
const f = _BINARY_OPERATORS[op];
|
|
2692
2773
|
return {
|
|
2693
2774
|
type: "Binary",
|
|
2694
2775
|
operator: op,
|
|
2695
2776
|
left: l,
|
|
2696
|
-
right:
|
|
2777
|
+
right: r,
|
|
2697
2778
|
evaluate(scope) {
|
|
2698
2779
|
if (this.operator === "=") {
|
|
2699
2780
|
if (this.left.type !== "ID" && this.left.type !== "Getter" && this.left.type !== "Index") {
|
|
@@ -2701,18 +2782,18 @@ var EvalAstFactory = class {
|
|
|
2701
2782
|
}
|
|
2702
2783
|
const value = this.right.evaluate(scope);
|
|
2703
2784
|
let receiver = void 0;
|
|
2704
|
-
let
|
|
2785
|
+
let property18;
|
|
2705
2786
|
if (this.left.type === "Getter") {
|
|
2706
2787
|
receiver = this.left.receiver.evaluate(scope);
|
|
2707
|
-
|
|
2788
|
+
property18 = this.left.name;
|
|
2708
2789
|
} else if (this.left.type === "Index") {
|
|
2709
2790
|
receiver = this.left.receiver.evaluate(scope);
|
|
2710
|
-
|
|
2791
|
+
property18 = this.left.argument.evaluate(scope);
|
|
2711
2792
|
} else if (this.left.type === "ID") {
|
|
2712
2793
|
receiver = scope;
|
|
2713
|
-
|
|
2794
|
+
property18 = this.left.value;
|
|
2714
2795
|
}
|
|
2715
|
-
return receiver === void 0 ? void 0 : receiver[
|
|
2796
|
+
return receiver === void 0 ? void 0 : receiver[property18] = value;
|
|
2716
2797
|
}
|
|
2717
2798
|
return f(this.left.evaluate(scope), this.right.evaluate(scope));
|
|
2718
2799
|
},
|
|
@@ -2723,11 +2804,11 @@ var EvalAstFactory = class {
|
|
|
2723
2804
|
}
|
|
2724
2805
|
};
|
|
2725
2806
|
}
|
|
2726
|
-
getter(g,
|
|
2807
|
+
getter(g, n) {
|
|
2727
2808
|
return {
|
|
2728
2809
|
type: "Getter",
|
|
2729
2810
|
receiver: g,
|
|
2730
|
-
name:
|
|
2811
|
+
name: n,
|
|
2731
2812
|
evaluate(scope) {
|
|
2732
2813
|
return this.receiver.evaluate(scope)?.[this.name];
|
|
2733
2814
|
},
|
|
@@ -2761,13 +2842,13 @@ var EvalAstFactory = class {
|
|
|
2761
2842
|
}
|
|
2762
2843
|
};
|
|
2763
2844
|
}
|
|
2764
|
-
paren(
|
|
2765
|
-
return
|
|
2845
|
+
paren(e) {
|
|
2846
|
+
return e;
|
|
2766
2847
|
}
|
|
2767
|
-
index(
|
|
2848
|
+
index(e, a) {
|
|
2768
2849
|
return {
|
|
2769
2850
|
type: "Index",
|
|
2770
|
-
receiver:
|
|
2851
|
+
receiver: e,
|
|
2771
2852
|
argument: a,
|
|
2772
2853
|
evaluate(scope) {
|
|
2773
2854
|
return this.receiver.evaluate(scope)?.[this.argument.evaluate(scope)];
|
|
@@ -2778,15 +2859,15 @@ var EvalAstFactory = class {
|
|
|
2778
2859
|
}
|
|
2779
2860
|
};
|
|
2780
2861
|
}
|
|
2781
|
-
ternary(
|
|
2862
|
+
ternary(c, t, f) {
|
|
2782
2863
|
return {
|
|
2783
2864
|
type: "Ternary",
|
|
2784
|
-
condition:
|
|
2865
|
+
condition: c,
|
|
2785
2866
|
trueExpr: t,
|
|
2786
2867
|
falseExpr: f,
|
|
2787
2868
|
evaluate(scope) {
|
|
2788
|
-
const
|
|
2789
|
-
if (
|
|
2869
|
+
const c2 = this.condition.evaluate(scope);
|
|
2870
|
+
if (c2) {
|
|
2790
2871
|
return this.trueExpr.evaluate(scope);
|
|
2791
2872
|
} else {
|
|
2792
2873
|
return this.falseExpr.evaluate(scope);
|
|
@@ -2838,7 +2919,7 @@ var EvalAstFactory = class {
|
|
|
2838
2919
|
return this.items?.map((a) => a?.evaluate(scope));
|
|
2839
2920
|
},
|
|
2840
2921
|
getIds(idents) {
|
|
2841
|
-
this.items?.forEach((
|
|
2922
|
+
this.items?.forEach((i) => i?.getIds(idents));
|
|
2842
2923
|
return idents;
|
|
2843
2924
|
}
|
|
2844
2925
|
};
|
|
@@ -2852,7 +2933,7 @@ var EvalAstFactory = class {
|
|
|
2852
2933
|
const params2 = this.params;
|
|
2853
2934
|
const body2 = this.body;
|
|
2854
2935
|
return function(...args) {
|
|
2855
|
-
const paramsObj = fromEntries(params2.map((p,
|
|
2936
|
+
const paramsObj = fromEntries(params2.map((p, i) => [p, args[i]]));
|
|
2856
2937
|
const newScope = new Proxy(scope ?? {}, {
|
|
2857
2938
|
set(target, prop, value) {
|
|
2858
2939
|
if (hasOwn(paramsObj, prop)) {
|
|
@@ -2877,27 +2958,9 @@ var EvalAstFactory = class {
|
|
|
2877
2958
|
}
|
|
2878
2959
|
};
|
|
2879
2960
|
|
|
2880
|
-
// ../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/node/private-ssr-support.js
|
|
2881
|
-
var r2 = null;
|
|
2882
|
-
var i3 = { boundAttributeSuffix: Z.M, marker: Z.P, markerMatch: Z.A, HTML_RESULT: Z.C, getTemplateHtml: Z.L, overrideDirectiveResolve: (e2, t) => class extends e2 {
|
|
2883
|
-
_$AS(e3, r3) {
|
|
2884
|
-
return t(this, r3);
|
|
2885
|
-
}
|
|
2886
|
-
}, patchDirectiveResolve: (e2, t) => {
|
|
2887
|
-
if (e2.prototype._$AS.name !== t.name) {
|
|
2888
|
-
r2 ??= e2.prototype._$AS.name;
|
|
2889
|
-
for (let i4 = e2.prototype; i4 !== Object.prototype; i4 = Object.getPrototypeOf(i4)) if (i4.hasOwnProperty(r2)) return void (i4[r2] = t);
|
|
2890
|
-
throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527");
|
|
2891
|
-
}
|
|
2892
|
-
}, setDirectiveClass(e2, t) {
|
|
2893
|
-
e2._$litDirective$ = t;
|
|
2894
|
-
}, getAttributePartCommittedValue: (e2, r3, i4) => {
|
|
2895
|
-
let o = E;
|
|
2896
|
-
return e2.j = (e3) => o = e3, e2._$AI(r3, e2, i4), o;
|
|
2897
|
-
}, connectedDisconnectable: (e2) => ({ ...e2, _$AU: true }), resolveDirective: Z.V, AttributePart: Z.H, PropertyPart: Z.B, BooleanAttributePart: Z.N, EventPart: Z.U, ElementPart: Z.F, TemplateInstance: Z.R, isIterable: Z.D, ChildPart: Z.I };
|
|
2898
|
-
|
|
2899
2961
|
// ../../node_modules/.pnpm/@heximal+templates@0.1.5/node_modules/@heximal/templates/index.js
|
|
2900
|
-
|
|
2962
|
+
import { _$LH } from "lit-html/private-ssr-support.js";
|
|
2963
|
+
var { AttributePart, PropertyPart, BooleanAttributePart, EventPart } = _$LH;
|
|
2901
2964
|
var astFactory = new EvalAstFactory();
|
|
2902
2965
|
var expressionCache = /* @__PURE__ */ new Map();
|
|
2903
2966
|
var toCamelCase = (s) => s.replace(/-(-|\w)/g, (_, p1) => p1.toUpperCase());
|
|
@@ -2931,7 +2994,7 @@ var repeatHandler = (template, model, handlers, renderers) => {
|
|
|
2931
2994
|
if (repeatAttribute !== null) {
|
|
2932
2995
|
const items = getSingleValue(repeatAttribute, model);
|
|
2933
2996
|
if (!items[Symbol.iterator]) {
|
|
2934
|
-
return
|
|
2997
|
+
return nothing;
|
|
2935
2998
|
}
|
|
2936
2999
|
const litTemplate = getLitTemplate(template);
|
|
2937
3000
|
let index = -1;
|
|
@@ -3134,10 +3197,10 @@ var makeLitTemplate = (template) => {
|
|
|
3134
3197
|
}
|
|
3135
3198
|
const strings = [unescapeBindingMarkers(splitValue[0])];
|
|
3136
3199
|
const exprs = [];
|
|
3137
|
-
for (let
|
|
3138
|
-
const exprText = splitValue[
|
|
3200
|
+
for (let i = 1; i < splitValue.length; i += 2) {
|
|
3201
|
+
const exprText = splitValue[i];
|
|
3139
3202
|
exprs.push(parse(exprText, astFactory));
|
|
3140
|
-
strings.push(unescapeBindingMarkers(splitValue[
|
|
3203
|
+
strings.push(unescapeBindingMarkers(splitValue[i + 1]));
|
|
3141
3204
|
}
|
|
3142
3205
|
litTemplate.parts.push({
|
|
3143
3206
|
type: 1,
|
|
@@ -3160,15 +3223,15 @@ var makeLitTemplate = (template) => {
|
|
|
3160
3223
|
} else if (hasEscapedBindingMarkers(text)) {
|
|
3161
3224
|
textNode.textContent = unescapeBindingMarkers(text);
|
|
3162
3225
|
}
|
|
3163
|
-
for (let
|
|
3164
|
-
const exprText = strings[
|
|
3226
|
+
for (let i = 1; i < strings.length; i += 2) {
|
|
3227
|
+
const exprText = strings[i];
|
|
3165
3228
|
const expr = parse(exprText, astFactory);
|
|
3166
3229
|
litTemplate.parts.push({
|
|
3167
3230
|
type: 2,
|
|
3168
3231
|
index: ++nodeIndex,
|
|
3169
3232
|
update: (model, _handlers) => expr.evaluate(model)
|
|
3170
3233
|
});
|
|
3171
|
-
const newTextNode = new Text(strings[
|
|
3234
|
+
const newTextNode = new Text(strings[i + 1].replace("\\{{", "{{"));
|
|
3172
3235
|
textNode.parentNode.insertBefore(newTextNode, textNode.nextSibling);
|
|
3173
3236
|
textNode.parentNode.insertBefore(document.createComment(""), textNode.nextSibling);
|
|
3174
3237
|
textNode = newTextNode;
|
|
@@ -3176,20 +3239,21 @@ var makeLitTemplate = (template) => {
|
|
|
3176
3239
|
}
|
|
3177
3240
|
}
|
|
3178
3241
|
}
|
|
3179
|
-
for (const
|
|
3180
|
-
|
|
3242
|
+
for (const e of elementsToRemove) {
|
|
3243
|
+
e.remove();
|
|
3181
3244
|
}
|
|
3182
3245
|
return litTemplate;
|
|
3183
3246
|
};
|
|
3184
3247
|
|
|
3185
3248
|
// ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
|
|
3249
|
+
import { consume as consume8 } from "@lit/context";
|
|
3186
3250
|
var __decorate14 = function(decorators, target, key, desc) {
|
|
3187
|
-
var
|
|
3188
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3189
|
-
else for (var
|
|
3190
|
-
return
|
|
3251
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3252
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3253
|
+
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;
|
|
3254
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3191
3255
|
};
|
|
3192
|
-
var TestPagingButtonsStamp = class extends
|
|
3256
|
+
var TestPagingButtonsStamp = class extends LitElement15 {
|
|
3193
3257
|
#internals;
|
|
3194
3258
|
createRenderRoot() {
|
|
3195
3259
|
return this;
|
|
@@ -3206,30 +3270,33 @@ var TestPagingButtonsStamp = class extends i2 {
|
|
|
3206
3270
|
}
|
|
3207
3271
|
render() {
|
|
3208
3272
|
if (!this.computedContext)
|
|
3209
|
-
return
|
|
3273
|
+
return html14``;
|
|
3210
3274
|
const items = this.computedContext.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items));
|
|
3211
|
-
return
|
|
3275
|
+
return html14` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
|
|
3212
3276
|
}
|
|
3213
3277
|
};
|
|
3214
3278
|
__decorate14([
|
|
3215
|
-
|
|
3279
|
+
consume8({ context: computedContext, subscribe: true })
|
|
3216
3280
|
], TestPagingButtonsStamp.prototype, "computedContext", void 0);
|
|
3217
3281
|
|
|
3218
3282
|
// ../qti-test/dist/components/test-prev/test-prev.js
|
|
3283
|
+
import { css as css9, html as html15, LitElement as LitElement16 } from "lit";
|
|
3284
|
+
import { property as property12 } from "lit/decorators.js";
|
|
3285
|
+
import { consume as consume9 } from "@lit/context";
|
|
3219
3286
|
var __decorate15 = function(decorators, target, key, desc) {
|
|
3220
|
-
var
|
|
3221
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3222
|
-
else for (var
|
|
3223
|
-
return
|
|
3287
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3288
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3289
|
+
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;
|
|
3290
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3224
3291
|
};
|
|
3225
|
-
var TestPrev = class extends
|
|
3292
|
+
var TestPrev = class extends LitElement16 {
|
|
3226
3293
|
_handleTestElementChange(_oldValue, newValue) {
|
|
3227
3294
|
if (newValue) {
|
|
3228
|
-
this.
|
|
3295
|
+
this.requestUpdate();
|
|
3229
3296
|
}
|
|
3230
3297
|
}
|
|
3231
3298
|
static {
|
|
3232
|
-
this.styles =
|
|
3299
|
+
this.styles = css9`
|
|
3233
3300
|
:host {
|
|
3234
3301
|
${btn};
|
|
3235
3302
|
}
|
|
@@ -3241,8 +3308,8 @@ var TestPrev = class extends i2 {
|
|
|
3241
3308
|
constructor() {
|
|
3242
3309
|
super();
|
|
3243
3310
|
this._internalDisabled = true;
|
|
3244
|
-
this.addEventListener("click", (
|
|
3245
|
-
|
|
3311
|
+
this.addEventListener("click", (e) => {
|
|
3312
|
+
e.preventDefault();
|
|
3246
3313
|
if (!this._internalDisabled)
|
|
3247
3314
|
this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);
|
|
3248
3315
|
});
|
|
@@ -3258,7 +3325,10 @@ var TestPrev = class extends i2 {
|
|
|
3258
3325
|
this.checkDisabled();
|
|
3259
3326
|
}
|
|
3260
3327
|
checkDisabled() {
|
|
3261
|
-
|
|
3328
|
+
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
3329
|
+
const activeSection = testPart?.sections.find((s) => s.active);
|
|
3330
|
+
const navigationMode = activeSection?.navigationMode || testPart?.navigationMode || "nonlinear";
|
|
3331
|
+
this._internalDisabled = navigationMode === "linear" || !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;
|
|
3262
3332
|
}
|
|
3263
3333
|
_requestItem(identifier) {
|
|
3264
3334
|
this.dispatchEvent(new CustomEvent("qti-request-navigation", {
|
|
@@ -3271,46 +3341,51 @@ var TestPrev = class extends i2 {
|
|
|
3271
3341
|
}));
|
|
3272
3342
|
}
|
|
3273
3343
|
render() {
|
|
3274
|
-
return
|
|
3344
|
+
return html15`<slot></slot>`;
|
|
3275
3345
|
}
|
|
3276
3346
|
};
|
|
3277
3347
|
__decorate15([
|
|
3278
|
-
|
|
3348
|
+
property12({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
3279
3349
|
], TestPrev.prototype, "_internalDisabled", void 0);
|
|
3280
3350
|
__decorate15([
|
|
3281
|
-
|
|
3351
|
+
consume9({ context: computedContext, subscribe: true })
|
|
3282
3352
|
], TestPrev.prototype, "computedContext", void 0);
|
|
3283
3353
|
__decorate15([
|
|
3284
3354
|
watch("computedContext")
|
|
3285
3355
|
], TestPrev.prototype, "_handleTestElementChange", null);
|
|
3286
3356
|
|
|
3287
3357
|
// ../qti-test/dist/components/test-print-context/test-print-context.js
|
|
3358
|
+
import { html as html16, LitElement as LitElement17 } from "lit";
|
|
3359
|
+
import { consume as consume10 } from "@lit/context";
|
|
3360
|
+
import { state as state5 } from "lit/decorators.js";
|
|
3288
3361
|
var __decorate16 = function(decorators, target, key, desc) {
|
|
3289
|
-
var
|
|
3290
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3291
|
-
else for (var
|
|
3292
|
-
return
|
|
3362
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3363
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3364
|
+
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;
|
|
3365
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3293
3366
|
};
|
|
3294
|
-
var TestPrintContext = class extends
|
|
3367
|
+
var TestPrintContext = class extends LitElement17 {
|
|
3295
3368
|
render() {
|
|
3296
|
-
return
|
|
3369
|
+
return html16` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
|
|
3297
3370
|
}
|
|
3298
3371
|
};
|
|
3299
3372
|
__decorate16([
|
|
3300
|
-
|
|
3301
|
-
|
|
3373
|
+
state5(),
|
|
3374
|
+
consume10({ context: computedContext, subscribe: true })
|
|
3302
3375
|
], TestPrintContext.prototype, "computedContext", void 0);
|
|
3303
3376
|
|
|
3304
3377
|
// ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
|
|
3378
|
+
import { html as html17, css as css10, LitElement as LitElement18 } from "lit";
|
|
3379
|
+
import { consume as consume11 } from "@lit/context";
|
|
3305
3380
|
var __decorate17 = function(decorators, target, key, desc) {
|
|
3306
|
-
var
|
|
3307
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3308
|
-
else for (var
|
|
3309
|
-
return
|
|
3381
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3382
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3383
|
+
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;
|
|
3384
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3310
3385
|
};
|
|
3311
|
-
var TestPrintVariables = class extends
|
|
3386
|
+
var TestPrintVariables = class extends LitElement18 {
|
|
3312
3387
|
static {
|
|
3313
|
-
this.styles =
|
|
3388
|
+
this.styles = css10`
|
|
3314
3389
|
table {
|
|
3315
3390
|
width: 100%;
|
|
3316
3391
|
border-collapse: collapse;
|
|
@@ -3336,10 +3411,10 @@ var TestPrintVariables = class extends i2 {
|
|
|
3336
3411
|
render() {
|
|
3337
3412
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
3338
3413
|
if (!activeItem || !activeItem.variables)
|
|
3339
|
-
return
|
|
3414
|
+
return html17``;
|
|
3340
3415
|
const responseVariables = activeItem.variables.filter((v) => v.type === "response");
|
|
3341
3416
|
const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
|
|
3342
|
-
const renderTable = (variables, title) =>
|
|
3417
|
+
const renderTable = (variables, title) => html17`
|
|
3343
3418
|
<h3>${title}</h3>
|
|
3344
3419
|
<table>
|
|
3345
3420
|
<thead>
|
|
@@ -3354,9 +3429,9 @@ var TestPrintVariables = class extends i2 {
|
|
|
3354
3429
|
<tbody>
|
|
3355
3430
|
${variables.map((v) => {
|
|
3356
3431
|
const correctResponse = v.correctResponse ? Array.isArray(v.correctResponse) ? v.correctResponse.join(", ") : v.correctResponse : "";
|
|
3357
|
-
const mapEntries = v.mapping?.mapEntries?.map((
|
|
3358
|
-
const areaMapEntries = v.areaMapping?.areaMapEntries?.map((
|
|
3359
|
-
return
|
|
3432
|
+
const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
|
|
3433
|
+
const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
|
|
3434
|
+
return html17`
|
|
3360
3435
|
<tr>
|
|
3361
3436
|
<td>${v.identifier}</td>
|
|
3362
3437
|
<td>${Array.isArray(v.value) ? v.value.join(", ") : v.value}</td>
|
|
@@ -3369,23 +3444,26 @@ var TestPrintVariables = class extends i2 {
|
|
|
3369
3444
|
</tbody>
|
|
3370
3445
|
</table>
|
|
3371
3446
|
`;
|
|
3372
|
-
return
|
|
3447
|
+
return html17`
|
|
3373
3448
|
${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
|
|
3374
3449
|
`;
|
|
3375
3450
|
}
|
|
3376
3451
|
};
|
|
3377
3452
|
__decorate17([
|
|
3378
|
-
|
|
3453
|
+
consume11({ context: computedContext, subscribe: true })
|
|
3379
3454
|
], TestPrintVariables.prototype, "computedContext", void 0);
|
|
3380
3455
|
|
|
3381
3456
|
// ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
|
|
3457
|
+
import { html as html18, LitElement as LitElement19, nothing as nothing2 } from "lit";
|
|
3458
|
+
import { consume as consume12 } from "@lit/context";
|
|
3459
|
+
import { property as property13 } from "lit/decorators.js";
|
|
3382
3460
|
var __decorate18 = function(decorators, target, key, desc) {
|
|
3383
|
-
var
|
|
3384
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3385
|
-
else for (var
|
|
3386
|
-
return
|
|
3461
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3462
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3463
|
+
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;
|
|
3464
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3387
3465
|
};
|
|
3388
|
-
var TestScoringButtons = class extends
|
|
3466
|
+
var TestScoringButtons = class extends LitElement19 {
|
|
3389
3467
|
createRenderRoot() {
|
|
3390
3468
|
return this;
|
|
3391
3469
|
}
|
|
@@ -3414,23 +3492,23 @@ var TestScoringButtons = class extends i2 {
|
|
|
3414
3492
|
render() {
|
|
3415
3493
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
3416
3494
|
if (!activeItem || !activeItem.variables)
|
|
3417
|
-
return
|
|
3495
|
+
return html18``;
|
|
3418
3496
|
const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
3419
3497
|
const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
|
|
3420
3498
|
const score = scoreOutcome?.value;
|
|
3421
3499
|
const disabled = !(scoreOutcome?.externalScored === "human");
|
|
3422
3500
|
if (!maxScore || !scoreOutcome)
|
|
3423
|
-
return
|
|
3501
|
+
return nothing2;
|
|
3424
3502
|
const scores = [...Array(Number(maxScore) + 1).keys()];
|
|
3425
|
-
return
|
|
3503
|
+
return html18`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing2}`;
|
|
3426
3504
|
}
|
|
3427
3505
|
constructor() {
|
|
3428
3506
|
super();
|
|
3429
3507
|
this.view = "";
|
|
3430
3508
|
this.disabled = false;
|
|
3431
3509
|
this.myTemplate = null;
|
|
3432
|
-
this.addEventListener("click", (
|
|
3433
|
-
const target =
|
|
3510
|
+
this.addEventListener("click", (e) => {
|
|
3511
|
+
const target = e.target;
|
|
3434
3512
|
const value = parseFloat(target.value);
|
|
3435
3513
|
if (target.tagName === "INPUT") {
|
|
3436
3514
|
this.#changeOutcomeScore(value);
|
|
@@ -3439,23 +3517,26 @@ var TestScoringButtons = class extends i2 {
|
|
|
3439
3517
|
}
|
|
3440
3518
|
};
|
|
3441
3519
|
__decorate18([
|
|
3442
|
-
|
|
3520
|
+
property13({ type: String, attribute: "view" })
|
|
3443
3521
|
], TestScoringButtons.prototype, "view", void 0);
|
|
3444
3522
|
__decorate18([
|
|
3445
|
-
|
|
3523
|
+
property13({ type: Boolean })
|
|
3446
3524
|
], TestScoringButtons.prototype, "disabled", void 0);
|
|
3447
3525
|
__decorate18([
|
|
3448
|
-
|
|
3526
|
+
consume12({ context: computedContext, subscribe: true })
|
|
3449
3527
|
], TestScoringButtons.prototype, "computedContext", void 0);
|
|
3450
3528
|
|
|
3451
3529
|
// ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
|
|
3530
|
+
import { consume as consume13 } from "@lit/context";
|
|
3531
|
+
import { html as html19, LitElement as LitElement20 } from "lit";
|
|
3532
|
+
import { property as property14 } from "lit/decorators.js";
|
|
3452
3533
|
var __decorate19 = function(decorators, target, key, desc) {
|
|
3453
|
-
var
|
|
3454
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3455
|
-
else for (var
|
|
3456
|
-
return
|
|
3534
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3535
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3536
|
+
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;
|
|
3537
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3457
3538
|
};
|
|
3458
|
-
var TestScoringFeedback = class extends
|
|
3539
|
+
var TestScoringFeedback = class extends LitElement20 {
|
|
3459
3540
|
constructor() {
|
|
3460
3541
|
super(...arguments);
|
|
3461
3542
|
this.view = null;
|
|
@@ -3463,9 +3544,9 @@ var TestScoringFeedback = class extends i2 {
|
|
|
3463
3544
|
render() {
|
|
3464
3545
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
3465
3546
|
if (!activeItem || !activeItem.variables)
|
|
3466
|
-
return
|
|
3547
|
+
return html19``;
|
|
3467
3548
|
if (activeItem["category"] === "dep-informational")
|
|
3468
|
-
return
|
|
3549
|
+
return html19`<div>${this.dataset.informational}</div>`;
|
|
3469
3550
|
const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
|
|
3470
3551
|
const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
|
|
3471
3552
|
const score = parseFloat(scoreOutcome?.value);
|
|
@@ -3485,24 +3566,26 @@ var TestScoringFeedback = class extends i2 {
|
|
|
3485
3566
|
}
|
|
3486
3567
|
return this.dataset.inProgress;
|
|
3487
3568
|
};
|
|
3488
|
-
return
|
|
3569
|
+
return html19`<div>${feedbackText()}</div>`;
|
|
3489
3570
|
}
|
|
3490
3571
|
};
|
|
3491
3572
|
__decorate19([
|
|
3492
|
-
|
|
3573
|
+
consume13({ context: computedContext, subscribe: true })
|
|
3493
3574
|
], TestScoringFeedback.prototype, "computedContext", void 0);
|
|
3494
3575
|
__decorate19([
|
|
3495
|
-
|
|
3576
|
+
property14({ type: String, attribute: "view" })
|
|
3496
3577
|
], TestScoringFeedback.prototype, "view", void 0);
|
|
3497
3578
|
|
|
3498
3579
|
// ../qti-test/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js
|
|
3580
|
+
import { html as html20, LitElement as LitElement21 } from "lit";
|
|
3581
|
+
import { consume as consume14 } from "@lit/context";
|
|
3499
3582
|
var __decorate20 = function(decorators, target, key, desc) {
|
|
3500
|
-
var
|
|
3501
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3502
|
-
else for (var
|
|
3503
|
-
return
|
|
3583
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3584
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3585
|
+
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;
|
|
3586
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3504
3587
|
};
|
|
3505
|
-
var TestSectionButtonsStamp = class extends
|
|
3588
|
+
var TestSectionButtonsStamp = class extends LitElement21 {
|
|
3506
3589
|
#internals;
|
|
3507
3590
|
createRenderRoot() {
|
|
3508
3591
|
return this;
|
|
@@ -3519,25 +3602,27 @@ var TestSectionButtonsStamp = class extends i2 {
|
|
|
3519
3602
|
}
|
|
3520
3603
|
render() {
|
|
3521
3604
|
if (!this.computedContext)
|
|
3522
|
-
return
|
|
3605
|
+
return html20``;
|
|
3523
3606
|
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
3524
|
-
return
|
|
3607
|
+
return html20` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
3525
3608
|
}
|
|
3526
3609
|
};
|
|
3527
3610
|
__decorate20([
|
|
3528
|
-
|
|
3611
|
+
consume14({ context: computedContext, subscribe: true })
|
|
3529
3612
|
], TestSectionButtonsStamp.prototype, "computedContext", void 0);
|
|
3530
3613
|
|
|
3531
3614
|
// ../qti-test/dist/components/test-section-link/test-section-link.js
|
|
3615
|
+
import { css as css11, html as html21, LitElement as LitElement22 } from "lit";
|
|
3616
|
+
import { property as property15 } from "lit/decorators.js";
|
|
3532
3617
|
var __decorate21 = function(decorators, target, key, desc) {
|
|
3533
|
-
var
|
|
3534
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3535
|
-
else for (var
|
|
3536
|
-
return
|
|
3618
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3619
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3620
|
+
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;
|
|
3621
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3537
3622
|
};
|
|
3538
|
-
var TestSectionLink = class extends
|
|
3623
|
+
var TestSectionLink = class extends LitElement22 {
|
|
3539
3624
|
static {
|
|
3540
|
-
this.styles =
|
|
3625
|
+
this.styles = css11`
|
|
3541
3626
|
:host {
|
|
3542
3627
|
${btn};
|
|
3543
3628
|
}
|
|
@@ -3562,21 +3647,24 @@ var TestSectionLink = class extends i2 {
|
|
|
3562
3647
|
this.addEventListener("click", () => this.#requestItem(this.sectionId));
|
|
3563
3648
|
}
|
|
3564
3649
|
render() {
|
|
3565
|
-
return
|
|
3650
|
+
return html21` <slot></slot> `;
|
|
3566
3651
|
}
|
|
3567
3652
|
};
|
|
3568
3653
|
__decorate21([
|
|
3569
|
-
|
|
3654
|
+
property15({ type: String, attribute: "section-id" })
|
|
3570
3655
|
], TestSectionLink.prototype, "sectionId", void 0);
|
|
3571
3656
|
|
|
3572
3657
|
// ../qti-test/dist/components/test-stamp/test-stamp.js
|
|
3658
|
+
import { html as html22, LitElement as LitElement23, nothing as nothing3 } from "lit";
|
|
3659
|
+
import { property as property16, state as state6 } from "lit/decorators.js";
|
|
3660
|
+
import { consume as consume15 } from "@lit/context";
|
|
3573
3661
|
var __decorate22 = function(decorators, target, key, desc) {
|
|
3574
|
-
var
|
|
3575
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3576
|
-
else for (var
|
|
3577
|
-
return
|
|
3662
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3663
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3664
|
+
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;
|
|
3665
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3578
3666
|
};
|
|
3579
|
-
var TestStamp = class extends
|
|
3667
|
+
var TestStamp = class extends LitElement23 {
|
|
3580
3668
|
constructor() {
|
|
3581
3669
|
super(...arguments);
|
|
3582
3670
|
this.debug = false;
|
|
@@ -3639,30 +3727,33 @@ var TestStamp = class extends i2 {
|
|
|
3639
3727
|
}));
|
|
3640
3728
|
}
|
|
3641
3729
|
render() {
|
|
3642
|
-
return
|
|
3643
|
-
${this.myTemplate ? this.myTemplate(this.stampContext) :
|
|
3730
|
+
return html22` ${this.debug ? html22`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing3}
|
|
3731
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing3}`;
|
|
3644
3732
|
}
|
|
3645
3733
|
};
|
|
3646
3734
|
__decorate22([
|
|
3647
|
-
|
|
3735
|
+
property16({ type: Boolean, reflect: true })
|
|
3648
3736
|
], TestStamp.prototype, "debug", void 0);
|
|
3649
3737
|
__decorate22([
|
|
3650
|
-
|
|
3651
|
-
|
|
3738
|
+
state6(),
|
|
3739
|
+
consume15({ context: computedContext, subscribe: true })
|
|
3652
3740
|
], TestStamp.prototype, "computedContext", void 0);
|
|
3653
3741
|
__decorate22([
|
|
3654
|
-
|
|
3742
|
+
state6()
|
|
3655
3743
|
], TestStamp.prototype, "stampContext", void 0);
|
|
3656
3744
|
|
|
3657
3745
|
// ../qti-test/dist/components/test-view-toggle/test-view.js
|
|
3746
|
+
import { html as html23, LitElement as LitElement24 } from "lit";
|
|
3747
|
+
import { property as property17, state as state7 } from "lit/decorators.js";
|
|
3748
|
+
import { consume as consume16 } from "@lit/context";
|
|
3658
3749
|
var __decorate23 = function(decorators, target, key, desc) {
|
|
3659
|
-
var
|
|
3660
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3661
|
-
else for (var
|
|
3662
|
-
return
|
|
3750
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3751
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3752
|
+
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;
|
|
3753
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3663
3754
|
};
|
|
3664
3755
|
var _a;
|
|
3665
|
-
var TestView = class extends
|
|
3756
|
+
var TestView = class extends LitElement24 {
|
|
3666
3757
|
constructor() {
|
|
3667
3758
|
super(...arguments);
|
|
3668
3759
|
this.label = "view";
|
|
@@ -3694,46 +3785,48 @@ var TestView = class extends i2 {
|
|
|
3694
3785
|
}));
|
|
3695
3786
|
}
|
|
3696
3787
|
render() {
|
|
3697
|
-
return
|
|
3788
|
+
return html23`
|
|
3698
3789
|
<label part="label" for="viewSelect">${this.label}</label>
|
|
3699
3790
|
<select
|
|
3700
3791
|
part="select"
|
|
3701
3792
|
id="viewSelect"
|
|
3702
|
-
@change=${(
|
|
3703
|
-
const el =
|
|
3793
|
+
@change=${(e) => {
|
|
3794
|
+
const el = e.target;
|
|
3704
3795
|
this._switchView(el.value);
|
|
3705
3796
|
}}
|
|
3706
3797
|
>
|
|
3707
|
-
${this._viewOptions.map((v) =>
|
|
3798
|
+
${this._viewOptions.map((v) => html23`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
|
|
3708
3799
|
</select>
|
|
3709
3800
|
`;
|
|
3710
3801
|
}
|
|
3711
3802
|
};
|
|
3712
3803
|
_a = TestView;
|
|
3713
3804
|
__decorate23([
|
|
3714
|
-
|
|
3805
|
+
consume16({ context: sessionContext, subscribe: true })
|
|
3715
3806
|
], TestView.prototype, "sessionContext", void 0);
|
|
3716
3807
|
__decorate23([
|
|
3717
|
-
|
|
3808
|
+
property17({ type: String })
|
|
3718
3809
|
], TestView.prototype, "label", void 0);
|
|
3719
3810
|
__decorate23([
|
|
3720
|
-
|
|
3811
|
+
property17({ type: String, attribute: "view-options" })
|
|
3721
3812
|
], TestView.prototype, "viewOptions", void 0);
|
|
3722
3813
|
__decorate23([
|
|
3723
3814
|
watch("viewOptions", { waitUntilFirstUpdate: true })
|
|
3724
3815
|
], TestView.prototype, "_handleViewOptionsChange", void 0);
|
|
3725
3816
|
__decorate23([
|
|
3726
|
-
|
|
3817
|
+
state7()
|
|
3727
3818
|
], TestView.prototype, "_viewOptions", void 0);
|
|
3728
3819
|
|
|
3729
3820
|
// ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
|
|
3821
|
+
import { consume as consume17 } from "@lit/context";
|
|
3822
|
+
import { html as html24, LitElement as LitElement25, nothing as nothing4 } from "lit";
|
|
3730
3823
|
var __decorate24 = function(decorators, target, key, desc) {
|
|
3731
|
-
var
|
|
3732
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
3733
|
-
else for (var
|
|
3734
|
-
return
|
|
3824
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3825
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3826
|
+
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;
|
|
3827
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3735
3828
|
};
|
|
3736
|
-
var TestViewToggle = class extends
|
|
3829
|
+
var TestViewToggle = class extends LitElement25 {
|
|
3737
3830
|
createRenderRoot() {
|
|
3738
3831
|
return this;
|
|
3739
3832
|
}
|
|
@@ -3763,13 +3856,13 @@ var TestViewToggle = class extends i2 {
|
|
|
3763
3856
|
});
|
|
3764
3857
|
}
|
|
3765
3858
|
render() {
|
|
3766
|
-
return
|
|
3859
|
+
return html24`${this.myTemplate ? this.myTemplate({
|
|
3767
3860
|
view: this.sessionContext?.view
|
|
3768
|
-
}) :
|
|
3861
|
+
}) : nothing4}`;
|
|
3769
3862
|
}
|
|
3770
3863
|
};
|
|
3771
3864
|
__decorate24([
|
|
3772
|
-
|
|
3865
|
+
consume17({ context: sessionContext, subscribe: true })
|
|
3773
3866
|
], TestViewToggle.prototype, "sessionContext", void 0);
|
|
3774
3867
|
|
|
3775
3868
|
// ../qti-test/dist/elements.js
|
|
@@ -3857,12 +3950,5 @@ export {
|
|
|
3857
3950
|
* @license
|
|
3858
3951
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
3859
3952
|
*)
|
|
3860
|
-
|
|
3861
|
-
lit-html/node/private-ssr-support.js:
|
|
3862
|
-
(**
|
|
3863
|
-
* @license
|
|
3864
|
-
* Copyright 2019 Google LLC
|
|
3865
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3866
|
-
*)
|
|
3867
3953
|
*/
|
|
3868
|
-
//# sourceMappingURL=chunk-
|
|
3954
|
+
//# sourceMappingURL=chunk-HBSWJC3B.js.map
|