@citolab/qti-components 7.1.1 → 7.1.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.
Files changed (37) hide show
  1. package/cdn/chunks/chunk-6DWYLZ5E.js +5 -0
  2. package/cdn/chunks/chunk-7QMIMK5V.js +5 -0
  3. package/cdn/chunks/chunk-BGHD6LZP.js +1007 -0
  4. package/cdn/chunks/chunk-EBVKDAVL.js +5 -0
  5. package/cdn/chunks/chunk-GNIERKRX.js +1007 -0
  6. package/cdn/chunks/chunk-NQKAQ6AU.js +1007 -0
  7. package/cdn/chunks/chunk-WVVKSWZV.js +5 -0
  8. package/cdn/chunks/chunk-ZHVOZ7WZ.js +1007 -0
  9. package/cdn/index.global.js +1 -1
  10. package/cdn/index.js +1 -1
  11. package/cdn/qti-components/index.js +1 -1
  12. package/cdn/qti-test/components/index.js +1 -1
  13. package/cdn/qti-test/core/index.js +1 -1
  14. package/dist/chunks/chunk-2RXVRB7Z.js +659 -0
  15. package/dist/chunks/chunk-2RXVRB7Z.js.map +1 -0
  16. package/dist/chunks/chunk-4BDSKOGB.js +6873 -0
  17. package/dist/chunks/chunk-4BDSKOGB.js.map +1 -0
  18. package/dist/chunks/chunk-BLUHTHXX.js +6877 -0
  19. package/dist/chunks/chunk-BLUHTHXX.js.map +1 -0
  20. package/dist/chunks/chunk-BQ22JHXC.js +6877 -0
  21. package/dist/chunks/chunk-BQ22JHXC.js.map +1 -0
  22. package/dist/chunks/chunk-LSNOL7NJ.js +6872 -0
  23. package/dist/chunks/chunk-LSNOL7NJ.js.map +1 -0
  24. package/dist/chunks/chunk-RB227QQP.js +659 -0
  25. package/dist/chunks/chunk-RB227QQP.js.map +1 -0
  26. package/dist/chunks/chunk-U7VUCT7D.js +659 -0
  27. package/dist/chunks/chunk-U7VUCT7D.js.map +1 -0
  28. package/dist/chunks/chunk-V2EYNAG4.js +659 -0
  29. package/dist/chunks/chunk-V2EYNAG4.js.map +1 -0
  30. package/dist/index.js +49 -49
  31. package/dist/qti-components/index.js +1 -1
  32. package/dist/qti-test/components/index.js +11 -11
  33. package/dist/qti-test/components/test-next.js +2 -2
  34. package/dist/qti-test/components/test-prev.js +2 -2
  35. package/dist/qti-test/components/test-view.js +2 -2
  36. package/dist/qti-test/core/index.js +7 -7
  37. package/package.json +1 -1
