@citolab/qti-components 8.0.1 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +648 -816
- package/dist/base.d.ts +61 -4
- package/dist/base.js +7 -1
- package/dist/{chunk-V5G7X53Y.js → chunk-3IACYIU2.js} +2 -2
- package/dist/chunk-4DB4SC5K.js +100 -0
- package/dist/chunk-4DB4SC5K.js.map +1 -0
- package/dist/{chunk-F4BNJWYN.js → chunk-4XR2JHCP.js} +646 -677
- package/dist/chunk-4XR2JHCP.js.map +1 -0
- package/dist/{chunk-7V4HJFHW.js → chunk-6ITD55QE.js} +2 -2
- package/dist/{chunk-3AJOQCDU.js → chunk-6V3A7NQP.js} +2 -2
- package/dist/{chunk-WVVMNF74.js → chunk-6XJUP55A.js} +248 -234
- package/dist/chunk-6XJUP55A.js.map +1 -0
- package/dist/{chunk-XU7HNT4F.js → chunk-CF3DXJWM.js} +145 -119
- package/dist/{chunk-XU7HNT4F.js.map → chunk-CF3DXJWM.js.map} +1 -1
- package/dist/chunk-EKXZI26R.js +917 -0
- package/dist/chunk-EKXZI26R.js.map +1 -0
- package/dist/{chunk-IJD53WY6.js → chunk-HDEG6BAZ.js} +15 -15
- package/dist/{chunk-IJD53WY6.js.map → chunk-HDEG6BAZ.js.map} +1 -1
- package/dist/{chunk-LVBIQDPM.js → chunk-IXPDMYKH.js} +147 -101
- package/dist/chunk-IXPDMYKH.js.map +1 -0
- package/dist/chunk-IYC7LZV6.js +7 -0
- package/dist/chunk-IYC7LZV6.js.map +1 -0
- package/dist/{chunk-NA2N2WSG.js → chunk-MK2I3MQB.js} +244 -193
- package/dist/chunk-MK2I3MQB.js.map +1 -0
- package/dist/{chunk-CAO4JRLY.js → chunk-NZLW6EX7.js} +2 -2
- package/dist/{chunk-RXGDQDOV.js → chunk-Q52IJELT.js} +479 -393
- package/dist/chunk-Q52IJELT.js.map +1 -0
- package/dist/{chunk-QECOPVPO.js → chunk-TXIB3SKC.js} +60 -59
- package/dist/chunk-TXIB3SKC.js.map +1 -0
- 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 +9 -10
- package/dist/elements.d.ts +86 -87
- package/dist/elements.js +5 -6
- package/dist/index.d.ts +8 -39
- package/dist/index.js +29 -16
- 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.css +370 -532
- package/dist/item.d.ts +3 -3
- package/dist/item.js +6 -6
- package/dist/loader.js +2 -2
- package/dist/processing.d.ts +61 -11
- package/dist/processing.js +10 -2
- package/dist/qti-components-jsx.d.ts +293 -69
- 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 +7 -8
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +1 -1
- package/package.json +11 -10
- package/dist/chunk-64XSIBGO.js +0 -241
- package/dist/chunk-64XSIBGO.js.map +0 -1
- package/dist/chunk-7HC5SMCU.js +0 -102
- 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-NA2N2WSG.js.map +0 -1
- package/dist/chunk-QECOPVPO.js.map +0 -1
- package/dist/chunk-RXGDQDOV.js.map +0 -1
- package/dist/chunk-WVVMNF74.js.map +0 -1
- package/dist/chunk-X3E5HXG2.js +0 -20
- package/dist/chunk-X3E5HXG2.js.map +0 -1
- /package/dist/{chunk-V5G7X53Y.js.map → chunk-3IACYIU2.js.map} +0 -0
- /package/dist/{chunk-7V4HJFHW.js.map → chunk-6ITD55QE.js.map} +0 -0
- /package/dist/{chunk-3AJOQCDU.js.map → chunk-6V3A7NQP.js.map} +0 -0
- /package/dist/{chunk-CAO4JRLY.js.map → chunk-NZLW6EX7.js.map} +0 -0
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
o
|
|
3
|
-
} from "./chunk-X3E5HXG2.js";
|
|
4
1
|
import {
|
|
5
2
|
watch
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4DB4SC5K.js";
|
|
7
4
|
import {
|
|
8
5
|
qtiTransformItem
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HDEG6BAZ.js";
|
|
10
7
|
import {
|
|
11
8
|
QtiFeedback,
|
|
12
9
|
QtiVariableDeclaration,
|
|
13
|
-
T,
|
|
14
|
-
c,
|
|
15
|
-
e,
|
|
16
|
-
i,
|
|
17
|
-
i2,
|
|
18
10
|
itemContext,
|
|
19
|
-
itemContextVariables
|
|
20
|
-
|
|
21
|
-
r
|
|
22
|
-
} from "./chunk-H3J7LFRO.js";
|
|
11
|
+
itemContextVariables
|
|
12
|
+
} from "./chunk-EKXZI26R.js";
|
|
23
13
|
|
|
24
14
|
// ../qti-elements/dist/components/qti-assessment-item/qti-assessment-item.js
|
|
15
|
+
import { provide } from "@lit/context";
|
|
16
|
+
import { LitElement, html } from "lit";
|
|
17
|
+
import { property } from "lit/decorators.js";
|
|
25
18
|
var __decorate = function(decorators, target, key, desc) {
|
|
26
|
-
var
|
|
27
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
28
|
-
else for (var
|
|
29
|
-
return
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30
23
|
};
|
|
31
|
-
var QtiAssessmentItem = class extends
|
|
24
|
+
var QtiAssessmentItem = class extends LitElement {
|
|
32
25
|
constructor() {
|
|
33
26
|
super(...arguments);
|
|
34
27
|
this.#templateProcessing = null;
|
|
@@ -45,60 +38,60 @@ var QtiAssessmentItem = class extends i2 {
|
|
|
45
38
|
this.#initialContext = { ...this._context, variables: this._context.variables };
|
|
46
39
|
this.#feedbackElements = [];
|
|
47
40
|
this.interactionElements = [];
|
|
48
|
-
this.#handleRegisterVariable = (
|
|
49
|
-
|
|
50
|
-
this._context = { ...this._context, variables: [...this._context.variables,
|
|
41
|
+
this.#handleRegisterVariable = (e) => {
|
|
42
|
+
e.stopImmediatePropagation();
|
|
43
|
+
this._context = { ...this._context, variables: [...this._context.variables, e.detail.variable] };
|
|
51
44
|
this.#initialContext = this._context;
|
|
52
|
-
|
|
45
|
+
e.stopPropagation();
|
|
53
46
|
};
|
|
54
|
-
this.#handleRegisterFeedback = (
|
|
55
|
-
|
|
56
|
-
const feedbackElement =
|
|
47
|
+
this.#handleRegisterFeedback = (e) => {
|
|
48
|
+
e.stopImmediatePropagation();
|
|
49
|
+
const feedbackElement = e.detail;
|
|
57
50
|
this.#feedbackElements.push(feedbackElement);
|
|
58
51
|
const numAttempts = Number(this._context.variables.find((v) => v.identifier === "numAttempts")?.value) || 0;
|
|
59
52
|
if (numAttempts > 0) {
|
|
60
53
|
feedbackElement.checkShowFeedback(feedbackElement.outcomeIdentifier);
|
|
61
54
|
}
|
|
62
55
|
};
|
|
63
|
-
this.#handleRegisterInteraction = (
|
|
64
|
-
|
|
65
|
-
this.interactionElements.push(
|
|
56
|
+
this.#handleRegisterInteraction = (e) => {
|
|
57
|
+
e.stopImmediatePropagation();
|
|
58
|
+
this.interactionElements.push(e.detail.interactionElement);
|
|
66
59
|
};
|
|
67
|
-
this.#handleEndAttempt = (
|
|
68
|
-
|
|
69
|
-
const { responseIdentifier, countAttempt } =
|
|
60
|
+
this.#handleEndAttempt = (e) => {
|
|
61
|
+
e.stopImmediatePropagation();
|
|
62
|
+
const { responseIdentifier, countAttempt } = e.detail;
|
|
70
63
|
this.validate();
|
|
71
64
|
this.updateResponseVariable(responseIdentifier, "true");
|
|
72
65
|
this.processResponse(countAttempt);
|
|
73
66
|
};
|
|
74
|
-
this.#handleSetOutcomeValue = (
|
|
75
|
-
|
|
76
|
-
const { outcomeIdentifier, value } =
|
|
67
|
+
this.#handleSetOutcomeValue = (e) => {
|
|
68
|
+
e.stopImmediatePropagation();
|
|
69
|
+
const { outcomeIdentifier, value } = e.detail;
|
|
77
70
|
this.updateOutcomeVariable(outcomeIdentifier, value);
|
|
78
|
-
|
|
71
|
+
e.stopPropagation();
|
|
79
72
|
};
|
|
80
|
-
this.#handleSetTemplateValue = (
|
|
81
|
-
|
|
82
|
-
const { templateIdentifier, value } =
|
|
73
|
+
this.#handleSetTemplateValue = (e) => {
|
|
74
|
+
e.stopImmediatePropagation();
|
|
75
|
+
const { templateIdentifier, value } = e.detail;
|
|
83
76
|
this.updateTemplateVariable(templateIdentifier, value ?? void 0);
|
|
84
|
-
|
|
77
|
+
e.stopPropagation();
|
|
85
78
|
};
|
|
86
|
-
this.#handleSetCorrectResponse = (
|
|
87
|
-
|
|
88
|
-
const { responseIdentifier, value } =
|
|
79
|
+
this.#handleSetCorrectResponse = (e) => {
|
|
80
|
+
e.stopImmediatePropagation();
|
|
81
|
+
const { responseIdentifier, value } = e.detail;
|
|
89
82
|
this.updateCorrectResponse(responseIdentifier, value ?? void 0);
|
|
90
|
-
|
|
83
|
+
e.stopPropagation();
|
|
91
84
|
};
|
|
92
|
-
this.#handleUpdateResponseVariable = (
|
|
93
|
-
|
|
94
|
-
const { responseIdentifier, response, state } =
|
|
85
|
+
this.#handleUpdateResponseVariable = (e) => {
|
|
86
|
+
e.stopImmediatePropagation();
|
|
87
|
+
const { responseIdentifier, response, state: state5 } = e.detail;
|
|
95
88
|
this.updateResponseVariable(responseIdentifier, response);
|
|
96
|
-
if (
|
|
89
|
+
if (state5 !== void 0) {
|
|
97
90
|
this._context = {
|
|
98
91
|
...this._context,
|
|
99
92
|
state: {
|
|
100
93
|
...this._context.state || {},
|
|
101
|
-
[responseIdentifier]:
|
|
94
|
+
[responseIdentifier]: state5
|
|
102
95
|
}
|
|
103
96
|
};
|
|
104
97
|
}
|
|
@@ -191,7 +184,7 @@ var QtiAssessmentItem = class extends i2 {
|
|
|
191
184
|
if (responseVariable) {
|
|
192
185
|
this.updateResponseVariable(response.responseIdentifier, response.response);
|
|
193
186
|
}
|
|
194
|
-
const interaction = this.interactionElements.find((
|
|
187
|
+
const interaction = this.interactionElements.find((i) => i.getAttribute("response-identifier") === response.responseIdentifier);
|
|
195
188
|
if (interaction) {
|
|
196
189
|
interaction.response = response.response;
|
|
197
190
|
}
|
|
@@ -199,7 +192,7 @@ var QtiAssessmentItem = class extends i2 {
|
|
|
199
192
|
}
|
|
200
193
|
}
|
|
201
194
|
render() {
|
|
202
|
-
return
|
|
195
|
+
return html`<slot></slot>`;
|
|
203
196
|
}
|
|
204
197
|
connectedCallback() {
|
|
205
198
|
this.#attachEventListeners();
|
|
@@ -462,39 +455,41 @@ var QtiAssessmentItem = class extends i2 {
|
|
|
462
455
|
}
|
|
463
456
|
};
|
|
464
457
|
__decorate([
|
|
465
|
-
|
|
458
|
+
property({ type: String })
|
|
466
459
|
], QtiAssessmentItem.prototype, "identifier", void 0);
|
|
467
460
|
__decorate([
|
|
468
|
-
|
|
461
|
+
property({ type: String })
|
|
469
462
|
], QtiAssessmentItem.prototype, "adaptive", void 0);
|
|
470
463
|
__decorate([
|
|
471
|
-
|
|
464
|
+
property({ type: String })
|
|
472
465
|
], QtiAssessmentItem.prototype, "timeDependent", void 0);
|
|
473
466
|
__decorate([
|
|
474
|
-
|
|
467
|
+
property({ type: String })
|
|
475
468
|
], QtiAssessmentItem.prototype, "title", null);
|
|
476
469
|
__decorate([
|
|
477
|
-
|
|
470
|
+
property({ type: Boolean })
|
|
478
471
|
], QtiAssessmentItem.prototype, "disabled", void 0);
|
|
479
472
|
__decorate([
|
|
480
473
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
481
474
|
], QtiAssessmentItem.prototype, "_handleDisabledChange", void 0);
|
|
482
475
|
__decorate([
|
|
483
|
-
|
|
476
|
+
property({ type: Boolean })
|
|
484
477
|
], QtiAssessmentItem.prototype, "readonly", void 0);
|
|
485
478
|
__decorate([
|
|
486
479
|
watch("readonly", { waitUntilFirstUpdate: true })
|
|
487
480
|
], QtiAssessmentItem.prototype, "_handleReadonlyChange", void 0);
|
|
488
481
|
__decorate([
|
|
489
|
-
|
|
482
|
+
provide({ context: itemContext })
|
|
490
483
|
], QtiAssessmentItem.prototype, "_context", void 0);
|
|
491
484
|
|
|
492
485
|
// ../qti-elements/dist/components/qti-assessment-stimulus-ref/qti-assessment-stimulus-ref.js
|
|
486
|
+
import { LitElement as LitElement2 } from "lit";
|
|
487
|
+
import { property as property2 } from "lit/decorators.js";
|
|
493
488
|
var __decorate2 = function(decorators, target, key, desc) {
|
|
494
|
-
var
|
|
495
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
496
|
-
else for (var
|
|
497
|
-
return
|
|
489
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
490
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
491
|
+
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;
|
|
492
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
498
493
|
};
|
|
499
494
|
var QtiAssessmentStimulusRefConnectedEvent = class _QtiAssessmentStimulusRefConnectedEvent extends Event {
|
|
500
495
|
static {
|
|
@@ -506,7 +501,7 @@ var QtiAssessmentStimulusRefConnectedEvent = class _QtiAssessmentStimulusRefConn
|
|
|
506
501
|
this.item = item;
|
|
507
502
|
}
|
|
508
503
|
};
|
|
509
|
-
var QtiAssessmentStimulusRef = class extends
|
|
504
|
+
var QtiAssessmentStimulusRef = class extends LitElement2 {
|
|
510
505
|
constructor() {
|
|
511
506
|
super(...arguments);
|
|
512
507
|
this.identifier = "";
|
|
@@ -542,26 +537,30 @@ var QtiAssessmentStimulusRef = class extends i2 {
|
|
|
542
537
|
}
|
|
543
538
|
};
|
|
544
539
|
__decorate2([
|
|
545
|
-
|
|
540
|
+
property2({ type: String })
|
|
546
541
|
], QtiAssessmentStimulusRef.prototype, "identifier", void 0);
|
|
547
542
|
__decorate2([
|
|
548
|
-
|
|
543
|
+
property2({ type: String })
|
|
549
544
|
], QtiAssessmentStimulusRef.prototype, "href", void 0);
|
|
550
545
|
|
|
551
546
|
// ../qti-elements/dist/components/qti-companion-materials-info/qti-companion-materials-info.js
|
|
552
|
-
|
|
547
|
+
import { LitElement as LitElement3 } from "lit";
|
|
548
|
+
var QtiCompanionMaterialsInfo = class extends LitElement3 {
|
|
553
549
|
};
|
|
554
550
|
|
|
555
551
|
// ../qti-elements/dist/components/qti-content-body/qti-content-body.js
|
|
552
|
+
import { consume } from "@lit/context";
|
|
553
|
+
import { LitElement as LitElement4, html as html2 } from "lit";
|
|
554
|
+
import { state } from "lit/decorators.js";
|
|
556
555
|
var __decorate3 = function(decorators, target, key, desc) {
|
|
557
|
-
var
|
|
558
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
559
|
-
else for (var
|
|
560
|
-
return
|
|
556
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
557
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
558
|
+
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;
|
|
559
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
561
560
|
};
|
|
562
|
-
var QtiContentBody = class extends
|
|
561
|
+
var QtiContentBody = class extends LitElement4 {
|
|
563
562
|
render() {
|
|
564
|
-
return
|
|
563
|
+
return html2`<slot @slotchange=${this.#expandMathVariables}></slot>`;
|
|
565
564
|
}
|
|
566
565
|
connectedCallback() {
|
|
567
566
|
super.connectedCallback();
|
|
@@ -611,18 +610,20 @@ var QtiContentBody = class extends i2 {
|
|
|
611
610
|
}
|
|
612
611
|
};
|
|
613
612
|
__decorate3([
|
|
614
|
-
|
|
615
|
-
|
|
613
|
+
consume({ context: itemContext, subscribe: true }),
|
|
614
|
+
state()
|
|
616
615
|
], QtiContentBody.prototype, "context", void 0);
|
|
617
616
|
|
|
618
617
|
// ../qti-elements/dist/components/qti-context-declaration/qti-context-declaration.js
|
|
618
|
+
import { css, LitElement as LitElement5, html as html3 } from "lit";
|
|
619
|
+
import { property as property3 } from "lit/decorators.js";
|
|
619
620
|
var __decorate4 = function(decorators, target, key, desc) {
|
|
620
|
-
var
|
|
621
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
622
|
-
else for (var
|
|
623
|
-
return
|
|
621
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
622
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
623
|
+
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;
|
|
624
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
624
625
|
};
|
|
625
|
-
var QtiContextDeclaration = class extends
|
|
626
|
+
var QtiContextDeclaration = class extends LitElement5 {
|
|
626
627
|
constructor() {
|
|
627
628
|
super(...arguments);
|
|
628
629
|
this.identifier = "";
|
|
@@ -630,7 +631,7 @@ var QtiContextDeclaration = class extends i2 {
|
|
|
630
631
|
}
|
|
631
632
|
static {
|
|
632
633
|
this.styles = [
|
|
633
|
-
|
|
634
|
+
css`
|
|
634
635
|
:host {
|
|
635
636
|
display: none;
|
|
636
637
|
}
|
|
@@ -638,35 +639,38 @@ var QtiContextDeclaration = class extends i2 {
|
|
|
638
639
|
];
|
|
639
640
|
}
|
|
640
641
|
render() {
|
|
641
|
-
return
|
|
642
|
+
return html3`<slot></slot>`;
|
|
642
643
|
}
|
|
643
644
|
};
|
|
644
645
|
__decorate4([
|
|
645
|
-
|
|
646
|
+
property3({ type: String })
|
|
646
647
|
], QtiContextDeclaration.prototype, "identifier", void 0);
|
|
647
648
|
__decorate4([
|
|
648
|
-
|
|
649
|
+
property3({ type: String })
|
|
649
650
|
], QtiContextDeclaration.prototype, "cardinality", void 0);
|
|
650
651
|
|
|
651
652
|
// ../qti-elements/dist/components/qti-custom-operator/qti-custom-operator.js
|
|
653
|
+
import { consume as consume2 } from "@lit/context";
|
|
654
|
+
import { LitElement as LitElement6, html as html4 } from "lit";
|
|
655
|
+
import { state as state2 } from "lit/decorators.js";
|
|
652
656
|
var __decorate5 = function(decorators, target, key, desc) {
|
|
653
|
-
var
|
|
654
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
655
|
-
else for (var
|
|
656
|
-
return
|
|
657
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
658
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
659
|
+
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;
|
|
660
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
657
661
|
};
|
|
658
|
-
var QtiCustomOperator = class extends
|
|
662
|
+
var QtiCustomOperator = class extends LitElement6 {
|
|
659
663
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
660
664
|
#operatorFunction;
|
|
661
665
|
render() {
|
|
662
|
-
return
|
|
666
|
+
return html4`<slot @slotchange=${this.handleSlotChange}></slot>`;
|
|
663
667
|
}
|
|
664
668
|
handleSlotChange() {
|
|
665
669
|
const commentNode = Array.from(this.firstElementChild?.childNodes ?? []).find((node) => node.nodeType === Node.COMMENT_NODE);
|
|
666
670
|
try {
|
|
667
671
|
this.#operatorFunction = new Function("context", "fn", "item", commentNode?.textContent ?? "");
|
|
668
|
-
} catch (
|
|
669
|
-
console.error("custom-operator contains invalid javascript code",
|
|
672
|
+
} catch (e) {
|
|
673
|
+
console.error("custom-operator contains invalid javascript code", e);
|
|
670
674
|
}
|
|
671
675
|
}
|
|
672
676
|
calculate() {
|
|
@@ -701,14 +705,15 @@ var QtiCustomOperator = class extends i2 {
|
|
|
701
705
|
}
|
|
702
706
|
};
|
|
703
707
|
__decorate5([
|
|
704
|
-
|
|
705
|
-
|
|
708
|
+
consume2({ context: itemContext, subscribe: true }),
|
|
709
|
+
state2()
|
|
706
710
|
], QtiCustomOperator.prototype, "_context", void 0);
|
|
707
711
|
|
|
708
712
|
// ../qti-elements/dist/components/qti-feedback-block/qti-feedback-block.js
|
|
713
|
+
import { css as css2, html as html5 } from "lit";
|
|
709
714
|
var QtiFeedbackBlock = class extends QtiFeedback {
|
|
710
715
|
static {
|
|
711
|
-
this.styles =
|
|
716
|
+
this.styles = css2`
|
|
712
717
|
:host {
|
|
713
718
|
display: block;
|
|
714
719
|
}
|
|
@@ -721,7 +726,7 @@ var QtiFeedbackBlock = class extends QtiFeedback {
|
|
|
721
726
|
`;
|
|
722
727
|
}
|
|
723
728
|
render() {
|
|
724
|
-
return
|
|
729
|
+
return html5` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `;
|
|
725
730
|
}
|
|
726
731
|
connectedCallback() {
|
|
727
732
|
super.connectedCallback();
|
|
@@ -730,13 +735,15 @@ var QtiFeedbackBlock = class extends QtiFeedback {
|
|
|
730
735
|
};
|
|
731
736
|
|
|
732
737
|
// ../qti-elements/dist/components/qti-feedback-inline/qti-feedback-inline.js
|
|
738
|
+
import { css as css3, html as html6 } from "lit";
|
|
739
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
733
740
|
var QtiFeedbackInline = class extends QtiFeedback {
|
|
734
741
|
constructor() {
|
|
735
742
|
super(...arguments);
|
|
736
|
-
this.render = () =>
|
|
743
|
+
this.render = () => html6` <slot part="feedback" class="${ifDefined(this.showStatus)}"></slot> `;
|
|
737
744
|
}
|
|
738
745
|
static {
|
|
739
|
-
this.styles =
|
|
746
|
+
this.styles = css3`
|
|
740
747
|
.on {
|
|
741
748
|
display: inline-block;
|
|
742
749
|
}
|
|
@@ -751,27 +758,32 @@ var QtiFeedbackInline = class extends QtiFeedback {
|
|
|
751
758
|
}
|
|
752
759
|
};
|
|
753
760
|
|
|
761
|
+
// ../qti-elements/dist/components/qti-item-body/qti-item-body.js
|
|
762
|
+
import { html as html7, LitElement as LitElement7 } from "lit";
|
|
763
|
+
|
|
754
764
|
// ../qti-elements/dist/components/qti-item-body/qti-item-body.styles.js
|
|
755
|
-
|
|
765
|
+
import { css as css4 } from "lit";
|
|
766
|
+
var qti_item_body_styles_default = css4`
|
|
756
767
|
:host {
|
|
757
768
|
display: block;
|
|
758
769
|
}
|
|
759
770
|
`;
|
|
760
771
|
|
|
761
772
|
// ../qti-elements/dist/components/qti-item-body/qti-item-body.js
|
|
762
|
-
var QtiItemBody = class extends
|
|
773
|
+
var QtiItemBody = class extends LitElement7 {
|
|
763
774
|
static {
|
|
764
775
|
this.styles = qti_item_body_styles_default;
|
|
765
776
|
}
|
|
766
777
|
render() {
|
|
767
|
-
return
|
|
778
|
+
return html7`<slot part="qti-rubric-blocks" name="qti-rubric-block"></slot><slot></slot>`;
|
|
768
779
|
}
|
|
769
780
|
};
|
|
770
781
|
|
|
771
782
|
// ../qti-elements/dist/components/qti-modal-feedback/qti-modal-feedback.js
|
|
783
|
+
import { css as css5, html as html8 } from "lit";
|
|
772
784
|
var QtiModalFeedback = class extends QtiFeedback {
|
|
773
785
|
static {
|
|
774
|
-
this.styles =
|
|
786
|
+
this.styles = css5`
|
|
775
787
|
.cito-dialog {
|
|
776
788
|
background: var(--qti-bg);
|
|
777
789
|
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
@@ -812,7 +824,7 @@ var QtiModalFeedback = class extends QtiFeedback {
|
|
|
812
824
|
`;
|
|
813
825
|
}
|
|
814
826
|
render() {
|
|
815
|
-
return
|
|
827
|
+
return html8`
|
|
816
828
|
<dialog class="cito-dialog" part="feedback" ?open="${this.showStatus === "on"}">
|
|
817
829
|
<slot></slot>
|
|
818
830
|
<div style="margin-top: var(--qti-gap); text-align: center;">
|
|
@@ -852,11 +864,14 @@ var QtiModalFeedback = class extends QtiFeedback {
|
|
|
852
864
|
};
|
|
853
865
|
|
|
854
866
|
// ../qti-elements/dist/components/qti-outcome-declaration/qti-outcome-declaration.js
|
|
867
|
+
import { consume as consume3 } from "@lit/context";
|
|
868
|
+
import { css as css6, html as html9 } from "lit";
|
|
869
|
+
import { property as property4, state as state3 } from "lit/decorators.js";
|
|
855
870
|
var __decorate6 = function(decorators, target, key, desc) {
|
|
856
|
-
var
|
|
857
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
858
|
-
else for (var
|
|
859
|
-
return
|
|
871
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
872
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
873
|
+
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;
|
|
874
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
860
875
|
};
|
|
861
876
|
var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
|
|
862
877
|
constructor() {
|
|
@@ -865,7 +880,7 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
|
|
|
865
880
|
}
|
|
866
881
|
static {
|
|
867
882
|
this.styles = [
|
|
868
|
-
|
|
883
|
+
css6`
|
|
869
884
|
:host {
|
|
870
885
|
display: none;
|
|
871
886
|
}
|
|
@@ -874,7 +889,7 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
|
|
|
874
889
|
}
|
|
875
890
|
render() {
|
|
876
891
|
const value = this.itemContext?.variables.find((v) => v.identifier === this.identifier)?.value;
|
|
877
|
-
return
|
|
892
|
+
return html9`${JSON.stringify(value, null, 2)}`;
|
|
878
893
|
}
|
|
879
894
|
get interpolationTable() {
|
|
880
895
|
const table = this.querySelector("qti-interpolation-table");
|
|
@@ -920,33 +935,36 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
|
|
|
920
935
|
}
|
|
921
936
|
};
|
|
922
937
|
__decorate6([
|
|
923
|
-
|
|
938
|
+
property4({ type: String, attribute: "base-type" })
|
|
924
939
|
], QtiOutcomeDeclaration.prototype, "baseType", void 0);
|
|
925
940
|
__decorate6([
|
|
926
|
-
|
|
941
|
+
property4({ type: String, attribute: "external-scored" })
|
|
927
942
|
], QtiOutcomeDeclaration.prototype, "externalScored", void 0);
|
|
928
943
|
__decorate6([
|
|
929
|
-
|
|
944
|
+
property4({ type: String })
|
|
930
945
|
], QtiOutcomeDeclaration.prototype, "identifier", void 0);
|
|
931
946
|
__decorate6([
|
|
932
|
-
|
|
947
|
+
property4({ type: String })
|
|
933
948
|
], QtiOutcomeDeclaration.prototype, "cardinality", void 0);
|
|
934
949
|
__decorate6([
|
|
935
|
-
|
|
936
|
-
|
|
950
|
+
consume3({ context: itemContext, subscribe: true }),
|
|
951
|
+
state3()
|
|
937
952
|
], QtiOutcomeDeclaration.prototype, "itemContext", void 0);
|
|
938
953
|
|
|
939
954
|
// ../qti-elements/dist/components/qti-response-declaration/qti-response-declaration.js
|
|
955
|
+
import { consume as consume4 } from "@lit/context";
|
|
956
|
+
import { css as css7, html as html10 } from "lit";
|
|
957
|
+
import { property as property5, state as state4 } from "lit/decorators.js";
|
|
940
958
|
var __decorate7 = function(decorators, target, key, desc) {
|
|
941
|
-
var
|
|
942
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
943
|
-
else for (var
|
|
944
|
-
return
|
|
959
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
960
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
961
|
+
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;
|
|
962
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
945
963
|
};
|
|
946
964
|
var QtiResponseDeclaration = class extends QtiVariableDeclaration {
|
|
947
965
|
static {
|
|
948
966
|
this.styles = [
|
|
949
|
-
|
|
967
|
+
css7`
|
|
950
968
|
:host {
|
|
951
969
|
display: none;
|
|
952
970
|
}
|
|
@@ -955,7 +973,7 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
|
|
|
955
973
|
}
|
|
956
974
|
render() {
|
|
957
975
|
const value = this.itemContext?.variables.find((v) => v.identifier === this.identifier)?.value;
|
|
958
|
-
return
|
|
976
|
+
return html10`${JSON.stringify(value, null, 2)}`;
|
|
959
977
|
}
|
|
960
978
|
connectedCallback() {
|
|
961
979
|
super.connectedCallback();
|
|
@@ -989,9 +1007,9 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
|
|
|
989
1007
|
values[0].remove();
|
|
990
1008
|
} else if (this.cardinality !== "single") {
|
|
991
1009
|
result = [];
|
|
992
|
-
for (let
|
|
993
|
-
result.push(values[
|
|
994
|
-
values[
|
|
1010
|
+
for (let i = 0; i < values.length; i++) {
|
|
1011
|
+
result.push(values[i].textContent.trim());
|
|
1012
|
+
values[i].remove();
|
|
995
1013
|
}
|
|
996
1014
|
}
|
|
997
1015
|
}
|
|
@@ -1033,78 +1051,80 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
|
|
|
1033
1051
|
}
|
|
1034
1052
|
};
|
|
1035
1053
|
__decorate7([
|
|
1036
|
-
|
|
1054
|
+
property5({ type: String, attribute: "base-type" })
|
|
1037
1055
|
], QtiResponseDeclaration.prototype, "baseType", void 0);
|
|
1038
1056
|
__decorate7([
|
|
1039
|
-
|
|
1057
|
+
property5({ type: String })
|
|
1040
1058
|
], QtiResponseDeclaration.prototype, "identifier", void 0);
|
|
1041
1059
|
__decorate7([
|
|
1042
|
-
|
|
1060
|
+
property5({ type: String })
|
|
1043
1061
|
], QtiResponseDeclaration.prototype, "cardinality", void 0);
|
|
1044
1062
|
__decorate7([
|
|
1045
|
-
|
|
1046
|
-
|
|
1063
|
+
consume4({ context: itemContext, subscribe: true }),
|
|
1064
|
+
state4()
|
|
1047
1065
|
], QtiResponseDeclaration.prototype, "itemContext", void 0);
|
|
1048
1066
|
|
|
1067
|
+
// ../qti-elements/dist/components/qti-response-processing/qti-response-processing.js
|
|
1068
|
+
import { css as css8, html as html11, LitElement as LitElement8 } from "lit";
|
|
1069
|
+
|
|
1049
1070
|
// ../qti-elements/dist/internal/template-strings.js
|
|
1050
|
-
var matchCorrect = `<qti-response-
|
|
1051
|
-
<qti-response-
|
|
1052
|
-
<qti-
|
|
1053
|
-
<qti-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
<qti-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
<qti-
|
|
1062
|
-
<qti-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
1097
|
-
<qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
|
|
1098
|
-
</qti-set-outcome-value>
|
|
1099
|
-
</qti-response-else>
|
|
1100
|
-
</qti-response-condition>
|
|
1101
|
-
</qti-response-processing>`;
|
|
1071
|
+
var matchCorrect = `<qti-response-condition>
|
|
1072
|
+
<qti-response-if>
|
|
1073
|
+
<qti-match>
|
|
1074
|
+
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
1075
|
+
<qti-correct identifier="RESPONSE"></qti-correct>
|
|
1076
|
+
</qti-match>
|
|
1077
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1078
|
+
<qti-base-value base-type="float">1</qti-base-value>
|
|
1079
|
+
</qti-set-outcome-value>
|
|
1080
|
+
</qti-response-if>
|
|
1081
|
+
<qti-response-else>
|
|
1082
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1083
|
+
<qti-base-value base-type="float">0</qti-base-value>
|
|
1084
|
+
</qti-set-outcome-value>
|
|
1085
|
+
</qti-response-else>
|
|
1086
|
+
</qti-response-condition>`;
|
|
1087
|
+
var mapResponse = `<qti-response-condition>
|
|
1088
|
+
<qti-response-if>
|
|
1089
|
+
<qti-is-null>
|
|
1090
|
+
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
1091
|
+
</qti-is-null>
|
|
1092
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1093
|
+
<qti-base-value base-type="float">0.0</qti-base-value>
|
|
1094
|
+
</qti-set-outcome-value>
|
|
1095
|
+
</qti-response-if>
|
|
1096
|
+
<qti-response-else>
|
|
1097
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1098
|
+
<qti-map-response identifier="RESPONSE"> </qti-map-response>
|
|
1099
|
+
</qti-set-outcome-value>
|
|
1100
|
+
</qti-response-else>
|
|
1101
|
+
</qti-response-condition>`;
|
|
1102
|
+
var mapResponsePoint = `<qti-response-condition>
|
|
1103
|
+
<qti-response-if>
|
|
1104
|
+
<qti-is-null>
|
|
1105
|
+
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
1106
|
+
</qti-is-null>
|
|
1107
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1108
|
+
<qti-base-value base-type="float">0</qti-base-value>
|
|
1109
|
+
</qti-set-outcome-value>
|
|
1110
|
+
</qti-response-if>
|
|
1111
|
+
<qti-response-else>
|
|
1112
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1113
|
+
<qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
|
|
1114
|
+
</qti-set-outcome-value>
|
|
1115
|
+
</qti-response-else>
|
|
1116
|
+
</qti-response-condition>`;
|
|
1102
1117
|
|
|
1103
1118
|
// ../qti-elements/dist/components/qti-response-processing/qti-response-processing.js
|
|
1104
|
-
var
|
|
1119
|
+
var responseProcessingTemplates = {
|
|
1120
|
+
map_response: mapResponse,
|
|
1121
|
+
map_response_point: mapResponsePoint,
|
|
1122
|
+
match_correct: matchCorrect
|
|
1123
|
+
};
|
|
1124
|
+
var QtiResponseProcessing = class extends LitElement8 {
|
|
1105
1125
|
static {
|
|
1106
1126
|
this.styles = [
|
|
1107
|
-
|
|
1127
|
+
css8`
|
|
1108
1128
|
:host {
|
|
1109
1129
|
display: none;
|
|
1110
1130
|
}
|
|
@@ -1112,7 +1132,7 @@ var QtiResponseProcessing = class extends i2 {
|
|
|
1112
1132
|
];
|
|
1113
1133
|
}
|
|
1114
1134
|
render() {
|
|
1115
|
-
return
|
|
1135
|
+
return html11`<slot></slot>`;
|
|
1116
1136
|
}
|
|
1117
1137
|
process() {
|
|
1118
1138
|
const assessmentItem = this.closest("qti-assessment-item");
|
|
@@ -1124,38 +1144,27 @@ var QtiResponseProcessing = class extends i2 {
|
|
|
1124
1144
|
}
|
|
1125
1145
|
}
|
|
1126
1146
|
firstUpdated(_changedProperties) {
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
}
|
|
1136
|
-
case "map_response_point": {
|
|
1137
|
-
this.appendChild(this.#fragmentFromString(mapResponsePoint).firstElementChild.firstElementChild);
|
|
1138
|
-
break;
|
|
1139
|
-
}
|
|
1140
|
-
case "match_correct":
|
|
1141
|
-
this.appendChild(this.#fragmentFromString(matchCorrect).firstElementChild.firstElementChild);
|
|
1142
|
-
break;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
#fragmentFromString(strHTML) {
|
|
1147
|
-
return document.createRange().createContextualFragment(strHTML);
|
|
1147
|
+
const template = this.getAttribute("template");
|
|
1148
|
+
if (!template)
|
|
1149
|
+
return;
|
|
1150
|
+
const templateName = template.split("/").pop().replace(".xml", "");
|
|
1151
|
+
const rules = responseProcessingTemplates[templateName];
|
|
1152
|
+
if (!rules)
|
|
1153
|
+
return;
|
|
1154
|
+
this.innerHTML = rules;
|
|
1148
1155
|
}
|
|
1149
1156
|
};
|
|
1150
1157
|
|
|
1151
1158
|
// ../qti-elements/dist/components/qti-rubric-block/qti-rubric-block.js
|
|
1159
|
+
import { LitElement as LitElement9, css as css9, html as html12 } from "lit";
|
|
1160
|
+
import { property as property6 } from "lit/decorators.js";
|
|
1152
1161
|
var __decorate8 = function(decorators, target, key, desc) {
|
|
1153
|
-
var
|
|
1154
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1155
|
-
else for (var
|
|
1156
|
-
return
|
|
1162
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1163
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1164
|
+
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;
|
|
1165
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1157
1166
|
};
|
|
1158
|
-
var QtiRubricBlock = class extends
|
|
1167
|
+
var QtiRubricBlock = class extends LitElement9 {
|
|
1159
1168
|
handleclassNamesChange() {
|
|
1160
1169
|
const classNames = this.classNames.split(" ");
|
|
1161
1170
|
classNames.forEach((className) => {
|
|
@@ -1183,34 +1192,35 @@ var QtiRubricBlock = class extends i2 {
|
|
|
1183
1192
|
});
|
|
1184
1193
|
}
|
|
1185
1194
|
static {
|
|
1186
|
-
this.styles =
|
|
1195
|
+
this.styles = css9`
|
|
1187
1196
|
:host {
|
|
1188
1197
|
display: block;
|
|
1189
1198
|
}
|
|
1190
1199
|
`;
|
|
1191
1200
|
}
|
|
1192
1201
|
render() {
|
|
1193
|
-
return
|
|
1202
|
+
return html12`<slot></slot>`;
|
|
1194
1203
|
}
|
|
1195
1204
|
};
|
|
1196
1205
|
__decorate8([
|
|
1197
|
-
|
|
1206
|
+
property6({ type: String })
|
|
1198
1207
|
], QtiRubricBlock.prototype, "id", void 0);
|
|
1199
1208
|
__decorate8([
|
|
1200
|
-
|
|
1209
|
+
property6({ type: String })
|
|
1201
1210
|
], QtiRubricBlock.prototype, "use", void 0);
|
|
1202
1211
|
__decorate8([
|
|
1203
|
-
|
|
1212
|
+
property6({ type: String })
|
|
1204
1213
|
], QtiRubricBlock.prototype, "view", void 0);
|
|
1205
1214
|
__decorate8([
|
|
1206
|
-
|
|
1215
|
+
property6({ type: String, attribute: "class" })
|
|
1207
1216
|
], QtiRubricBlock.prototype, "classNames", void 0);
|
|
1208
1217
|
__decorate8([
|
|
1209
1218
|
watch("classNames", { waitUntilFirstUpdate: true })
|
|
1210
1219
|
], QtiRubricBlock.prototype, "handleclassNamesChange", null);
|
|
1211
1220
|
|
|
1212
1221
|
// ../qti-elements/dist/components/qti-stylesheet/qti-stylesheet.js
|
|
1213
|
-
|
|
1222
|
+
import { LitElement as LitElement10 } from "lit";
|
|
1223
|
+
var QtiStylesheet = class extends LitElement10 {
|
|
1214
1224
|
#styleElement = null;
|
|
1215
1225
|
firstUpdated(_changedProperties) {
|
|
1216
1226
|
super.firstUpdated(_changedProperties);
|
|
@@ -1258,9 +1268,10 @@ var QtiStylesheet = class extends i2 {
|
|
|
1258
1268
|
};
|
|
1259
1269
|
|
|
1260
1270
|
// ../qti-elements/dist/components/qti-template-constraint/qti-template-constraint.js
|
|
1261
|
-
|
|
1271
|
+
import { LitElement as LitElement11, html as html13 } from "lit";
|
|
1272
|
+
var QtiTemplateConstraint = class extends LitElement11 {
|
|
1262
1273
|
render() {
|
|
1263
|
-
return
|
|
1274
|
+
return html13`<slot></slot>`;
|
|
1264
1275
|
}
|
|
1265
1276
|
/**
|
|
1266
1277
|
* Evaluates the constraint condition
|
|
@@ -1300,13 +1311,15 @@ var QtiTemplateConstraint = class extends i2 {
|
|
|
1300
1311
|
};
|
|
1301
1312
|
|
|
1302
1313
|
// ../qti-elements/dist/components/qti-template-declaration/qti-template-declaration.js
|
|
1314
|
+
import { css as css10, LitElement as LitElement12, html as html14 } from "lit";
|
|
1315
|
+
import { property as property7 } from "lit/decorators.js";
|
|
1303
1316
|
var __decorate9 = function(decorators, target, key, desc) {
|
|
1304
|
-
var
|
|
1305
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1306
|
-
else for (var
|
|
1307
|
-
return
|
|
1317
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1318
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1319
|
+
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;
|
|
1320
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1308
1321
|
};
|
|
1309
|
-
var QtiTemplateDeclaration = class extends
|
|
1322
|
+
var QtiTemplateDeclaration = class extends LitElement12 {
|
|
1310
1323
|
constructor() {
|
|
1311
1324
|
super(...arguments);
|
|
1312
1325
|
this.identifier = "";
|
|
@@ -1319,7 +1332,7 @@ var QtiTemplateDeclaration = class extends i2 {
|
|
|
1319
1332
|
#defaultValue;
|
|
1320
1333
|
static {
|
|
1321
1334
|
this.styles = [
|
|
1322
|
-
|
|
1335
|
+
css10`
|
|
1323
1336
|
:host {
|
|
1324
1337
|
display: none;
|
|
1325
1338
|
}
|
|
@@ -1327,7 +1340,7 @@ var QtiTemplateDeclaration = class extends i2 {
|
|
|
1327
1340
|
];
|
|
1328
1341
|
}
|
|
1329
1342
|
render() {
|
|
1330
|
-
return
|
|
1343
|
+
return html14`<slot></slot>`;
|
|
1331
1344
|
}
|
|
1332
1345
|
connectedCallback() {
|
|
1333
1346
|
super.connectedCallback();
|
|
@@ -1403,26 +1416,27 @@ var QtiTemplateDeclaration = class extends i2 {
|
|
|
1403
1416
|
}
|
|
1404
1417
|
};
|
|
1405
1418
|
__decorate9([
|
|
1406
|
-
|
|
1419
|
+
property7({ type: String })
|
|
1407
1420
|
], QtiTemplateDeclaration.prototype, "identifier", void 0);
|
|
1408
1421
|
__decorate9([
|
|
1409
|
-
|
|
1422
|
+
property7({ type: String })
|
|
1410
1423
|
], QtiTemplateDeclaration.prototype, "cardinality", void 0);
|
|
1411
1424
|
__decorate9([
|
|
1412
|
-
|
|
1425
|
+
property7({ type: String, attribute: "base-type" })
|
|
1413
1426
|
], QtiTemplateDeclaration.prototype, "baseType", void 0);
|
|
1414
1427
|
__decorate9([
|
|
1415
|
-
|
|
1428
|
+
property7({ type: Boolean, attribute: "math-variable" })
|
|
1416
1429
|
], QtiTemplateDeclaration.prototype, "mathVariable", void 0);
|
|
1417
1430
|
__decorate9([
|
|
1418
|
-
|
|
1431
|
+
property7({ type: Boolean, attribute: "param-variable" })
|
|
1419
1432
|
], QtiTemplateDeclaration.prototype, "paramVariable", void 0);
|
|
1420
1433
|
|
|
1421
1434
|
// ../qti-elements/dist/components/qti-template-processing/qti-template-processing.js
|
|
1422
|
-
|
|
1435
|
+
import { css as css11, html as html15, LitElement as LitElement13 } from "lit";
|
|
1436
|
+
var QtiTemplateProcessing = class extends LitElement13 {
|
|
1423
1437
|
static {
|
|
1424
1438
|
this.styles = [
|
|
1425
|
-
|
|
1439
|
+
css11`
|
|
1426
1440
|
:host {
|
|
1427
1441
|
display: none;
|
|
1428
1442
|
}
|
|
@@ -1432,7 +1446,7 @@ var QtiTemplateProcessing = class extends i2 {
|
|
|
1432
1446
|
#maxIterations = 100;
|
|
1433
1447
|
// Prevent infinite loops in template constraints
|
|
1434
1448
|
render() {
|
|
1435
|
-
return
|
|
1449
|
+
return html15`<slot></slot>`;
|
|
1436
1450
|
}
|
|
1437
1451
|
/**
|
|
1438
1452
|
* Process template rules to set template variable values
|
|
@@ -1527,4 +1541,4 @@ export {
|
|
|
1527
1541
|
QtiTemplateProcessing,
|
|
1528
1542
|
qtiContentElements
|
|
1529
1543
|
};
|
|
1530
|
-
//# sourceMappingURL=chunk-
|
|
1544
|
+
//# sourceMappingURL=chunk-6XJUP55A.js.map
|