@qti-components/processing 1.4.0 → 1.4.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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { QtiExpression } from '@qti-components/base';
|
|
2
2
|
export class QtiVariable extends QtiExpression {
|
|
3
3
|
getResult() {
|
|
4
|
-
const identifier = this.getAttribute('identifier');
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const identifier = this.getAttribute('identifier') || '';
|
|
5
|
+
// Resolve item-scope first, then test-level outcomes (e.g. when used in an
|
|
6
|
+
// assessmentTest's outcome processing), and tolerate an unknown identifier
|
|
7
|
+
// instead of throwing.
|
|
8
|
+
return (this.resolveVariable(identifier)?.value ?? null);
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=qti-variable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qti-variable.js","sourceRoot":"","sources":["../../../src/components/qti-variable/qti-variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,OAAO,WAAY,SAAQ,aAAgC;IAC/C,SAAS;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"qti-variable.js","sourceRoot":"","sources":["../../../src/components/qti-variable/qti-variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,OAAO,WAAY,SAAQ,aAAgC;IAC/C,SAAS;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACzD,2EAA2E;QAC3E,2EAA2E;QAC3E,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,KAAK,IAAI,IAAI,CAAsB,CAAC;IAChF,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nexport class QtiVariable extends QtiExpression<string | string[]> {\n public override getResult() {\n const identifier = this.getAttribute('identifier') || '';\n // Resolve item-scope first, then test-level outcomes (e.g. when used in an\n // assessmentTest's outcome processing), and tolerate an unknown identifier\n // instead of throwing.\n return (this.resolveVariable(identifier)?.value ?? null) as string | string[];\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qti-components/processing",
|
|
3
3
|
"description": "QTI processing utilities",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"author": "",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@qti-components/base": "^2.
|
|
7
|
+
"@qti-components/base": "^2.2.0",
|
|
8
8
|
"@qti-components/utilities": "^1.3.3"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@lit/context": "^1.1.6",
|
|
12
|
-
"lit": "^3.3.
|
|
12
|
+
"lit": "^3.3.3"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"processing",
|