@citolab/qti-components 7.14.3 → 7.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +4044 -4030
  3. package/custom-elements.json +10478 -26460
  4. package/dist/base.d.ts +8 -0
  5. package/dist/base.js +50 -0
  6. package/dist/{chunks/chunk-DGBI4IU5.js → chunk-2DOYPVF5.js} +252 -136
  7. package/dist/chunk-2DOYPVF5.js.map +1 -0
  8. package/dist/chunk-2ZEJ3RR5.js +89 -0
  9. package/dist/chunk-2ZEJ3RR5.js.map +1 -0
  10. package/dist/{chunks/chunk-E4GR4K26.js → chunk-352OTVTY.js} +1481 -442
  11. package/dist/chunk-352OTVTY.js.map +1 -0
  12. package/dist/{chunks/chunk-C4ELTNV7.js → chunk-C2HQFI2C.js} +857 -3819
  13. package/dist/chunk-C2HQFI2C.js.map +1 -0
  14. package/dist/chunk-DWIRLYDS.js +20 -0
  15. package/dist/chunk-DWIRLYDS.js.map +1 -0
  16. package/dist/{chunks/chunk-H2JE6IVU.js → chunk-EUXUH3YW.js} +1 -1
  17. package/dist/chunk-F44CI35W.js +145 -0
  18. package/dist/chunk-F44CI35W.js.map +1 -0
  19. package/dist/{chunks/chunk-XBPO6E25.js → chunk-INKI27D5.js} +6 -5
  20. package/dist/chunk-INKI27D5.js.map +1 -0
  21. package/dist/chunk-JEUY3MYB.js +2010 -0
  22. package/dist/chunk-JEUY3MYB.js.map +1 -0
  23. package/dist/chunk-O4XIWHTF.js +1139 -0
  24. package/dist/chunk-O4XIWHTF.js.map +1 -0
  25. package/dist/chunk-RI47B4ZT.js +1753 -0
  26. package/dist/chunk-RI47B4ZT.js.map +1 -0
  27. package/dist/{qti-loader/index.js → chunk-VEV4DGPH.js} +6 -6
  28. package/dist/chunk-VEV4DGPH.js.map +1 -0
  29. package/dist/{chunks/chunk-TN75CWLX.js → chunk-W4SQRNWO.js} +97 -2
  30. package/dist/chunk-W4SQRNWO.js.map +1 -0
  31. package/dist/elements.d.ts +1 -0
  32. package/dist/elements.js +42 -0
  33. package/dist/index.d.ts +8 -24
  34. package/dist/index.js +117 -285
  35. package/dist/index.js.map +1 -1
  36. package/dist/interactions.d.ts +1 -0
  37. package/dist/interactions.js +72 -0
  38. package/dist/item.d.ts +1 -0
  39. package/dist/item.js +23 -0
  40. package/dist/loader.d.ts +1 -0
  41. package/dist/loader.js +11 -0
  42. package/dist/processing.d.ts +1 -0
  43. package/dist/processing.js +103 -0
  44. package/dist/qti-components-jsx.d.ts +1475 -2388
  45. package/dist/test.d.ts +1 -0
  46. package/dist/{qti-test/index.js → test.js} +11 -19
  47. package/dist/transformers.d.ts +1 -0
  48. package/dist/{qti-transformers/index.js → transformers.js} +3 -3
  49. package/dist/vscode.html-custom-data.json +469 -631
  50. package/package.json +67 -164
  51. package/dist/chunks/chunk-4OGJBG35.js +0 -8
  52. package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
  53. package/dist/chunks/chunk-AGV5GOTF.js +0 -234
  54. package/dist/chunks/chunk-AGV5GOTF.js.map +0 -1
  55. package/dist/chunks/chunk-BHJSX3Q6.js +0 -8
  56. package/dist/chunks/chunk-BHJSX3Q6.js.map +0 -1
  57. package/dist/chunks/chunk-C4ELTNV7.js.map +0 -1
  58. package/dist/chunks/chunk-C5RLRG3L.js +0 -10
  59. package/dist/chunks/chunk-C5RLRG3L.js.map +0 -1
  60. package/dist/chunks/chunk-CJADUWEC.js +0 -10
  61. package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
  62. package/dist/chunks/chunk-DGBI4IU5.js.map +0 -1
  63. package/dist/chunks/chunk-DVQQ7I6Y.js +0 -8
  64. package/dist/chunks/chunk-DVQQ7I6Y.js.map +0 -1
  65. package/dist/chunks/chunk-E4GR4K26.js.map +0 -1
  66. package/dist/chunks/chunk-ELDMXTUQ.js +0 -31
  67. package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
  68. package/dist/chunks/chunk-GAAFN7QF.js +0 -146
  69. package/dist/chunks/chunk-GAAFN7QF.js.map +0 -1
  70. package/dist/chunks/chunk-H6KHXSIO.js +0 -8
  71. package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
  72. package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
  73. package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
  74. package/dist/chunks/chunk-NJNQOQUU.js +0 -8
  75. package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
  76. package/dist/chunks/chunk-P4QBOVQ2.js +0 -206
  77. package/dist/chunks/chunk-P4QBOVQ2.js.map +0 -1
  78. package/dist/chunks/chunk-SV4K25ZI.js +0 -19
  79. package/dist/chunks/chunk-SV4K25ZI.js.map +0 -1
  80. package/dist/chunks/chunk-TN75CWLX.js.map +0 -1
  81. package/dist/chunks/chunk-XBPO6E25.js.map +0 -1
  82. package/dist/exports/computed-item.context.d.ts +0 -23
  83. package/dist/exports/computed-item.context.js +0 -8
  84. package/dist/exports/computed.context.d.ts +0 -34
  85. package/dist/exports/computed.context.js +0 -8
  86. package/dist/exports/config.context.d.ts +0 -14
  87. package/dist/exports/config.context.js +0 -8
  88. package/dist/exports/expression-result.d.ts +0 -19
  89. package/dist/exports/expression-result.js +0 -1
  90. package/dist/exports/interaction.d.ts +0 -46
  91. package/dist/exports/interaction.interface.d.ts +0 -13
  92. package/dist/exports/interaction.interface.js +0 -1
  93. package/dist/exports/interaction.js +0 -12
  94. package/dist/exports/item.context.d.ts +0 -11
  95. package/dist/exports/item.context.js +0 -8
  96. package/dist/exports/qti-assessment-item.context.d.ts +0 -9
  97. package/dist/exports/qti-assessment-item.context.js +0 -8
  98. package/dist/exports/qti-condition-expression.d.ts +0 -14
  99. package/dist/exports/qti-condition-expression.js +0 -11
  100. package/dist/exports/qti-condition-expression.js.map +0 -1
  101. package/dist/exports/qti-expression.d.ts +0 -23
  102. package/dist/exports/qti-expression.js +0 -10
  103. package/dist/exports/qti-expression.js.map +0 -1
  104. package/dist/exports/qti-test.d.ts +0 -12
  105. package/dist/exports/qti-test.js +0 -1
  106. package/dist/exports/qti-test.js.map +0 -1
  107. package/dist/exports/qti.context.d.ts +0 -14
  108. package/dist/exports/qti.context.js +0 -8
  109. package/dist/exports/qti.context.js.map +0 -1
  110. package/dist/exports/session.context.d.ts +0 -15
  111. package/dist/exports/session.context.js +0 -10
  112. package/dist/exports/session.context.js.map +0 -1
  113. package/dist/exports/test.context.d.ts +0 -16
  114. package/dist/exports/test.context.js +0 -10
  115. package/dist/exports/test.context.js.map +0 -1
  116. package/dist/exports/variables.d.ts +0 -2
  117. package/dist/exports/variables.js +0 -1
  118. package/dist/exports/variables.js.map +0 -1
  119. package/dist/qti-assessment-item-l-mN3teH.d.ts +0 -105
  120. package/dist/qti-components/index.d.ts +0 -1524
  121. package/dist/qti-components/index.js +0 -216
  122. package/dist/qti-components/index.js.map +0 -1
  123. package/dist/qti-item/index.d.ts +0 -114
  124. package/dist/qti-item/index.js +0 -19
  125. package/dist/qti-item/index.js.map +0 -1
  126. package/dist/qti-loader/index.d.ts +0 -21
  127. package/dist/qti-loader/index.js.map +0 -1
  128. package/dist/qti-modal-feedback-Cp3CHVKw.d.ts +0 -30
  129. package/dist/qti-test/index.d.ts +0 -480
  130. package/dist/qti-test/index.js.map +0 -1
  131. package/dist/qti-test-mmY8zNIj.d.ts +0 -120
  132. package/dist/qti-transform-test-Bz9A3hmD.d.ts +0 -63
  133. package/dist/qti-transformers/index.d.ts +0 -18
  134. package/dist/qti-transformers/index.js.map +0 -1
  135. package/dist/variables-BCkyLoXK.d.ts +0 -55
  136. package/readme.md +0 -59
  137. /package/dist/{chunks/chunk-H2JE6IVU.js.map → base.js.map} +0 -0
  138. /package/dist/{exports/computed-item.context.js.map → chunk-EUXUH3YW.js.map} +0 -0
  139. /package/dist/{exports/computed.context.js.map → elements.js.map} +0 -0
  140. /package/dist/{exports/config.context.js.map → interactions.js.map} +0 -0
  141. /package/dist/{exports/expression-result.js.map → item.js.map} +0 -0
  142. /package/dist/{exports/interaction.interface.js.map → loader.js.map} +0 -0
  143. /package/dist/{exports/interaction.js.map → processing.js.map} +0 -0
  144. /package/dist/{exports/item.context.js.map → test.js.map} +0 -0
  145. /package/dist/{exports/qti-assessment-item.context.js.map → transformers.js.map} +0 -0
