@citolab/qti-components 6.9.1-1 → 6.9.1-11

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.
package/dist/item.css CHANGED
@@ -642,13 +642,24 @@ qti-response-declaration {
642
642
 
643
643
  & qti-simple-match-set:last-of-type {
644
644
 
645
- & qti-simple-associable-choice {display:flex;flex-direction:column;height:8rem;margin:1px;--qti-bg-opacity:1;background-color:rgb(249 250 251 / var(--qti-bg-opacity));border-width:2px;--qti-border-opacity:1;border-color:rgb(156 163 175 / var(--qti-border-opacity));border-radius:0.5rem;border-style:solid;position:relative;outline:2px solid transparent;outline-offset:2px;
645
+ & qti-simple-associable-choice {
646
+ min-height: 4rem;display:flex;flex-direction:column;margin:1px;--qti-bg-opacity:1;background-color:rgb(249 250 251 / var(--qti-bg-opacity));border-width:2px;--qti-border-opacity:1;border-color:rgb(156 163 175 / var(--qti-border-opacity));border-radius:0.5rem;border-style:solid;position:relative;outline:2px solid transparent;outline-offset:2px;
646
647
  }
647
648
 
648
649
  & qti-simple-associable-choice:hover{--qti-bg-opacity:1;background-color:rgb(249 250 251 / var(--qti-bg-opacity));}
649
650
 
650
651
  & qti-simple-associable-choice:focus{outline-width:2px;--qti-outline-color-opacity:1;outline-color:rgb(0 255 0 / var(--qti-outline-color-opacity));}
651
652
 
653
+ & qti-simple-associable-choice[enabled] {outline-width:2px;--qti-outline-color-opacity:1;outline-color:rgb(0 255 0 / var(--qti-outline-color-opacity));
654
+ }
655
+
656
+ & qti-simple-associable-choice[active] {--qti-border-opacity:1;border-color:rgb(0 0 255 / var(--qti-border-opacity));
657
+ }
658
+
659
+ & qti-simple-associable-choice > *:not(qti-simple-associable-choice) {
660
+ pointer-events: none;
661
+ }
662
+
652
663
  & qti-simple-associable-choice > qti-simple-associable-choice {
653
664
  flex-basis: fit-content;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;padding-right:0.75rem;display:inline-block;--qti-bg-opacity:1;background-color:rgb(255 255 255 / var(--qti-bg-opacity));border-width:2px;--qti-border-opacity:1;border-color:rgb(156 163 175 / var(--qti-border-opacity));border-radius:0.375rem;border-style:solid;font-weight:600;cursor:grab;outline:2px solid transparent;outline-offset:2px;background-image:
654
665
  radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0, rgb(0, 0, 0, 0.1) 2px, white 2px, white 100%);
@@ -659,7 +670,7 @@ qti-response-declaration {
659
670
 
660
671
  & qti-simple-associable-choice>qti-simple-associable-choice:hover{--qti-bg-opacity:1;background-color:rgb(249 250 251 / var(--qti-bg-opacity));}
661
672
 
662
- & qti-simple-associable-choice>qti-simple-associable-choice:focus{outline-width:2px;--qti-outline-color-opacity:1;outline-color:rgb(0 255 0 / var(--qti-outline-color-opacity));}display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:0.5rem
673
+ & qti-simple-associable-choice>qti-simple-associable-choice:focus{outline-width:2px;--qti-outline-color-opacity:1;outline-color:rgb(0 255 0 / var(--qti-outline-color-opacity));}display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:0.5rem;width:100%
663
674
  }
664
675
  }
665
676
 
@@ -893,13 +893,13 @@ declare global {
893
893
 
894
894
  declare class QtiCustomInteraction extends Interaction {
895
895
  private rawResponse;
896
+ constructor();
896
897
  responseIdentifier: string;
897
898
  data: string;
898
899
  baseItemUrl: string;
899
900
  baseRefUrl: string;
900
901
  id: string;
901
902
  private _errorMessage;
902
- private channel;
903
903
  manifest: {
904
904
  script: string[];
905
905
  style: string[];
@@ -907,6 +907,10 @@ declare class QtiCustomInteraction extends Interaction {
907
907
  };
908
908
  connectedCallback(): void;
909
909
  setupCES(): void;
910
+ private getIFrames;
911
+ private getInnerIFrames;
912
+ private postToWindowAndIframes;
913
+ handlePostMessage(event: MessageEvent): void;
910
914
  validate(): boolean;
911
915
  set response(val: Readonly<string | string[]>);
912
916
  disconnectedCallback(): void;
@@ -936,6 +940,7 @@ declare const QtiGapMatchInteraction_base: (new (...args: any[]) => IInteraction
936
940
  declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
937
941
  static styles: lit.CSSResult[];
938
942
  render(): lit_html.TemplateResult<1>;
943
+ set correctResponse(value: Readonly<string | string[]>);
939
944
  }
940
945
  declare global {
941
946
  interface HTMLElementTagNameMap {
@@ -1035,15 +1040,17 @@ declare global {
1035
1040
 
1036
1041
  declare const QtiMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
1037
1042
  declare class QtiMatchInteraction extends QtiMatchInteraction_base {
1038
- static styles: any[];
1043
+ static styles: lit.CSSResult[];
1039
1044
  rows: QtiSimpleAssociableChoice[];
1040
1045
  cols: QtiSimpleAssociableChoice[];
1041
1046
  lastCheckedRadio: HTMLInputElement | null;
1042
1047
  response: any[];
1048
+ correctOptions: string[];
1043
1049
  responseIdentifier: string;
1044
1050
  connectedCallback(): void;
1045
1051
  handleRadioClick: (e: any) => void;
1046
1052
  handleRadioChange: (e: any) => void;
1053
+ set correctResponse(responseValue: string | string[]);
1047
1054
  render(): lit_html.TemplateResult<1>;
1048
1055
  }
1049
1056
  declare global {
@@ -1081,10 +1088,14 @@ declare class QtiOrderInteraction extends QtiOrderInteraction_base {
1081
1088
  private _classNames;
1082
1089
  private _orientation;
1083
1090
  static layoutClass: string[];
1091
+ nrChoices: number;
1092
+ correctResponses: string[];
1093
+ showCorrectResponses: boolean;
1084
1094
  /** orientation of choices */
1085
1095
  orientation: 'horizontal' | 'vertical';
1086
1096
  static styles: lit.CSSResult[];
1087
1097
  render(): lit_html.TemplateResult<1>;
1098
+ set correctResponse(value: Readonly<string | string[]>);
1088
1099
  connectedCallback(): void;
1089
1100
  }
1090
1101
  declare global {