@citolab/qti-components 7.16.0 → 7.16.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 (64) hide show
  1. package/dist/base.d.ts +48 -8
  2. package/dist/base.js +49 -2
  3. package/dist/base.js.map +1 -1
  4. package/dist/chunk-2DOYPVF5.js +481 -0
  5. package/dist/chunk-2DOYPVF5.js.map +1 -0
  6. package/dist/chunk-2ZEJ3RR5.js +89 -0
  7. package/dist/chunk-2ZEJ3RR5.js.map +1 -0
  8. package/dist/chunk-352OTVTY.js +3330 -0
  9. package/dist/chunk-352OTVTY.js.map +1 -0
  10. package/dist/chunk-C2HQFI2C.js +5927 -0
  11. package/dist/chunk-C2HQFI2C.js.map +1 -0
  12. package/dist/chunk-DWIRLYDS.js +20 -0
  13. package/dist/chunk-DWIRLYDS.js.map +1 -0
  14. package/dist/chunk-EUXUH3YW.js +15 -0
  15. package/dist/chunk-EUXUH3YW.js.map +1 -0
  16. package/dist/chunk-F44CI35W.js +145 -0
  17. package/dist/chunk-F44CI35W.js.map +1 -0
  18. package/dist/chunk-INKI27D5.js +493 -0
  19. package/dist/chunk-INKI27D5.js.map +1 -0
  20. package/dist/chunk-JEUY3MYB.js +2010 -0
  21. package/dist/chunk-JEUY3MYB.js.map +1 -0
  22. package/dist/chunk-O4XIWHTF.js +1139 -0
  23. package/dist/chunk-O4XIWHTF.js.map +1 -0
  24. package/dist/chunk-RI47B4ZT.js +1753 -0
  25. package/dist/chunk-RI47B4ZT.js.map +1 -0
  26. package/dist/chunk-VEV4DGPH.js +31 -0
  27. package/dist/chunk-VEV4DGPH.js.map +1 -0
  28. package/dist/chunk-W4SQRNWO.js +3844 -0
  29. package/dist/chunk-W4SQRNWO.js.map +1 -0
  30. package/dist/computed-item.context-CiddHLPz.d.ts +22 -0
  31. package/dist/computed.context-CH09_LCR.d.ts +45 -0
  32. package/dist/config.context-DAdkDDf5.d.ts +14 -0
  33. package/dist/elements.d.ts +318 -1
  34. package/dist/elements.js +41 -2
  35. package/dist/elements.js.map +1 -1
  36. package/dist/index.d.ts +21 -8
  37. package/dist/index.js +327 -9
  38. package/dist/index.js.map +1 -1
  39. package/dist/interaction-C5Up6-68.d.ts +56 -0
  40. package/dist/interactions.d.ts +913 -1
  41. package/dist/interactions.js +71 -2
  42. package/dist/interactions.js.map +1 -1
  43. package/dist/item.context-BRKXBC3m.d.ts +10 -0
  44. package/dist/item.d.ts +147 -1
  45. package/dist/item.js +22 -2
  46. package/dist/item.js.map +1 -1
  47. package/dist/loader.d.ts +21 -1
  48. package/dist/loader.js +10 -2
  49. package/dist/loader.js.map +1 -1
  50. package/dist/processing.d.ts +393 -1
  51. package/dist/processing.js +102 -2
  52. package/dist/processing.js.map +1 -1
  53. package/dist/qti-feedback-B4cMzOcq.d.ts +21 -0
  54. package/dist/qti-rule-base-dL4opfvi.d.ts +39 -0
  55. package/dist/qti-transform-test-Bz9A3hmD.d.ts +63 -0
  56. package/dist/test.context-Bpw1HNAZ.d.ts +28 -0
  57. package/dist/test.d.ts +569 -1
  58. package/dist/test.js +60 -2
  59. package/dist/test.js.map +1 -1
  60. package/dist/transformers.d.ts +18 -1
  61. package/dist/transformers.js +11 -2
  62. package/dist/transformers.js.map +1 -1
  63. package/dist/variables-CusMRnyJ.d.ts +69 -0
  64. package/package.json +8 -14