package/package.json CHANGED
@@ -1,198 +1,101 @@
1
1
  {
2
2
  "name": "@citolab/qti-components",
3
+ "version": "7.15.1",
4
+ "description": "QTI component utilities",
5
+ "main": "dist/index.js",
6
+ "keywords": [
7
+ "qti",
8
+ "components"
9
+ ],
10
+ "author": "",
11
+ "type": "module",
12
+ "sideEffects": [
13
+ "./dist/elements.js",
14
+ "./dist/interactions.js",
15
+ "./dist/processing.js",
16
+ "./dist/test.js",
17
+ "./dist/item.js"
18
+ ],
19
+ "license": "GPL-3.0-only",
3
20
  "repository": {
4
21
  "type": "git",
5
- "url": "git+https://github.com/Citolab/qti-components.git"
22
+ "url": "git+https://github.com/Citolab/qti-components.git",
23
+ "directory": "packages/qti-components"
6
24
  },
7
- "description": "QTI webcomponents",
8
- "author": {
9
- "name": "Patrick de Klein"
10
- },
11
- "contributors": [
12
- {
13
- "name": "Sander Looise"
14
- },
15
- {
16
- "name": "Marcel Hoekstra"
17
- }
18
- ],
19
- "license": "GPLv3",
20
- "private": false,
21
- "engines": {
22
- "node": ">=22.0.0"
25
+ "publishConfig": {
26
+ "access": "public"
23
27
  },
24
- "version": "7.14.3",
25
- "type": "module",
26
- "main": "./dist/index.js",
27
- "types": "./dist/index.d.ts",
28
- "sideEffects": true,
29
28
  "exports": {
30
29
  ".": {
31
30
  "types": "./dist/index.d.ts",
32
31
  "import": "./dist/index.js"
33
32
  },
34
- "./exports/*": {
35
- "import": "./dist/exports/*"
33
+ "./qti-base": {
34
+ "types": "./dist/base.d.ts",
35
+ "import": "./dist/base.js"
36
+ },
37
+ "./qti-elements": {
38
+ "types": "./dist/elements.d.ts",
39
+ "import": "./dist/elements.js"
40
+ },
41
+ "./qti-processing": {
42
+ "types": "./dist/processing.d.ts",
43
+ "import": "./dist/processing.js"
36
44
  },
37
- "./qti-components": {
38
- "types": "./dist/qti-components/index.d.ts",
39
- "import": "./dist/qti-components/index.js"
45
+ "./qti-interactions": {
46
+ "types": "./dist/interactions.d.ts",
47
+ "import": "./dist/interactions.js"
40
48
  },
41
49
  "./qti-item": {
42
- "types": "./dist/qti-item/index.d.ts",
43
- "import": "./dist/qti-item/index.js"
50
+ "types": "./dist/item.d.ts",
51
+ "import": "./dist/item.js"
44
52
  },
45
53
  "./qti-test": {
46
- "types": "./dist/qti-test/index.d.ts",
47
- "import": "./dist/qti-test/index.js"
54
+ "types": "./dist/test.d.ts",
55
+ "import": "./dist/test.js"
48
56
  },
49
57
  "./qti-loader": {
50
- "types": "./dist/qti-loader/index.d.ts",
51
- "import": "./dist/qti-loader/index.js"
58
+ "types": "./dist/loader.d.ts",
59
+ "import": "./dist/loader.js"
52
60
  },
53
61
  "./qti-transformers": {
54
- "types": "./dist/qti-transformers/index.d.ts",
55
- "import": "./dist/qti-transformers/index.js"
62
+ "types": "./dist/transformers.d.ts",
63
+ "import": "./dist/transformers.js"
56
64
  },
57
65
  "./customElements": "./custom-elements.json",
58
- "./react": "./dist/qti-components-jsx.d.ts",
59
66
  "./item.css": "./dist/item.css",
60
67
  "./cdn/*": "./cdn/*",
61
- "./package.json": "./package.json"
68
+ "./package.json": "./package.json",
69
+ "./react": "./dist/qti-components-jsx.d.ts"
62
70
  },
63
71
  "files": [
64
72
  "dist",
65
73
  "cdn",
66
74
  "custom-elements.json"
67
75
  ],
68
- "scripts": {
69
- "storybook": "run-p storybook:dev cem:watch",
70
- "watch": "nodemon --watch src --ext ts,css --exec \"run-s tsup cem css && yalc push\"",
71
- "-----------------------cmds--": "-",
72
- "pre-commit": "run-s lint stylelint madge",
73
- "commit-msg": "commitlint --edit",
74
- "build-storybook": "npm run cem && storybook build",
75
- "-----------------------scripts--": "-",
76
- "build": "run-p cem css tsup",
77
- "storybook:dev": "storybook dev -p 6006 --no-open",
78
- "cem": "cem analyze",
79
- "cem:watch": "cem analyze --watch",
80
- "css": "postcss src/item.css -d dist -m",
81
- "ci": "npm ci",
82
- "tsup": "tsup",
83
- "publint": "publint",
84
- "lint": "eslint src/**/*.ts",
85
- "stylelint": "stylelint \"src/**/*.css\"",
86
- "test": "vitest run",
87
- "attw": "attw --profile esm-only --pack --exclude-entrypoints ./item.css ./react",
88
- "chromatic": "node chromatic-runner.cjs",
89
- "clean": "rm -rf dist cdn",
90
- "madge": "madge --circular --extensions ts src",
91
- "commitlint": "commitlint --edit",
92
- "-----------------------npm--": "-",
93
- "prepare": "husky && npm run build"
94
- },
95
- "peerDependencies": {
76
+ "dependencies": {
77
+ "lit": "^3.3.1",
78
+ "@lit/context": "^1.1.6",
96
79
  "@heximal/templates": "^0.1.5",
97
- "@lit/context": "^1.1.3",
98
- "lit": "^3.2.1"
99
- },
100
- "devDependencies": {
101
- "@arethetypeswrong/cli": "^0.18.2",
102
- "@chromatic-com/storybook": "^4.1.1",
103
- "@commitlint/cli": "^19.8.1",
104
- "@commitlint/config-conventional": "^19.8.1",
105
- "@custom-elements-manifest/analyzer": "^0.10.4",
106
- "@eslint/js": "^9.29.0",
107
- "@heximal/templates": "0.1.5",
108
- "@lit/context": "^1.1.5",
109
- "@open-wc/lit-helpers": "^0.7.0",
110
- "@storybook/addon-a11y": "^9.1.5",
111
- "@storybook/addon-docs": "^9.1.5",
112
- "@storybook/addon-links": "^9.1.5",
113
- "@storybook/addon-themes": "^9.1.5",
114
- "@storybook/addon-vitest": "^9.1.5",
115
- "@storybook/web-components-vite": "^9.1.5",
116
- "@swc/core": "^1.12.1",
117
- "@testing-library/dom": "^10.4.0",
118
- "@types/dom-view-transitions": "^1.0.6",
119
- "@types/node": "^24.0.3",
120
- "@vitest/browser": "^3.2.4",
121
- "@vitest/coverage-v8": "^3.2.4",
122
- "@vitest/ui": "^3.2.4",
123
- "@wc-toolkit/cem-inheritance": "^1.2.2",
124
- "@wc-toolkit/cem-sorter": "^1.0.1",
125
- "@wc-toolkit/cem-utilities": "^1.5.0",
126
- "@wc-toolkit/changelog": "^1.0.2",
127
- "@wc-toolkit/jsx-types": "^1.4.3",
128
- "@wc-toolkit/storybook-helpers": "^9.0.1",
129
- "@wc-toolkit/type-parser": "^1.2.0",
130
- "autoprefixer": "^10.4.21",
131
- "chromatic": "^13.0.0",
132
- "custom-element-vs-code-integration": "^1.5.0",
133
- "custom-elements-manifest-deprecator": "^1.2.0",
134
- "dotenv": "^16.5.0",
135
- "eslint": "^9.29.0",
136
- "eslint-import-resolver-typescript": "^4.4.3",
137
- "eslint-plugin-import": "^2.31.0",
138
- "eslint-plugin-lit": "^2.1.1",
139
- "eslint-plugin-lit-a11y": "^5.0.1",
140
- "eslint-plugin-react": "^7.37.5",
141
- "eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
142
- "eslint-plugin-storybook": "^9.1.5",
143
- "eslint-plugin-wc": "^3.0.1",
144
- "fast-xml-parser": "^5.2.5",
145
- "globals": "^16.2.0",
146
- "globby": "^14.1.0",
147
- "husky": "^9.1.7",
148
- "lit": "^3.3.0",
149
- "madge": "^8.0.0",
150
- "mdx-mermaid": "^2.0.3",
151
- "mermaid": "^11.12.0",
152
- "msw": "^2.11.5",
153
- "msw-storybook-addon": "^2.0.5",
154
- "nodemon": "^3.1.10",
155
- "npm-run-all": "^4.1.5",
156
- "path-browserify": "^1.0.1",
157
- "pkg-pr-new": "^0.0.51",
158
- "playwright": "^1.53.0",
159
- "postcss": "^8.5.6",
160
- "postcss-class-apply": "^4.0.1",
161
- "postcss-cli": "^11.0.1",
162
- "postcss-import": "^16.1.1",
163
- "postcss-nesting": "^13.0.2",
164
- "prettier": "3.5.3",
165
- "prettier-v2": "npm:prettier@2.8.8",
166
- "publint": "^0.3.12",
167
- "remark-gfm": "^4.0.1",
168
- "shadow-dom-testing-library": "^1.12.0",
169
- "storybook": "^9.1.5",
170
- "storybook-addon-tag-badges": "^2.0.1",
171
- "stylelint": "^16.20.0",
172
- "stylelint-config-standard": "^38.0.0",
173
- "stylelint-prettier": "^5.0.3",
174
- "tsup": "^8.5.0",
175
- "typescript": "^5.8.3",
176
- "typescript-eslint": "^8.34.1",
177
- "vite": "^6.3.5",
178
- "vite-tsconfig-paths": "^5.1.4",
179
- "vitest": "^3.2.4",
180
- "yalc": "^1.0.0-pre.53"
181
- },
182
- "optionalDependencies": {
183
- "@rollup/rollup-linux-x64-gnu": "^4.43.0"
184
- },
185
- "customElements": "custom-elements.json",
186
- "bugs": {
187
- "url": "https://github.com/Citolab/qti-components/issues"
80
+ "@qti-components/test": "1.0.0",
81
+ "@qti-components/elements": "1.0.0",
82
+ "@qti-components/item": "1.0.0",
83
+ "@qti-components/interactions": "1.0.0",
84
+ "@qti-components/transformers": "1.0.0",
85
+ "@qti-components/processing": "1.0.0",
86
+ "@qti-components/loader": "1.0.0",
87
+ "@qti-components/base": "1.0.0",
88
+ "@qti-components/theme": "1.0.0"
188
89
  },
189
- "homepage": "https://github.com/Citolab/qti-components#readme",
190
- "overrides": {
191
- "storybook": "$storybook"
192
- },
193
- "msw": {
194
- "workerDirectory": [
195
- "public"
196
- ]
90
+ "customElements": "dist/custom-elements.json",
91
+ "scripts": {
92
+ "build": "run-p tsup css cem",
93
+ "clean": "rm -rf dist cdn",
94
+ "attw": "attw --pack --profile esm-only --format table",
95
+ "publint": "publint",
96
+ "-": "---build---",
97
+ "tsup": "tsup",
98
+ "css": "postcss ../qti-theme/src/item.css -d dist -m",
99
+ "cem": "cd ../../ && CEM_OUTDIR=packages/qti-components/ cem analyze --config custom-elements-manifest.config.mjs"
197
100
  }
198
101
  }
@@ -1,8 +0,0 @@
1
- // src/lib/exports/computed-item.context.ts
2
- import { createContext } from "@lit/context";
3
- var computedItemContext = createContext(Symbol("computedItemContext"));
4
-
5
- export {
6
- computedItemContext
7
- };
8
- //# sourceMappingURL=chunk-4OGJBG35.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/computed-item.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nimport type { VariableDeclaration } from './variables';\n\nexport type ComputedItemContext = {\n identifier: string;\n href?: string;\n correct?: boolean;\n incorrect?: boolean;\n completed?: boolean;\n adaptive?: boolean;\n timeDependent?: boolean;\n title?: string;\n label?: string;\n score?: number;\n maxScore?: number;\n completionStatus?: string;\n variables: ReadonlyArray<VariableDeclaration<string | string[] | null>>;\n};\n\nexport const computedItemContext = createContext<Readonly<ComputedItemContext>>(Symbol('computedItemContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAoBvB,IAAM,sBAAsB,cAA6C,OAAO,qBAAqB,CAAC;","names":[]}
@@ -1,234 +0,0 @@
1
- import {
2
- itemContext
3
- } from "./chunk-NJNQOQUU.js";
4
- import {
5
- __decorateClass
6
- } from "./chunk-H2JE6IVU.js";
7
-
8
- // src/lib/qti-components/qti-feedback/qti-feedback.ts
9
- import { consume } from "@lit/context";
10
- import { LitElement } from "lit";
11
- import { property, state } from "lit/decorators.js";
12
-
13
- // src/lib/qti-components/internal/utils.ts
14
- var decimalSeparator = () => {
15
- return new Intl.NumberFormat().format(0.1).replace(/\d/g, "");
16
- };
17
- var convertNumberToUniversalFormat = (number) => {
18
- if (typeof number === "string") {
19
- return number;
20
- }
21
- const dSep = decimalSeparator();
22
- if (dSep === ".") {
23
- return number.toLocaleString();
24
- } else {
25
- return number.toString().replace(".", "").replace(dSep, ".");
26
- }
27
- };
28
- function IsNullOrUndefined(value) {
29
- return value === null || value === void 0;
30
- }
31
- function removeDoubleSlashes(str) {
32
- const singleForwardSlashes = str.replace(/([^:]\/)\/+/g, "$1").replace(/\/\//g, "/").replace("http:/", "http://").replace("https:/", "https://");
33
- return singleForwardSlashes;
34
- }
35
-
36
- // src/lib/qti-components/qti-feedback/qti-feedback.ts
37
- var QtiFeedback = class extends LitElement {
38
- connectedCallback() {
39
- super.connectedCallback();
40
- this.dispatchEvent(
41
- new CustomEvent("qti-register-feedback", {
42
- bubbles: true,
43
- composed: true,
44
- detail: this
45
- })
46
- );
47
- }
48
- checkShowFeedback(outcomeIdentifier) {
49
- const outcomeVariable = this._context.variables.find((v) => v.identifier === outcomeIdentifier) || null;
50
- if (this.outcomeIdentifier !== outcomeIdentifier || !outcomeVariable) return;
51
- let isFound = false;
52
- if (Array.isArray(outcomeVariable.value)) {
53
- isFound = outcomeVariable.value.includes(this.identifier);
54
- } else {
55
- isFound = !IsNullOrUndefined(this.identifier) && !IsNullOrUndefined(outcomeVariable?.value) && this.identifier === outcomeVariable.value || false;
56
- }
57
- this.showFeedback(isFound);
58
- }
59
- showFeedback(value) {
60
- this.showStatus = value && this.showHide === "show" || !value && this.showHide === "hide" ? "on" : "off";
61
- }
62
- };
63
- __decorateClass([
64
- property({ type: String, attribute: "show-hide" })
65
- ], QtiFeedback.prototype, "showHide", 2);
66
- __decorateClass([
67
- property({ type: String, attribute: "outcome-identifier" })
68
- ], QtiFeedback.prototype, "outcomeIdentifier", 2);
69
- __decorateClass([
70
- property({ type: String })
71
- ], QtiFeedback.prototype, "identifier", 2);
72
- __decorateClass([
73
- property({ type: String, attribute: false })
74
- ], QtiFeedback.prototype, "showStatus", 2);
75
- __decorateClass([
76
- consume({ context: itemContext, subscribe: true }),
77
- state()
78
- ], QtiFeedback.prototype, "_context", 2);
79
-
80
- // src/lib/qti-components/qti-feedback/qti-modal-feedback/qti-modal-feedback.ts
81
- import { css, html } from "lit";
82
- import { customElement } from "lit/decorators.js";
83
- var QtiModalFeedback = class extends QtiFeedback {
84
- render() {
85
- return html`
86
- <dialog class="qti-dialog" part="feedback" ?open="${this.showStatus === "on"}">
87
- <slot></slot>
88
- <div style="margin-top: var(--qti-gap-size); text-align: center;">
89
- <button class="button close-button" @click="${this.closeFeedback}">Close</button>
90
- </div>
91
- </dialog>
92
- `;
93
- }
94
- openFeedback() {
95
- const dialog = this.shadowRoot?.querySelector("dialog");
96
- if (dialog && !dialog.open) {
97
- dialog.showModal();
98
- }
99
- }
100
- closeFeedback() {
101
- const dialog = this.shadowRoot?.querySelector("dialog");
102
- if (dialog && dialog.open) {
103
- dialog.close();
104
- this.showStatus = "off";
105
- }
106
- }
107
- connectedCallback() {
108
- super.connectedCallback();
109
- if (this.showStatus === "on") {
110
- this.openFeedback();
111
- }
112
- }
113
- updated(changedProperties) {
114
- if (changedProperties.has("showStatus")) {
115
- if (this.showStatus === "on") {
116
- this.openFeedback();
117
- } else {
118
- this.closeFeedback();
119
- }
120
- }
121
- }
122
- };
123
- QtiModalFeedback.styles = css`
124
- .qti-dialog {
125
- background: var(--qti-bg);
126
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
127
- border-radius: var(--qti-border-radius);
128
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
129
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
130
- position: fixed;
131
- top: 50%;
132
- left: 50%;
133
- transform: translate(-50%, -50%);
134
- z-index: 1000;
135
- width: auto;
136
- max-width: 90%;
137
- }
138
-
139
- .button {
140
- border-radius: var(--qti-border-radius);
141
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
142
- background-color: var(--qti-bg-active);
143
- border: var(--qti-border-active);
144
- cursor: pointer;
145
- position: relative;
146
- display: inline-block;
147
- }
148
-
149
- .button:hover {
150
- background-color: var(--qti-hover-bg);
151
- }
152
-
153
- .button:disabled {
154
- background-color: var(--qti-disabled-bg);
155
- color: var(--qti-disabled-color);
156
- cursor: not-allowed;
157
- }
158
-
159
- .button:focus {
160
- outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
161
- }
162
- `;
163
- QtiModalFeedback = __decorateClass([
164
- customElement("qti-modal-feedback")
165
- ], QtiModalFeedback);
166
-
167
- // src/lib/decorators/live-query.ts
168
- function liveQuery(querySelector, options) {
169
- return (proto, decoratedFnName) => {
170
- const { connectedCallback, disconnectedCallback } = proto;
171
- proto.connectedCallback = function() {
172
- connectedCallback.call(this);
173
- const handler = this[decoratedFnName];
174
- const callback = (mutationList) => {
175
- const added = [];
176
- const removed = [];
177
- for (const m of mutationList) {
178
- if (m.type !== "childList") continue;
179
- m.addedNodes.forEach((n) => {
180
- if (n.nodeType !== 1) return;
181
- const el = n;
182
- if (el.matches?.(querySelector)) added.push(el);
183
- added.push(...el.querySelectorAll?.(querySelector) ?? []);
184
- });
185
- m.removedNodes.forEach((n) => {
186
- if (n.nodeType !== 1) return;
187
- const el = n;
188
- if (el.matches?.(querySelector)) removed.push(el);
189
- removed.push(...el.querySelectorAll?.(querySelector) ?? []);
190
- });
191
- }
192
- const dedupe = (arr) => Array.from(new Set(arr));
193
- const A = dedupe(added);
194
- const R = dedupe(removed);
195
- if (A.length || R.length) {
196
- handler.call(this, A, R);
197
- }
198
- };
199
- const obsLight = new MutationObserver(callback);
200
- obsLight.observe(this, { childList: true, subtree: true });
201
- const obsShadow = this.shadowRoot ? new MutationObserver(callback) : null;
202
- obsShadow?.observe(this.shadowRoot, { childList: true, subtree: true });
203
- this.__lqObservers = [obsLight, obsShadow].filter((o) => !!o);
204
- const fireInitial = async () => {
205
- if (options?.waitUntilFirstUpdate && "updateComplete" in this) {
206
- await this.updateComplete;
207
- }
208
- const initial = [
209
- ...this.querySelectorAll(querySelector),
210
- ...this.shadowRoot?.querySelectorAll(querySelector) ?? []
211
- ];
212
- if (initial.length) handler.call(this, initial, []);
213
- };
214
- void fireInitial();
215
- };
216
- proto.disconnectedCallback = function() {
217
- disconnectedCallback.call(this);
218
- this.__lqObservers?.forEach((o) => o.disconnect());
219
- this.__lqObservers = void 0;
220
- };
221
- };
222
- }
223
-
224
- // src/lib/decorators/prop-internal-state.ts
225
- import { property as property2 } from "lit/decorators.js";
226
-
227
- export {
228
- liveQuery,
229
- convertNumberToUniversalFormat,
230
- removeDoubleSlashes,
231
- QtiFeedback,
232
- QtiModalFeedback
233
- };
234
- //# sourceMappingURL=chunk-AGV5GOTF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/qti-components/qti-feedback/qti-feedback.ts","../../src/lib/qti-components/internal/utils.ts","../../src/lib/qti-components/qti-feedback/qti-modal-feedback/qti-modal-feedback.ts","../../src/lib/decorators/live-query.ts","../../src/lib/decorators/prop-internal-state.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { IsNullOrUndefined } from '../internal/utils';\nimport { itemContext } from '../../exports/qti-assessment-item.context';\n\nimport type { ItemContext } from '../../exports/item.context';\n\nexport abstract class QtiFeedback extends LitElement {\n @property({ type: String, attribute: 'show-hide' })\n protected showHide: string;\n\n @property({ type: String, attribute: 'outcome-identifier' })\n public outcomeIdentifier: string;\n\n @property({ type: String })\n protected identifier: string;\n\n @property({ type: String, attribute: false })\n public showStatus: string;\n\n @consume({ context: itemContext, subscribe: true })\n @state()\n private _context?: ItemContext;\n\n public override connectedCallback() {\n super.connectedCallback();\n this.dispatchEvent(\n new CustomEvent<QtiFeedback>('qti-register-feedback', {\n bubbles: true,\n composed: true,\n detail: this\n })\n );\n }\n\n public checkShowFeedback(outcomeIdentifier: string) {\n const outcomeVariable = this._context.variables.find(v => v.identifier === outcomeIdentifier) || null;\n if (this.outcomeIdentifier !== outcomeIdentifier || !outcomeVariable) return;\n let isFound = false;\n if (Array.isArray(outcomeVariable.value)) {\n isFound = outcomeVariable.value.includes(this.identifier);\n } else {\n isFound =\n (!IsNullOrUndefined(this.identifier) &&\n !IsNullOrUndefined(outcomeVariable?.value) &&\n this.identifier === outcomeVariable.value) ||\n false;\n }\n\n this.showFeedback(isFound);\n }\n\n private showFeedback(value: boolean) {\n this.showStatus = (value && this.showHide === 'show') || (!value && this.showHide === 'hide') ? 'on' : 'off';\n }\n}\n","export const decimalSeparator = () => {\n return new Intl.NumberFormat().format(0.1).replace(/\\d/g, '');\n};\n\nexport const convertNumberToUniversalFormat = (number: number | string) => {\n // check if type is string\n if (typeof number === 'string') {\n return number;\n }\n const dSep = decimalSeparator();\n if (dSep === '.') {\n return number.toLocaleString();\n } else {\n return number.toString().replace('.', '').replace(dSep, '.');\n }\n};\n\nexport function IsNullOrUndefined(value: unknown) {\n return value === null || value === undefined;\n}\n\nexport function removeDoubleSlashes(str: string) {\n const singleForwardSlashes = str\n .replace(/([^:]\\/)\\/+/g, '$1')\n .replace(/\\/\\//g, '/')\n .replace('http:/', 'http://')\n .replace('https:/', 'https://');\n return singleForwardSlashes;\n}\n","import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { QtiFeedback } from '../qti-feedback';\n\n@customElement('qti-modal-feedback')\nexport class QtiModalFeedback extends QtiFeedback {\n static override styles = css`\n .qti-dialog {\n background: var(--qti-bg);\n border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);\n border-radius: var(--qti-border-radius);\n padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1000;\n width: auto;\n max-width: 90%;\n }\n\n .button {\n border-radius: var(--qti-border-radius);\n padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);\n background-color: var(--qti-bg-active);\n border: var(--qti-border-active);\n cursor: pointer;\n position: relative;\n display: inline-block;\n }\n\n .button:hover {\n background-color: var(--qti-hover-bg);\n }\n\n .button:disabled {\n background-color: var(--qti-disabled-bg);\n color: var(--qti-disabled-color);\n cursor: not-allowed;\n }\n\n .button:focus {\n outline: var(--qti-focus-border-width) solid var(--qti-focus-color);\n }\n `;\n\n override render() {\n return html`\n <dialog class=\"qti-dialog\" part=\"feedback\" ?open=\"${this.showStatus === 'on'}\">\n <slot></slot>\n <div style=\"margin-top: var(--qti-gap-size); text-align: center;\">\n <button class=\"button close-button\" @click=\"${this.closeFeedback}\">Close</button>\n </div>\n </dialog>\n `;\n }\n\n openFeedback() {\n const dialog = this.shadowRoot?.querySelector('dialog') as HTMLDialogElement | null;\n if (dialog && !dialog.open) {\n dialog.showModal();\n }\n }\n\n closeFeedback() {\n const dialog = this.shadowRoot?.querySelector('dialog') as HTMLDialogElement | null;\n if (dialog && dialog.open) {\n dialog.close();\n this.showStatus = 'off';\n }\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n if (this.showStatus === 'on') {\n this.openFeedback();\n }\n }\n\n protected updated(changedProperties: Map<string | number | symbol, unknown>): void {\n if (changedProperties.has('showStatus')) {\n if (this.showStatus === 'on') {\n this.openFeedback();\n } else {\n this.closeFeedback();\n }\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-modal-feedback': QtiModalFeedback;\n }\n}\n","import type { LitElement } from 'lit';\n\ntype LiveQueryHandler = (added: Element[], removed: Element[]) => void;\ntype LiveQueryHandlerKeys<T extends object> = {\n [K in keyof T]-?: T[K] extends LiveQueryHandler ? K : never;\n}[keyof T];\n\ninterface LiveQueryOptions {\n /**\n * If true, will only start watching after the initial update/render\n */\n waitUntilFirstUpdate?: boolean;\n}\n\nexport function liveQuery(querySelector: string, options?: LiveQueryOptions) {\n return <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: LiveQueryHandlerKeys<ElemClass>): void => {\n const { connectedCallback, disconnectedCallback } = proto;\n\n proto.connectedCallback = function (this: ElemClass) {\n connectedCallback.call(this);\n\n const handler = this[decoratedFnName] as unknown as LiveQueryHandler;\n\n const callback = (mutationList: MutationRecord[]) => {\n const added: Element[] = [];\n const removed: Element[] = [];\n\n for (const m of mutationList) {\n if (m.type !== 'childList') continue;\n\n m.addedNodes.forEach(n => {\n if (n.nodeType !== 1) return;\n const el = n as Element;\n if (el.matches?.(querySelector)) added.push(el);\n added.push(...(el.querySelectorAll?.(querySelector) ?? []));\n });\n\n m.removedNodes.forEach(n => {\n if (n.nodeType !== 1) return;\n const el = n as Element;\n if (el.matches?.(querySelector)) removed.push(el);\n removed.push(...(el.querySelectorAll?.(querySelector) ?? []));\n });\n }\n\n // deduplicate added and removed (might be multiples since we observe both light and shadow DOM)\n const dedupe = (arr: Element[]) => Array.from(new Set(arr));\n const A = dedupe(added);\n const R = dedupe(removed);\n\n if (A.length || R.length) {\n handler.call(this, A, R);\n }\n };\n\n // observe both light and shadow DOM\n const obsLight = new MutationObserver(callback);\n obsLight.observe(this, { childList: true, subtree: true });\n\n const obsShadow = this.shadowRoot ? new MutationObserver(callback) : null;\n obsShadow?.observe(this.shadowRoot, { childList: true, subtree: true });\n\n (this as any).__lqObservers = [obsLight, obsShadow].filter((o): o is MutationObserver => !!o);\n\n const fireInitial = async () => {\n if (options?.waitUntilFirstUpdate && 'updateComplete' in this) {\n await (this as any).updateComplete;\n }\n const initial = [\n ...this.querySelectorAll(querySelector),\n ...(this.shadowRoot?.querySelectorAll(querySelector) ?? [])\n ] as Element[];\n if (initial.length) handler.call(this, initial, []);\n };\n\n void fireInitial();\n };\n\n proto.disconnectedCallback = function (this: ElemClass) {\n disconnectedCallback.call(this);\n (this as any).__lqObservers?.forEach((o: MutationObserver) => o.disconnect());\n (this as any).__lqObservers = undefined;\n };\n };\n}\n","import { property } from 'lit/decorators.js';\n\nimport type { ReactiveElement } from 'lit';\nimport type { PropertyDeclaration } from 'lit';\n\n// Extended decorator options\ninterface InternalStateOptions extends PropertyDeclaration {\n aria?: string; // Corresponding ARIA attribute, e.g., 'aria-disabled'\n}\n\nexport function propInternalState(options: InternalStateOptions) {\n return (protoOrDescriptor: any, name: string) => {\n // Apply the default Lit `@property` decorator\n property(options)(protoOrDescriptor, name);\n\n // Intercept the property descriptor to enhance functionality\n const key = `__${name}`; // Internal backing field\n\n Object.defineProperty(protoOrDescriptor, name, {\n get() {\n return this[key];\n },\n set(value: any) {\n const oldValue = this[key];\n this[key] = value;\n\n // Trigger updates if value changes\n if (oldValue !== value) {\n // Update internals state\n if (this._internals?.states) {\n const stateName = name.toLowerCase();\n if (value) {\n this._internals.states.add(`--${stateName}`);\n } else {\n this._internals.states.delete(`--${stateName}`);\n }\n }\n\n // Update ARIA attributes if specified\n if (options.aria && this._internals) {\n const ariaAttribute = options.aria;\n if (value) {\n this._internals[ariaAttribute] = 'true';\n } else {\n this._internals[ariaAttribute] = null;\n }\n }\n\n // Request an update\n (this as ReactiveElement).requestUpdate(name, oldValue);\n }\n },\n configurable: true,\n enumerable: true\n });\n };\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,UAAU,aAAa;;;ACFzB,IAAM,mBAAmB,MAAM;AACpC,SAAO,IAAI,KAAK,aAAa,EAAE,OAAO,GAAG,EAAE,QAAQ,OAAO,EAAE;AAC9D;AAEO,IAAM,iCAAiC,CAAC,WAA4B;AAEzE,MAAI,OAAO,WAAW,UAAU;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,OAAO,iBAAiB;AAC9B,MAAI,SAAS,KAAK;AAChB,WAAO,OAAO,eAAe;AAAA,EAC/B,OAAO;AACL,WAAO,OAAO,SAAS,EAAE,QAAQ,KAAK,EAAE,EAAE,QAAQ,MAAM,GAAG;AAAA,EAC7D;AACF;AAEO,SAAS,kBAAkB,OAAgB;AAChD,SAAO,UAAU,QAAQ,UAAU;AACrC;AAEO,SAAS,oBAAoB,KAAa;AAC/C,QAAM,uBAAuB,IAC1B,QAAQ,gBAAgB,IAAI,EAC5B,QAAQ,SAAS,GAAG,EACpB,QAAQ,UAAU,SAAS,EAC3B,QAAQ,WAAW,UAAU;AAChC,SAAO;AACT;;;ADnBO,IAAe,cAAf,cAAmC,WAAW;AAAA,EAiBnC,oBAAoB;AAClC,UAAM,kBAAkB;AACxB,SAAK;AAAA,MACH,IAAI,YAAyB,yBAAyB;AAAA,QACpD,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEO,kBAAkB,mBAA2B;AAClD,UAAM,kBAAkB,KAAK,SAAS,UAAU,KAAK,OAAK,EAAE,eAAe,iBAAiB,KAAK;AACjG,QAAI,KAAK,sBAAsB,qBAAqB,CAAC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,EAAE,WAAW,CAAC;AAC5E,MAAC,KAAa,gBAAgB;AAAA,IAChC;AAAA,EACF;AACF;;;ACpFA,SAAS,YAAAA,iBAAgB;","names":["property"]}
@@ -1,8 +0,0 @@
1
- // src/lib/exports/config.context.ts
2
- import { createContext } from "@lit/context";
3
- var configContext = createContext(Symbol("configContext"));
4
-
5
- export {
6
- configContext
7
- };
8
- //# sourceMappingURL=chunk-BHJSX3Q6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/exports/config.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nexport type CorrectResponseMode = 'internal' | 'full';\n\nexport interface ConfigContext {\n infoItemCategory?: string;\n reportValidityAfterScoring?: boolean;\n disableAfterIfMaxChoicesReached?: boolean;\n correctResponseMode?: CorrectResponseMode;\n inlineChoicePrompt?: string;\n fullCorrectResponseOnlyWhenIncorrect?: boolean;\n}\n\nexport const configContext = createContext<Readonly<ConfigContext>>(Symbol('configContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAavB,IAAM,gBAAgB,cAAuC,OAAO,eAAe,CAAC;","names":[]}