@qti-components/processing 1.6.1-next.1 → 1.6.1-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,10 @@ export class QtiCorrect extends QtiExpression {
14
14
  getResult() {
15
15
  const identifier = this.getAttribute('identifier') || '';
16
16
  const responseVariable = this.context.variables.find(v => v.identifier === identifier) || null;
17
+ if (responseVariable.cardinality === 'record') {
18
+ // A record's correct response is its field map; there is no first value to take.
19
+ return responseVariable.correctResponse ?? null;
20
+ }
17
21
  if (responseVariable.cardinality !== 'single') {
18
22
  return responseVariable.correctResponse.length > 0 ? responseVariable.correctResponse[0] : '';
19
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"qti-correct.js","sourceRoot":"","sources":["../../../src/components/qti-correct/qti-correct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,aAAgC;IAC9D,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACnD,CAAC;IAEQ,SAAS;QAChB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACzD,MAAM,gBAAgB,GAAqB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,IAAI,IAAI,CAAC;QACjH,IAAI,gBAAgB,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YAC9C,OAAO,gBAAgB,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChG,CAAC;aAAM,CAAC;YACN,OAAO,gBAAgB,CAAC,eAAe,CAAC;QAC1C,CAAC;IACH,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n/**\n * @summary The qti-correct operator retrieves the defined correct response for a variable.\n * @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#correct\n *\n * Looks up the declaration for the identified response variable.\n * Returns the associated correctResponse value(s).\n * Special cases: Returns NULL if no correct response was declared.\n */\nexport class QtiCorrect extends QtiExpression<string | string[]> {\n get interpretation() {\n return this.getAttribute('interpretation') || '';\n }\n\n override getResult() {\n const identifier = this.getAttribute('identifier') || '';\n const responseVariable: ResponseVariable = this.context.variables.find(v => v.identifier === identifier) || null;\n if (responseVariable.cardinality !== 'single') {\n return responseVariable.correctResponse.length > 0 ? responseVariable.correctResponse[0] : '';\n } else {\n return responseVariable.correctResponse;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"qti-correct.js","sourceRoot":"","sources":["../../../src/components/qti-correct/qti-correct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,aAAgC;IAC9D,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACnD,CAAC;IAEQ,SAAS;QAChB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACzD,MAAM,gBAAgB,GAAqB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,IAAI,IAAI,CAAC;QACjH,IAAI,gBAAgB,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YAC9C,iFAAiF;YACjF,OAAO,gBAAgB,CAAC,eAAe,IAAI,IAAI,CAAC;QAClD,CAAC;QACD,IAAI,gBAAgB,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YAC9C,OAAO,gBAAgB,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChG,CAAC;aAAM,CAAC;YACN,OAAO,gBAAgB,CAAC,eAAe,CAAC;QAC1C,CAAC;IACH,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n/**\n * @summary The qti-correct operator retrieves the defined correct response for a variable.\n * @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#correct\n *\n * Looks up the declaration for the identified response variable.\n * Returns the associated correctResponse value(s).\n * Special cases: Returns NULL if no correct response was declared.\n */\nexport class QtiCorrect extends QtiExpression<string | string[]> {\n get interpretation() {\n return this.getAttribute('interpretation') || '';\n }\n\n override getResult() {\n const identifier = this.getAttribute('identifier') || '';\n const responseVariable: ResponseVariable = this.context.variables.find(v => v.identifier === identifier) || null;\n if (responseVariable.cardinality === 'record') {\n // A record's correct response is its field map; there is no first value to take.\n return responseVariable.correctResponse ?? null;\n }\n if (responseVariable.cardinality !== 'single') {\n return responseVariable.correctResponse.length > 0 ? responseVariable.correctResponse[0] : '';\n } else {\n return responseVariable.correctResponse;\n }\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { QtiExpression } from '@qti-components/base';
2
+ import type { BaseType } from '@qti-components/base';
2
3
  /**
3
4
  * @summary The qti-field-value operator retrieves a specific field from a record.
4
5
  * @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#fieldValue
@@ -8,6 +9,13 @@ import { QtiExpression } from '@qti-components/base';
8
9
  * Special cases: Returns NULL if sub-expression is NULL or field does not exist.
9
10
  */
10
11
  export declare class QtiFieldValue extends QtiExpression<string | string[] | null> {
12
+ #private;
13
+ /**
14
+ * The base type of the field last read: as declared on the record's correct response when it
15
+ * is, otherwise read off the value. The value alone is a string like `"4.1"` or `"455 250"`, and
16
+ * an operator reading it as text would refuse to compare it as a number or test it as a point.
17
+ */
18
+ get resultBaseType(): BaseType | undefined;
11
19
  /**
12
20
  * Every failure here is NULL rather than a thrown error. `qti-is-null` over a
13
21
  * `qti-field-value` is the specified way to ask whether a record carries a
@@ -1,4 +1,4 @@
1
- import { QtiExpression } from '@qti-components/base';
1
+ import { inferRecordFieldBaseType, isRecordValue, QtiExpression } from '@qti-components/base';
2
2
  /**
3
3
  * @summary The qti-field-value operator retrieves a specific field from a record.
4
4
  * @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#fieldValue
@@ -8,6 +8,15 @@ import { QtiExpression } from '@qti-components/base';
8
8
  * Special cases: Returns NULL if sub-expression is NULL or field does not exist.
9
9
  */
10
10
  export class QtiFieldValue extends QtiExpression {
11
+ #fieldBaseType;
12
+ /**
13
+ * The base type of the field last read: as declared on the record's correct response when it
14
+ * is, otherwise read off the value. The value alone is a string like `"4.1"` or `"455 250"`, and
15
+ * an operator reading it as text would refuse to compare it as a number or test it as a point.
16
+ */
17
+ get resultBaseType() {
18
+ return this.#fieldBaseType;
19
+ }
11
20
  /**
12
21
  * Every failure here is NULL rather than a thrown error. `qti-is-null` over a
13
22
  * `qti-field-value` is the specified way to ask whether a record carries a
@@ -15,6 +24,7 @@ export class QtiFieldValue extends QtiExpression {
15
24
  * aborted the whole response processing run instead.
16
25
  */
17
26
  getResult() {
27
+ this.#fieldBaseType = undefined;
18
28
  const fieldIdentifier = this.getAttribute('field-identifier');
19
29
  if (!fieldIdentifier) {
20
30
  console.error('qti-field-value requires a field-identifier attribute');
@@ -25,13 +35,22 @@ export class QtiFieldValue extends QtiExpression {
25
35
  return null;
26
36
  }
27
37
  const variable = this.getVariables()[0];
28
- // Check if the result is a record/object
29
- if (!variable || variable.baseType !== 'record' || variable.value === null || variable.value === undefined) {
38
+ // A record is declared with cardinality="record" and no base-type; QTI_CONTEXT says both.
39
+ const isRecord = variable?.cardinality === 'record' || variable?.baseType === 'record';
40
+ // A record without a response yet: every field is NULL (not a mistake in the item).
41
+ if (isRecord && (variable.value === null || variable.value === undefined))
42
+ return null;
43
+ if (!variable || !isRecord || !isRecordValue(variable.value)) {
30
44
  console.warn('qti-field-value child expression must return a record');
31
45
  return null;
32
46
  }
33
47
  const fieldValue = variable.value[fieldIdentifier];
34
- return fieldValue === undefined ? null : fieldValue;
48
+ if (fieldValue === undefined || fieldValue === null)
49
+ return null;
50
+ this.#fieldBaseType =
51
+ variable.fieldBaseTypes?.[fieldIdentifier] ??
52
+ inferRecordFieldBaseType(Array.isArray(fieldValue) ? fieldValue[0] : fieldValue);
53
+ return fieldValue;
35
54
  }
36
55
  }
37
56
  //# sourceMappingURL=qti-field-value.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"qti-field-value.js","sourceRoot":"","sources":["../../../src/components/qti-field-value/qti-field-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD;;;;;;;GAOG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAuC;IACxE;;;;;OAKG;IACa,SAAS;QACvB,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QAE9D,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YACvE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;YACxE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAI,IAAI,CAAC,YAAY,EAAyB,CAAC,CAAC,CAAC,CAAC;QAEhE,yCAAyC;QACzC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,KAAK,IAAI,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC3G,OAAO,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,UAAU,GAAI,QAAQ,CAAC,KAA6B,CAAC,eAAe,CAAC,CAAC;QAE5E,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n/**\n * @summary The qti-field-value operator retrieves a specific field from a record.\n * @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#fieldValue\n *\n * Takes a sub-expression with record cardinality. 'field-identifier' identifies the field.\n * Returns the value of the specified field.\n * Special cases: Returns NULL if sub-expression is NULL or field does not exist.\n */\nexport class QtiFieldValue extends QtiExpression<string | string[] | null> {\n /**\n * Every failure here is NULL rather than a thrown error. `qti-is-null` over a\n * `qti-field-value` is the specified way to ask whether a record carries a\n * field at all, so a missing one has to be an ordinary value — throwing\n * aborted the whole response processing run instead.\n */\n public override getResult() {\n const fieldIdentifier = this.getAttribute('field-identifier');\n\n if (!fieldIdentifier) {\n console.error('qti-field-value requires a field-identifier attribute');\n return null;\n }\n\n if (this.children.length !== 1) {\n console.error('qti-field-value must have exactly one child expression');\n return null;\n }\n\n const variable = (this.getVariables() as ResponseVariable[])[0];\n\n // Check if the result is a record/object\n if (!variable || variable.baseType !== 'record' || variable.value === null || variable.value === undefined) {\n console.warn('qti-field-value child expression must return a record');\n return null;\n }\n\n const fieldValue = (variable.value as Record<string, any>)[fieldIdentifier];\n\n return fieldValue === undefined ? null : fieldValue;\n }\n}\n"]}
1
+ {"version":3,"file":"qti-field-value.js","sourceRoot":"","sources":["../../../src/components/qti-field-value/qti-field-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI9F;;;;;;;GAOG;AACH,MAAM,OAAO,aAAc,SAAQ,aAAuC;IACxE,cAAc,CAAuB;IAErC;;;;OAIG;IACH,IAAoB,cAAc;QAChC,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACa,SAAS;QACvB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;QAE9D,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YACvE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;YACxE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,QAAQ,GAAI,IAAI,CAAC,YAAY,EAAyB,CAAC,CAAC,CAAC,CAAC;QAEhE,0FAA0F;QAC1F,MAAM,QAAQ,GAAG,QAAQ,EAAE,WAAW,KAAK,QAAQ,IAAI,QAAQ,EAAE,QAAQ,KAAK,QAAQ,CAAC;QACvF,oFAAoF;QACpF,IAAI,QAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,KAAK,IAAI,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,CAAC;YAAE,OAAO,IAAI,CAAC;QACvF,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7D,OAAO,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,UAAU,GAAI,QAAQ,CAAC,KAA6B,CAAC,eAAe,CAAC,CAAC;QAC5E,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAEjE,IAAI,CAAC,cAAc;YACjB,QAAQ,CAAC,cAAc,EAAE,CAAC,eAAe,CAAC;gBAC1C,wBAAwB,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACnF,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","sourcesContent":["import { inferRecordFieldBaseType, isRecordValue, QtiExpression } from '@qti-components/base';\n\nimport type { BaseType, ResponseVariable } from '@qti-components/base';\n\n/**\n * @summary The qti-field-value operator retrieves a specific field from a record.\n * @documentation https://www.imsglobal.org/spec/qti/v3p0/info/index.html#fieldValue\n *\n * Takes a sub-expression with record cardinality. 'field-identifier' identifies the field.\n * Returns the value of the specified field.\n * Special cases: Returns NULL if sub-expression is NULL or field does not exist.\n */\nexport class QtiFieldValue extends QtiExpression<string | string[] | null> {\n #fieldBaseType: BaseType | undefined;\n\n /**\n * The base type of the field last read: as declared on the record's correct response when it\n * is, otherwise read off the value. The value alone is a string like `\"4.1\"` or `\"455 250\"`, and\n * an operator reading it as text would refuse to compare it as a number or test it as a point.\n */\n public override get resultBaseType(): BaseType | undefined {\n return this.#fieldBaseType;\n }\n\n /**\n * Every failure here is NULL rather than a thrown error. `qti-is-null` over a\n * `qti-field-value` is the specified way to ask whether a record carries a\n * field at all, so a missing one has to be an ordinary value — throwing\n * aborted the whole response processing run instead.\n */\n public override getResult() {\n this.#fieldBaseType = undefined;\n const fieldIdentifier = this.getAttribute('field-identifier');\n\n if (!fieldIdentifier) {\n console.error('qti-field-value requires a field-identifier attribute');\n return null;\n }\n\n if (this.children.length !== 1) {\n console.error('qti-field-value must have exactly one child expression');\n return null;\n }\n\n const variable = (this.getVariables() as ResponseVariable[])[0];\n\n // A record is declared with cardinality=\"record\" and no base-type; QTI_CONTEXT says both.\n const isRecord = variable?.cardinality === 'record' || variable?.baseType === 'record';\n // A record without a response yet: every field is NULL (not a mistake in the item).\n if (isRecord && (variable.value === null || variable.value === undefined)) return null;\n if (!variable || !isRecord || !isRecordValue(variable.value)) {\n console.warn('qti-field-value child expression must return a record');\n return null;\n }\n\n const fieldValue = (variable.value as Record<string, any>)[fieldIdentifier];\n if (fieldValue === undefined || fieldValue === null) return null;\n\n this.#fieldBaseType =\n variable.fieldBaseTypes?.[fieldIdentifier] ??\n inferRecordFieldBaseType(Array.isArray(fieldValue) ? fieldValue[0] : fieldValue);\n return fieldValue;\n }\n}\n"]}
@@ -1,10 +1,16 @@
1
1
  import { QtiExpression } from '@qti-components/base';
2
+ import { isNullValue } from '../../is-null-value';
2
3
  export class QtiGt extends QtiExpression {
3
4
  getResult() {
4
5
  if (this.children.length === 2) {
5
6
  const values = this.getVariables();
6
7
  const value1 = values[0];
7
8
  const value2 = values[1];
9
+ // A comparison with NULL is NULL (false in a condition). Without this, "+null" is 0 and a
10
+ // missing response would pass a comparison like lte(RESPONSE, 5).
11
+ if (isNullValue(value1?.value) || isNullValue(value2?.value)) {
12
+ return null;
13
+ }
8
14
  if ((value1.baseType === 'integer' || value1.baseType === 'float') &&
9
15
  (value2.baseType === 'integer' || value2.baseType === 'float')) {
10
16
  return +value1.value > +value2.value;
@@ -1 +1 @@
1
- {"version":3,"file":"qti-gt.js","sourceRoot":"","sources":["../../../src/components/qti-gt/qti-gt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,OAAO,KAAM,SAAQ,aAAsB;IAC/B,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\nexport class QtiGt extends QtiExpression<boolean> {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value > +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti gt');\n }\n }\n console.error('unexpected number of children in qt');\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"qti-gt.js","sourceRoot":"","sources":["../../../src/components/qti-gt/qti-gt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,MAAM,OAAO,KAAM,SAAQ,aAAsB;IAC/B,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,0FAA0F;YAC1F,kEAAkE;YAClE,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport { isNullValue } from '../../is-null-value';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\nexport class QtiGt extends QtiExpression<boolean> {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n // A comparison with NULL is NULL (false in a condition). Without this, \"+null\" is 0 and a\n // missing response would pass a comparison like lte(RESPONSE, 5).\n if (isNullValue(value1?.value) || isNullValue(value2?.value)) {\n return null;\n }\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value > +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti gt');\n }\n }\n console.error('unexpected number of children in qt');\n return null;\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { QtiConditionExpression } from '@qti-components/base';
2
+ import { isNullValue } from '../../is-null-value';
2
3
  // PK: For the contains we assume the expressions to calculate are all directedPairs
3
4
  // I don't know it this in QTI is always the case however?
4
5
  export class QtiGte extends QtiConditionExpression {
@@ -7,6 +8,11 @@ export class QtiGte extends QtiConditionExpression {
7
8
  const values = this.getVariables();
8
9
  const value1 = values[0];
9
10
  const value2 = values[1];
11
+ // A comparison with NULL is NULL (false in a condition). Without this, "+null" is 0 and a
12
+ // missing response would pass a comparison like lte(RESPONSE, 5).
13
+ if (isNullValue(value1?.value) || isNullValue(value2?.value)) {
14
+ return null;
15
+ }
10
16
  if ((value1.baseType === 'integer' || value1.baseType === 'float') &&
11
17
  (value2.baseType === 'integer' || value2.baseType === 'float')) {
12
18
  return +value1.value >= +value2.value;
@@ -1 +1 @@
1
- {"version":3,"file":"qti-gte.js","sourceRoot":"","sources":["../../../src/components/qti-gte/qti-gte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAI9D,oFAAoF;AACpF,0DAA0D;AAC1D,MAAM,OAAO,MAAO,SAAQ,sBAAsB;IAChC,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;gBAC/D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiConditionExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n// PK: For the contains we assume the expressions to calculate are all directedPairs\n// I don't know it this in QTI is always the case however?\nexport class QtiGte extends QtiConditionExpression {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value >= +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti gte');\n return null;\n }\n }\n console.error('unexpected number of children in qti gte');\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"qti-gte.js","sourceRoot":"","sources":["../../../src/components/qti-gte/qti-gte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,oFAAoF;AACpF,0DAA0D;AAC1D,MAAM,OAAO,MAAO,SAAQ,sBAAsB;IAChC,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,0FAA0F;YAC1F,kEAAkE;YAClE,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;gBAC/D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiConditionExpression } from '@qti-components/base';\n\nimport { isNullValue } from '../../is-null-value';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n// PK: For the contains we assume the expressions to calculate are all directedPairs\n// I don't know it this in QTI is always the case however?\nexport class QtiGte extends QtiConditionExpression {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n // A comparison with NULL is NULL (false in a condition). Without this, \"+null\" is 0 and a\n // missing response would pass a comparison like lte(RESPONSE, 5).\n if (isNullValue(value1?.value) || isNullValue(value2?.value)) {\n return null;\n }\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value >= +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti gte');\n return null;\n }\n }\n console.error('unexpected number of children in qti gte');\n return null;\n }\n}\n"]}
@@ -1,10 +1,16 @@
1
1
  import { QtiExpression } from '@qti-components/base';
2
+ import { isNullValue } from '../../is-null-value';
2
3
  export class QtiLt extends QtiExpression {
3
4
  getResult() {
4
5
  if (this.children.length === 2) {
5
6
  const values = this.getVariables();
6
7
  const value1 = values[0];
7
8
  const value2 = values[1];
9
+ // A comparison with NULL is NULL (false in a condition). Without this, "+null" is 0 and a
10
+ // missing response would pass a comparison like lte(RESPONSE, 5).
11
+ if (isNullValue(value1?.value) || isNullValue(value2?.value)) {
12
+ return null;
13
+ }
8
14
  if ((value1.baseType === 'integer' || value1.baseType === 'float') &&
9
15
  (value2.baseType === 'integer' || value2.baseType === 'float')) {
10
16
  return +value1.value < +value2.value;
@@ -1 +1 @@
1
- {"version":3,"file":"qti-lt.js","sourceRoot":"","sources":["../../../src/components/qti-lt/qti-lt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIrD,MAAM,OAAO,KAAM,SAAQ,aAAsB;IAC/B,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\nexport class QtiLt extends QtiExpression<boolean> {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value < +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti lt');\n }\n }\n console.error('unexpected number of children in lt');\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"qti-lt.js","sourceRoot":"","sources":["../../../src/components/qti-lt/qti-lt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,MAAM,OAAO,KAAM,SAAQ,aAAsB;IAC/B,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,0FAA0F;YAC1F,kEAAkE;YAClE,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiExpression } from '@qti-components/base';\n\nimport { isNullValue } from '../../is-null-value';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\nexport class QtiLt extends QtiExpression<boolean> {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n // A comparison with NULL is NULL (false in a condition). Without this, \"+null\" is 0 and a\n // missing response would pass a comparison like lte(RESPONSE, 5).\n if (isNullValue(value1?.value) || isNullValue(value2?.value)) {\n return null;\n }\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value < +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti lt');\n }\n }\n console.error('unexpected number of children in lt');\n return null;\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { QtiConditionExpression } from '@qti-components/base';
2
+ import { isNullValue } from '../../is-null-value';
2
3
  // PK: For the contains we assume the expressions to calculate are all directedPairs
3
4
  // I don't know it this in QTI is always the case however?
4
5
  export class QtiLte extends QtiConditionExpression {
@@ -7,6 +8,11 @@ export class QtiLte extends QtiConditionExpression {
7
8
  const values = this.getVariables();
8
9
  const value1 = values[0];
9
10
  const value2 = values[1];
11
+ // A comparison with NULL is NULL (false in a condition). Without this, "+null" is 0 and a
12
+ // missing response would pass a comparison like lte(RESPONSE, 5).
13
+ if (isNullValue(value1?.value) || isNullValue(value2?.value)) {
14
+ return null;
15
+ }
10
16
  if ((value1.baseType === 'integer' || value1.baseType === 'float') &&
11
17
  (value2.baseType === 'integer' || value2.baseType === 'float')) {
12
18
  return +value1.value <= +value2.value;
@@ -1 +1 @@
1
- {"version":3,"file":"qti-lte.js","sourceRoot":"","sources":["../../../src/components/qti-lte/qti-lte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAI9D,oFAAoF;AACpF,0DAA0D;AAC1D,MAAM,OAAO,MAAO,SAAQ,sBAAsB;IAChC,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;gBAC/D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiConditionExpression } from '@qti-components/base';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n// PK: For the contains we assume the expressions to calculate are all directedPairs\n// I don't know it this in QTI is always the case however?\nexport class QtiLte extends QtiConditionExpression {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value <= +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti lte');\n return null;\n }\n }\n console.error('unexpected number of children in qti lte');\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"qti-lte.js","sourceRoot":"","sources":["../../../src/components/qti-lte/qti-lte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,oFAAoF;AACpF,0DAA0D;AAC1D,MAAM,OAAO,MAAO,SAAQ,sBAAsB;IAChC,SAAS;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAwB,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,0FAA0F;YAC1F,kEAAkE;YAClE,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAC;YACd,CAAC;YACD,IACE,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC;gBAC9D,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAC9D,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;gBAC/D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { QtiConditionExpression } from '@qti-components/base';\n\nimport { isNullValue } from '../../is-null-value';\n\nimport type { ResponseVariable } from '@qti-components/base';\n\n// PK: For the contains we assume the expressions to calculate are all directedPairs\n// I don't know it this in QTI is always the case however?\nexport class QtiLte extends QtiConditionExpression {\n public override getResult(): boolean {\n if (this.children.length === 2) {\n const values = this.getVariables() as ResponseVariable[];\n const value1 = values[0];\n const value2 = values[1];\n // A comparison with NULL is NULL (false in a condition). Without this, \"+null\" is 0 and a\n // missing response would pass a comparison like lte(RESPONSE, 5).\n if (isNullValue(value1?.value) || isNullValue(value2?.value)) {\n return null;\n }\n if (\n (value1.baseType === 'integer' || value1.baseType === 'float') &&\n (value2.baseType === 'integer' || value2.baseType === 'float')\n ) {\n return +value1.value <= +value2.value;\n } else {\n console.error('unexpected baseType or cardinality in qti lte');\n return null;\n }\n }\n console.error('unexpected number of children in qti lte');\n return null;\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Whether an operand value is NULL in QTI terms, as qti-is-null decides it: no value, or an empty
3
+ * string. An operator that gets a NULL operand yields NULL, which is false in a condition.
4
+ */
5
+ export declare const isNullValue: (value: unknown) => boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Whether an operand value is NULL in QTI terms, as qti-is-null decides it: no value, or an empty
3
+ * string. An operator that gets a NULL operand yields NULL, which is false in a condition.
4
+ */
5
+ export const isNullValue = (value) => value === null || value === undefined || value === '';
6
+ //# sourceMappingURL=is-null-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-null-value.js","sourceRoot":"","sources":["../src/is-null-value.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAW,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC","sourcesContent":["/**\n * Whether an operand value is NULL in QTI terms, as qti-is-null decides it: no value, or an empty\n * string. An operator that gets a NULL operand yields NULL, which is false in a condition.\n */\nexport const isNullValue = (value: unknown): boolean => value === null || value === undefined || value === '';\n"]}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@qti-components/processing",
3
3
  "description": "QTI processing utilities",
4
- "version": "1.6.1-next.1",
4
+ "version": "1.6.1-next.2",
5
5
  "author": "",
6
6
  "dependencies": {
7
- "@qti-components/base": "^2.5.0-next.1",
7
+ "@qti-components/base": "^2.5.0-next.2",
8
8
  "@qti-components/utilities": "^1.3.3"
9
9
  },
10
10
  "devDependencies": {