@qti-components/elements 1.6.4 → 1.6.5

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,7 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  import type { PropertyValueMap } from 'lit';
3
3
  export declare class QtiResponseProcessing extends LitElement {
4
- #private;
5
4
  static styles: import("lit").CSSResult[];
6
5
  render(): import("lit").TemplateResult<1>;
7
6
  process(): void;
@@ -1,5 +1,11 @@
1
1
  import { css, html, LitElement } from 'lit';
2
2
  import { mapResponse, mapResponsePoint, matchCorrect } from '../../internal/template-strings';
3
+ /** The response processing templates we substitute for, keyed by the file name in `template`. */
4
+ const responseProcessingTemplates = {
5
+ map_response: mapResponse,
6
+ map_response_point: mapResponsePoint,
7
+ match_correct: matchCorrect
8
+ };
3
9
  export class QtiResponseProcessing extends LitElement {
4
10
  static { this.styles = [
5
11
  css `
@@ -21,27 +27,20 @@ export class QtiResponseProcessing extends LitElement {
21
27
  }
22
28
  }
23
29
  firstUpdated(_changedProperties) {
24
- if (this.getAttribute('template')) {
25
- const splittedTemplateName = this.getAttribute('template').split('/');
26
- const templateName = splittedTemplateName[splittedTemplateName.length - 1].replace('.xml', '');
27
- this.innerHTML = '';
28
- switch (templateName) {
29
- case 'map_response': {
30
- this.appendChild(this.#fragmentFromString(mapResponse).firstElementChild.firstElementChild);
31
- break;
32
- }
33
- case 'map_response_point': {
34
- this.appendChild(this.#fragmentFromString(mapResponsePoint).firstElementChild.firstElementChild);
35
- break;
36
- }
37
- case 'match_correct':
38
- this.appendChild(this.#fragmentFromString(matchCorrect).firstElementChild.firstElementChild);
39
- break;
40
- }
41
- }
42
- }
43
- #fragmentFromString(strHTML) {
44
- return document.createRange().createContextualFragment(strHTML);
30
+ const template = this.getAttribute('template');
31
+ if (!template)
32
+ return;
33
+ const templateName = template.split('/').pop().replace('.xml', '');
34
+ const rules = responseProcessingTemplates[templateName];
35
+ // Leave an unknown template's authored children alone; there is nothing to substitute.
36
+ if (!rules)
37
+ return;
38
+ // Parsed through this element's own `innerHTML` rather than a fragment created off `document`:
39
+ // the HTML fragment parsing algorithm takes its custom element registry from the context
40
+ // element, so the rules are upgraded with the registry this element lives in. A fragment from
41
+ // `document.createRange()` is parsed against the global registry, which leaves every rule an
42
+ // unupgraded HTMLElement when the item was rendered into a scoped registry.
43
+ this.innerHTML = rules;
45
44
  }
46
45
  }
47
46
  //# sourceMappingURL=qti-response-processing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"qti-response-processing.js","sourceRoot":"","sources":["../../../src/components/qti-response-processing/qti-response-processing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI9F,MAAM,OAAO,qBAAsB,SAAQ,UAAU;aACnC,WAAM,GAAG;QACvB,GAAG,CAAA;;;;KAIF;KACF,CAAC;IAEO,MAAM;QACb,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;IAEM,OAAO;QACZ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC3D,IAAI,CAAC,cAAc;YAAE,OAAO;QAC5B,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAA6B,CAAC;QAC7D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAEe,YAAY,CAAC,kBAAqE;QAChG,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;YAClC,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvE,MAAM,YAAY,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAC/F,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;YACpB,QAAQ,YAAY,EAAE,CAAC;gBACrB,KAAK,cAAc,CAAC,CAAC,CAAC;oBACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;oBAC5F,MAAM;gBACR,CAAC;gBACD,KAAK,oBAAoB,CAAC,CAAC,CAAC;oBAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;oBACjG,MAAM;gBACR,CAAC;gBACD,KAAK,eAAe;oBAClB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;oBAC7F,MAAM;YACV,CAAC;QACH,CAAC;IACH,CAAC;IAED,mBAAmB,CAAC,OAAe;QACjC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\n\nimport { type QtiRuleBase } from '@qti-components/base';\n\nimport { mapResponse, mapResponsePoint, matchCorrect } from '../../internal/template-strings';\n\nimport type { PropertyValueMap } from 'lit';\n\nexport class QtiResponseProcessing extends LitElement {\n static override styles = [\n css`\n :host {\n display: none;\n }\n `\n ];\n\n override render() {\n return html`<slot></slot>`;\n }\n\n public process() {\n const assessmentItem = this.closest('qti-assessment-item');\n if (!assessmentItem) return;\n const rules = [...this.children] as unknown as QtiRuleBase[];\n for (const rule of rules) {\n rule.process();\n }\n }\n\n public override firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n if (this.getAttribute('template')) {\n const splittedTemplateName = this.getAttribute('template')!.split('/');\n const templateName = splittedTemplateName[splittedTemplateName.length - 1].replace('.xml', '');\n this.innerHTML = '';\n switch (templateName) {\n case 'map_response': {\n this.appendChild(this.#fragmentFromString(mapResponse).firstElementChild.firstElementChild);\n break;\n }\n case 'map_response_point': {\n this.appendChild(this.#fragmentFromString(mapResponsePoint).firstElementChild.firstElementChild);\n break;\n }\n case 'match_correct':\n this.appendChild(this.#fragmentFromString(matchCorrect).firstElementChild.firstElementChild);\n break;\n }\n }\n }\n\n #fragmentFromString(strHTML: string) {\n return document.createRange().createContextualFragment(strHTML);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-response-processing': QtiResponseProcessing;\n }\n}\n"]}
1
+ {"version":3,"file":"qti-response-processing.js","sourceRoot":"","sources":["../../../src/components/qti-response-processing/qti-response-processing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAI5C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI9F,iGAAiG;AACjG,MAAM,2BAA2B,GAA2B;IAC1D,YAAY,EAAE,WAAW;IACzB,kBAAkB,EAAE,gBAAgB;IACpC,aAAa,EAAE,YAAY;CAC5B,CAAC;AAEF,MAAM,OAAO,qBAAsB,SAAQ,UAAU;aACnC,WAAM,GAAG;QACvB,GAAG,CAAA;;;;KAIF;KACF,CAAC;IAEO,MAAM;QACb,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;IAEM,OAAO;QACZ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC3D,IAAI,CAAC,cAAc;YAAE,OAAO;QAC5B,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,CAA6B,CAAC;QAC7D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAEe,YAAY,CAAC,kBAAqE;QAChG,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,2BAA2B,CAAC,YAAY,CAAC,CAAC;QACxD,uFAAuF;QACvF,IAAI,CAAC,KAAK;YAAE,OAAO;QAEnB,+FAA+F;QAC/F,yFAAyF;QACzF,8FAA8F;QAC9F,6FAA6F;QAC7F,4EAA4E;QAC5E,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\n\nimport { type QtiRuleBase } from '@qti-components/base';\n\nimport { mapResponse, mapResponsePoint, matchCorrect } from '../../internal/template-strings';\n\nimport type { PropertyValueMap } from 'lit';\n\n/** The response processing templates we substitute for, keyed by the file name in `template`. */\nconst responseProcessingTemplates: Record<string, string> = {\n map_response: mapResponse,\n map_response_point: mapResponsePoint,\n match_correct: matchCorrect\n};\n\nexport class QtiResponseProcessing extends LitElement {\n static override styles = [\n css`\n :host {\n display: none;\n }\n `\n ];\n\n override render() {\n return html`<slot></slot>`;\n }\n\n public process() {\n const assessmentItem = this.closest('qti-assessment-item');\n if (!assessmentItem) return;\n const rules = [...this.children] as unknown as QtiRuleBase[];\n for (const rule of rules) {\n rule.process();\n }\n }\n\n public override firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n const template = this.getAttribute('template');\n if (!template) return;\n\n const templateName = template.split('/').pop()!.replace('.xml', '');\n const rules = responseProcessingTemplates[templateName];\n // Leave an unknown template's authored children alone; there is nothing to substitute.\n if (!rules) return;\n\n // Parsed through this element's own `innerHTML` rather than a fragment created off `document`:\n // the HTML fragment parsing algorithm takes its custom element registry from the context\n // element, so the rules are upgraded with the registry this element lives in. A fragment from\n // `document.createRange()` is parsed against the global registry, which leaves every rule an\n // unupgraded HTMLElement when the item was rendered into a scoped registry.\n this.innerHTML = rules;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-response-processing': QtiResponseProcessing;\n }\n}\n"]}
@@ -1,3 +1,3 @@
1
- export declare const matchCorrect = "<qti-response-processing>\n <qti-response-condition>\n <qti-response-if>\n <qti-match>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n <qti-correct identifier=\"RESPONSE\"></qti-correct>\n </qti-match>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">1</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n</qti-response-processing>";
2
- export declare const mapResponse = "<qti-response-processing>\n <qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0.0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response identifier=\"RESPONSE\"> </qti-map-response>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n</qti-response-processing>";
3
- export declare const mapResponsePoint = "<qti-response-processing>\n <qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response-point identifier=\"RESPONSE\"></qti-map-response-point>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n</qti-response-processing>";
1
+ export declare const matchCorrect = "<qti-response-condition>\n <qti-response-if>\n <qti-match>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n <qti-correct identifier=\"RESPONSE\"></qti-correct>\n </qti-match>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">1</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-else>\n</qti-response-condition>";
2
+ export declare const mapResponse = "<qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0.0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response identifier=\"RESPONSE\"> </qti-map-response>\n </qti-set-outcome-value>\n </qti-response-else>\n</qti-response-condition>";
3
+ export declare const mapResponsePoint = "<qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response-point identifier=\"RESPONSE\"></qti-map-response-point>\n </qti-set-outcome-value>\n </qti-response-else>\n</qti-response-condition>";
@@ -1,53 +1,47 @@
1
- export const matchCorrect = `<qti-response-processing>
2
- <qti-response-condition>
3
- <qti-response-if>
4
- <qti-match>
5
- <qti-variable identifier="RESPONSE"></qti-variable>
6
- <qti-correct identifier="RESPONSE"></qti-correct>
7
- </qti-match>
8
- <qti-set-outcome-value identifier="SCORE">
9
- <qti-base-value base-type="float">1</qti-base-value>
10
- </qti-set-outcome-value>
11
- </qti-response-if>
12
- <qti-response-else>
13
- <qti-set-outcome-value identifier="SCORE">
14
- <qti-base-value base-type="float">0</qti-base-value>
15
- </qti-set-outcome-value>
16
- </qti-response-else>
17
- </qti-response-condition>
18
- </qti-response-processing>`;
19
- export const mapResponse = `<qti-response-processing>
20
- <qti-response-condition>
21
- <qti-response-if>
22
- <qti-is-null>
23
- <qti-variable identifier="RESPONSE"></qti-variable>
24
- </qti-is-null>
25
- <qti-set-outcome-value identifier="SCORE">
26
- <qti-base-value base-type="float">0.0</qti-base-value>
27
- </qti-set-outcome-value>
28
- </qti-response-if>
29
- <qti-response-else>
30
- <qti-set-outcome-value identifier="SCORE">
31
- <qti-map-response identifier="RESPONSE"> </qti-map-response>
32
- </qti-set-outcome-value>
33
- </qti-response-else>
34
- </qti-response-condition>
35
- </qti-response-processing>`;
36
- export const mapResponsePoint = `<qti-response-processing>
37
- <qti-response-condition>
38
- <qti-response-if>
39
- <qti-is-null>
40
- <qti-variable identifier="RESPONSE"></qti-variable>
41
- </qti-is-null>
42
- <qti-set-outcome-value identifier="SCORE">
43
- <qti-base-value base-type="float">0</qti-base-value>
44
- </qti-set-outcome-value>
45
- </qti-response-if>
46
- <qti-response-else>
47
- <qti-set-outcome-value identifier="SCORE">
48
- <qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
49
- </qti-set-outcome-value>
50
- </qti-response-else>
51
- </qti-response-condition>
52
- </qti-response-processing>`;
1
+ export const matchCorrect = `<qti-response-condition>
2
+ <qti-response-if>
3
+ <qti-match>
4
+ <qti-variable identifier="RESPONSE"></qti-variable>
5
+ <qti-correct identifier="RESPONSE"></qti-correct>
6
+ </qti-match>
7
+ <qti-set-outcome-value identifier="SCORE">
8
+ <qti-base-value base-type="float">1</qti-base-value>
9
+ </qti-set-outcome-value>
10
+ </qti-response-if>
11
+ <qti-response-else>
12
+ <qti-set-outcome-value identifier="SCORE">
13
+ <qti-base-value base-type="float">0</qti-base-value>
14
+ </qti-set-outcome-value>
15
+ </qti-response-else>
16
+ </qti-response-condition>`;
17
+ export const mapResponse = `<qti-response-condition>
18
+ <qti-response-if>
19
+ <qti-is-null>
20
+ <qti-variable identifier="RESPONSE"></qti-variable>
21
+ </qti-is-null>
22
+ <qti-set-outcome-value identifier="SCORE">
23
+ <qti-base-value base-type="float">0.0</qti-base-value>
24
+ </qti-set-outcome-value>
25
+ </qti-response-if>
26
+ <qti-response-else>
27
+ <qti-set-outcome-value identifier="SCORE">
28
+ <qti-map-response identifier="RESPONSE"> </qti-map-response>
29
+ </qti-set-outcome-value>
30
+ </qti-response-else>
31
+ </qti-response-condition>`;
32
+ export const mapResponsePoint = `<qti-response-condition>
33
+ <qti-response-if>
34
+ <qti-is-null>
35
+ <qti-variable identifier="RESPONSE"></qti-variable>
36
+ </qti-is-null>
37
+ <qti-set-outcome-value identifier="SCORE">
38
+ <qti-base-value base-type="float">0</qti-base-value>
39
+ </qti-set-outcome-value>
40
+ </qti-response-if>
41
+ <qti-response-else>
42
+ <qti-set-outcome-value identifier="SCORE">
43
+ <qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
44
+ </qti-set-outcome-value>
45
+ </qti-response-else>
46
+ </qti-response-condition>`;
53
47
  //# sourceMappingURL=template-strings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"template-strings.js","sourceRoot":"","sources":["../../src/internal/template-strings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;2BAiBD,CAAC;AAE5B,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;2BAgBA,CAAC;AAE5B,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;2BAgBL,CAAC","sourcesContent":["export const matchCorrect = `<qti-response-processing>\n <qti-response-condition>\n <qti-response-if>\n <qti-match>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n <qti-correct identifier=\"RESPONSE\"></qti-correct>\n </qti-match>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">1</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n</qti-response-processing>`;\n\nexport const mapResponse = `<qti-response-processing>\n <qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0.0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response identifier=\"RESPONSE\"> </qti-map-response>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n</qti-response-processing>`;\n\nexport const mapResponsePoint = `<qti-response-processing>\n <qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response-point identifier=\"RESPONSE\"></qti-map-response-point>\n </qti-set-outcome-value>\n </qti-response-else>\n </qti-response-condition>\n</qti-response-processing>`;\n"]}
1
+ {"version":3,"file":"template-strings.js","sourceRoot":"","sources":["../../src/internal/template-strings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;0BAeF,CAAC;AAE3B,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;0BAcD,CAAC;AAE3B,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;0BAcN,CAAC","sourcesContent":["export const matchCorrect = `<qti-response-condition>\n <qti-response-if>\n <qti-match>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n <qti-correct identifier=\"RESPONSE\"></qti-correct>\n </qti-match>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">1</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-else>\n</qti-response-condition>`;\n\nexport const mapResponse = `<qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0.0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response identifier=\"RESPONSE\"> </qti-map-response>\n </qti-set-outcome-value>\n </qti-response-else>\n</qti-response-condition>`;\n\nexport const mapResponsePoint = `<qti-response-condition>\n <qti-response-if>\n <qti-is-null>\n <qti-variable identifier=\"RESPONSE\"></qti-variable>\n </qti-is-null>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-base-value base-type=\"float\">0</qti-base-value>\n </qti-set-outcome-value>\n </qti-response-if>\n <qti-response-else>\n <qti-set-outcome-value identifier=\"SCORE\">\n <qti-map-response-point identifier=\"RESPONSE\"></qti-map-response-point>\n </qti-set-outcome-value>\n </qti-response-else>\n</qti-response-condition>`;\n"]}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@qti-components/elements",
3
3
  "description": "QTI elements utilities",
4
- "version": "1.6.4",
4
+ "version": "1.6.5",
5
5
  "author": "",
6
6
  "dependencies": {
7
- "@qti-components/base": "^2.0.0",
8
- "@qti-components/transformers": "^1.7.1",
7
+ "@qti-components/base": "^2.1.0",
8
+ "@qti-components/transformers": "^1.7.2",
9
9
  "@qti-components/utilities": "^1.3.3"
10
10
  },
11
11
  "devDependencies": {