@citolab/qti-components 7.3.1 → 7.3.3

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 (157) hide show
  1. package/cdn/chunks/chunk-2F7QLIQX.js +2 -0
  2. package/cdn/chunks/chunk-2FHBMRTL.js +10 -0
  3. package/cdn/chunks/chunk-2IPVI6JS.js +8 -0
  4. package/cdn/chunks/chunk-2MMQH3OR.js +8 -0
  5. package/cdn/chunks/chunk-3OIAVUFK.js +8 -0
  6. package/cdn/chunks/chunk-3XOKPK45.js +2 -0
  7. package/cdn/chunks/chunk-5DVOEPIP.js +8 -0
  8. package/cdn/chunks/chunk-5PA3GEIX.js +2 -0
  9. package/cdn/chunks/chunk-7JO3EE5V.js +5 -0
  10. package/cdn/chunks/chunk-AMH674XL.js +1450 -0
  11. package/cdn/chunks/chunk-C26NWYVO.js +2 -0
  12. package/cdn/chunks/chunk-C55DPNSW.js +8 -0
  13. package/cdn/chunks/chunk-CIIKVJF7.js +2 -0
  14. package/cdn/chunks/chunk-CMGZUMGV.js +2 -0
  15. package/cdn/chunks/chunk-DZTNCG5K.js +2 -0
  16. package/cdn/chunks/chunk-E7FZUPJ2.js +8 -0
  17. package/cdn/chunks/chunk-H3WTP2FL.js +2 -0
  18. package/cdn/chunks/chunk-IEHCQ5EK.js +2 -0
  19. package/cdn/chunks/chunk-LGSTDI7O.js +8 -0
  20. package/cdn/chunks/chunk-N3YBYEEI.js +2 -0
  21. package/cdn/chunks/chunk-N7K6VO7F.js +1 -0
  22. package/cdn/chunks/chunk-NPYS4GGN.js +5 -0
  23. package/cdn/chunks/chunk-OGZEE7T7.js +8 -0
  24. package/cdn/chunks/chunk-QA3FBQSF.js +5 -0
  25. package/cdn/chunks/chunk-QHO7IBHQ.js +2 -0
  26. package/cdn/chunks/chunk-QT25DBDO.js +8 -0
  27. package/cdn/chunks/chunk-SSBR2KEX.js +8 -0
  28. package/cdn/chunks/chunk-TB7NCJUL.js +8 -0
  29. package/cdn/chunks/chunk-UN2WT4WS.js +2 -0
  30. package/cdn/chunks/chunk-V6LLE3H4.js +8 -0
  31. package/cdn/chunks/chunk-X5K7LBUM.js +8 -0
  32. package/cdn/chunks/chunk-X6XRXEW2.js +2 -0
  33. package/cdn/chunks/chunk-Z6WP2K4O.js +1450 -0
  34. package/cdn/chunks/chunk-ZKETWB2E.js +8 -0
  35. package/cdn/index.global.js +1 -1
  36. package/cdn/index.js +1 -1
  37. package/cdn/qti-components/index.js +1 -1
  38. package/cdn/qti-test/components/index.js +1 -1
  39. package/cdn/qti-test/components/test-next.js +1 -1
  40. package/cdn/qti-test/components/test-prev.js +1 -1
  41. package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
  42. package/cdn/qti-test/components/test-stamp.js +1 -1
  43. package/cdn/qti-test/core/index.js +1 -1
  44. package/dist/chunks/chunk-3IAZELYI.js +90 -0
  45. package/dist/chunks/chunk-3IAZELYI.js.map +1 -0
  46. package/dist/chunks/chunk-3YJPKRFS.js +91 -0
  47. package/dist/chunks/chunk-3YJPKRFS.js.map +1 -0
  48. package/dist/chunks/chunk-4PL7XU3H.js +82 -0
  49. package/dist/chunks/chunk-4PL7XU3H.js.map +1 -0
  50. package/dist/chunks/chunk-4YWF7QTH.js +92 -0
  51. package/dist/chunks/chunk-4YWF7QTH.js.map +1 -0
  52. package/dist/chunks/chunk-5AZFPSD4.js +87 -0
  53. package/dist/chunks/chunk-5AZFPSD4.js.map +1 -0
  54. package/dist/chunks/chunk-5OZP32ZZ.js +90 -0
  55. package/dist/chunks/chunk-5OZP32ZZ.js.map +1 -0
  56. package/dist/chunks/chunk-5SU6S5L4.js +94 -0
  57. package/dist/chunks/chunk-5SU6S5L4.js.map +1 -0
  58. package/dist/chunks/chunk-5WHKITF6.js +90 -0
  59. package/dist/chunks/chunk-5WHKITF6.js.map +1 -0
  60. package/dist/chunks/chunk-64JRMFTB.js +93 -0
  61. package/dist/chunks/chunk-64JRMFTB.js.map +1 -0
  62. package/dist/chunks/chunk-7RFWGVJR.js +109 -0
  63. package/dist/chunks/chunk-7RFWGVJR.js.map +1 -0
  64. package/dist/chunks/chunk-BAG5H6N2.js +7970 -0
  65. package/dist/chunks/chunk-BAG5H6N2.js.map +1 -0
  66. package/dist/chunks/chunk-CWT66FG4.js +95 -0
  67. package/dist/chunks/chunk-CWT66FG4.js.map +1 -0
  68. package/dist/chunks/chunk-F2JDNMKV.js +100 -0
  69. package/dist/chunks/chunk-F2JDNMKV.js.map +1 -0
  70. package/dist/chunks/chunk-F5OPIJ4X.js +90 -0
  71. package/dist/chunks/chunk-F5OPIJ4X.js.map +1 -0
  72. package/dist/chunks/chunk-FZHYC3TU.js +92 -0
  73. package/dist/chunks/chunk-FZHYC3TU.js.map +1 -0
  74. package/dist/chunks/chunk-GDNPYP37.js +85 -0
  75. package/dist/chunks/chunk-GDNPYP37.js.map +1 -0
  76. package/dist/chunks/chunk-H2HBYOZZ.js +90 -0
  77. package/dist/chunks/chunk-H2HBYOZZ.js.map +1 -0
  78. package/dist/chunks/chunk-H6RDLSTK.js +87 -0
  79. package/dist/chunks/chunk-H6RDLSTK.js.map +1 -0
  80. package/dist/chunks/chunk-IDRQNT6W.js +86 -0
  81. package/dist/chunks/chunk-IDRQNT6W.js.map +1 -0
  82. package/dist/chunks/chunk-KXDEFGCK.js +887 -0
  83. package/dist/chunks/chunk-KXDEFGCK.js.map +1 -0
  84. package/dist/chunks/chunk-KZAEUKGI.js +100 -0
  85. package/dist/chunks/chunk-KZAEUKGI.js.map +1 -0
  86. package/dist/chunks/chunk-LBL5YIK7.js +94 -0
  87. package/dist/chunks/chunk-LBL5YIK7.js.map +1 -0
  88. package/dist/chunks/chunk-LJ4KYDFF.js +56 -0
  89. package/dist/chunks/chunk-LJ4KYDFF.js.map +1 -0
  90. package/dist/chunks/chunk-LMMYXE6U.js +85 -0
  91. package/dist/chunks/chunk-LMMYXE6U.js.map +1 -0
  92. package/dist/chunks/chunk-MTWSJYVA.js +86 -0
  93. package/dist/chunks/chunk-MTWSJYVA.js.map +1 -0
  94. package/dist/chunks/chunk-OD6DYLAO.js +7940 -0
  95. package/dist/chunks/chunk-OD6DYLAO.js.map +1 -0
  96. package/dist/chunks/chunk-OLZSWYQO.js +100 -0
  97. package/dist/chunks/chunk-OLZSWYQO.js.map +1 -0
  98. package/dist/chunks/chunk-PI2VZUCF.js +91 -0
  99. package/dist/chunks/chunk-PI2VZUCF.js.map +1 -0
  100. package/dist/chunks/chunk-PRO3U224.js +91 -0
  101. package/dist/chunks/chunk-PRO3U224.js.map +1 -0
  102. package/dist/chunks/chunk-RZK54XLD.js +100 -0
  103. package/dist/chunks/chunk-RZK54XLD.js.map +1 -0
  104. package/dist/chunks/chunk-SBY26ONA.js +99 -0
  105. package/dist/chunks/chunk-SBY26ONA.js.map +1 -0
  106. package/dist/chunks/chunk-W7DAMVVM.js +90 -0
  107. package/dist/chunks/chunk-W7DAMVVM.js.map +1 -0
  108. package/dist/chunks/chunk-WH6TRM5K.js +82 -0
  109. package/dist/chunks/chunk-WH6TRM5K.js.map +1 -0
  110. package/dist/chunks/chunk-WLDX63OS.js +92 -0
  111. package/dist/chunks/chunk-WLDX63OS.js.map +1 -0
  112. package/dist/chunks/chunk-WTV3RW6F.js +91 -0
  113. package/dist/chunks/chunk-WTV3RW6F.js.map +1 -0
  114. package/dist/chunks/chunk-X5L7SQQN.js +887 -0
  115. package/dist/chunks/chunk-X5L7SQQN.js.map +1 -0
  116. package/dist/chunks/chunk-X5RBTIXP.js +86 -0
  117. package/dist/chunks/chunk-X5RBTIXP.js.map +1 -0
  118. package/dist/exports/computed-item.context.d.ts +1 -1
  119. package/dist/exports/computed.context.d.ts +2 -2
  120. package/dist/exports/interaction.d.ts +1 -1
  121. package/dist/exports/item.context.d.ts +1 -1
  122. package/dist/exports/qti-assessment-item.context.d.ts +1 -1
  123. package/dist/exports/qti-condition-expression.d.ts +1 -1
  124. package/dist/exports/qti-expression.d.ts +1 -1
  125. package/dist/exports/session.context.d.ts +2 -2
  126. package/dist/exports/test.context.d.ts +1 -1
  127. package/dist/exports/variables.d.ts +1 -1
  128. package/dist/index.d.ts +2 -2
  129. package/dist/index.js +6 -7
  130. package/dist/qti-components/index.d.ts +2 -2
  131. package/dist/qti-components/index.js +1 -2
  132. package/dist/qti-components-jsx.d.ts +73 -12
  133. package/dist/qti-item/components/item-show-correct-response.d.ts +1 -1
  134. package/dist/qti-item/components/print-item-variables.d.ts +1 -1
  135. package/dist/qti-item/core/index.d.ts +1 -1
  136. package/dist/qti-loader/index.d.ts +1 -1
  137. package/dist/qti-response-declaration-pCFZA_aW.d.ts +1356 -0
  138. package/dist/qti-test/components/index.d.ts +2 -2
  139. package/dist/qti-test/components/index.js +4 -5
  140. package/dist/qti-test/components/test-navigation.d.ts +2 -2
  141. package/dist/qti-test/components/test-next.d.ts +14 -16
  142. package/dist/qti-test/components/test-next.js +1 -1
  143. package/dist/qti-test/components/test-prev.d.ts +16 -18
  144. package/dist/qti-test/components/test-prev.js +1 -3
  145. package/dist/qti-test/components/test-print-context.d.ts +2 -2
  146. package/dist/qti-test/components/test-print-item-variables.d.ts +2 -2
  147. package/dist/qti-test/components/test-scoring-buttons.d.ts +2 -2
  148. package/dist/qti-test/components/test-scoring-feedback.d.ts +2 -2
  149. package/dist/qti-test/components/test-scoring-feedback.js +1 -1
  150. package/dist/qti-test/components/test-show-correct-response.d.ts +2 -2
  151. package/dist/qti-test/components/test-stamp.d.ts +2 -2
  152. package/dist/qti-test/components/test-stamp.js +1 -1
  153. package/dist/qti-test/core/index.d.ts +3 -3
  154. package/dist/qti-test/core/index.js +2 -3
  155. package/dist/qti-test-feedback-2xjKezsY.d.ts +85 -0
  156. package/dist/vscode.html-custom-data.json +39 -15
  157. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ import {
2
+ btn,
3
+ dis
4
+ } from "./chunk-5ZHHNEDA.js";
5
+ import {
6
+ computedContext
7
+ } from "./chunk-AZIKAG7K.js";
8
+ import {
9
+ __decorateClass
10
+ } from "./chunk-H2JE6IVU.js";
11
+
12
+ // src/lib/qti-test/components/test-next.ts
13
+ import { css, html, LitElement } from "lit";
14
+ import { customElement, property, state } from "lit/decorators.js";
15
+ import { consume } from "@lit/context";
16
+ var TestNext = class extends LitElement {
17
+ constructor() {
18
+ super();
19
+ this.disabled = false;
20
+ this.sectionItems = [];
21
+ this.itemIndex = -1;
22
+ this._internallyDisabled = false;
23
+ this._internals = this.attachInternals();
24
+ this._internals.role = "button";
25
+ this._internals.ariaLabel = "Next item";
26
+ this.addEventListener("click", (e) => {
27
+ e.preventDefault();
28
+ if (!this._effectiveDisabled) {
29
+ const next = this.sectionItems[this.itemIndex + 1];
30
+ if (next) this._requestItem(next.identifier);
31
+ }
32
+ });
33
+ }
34
+ get _effectiveDisabled() {
35
+ return this._internallyDisabled || this.disabled;
36
+ }
37
+ set _effectiveDisabled(_) {
38
+ }
39
+ willUpdate() {
40
+ if (!this.computedContext) return;
41
+ const testPart = this.computedContext.testParts.find((testPart2) => testPart2.active);
42
+ if (!testPart) return;
43
+ this.sectionItems = testPart.sections.flatMap((section) => section.items);
44
+ this.itemIndex = this.sectionItems.findIndex((item) => item.active);
45
+ this._updateInternalDisabledState();
46
+ }
47
+ updated() {
48
+ if (this._effectiveDisabled) {
49
+ this.setAttribute("disabled", "");
50
+ } else {
51
+ this.removeAttribute("disabled");
52
+ }
53
+ }
54
+ _updateInternalDisabledState() {
55
+ this._internallyDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems.length - 1;
56
+ }
57
+ _requestItem(identifier) {
58
+ this.dispatchEvent(
59
+ new CustomEvent("qti-request-navigation", {
60
+ composed: true,
61
+ bubbles: true,
62
+ detail: {
63
+ type: "item",
64
+ id: identifier
65
+ }
66
+ })
67
+ );
68
+ }
69
+ render() {
70
+ return html`<slot></slot>`;
71
+ }
72
+ };
73
+ TestNext.styles = css`
74
+ :host {
75
+ ${btn};
76
+ }
77
+ :host([disabled]) {
78
+ ${dis};
79
+ }
80
+ `;
81
+ __decorateClass([
82
+ property({ type: Boolean })
83
+ ], TestNext.prototype, "disabled", 2);
84
+ __decorateClass([
85
+ property({ type: Boolean, reflect: true, attribute: "disabled" })
86
+ ], TestNext.prototype, "_effectiveDisabled", 1);
87
+ __decorateClass([
88
+ consume({ context: computedContext, subscribe: true })
89
+ ], TestNext.prototype, "computedContext", 2);
90
+ __decorateClass([
91
+ state()
92
+ ], TestNext.prototype, "_internallyDisabled", 2);
93
+ TestNext = __decorateClass([
94
+ customElement("test-next")
95
+ ], TestNext);
96
+
97
+ export {
98
+ TestNext
99
+ };
100
+ //# sourceMappingURL=chunk-OLZSWYQO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\n\n@customElement('test-next')\nexport class TestNext extends LitElement {\n /**\n * External input: allows parent to disable this element\n */\n @property({ type: Boolean })\n public disabled = false;\n\n /**\n * Internal logic + external flag = effective disabled state (reflected)\n */\n @property({ type: Boolean, reflect: true, attribute: 'disabled' })\n public get _effectiveDisabled(): boolean {\n return this._internallyDisabled || this.disabled;\n }\n\n private set _effectiveDisabled(_: boolean) {\n // no-op setter to satisfy reflect binding; we control value in `updated()`\n }\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext: ComputedContext;\n\n sectionItems: ComputedItem[] = [];\n itemIndex = -1;\n\n @state()\n private _internallyDisabled = false;\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this._effectiveDisabled) {\n const next = this.sectionItems[this.itemIndex + 1];\n if (next) this._requestItem(next.identifier);\n }\n });\n }\n\n willUpdate() {\n if (!this.computedContext) return;\n\n const testPart = this.computedContext.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n\n this._updateInternalDisabledState();\n }\n\n updated() {\n // Reflect computed state to the DOM\n if (this._effectiveDisabled) {\n this.setAttribute('disabled', '');\n } else {\n this.removeAttribute('disabled');\n }\n }\n\n private _updateInternalDisabledState() {\n this._internallyDisabled =\n !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems.length - 1;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-next': TestNext;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,eAAe;AAQjB,IAAM,WAAN,cAAuB,WAAW;AAAA,EAuCvC,cAAc;AACZ,UAAM;AAnCR,SAAO,WAAW;AAiBlB,wBAA+B,CAAC;AAChC,qBAAY;AAGZ,SAAQ,sBAAsB;AAe5B,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,oBAAoB;AAC5B,cAAM,OAAO,KAAK,aAAa,KAAK,YAAY,CAAC;AACjD,YAAI,KAAM,MAAK,aAAa,KAAK,UAAU;AAAA,MAC7C;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAzCA,IAAW,qBAA8B;AACvC,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EADP,MAAM;AAAA,GAzBI,SA0BH;AA1BG,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":["testPart"]}
@@ -0,0 +1,91 @@
1
+ import {
2
+ btn,
3
+ dis
4
+ } from "./chunk-5ZHHNEDA.js";
5
+ import {
6
+ computedContext
7
+ } from "./chunk-AZIKAG7K.js";
8
+ import {
9
+ __decorateClass
10
+ } from "./chunk-H2JE6IVU.js";
11
+
12
+ // src/lib/qti-test/components/test-next.ts
13
+ import { css, html, LitElement } from "lit";
14
+ import { customElement, property } from "lit/decorators.js";
15
+ import { consume } from "@lit/context";
16
+ var TestNext = class extends LitElement {
17
+ constructor() {
18
+ super();
19
+ this.disabled = false;
20
+ this._internals = this.attachInternals();
21
+ this._internals.role = "button";
22
+ this._internals.ariaLabel = "Next item";
23
+ this.addEventListener("click", (e) => {
24
+ e.preventDefault();
25
+ if (!this.disabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);
26
+ });
27
+ }
28
+ connectedCallback() {
29
+ super.connectedCallback();
30
+ }
31
+ willUpdate(_changedProperties) {
32
+ if (!this.computedContext) return;
33
+ const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
34
+ if (!testPart) return;
35
+ this.sectionItems = testPart.sections.flatMap((section) => section.items);
36
+ this.itemIndex = this.sectionItems.findIndex((item) => item.active);
37
+ this.checkDisabled();
38
+ }
39
+ checkDisabled() {
40
+ const shouldBeDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;
41
+ console.log(shouldBeDisabled);
42
+ if (this.disabled) {
43
+ this.disabled = true;
44
+ return;
45
+ }
46
+ this.disabled = shouldBeDisabled;
47
+ }
48
+ _requestItem(identifier) {
49
+ this.dispatchEvent(
50
+ new CustomEvent("qti-request-navigation", {
51
+ composed: true,
52
+ bubbles: true,
53
+ detail: {
54
+ type: "item",
55
+ id: identifier
56
+ }
57
+ })
58
+ );
59
+ }
60
+ render() {
61
+ return html`<slot></slot>`;
62
+ }
63
+ };
64
+ // @watch('computedContext')
65
+ // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {
66
+ // if (newValue) {
67
+ // this.disabled = false;
68
+ // }
69
+ // }
70
+ TestNext.styles = css`
71
+ :host {
72
+ ${btn};
73
+ }
74
+ :host([disabled]) {
75
+ ${dis};
76
+ }
77
+ `;
78
+ __decorateClass([
79
+ property({ type: Boolean, reflect: true })
80
+ ], TestNext.prototype, "disabled", 2);
81
+ __decorateClass([
82
+ consume({ context: computedContext, subscribe: true })
83
+ ], TestNext.prototype, "computedContext", 2);
84
+ TestNext = __decorateClass([
85
+ customElement("test-next")
86
+ ], TestNext);
87
+
88
+ export {
89
+ TestNext
90
+ };
91
+ //# sourceMappingURL=chunk-PI2VZUCF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\n// import { watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\n\n/**\n * Represents a custom element for navigating to the next test item.\n *\n * @remarks\n * This element provides functionality for navigating to the next test item.\n *\n * @example\n * ```html\n * <test-next></test-next>\n * ```\n */\n@customElement('test-next')\nexport class TestNext extends LitElement {\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n // @watch('computedContext')\n // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n // if (newValue) {\n // this.disabled = false;\n // }\n // }\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n private _internals: ElementInternals;\n\n constructor() {\n super();\n\n this._internals = this.attachInternals();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.disabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n this.checkDisabled();\n }\n\n checkDisabled() {\n const shouldBeDisabled =\n !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;\n console.log(shouldBeDisabled);\n if (this.disabled) {\n this.disabled = true;\n return;\n }\n this.disabled = shouldBeDisabled;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-next': TestNext;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,eAAe,gBAAgB;AACxC,SAAS,eAAe;AAoBjB,IAAM,WAAN,cAAuB,WAAW;AAAA,EA2BvC,cAAc;AACZ,UAAM;AA1BR,SAAO,WAAW;AA4BhB,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,SAAU,MAAK,aAAa,KAAK,aAAa,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,IACxF,CAAC;AAAA,EACH;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AAAA,EAC1B;AAAA,EAEA,WAAW,oBAA4D;AACrE,QAAI,CAAC,KAAK,gBAAiB;AAC3B,UAAM,WAAW,KAAK,iBAAiB,UAAU,KAAK,CAAAA,cAAYA,UAAS,MAAM;AACjF,QAAI,CAAC,SAAU;AACf,SAAK,eAAe,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AACtE,SAAK,YAAY,KAAK,aAAa,UAAU,UAAQ,KAAK,MAAM;AAChE,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,gBAAgB;AACd,UAAM,mBACJ,CAAC,KAAK,mBAAmB,KAAK,YAAY,KAAK,KAAK,aAAa,KAAK,cAAc,SAAS;AAC/F,YAAQ,IAAI,gBAAgB;AAC5B,QAAI,KAAK,UAAU;AACjB,WAAK,WAAW;AAChB;AAAA,IACF;AACA,SAAK,WAAW;AAAA,EAClB;AAAA,EAEU,aAAa,YAA0B;AAC/C,SAAK;AAAA,MACH,IAAI,YAAY,0BAA0B;AAAA,QACxC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,IAAI;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAhFa,SAiBJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AApBT;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAD/B,SAEJ;AAGG;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAJ3C,SAKD;AALC,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":["testPart"]}
@@ -0,0 +1,91 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-AZIKAG7K.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-stamp.ts
9
+ import { html, LitElement, nothing } from "lit";
10
+ import { customElement, property, state } from "lit/decorators.js";
11
+ import { prepareTemplate } from "stampino";
12
+ import { consume } from "@lit/context";
13
+ var TestStamp = class extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.debug = false;
17
+ this.stampContext = {
18
+ view: "candidate",
19
+ activeItem: {},
20
+ activeSection: {
21
+ items: []
22
+ },
23
+ activeTestpart: {
24
+ items: []
25
+ },
26
+ test: {}
27
+ };
28
+ }
29
+ createRenderRoot() {
30
+ return this;
31
+ }
32
+ connectedCallback() {
33
+ super.connectedCallback();
34
+ const templateElement = this.querySelector("template");
35
+ if (!templateElement) {
36
+ this.myTemplate = null;
37
+ return;
38
+ }
39
+ this.myTemplate = prepareTemplate(templateElement);
40
+ }
41
+ willUpdate(_changedProperties) {
42
+ if (!this.computedContext) {
43
+ this.stampContext = null;
44
+ return;
45
+ }
46
+ const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
47
+ const activeSection = activeTestPart?.sections.find((section) => section.active);
48
+ const activeItem = activeSection?.items.find((item) => item.active);
49
+ const { variables, ...augmentedItem } = activeItem || {};
50
+ const augmentedTestPart = {
51
+ ...activeTestPart,
52
+ items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
53
+ sections: activeTestPart.sections.map((section) => ({
54
+ ...section,
55
+ items: section.items.map(({ variables: variables2, ...rest }) => rest)
56
+ }))
57
+ };
58
+ const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
59
+ const { testParts, ...activeTest } = this.computedContext;
60
+ this.stampContext = {
61
+ view: this.computedContext.view,
62
+ activeItem: augmentedItem,
63
+ activeSection: augmentedSection,
64
+ activeTestpart: augmentedTestPart,
65
+ test: activeTest
66
+ };
67
+ }
68
+ render() {
69
+ if (!this.stampContext) return nothing;
70
+ return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
71
+ ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
72
+ }
73
+ };
74
+ __decorateClass([
75
+ property({ type: Boolean, reflect: true })
76
+ ], TestStamp.prototype, "debug", 2);
77
+ __decorateClass([
78
+ state(),
79
+ consume({ context: computedContext, subscribe: true })
80
+ ], TestStamp.prototype, "computedContext", 2);
81
+ __decorateClass([
82
+ state()
83
+ ], TestStamp.prototype, "stampContext", 2);
84
+ TestStamp = __decorateClass([
85
+ customElement("test-stamp")
86
+ ], TestStamp);
87
+
88
+ export {
89
+ TestStamp
90
+ };
91
+ //# sourceMappingURL=chunk-PRO3U224.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n // if (!activeTestPart || !activeSection || !activeItem) {\n // this.stampContext = null;\n // return;\n // }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO,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MAChB,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,aAAc,QAAO;AAC/B,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AAlFS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}
@@ -0,0 +1,100 @@
1
+ import {
2
+ btn,
3
+ dis
4
+ } from "./chunk-5ZHHNEDA.js";
5
+ import {
6
+ computedContext
7
+ } from "./chunk-AZIKAG7K.js";
8
+ import {
9
+ __decorateClass
10
+ } from "./chunk-H2JE6IVU.js";
11
+
12
+ // src/lib/qti-test/components/test-prev.ts
13
+ import { css, html, LitElement } from "lit";
14
+ import { customElement, property, state } from "lit/decorators.js";
15
+ import { consume } from "@lit/context";
16
+ var TestPrev = class extends LitElement {
17
+ constructor() {
18
+ super();
19
+ this.disabled = true;
20
+ this._internallyDisabled = true;
21
+ this._internals = this.attachInternals();
22
+ this._internals.role = "button";
23
+ this._internals.ariaLabel = "Previous item";
24
+ this.addEventListener("click", (e) => {
25
+ e.preventDefault();
26
+ if (!this.effectiveDisabled) {
27
+ this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);
28
+ }
29
+ });
30
+ }
31
+ // Computed effective state
32
+ get effectiveDisabled() {
33
+ return this._internallyDisabled || this.disabled;
34
+ }
35
+ updated() {
36
+ if (this.effectiveDisabled) {
37
+ this.setAttribute("effective-disabled", "");
38
+ } else {
39
+ this.removeAttribute("effective-disabled");
40
+ }
41
+ }
42
+ // @watch('computedContext')
43
+ // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {
44
+ // if (newValue) {
45
+ // this.disabled = false;
46
+ // }
47
+ // }
48
+ willUpdate(_changedProperties) {
49
+ if (!this.computedContext) return;
50
+ const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
51
+ if (!testPart) return;
52
+ this.sectionItems = testPart.sections.flatMap((section) => section.items);
53
+ this.itemIndex = this.sectionItems.findIndex((item) => item.active);
54
+ this.checkDisabled();
55
+ }
56
+ checkDisabled() {
57
+ console.log;
58
+ this._internallyDisabled = !this.computedContext || this.itemIndex <= 0 || this.itemIndex === -1;
59
+ }
60
+ _requestItem(identifier) {
61
+ this.dispatchEvent(
62
+ new CustomEvent("qti-request-navigation", {
63
+ composed: true,
64
+ bubbles: true,
65
+ detail: {
66
+ type: "item",
67
+ id: identifier
68
+ }
69
+ })
70
+ );
71
+ }
72
+ render() {
73
+ return html`<slot></slot>`;
74
+ }
75
+ };
76
+ TestPrev.styles = css`
77
+ :host {
78
+ ${btn};
79
+ }
80
+ :host([effective-disabled]) {
81
+ ${dis};
82
+ }
83
+ `;
84
+ __decorateClass([
85
+ property({ type: Boolean, reflect: true })
86
+ ], TestPrev.prototype, "disabled", 2);
87
+ __decorateClass([
88
+ state()
89
+ ], TestPrev.prototype, "_internallyDisabled", 2);
90
+ __decorateClass([
91
+ consume({ context: computedContext, subscribe: true })
92
+ ], TestPrev.prototype, "computedContext", 2);
93
+ TestPrev = __decorateClass([
94
+ customElement("test-prev")
95
+ ], TestPrev);
96
+
97
+ export {
98
+ TestPrev
99
+ };
100
+ //# sourceMappingURL=chunk-RZK54XLD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-prev.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\n\n@customElement('test-prev')\nexport class TestPrev extends LitElement {\n // External control\n @property({ type: Boolean, reflect: true })\n public disabled = true;\n\n // Internal logic override\n @state()\n private _internallyDisabled = true;\n\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([effective-disabled]) {\n ${styles.dis};\n }\n `;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Previous item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.effectiveDisabled) {\n this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);\n }\n });\n }\n\n // Computed effective state\n get effectiveDisabled() {\n return this._internallyDisabled || this.disabled;\n }\n\n updated() {\n // Reflect effective state as attribute for styling\n if (this.effectiveDisabled) {\n this.setAttribute('effective-disabled', '');\n } else {\n this.removeAttribute('effective-disabled');\n }\n }\n\n // @watch('computedContext')\n // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n // if (newValue) {\n // this.disabled = false;\n // }\n // }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n\n this.checkDisabled();\n }\n\n checkDisabled() {\n console.log;\n this._internallyDisabled = !this.computedContext || this.itemIndex <= 0 || this.itemIndex === -1;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n render() {\n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G;AAAA,EAEU,aAAa,YAA0B;AAC/C,SAAK;AAAA,MACH,IAAI,YAAY,0BAA0B;AAAA,QACxC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,IAAI;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA9Fa,SAeJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AAjBT;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAF/B,SAGJ;AAIC;AAAA,EADP,MAAM;AAAA,GANI,SAOH;AAGA;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,SAUH;AAVG,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":["testPart"]}
@@ -0,0 +1,99 @@
1
+ import {
2
+ btn,
3
+ dis
4
+ } from "./chunk-5ZHHNEDA.js";
5
+ import {
6
+ computedContext
7
+ } from "./chunk-AZIKAG7K.js";
8
+ import {
9
+ __decorateClass
10
+ } from "./chunk-H2JE6IVU.js";
11
+
12
+ // src/lib/qti-test/components/test-prev.ts
13
+ import { css, html, LitElement } from "lit";
14
+ import { customElement, property, state } from "lit/decorators.js";
15
+ import { consume } from "@lit/context";
16
+ var TestPrev = class extends LitElement {
17
+ constructor() {
18
+ super();
19
+ this.disabled = true;
20
+ this._internallyDisabled = true;
21
+ this._internals = this.attachInternals();
22
+ this._internals.role = "button";
23
+ this._internals.ariaLabel = "Previous item";
24
+ this.addEventListener("click", (e) => {
25
+ e.preventDefault();
26
+ if (!this.effectiveDisabled) {
27
+ this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);
28
+ }
29
+ });
30
+ }
31
+ // Computed effective state
32
+ get effectiveDisabled() {
33
+ return this._internallyDisabled || this.disabled;
34
+ }
35
+ updated() {
36
+ if (this.effectiveDisabled) {
37
+ this.setAttribute("effective-disabled", "");
38
+ } else {
39
+ this.removeAttribute("effective-disabled");
40
+ }
41
+ }
42
+ // @watch('computedContext')
43
+ // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {
44
+ // if (newValue) {
45
+ // this.disabled = false;
46
+ // }
47
+ // }
48
+ willUpdate(_changedProperties) {
49
+ if (!this.computedContext) return;
50
+ const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
51
+ if (!testPart) return;
52
+ this.sectionItems = testPart.sections.flatMap((section) => section.items);
53
+ this.itemIndex = this.sectionItems.findIndex((item) => item.active);
54
+ this.checkDisabled();
55
+ }
56
+ checkDisabled() {
57
+ this._internallyDisabled = !this.computedContext || this.itemIndex <= 0 || this.itemIndex === -1;
58
+ }
59
+ _requestItem(identifier) {
60
+ this.dispatchEvent(
61
+ new CustomEvent("qti-request-navigation", {
62
+ composed: true,
63
+ bubbles: true,
64
+ detail: {
65
+ type: "item",
66
+ id: identifier
67
+ }
68
+ })
69
+ );
70
+ }
71
+ render() {
72
+ return html`<slot></slot>`;
73
+ }
74
+ };
75
+ TestPrev.styles = css`
76
+ :host {
77
+ ${btn};
78
+ }
79
+ :host([effective-disabled]) {
80
+ ${dis};
81
+ }
82
+ `;
83
+ __decorateClass([
84
+ property({ type: Boolean, reflect: true })
85
+ ], TestPrev.prototype, "disabled", 2);
86
+ __decorateClass([
87
+ state()
88
+ ], TestPrev.prototype, "_internallyDisabled", 2);
89
+ __decorateClass([
90
+ consume({ context: computedContext, subscribe: true })
91
+ ], TestPrev.prototype, "computedContext", 2);
92
+ TestPrev = __decorateClass([
93
+ customElement("test-prev")
94
+ ], TestPrev);
95
+
96
+ export {
97
+ TestPrev
98
+ };
99
+ //# sourceMappingURL=chunk-SBY26ONA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-prev.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\n\n@customElement('test-prev')\nexport class TestPrev extends LitElement {\n // External control\n @property({ type: Boolean, reflect: true })\n public disabled = true;\n\n // Internal logic override\n @state()\n private _internallyDisabled = true;\n\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([effective-disabled]) {\n ${styles.dis};\n }\n `;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Previous item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.effectiveDisabled) {\n this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);\n }\n });\n }\n\n // Computed effective state\n get effectiveDisabled() {\n return this._internallyDisabled || this.disabled;\n }\n\n updated() {\n // Reflect effective state as attribute for styling\n if (this.effectiveDisabled) {\n this.setAttribute('effective-disabled', '');\n } else {\n this.removeAttribute('effective-disabled');\n }\n }\n\n // @watch('computedContext')\n // _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n // if (newValue) {\n // this.disabled = false;\n // }\n // }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n\n this.checkDisabled();\n }\n\n checkDisabled() {\n this._internallyDisabled = !this.computedContext || this.itemIndex <= 0 || this.itemIndex === -1;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-prev': TestPrev;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,eAAe;AASjB,IAAM,WAAN,cAAuB,WAAW;AAAA,EA0BvC,cAAc;AACZ,UAAM;AAxBR,SAAO,WAAW;AAIlB,SAAQ,sBAAsB;AAqB5B,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,mBAAmB;AAC3B,aAAK,aAAa,KAAK,aAAa,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,MACpE;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAGA,IAAI,oBAAoB;AACtB,WAAO,KAAK,uBAAuB,KAAK;AAAA,EAC1C;AAAA,EAEA,UAAU;AAER,QAAI,KAAK,mBAAmB;AAC1B,WAAK,aAAa,sBAAsB,EAAE;AAAA,IAC5C,OAAO;AACL,WAAK,gBAAgB,oBAAoB;AAAA,IAC3C;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,WAAW,oBAA4D;AACrE,QAAI,CAAC,KAAK,gBAAiB;AAE3B,UAAM,WAAW,KAAK,iBAAiB,UAAU,KAAK,CAAAA,cAAYA,UAAS,MAAM;AACjF,QAAI,CAAC,SAAU;AAEf,SAAK,eAAe,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AACtE,SAAK,YAAY,KAAK,aAAa,UAAU,UAAQ,KAAK,MAAM;AAEhE,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,gBAAgB;AACd,SAAK,sBAAsB,CAAC,KAAK,mBAAmB,KAAK,aAAa,KAAK,KAAK,cAAc;AAAA,EAChG;AAAA,EAEU,aAAa,YAA0B;AAC/C,SAAK;AAAA,MACH,IAAI,YAAY,0BAA0B;AAAA,QACxC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,IAAI;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA7Fa,SAeJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AAjBT;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAF/B,SAGJ;AAIC;AAAA,EADP,MAAM;AAAA,GANI,SAOH;AAGA;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,SAUH;AAVG,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":["testPart"]}
@@ -0,0 +1,90 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-AZIKAG7K.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-stamp.ts
9
+ import { html, LitElement, nothing } from "lit";
10
+ import { customElement, property, state } from "lit/decorators.js";
11
+ import { prepareTemplate } from "stampino";
12
+ import { consume } from "@lit/context";
13
+ var TestStamp = class extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.debug = false;
17
+ this.stampContext = {
18
+ view: "candidate",
19
+ activeItem: {},
20
+ activeSection: {
21
+ items: []
22
+ },
23
+ activeTestpart: {
24
+ items: []
25
+ },
26
+ test: {}
27
+ };
28
+ }
29
+ createRenderRoot() {
30
+ return this;
31
+ }
32
+ connectedCallback() {
33
+ super.connectedCallback();
34
+ const templateElement = this.querySelector("template");
35
+ if (!templateElement) {
36
+ this.myTemplate = null;
37
+ return;
38
+ }
39
+ this.myTemplate = prepareTemplate(templateElement);
40
+ }
41
+ willUpdate(_changedProperties) {
42
+ if (!this.computedContext) {
43
+ this.stampContext = null;
44
+ return;
45
+ }
46
+ const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
47
+ const activeSection = activeTestPart?.sections.find((section) => section.active);
48
+ const activeItem = activeSection?.items.find((item) => item.active);
49
+ const { variables, ...augmentedItem } = activeItem || {};
50
+ const augmentedTestPart = {
51
+ ...activeTestPart,
52
+ items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
53
+ sections: activeTestPart.sections.map((section) => ({
54
+ ...section,
55
+ items: section.items.map(({ variables: variables2, ...rest }) => rest)
56
+ }))
57
+ };
58
+ const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
59
+ const { testParts, ...activeTest } = this.computedContext;
60
+ this.stampContext = {
61
+ view: this.computedContext.view,
62
+ activeItem: augmentedItem,
63
+ activeSection: augmentedSection,
64
+ activeTestpart: augmentedTestPart,
65
+ test: activeTest
66
+ };
67
+ }
68
+ render() {
69
+ return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
70
+ ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
71
+ }
72
+ };
73
+ __decorateClass([
74
+ property({ type: Boolean, reflect: true })
75
+ ], TestStamp.prototype, "debug", 2);
76
+ __decorateClass([
77
+ state(),
78
+ consume({ context: computedContext, subscribe: true })
79
+ ], TestStamp.prototype, "computedContext", 2);
80
+ __decorateClass([
81
+ state()
82
+ ], TestStamp.prototype, "stampContext", 2);
83
+ TestStamp = __decorateClass([
84
+ customElement("test-stamp")
85
+ ], TestStamp);
86
+
87
+ export {
88
+ TestStamp
89
+ };
90
+ //# sourceMappingURL=chunk-W7DAMVVM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n // if (!activeTestPart || !activeSection || !activeItem) {\n // this.stampContext = null;\n // return;\n // }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO,CAAC;AAAA,MACV;AAAA,MACA,MAAM,CAAC;AAAA,IACT;AAAA;AAAA,EAIU,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAAW,oBAA0C;AAC7D,QAAI,CAAC,KAAK,iBAAiB;AACzB,WAAK,eAAe;AACpB;AAAA,IACF;AACA,UAAM,iBAAiB,KAAK,gBAAgB,UAAU,KAAK,cAAY,SAAS,MAAM;AACtF,UAA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