@citolab/qti-components 6.0.19 → 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 (46) 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-UD6XWG6V.js → chunk-GEVRCVN2.cjs} +7 -14
  6. package/dist/chunk-GGEPFBR7.cjs +1 -0
  7. package/dist/chunk-HOQW4KDA.cjs +1 -0
  8. package/dist/chunk-M7QOVOG6.js +1 -0
  9. package/dist/{chunk-FIJLDR56.js → chunk-YDFMBQT4.js} +6 -12
  10. package/dist/context/index.cjs +1 -0
  11. package/dist/context/index.d.cts +1 -0
  12. package/dist/context/index.d.ts +1 -1
  13. package/dist/context/index.js +1 -1
  14. package/dist/decorators/index.cjs +1 -0
  15. package/dist/decorators/index.d.cts +37 -0
  16. package/dist/decorators/index.js +1 -1
  17. package/dist/index.cjs +2889 -0
  18. package/dist/index.d.cts +1063 -0
  19. package/dist/index.d.ts +27 -16
  20. package/dist/index.js +79 -80
  21. package/dist/{qti-assessment-item-68bcc951.d.ts → qti-assessment-item-c1eb7de3.d.ts} +5 -5
  22. package/dist/qti-components/index.cjs +419 -0
  23. package/dist/qti-components/index.d.cts +560 -0
  24. package/dist/qti-components/index.d.ts +21 -12
  25. package/dist/qti-components/index.js +74 -68
  26. package/dist/qti-item/index.cjs +1 -0
  27. package/dist/qti-item/index.d.cts +4 -0
  28. package/dist/qti-item/index.d.ts +2 -2
  29. package/dist/qti-item/index.js +1 -1
  30. package/dist/{qti-item-8c26fa9e.d.ts → qti-item-e2edd87f.d.ts} +1 -1
  31. package/dist/qti-item-react/index.cjs +1 -0
  32. package/dist/qti-item-react/index.d.cts +30 -0
  33. package/dist/qti-item-react/index.d.ts +3 -3
  34. package/dist/qti-item-react/index.js +1 -1
  35. package/dist/{qti-simple-choice-ca9b86db.d.ts → qti-simple-choice-e28cfb34.d.ts} +6 -3
  36. package/dist/qti-transform/index.cjs +17 -0
  37. package/dist/qti-transform/index.d.cts +17 -0
  38. package/package.json +25 -15
  39. package/dist/chunk-HQKT4SJF.js +0 -1
  40. package/dist/chunk-RPGALUIV.js +0 -1
  41. package/dist/context-a957e50e.d.ts +0 -9
  42. package/dist/custom-elements.json +0 -6766
  43. package/dist/index.css +0 -2200
  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-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;
@@ -425,7 +426,10 @@ declare class QtiTextEntryInteraction extends Interaction {
425
426
  patternMask: string;
426
427
  placeholderText: string;
427
428
  private _value;
429
+ private _size;
430
+ inputRef: lit_html_directives_ref.Ref<HTMLInputElement>;
428
431
  classNames: any;
432
+ handleclassNamesChange(old: any, classes: string): void;
429
433
  set response(value: string | undefined);
430
434
  validate(): boolean;
431
435
  static get styles(): lit.CSSResult[];
@@ -595,10 +599,13 @@ declare class QtiResponseElseIf extends QtiResponseIf {
595
599
  }
596
600
 
597
601
  declare class QtiExpression<T> extends LitElement {
602
+ protected _error: any[];
603
+ protected set error(val: string);
604
+ static styles: lit.CSSResult;
598
605
  render(): lit_html.TemplateResult<1>;
599
606
  calculate(): T;
600
607
  protected get assessmentItem(): QtiAssessmentItem;
601
- protected getVariables: () => ResponseVariable[];
608
+ protected getVariables: () => VariableDeclaration<string | string[]>[];
602
609
  }
603
610
 
604
611
  declare class QtiGt extends QtiExpression<boolean> {
@@ -644,7 +651,7 @@ declare class QtiEqual extends QtiExpression<boolean> {
644
651
  }
645
652
 
646
653
  declare class QtiEqualRounded extends QtiExpression<boolean> {
647
- roundingMode: "decimalPlaces" | "significantFigures";
654
+ roundingMode: 'decimalPlaces' | 'significantFigures';
648
655
  get figures(): number;
649
656
  calculate(): boolean;
650
657
  }
@@ -684,7 +691,7 @@ declare class QtiMatch extends QtiExpression<boolean> {
684
691
 
685
692
  declare class QtiVariable extends QtiExpression<number | string | string[]> {
686
693
  render(): lit_html.TemplateResult<1>;
687
- calculate(): string | number | string[];
694
+ calculate(): any;
688
695
  }
689
696
 
690
697
  declare class QtiMultiple extends QtiExpression<ResponseVariable[]> {
@@ -699,7 +706,11 @@ declare class QtPrintedVariable extends LitElement {
699
706
  value: string;
700
707
  render(): lit_html.TemplateResult<1>;
701
708
  constructor();
702
- calculate(): string | number | string[];
709
+ calculate(): any;
710
+ }
711
+
712
+ declare class QtiMember extends QtiExpression<boolean | null> {
713
+ calculate(): boolean;
703
714
  }
704
715
 
705
716
  declare class QtiPortableCustomInteraction extends LitElement {
@@ -1049,4 +1060,4 @@ declare const qtiTransform: (xmlValue: string) => {
1049
1060
  xml(): string;
1050
1061
  };
1051
1062
 
1052
- export { BaseType, Calculate, Cardinality, Events, InteractionChangedDetails, Multiple, Ordered, OutcomeChangedDetails, OutcomeVariable, QtPrintedVariable, QtiAnd, QtiAssessmentItem, QtiAssociableHotspot, QtiAssociateInteraction, QtiBaseValue, QtiChoice, qtiChoiceElementSelected as QtiChoiceElementSelected, 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, 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 };