@citolab/qti-components 7.14.3 → 7.15.1

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 (145) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +4044 -4030
  3. package/custom-elements.json +10478 -26460
  4. package/dist/base.d.ts +8 -0
  5. package/dist/base.js +50 -0
  6. package/dist/{chunks/chunk-DGBI4IU5.js → chunk-2DOYPVF5.js} +252 -136
  7. package/dist/chunk-2DOYPVF5.js.map +1 -0
  8. package/dist/chunk-2ZEJ3RR5.js +89 -0
  9. package/dist/chunk-2ZEJ3RR5.js.map +1 -0
  10. package/dist/{chunks/chunk-E4GR4K26.js → chunk-352OTVTY.js} +1481 -442
  11. package/dist/chunk-352OTVTY.js.map +1 -0
  12. package/dist/{chunks/chunk-C4ELTNV7.js → chunk-C2HQFI2C.js} +857 -3819
  13. package/dist/chunk-C2HQFI2C.js.map +1 -0
  14. package/dist/chunk-DWIRLYDS.js +20 -0
  15. package/dist/chunk-DWIRLYDS.js.map +1 -0
  16. package/dist/{chunks/chunk-H2JE6IVU.js → chunk-EUXUH3YW.js} +1 -1
  17. package/dist/chunk-F44CI35W.js +145 -0
  18. package/dist/chunk-F44CI35W.js.map +1 -0
  19. package/dist/{chunks/chunk-XBPO6E25.js → chunk-INKI27D5.js} +6 -5
  20. package/dist/chunk-INKI27D5.js.map +1 -0
  21. package/dist/chunk-JEUY3MYB.js +2010 -0
  22. package/dist/chunk-JEUY3MYB.js.map +1 -0
  23. package/dist/chunk-O4XIWHTF.js +1139 -0
  24. package/dist/chunk-O4XIWHTF.js.map +1 -0
  25. package/dist/chunk-RI47B4ZT.js +1753 -0
  26. package/dist/chunk-RI47B4ZT.js.map +1 -0
  27. package/dist/{qti-loader/index.js → chunk-VEV4DGPH.js} +6 -6
  28. package/dist/chunk-VEV4DGPH.js.map +1 -0
  29. package/dist/{chunks/chunk-TN75CWLX.js → chunk-W4SQRNWO.js} +97 -2
  30. package/dist/chunk-W4SQRNWO.js.map +1 -0
  31. package/dist/elements.d.ts +1 -0
  32. package/dist/elements.js +42 -0
  33. package/dist/index.d.ts +8 -24
  34. package/dist/index.js +117 -285
  35. package/dist/index.js.map +1 -1
  36. package/dist/interactions.d.ts +1 -0
  37. package/dist/interactions.js +72 -0
  38. package/dist/item.d.ts +1 -0
  39. package/dist/item.js +23 -0
  40. package/dist/loader.d.ts +1 -0
  41. package/dist/loader.js +11 -0
  42. package/dist/processing.d.ts +1 -0
  43. package/dist/processing.js +103 -0
  44. package/dist/qti-components-jsx.d.ts +1475 -2388
  45. package/dist/test.d.ts +1 -0
  46. package/dist/{qti-test/index.js → test.js} +11 -19
  47. package/dist/transformers.d.ts +1 -0
  48. package/dist/{qti-transformers/index.js → transformers.js} +3 -3
  49. package/dist/vscode.html-custom-data.json +469 -631
  50. package/package.json +67 -164
  51. package/dist/chunks/chunk-4OGJBG35.js +0 -8
  52. package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
  53. package/dist/chunks/chunk-AGV5GOTF.js +0 -234
  54. package/dist/chunks/chunk-AGV5GOTF.js.map +0 -1
  55. package/dist/chunks/chunk-BHJSX3Q6.js +0 -8
  56. package/dist/chunks/chunk-BHJSX3Q6.js.map +0 -1
  57. package/dist/chunks/chunk-C4ELTNV7.js.map +0 -1
  58. package/dist/chunks/chunk-C5RLRG3L.js +0 -10
  59. package/dist/chunks/chunk-C5RLRG3L.js.map +0 -1
  60. package/dist/chunks/chunk-CJADUWEC.js +0 -10
  61. package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
  62. package/dist/chunks/chunk-DGBI4IU5.js.map +0 -1
  63. package/dist/chunks/chunk-DVQQ7I6Y.js +0 -8
  64. package/dist/chunks/chunk-DVQQ7I6Y.js.map +0 -1
  65. package/dist/chunks/chunk-E4GR4K26.js.map +0 -1
  66. package/dist/chunks/chunk-ELDMXTUQ.js +0 -31
  67. package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
  68. package/dist/chunks/chunk-GAAFN7QF.js +0 -146
  69. package/dist/chunks/chunk-GAAFN7QF.js.map +0 -1
  70. package/dist/chunks/chunk-H6KHXSIO.js +0 -8
  71. package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
  72. package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
  73. package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
  74. package/dist/chunks/chunk-NJNQOQUU.js +0 -8
  75. package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
  76. package/dist/chunks/chunk-P4QBOVQ2.js +0 -206
  77. package/dist/chunks/chunk-P4QBOVQ2.js.map +0 -1
  78. package/dist/chunks/chunk-SV4K25ZI.js +0 -19
  79. package/dist/chunks/chunk-SV4K25ZI.js.map +0 -1
  80. package/dist/chunks/chunk-TN75CWLX.js.map +0 -1
  81. package/dist/chunks/chunk-XBPO6E25.js.map +0 -1
  82. package/dist/exports/computed-item.context.d.ts +0 -23
  83. package/dist/exports/computed-item.context.js +0 -8
  84. package/dist/exports/computed.context.d.ts +0 -34
  85. package/dist/exports/computed.context.js +0 -8
  86. package/dist/exports/config.context.d.ts +0 -14
  87. package/dist/exports/config.context.js +0 -8
  88. package/dist/exports/expression-result.d.ts +0 -19
  89. package/dist/exports/expression-result.js +0 -1
  90. package/dist/exports/interaction.d.ts +0 -46
  91. package/dist/exports/interaction.interface.d.ts +0 -13
  92. package/dist/exports/interaction.interface.js +0 -1
  93. package/dist/exports/interaction.js +0 -12
  94. package/dist/exports/item.context.d.ts +0 -11
  95. package/dist/exports/item.context.js +0 -8
  96. package/dist/exports/qti-assessment-item.context.d.ts +0 -9
  97. package/dist/exports/qti-assessment-item.context.js +0 -8
  98. package/dist/exports/qti-condition-expression.d.ts +0 -14
  99. package/dist/exports/qti-condition-expression.js +0 -11
  100. package/dist/exports/qti-condition-expression.js.map +0 -1
  101. package/dist/exports/qti-expression.d.ts +0 -23
  102. package/dist/exports/qti-expression.js +0 -10
  103. package/dist/exports/qti-expression.js.map +0 -1
  104. package/dist/exports/qti-test.d.ts +0 -12
  105. package/dist/exports/qti-test.js +0 -1
  106. package/dist/exports/qti-test.js.map +0 -1
  107. package/dist/exports/qti.context.d.ts +0 -14
  108. package/dist/exports/qti.context.js +0 -8
  109. package/dist/exports/qti.context.js.map +0 -1
  110. package/dist/exports/session.context.d.ts +0 -15
  111. package/dist/exports/session.context.js +0 -10
  112. package/dist/exports/session.context.js.map +0 -1
  113. package/dist/exports/test.context.d.ts +0 -16
  114. package/dist/exports/test.context.js +0 -10
  115. package/dist/exports/test.context.js.map +0 -1
  116. package/dist/exports/variables.d.ts +0 -2
  117. package/dist/exports/variables.js +0 -1
  118. package/dist/exports/variables.js.map +0 -1
  119. package/dist/qti-assessment-item-l-mN3teH.d.ts +0 -105
  120. package/dist/qti-components/index.d.ts +0 -1524
  121. package/dist/qti-components/index.js +0 -216
  122. package/dist/qti-components/index.js.map +0 -1
  123. package/dist/qti-item/index.d.ts +0 -114
  124. package/dist/qti-item/index.js +0 -19
  125. package/dist/qti-item/index.js.map +0 -1
  126. package/dist/qti-loader/index.d.ts +0 -21
  127. package/dist/qti-loader/index.js.map +0 -1
  128. package/dist/qti-modal-feedback-Cp3CHVKw.d.ts +0 -30
  129. package/dist/qti-test/index.d.ts +0 -480
  130. package/dist/qti-test/index.js.map +0 -1
  131. package/dist/qti-test-mmY8zNIj.d.ts +0 -120
  132. package/dist/qti-transform-test-Bz9A3hmD.d.ts +0 -63
  133. package/dist/qti-transformers/index.d.ts +0 -18
  134. package/dist/qti-transformers/index.js.map +0 -1
  135. package/dist/variables-BCkyLoXK.d.ts +0 -55
  136. package/readme.md +0 -59
  137. /package/dist/{chunks/chunk-H2JE6IVU.js.map → base.js.map} +0 -0
  138. /package/dist/{exports/computed-item.context.js.map → chunk-EUXUH3YW.js.map} +0 -0
  139. /package/dist/{exports/computed.context.js.map → elements.js.map} +0 -0
  140. /package/dist/{exports/config.context.js.map → interactions.js.map} +0 -0
  141. /package/dist/{exports/expression-result.js.map → item.js.map} +0 -0
  142. /package/dist/{exports/interaction.interface.js.map → loader.js.map} +0 -0
  143. /package/dist/{exports/interaction.js.map → processing.js.map} +0 -0
  144. /package/dist/{exports/item.context.js.map → test.js.map} +0 -0
  145. /package/dist/{exports/qti-assessment-item.context.js.map → transformers.js.map} +0 -0
