@qti-components/test 1.2.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/LICENSE.md +674 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.js +26 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.d.ts +22 -0
- package/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js +78 -0
- package/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js.map +1 -0
- package/dist/components/qti-assessment-section/qti-assessment-section.d.ts +20 -0
- package/dist/components/qti-assessment-section/qti-assessment-section.js +64 -0
- package/dist/components/qti-assessment-section/qti-assessment-section.js.map +1 -0
- package/dist/components/qti-assessment-test/qti-assessment-test.d.ts +16 -0
- package/dist/components/qti-assessment-test/qti-assessment-test.js +47 -0
- package/dist/components/qti-assessment-test/qti-assessment-test.js.map +1 -0
- package/dist/components/qti-outcome-processing/qti-outcome-processing.d.ts +15 -0
- package/dist/components/qti-outcome-processing/qti-outcome-processing.js +37 -0
- package/dist/components/qti-outcome-processing/qti-outcome-processing.js.map +1 -0
- package/dist/components/qti-test/qti-test.d.ts +69 -0
- package/dist/components/qti-test/qti-test.js +80 -0
- package/dist/components/qti-test/qti-test.js.map +1 -0
- package/dist/components/qti-test-feedback/qti-test-feedback.d.ts +10 -0
- package/dist/components/qti-test-feedback/qti-test-feedback.js +24 -0
- package/dist/components/qti-test-feedback/qti-test-feedback.js.map +1 -0
- package/dist/components/qti-test-part/qti-test-part.d.ts +17 -0
- package/dist/components/qti-test-part/qti-test-part.js +58 -0
- package/dist/components/qti-test-part/qti-test-part.js.map +1 -0
- package/dist/components/qti-test-variables/qti-test-variables.d.ts +25 -0
- package/dist/components/qti-test-variables/qti-test-variables.js +79 -0
- package/dist/components/qti-test-variables/qti-test-variables.js.map +1 -0
- package/dist/components/styles.d.ts +4 -0
- package/dist/components/styles.js +23 -0
- package/dist/components/styles.js.map +1 -0
- package/dist/components/test-check-item/test-check-item.d.ts +11 -0
- package/dist/components/test-check-item/test-check-item.js +43 -0
- package/dist/components/test-check-item/test-check-item.js.map +1 -0
- package/dist/components/test-container/test-container.d.ts +33 -0
- package/dist/components/test-container/test-container.js +122 -0
- package/dist/components/test-container/test-container.js.map +1 -0
- package/dist/components/test-end-attempt/test-end-attempt.d.ts +11 -0
- package/dist/components/test-end-attempt/test-end-attempt.js +31 -0
- package/dist/components/test-end-attempt/test-end-attempt.js.map +1 -0
- package/dist/components/test-item-link/test-item-link.d.ts +13 -0
- package/dist/components/test-item-link/test-item-link.js +45 -0
- package/dist/components/test-item-link/test-item-link.js.map +1 -0
- package/dist/components/test-navigation/test-navigation.d.ts +35 -0
- package/dist/components/test-navigation/test-navigation.js +401 -0
- package/dist/components/test-navigation/test-navigation.js.map +1 -0
- package/dist/components/test-next/test-next.d.ts +33 -0
- package/dist/components/test-next/test-next.js +96 -0
- package/dist/components/test-next/test-next.js.map +1 -0
- package/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.d.ts +19 -0
- package/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js +44 -0
- package/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js.map +1 -0
- package/dist/components/test-prev/test-prev.d.ts +31 -0
- package/dist/components/test-prev/test-prev.js +87 -0
- package/dist/components/test-prev/test-prev.js.map +1 -0
- package/dist/components/test-print-context/test-print-context.d.ts +11 -0
- package/dist/components/test-print-context/test-print-context.js +24 -0
- package/dist/components/test-print-context/test-print-context.js.map +1 -0
- package/dist/components/test-print-item-variables/test-print-item-variables.d.ts +12 -0
- package/dist/components/test-print-item-variables/test-print-item-variables.js +88 -0
- package/dist/components/test-print-item-variables/test-print-item-variables.js.map +1 -0
- package/dist/components/test-scoring-buttons/test-scoring-buttons.d.ts +19 -0
- package/dist/components/test-scoring-buttons/test-scoring-buttons.js +101 -0
- package/dist/components/test-scoring-buttons/test-scoring-buttons.js.map +1 -0
- package/dist/components/test-scoring-feedback/test-scoring-feedback.d.ts +13 -0
- package/dist/components/test-scoring-feedback/test-scoring-feedback.js +58 -0
- package/dist/components/test-scoring-feedback/test-scoring-feedback.js.map +1 -0
- package/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.d.ts +19 -0
- package/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js +44 -0
- package/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js.map +1 -0
- package/dist/components/test-section-link/test-section-link.d.ts +13 -0
- package/dist/components/test-section-link/test-section-link.js +45 -0
- package/dist/components/test-section-link/test-section-link.js.map +1 -0
- package/dist/components/test-show-correct-response/test-show-correct-response.d.ts +22 -0
- package/dist/components/test-show-correct-response/test-show-correct-response.js +91 -0
- package/dist/components/test-show-correct-response/test-show-correct-response.js.map +1 -0
- package/dist/components/test-stamp/test-stamp.d.ts +28 -0
- package/dist/components/test-stamp/test-stamp.js +104 -0
- package/dist/components/test-stamp/test-stamp.js.map +1 -0
- package/dist/components/test-view-toggle/test-view-toggle.d.ts +16 -0
- package/dist/components/test-view-toggle/test-view-toggle.js +57 -0
- package/dist/components/test-view-toggle/test-view-toggle.js.map +1 -0
- package/dist/components/test-view-toggle/test-view.d.ts +20 -0
- package/dist/components/test-view-toggle/test-view.js +81 -0
- package/dist/components/test-view-toggle/test-view.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/mixins/index.d.ts +3 -0
- package/dist/mixins/index.js +4 -0
- package/dist/mixins/index.js.map +1 -0
- package/dist/mixins/test-base.d.ts +17 -0
- package/dist/mixins/test-base.js +153 -0
- package/dist/mixins/test-base.js.map +1 -0
- package/dist/mixins/test-navigation.mixin.d.ts +26 -0
- package/dist/mixins/test-navigation.mixin.js +502 -0
- package/dist/mixins/test-navigation.mixin.js.map +1 -0
- package/dist/mixins/test-processing.mixin.d.ts +11 -0
- package/dist/mixins/test-processing.mixin.js +55 -0
- package/dist/mixins/test-processing.mixin.js.map +1 -0
- package/dist/mixins/test-view.mixin.d.ts +6 -0
- package/dist/mixins/test-view.mixin.js +45 -0
- package/dist/mixins/test-view.mixin.js.map +1 -0
- package/dist/types/iqti-test.d.ts +28 -0
- package/dist/types/iqti-test.js +2 -0
- package/dist/types/iqti-test.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
let QtiTestPart = class QtiTestPart extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.identifier = '';
|
|
13
|
+
this.class = '';
|
|
14
|
+
this.navigationMode = 'nonlinear';
|
|
15
|
+
this.submissionMode = 'individual';
|
|
16
|
+
this.#title = '';
|
|
17
|
+
}
|
|
18
|
+
get title() {
|
|
19
|
+
return this.#title;
|
|
20
|
+
}
|
|
21
|
+
set title(value) {
|
|
22
|
+
this.#title = value;
|
|
23
|
+
this.removeAttribute('title');
|
|
24
|
+
this.setAttribute('data-title', value);
|
|
25
|
+
}
|
|
26
|
+
#title;
|
|
27
|
+
async connectedCallback() {
|
|
28
|
+
super.connectedCallback();
|
|
29
|
+
await this.updateComplete;
|
|
30
|
+
this.dispatchEvent(new Event('qti-test-part-connected', {
|
|
31
|
+
bubbles: true,
|
|
32
|
+
composed: true
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return html ` <slot></slot>`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
__decorate([
|
|
40
|
+
property({ type: String })
|
|
41
|
+
], QtiTestPart.prototype, "identifier", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
property({ type: String })
|
|
44
|
+
], QtiTestPart.prototype, "class", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
property({ type: String, attribute: 'navigation-mode' })
|
|
47
|
+
], QtiTestPart.prototype, "navigationMode", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
property({ type: String, attribute: 'submission-mode' })
|
|
50
|
+
], QtiTestPart.prototype, "submissionMode", void 0);
|
|
51
|
+
QtiTestPart = __decorate([
|
|
52
|
+
customElement('qti-test-part')
|
|
53
|
+
], QtiTestPart);
|
|
54
|
+
export { QtiTestPart };
|
|
55
|
+
if (!customElements.get('qti-test-part')) {
|
|
56
|
+
customElements.define('qti-test-part', QtiTestPart);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=qti-test-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qti-test-part.js","sourceRoot":"","sources":["../../../src/components/qti-test-part/qti-test-part.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAErD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QACuB,eAAU,GAAW,EAAE,CAAC;QASxB,UAAK,GAAW,EAAE,CAAC;QAG/C,mBAAc,GAA2B,WAAW,CAAC;QAGrD,mBAAc,GAAkC,YAAY,CAAC;QAE7D,WAAM,GAAG,EAAE,CAAC;IAgBd,CAAC;IAhCC,IAAa,KAAK;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,IAAa,KAAK,CAAC,KAAa;QAC9B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC9B,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IASD,MAAM,CAAM;IAEH,KAAK,CAAC,iBAAiB;QAC9B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,MAAM,IAAI,CAAC,cAAc,CAAC;QAC1B,IAAI,CAAC,aAAa,CAChB,IAAI,KAAK,CAAC,yBAAyB,EAAE;YACnC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;IACJ,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA,gBAAgB,CAAC;IAC9B,CAAC;CACF,CAAA;AAjC6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAyB;AASxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAoB;AAG/C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDACJ;AAGrD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDACI;AAhBlD,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAkCvB;;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;IACzC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n@customElement('qti-test-part')\nexport class QtiTestPart extends LitElement {\n @property({ type: String }) identifier: string = '';\n override get title(): string {\n return this.#title;\n }\n override set title(value: string) {\n this.#title = value;\n this.removeAttribute('title');\n this.setAttribute('data-title', value);\n }\n @property({ type: String }) class: string = '';\n\n @property({ type: String, attribute: 'navigation-mode' })\n navigationMode: 'linear' | 'nonlinear' = 'nonlinear';\n\n @property({ type: String, attribute: 'submission-mode' })\n submissionMode: 'individual' | 'simultaneous' = 'individual';\n\n #title = '';\n\n override async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-test-part-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n override render() {\n return html` <slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-test-part')) {\n customElements.define('qti-test-part', QtiTestPart);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test-part': QtiTestPart;\n }\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QtiExpression } from '@qti-components/base';
|
|
2
|
+
import type { TestContext } from '@qti-components/base';
|
|
3
|
+
import type { QtiExpressionBase } from '@qti-components/base';
|
|
4
|
+
export declare class QtiTestVariables extends QtiExpression<number> {
|
|
5
|
+
#private;
|
|
6
|
+
_testContext?: TestContext;
|
|
7
|
+
constructor();
|
|
8
|
+
getResult(): number;
|
|
9
|
+
calculate(): number;
|
|
10
|
+
}
|
|
11
|
+
export declare class QtiTestVariablesExpression implements QtiExpressionBase<number> {
|
|
12
|
+
private testContext;
|
|
13
|
+
private itemVariable;
|
|
14
|
+
private includedItems;
|
|
15
|
+
constructor(testContext: TestContext, itemVariable: string, includedItems: {
|
|
16
|
+
item: string;
|
|
17
|
+
weight: number;
|
|
18
|
+
}[]);
|
|
19
|
+
calculate(): number;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'qti-test-variables': QtiTestVariables;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { consume } from '@lit/context';
|
|
8
|
+
import { testContext } from '@qti-components/base';
|
|
9
|
+
import { QtiExpression } from '@qti-components/base';
|
|
10
|
+
// <qti-custom-operator definition="trim">
|
|
11
|
+
export class QtiTestVariables extends QtiExpression {
|
|
12
|
+
#testElement;
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.addEventListener('qti-assessment-test-connected', (e) => (this.#testElement = e.detail));
|
|
16
|
+
}
|
|
17
|
+
getResult() {
|
|
18
|
+
// children can be a mix of qti-expression and qti-condition-expression
|
|
19
|
+
const includedCategories = this.getAttribute('include-category')?.split(' ') ?? [];
|
|
20
|
+
const excludedCategories = this.getAttribute('exclude-category')?.split(' ') ?? [];
|
|
21
|
+
const weightIdentifier = this.getAttribute('weight-identifier') ?? '';
|
|
22
|
+
const itemVariable = this.getAttribute('variable-identifier');
|
|
23
|
+
const itemRefEls = Array.from(this.#testElement.querySelectorAll(`qti-asssessment-test qti-assessment-item-ref`));
|
|
24
|
+
const includedItems = itemRefEls
|
|
25
|
+
.filter(itemRef => {
|
|
26
|
+
let include = true;
|
|
27
|
+
if (includedCategories.length > 0) {
|
|
28
|
+
include = includedCategories.includes(itemRef.category);
|
|
29
|
+
}
|
|
30
|
+
if (excludedCategories.length > 0) {
|
|
31
|
+
include = !excludedCategories.includes(itemRef.category);
|
|
32
|
+
}
|
|
33
|
+
return include;
|
|
34
|
+
})
|
|
35
|
+
.map(itemRef => {
|
|
36
|
+
let weight = 1;
|
|
37
|
+
if (weightIdentifier) {
|
|
38
|
+
const weightVariable = itemRef.weigths.get(weightIdentifier);
|
|
39
|
+
if (weightVariable !== null && weightVariable !== undefined) {
|
|
40
|
+
weight = weightVariable;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return { item: itemRef.identifier, weight };
|
|
44
|
+
});
|
|
45
|
+
const logic = new QtiTestVariablesExpression(this._testContext, itemVariable, includedItems);
|
|
46
|
+
const value = logic.calculate();
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
calculate() {
|
|
50
|
+
return this.getResult();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
__decorate([
|
|
54
|
+
consume({ context: testContext, subscribe: true })
|
|
55
|
+
], QtiTestVariables.prototype, "_testContext", void 0);
|
|
56
|
+
export class QtiTestVariablesExpression {
|
|
57
|
+
constructor(testContext, itemVariable, includedItems) {
|
|
58
|
+
this.testContext = testContext;
|
|
59
|
+
this.itemVariable = itemVariable;
|
|
60
|
+
this.includedItems = includedItems;
|
|
61
|
+
}
|
|
62
|
+
calculate() {
|
|
63
|
+
const { items } = this.testContext;
|
|
64
|
+
let total = 0;
|
|
65
|
+
const uniqueItems = [...new Set(this.includedItems.map(item => item.item))];
|
|
66
|
+
items.forEach(item => {
|
|
67
|
+
if (uniqueItems.includes(item.identifier)) {
|
|
68
|
+
const variable = item.variables.find(vr => vr.identifier === this.itemVariable);
|
|
69
|
+
const weight = this.includedItems.find(i => i.item === item.identifier)?.weight ?? 1;
|
|
70
|
+
if (variable) {
|
|
71
|
+
total += Number(variable.value) * weight;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return total;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
customElements.define('qti-test-variables', QtiTestVariables);
|
|
79
|
+
//# sourceMappingURL=qti-test-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qti-test-variables.js","sourceRoot":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I,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACnB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,KAAK,IAAI,CAAC,YAAY,CAAC,CAAC;gBAChF,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;gBACrF,IAAI,QAAQ,EAAE,CAAC;oBACb,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;gBAC3C,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAED,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { consume } from '@lit/context';\n\nimport { testContext } from '@qti-components/base';\nimport { QtiExpression } from '@qti-components/base';\n\nimport type { QtiAssessmentTest } from '../qti-assessment-test/qti-assessment-test';\nimport type { TestContext } from '@qti-components/base';\nimport type { QtiAssessmentItemRef } from '../qti-assessment-item-ref/qti-assessment-item-ref';\nimport type { QtiExpressionBase } from '@qti-components/base';\n\n// <qti-custom-operator definition=\"trim\">\nexport class QtiTestVariables extends QtiExpression<number> {\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n #testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', (e: CustomEvent) => (this.#testElement = e.detail));\n }\n\n public override getResult() {\n // children can be a mix of qti-expression and qti-condition-expression\n const includedCategories = this.getAttribute('include-category')?.split(' ') ?? [];\n const excludedCategories = this.getAttribute('exclude-category')?.split(' ') ?? [];\n const weightIdentifier = this.getAttribute('weight-identifier') ?? '';\n const itemVariable = this.getAttribute('variable-identifier');\n\n const itemRefEls = Array.from<QtiAssessmentItemRef>(\n this.#testElement.querySelectorAll<QtiAssessmentItemRef>(`qti-asssessment-test qti-assessment-item-ref`)\n );\n\n const includedItems = itemRefEls\n .filter(itemRef => {\n let include = true;\n if (includedCategories.length > 0) {\n include = includedCategories.includes(itemRef.category);\n }\n if (excludedCategories.length > 0) {\n include = !excludedCategories.includes(itemRef.category);\n }\n return include;\n })\n .map(itemRef => {\n let weight = 1;\n if (weightIdentifier) {\n const weightVariable = itemRef.weigths.get(weightIdentifier);\n if (weightVariable !== null && weightVariable !== undefined) {\n weight = weightVariable;\n }\n }\n return { item: itemRef.identifier, weight };\n });\n\n const logic = new QtiTestVariablesExpression(this._testContext, itemVariable, includedItems);\n const value = logic.calculate();\n return value;\n }\n\n public override calculate() {\n return this.getResult();\n }\n}\n\nexport class QtiTestVariablesExpression implements QtiExpressionBase<number> {\n constructor(\n private testContext: TestContext,\n private itemVariable: string,\n private includedItems: { item: string; weight: number }[]\n ) {}\n\n calculate(): number {\n const { items } = this.testContext;\n let total = 0;\n const uniqueItems = [...new Set(this.includedItems.map(item => item.item))];\n items.forEach(item => {\n if (uniqueItems.includes(item.identifier)) {\n const variable = item.variables.find(vr => vr.identifier === this.itemVariable);\n const weight = this.includedItems.find(i => i.item === item.identifier)?.weight ?? 1;\n if (variable) {\n total += Number(variable.value) * weight;\n }\n }\n });\n return total;\n }\n}\n\ncustomElements.define('qti-test-variables', QtiTestVariables);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test-variables': QtiTestVariables;\n }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// /* eslint-disable lit-plugin(no-invalid-css) */
|
|
2
|
+
import { css } from 'lit';
|
|
3
|
+
export const form = css `
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
padding: 0.5rem 1rem;
|
|
8
|
+
border-radius: 0.25rem;
|
|
9
|
+
user-select: none;
|
|
10
|
+
`;
|
|
11
|
+
export const btn = css `
|
|
12
|
+
background-color: lightgray;
|
|
13
|
+
${form};
|
|
14
|
+
`;
|
|
15
|
+
export const dis = css `
|
|
16
|
+
cursor: not-allowed;
|
|
17
|
+
opacity: 0.8;
|
|
18
|
+
`;
|
|
19
|
+
export const ind = css `
|
|
20
|
+
${form};
|
|
21
|
+
border: 1px solid gray;
|
|
22
|
+
`;
|
|
23
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/components/styles.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;;;;;;;CAOtB,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAA;;IAElB,IAAI;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAA;;;CAGrB,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CAAA;IAClB,IAAI;;CAEP,CAAC","sourcesContent":["// /* eslint-disable lit-plugin(no-invalid-css) */\nimport { css } from 'lit';\n\nexport const form = css`\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n padding: 0.5rem 1rem;\n border-radius: 0.25rem;\n user-select: none;\n`;\n\nexport const btn = css`\n background-color: lightgray;\n ${form};\n`;\n\nexport const dis = css`\n cursor: not-allowed;\n opacity: 0.8;\n`;\n\nexport const ind = css`\n ${form};\n border: 1px solid gray;\n`;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class TestCheckItem extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
constructor();
|
|
5
|
+
render(): import("lit").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'test-check-item': TestCheckItem;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from 'lit';
|
|
8
|
+
import { customElement } from 'lit/decorators.js';
|
|
9
|
+
import * as styles from '../styles';
|
|
10
|
+
let TestCheckItem = class TestCheckItem extends LitElement {
|
|
11
|
+
static { this.styles = css `
|
|
12
|
+
:host {
|
|
13
|
+
${styles.btn};
|
|
14
|
+
}
|
|
15
|
+
:host([disabled]) {
|
|
16
|
+
${styles.dis};
|
|
17
|
+
}
|
|
18
|
+
`; }
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.addEventListener('click', () => {
|
|
22
|
+
this.dispatchEvent(new CustomEvent('test-end-attempt', { bubbles: true }));
|
|
23
|
+
this.dispatchEvent(new CustomEvent('test-show-correct-response', {
|
|
24
|
+
detail: true,
|
|
25
|
+
bubbles: true
|
|
26
|
+
}));
|
|
27
|
+
const qtiTest = this.closest('qti-test');
|
|
28
|
+
const testContainer = qtiTest.querySelector('test-container');
|
|
29
|
+
const viewElements = Array.from(testContainer.shadowRoot.querySelectorAll('[view]'));
|
|
30
|
+
viewElements.forEach((element) => {
|
|
31
|
+
element.classList.toggle('show', true);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return html ` <slot></slot> `;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
TestCheckItem = __decorate([
|
|
40
|
+
customElement('test-check-item')
|
|
41
|
+
], TestCheckItem);
|
|
42
|
+
export { TestCheckItem };
|
|
43
|
+
//# sourceMappingURL=test-check-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-check-item.js","sourceRoot":"","sources":["../../../src/components/test-check-item/test-check-item.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAM7B,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;aAC3B,WAAM,GAAG,GAAG,CAAA;;QAEtB,MAAM,CAAC,GAAG;;;QAGV,MAAM,CAAC,GAAG;;GAEf,AAPqB,CAOpB;IAEF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAClC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAC3E,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,4BAA4B,EAAE;gBAC5C,MAAM,EAAE,IAAI;gBACZ,OAAO,EAAE,IAAI;aACd,CAAC,CACH,CAAC;YACF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAU,UAAU,CAAC,CAAC;YAClD,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAgB,gBAAgB,CAAC,CAAC;YAE7E,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAErF,YAAY,CAAC,OAAO,CAAC,CAAC,OAAoB,EAAE,EAAE;gBAC5C,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA,iBAAiB,CAAC;IAC/B,CAAC;;AAjCU,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAkCzB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport * as styles from '../styles';\n\nimport type { QtiTest } from '../qti-test/qti-test';\nimport type { TestContainer } from '../test-container/test-container';\n\n@customElement('test-check-item')\nexport class TestCheckItem extends LitElement {\n static override styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\n this.addEventListener('click', () => {\n this.dispatchEvent(new CustomEvent('test-end-attempt', { bubbles: true }));\n this.dispatchEvent(\n new CustomEvent('test-show-correct-response', {\n detail: true,\n bubbles: true\n })\n );\n const qtiTest = this.closest<QtiTest>('qti-test');\n const testContainer = qtiTest.querySelector<TestContainer>('test-container');\n\n const viewElements = Array.from(testContainer.shadowRoot.querySelectorAll('[view]'));\n\n viewElements.forEach((element: HTMLElement) => {\n element.classList.toggle('show', true);\n });\n });\n }\n\n override render() {\n return html` <slot></slot> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-check-item': TestCheckItem;\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* `<test-container>` is a custom element designed for hosting the qti-assessment-item.
|
|
4
|
+
* The `qti-assessment-test` will be placed inside the shadow DOM of this element.
|
|
5
|
+
* The element loads the test from the provided URL and renders it inside the shadow DOM.
|
|
6
|
+
*
|
|
7
|
+
* ```html
|
|
8
|
+
* <qti-test>
|
|
9
|
+
* <test-navigation>
|
|
10
|
+
* <test-container class="m-4 bg-white" test-url="./path/to/assessmenttest.xml"></test-container>
|
|
11
|
+
* </test-navigation>
|
|
12
|
+
* </qti-test>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class TestContainer extends LitElement {
|
|
16
|
+
#private;
|
|
17
|
+
/** URL of the item to load */
|
|
18
|
+
testURL: string;
|
|
19
|
+
/** A parsed HTML document */
|
|
20
|
+
testDoc: DocumentFragment;
|
|
21
|
+
/** The raw XML string */
|
|
22
|
+
testXML: string;
|
|
23
|
+
/** Callback function to transform the test after loading */
|
|
24
|
+
protected handleTestURLChange(): Promise<void>;
|
|
25
|
+
protected handleTestXMLChange(): void;
|
|
26
|
+
connectedCallback(): Promise<void>;
|
|
27
|
+
render(): import("lit").TemplateResult<1>;
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface HTMLElementTagNameMap {
|
|
31
|
+
'test-container': TestContainer;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
+
import { until } from 'lit/directives/until.js';
|
|
10
|
+
import { watch } from '@qti-components/utilities';
|
|
11
|
+
import { qtiTransformTest } from '@qti-components/transformers';
|
|
12
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
13
|
+
import itemCss from '../../../../qti-theme/src/item.css?inline';
|
|
14
|
+
/**
|
|
15
|
+
* `<test-container>` is a custom element designed for hosting the qti-assessment-item.
|
|
16
|
+
* The `qti-assessment-test` will be placed inside the shadow DOM of this element.
|
|
17
|
+
* The element loads the test from the provided URL and renders it inside the shadow DOM.
|
|
18
|
+
*
|
|
19
|
+
* ```html
|
|
20
|
+
* <qti-test>
|
|
21
|
+
* <test-navigation>
|
|
22
|
+
* <test-container class="m-4 bg-white" test-url="./path/to/assessmenttest.xml"></test-container>
|
|
23
|
+
* </test-navigation>
|
|
24
|
+
* </qti-test>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
let TestContainer = class TestContainer extends LitElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
/** URL of the item to load */
|
|
31
|
+
this.testURL = null;
|
|
32
|
+
/** A parsed HTML document */
|
|
33
|
+
this.testDoc = null;
|
|
34
|
+
/** The raw XML string */
|
|
35
|
+
this.testXML = null;
|
|
36
|
+
/** Template content if provided */
|
|
37
|
+
this.#templateContent = null;
|
|
38
|
+
}
|
|
39
|
+
/** Template content if provided */
|
|
40
|
+
#templateContent;
|
|
41
|
+
/** Callback function to transform the test after loading */
|
|
42
|
+
// @property({ type: Function }) postLoadTestTransformCallback: PostLoadTestTransformCallback | null = null;
|
|
43
|
+
async handleTestURLChange() {
|
|
44
|
+
if (!this.testURL)
|
|
45
|
+
return;
|
|
46
|
+
try {
|
|
47
|
+
let api = await qtiTransformTest().load(this.testURL);
|
|
48
|
+
// Apply external transformation if provided
|
|
49
|
+
const qtiTest = this.closest('qti-test'); // Type assertion to access mixin properties
|
|
50
|
+
if (qtiTest?.postLoadTestTransformCallback) {
|
|
51
|
+
// Create a temporary document to get the test element reference
|
|
52
|
+
const tempDoc = api.htmlDoc();
|
|
53
|
+
const testElement = tempDoc.querySelector('qti-assessment-test');
|
|
54
|
+
if (testElement) {
|
|
55
|
+
// Apply the callback with the test element
|
|
56
|
+
api = await qtiTest.postLoadTestTransformCallback(api, testElement);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
this.testDoc = api.htmlDoc();
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
console.error('Error loading or parsing XML:', error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
handleTestXMLChange() {
|
|
66
|
+
if (!this.testXML)
|
|
67
|
+
return;
|
|
68
|
+
try {
|
|
69
|
+
this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
console.error('Error parsing XML:', error);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async connectedCallback() {
|
|
76
|
+
super.connectedCallback();
|
|
77
|
+
this.#initializeTemplateContent();
|
|
78
|
+
this.#applyStyles();
|
|
79
|
+
if (this.testURL) {
|
|
80
|
+
this.handleTestURLChange();
|
|
81
|
+
}
|
|
82
|
+
if (this.testXML) {
|
|
83
|
+
this.handleTestXMLChange();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
#initializeTemplateContent() {
|
|
87
|
+
const template = this.querySelector('template');
|
|
88
|
+
this.#templateContent = template ? template.content : html ``;
|
|
89
|
+
}
|
|
90
|
+
#applyStyles() {
|
|
91
|
+
const sheet = new CSSStyleSheet();
|
|
92
|
+
sheet.replaceSync(itemCss);
|
|
93
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
return html `
|
|
97
|
+
${this.#templateContent}
|
|
98
|
+
<slot></slot>
|
|
99
|
+
${until(this.testDoc, html `<span>Loading...</span>`)}
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
__decorate([
|
|
104
|
+
property({ type: String, attribute: 'test-url' })
|
|
105
|
+
], TestContainer.prototype, "testURL", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
state()
|
|
108
|
+
], TestContainer.prototype, "testDoc", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
state()
|
|
111
|
+
], TestContainer.prototype, "testXML", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
watch('testURL', { waitUntilFirstUpdate: true })
|
|
114
|
+
], TestContainer.prototype, "handleTestURLChange", null);
|
|
115
|
+
__decorate([
|
|
116
|
+
watch('testXML', { waitUntilFirstUpdate: true })
|
|
117
|
+
], TestContainer.prototype, "handleTestXMLChange", null);
|
|
118
|
+
TestContainer = __decorate([
|
|
119
|
+
customElement('test-container')
|
|
120
|
+
], TestContainer);
|
|
121
|
+
export { TestContainer };
|
|
122
|
+
//# sourceMappingURL=test-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-container.js","sourceRoot":"","sources":["../../../src/components/test-container/test-container.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,uDAAuD;AACvD,OAAO,OAAO,MAAM,2CAA2C,CAAC;AAEhE;;;;;;;;;;;;GAYG;AAEI,IAA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AAIvB;IADC,KAAK,EAAE;8CACyB;AAIjC;IADC,KAAK,EAAE;8CACe;AASP;IADf,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;wDAsBhD;AAGS;IADT,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;wDAQhD;AAnDU,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAmFzB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\n\nimport { watch } from '@qti-components/utilities';\nimport { qtiTransformTest } from '@qti-components/transformers';\n\n// eslint-disable-next-line import/no-relative-packages\nimport itemCss from '../../../../qti-theme/src/item.css?inline';\n\n/**\n * `<test-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-test` will be placed inside the shadow DOM of this element.\n * The element loads the test from the provided URL and renders it inside the shadow DOM.\n *\n * ```html\n * <qti-test>\n * <test-navigation>\n * <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n * </test-navigation>\n * </qti-test>\n * ```\n */\n@customElement('test-container')\nexport class TestContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'test-url' })\n testURL: string = null;\n\n /** A parsed HTML document */\n @state()\n testDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n testXML: string = null;\n\n /** Template content if provided */\n #templateContent: unknown = null;\n\n /** Callback function to transform the test after loading */\n // @property({ type: Function }) postLoadTestTransformCallback: PostLoadTestTransformCallback | null = null;\n\n @watch('testURL', { waitUntilFirstUpdate: true })\n protected async handleTestURLChange() {\n if (!this.testURL) return;\n try {\n let api = await qtiTransformTest().load(this.testURL);\n // Apply external transformation if provided\n const qtiTest = this.closest('qti-test') as any; // Type assertion to access mixin properties\n if (qtiTest?.postLoadTestTransformCallback) {\n // Create a temporary document to get the test element reference\n const tempDoc = api.htmlDoc();\n const testElement = tempDoc.querySelector('qti-assessment-test') as any;\n\n if (testElement) {\n // Apply the callback with the test element\n api = await qtiTest.postLoadTestTransformCallback(api, testElement);\n }\n }\n\n this.testDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('testXML', { waitUntilFirstUpdate: true })\n protected handleTestXMLChange() {\n if (!this.testXML) return;\n try {\n this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n override async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.#initializeTemplateContent();\n this.#applyStyles();\n if (this.testURL) {\n this.handleTestURLChange();\n }\n if (this.testXML) {\n this.handleTestXMLChange();\n }\n }\n\n #initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.#templateContent = template ? template.content : html``;\n }\n\n #applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n override render() {\n return html`\n ${this.#templateContent}\n <slot></slot>\n ${until(this.testDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-container': TestContainer;\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class TestEndAttempt extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
constructor();
|
|
5
|
+
render(): import("lit").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'test-end-attempt': TestEndAttempt;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from 'lit';
|
|
8
|
+
import { customElement } from 'lit/decorators.js';
|
|
9
|
+
import * as styles from '../styles';
|
|
10
|
+
let TestEndAttempt = class TestEndAttempt extends LitElement {
|
|
11
|
+
static { this.styles = css `
|
|
12
|
+
:host {
|
|
13
|
+
${styles.btn};
|
|
14
|
+
}
|
|
15
|
+
:host([disabled]) {
|
|
16
|
+
${styles.dis};
|
|
17
|
+
}
|
|
18
|
+
`; }
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.addEventListener('click', () => this.dispatchEvent(new CustomEvent('test-end-attempt', { bubbles: true })));
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return html ` <slot></slot> `;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
TestEndAttempt = __decorate([
|
|
28
|
+
customElement('test-end-attempt')
|
|
29
|
+
], TestEndAttempt);
|
|
30
|
+
export { TestEndAttempt };
|
|
31
|
+
//# sourceMappingURL=test-end-attempt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-end-attempt.js","sourceRoot":"","sources":["../../../src/components/test-end-attempt/test-end-attempt.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAG7B,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;aAC5B,WAAM,GAAG,GAAG,CAAA;;QAEtB,MAAM,CAAC,GAAG;;;QAGV,MAAM,CAAC,GAAG;;GAEf,AAPqB,CAOpB;IAEF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACnH,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA,iBAAiB,CAAC;IAC/B,CAAC;;AAjBU,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAkB1B","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport * as styles from '../styles';\n\n@customElement('test-end-attempt')\nexport class TestEndAttempt extends LitElement {\n static override styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\n this.addEventListener('click', () => this.dispatchEvent(new CustomEvent('test-end-attempt', { bubbles: true })));\n }\n\n override render() {\n return html` <slot></slot> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-end-attempt': TestEndAttempt;\n }\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class TestItemLink extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
private itemId;
|
|
5
|
+
constructor();
|
|
6
|
+
protected _requestItem(identifier: string): void;
|
|
7
|
+
render(): import("lit").TemplateResult<1>;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'test-item-link': TestItemLink;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import * as styles from '../styles';
|
|
10
|
+
let TestItemLink = class TestItemLink extends LitElement {
|
|
11
|
+
static { this.styles = css `
|
|
12
|
+
:host {
|
|
13
|
+
${styles.btn};
|
|
14
|
+
}
|
|
15
|
+
:host([disabled]) {
|
|
16
|
+
${styles.dis};
|
|
17
|
+
}
|
|
18
|
+
`; }
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.itemId = null;
|
|
22
|
+
this.addEventListener('click', () => this._requestItem(this.itemId));
|
|
23
|
+
}
|
|
24
|
+
_requestItem(identifier) {
|
|
25
|
+
this.dispatchEvent(new CustomEvent('qti-request-navigation', {
|
|
26
|
+
composed: true,
|
|
27
|
+
bubbles: true,
|
|
28
|
+
detail: {
|
|
29
|
+
type: 'item',
|
|
30
|
+
id: identifier
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return html ` <slot></slot> `;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
__decorate([
|
|
39
|
+
property({ type: String, attribute: 'item-id' })
|
|
40
|
+
], TestItemLink.prototype, "itemId", void 0);
|
|
41
|
+
TestItemLink = __decorate([
|
|
42
|
+
customElement('test-item-link')
|
|
43
|
+
], TestItemLink);
|
|
44
|
+
export { TestItemLink };
|
|
45
|
+
//# sourceMappingURL=test-item-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-item-link.js","sourceRoot":"","sources":["../../../src/components/test-item-link/test-item-link.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAG7B,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;aAC1B,WAAM,GAAG,GAAG,CAAA;;QAEtB,MAAM,CAAC,GAAG;;;QAGV,MAAM,CAAC,GAAG;;GAEf,AAPqB,CAOpB;IAKF;QACE,KAAK,EAAE,CAAC;QAHF,WAAM,GAAW,IAAI,CAAC;QAI5B,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACvE,CAAC;IAES,YAAY,CAAC,UAAkB;QACvC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,wBAAwB,EAAE;YACxC,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,IAAI;YACb,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM;gBACZ,EAAE,EAAE,UAAU;aACf;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA,iBAAiB,CAAC;IAC/B,CAAC;;AAtBO;IADP,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;4CACnB;AAXnB,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAkCxB","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport * as styles from '../styles';\n\n@customElement('test-item-link')\nexport class TestItemLink extends LitElement {\n static override styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n @property({ type: String, attribute: 'item-id' })\n private itemId: string = null;\n\n constructor() {\n super();\n this.addEventListener('click', () => this._requestItem(this.itemId));\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n override render() {\n return html` <slot></slot> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-item-link': TestItemLink;\n }\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { QtiContext } from '@qti-components/base';
|
|
3
|
+
import type { ComputedContext } from '@qti-components/base';
|
|
4
|
+
import type { PropertyValues } from 'lit';
|
|
5
|
+
import type { ConfigContext } from '@qti-components/base';
|
|
6
|
+
import type { SessionContext } from '@qti-components/base';
|
|
7
|
+
import type { TestContext } from '@qti-components/base';
|
|
8
|
+
type CustomEventMap = {
|
|
9
|
+
'test-end-attempt': CustomEvent;
|
|
10
|
+
'test-show-correct-response': CustomEvent<{
|
|
11
|
+
value: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
declare global {
|
|
15
|
+
interface GlobalEventHandlersEventMap extends CustomEventMap {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare class TestNavigation extends LitElement {
|
|
19
|
+
#private;
|
|
20
|
+
identifier: string | undefined;
|
|
21
|
+
initContext: {
|
|
22
|
+
identifier: string;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}[];
|
|
25
|
+
qtiContext: QtiContext;
|
|
26
|
+
configContext: ConfigContext;
|
|
27
|
+
protected _testContext?: TestContext;
|
|
28
|
+
protected _sessionContext?: SessionContext;
|
|
29
|
+
protected computedContext: ComputedContext;
|
|
30
|
+
autoScoreItems: boolean;
|
|
31
|
+
constructor();
|
|
32
|
+
render(): import("lit").TemplateResult<1>;
|
|
33
|
+
protected willUpdate(_changedProperties: PropertyValues): void;
|
|
34
|
+
}
|
|
35
|
+
export {};
|