@citolab/qti-components 6.0.20 → 6.0.22

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 (47) hide show
  1. package/dist/audience-context-444478f4.d.ts +8 -0
  2. package/dist/chunk-3O4URV5U.cjs +1 -0
  3. package/dist/chunk-5GG2XAUT.js +1 -0
  4. package/dist/chunk-6RJ7J4AE.cjs +1 -0
  5. package/dist/{chunk-AQI672QR.js → chunk-GEVRCVN2.cjs} +3 -3
  6. package/dist/chunk-GGEPFBR7.cjs +1 -0
  7. package/dist/chunk-HOQW4KDA.cjs +1 -0
  8. package/dist/{chunk-5RZQOWDC.js → chunk-YDFMBQT4.js} +2 -2
  9. package/dist/context/index.cjs +1 -0
  10. package/dist/context/index.d.cts +1 -0
  11. package/dist/context/index.d.ts +1 -1
  12. package/dist/context/index.js +1 -1
  13. package/dist/decorators/index.cjs +1 -0
  14. package/dist/decorators/index.d.cts +37 -0
  15. package/dist/index.cjs +2889 -0
  16. package/dist/index.d.cts +1063 -0
  17. package/dist/index.d.ts +24 -16
  18. package/dist/index.js +73 -63
  19. package/dist/{qti-assessment-item-68bcc951.d.ts → qti-assessment-item-c1eb7de3.d.ts} +5 -5
  20. package/dist/qti-components/index.cjs +419 -0
  21. package/dist/qti-components/index.d.cts +560 -0
  22. package/dist/qti-components/index.d.ts +21 -12
  23. package/dist/qti-components/index.js +76 -66
  24. package/dist/qti-item/index.cjs +1 -0
  25. package/dist/qti-item/index.d.cts +4 -0
  26. package/dist/qti-item/index.d.ts +2 -2
  27. package/dist/qti-item/index.js +1 -1
  28. package/dist/{qti-item-8c26fa9e.d.ts → qti-item-e2edd87f.d.ts} +1 -1
  29. package/dist/qti-item-react/index.cjs +1 -0
  30. package/dist/qti-item-react/index.d.cts +30 -0
  31. package/dist/qti-item-react/index.d.ts +3 -3
  32. package/dist/qti-item-react/index.js +1 -1
  33. package/dist/{qti-simple-choice-3e910d03.d.ts → qti-simple-choice-e28cfb34.d.ts} +2 -2
  34. package/dist/qti-transform/index.cjs +17 -0
  35. package/dist/qti-transform/index.d.cts +17 -0
  36. package/package.json +24 -14
  37. package/dist/chunk-FIJLDR56.js +0 -2204
  38. package/dist/chunk-HQKT4SJF.js +0 -1
  39. package/dist/chunk-RPGALUIV.js +0 -1
  40. package/dist/chunk-UD6XWG6V.js +0 -2205
  41. package/dist/context-a957e50e.d.ts +0 -9
  42. package/dist/custom-elements.json +0 -6772
  43. package/dist/index.css +0 -2193
  44. package/dist/qti-assessment-item-f1fcf393.d.ts +0 -120
  45. package/dist/qti-item-e1fc6a70.d.ts +0 -30
  46. package/dist/qti-simple-choice-ca9b86db.d.ts +0 -352
  47. package/dist/qti-simple-choice-d1392d78.d.ts +0 -352
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ interface Calculate {
18
18
  }
19
19
  type float = number;
20
20
  type integer = number;
21
- type BaseType = 'boolean' | 'directedPair' | 'float' | 'integer' | 'string' | 'identifier' | 'pair';
21
+ type BaseType = 'boolean' | 'directedPair' | 'duration' | 'float' | 'integer' | 'string' | 'identifier' | 'pair';
22
22
  type Multiple = string | string[][];
23
23
  type Ordered = string | string[][];
24
24
  type Cardinality = 'multiple' | 'ordered' | 'single';
@@ -26,7 +26,7 @@ type Cardinality = 'multiple' | 'ordered' | 'single';
26
26
  interface OutcomeChangedDetails {
27
27
  item: string;
28
28
  outcomeIdentifier: string;
29
- value: number;
29
+ value: number | string | string[];
30
30
  }
31
31
  type InteractionChangedDetails = ResponseInteraction & {
32
32
  item: string;
@@ -213,11 +213,11 @@ declare class ResponseVariable implements VariableDeclaration<string | string[]>
213
213
  set value(val: string | string[]);
214
214
  }
215
215
 