@@ -0,0 +1,659 @@
1
+ import {
2
+ INITIAL_SESSION_CONTEXT,
3
+ sessionContext
4
+ } from "./chunk-UZ4QB5IO.js";
5
+ import {
6
+ INITIAL_TEST_CONTEXT,
7
+ testContext
8
+ } from "./chunk-CJADUWEC.js";
9
+ import {
10
+ QtiModalFeedback
11
+ } from "./chunk-4BDSKOGB.js";
12
+ import {
13
+ qtiTransformItem
14
+ } from "./chunk-XDMSEAYC.js";
15
+ import {
16
+ __decorateClass
17
+ } from "./chunk-H2JE6IVU.js";
18
+
19
+ // src/lib/qti-test/core/qti-test.ts
20
+ import { html } from "lit";
21
+ import { customElement } from "lit/decorators.js";
22
+
23
+ // src/lib/qti-test/core/mixins/test-loader.mixin.ts
24
+ import { property } from "lit/decorators.js";
25
+ var setSessionData = (key, value) => sessionStorage.setItem(key, JSON.stringify(value));
26
+ var getSessionData = (key) => sessionStorage.getItem(key) ? JSON.parse(sessionStorage.getItem(key)) : null;
27
+ var TestLoaderMixin = (superClass) => {
28
+ class TestLoaderClass extends superClass {
29
+ constructor(...args) {
30
+ super(...args);
31
+ this.autoStoreRestoreContext = null;
32
+ this.navItemId = null;
33
+ this.addEventListener("qti-load-item-request", ({ detail }) => {
34
+ detail.promise = (async () => {
35
+ const api = await qtiTransformItem().load(`${detail.href}`, detail.cancelPreviousRequest);
36
+ return api.htmlDoc();
37
+ })();
38
+ });
39
+ }
40
+ async connectedCallback() {
41
+ super.connectedCallback();
42
+ if (this.navItemId) {
43
+ this.sessionContext = { ...this.sessionContext, navItemId: this.navItemId };
44
+ }
45
+ if (this.autoStoreRestoreContext) {
46
+ const testContext2 = getSessionData(this.autoStoreRestoreContext);
47
+ if (testContext2) {
48
+ this.testContext = testContext2;
49
+ }
50
+ }
51
+ }
52
+ willUpdate(changedProperties) {
53
+ if (changedProperties.has("navItemId")) {
54
+ this.sessionContext = { ...this.sessionContext, navItemId: this.navItemId };
55
+ }
56
+ if (changedProperties.has("testContext")) {
57
+ if (this.autoStoreRestoreContext) {
58
+ setSessionData(this.autoStoreRestoreContext, this.testContext);
59
+ }
60
+ }
61
+ }
62
+ }
63
+ __decorateClass([
64
+ property({ type: String, attribute: "auto-store-restore" })
65
+ ], TestLoaderClass.prototype, "autoStoreRestoreContext", 2);
66
+ __decorateClass([
67
+ property({ type: String, attribute: "nav-item-id" })
68
+ ], TestLoaderClass.prototype, "navItemId", 2);
69
+ return TestLoaderClass;
70
+ };
71
+
72
+ // src/lib/qti-test/core/mixins/test-navigation.mixin.ts
73
+ import { property as property2 } from "lit/decorators.js";
74
+ var TestNavigationMixin = (superClass) => {
75
+ class TestNavigationClass extends superClass {
76
+ constructor(...args) {
77
+ super(...args);
78
+ this.navigate = "item";
79
+ this.addEventListener(
80
+ "qti-request-navigation",
81
+ async ({ detail }) => {
82
+ if (!detail?.id) return;
83
+ if (detail.type === "item") {
84
+ await this._loadItems([detail.id]);
85
+ const navItemId = detail.id;
86
+ const itemRefEl = this._testElement?.querySelector(
87
+ `qti-assessment-item-ref[identifier="${detail.id}"]`
88
+ );
89
+ const navPartId = itemRefEl.closest("qti-test-part")?.identifier;
90
+ const navSectionId = itemRefEl.closest("qti-assessment-section")?.identifier;
91
+ this.sessionContext = { ...this.sessionContext, navPartId, navSectionId, navItemId, navItemLoading: false };
92
+ } else if (detail.type === "section") {
93
+ const itemIds = this._getSectionItemIds(detail.id);
94
+ await this._loadItems(itemIds);
95
+ const navSectionId = detail.id;
96
+ const sectionRefEl = this._testElement?.querySelector(
97
+ `qti-assessment-section[identifier="${navSectionId}"]`
98
+ );
99
+ const navPartId = sectionRefEl.closest("qti-test-part")?.identifier;
100
+ this.sessionContext = {
101
+ ...this.sessionContext,
102
+ navPartId,
103
+ navSectionId,
104
+ navItemId: null,
105
+ navItemLoading: false
106
+ };
107
+ }
108
+ }
109
+ );
110
+ this.addEventListener("qti-assessment-test-connected", (e) => {
111
+ this._testElement = e.detail;
112
+ let id;
113
+ if (this.navigate === "section") {
114
+ id = this._testElement.querySelector("qti-assessment-section")?.identifier;
115
+ } else {
116
+ id = this.sessionContext.navItemId ?? this._testElement.querySelector("qti-assessment-item-ref")?.identifier;
117
+ }
118
+ if (id) {
119
+ this.dispatchEvent(
120
+ new CustomEvent("qti-request-navigation", {
121
+ detail: { type: this.navigate === "section" ? "section" : "item", id },
122
+ bubbles: true,
123
+ composed: true
124
+ })
125
+ );
126
+ }
127
+ });
128
+ }
129
+ async _loadItems(itemIds) {
130
+ let results;
131
+ if (!this._testElement || itemIds.length === 0) return;
132
+ const itemRefEls = itemIds.map(
133
+ (id) => this._testElement.querySelector(`qti-assessment-item-ref[identifier="${id}"]`)
134
+ );
135
+ if (itemRefEls.includes(null)) {
136
+ console.warn(`One or more items not found: ${itemIds}`);
137
+ return;
138
+ }
139
+ this._clearLoadedItems();
140
+ this.sessionContext = { ...this.sessionContext, navItemLoading: true };
141
+ const itemLoadPromises = itemRefEls.map(async (itemRef) => {
142
+ if (!itemRef) return null;
143
+ return { itemRef, doc: await this._loadItemRequest(itemRef.href) };
144
+ });
145
+ try {
146
+ results = await Promise.all(itemLoadPromises);
147
+ results.forEach(({ itemRef, doc }) => {
148
+ if (itemRef && doc) itemRef.xmlDoc = doc;
149
+ });
150
+ requestAnimationFrame(() => {
151
+ this.dispatchEvent(
152
+ new CustomEvent("qti-test-connected", {
153
+ detail: results.map(({ itemRef }) => ({ identifier: itemRef?.identifier, element: itemRef })),
154
+ bubbles: true,
155
+ composed: true
156
+ })
157
+ );
158
+ });
159
+ } catch (error) {
160
+ console.error("Error loading items:", error);
161
+ }
162
+ return results;
163
+ }
164
+ _getSectionItemIds(navSectionId) {
165
+ const sectionRefEl = this._testElement?.querySelector(
166
+ `qti-assessment-section[identifier="${navSectionId}"]`
167
+ );
168
+ if (!sectionRefEl) {
169
+ console.warn(`Section with identifier "${navSectionId}" not found.`);
170
+ return [];
171
+ }
172
+ return Array.from(
173
+ this._testElement.querySelectorAll(
174
+ `qti-assessment-section[identifier="${navSectionId}"] > qti-assessment-item-ref`
175
+ )
176
+ ).map((itemRef) => itemRef.identifier);
177
+ }
178
+ _clearLoadedItems() {
179
+ const itemRefEls = this._testElement?.querySelectorAll(
180
+ `qti-assessment-test qti-assessment-item-ref`
181
+ );
182
+ Array.from(itemRefEls || []).forEach((itemElement) => {
183
+ itemElement.xmlDoc = null;
184
+ });
185
+ }
186
+ _loadItemRequest(href) {
187
+ const event = new CustomEvent("qti-load-item-request", {
188
+ bubbles: true,
189
+ composed: true,
190
+ detail: { href, promise: null }
191
+ });
192
+ this.dispatchEvent(event);
193
+ return event.detail.promise;
194
+ }
195
+ }
196
+ __decorateClass([
197
+ property2({ type: String })
198
+ ], TestNavigationClass.prototype, "navigate", 2);
199
+ return TestNavigationClass;
200
+ };
201
+
202
+ // src/lib/qti-test/core/mixins/test-view.mixin.ts
203
+ var TestViewMixin = (superClass) => {
204
+ class TestViewClass extends superClass {
205
+ constructor(...args) {
206
+ super(...args);
207
+ this.sessionContext = { ...this.sessionContext, view: "candidate" };
208
+ this.addEventListener("on-test-switch-view", (e) => {
209
+ this.sessionContext = { ...this.sessionContext, view: e.detail };
210
+ this._updateElementView();
211
+ });
212
+ this.addEventListener("qti-assessment-test-connected", () => {
213
+ this._updateElementView();
214
+ });
215
+ this.addEventListener("qti-assessment-item-connected", (e) => {
216
+ this._updateElementView();
217
+ this._setCorrectResponseVisibility(e.detail);
218
+ });
219
+ }
220
+ willUpdate(changedProperties) {
221
+ super.willUpdate(changedProperties);
222
+ if (changedProperties.has("sessionContext")) {
223
+ this._updateElementView();
224
+ }
225
+ }
226
+ // Method to handle view updates for elements based on the current context view
227
+ _updateElementView() {
228
+ if (this.testElement && this.testElement) {
229
+ const viewElements = Array.from(this.testElement.querySelectorAll("[view]"));
230
+ viewElements.forEach((element) => {
231
+ element.classList.toggle("show", element.getAttribute("view") === this.sessionContext.view);
232
+ });
233
+ const assessmentItem = this.testElement.querySelector(
234
+ `qti-assessment-item[identifier="${this.sessionContext.navItemId}"]`
235
+ );
236
+ if (assessmentItem) {
237
+ assessmentItem.showCorrectResponse(this.sessionContext.view === "scorer");
238
+ }
239
+ }
240
+ }
241
+ // Event handler for connected QTI assessment items
242
+ _setCorrectResponseVisibility(assessmentItem) {
243
+ assessmentItem.showCorrectResponse(this.sessionContext.view === "scorer");
244
+ }
245
+ }
246
+ return TestViewClass;
247
+ };
248
+
249
+ // src/lib/qti-test/core/test-base.ts
250
+ import { provide } from "@lit/context";
251
+ import { LitElement } from "lit";
252
+ import { state } from "lit/decorators.js";
253
+ var TestBase = class extends LitElement {
254
+ constructor() {
255
+ super();
256
+ this.testContext = INITIAL_TEST_CONTEXT;
257
+ this.sessionContext = INITIAL_SESSION_CONTEXT;
258
+ /**
259
+ * Updates the variables of an assessment item in the test context.
260
+ * - Matches the assessment item with the corresponding test context item.
261
+ * - If the item is not found, logs a warning.
262
+ * - Updates variables in the test context if exactly one variable exists.
263
+ * - Otherwise, syncs the assessment item's variables with the test context.
264
+ *
265
+ * @param assessmentItem - The assessment item to update.
266
+ */
267
+ this._updateItemInTestContext = (assessmentItem) => {
268
+ const { identifier } = assessmentItem;
269
+ const fullVariables = assessmentItem._context.variables;
270
+ const itemContext = this.testContext.items.find((i) => i?.identifier === identifier);
271
+ if (!itemContext) {
272
+ console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
273
+ return;
274
+ }
275
+ if (itemContext.variables?.length === 1) {
276
+ this._updateItemVariablesInTestContext(identifier, fullVariables);
277
+ } else {
278
+ assessmentItem.variables = [...itemContext.variables || []];
279
+ }
280
+ };
281
+ this.addEventListener("qti-assessment-test-connected", (e) => {
282
+ if (this.testContext && this.testContext.items.length > 0) return;
283
+ this.testElement = e.detail;
284
+ const items = Array.from(this.testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
285
+ return {
286
+ href: itemRef.href,
287
+ identifier: itemRef.identifier,
288
+ category: itemRef.category,
289
+ variables: [
290
+ {
291
+ identifier: "completionStatus",
292
+ value: "not_attempted",
293
+ type: "outcome"
294
+ }
295
+ ]
296
+ };
297
+ });
298
+ this.testContext = { ...this.testContext, items };
299
+ });
300
+ this.addEventListener("qti-assessment-item-connected", (e) => {
301
+ this._updateItemInTestContext(e.detail);
302
+ });
303
+ this.addEventListener("qti-item-context-updated", (e) => {
304
+ this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables);
305
+ });
306
+ }
307
+ // get testContext(): TestContext {
308
+ // return this._testContext;
309
+ // }
310
+ // // /* restores the context by updating existing items and adding new items from the "contextToRestore" parameter into the "this._context.items" array. */
311
+ // set testContext(testContext: TestContext) {
312
+ // if (this._testContext.items.length > 0) {
313
+ // console.warn(
314
+ // 'testContext already set and can not be overwritten. Set the testContext before loading the assessment test'
315
+ // );
316
+ // return;
317
+ // }
318
+ // if (testContext === null || testContext === undefined) return;
319
+ // this._testContext = { ...testContext }; // Clone the context to avoid modifying the original object
320
+ // // // append the items that are not yet in the context and replace the ones that are
321
+ // testContext.items?.forEach(itemContext => {
322
+ // const existingItemContext = this._testContext.items.find(i => i.identifier === itemContext.identifier);
323
+ // if (existingItemContext) {
324
+ // existingItemContext.variables = itemContext.variables;
325
+ // } else {
326
+ // this._testContext.items.push(itemContext);
327
+ // }
328
+ // });
329
+ // }
330
+ _updateItemVariablesInTestContext(identifier, variables) {
331
+ this.testContext = {
332
+ ...this.testContext,
333
+ // Spread existing test context properties
334
+ items: this.testContext.items.map((itemContext) => {
335
+ if (itemContext.identifier !== identifier) {
336
+ return itemContext;
337
+ }
338
+ return {
339
+ ...itemContext,
340
+ // Keep other properties of the item context
341
+ variables: variables.map((variable) => {
342
+ const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
343
+ return matchingVariable ? { ...matchingVariable, ...variable } : variable;
344
+ })
345
+ };
346
+ })
347
+ };
348
+ }
349
+ };
350
+ __decorateClass([
351
+ state(),
352
+ provide({ context: testContext })
353
+ ], TestBase.prototype, "testContext", 2);
354
+ __decorateClass([
355
+ state(),
356
+ provide({ context: sessionContext })
357
+ ], TestBase.prototype, "sessionContext", 2);
358
+
359
+ // src/lib/qti-test/core/mixins/test-processing.mixin.ts
360
+ var TestProcessingMixin = (superClass) => {
361
+ class TestProcessingElement extends superClass {
362
+ constructor(...args) {
363
+ super(...args);
364
+ this.addEventListener("qti-register-variable", (e) => {
365
+ this.testContext = {
366
+ ...this.testContext,
367
+ testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e.detail.variable]
368
+ };
369
+ e.stopPropagation();
370
+ });
371
+ this.addEventListener(
372
+ "qti-set-outcome-value",
373
+ (e) => {
374
+ const { outcomeIdentifier, value } = e.detail;
375
+ this.updateOutcomeVariable(outcomeIdentifier, value);
376
+ e.stopPropagation();
377
+ }
378
+ );
379
+ }
380
+ outcomeProcessing() {
381
+ const outcomeProcessor = this.querySelector("qti-outcome-processing");
382
+ if (!outcomeProcessor) return false;
383
+ outcomeProcessor?.process();
384
+ return true;
385
+ }
386
+ /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
387
+ updateOutcomeVariable(identifier, value) {
388
+ const outcomeVariable = this.getOutcome(identifier);
389
+ if (!outcomeVariable) {
390
+ console.warn(`Can not set qti-outcome-identifier: ${identifier}, it is not available`);
391
+ return;
392
+ }
393
+ this.testContext = {
394
+ ...this.testContext,
395
+ testOutcomeVariables: this.testContext.testOutcomeVariables?.map((v) => {
396
+ if (v.identifier !== identifier) {
397
+ return v;
398
+ }
399
+ return {
400
+ ...v,
401
+ value: outcomeVariable.cardinality === "single" ? value : [...v.value, value]
402
+ };
403
+ })
404
+ };
405
+ }
406
+ getOutcome(identifier) {
407
+ return this.getVariable(identifier);
408
+ }
409
+ getVariable(identifier) {
410
+ return this.testContext.testOutcomeVariables?.find((v) => v.identifier === identifier) || null;
411
+ }
412
+ /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
413
+ }
414
+ return TestProcessingElement;
415
+ };
416
+
417
+ // src/lib/qti-test/core/qti-test.ts
418
+ var QtiTest = class extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBase)))) {
419
+ // export class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
420
+ /**
421
+ * Renders the component's template.
422
+ * Provides a default `<slot>` for content projection.
423
+ */
424
+ async connectedCallback() {
425
+ super.connectedCallback();
426
+ await this.updateComplete;
427
+ this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
428
+ }
429
+ render() {
430
+ return html`<slot></slot>`;
431
+ }
432
+ };
433
+ QtiTest = __decorateClass([
434
+ customElement("qti-test")
435
+ ], QtiTest);
436
+
437
+ // src/lib/qti-test/core/qti-assessment-test/qti-assessment-item-ref.ts
438
+ import { consume } from "@lit/context";
439
+ import { html as html2, LitElement as LitElement2 } from "lit";
440
+ import { property as property3 } from "lit/decorators.js";
441
+ var stringToBooleanConverter = {
442
+ fromAttribute(value) {
443
+ return value === "true";
444
+ },
445
+ toAttribute(value) {
446
+ return value ? "true" : "false";
447
+ }
448
+ };
449
+ var QtiAssessmentItemRef = class extends LitElement2 {
450
+ constructor() {
451
+ super(...arguments);
452
+ this.weigths = /* @__PURE__ */ new Map();
453
+ }
454
+ // the XMLDocument
455
+ createRenderRoot() {
456
+ return this;
457
+ }
458
+ get assessmentItem() {
459
+ return this.renderRoot?.querySelector("qti-assessment-item");
460
+ }
461
+ async connectedCallback() {
462
+ super.connectedCallback();
463
+ await this.updateComplete;
464
+ this.dispatchEvent(
465
+ new CustomEvent("qti-assessment-item-ref-connected", {
466
+ bubbles: true,
467
+ composed: true,
468
+ detail: { identifier: this.identifier, href: this.href, category: this.category }
469
+ })
470
+ );
471
+ }
472
+ render() {
473
+ return html2`${this.xmlDoc}`;
474
+ }
475
+ };
476
+ __decorateClass([
477
+ property3({ type: String })
478
+ ], QtiAssessmentItemRef.prototype, "category", 2);
479
+ __decorateClass([
480
+ property3({ type: String })
481
+ ], QtiAssessmentItemRef.prototype, "identifier", 2);
482
+ __decorateClass([
483
+ property3({ type: Boolean, converter: stringToBooleanConverter })
484
+ ], QtiAssessmentItemRef.prototype, "required", 2);
485
+ __decorateClass([
486
+ property3({ type: Boolean, converter: stringToBooleanConverter })
487
+ ], QtiAssessmentItemRef.prototype, "fixed", 2);
488
+ __decorateClass([
489
+ property3({ type: String })
490
+ ], QtiAssessmentItemRef.prototype, "href", 2);
491
+ __decorateClass([
492
+ consume({ context: testContext, subscribe: true })
493
+ ], QtiAssessmentItemRef.prototype, "_testContext", 2);
494
+ __decorateClass([
495
+ property3({ type: Object, attribute: false })
496
+ ], QtiAssessmentItemRef.prototype, "xmlDoc", 2);
497
+ if (!customElements.get("qti-assessment-item-ref")) {
498
+ customElements.define("qti-assessment-item-ref", QtiAssessmentItemRef);
499
+ }
500
+
501
+ // src/lib/qti-test/core/qti-assessment-test/qti-assessment-section.ts
502
+ import { consume as consume2 } from "@lit/context";
503
+ import { html as html3, LitElement as LitElement3 } from "lit";
504
+ import { property as property4 } from "lit/decorators.js";
505
+ var stringToBooleanConverter2 = {
506
+ fromAttribute(value) {
507
+ return value === "true";
508
+ },
509
+ toAttribute(value) {
510
+ return value ? "true" : "false";
511
+ }
512
+ };
513
+ var QtiAssessmentSection = class extends LitElement3 {
514
+ async connectedCallback() {
515
+ super.connectedCallback();
516
+ await this.updateComplete;
517
+ this.dispatchEvent(
518
+ new Event("qti-assessment-section-connected", {
519
+ bubbles: true,
520
+ composed: true
521
+ })
522
+ );
523
+ }
524
+ render() {
525
+ return html3`<slot name="qti-rubric-block"></slot><slot></slot>`;
526
+ }
527
+ };
528
+ __decorateClass([
529
+ property4({ type: String })
530
+ ], QtiAssessmentSection.prototype, "identifier", 2);
531
+ __decorateClass([
532
+ property4({ type: String })
533
+ ], QtiAssessmentSection.prototype, "required", 2);
534
+ __decorateClass([
535
+ property4({ type: Boolean, converter: stringToBooleanConverter2 })
536
+ ], QtiAssessmentSection.prototype, "fixed", 2);
537
+ __decorateClass([
538
+ property4({ type: String })
539
+ ], QtiAssessmentSection.prototype, "title", 2);
540
+ __decorateClass([
541
+ property4({ type: Boolean, converter: stringToBooleanConverter2 })
542
+ ], QtiAssessmentSection.prototype, "visible", 2);
543
+ __decorateClass([
544
+ property4({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
545
+ ], QtiAssessmentSection.prototype, "keepTogether", 2);
546
+ __decorateClass([
547
+ consume2({ context: testContext, subscribe: true })
548
+ ], QtiAssessmentSection.prototype, "_testContext", 2);
549
+ if (!customElements.get("qti-assessment-section")) {
550
+ customElements.define("qti-assessment-section", QtiAssessmentSection);
551
+ }
552
+
553
+ // src/lib/qti-test/core/qti-assessment-test/qti-assessment-test.ts
554
+ import { consume as consume3 } from "@lit/context";
555
+ import { html as html4, LitElement as LitElement4 } from "lit";
556
+ import { customElement as customElement2, property as property5 } from "lit/decorators.js";
557
+ var QtiAssessmentTest = class extends LitElement4 {
558
+ async connectedCallback() {
559
+ super.connectedCallback();
560
+ await this.updateComplete;
561
+ this.dispatchEvent(
562
+ new CustomEvent("qti-assessment-test-connected", {
563
+ detail: this,
564
+ bubbles: true,
565
+ composed: true
566
+ })
567
+ );
568
+ }
569
+ render() {
570
+ return html4` <slot></slot>`;
571
+ }
572
+ };
573
+ __decorateClass([
574
+ property5({ type: String })
575
+ ], QtiAssessmentTest.prototype, "identifier", 2);
576
+ __decorateClass([
577
+ property5({ type: String })
578
+ ], QtiAssessmentTest.prototype, "title", 2);
579
+ __decorateClass([
580
+ consume3({ context: testContext, subscribe: true })
581
+ ], QtiAssessmentTest.prototype, "_testContext", 2);
582
+ QtiAssessmentTest = __decorateClass([
583
+ customElement2("qti-assessment-test")
584
+ ], QtiAssessmentTest);
585
+
586
+ // src/lib/qti-test/core/qti-assessment-test/qti-test-part.ts
587
+ import { html as html5, LitElement as LitElement5 } from "lit";
588
+ import { customElement as customElement3, property as property6 } from "lit/decorators.js";
589
+ var QtiTestPart = class extends LitElement5 {
590
+ constructor() {
591
+ super(...arguments);
592
+ this.identifier = "";
593
+ this.title = "";
594
+ this.class = "";
595
+ this.NavigationMode = "nonlinear";
596
+ this.submissionMode = "individual";
597
+ }
598
+ async connectedCallback() {
599
+ super.connectedCallback();
600
+ await this.updateComplete;
601
+ this.dispatchEvent(
602
+ new Event("qti-test-part-connected", {
603
+ bubbles: true,
604
+ composed: true
605
+ })
606
+ );
607
+ }
608
+ render() {
609
+ return html5` <slot></slot>`;
610
+ }
611
+ };
612
+ __decorateClass([
613
+ property6({ type: String })
614
+ ], QtiTestPart.prototype, "identifier", 2);
615
+ __decorateClass([
616
+ property6({ type: String })
617
+ ], QtiTestPart.prototype, "title", 2);
618
+ __decorateClass([
619
+ property6({ type: String })
620
+ ], QtiTestPart.prototype, "class", 2);
621
+ __decorateClass([
622
+ property6({ type: String, attribute: "navigation-mode" })
623
+ ], QtiTestPart.prototype, "NavigationMode", 2);
624
+ __decorateClass([
625
+ property6({ type: String, attribute: "submission-mode" })
626
+ ], QtiTestPart.prototype, "submissionMode", 2);
627
+ QtiTestPart = __decorateClass([
628
+ customElement3("qti-test-part")
629
+ ], QtiTestPart);
630
+ if (!customElements.get("qti-test-part")) {
631
+ customElements.define("qti-test-part", QtiTestPart);
632
+ }
633
+
634
+ // src/lib/qti-test/core/qti-assessment-test/qti-test-feedback.ts
635
+ import { customElement as customElement4 } from "lit/decorators.js";
636
+ import { css, html as html6 } from "lit";
637
+ var QtiTestFeedback = class extends QtiModalFeedback {
638
+ render() {
639
+ return html6``;
640
+ }
641
+ };
642
+ QtiTestFeedback.styles = css`
643
+ :host {
644
+ color: gray;
645
+ }
646
+ `;
647
+ QtiTestFeedback = __decorateClass([
648
+ customElement4("qti-test-feedback")
649
+ ], QtiTestFeedback);
650
+
651
+ export {
652
+ QtiTest,
653
+ QtiAssessmentItemRef,
654
+ QtiAssessmentSection,
655
+ QtiAssessmentTest,
656
+ QtiTestPart,
657
+ QtiTestFeedback
658
+ };
659
+ //# sourceMappingURL=chunk-U7VUCT7D.js.map