@@ -1,146 +0,0 @@
1
- import {
2
- qtiContext
3
- } from "./chunk-H6KHXSIO.js";
4
- import {
5
- itemContext
6
- } from "./chunk-NJNQOQUU.js";
7
- import {
8
- __decorateClass
9
- } from "./chunk-H2JE6IVU.js";
10
-
11
- // src/lib/exports/qti-expression.ts
12
- import { consume } from "@lit/context";
13
- import { css, html, LitElement } from "lit";
14
- import { state } from "lit/decorators.js";
15
- var QtiExpression = class extends LitElement {
16
- constructor() {
17
- super(...arguments);
18
- this.getVariables = () => (
19
- // FIXME: if this itself is multiple, this will never enter the qti-multiple switch
20
- // See this example here: https://github.com/1EdTech/qti-examples/blob/master/qtiv3-examples/packaging/items/Example05-feedbackBlock-adaptive.xml
21
- Array.from(this.children).map((e) => {
22
- console.debug("getVariables", e.tagName.toLowerCase());
23
- switch (e.tagName.toLowerCase()) {
24
- case "qti-base-value": {
25
- return {
26
- baseType: e.getAttribute("base-type"),
27
- value: e.textContent.trim(),
28
- cardinality: "single"
29
- };
30
- }
31
- case "qti-variable": {
32
- const identifier = e.getAttribute("identifier") || "";
33
- if (identifier === "QTI_CONTEXT") {
34
- if (!this.qtiContext?.QTI_CONTEXT) {
35
- console.warn("QTI_CONTEXT not available");
36
- return {
37
- identifier: "QTI_CONTEXT",
38
- baseType: "record",
39
- value: this.qtiContext.QTI_CONTEXT,
40
- cardinality: "record",
41
- type: "context"
42
- };
43
- }
44
- return {
45
- identifier: "QTI_CONTEXT",
46
- baseType: "record",
47
- value: this.qtiContext.QTI_CONTEXT,
48
- cardinality: "record",
49
- type: "context"
50
- };
51
- }
52
- const variable = this.context.variables.find((v) => v.identifier === identifier) || null;
53
- return variable;
54
- }
55
- case "qti-multiple": {
56
- const multiple = e;
57
- const values = multiple.getResult();
58
- console.debug("values", values);
59
- if (values?.length > 0) {
60
- return {
61
- identifier: "",
62
- baseType: values[0].baseType,
63
- value: values.map((v) => v.value),
64
- cardinality: "multiple",
65
- type: "response"
66
- };
67
- }
68
- return null;
69
- }
70
- case "qti-ordered": {
71
- const multiple = e;
72
- const values = multiple.getResult();
73
- if (values?.length > 0) {
74
- return {
75
- identifier: "",
76
- baseType: values[0].baseType,
77
- value: values.map((v) => v.value),
78
- cardinality: "ordered",
79
- type: "response"
80
- };
81
- }
82
- return null;
83
- }
84
- case "qti-correct": {
85
- const identifier = e.getAttribute("identifier") || "";
86
- const responseVariable = this.context.variables.find((v) => v.identifier === identifier) || null;
87
- return {
88
- baseType: responseVariable.baseType,
89
- value: responseVariable.correctResponse,
90
- cardinality: responseVariable.cardinality
91
- };
92
- }
93
- default: {
94
- try {
95
- const expression = e;
96
- const value = expression.getResult();
97
- return {
98
- baseType: "integer",
99
- value: value?.toString() || null,
100
- cardinality: "single"
101
- };
102
- } catch (error) {
103
- console.warn("default not sufficient");
104
- }
105
- return null;
106
- }
107
- }
108
- }).filter((v) => v !== null)
109
- );
110
- }
111
- static {
112
- // hide the slot with css
113
- this.styles = css`
114
- slot {
115
- display: none;
116
- }
117
- `;
118
- }
119
- render() {
120
- return html`<pre>${JSON.stringify(this.result, null, 2)}</pre>
121
- <slot></slot>`;
122
- }
123
- calculate() {
124
- this.result = this.getResult();
125
- return this.result;
126
- }
127
- getResult() {
128
- throw new Error("Not implemented");
129
- }
130
- };
131
- __decorateClass([
132
- state()
133
- ], QtiExpression.prototype, "result", 2);
134
- __decorateClass([
135
- consume({ context: itemContext, subscribe: true }),
136
- state()
137
- ], QtiExpression.prototype, "context", 2);
138
- __decorateClass([
139
- consume({ context: qtiContext, subscribe: true }),
140
- state()
141
- ], QtiExpression.prototype, "qtiContext", 2);
142
-
143
- export {
144
- QtiExpression
145
- };
146
- //# sourceMappingURL=chunk-GAAFN7QF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/qti-expression.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { css, html, LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\n\nimport { itemContext } from './qti-assessment-item.context';\nimport { qtiContext } from './qti.context';\n\nimport type { QtiContext, QtiContextType } from './qti.context';\nimport type { ResponseVariable, VariableDeclaration } from './variables';\nimport type { ItemContext } from './item.context';\n\nexport interface QtiExpressionBase<T> {\n // get assessmentItem(): QtiAssessmentItem;\n\n // getVariables(): VariableDeclaration<number | string | (number | string)[] | null>[];\n calculate(): Readonly<T>;\n}\n\nexport abstract class QtiExpression<T> extends LitElement implements QtiExpressionBase<T> {\n @state()\n protected result: any;\n\n // hide the slot with css\n static styles = css`\n slot {\n display: none;\n }\n `;\n\n override render() {\n return html`<pre>${JSON.stringify(this.result, null, 2)}</pre>\n <slot></slot>`;\n }\n\n public calculate(): Readonly<T> {\n this.result = this.getResult();\n return this.result;\n }\n\n protected getResult(): Readonly<T> {\n throw new Error('Not implemented');\n }\n\n @consume({ context: itemContext, subscribe: true })\n @state()\n protected context?: ItemContext;\n\n @consume({ context: qtiContext, subscribe: true })\n @state()\n protected qtiContext?: QtiContext;\n\n getVariables = (): (ResponseVariable | VariableDeclaration<QtiContextType>)[] =>\n // FIXME: if this itself is multiple, this will never enter the qti-multiple switch\n // See this example here: https://github.com/1EdTech/qti-examples/blob/master/qtiv3-examples/packaging/items/Example05-feedbackBlock-adaptive.xml\n\n Array.from(this.children)\n .map((e: Element) => {\n console.debug('getVariables', e.tagName.toLowerCase());\n switch (e.tagName.toLowerCase()) {\n case 'qti-base-value': {\n return {\n baseType: e.getAttribute('base-type'),\n value: e.textContent.trim(),\n cardinality: 'single'\n } as ResponseVariable;\n }\n case 'qti-variable': {\n const identifier = e.getAttribute('identifier') || '';\n\n // Special handling for QTI_CONTEXT\n if (identifier === 'QTI_CONTEXT') {\n if (!this.qtiContext?.QTI_CONTEXT) {\n console.warn('QTI_CONTEXT not available');\n return {\n identifier: 'QTI_CONTEXT',\n baseType: 'record',\n value: this.qtiContext.QTI_CONTEXT,\n cardinality: 'record',\n type: 'context'\n } as VariableDeclaration<QtiContextType>;\n }\n return {\n identifier: 'QTI_CONTEXT',\n baseType: 'record',\n value: this.qtiContext.QTI_CONTEXT,\n cardinality: 'record',\n type: 'context'\n } as VariableDeclaration<QtiContextType>;\n }\n\n const variable = this.context.variables.find(v => v.identifier === identifier) || null;\n return variable;\n }\n case 'qti-multiple': {\n const multiple = e as QtiExpression<ResponseVariable[]>;\n\n const values = multiple.getResult();\n console.debug('values', values);\n if (values?.length > 0) {\n return {\n identifier: '',\n baseType: values[0].baseType,\n value: values.map(v => v.value),\n cardinality: 'multiple',\n type: 'response'\n } as ResponseVariable;\n }\n return null;\n }\n case 'qti-ordered': {\n const multiple = e as QtiExpression<ResponseVariable[]>;\n const values = multiple.getResult();\n if (values?.length > 0) {\n return {\n identifier: '',\n baseType: values[0].baseType,\n value: values.map(v => v.value),\n cardinality: 'ordered',\n type: 'response'\n } as ResponseVariable;\n }\n return null;\n }\n case 'qti-correct': {\n const identifier = e.getAttribute('identifier') || '';\n const responseVariable: ResponseVariable =\n this.context.variables.find(v => v.identifier === identifier) || null;\n return {\n baseType: responseVariable.baseType,\n value: responseVariable.correctResponse,\n cardinality: responseVariable.cardinality\n } as ResponseVariable;\n }\n default: {\n // added for use of qti-equal-rounded\n try {\n const expression = e as QtiExpression<number>;\n const value = expression.getResult();\n return {\n baseType: 'integer',\n value: value?.toString() || null,\n cardinality: 'single'\n } as ResponseVariable;\n } catch (error) {\n console.warn('default not sufficient');\n }\n return null;\n }\n }\n })\n .filter(v => v !== null);\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,aAAa;AAgBf,IAAe,gBAAf,cAAwC,WAA2C;AAAA,EAAnF;AAAA;AAiCL,wBAAe;AAAA;AAAA;A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T,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,EACjD,MAAM;AAAA,GA1Ba,cA2BV;AAIA;AAAA,EAFT,QAAQ,EAAE,SAAS,YAAY,WAAW,KAAK,CAAC;AAAA,EAChD,MAAM;AAAA,GA9Ba,cA+BV;","names":[]}
@@ -1,8 +0,0 @@
1
- // src/lib/exports/qti.context.ts
2
- import { createContext } from "@lit/context";
3
- var qtiContext = createContext(Symbol("qtiContext"));
4
-
5
- export {
6
- qtiContext
7
- };
8
- //# sourceMappingURL=chunk-H6KHXSIO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/qti.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nexport type QtiContextType = {\n testIdentifier: string;\n candidateIdentifier: string;\n environmentIdentifier: string;\n [key: string]: string | string[]; // Allow for additional context variables\n};\n\nexport interface QtiContext {\n QTI_CONTEXT: QtiContextType;\n}\n\nexport const qtiContext = createContext<Readonly<QtiContext>>(Symbol('qtiContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAavB,IAAM,aAAa,cAAoC,OAAO,YAAY,CAAC;","names":[]}
@@ -1,22 +0,0 @@
1
- // src/lib/exports/item.context.ts
2
- var itemContextVariables = [
3
- {
4
- identifier: "completionStatus",
5
- cardinality: "single",
6
- baseType: "string",
7
- value: "unknown",
8
- type: "outcome"
9
- },
10
- {
11
- identifier: "numAttempts",
12
- cardinality: "single",
13
- baseType: "integer",
14
- value: "0",
15
- type: "response"
16
- }
17
- ];
18
-
19
- export {
20
- itemContextVariables
21
- };
22
- //# sourceMappingURL=chunk-JQ6HWGRY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/item.context.ts"],"sourcesContent":["import type { VariableDeclaration } from './variables';\n\nexport interface ItemContext {\n identifier?: string;\n href?: string;\n variables?: ReadonlyArray<VariableDeclaration<string | string[] | null>>;\n}\n\nexport const itemContextVariables = [\n {\n identifier: 'completionStatus',\n cardinality: 'single',\n baseType: 'string',\n value: 'unknown',\n type: 'outcome'\n },\n {\n identifier: 'numAttempts',\n cardinality: 'single',\n baseType: 'integer',\n value: '0',\n type: 'response'\n }\n] as VariableDeclaration<string | string[]>[];\n"],"mappings":";AAQO,IAAM,uBAAuB;AAAA,EAClC;AAAA,IACE,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;","names":[]}
@@ -1,8 +0,0 @@
1
- // src/lib/exports/qti-assessment-item.context.ts
2
- import { createContext } from "@lit/context";
3
- var itemContext = createContext(Symbol("item"));
4
-
5
- export {
6
- itemContext
7
- };
8
- //# sourceMappingURL=chunk-NJNQOQUU.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/qti-assessment-item.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nimport type { ItemContext } from './item.context';\n\nexport const itemContext = createContext<ItemContext>(Symbol('item'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAIvB,IAAM,cAAc,cAA2B,OAAO,MAAM,CAAC;","names":[]}
@@ -1,206 +0,0 @@
1
- import {
2
- itemContext
3
- } from "./chunk-NJNQOQUU.js";
4
- import {
5
- configContext
6
- } from "./chunk-BHJSX3Q6.js";
7
- import {
8
- __decorateClass
9
- } from "./chunk-H2JE6IVU.js";
10
-
11
- // src/lib/exports/interaction.ts
12
- import { property, state } from "lit/decorators.js";
13
- import { LitElement } from "lit";
14
- import { consume } from "@lit/context";
15
- var Correctness = /* @__PURE__ */ ((Correctness2) => {
16
- Correctness2["Correct"] = "correct";
17
- Correctness2["PartiallyCorrect"] = "partially-correct";
18
- Correctness2["Incorrect"] = "incorrect";
19
- return Correctness2;
20
- })(Correctness || {});
21
- var Interaction = class extends LitElement {
22
- constructor() {
23
- super();
24
- this.disabled = false;
25
- this.readonly = false;
26
- this._internals = this.attachInternals();
27
- }
28
- static {
29
- this.formAssociated = true;
30
- }
31
- get internals() {
32
- return this._internals;
33
- }
34
- get isFullCorrectResponse() {
35
- return this._isFullCorrectResponse;
36
- }
37
- set isFullCorrectResponse(val) {
38
- this._isFullCorrectResponse = val;
39
- if (val) {
40
- this.disabled = true;
41
- this.setAttribute("response-identifier", this.responseIdentifier + "_cr");
42
- }
43
- }
44
- get correctResponse() {
45
- return this._correctResponse;
46
- }
47
- set correctResponse(val) {
48
- this._correctResponse = val;
49
- }
50
- get correctness() {
51
- const responseVariable = this.responseVariable;
52
- if (!responseVariable || responseVariable.correctResponse === null) return null;
53
- return responseVariable.correctResponse === responseVariable.value ? "correct" /* Correct */ : "incorrect" /* Incorrect */;
54
- }
55
- get isInline() {
56
- return false;
57
- }
58
- get responseVariable() {
59
- const responseVariables = this._context.variables.filter((v) => v.type === "response");
60
- const responseIdentifier = this.getAttribute("response-identifier");
61
- return responseVariables.find((v) => v.identifier === responseIdentifier);
62
- }
63
- toggleCorrectResponse(show) {
64
- const correctResponseMode = this?.configContext?.correctResponseMode || "internal";
65
- if (correctResponseMode === "full") {
66
- this.toggleFullCorrectResponse(show);
67
- } else {
68
- this.toggleInternalCorrectResponse(show);
69
- }
70
- }
71
- async toggleFullCorrectResponse(show) {
72
- const nextSibling = this.nextSibling;
73
- const nextSiblingIsFullCorrectResponse = nextSibling instanceof HTMLDivElement && nextSibling?.classList.contains("full-correct-response");
74
- const responseVariable = this.responseVariable;
75
- if (!responseVariable) {
76
- return;
77
- }
78
- const showFullCorrectResponse = show && (this?.configContext?.fullCorrectResponseOnlyWhenIncorrect === false || this.correctness !== "correct" /* Correct */);
79
- if (!showFullCorrectResponse) {
80
- if (!nextSiblingIsFullCorrectResponse) {
81
- return;
82
- }
83
- this.parentElement?.removeChild(nextSibling);
84
- }
85
- if (nextSiblingIsFullCorrectResponse) {
86
- return;
87
- }
88
- const clone = this.cloneNode(true);
89
- const containerDiv = document.createElement("div");
90
- containerDiv.classList.add("full-correct-response");
91
- if (this.isInline) {
92
- containerDiv.classList.add("full-correct-response-inline");
93
- } else {
94
- containerDiv.classList.add("full-correct-response-block");
95
- }
96
- containerDiv.role = "full-correct-response";
97
- containerDiv.appendChild(clone);
98
- clone.isFullCorrectResponse = true;
99
- this.parentElement?.insertBefore(containerDiv, this.nextSibling);
100
- await clone.updateComplete;
101
- clone.response = Array.isArray(responseVariable.correctResponse) ? [...responseVariable.correctResponse] : responseVariable.correctResponse;
102
- }
103
- toggleInternalCorrectResponse(show) {
104
- const responseVariable = this.responseVariable;
105
- this.correctResponse = show ? responseVariable?.correctResponse : responseVariable?.cardinality === "single" ? "" : [];
106
- }
107
- toggleCandidateCorrection(show) {
108
- const responseVariable = this.responseVariable;
109
- if (!responseVariable) return;
110
- this._internals.states.delete("candidate-correct");
111
- this._internals.states.delete("candidate-partially-correct");
112
- this._internals.states.delete("candidate-incorrect");
113
- if (!show) {
114
- return;
115
- }
116
- if (this.correctness === "correct" /* Correct */) {
117
- this._internals.states.add("candidate-correct");
118
- }
119
- if (this.correctness === "partially-correct" /* PartiallyCorrect */) {
120
- this._internals.states.add("candidate-partially-correct");
121
- }
122
- if (this.correctness === "incorrect" /* Incorrect */) {
123
- this._internals.states.add("candidate-incorrect");
124
- }
125
- }
126
- get value() {
127
- return JSON.stringify(this.response);
128
- }
129
- set value(val) {
130
- this.response = val ? JSON.parse(val) : null;
131
- }
132
- reportValidity() {
133
- return this._internals.reportValidity();
134
- }
135
- reset() {
136
- this.response = null;
137
- }
138
- // attributeChangedCallback(name: string, _old: string | null, value: string | null): void {
139
- // super.attributeChangedCallback(name, _old, value);
140
- // // changing attributes in lit is not a thing, they are defined in the QTI XML and will never change
141
- // // except in storybook where we can change the value of the attribute
142
- // // this can make the internal state out of sync with the attribute
143
- // // so we reset the value to null to force the internal state to be reset
144
- // const attributeNamesToExclude = ['style', 'class'];
145
- // if (!attributeNamesToExclude.includes(name)) {
146
- // this.reset();
147
- // }
148
- // }
149
- connectedCallback() {
150
- super.connectedCallback();
151
- if (this.isFullCorrectResponse) {
152
- return;
153
- }
154
- this.dispatchEvent(
155
- new CustomEvent("qti-register-interaction", {
156
- bubbles: true,
157
- composed: true,
158
- cancelable: false,
159
- detail: {
160
- interactionElement: this,
161
- responseIdentifier: this.responseIdentifier
162
- }
163
- })
164
- );
165
- }
166
- saveResponse(value) {
167
- this.dispatchEvent(
168
- new CustomEvent("qti-interaction-response", {
169
- bubbles: true,
170
- composed: true,
171
- cancelable: false,
172
- detail: {
173
- responseIdentifier: this.responseIdentifier,
174
- response: Array.isArray(value) ? [...value] : value
175
- }
176
- })
177
- );
178
- }
179
- };
180
- __decorateClass([
181
- consume({ context: itemContext, subscribe: true })
182
- ], Interaction.prototype, "_context", 2);
183
- __decorateClass([
184
- consume({ context: configContext, subscribe: true })
185
- ], Interaction.prototype, "configContext", 2);
186
- __decorateClass([
187
- property({ type: String, attribute: "response-identifier" })
188
- ], Interaction.prototype, "responseIdentifier", 2);
189
- __decorateClass([
190
- property({ reflect: true, type: Boolean })
191
- ], Interaction.prototype, "disabled", 2);
192
- __decorateClass([
193
- property({ reflect: true, type: Boolean })
194
- ], Interaction.prototype, "readonly", 2);
195
- __decorateClass([
196
- state()
197
- ], Interaction.prototype, "_isFullCorrectResponse", 2);
198
- __decorateClass([
199
- state()
200
- ], Interaction.prototype, "_correctResponse", 2);
201
-
202
- export {
203
- Correctness,
204
- Interaction
205
- };
206
- //# sourceMappingURL=chunk-P4QBOVQ2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/interaction.ts"],"sourcesContent":["import { property, state } from 'lit/decorators.js';\nimport { LitElement } from 'lit';\nimport { consume } from '@lit/context';\n\nimport { configContext } from './config.context.ts';\nimport { itemContext } from './qti-assessment-item.context.ts';\n\nimport type { ConfigContext } from './config.context.ts';\nimport type { ResponseVariable } from './variables';\nimport type { IInteraction } from './interaction.interface';\nimport type { ItemContext } from './item.context.ts';\n\nexport enum Correctness {\n Correct = 'correct',\n PartiallyCorrect = 'partially-correct',\n Incorrect = 'incorrect'\n}\n\nexport abstract class Interaction extends LitElement implements IInteraction {\n @consume({ context: itemContext, subscribe: true })\n private _context: ItemContext;\n\n @consume({ context: configContext, subscribe: true })\n protected configContext: ConfigContext;\n\n static formAssociated = true;\n protected _internals: ElementInternals;\n\n get internals(): ElementInternals {\n return this._internals;\n }\n\n @property({ type: String, attribute: 'response-identifier' }) responseIdentifier;\n\n @property({ reflect: true, type: Boolean }) disabled = false;\n\n @property({ reflect: true, type: Boolean }) readonly = false;\n\n @state()\n protected _isFullCorrectResponse: boolean;\n\n get isFullCorrectResponse(): Readonly<boolean> {\n return this._isFullCorrectResponse;\n }\n\n set isFullCorrectResponse(val: Readonly<boolean>) {\n this._isFullCorrectResponse = val as boolean;\n if (val) {\n this.disabled = true;\n this.setAttribute('response-identifier', this.responseIdentifier + '_cr');\n }\n }\n\n /* PK: Correct response */\n @state()\n protected _correctResponse: string | string[];\n\n get correctResponse(): Readonly<string | string[]> {\n return this._correctResponse;\n }\n\n set correctResponse(val: Readonly<string | string[]>) {\n this._correctResponse = val as string | string[];\n }\n\n get correctness(): Readonly<Correctness | null> {\n const responseVariable = this.responseVariable;\n if (!responseVariable || responseVariable.correctResponse === null) return null;\n\n return responseVariable.correctResponse === responseVariable.value ? Correctness.Correct : Correctness.Incorrect;\n }\n\n get isInline(): boolean {\n return false;\n }\n\n get responseVariable(): ResponseVariable | undefined {\n // Get all response variables\n const responseVariables = this._context.variables.filter(v => v.type === 'response') as ResponseVariable[];\n\n // Get the response identifier for this interaction\n const responseIdentifier = this.getAttribute('response-identifier');\n\n // Return the matching response variable for this interaction\n return responseVariables.find(v => v.identifier === responseIdentifier);\n }\n\n public toggleCorrectResponse(show: boolean): void {\n const correctResponseMode = this?.configContext?.correctResponseMode || 'internal';\n\n if (correctResponseMode === 'full') {\n this.toggleFullCorrectResponse(show);\n } else {\n this.toggleInternalCorrectResponse(show);\n }\n }\n\n protected async toggleFullCorrectResponse(show: boolean): Promise<void> {\n const nextSibling = this.nextSibling;\n const nextSiblingIsFullCorrectResponse =\n nextSibling instanceof HTMLDivElement && nextSibling?.classList.contains('full-correct-response');\n const responseVariable = this.responseVariable;\n\n if (!responseVariable) {\n return;\n }\n\n const showFullCorrectResponse = show && (this?.configContext?.fullCorrectResponseOnlyWhenIncorrect === false || this.correctness !== Correctness.Correct)\n\n if (!showFullCorrectResponse) {\n if (!nextSiblingIsFullCorrectResponse) {\n return;\n }\n // Remove cloned interaction\n this.parentElement?.removeChild(nextSibling);\n }\n\n if (nextSiblingIsFullCorrectResponse) {\n return; // Already exists\n }\n\n\n // Add a clone of interaction with the correct response\n const clone = this.cloneNode(true) as Interaction;\n\n const containerDiv = document.createElement('div');\n containerDiv.classList.add('full-correct-response');\n if (this.isInline) {\n containerDiv.classList.add('full-correct-response-inline');\n } else {\n containerDiv.classList.add('full-correct-response-block');\n }\n containerDiv.role = 'full-correct-response';\n containerDiv.appendChild(clone);\n\n clone.isFullCorrectResponse = true;\n\n this.parentElement?.insertBefore(containerDiv, this.nextSibling);\n await clone.updateComplete;\n\n clone.response = Array.isArray(responseVariable.correctResponse)\n ? ([...responseVariable.correctResponse] as string[])\n : (responseVariable.correctResponse as string);\n }\n\n protected toggleInternalCorrectResponse(show: boolean): void {\n const responseVariable = this.responseVariable;\n\n this.correctResponse = show\n ? responseVariable?.correctResponse\n : responseVariable?.cardinality === 'single'\n ? ''\n : [];\n }\n\n public toggleCandidateCorrection(show: boolean): void {\n const responseVariable = this.responseVariable;\n if (!responseVariable) return;\n\n this._internals.states.delete('candidate-correct');\n this._internals.states.delete('candidate-partially-correct');\n this._internals.states.delete('candidate-incorrect');\n\n if (!show) {\n return;\n }\n\n if (this.correctness === Correctness.Correct) {\n this._internals.states.add('candidate-correct');\n }\n if (this.correctness === Correctness.PartiallyCorrect) {\n this._internals.states.add('candidate-partially-correct');\n }\n if (this.correctness === Correctness.Incorrect) {\n this._internals.states.add('candidate-incorrect');\n }\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n abstract validate(): boolean;\n\n get value(): string | null {\n return JSON.stringify(this.response);\n }\n\n set value(val: string | null) {\n this.response = val ? JSON.parse(val) : null;\n }\n\n abstract get response(): string | string[] | null;\n abstract set response(val: string | string[] | null);\n\n public reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n public reset(): void {\n this.response = null;\n }\n\n // attributeChangedCallback(name: string, _old: string | null, value: string | null): void {\n // super.attributeChangedCallback(name, _old, value);\n // // changing attributes in lit is not a thing, they are defined in the QTI XML and will never change\n // // except in storybook where we can change the value of the attribute\n // // this can make the internal state out of sync with the attribute\n // // so we reset the value to null to force the internal state to be reset\n // const attributeNamesToExclude = ['style', 'class'];\n // if (!attributeNamesToExclude.includes(name)) {\n // this.reset();\n // }\n // }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n\n if (this.isFullCorrectResponse) {\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('qti-register-interaction', {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: {\n interactionElement: this,\n responseIdentifier: this.responseIdentifier\n }\n })\n );\n }\n\n public saveResponse(value: string | string[]): void {\n this.dispatchEvent(\n new CustomEvent('qti-interaction-response', {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: {\n responseIdentifier: this.responseIdentifier,\n response: Array.isArray(value) ? [...value] : value\n }\n })\n );\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,UAAU,aAAa;AAChC,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAUjB,IAAK,cAAL,kBAAKA,iBAAL;AACL,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,sBAAmB;AACnB,EAAAA,aAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AAML,IAAe,cAAf,cAAmC,WAAmC;AAAA,EAgK3E,cAAc;AACZ,UAAM;AAjJoC,oBAAW;AAEX,oBAAW;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K,CAAC;AAAA,GAJhC,YAKV;AASoD;AAAA,EAA7D,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GAdxC,YAc0C;AAElB;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GAhBtB,YAgBwB;AAEA;AAAA,EAA3C,SAAS,EAAE,SAAS,MAAM,MAAM,QAAQ,CAAC;AAAA,GAlBtB,YAkBwB;AAGlC;AAAA,EADT,MAAM;AAAA,GApBa,YAqBV;AAgBA;AAAA,EADT,MAAM;AAAA,GApCa,YAqCV;","names":["Correctness"]}
@@ -1,19 +0,0 @@
1
- import {
2
- QtiExpression
3
- } from "./chunk-GAAFN7QF.js";
4
-
5
- // src/lib/exports/qti-condition-expression.ts
6
- var QtiConditionExpression = class extends QtiExpression {
7
- calculate() {
8
- this.result = this.getResult();
9
- return this.result;
10
- }
11
- getResult() {
12
- throw new Error("Not implemented");
13
- }
14
- };
15
-
16
- export {
17
- QtiConditionExpression
18
- };
19
- //# sourceMappingURL=chunk-SV4K25ZI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/qti-condition-expression.ts"],"sourcesContent":["import { QtiExpression } from './qti-expression';\n\nexport abstract class QtiConditionExpression extends QtiExpression<boolean> {\n public calculate(): Readonly<boolean> {\n this.result = this.getResult();\n return this.result;\n }\n\n public getResult(): Readonly<boolean> {\n throw new Error('Not implemented');\n }\n}\n"],"mappings":";;;;;AAEO,IAAe,yBAAf,cAA8C,cAAuB;AAAA,EACnE,YAA+B;AACpC,SAAK,SAAS,KAAK,UAAU;AAC7B,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,YAA+B;AACpC,UAAM,IAAI,MAAM,iBAAiB;AAAA,EACnC;AACF;","names":[]}