216
- declare class OutcomeVariable implements VariableDeclaration<number | string | undefined> {
216
+ declare class OutcomeVariable implements VariableDeclaration<number | string | string[] | undefined> {
217
217
  identifier: string;
218
218
  cardinality: Cardinality;
219
219
  baseType: BaseType;
220
- value: number | string | undefined;
220
+ value: number | string | string[] | undefined;
221
221
  }
222
222
 
223
223
  /**
@@ -255,7 +255,7 @@ declare class QtiAssessmentItem extends LitElement {
255
255
  set responses(myResponses: ResponseInteraction[]);
256
256
  resetInteractions(): void;
257
257
  validateResponses(): boolean;
258
- getVariableValue(identifier: string): string | string[] | number | null;
258
+ getVariable(identifier: string): VariableDeclaration<any>;
259
259
  getResponse(identifier: string): ResponseVariable | null;
260
260
  getOutcome(identifier: string): OutcomeVariable | null;
261
261
  private registerFeedbackElement;
@@ -263,7 +263,7 @@ declare class QtiAssessmentItem extends LitElement {
263
263
  private interactionResponse;
264
264
  private outcomeChanged;
265
265
  private showFeedback;
266
- setOutcomeValue(identifier: string, value: number): void;
266
+ setOutcomeValue(identifier: string, value: string | number): void;
267
267
  }
268
268
  declare global {
269
269
  interface HTMLElementTagNameMap {
@@ -351,7 +351,9 @@ declare class QtiResponseDeclaration extends QtiVariableDeclaration {
351
351
  }
352
352
 
353
353
  declare class QtiOutcomeDeclaration extends QtiVariableDeclaration {
354
- static get observedAttributes(): string[];
354
+ baseType: BaseType;
355
+ identifier: string;
356
+ cardinality: Cardinality;
355
357
  get interpolationTable(): any;
356
358
  connectedCallback(): void;
357
359
  }
@@ -359,9 +361,8 @@ declare class QtiOutcomeDeclaration extends QtiVariableDeclaration {
359
361
  declare class QtiCompanionMaterialsInfo extends LitElement {
360
362
  }
361
363
 
362
- interface Logger {
363
- view: string;
364
- log: (msg: string) => void;
364
+ interface Audience {
365
+ view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
365
366
  }
366
367
 
367
368
  declare class qtiRubricBlock extends LitElement {
@@ -372,7 +373,7 @@ declare class qtiRubricBlock extends LitElement {
372
373
  handleclassNamesChange(old: any, disabled: boolean): void;
373
374
  static styles: lit.CSSResult;
374
375
  logger: ContextConsumer<{
375
- __context__: Logger;
376
+ __context__: Audience;
376
377
  }, this>;
377
378
  render(): lit_html.TemplateResult<1>;
378
379
  connectedCallback(): void;
@@ -598,10 +599,13 @@ declare class QtiResponseElseIf extends QtiResponseIf {
598
599
  }
599
600
 
600
601
  declare class QtiExpression<T> extends LitElement {
602
+ protected _error: any[];
603
+ protected set error(val: string);
604
+ static styles: lit.CSSResult;
601
605
  render(): lit_html.TemplateResult<1>;
602
606
  calculate(): T;
603
607
  protected get assessmentItem(): QtiAssessmentItem;
604
- protected getVariables: () => ResponseVariable[];
608
+ protected getVariables: () => VariableDeclaration<string | string[]>[];
605
609
  }
606
610
 
607
611
  declare class QtiGt extends QtiExpression<boolean> {
@@ -647,7 +651,7 @@ declare class QtiEqual extends QtiExpression<boolean> {
647
651
  }
648
652
 
649
653
  declare class QtiEqualRounded extends QtiExpression<boolean> {
650
- roundingMode: "decimalPlaces" | "significantFigures";
654
+ roundingMode: 'decimalPlaces' | 'significantFigures';
651
655
  get figures(): number;
652
656
  calculate(): boolean;
653
657
  }
@@ -687,7 +691,7 @@ declare class QtiMatch extends QtiExpression<boolean> {
687
691
 
688
692
  declare class QtiVariable extends QtiExpression<number | string | string[]> {
689
693
  render(): lit_html.TemplateResult<1>;
690
- calculate(): string | number | string[];
694
+ calculate(): any;
691
695
  }
692
696
 
693
697
  declare class QtiMultiple extends QtiExpression<ResponseVariable[]> {
@@ -702,7 +706,11 @@ declare class QtPrintedVariable extends LitElement {
702
706
  value: string;
703
707
  render(): lit_html.TemplateResult<1>;
704
708
  constructor();
705
- calculate(): string | number | string[];
709
+ calculate(): any;
710
+ }
711
+
712
+ declare class QtiMember extends QtiExpression<boolean | null> {
713
+ calculate(): boolean;
706
714
  }
707
715
 
708
716
  declare class QtiPortableCustomInteraction extends LitElement {
@@ -1052,4 +1060,4 @@ declare const qtiTransform: (xmlValue: string) => {
1052
1060
  xml(): string;
1053
1061
  };
1054
1062
 
1055
- export { BaseType, Calculate, Cardinality, Events, InteractionChangedDetails, Multiple, Ordered, OutcomeChangedDetails, OutcomeVariable, QtPrintedVariable, QtiAnd, QtiAssessmentItem, QtiAssociableHotspot, QtiAssociateInteraction, QtiBaseValue, QtiChoice, qtiChoiceElementSelected as QtiChoiceElementSelected, QtiChoiceInteraction, QtiCompanionMaterialsInfo, QtiContains, QtiCorrect, QtiEndAttemptInteraction, QtiEqual, QtiEqualRounded, QtiExpression, QtiExtendedTextInteraction, QtiFeedbackBlock, QtiFeedbackInline, QtiGap, QtiGapImg, QtiGapMatchInteraction, QtiGapText, QtiGraphicAssociateInteraction, QtiGraphicGapMatchInteraction, QtiGraphicOrderInteraction, QtiGt, QtiGte, QtiHotspotChoice, QtiHotspotInteraction, QtiHottext, QtiHottextInteraction, QtiInlineChoice, QtiInlineChoiceInteraction, qtiInteractionChanged as QtiInteractionChanged, qtiInteractionResponse as QtiInteractionResponse, QtiIsNull, QtiItem, qtiLooseChoice as QtiLooseChoice, QtiLt, QtiLte, QtiMapResponse, QtiMapping, QtiMatch, QtiMatchInteraction, QtiMediaInteraction, QtiModalFeedback, QtiMultiple, QtiNot, QtiOr, QtiOrderInteraction, QtiOrdered, qtiOutcomeChanged as QtiOutcomeChanged, QtiOutcomeDeclaration, QtiPortableCustomInteraction, QtiPositionObjectStage, QtiProduct, QtiPrompt, qtiRegisterChoice as QtiRegisterChoice, qtiRegisterHotspot as QtiRegisterHotspot, qtiRegisterInteraction as QtiRegisterInteraction, qtiRegisterVariable as QtiRegisterVariable, QtiResponseCondition, QtiResponseDeclaration, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiResponseProcessing, QtiRule, QtiSPositionObjectInteraction, QtiSelectPointInteraction, QtiSetOutcomeValue, QtiSimpleAssociableChoice, QtiSimpleChoice, QtiSliderInteraction, QtiStylesheet, QtiTextEntryInteraction, QtiVariable, ResponseInteraction, ResponseVariable, directedPair, float, integer, qtiContentBody, qtiRubricBlock, qtiTransform };
1063
+ export { BaseType, Calculate, Cardinality, Events, InteractionChangedDetails, Multiple, Ordered, OutcomeChangedDetails, OutcomeVariable, QtPrintedVariable, QtiAnd, QtiAssessmentItem, QtiAssociableHotspot, QtiAssociateInteraction, QtiBaseValue, QtiChoice, qtiChoiceElementSelected as QtiChoiceElementSelected, QtiChoiceInteraction, QtiCompanionMaterialsInfo, QtiContains, QtiCorrect, QtiEndAttemptInteraction, QtiEqual, QtiEqualRounded, QtiExpression, QtiExtendedTextInteraction, QtiFeedbackBlock, QtiFeedbackInline, QtiGap, QtiGapImg, QtiGapMatchInteraction, QtiGapText, QtiGraphicAssociateInteraction, QtiGraphicGapMatchInteraction, QtiGraphicOrderInteraction, QtiGt, QtiGte, QtiHotspotChoice, QtiHotspotInteraction, QtiHottext, QtiHottextInteraction, QtiInlineChoice, QtiInlineChoiceInteraction, qtiInteractionChanged as QtiInteractionChanged, qtiInteractionResponse as QtiInteractionResponse, QtiIsNull, QtiItem, qtiLooseChoice as QtiLooseChoice, QtiLt, QtiLte, QtiMapResponse, QtiMapping, QtiMatch, QtiMatchInteraction, QtiMediaInteraction, QtiMember, QtiModalFeedback, QtiMultiple, QtiNot, QtiOr, QtiOrderInteraction, QtiOrdered, qtiOutcomeChanged as QtiOutcomeChanged, QtiOutcomeDeclaration, QtiPortableCustomInteraction, QtiPositionObjectStage, QtiProduct, QtiPrompt, qtiRegisterChoice as QtiRegisterChoice, qtiRegisterHotspot as QtiRegisterHotspot, qtiRegisterInteraction as QtiRegisterInteraction, qtiRegisterVariable as QtiRegisterVariable, QtiResponseCondition, QtiResponseDeclaration, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiResponseProcessing, QtiRule, QtiSPositionObjectInteraction, QtiSelectPointInteraction, QtiSetOutcomeValue, QtiSimpleAssociableChoice, QtiSimpleChoice, QtiSliderInteraction, QtiStylesheet, QtiTextEntryInteraction, QtiVariable, ResponseInteraction, ResponseVariable, directedPair, float, integer, qtiContentBody, qtiRubricBlock, qtiTransform };