package/dist/index.js CHANGED
@@ -1,10 +1,328 @@
1
- // src/index.ts
2
- export * from "@qti-components/test";
3
- export * from "@qti-components/item";
4
- export * from "@qti-components/elements";
5
- export * from "@qti-components/interactions";
6
- export * from "@qti-components/transformers";
7
- export * from "@qti-components/loader";
8
- export * from "@qti-components/base";
9
- export * from "@qti-components/processing";
1
+ import {
2
+ QtiAssociableHotspot,
3
+ QtiAssociateInteraction,
4
+ QtiChoiceInteraction,
5
+ QtiCustomInteraction,
6
+ QtiEndAttemptInteraction,
7
+ QtiExtendedTextInteraction,
8
+ QtiGap,
9
+ QtiGapImg,
10
+ QtiGapMatchInteraction,
11
+ QtiGapText,
12
+ QtiGraphicAssociateInteraction,
13
+ QtiGraphicGapMatchInteraction,
14
+ QtiGraphicOrderInteraction,
15
+ QtiHotspotChoice,
16
+ QtiHotspotInteraction,
17
+ QtiHottext,
18
+ QtiHottextInteraction,
19
+ QtiInlineChoice,
20
+ QtiInlineChoiceInteraction,
21
+ QtiMatchInteraction,
22
+ QtiMediaInteraction,
23
+ QtiOrderInteraction,
24
+ QtiPortableCustomInteraction,
25
+ QtiPositionObjectInteraction,
26
+ QtiPositionObjectStage,
27
+ QtiSelectPointInteraction,
28
+ QtiSimpleAssociableChoice,
29
+ QtiSimpleChoice,
30
+ QtiSliderInteraction,
31
+ QtiTextEntryInteraction,
32
+ QtiUploadInteraction
33
+ } from "./chunk-C2HQFI2C.js";
34
+ import {
35
+ ItemContainer,
36
+ ItemCorrectResponseMode,
37
+ ItemPrintVariables,
38
+ ItemShowCandidateCorrection,
39
+ ItemShowCorrectResponse,
40
+ QtiItem
41
+ } from "./chunk-2DOYPVF5.js";
42
+ import {
43
+ getItemByUri,
44
+ getManifestInfo
45
+ } from "./chunk-VEV4DGPH.js";
46
+ import {
47
+ QtiAnd,
48
+ QtiBaseValue,
49
+ QtiContainerSize,
50
+ QtiContains,
51
+ QtiCorrect,
52
+ QtiDefault,
53
+ QtiDelete,
54
+ QtiEqual,
55
+ QtiEqualRounded,
56
+ QtiFieldValue,
57
+ QtiGcd,
58
+ QtiGt,
59
+ QtiGte,
60
+ QtiIndex,
61
+ QtiIsNull,
62
+ QtiLookupOutcomeValue,
63
+ QtiLt,
64
+ QtiLte,
65
+ QtiMapResponse,
66
+ QtiMapResponsePoint,
67
+ QtiMatch,
68
+ QtiMathOperator,
69
+ QtiMember,
70
+ QtiMultiple,
71
+ QtiNot,
72
+ QtiNull,
73
+ QtiOr,
74
+ QtiOrdered,
75
+ QtiPower,
76
+ QtiPrintedVariable,
77
+ QtiProduct,
78
+ QtiRandom,
79
+ QtiRandomInteger,
80
+ QtiResponseCondition,
81
+ QtiResponseElse,
82
+ QtiResponseElseIf,
83
+ QtiResponseIf,
84
+ QtiRound,
85
+ QtiRoundTo,
86
+ QtiSetOutcomeValue,
87
+ QtiSetOutcomeValueRule,
88
+ QtiStringMatch,
89
+ QtiSubtract,
90
+ QtiSum,
91
+ QtiSumExpression,
92
+ QtiVariable,
93
+ qtiAndMixin,
94
+ qtiSubtractMixin
95
+ } from "./chunk-RI47B4ZT.js";
96
+ import {
97
+ QtiAssessmentItemRef,
98
+ QtiAssessmentSection,
99
+ QtiAssessmentTest,
100
+ QtiTest,
101
+ QtiTestFeedback,
102
+ QtiTestPart,
103
+ TestCheckItem,
104
+ TestContainer,
105
+ TestEndAttempt,
106
+ TestItemLink,
107
+ TestNavigation,
108
+ TestNext,
109
+ TestPagingButtonsStamp,
110
+ TestPrev,
111
+ TestPrintContext,
112
+ TestPrintVariables,
113
+ TestScoringButtons,
114
+ TestScoringFeedback,
115
+ TestSectionButtonsStamp,
116
+ TestSectionLink,
117
+ TestShowCorrectResponse,
118
+ TestStamp,
119
+ TestView,
120
+ TestViewToggle
121
+ } from "./chunk-352OTVTY.js";
122
+ import {
123
+ QtiAssessmentItem,
124
+ QtiAssessmentStimulusRef,
125
+ QtiAssessmentStimulusRefConnectedEvent,
126
+ QtiCompanionMaterialsInfo,
127
+ QtiContentBody,
128
+ QtiCustomOperator,
129
+ QtiFeedbackBlock,
130
+ QtiFeedbackInline,
131
+ QtiItemBody,
132
+ QtiModalFeedback,
133
+ QtiOutcomeDeclaration,
134
+ QtiPrompt,
135
+ QtiResponseDeclaration,
136
+ QtiResponseProcessing,
137
+ QtiRubricBlock,
138
+ QtiStylesheet
139
+ } from "./chunk-O4XIWHTF.js";
140
+ import "./chunk-DWIRLYDS.js";
141
+ import "./chunk-W4SQRNWO.js";
142
+ import "./chunk-F44CI35W.js";
143
+ import "./chunk-2ZEJ3RR5.js";
144
+ import {
145
+ qtiTransformItem,
146
+ qtiTransformManifest,
147
+ qtiTransformTest
148
+ } from "./chunk-INKI27D5.js";
149
+ import {
150
+ Correctness,
151
+ INITIAL_SESSION_CONTEXT,
152
+ INITIAL_TEST_CONTEXT,
153
+ Interaction,
154
+ IsNullOrUndefined,
155
+ QtiConditionExpression,
156
+ QtiExpression,
157
+ QtiFeedback,
158
+ QtiRuleElement,
159
+ QtiVariableDeclaration,
160
+ ScoringHelper,
161
+ computedContext,
162
+ computedItemContext,
163
+ configContext,
164
+ convertNumberToUniversalFormat,
165
+ decimalSeparator,
166
+ itemContext,
167
+ itemContextVariables,
168
+ qtiContext,
169
+ removeDoubleSlashes,
170
+ sessionContext,
171
+ testContext
172
+ } from "./chunk-JEUY3MYB.js";
173
+ import "./chunk-EUXUH3YW.js";
174
+ export {
175
+ Correctness,
176
+ INITIAL_SESSION_CONTEXT,
177
+ INITIAL_TEST_CONTEXT,
178
+ Interaction,
179
+ IsNullOrUndefined,
180
+ ItemContainer,
181
+ ItemCorrectResponseMode,
182
+ ItemPrintVariables,
183
+ ItemShowCandidateCorrection,
184
+ ItemShowCorrectResponse,
185
+ QtiAnd,
186
+ QtiAssessmentItem,
187
+ QtiAssessmentItemRef,
188
+ QtiAssessmentSection,
189
+ QtiAssessmentStimulusRef,
190
+ QtiAssessmentStimulusRefConnectedEvent,
191
+ QtiAssessmentTest,
192
+ QtiAssociableHotspot,
193
+ QtiAssociateInteraction,
194
+ QtiBaseValue,
195
+ QtiChoiceInteraction,
196
+ QtiCompanionMaterialsInfo,
197
+ QtiConditionExpression,
198
+ QtiContainerSize,
199
+ QtiContains,
200
+ QtiContentBody,
201
+ QtiCorrect,
202
+ QtiCustomInteraction,
203
+ QtiCustomOperator,
204
+ QtiDefault,
205
+ QtiDelete,
206
+ QtiEndAttemptInteraction,
207
+ QtiEqual,
208
+ QtiEqualRounded,
209
+ QtiExpression,
210
+ QtiExtendedTextInteraction,
211
+ QtiFeedback,
212
+ QtiFeedbackBlock,
213
+ QtiFeedbackInline,
214
+ QtiFieldValue,
215
+ QtiGap,
216
+ QtiGapImg,
217
+ QtiGapMatchInteraction,
218
+ QtiGapText,
219
+ QtiGcd,
220
+ QtiGraphicAssociateInteraction,
221
+ QtiGraphicGapMatchInteraction,
222
+ QtiGraphicOrderInteraction,
223
+ QtiGt,
224
+ QtiGte,
225
+ QtiHotspotChoice,
226
+ QtiHotspotInteraction,
227
+ QtiHottext,
228
+ QtiHottextInteraction,
229
+ QtiIndex,
230
+ QtiInlineChoice,
231
+ QtiInlineChoiceInteraction,
232
+ QtiIsNull,
233
+ QtiItem,
234
+ QtiItemBody,
235
+ QtiLookupOutcomeValue,
236
+ QtiLt,
237
+ QtiLte,
238
+ QtiMapResponse,
239
+ QtiMapResponsePoint,
240
+ QtiMatch,
241
+ QtiMatchInteraction,
242
+ QtiMathOperator,
243
+ QtiMediaInteraction,
244
+ QtiMember,
245
+ QtiModalFeedback,
246
+ QtiMultiple,
247
+ QtiNot,
248
+ QtiNull,
249
+ QtiOr,
250
+ QtiOrderInteraction,
251
+ QtiOrdered,
252
+ QtiOutcomeDeclaration,
253
+ QtiPortableCustomInteraction,
254
+ QtiPositionObjectInteraction,
255
+ QtiPositionObjectStage,
256
+ QtiPower,
257
+ QtiPrintedVariable,
258
+ QtiProduct,
259
+ QtiPrompt,
260
+ QtiRandom,
261
+ QtiRandomInteger,
262
+ QtiResponseCondition,
263
+ QtiResponseDeclaration,
264
+ QtiResponseElse,
265
+ QtiResponseElseIf,
266
+ QtiResponseIf,
267
+ QtiResponseProcessing,
268
+ QtiRound,
269
+ QtiRoundTo,
270
+ QtiRubricBlock,
271
+ QtiRuleElement,
272
+ QtiSelectPointInteraction,
273
+ QtiSetOutcomeValue,
274
+ QtiSetOutcomeValueRule,
275
+ QtiSimpleAssociableChoice,
276
+ QtiSimpleChoice,
277
+ QtiSliderInteraction,
278
+ QtiStringMatch,
279
+ QtiStylesheet,
280
+ QtiSubtract,
281
+ QtiSum,
282
+ QtiSumExpression,
283
+ QtiTest,
284
+ QtiTestFeedback,
285
+ QtiTestPart,
286
+ QtiTextEntryInteraction,
287
+ QtiUploadInteraction,
288
+ QtiVariable,
289
+ QtiVariableDeclaration,
290
+ ScoringHelper,
291
+ TestCheckItem,
292
+ TestContainer,
293
+ TestEndAttempt,
294
+ TestItemLink,
295
+ TestNavigation,
296
+ TestNext,
297
+ TestPagingButtonsStamp,
298
+ TestPrev,
299
+ TestPrintContext,
300
+ TestPrintVariables,
301
+ TestScoringButtons,
302
+ TestScoringFeedback,
303
+ TestSectionButtonsStamp,
304
+ TestSectionLink,
305
+ TestShowCorrectResponse,
306
+ TestStamp,
307
+ TestView,
308
+ TestViewToggle,
309
+ computedContext,
310
+ computedItemContext,
311
+ configContext,
312
+ convertNumberToUniversalFormat,
313
+ decimalSeparator,
314
+ getItemByUri,
315
+ getManifestInfo,
316
+ itemContext,
317
+ itemContextVariables,
318
+ qtiAndMixin,
319
+ qtiContext,
320
+ qtiSubtractMixin,
321
+ qtiTransformItem,
322
+ qtiTransformManifest,
323
+ qtiTransformTest,
324
+ removeDoubleSlashes,
325
+ sessionContext,
326
+ testContext
327
+ };
10
328
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@qti-components/test';\nexport * from '@qti-components/item';\nexport * from '@qti-components/elements';\nexport * from '@qti-components/interactions';\nexport * from '@qti-components/transformers';\nexport * from '@qti-components/loader';\nexport * from '@qti-components/base';\nexport * from '@qti-components/processing';\n\n// Import version from package.json\n// import packageJson from '../package.json' with { type: 'json' };\n\n// console.info(\n// '%cC¿TO%cLab%c: qti-components v%c%s%c loaded',\n// 'font-family: \"PT Sans\", font-weight:bold; color:green; font-size: smaller;vertical-align: sub',\n// 'font-weight:bold; color:green',\n// 'font-weight:unset',\n// 'font-weight:bold; color:#2563eb',\n// packageJson.version,\n// 'font-weight:unset'\n// );\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,56 @@
1
+ import { LitElement } from 'lit';
2
+ import { a as ConfigContext } from './config.context-DAdkDDf5.js';
3
+ import { k as ResponseVariable } from './variables-CusMRnyJ.js';
4
+
5
+ interface IInteraction {
6
+ correctResponse: Readonly<string | string[]>;
7
+ response: string | string[];
8
+ responseIdentifier: string;
9
+ disabled: boolean;
10
+ readonly: boolean;
11
+ validate(): boolean;
12
+ reportValidity(): boolean;
13
+ reset(): void;
14
+ saveResponse(value: string | string[]): void;
15
+ }
16
+
17
+ declare enum Correctness {
18
+ Correct = "correct",
19
+ PartiallyCorrect = "partially-correct",
20
+ Incorrect = "incorrect"
21
+ }
22
+ declare abstract class Interaction extends LitElement implements IInteraction {
23
+ private _context;
24
+ protected configContext: ConfigContext;
25
+ static formAssociated: boolean;
26
+ protected _internals: ElementInternals;
27
+ get internals(): ElementInternals;
28
+ responseIdentifier: string;
29
+ disabled: boolean;
30
+ readonly: boolean;
31
+ protected _isFullCorrectResponse: boolean;
32
+ get isFullCorrectResponse(): Readonly<boolean>;
33
+ set isFullCorrectResponse(val: Readonly<boolean>);
34
+ protected _correctResponse: string | string[];
35
+ get correctResponse(): Readonly<string | string[]>;
36
+ set correctResponse(val: Readonly<string | string[]>);
37
+ get correctness(): Readonly<Correctness | null>;
38
+ get isInline(): boolean;
39
+ get responseVariable(): ResponseVariable | undefined;
40
+ toggleCorrectResponse(show: boolean): void;
41
+ protected toggleFullCorrectResponse(show: boolean): Promise<void>;
42
+ protected toggleInternalCorrectResponse(show: boolean): void;
43
+ toggleCandidateCorrection(show: boolean): void;
44
+ constructor();
45
+ abstract validate(): boolean;
46
+ get value(): string | null;
47
+ set value(val: string | null);
48
+ abstract get response(): string | string[] | null;
49
+ abstract set response(val: string | string[] | null);
50
+ reportValidity(): boolean;
51
+ reset(): void;
52
+ connectedCallback(): void;
53
+ saveResponse(value: string | string[]): void;
54
+ }
55
+
56
+ export { Correctness as C, Interaction as I, type IInteraction as a };