eat-js-sdk 2.1.1 → 2.1.2

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.
@@ -5430,10 +5430,10 @@ const interactionUtils = {
5430
5430
  return "standard";
5431
5431
  }
5432
5432
  };
5433
- var root_1$p = /* @__PURE__ */ from_html(`<div><!></div>`);
5433
+ var root_1$o = /* @__PURE__ */ from_html(`<div><!></div>`);
5434
5434
  function CommonStringToHtml($$anchor, $$props) {
5435
5435
  push($$props, true);
5436
- let htmlString = prop($$props, "htmlString", 7, ""), otherClass = prop($$props, "otherClass", 7, ""), ariaHidden = prop($$props, "ariaHidden", 7, false), htmlHeading = prop($$props, "htmlHeading", 7, "");
5436
+ let htmlString = prop($$props, "htmlString", 7, ""), otherClass = prop($$props, "otherClass", 7, ""), ariaHidden = prop($$props, "ariaHidden", 7, false), htmlHeading = prop($$props, "htmlHeading", 7, ""), dataTestId = prop($$props, "dataTestId", 7);
5437
5437
  let processedHtml = /* @__PURE__ */ user_derived(() => processHtmlString(htmlString(), htmlHeading()));
5438
5438
  function processHtmlString(html2, heading) {
5439
5439
  if (html2 == null) return "";
@@ -5479,19 +5479,27 @@ function CommonStringToHtml($$anchor, $$props) {
5479
5479
  set htmlHeading($$value = "") {
5480
5480
  htmlHeading($$value);
5481
5481
  flushSync();
5482
+ },
5483
+ get dataTestId() {
5484
+ return dataTestId();
5485
+ },
5486
+ set dataTestId($$value) {
5487
+ dataTestId($$value);
5488
+ flushSync();
5482
5489
  }
5483
5490
  };
5484
5491
  var fragment = comment();
5485
5492
  var node = first_child(fragment);
5486
5493
  {
5487
5494
  var consequent = ($$anchor2) => {
5488
- var div = root_1$p();
5495
+ var div = root_1$o();
5489
5496
  var node_1 = child(div);
5490
5497
  html(node_1, () => get$1(processedHtml));
5491
5498
  reset(div);
5492
5499
  template_effect(() => {
5493
5500
  set_class(div, 1, clsx(otherClass()));
5494
5501
  set_attribute(div, "aria-hidden", ariaHidden());
5502
+ set_attribute(div, "data-testid", dataTestId());
5495
5503
  });
5496
5504
  append($$anchor2, div);
5497
5505
  };
@@ -5508,7 +5516,8 @@ create_custom_element(
5508
5516
  htmlString: {},
5509
5517
  otherClass: {},
5510
5518
  ariaHidden: {},
5511
- htmlHeading: {}
5519
+ htmlHeading: {},
5520
+ dataTestId: {}
5512
5521
  },
5513
5522
  [],
5514
5523
  [],
@@ -5662,11 +5671,11 @@ const svgIconRegistry = {
5662
5671
  pathFill: "currentColor"
5663
5672
  }
5664
5673
  };
5665
- var root_1$o = /* @__PURE__ */ from_svg(`<path></path>`);
5674
+ var root_1$n = /* @__PURE__ */ from_svg(`<path></path>`);
5666
5675
  var root$k = /* @__PURE__ */ from_svg(`<svg xmlns="http://www.w3.org/2000/svg"><!></svg>`);
5667
5676
  function SvgLoader($$anchor, $$props) {
5668
5677
  push($$props, true);
5669
- let width = prop($$props, "width", 7, void 0), height = prop($$props, "height", 7, void 0), svgName = prop($$props, "svgName", 7), className = prop($$props, "className", 7, void 0);
5678
+ let width = prop($$props, "width", 7, void 0), height = prop($$props, "height", 7, void 0), svgName = prop($$props, "svgName", 7), className = prop($$props, "className", 7, void 0), dataTestId = prop($$props, "dataTestId", 7);
5670
5679
  let iconProps = /* @__PURE__ */ user_derived(() => {
5671
5680
  const defaults = svgIconRegistry[svgName()] ?? {};
5672
5681
  return {
@@ -5708,13 +5717,20 @@ function SvgLoader($$anchor, $$props) {
5708
5717
  set className($$value = void 0) {
5709
5718
  className($$value);
5710
5719
  flushSync();
5720
+ },
5721
+ get dataTestId() {
5722
+ return dataTestId();
5723
+ },
5724
+ set dataTestId($$value) {
5725
+ dataTestId($$value);
5726
+ flushSync();
5711
5727
  }
5712
5728
  };
5713
5729
  var svg = root$k();
5714
5730
  var node = child(svg);
5715
5731
  {
5716
5732
  var consequent = ($$anchor2) => {
5717
- var path = root_1$o();
5733
+ var path = root_1$n();
5718
5734
  template_effect(() => {
5719
5735
  set_attribute(path, "fill-rule", get$1(iconProps).fillRule);
5720
5736
  set_attribute(path, "clip-rule", get$1(iconProps).clipRule);
@@ -5734,17 +5750,31 @@ function SvgLoader($$anchor, $$props) {
5734
5750
  set_attribute(svg, "viewBox", get$1(iconProps).viewBox);
5735
5751
  set_attribute(svg, "fill", get$1(iconProps).fill);
5736
5752
  set_class(svg, 0, clsx(className() ?? svgName()));
5753
+ set_attribute(svg, "data-testid", dataTestId());
5737
5754
  });
5738
5755
  append($$anchor, svg);
5739
5756
  return pop($$exports);
5740
5757
  }
5741
- create_custom_element(SvgLoader, { width: {}, height: {}, svgName: {}, className: {} }, [], [], true);
5758
+ create_custom_element(
5759
+ SvgLoader,
5760
+ {
5761
+ width: {},
5762
+ height: {},
5763
+ svgName: {},
5764
+ className: {},
5765
+ dataTestId: {}
5766
+ },
5767
+ [],
5768
+ [],
5769
+ true
5770
+ );
5742
5771
  var root$j = /* @__PURE__ */ from_html(`<span><!></span>`);
5743
5772
  function ResultIcon($$anchor, $$props) {
5744
5773
  push($$props, true);
5745
5774
  let isCorrect = prop($$props, "isCorrect", 7), iconType = prop($$props, "iconType", 7, "result"), parentProps = prop($$props, "parentProps", 7);
5746
5775
  let svgName = /* @__PURE__ */ user_derived(() => iconType() === "info" ? "infoSolid" : isCorrect() ? "successSolid" : "errorSolid");
5747
5776
  let className = /* @__PURE__ */ user_derived(() => iconType() === "info" ? "info-icon" : isCorrect() ? "correct-icon" : "incorrect-icon");
5777
+ let testId = /* @__PURE__ */ user_derived(() => iconType() === "info" ? "icon-alt-info" : isCorrect() ? "icon-correct" : "icon-incorrect");
5748
5778
  var $$exports = {
5749
5779
  get isCorrect() {
5750
5780
  return isCorrect();
@@ -5776,6 +5806,9 @@ function ResultIcon($$anchor, $$props) {
5776
5806
  },
5777
5807
  get className() {
5778
5808
  return get$1(className);
5809
+ },
5810
+ get dataTestId() {
5811
+ return get$1(testId);
5779
5812
  }
5780
5813
  });
5781
5814
  reset(span);
@@ -5785,7 +5818,7 @@ function ResultIcon($$anchor, $$props) {
5785
5818
  }
5786
5819
  create_custom_element(ResultIcon, { isCorrect: {}, iconType: {}, parentProps: {} }, [], [], true);
5787
5820
  var root_3$c = /* @__PURE__ */ from_html(`<span class="sr-only">Alert. &nbsp;</span>`);
5788
- var root_1$n = /* @__PURE__ */ from_html(`<div><!> <div><!> <span><!></span></div></div>`);
5821
+ var root_1$m = /* @__PURE__ */ from_html(`<div data-testid="feedback-alt"><!> <div><!> <span><!></span></div></div>`);
5789
5822
  function FeedbackAlert($$anchor, $$props) {
5790
5823
  push($$props, true);
5791
5824
  let type = prop($$props, "type", 7, "incorrect"), message = prop($$props, "message", 7, ""), showIcon = prop($$props, "showIcon", 7, false), iconType = prop($$props, "iconType", 7, "result"), isAlert = prop($$props, "isAlert", 7, true), iconProps = prop($$props, "iconProps", 7, "");
@@ -5849,7 +5882,7 @@ function FeedbackAlert($$anchor, $$props) {
5849
5882
  var node = first_child(fragment);
5850
5883
  {
5851
5884
  var consequent_2 = ($$anchor2) => {
5852
- var div = root_1$n();
5885
+ var div = root_1$m();
5853
5886
  var node_1 = child(div);
5854
5887
  {
5855
5888
  var consequent = ($$anchor3) => {
@@ -5895,7 +5928,7 @@ function FeedbackAlert($$anchor, $$props) {
5895
5928
  reset(div_1);
5896
5929
  reset(div);
5897
5930
  template_effect(() => {
5898
- set_class(div, 1, clsx(get$1(alertClasses)));
5931
+ set_class(div, 1, `feedback-alt ${get$1(alertClasses) ?? ""}`);
5899
5932
  set_attribute(div, "role", isAlert() ? "alert" : null);
5900
5933
  });
5901
5934
  append($$anchor2, div);
@@ -6215,7 +6248,7 @@ const useFocusTrap = () => {
6215
6248
  var root$i = /* @__PURE__ */ from_html(`<dialog aria-modal="true" class="bg-transparent max-w-none max-h-none w-screen h-screen"><div role="button" aria-hidden="true"></div> <!></dialog>`);
6216
6249
  function CommonModal($$anchor, $$props) {
6217
6250
  push($$props, true);
6218
- let modalData = prop($$props, "modalData", 23, () => ({ modalAriaLabel: "", isModalOpen: false })), modalClass = prop($$props, "modalClass", 7, ""), onupdateModalSettings = prop($$props, "onupdateModalSettings", 7), onclose = prop($$props, "onclose", 7), children = prop($$props, "children", 7);
6251
+ let modalData = prop($$props, "modalData", 23, () => ({ modalAriaLabel: "", isModalOpen: false })), modalClass = prop($$props, "modalClass", 7, ""), onupdateModalSettings = prop($$props, "onupdateModalSettings", 7), onclose = prop($$props, "onclose", 7), children = prop($$props, "children", 7), dataTestId = prop($$props, "dataTestId", 7);
6219
6252
  let modalAriaLabel = /* @__PURE__ */ user_derived(() => modalData()?.modalAriaLabel ?? "");
6220
6253
  let isModalOpen = /* @__PURE__ */ user_derived(() => modalData()?.isModalOpen ?? false);
6221
6254
  let dialogModal = /* @__PURE__ */ state(null);
@@ -6287,6 +6320,13 @@ function CommonModal($$anchor, $$props) {
6287
6320
  set children($$value) {
6288
6321
  children($$value);
6289
6322
  flushSync();
6323
+ },
6324
+ get dataTestId() {
6325
+ return dataTestId();
6326
+ },
6327
+ set dataTestId($$value) {
6328
+ dataTestId($$value);
6329
+ flushSync();
6290
6330
  }
6291
6331
  };
6292
6332
  var dialog = root$i();
@@ -6299,6 +6339,7 @@ function CommonModal($$anchor, $$props) {
6299
6339
  bind_this(dialog, ($$value) => set(dialogModal, $$value), () => get$1(dialogModal));
6300
6340
  template_effect(() => {
6301
6341
  set_attribute(dialog, "aria-label", get$1(modalAriaLabel));
6342
+ set_attribute(dialog, "data-testid", dataTestId());
6302
6343
  set_class(div, 1, `blanket-overlay ${modalClass() ?? ""}`);
6303
6344
  });
6304
6345
  event("close", dialog, () => {
@@ -6320,7 +6361,8 @@ create_custom_element(
6320
6361
  modalClass: {},
6321
6362
  onupdateModalSettings: {},
6322
6363
  onclose: {},
6323
- children: {}
6364
+ children: {},
6365
+ dataTestId: {}
6324
6366
  },
6325
6367
  [],
6326
6368
  [],
@@ -6336,7 +6378,7 @@ function fade(node, { delay = 0, duration = 400, easing = linear } = {}) {
6336
6378
  css: (t2) => `opacity: ${t2 * o2}`
6337
6379
  };
6338
6380
  }
6339
- var root_1$m = /* @__PURE__ */ from_html(`<div><div role="tooltip"> <span aria-hidden="true"></span></div></div>`);
6381
+ var root_1$l = /* @__PURE__ */ from_html(`<div><div role="tooltip" data-testid="img-viewer-tt"> <span aria-hidden="true"></span></div></div>`);
6340
6382
  var root$h = /* @__PURE__ */ from_html(`<div class="relative inline-block"><!> <!></div>`);
6341
6383
  function CommonTooltip($$anchor, $$props) {
6342
6384
  push($$props, true);
@@ -6529,7 +6571,7 @@ function CommonTooltip($$anchor, $$props) {
6529
6571
  var node_1 = sibling(node, 2);
6530
6572
  {
6531
6573
  var consequent = ($$anchor2) => {
6532
- var div_1 = root_1$m();
6574
+ var div_1 = root_1$l();
6533
6575
  var div_2 = child(div_1);
6534
6576
  var text_1 = child(div_2);
6535
6577
  var span = sibling(text_1);
@@ -6539,7 +6581,7 @@ function CommonTooltip($$anchor, $$props) {
6539
6581
  template_effect(() => {
6540
6582
  set_class(div_1, 1, `absolute z-50 pointer-events-none select-none ${get$1(containerPosClass) ?? ""}`);
6541
6583
  set_attribute(div_2, "aria-hidden", !get$1(isOpen));
6542
- set_class(div_2, 1, `rounded-md bg-gray-900 text-white p-3 font-normal text-sm leading-[150%] max-w-[300px] break-words ${tooltipClass() ?? ""}`);
6584
+ set_class(div_2, 1, `img-viewer-tt rounded-md bg-gray-900 text-white p-3 font-normal text-sm leading-[150%] max-w-[300px] break-words ${tooltipClass() ?? ""}`);
6543
6585
  set_text(text_1, `${text() ?? ""} `);
6544
6586
  set_class(span, 1, `tooltip-arrow absolute w-2 h-2 bg-gray-900 ${get$1(arrowPosClass) ?? ""}`);
6545
6587
  });
@@ -6581,11 +6623,11 @@ create_custom_element(
6581
6623
  ["show", "hide"],
6582
6624
  true
6583
6625
  );
6584
- var root_1$l = /* @__PURE__ */ from_html(`<span><!></span>`);
6626
+ var root_1$k = /* @__PURE__ */ from_html(`<span><!></span>`);
6585
6627
  var root$g = /* @__PURE__ */ from_html(`<button><!></button>`);
6586
6628
  function CommonButton($$anchor, $$props) {
6587
6629
  push($$props, true);
6588
- let ariaLabel = prop($$props, "ariaLabel", 7, ""), ariaHaspopup = prop($$props, "ariaHaspopup", 7), className = prop($$props, "className", 7, ""), disabled = prop($$props, "disabled", 7, false), pressed = prop($$props, "pressed", 7, false), transparent = prop($$props, "transparent", 7, false), variant = prop($$props, "variant", 7, "standard"), type = prop($$props, "type", 7, "button"), tabindex = prop($$props, "tabindex", 7, 0), onclick = prop($$props, "onclick", 7), children = prop($$props, "children", 7);
6630
+ let ariaLabel = prop($$props, "ariaLabel", 7, ""), ariaHaspopup = prop($$props, "ariaHaspopup", 7), className = prop($$props, "className", 7, ""), disabled = prop($$props, "disabled", 7, false), pressed = prop($$props, "pressed", 7, false), transparent = prop($$props, "transparent", 7, false), variant = prop($$props, "variant", 7, "standard"), type = prop($$props, "type", 7, "button"), tabindex = prop($$props, "tabindex", 7, 0), onclick = prop($$props, "onclick", 7), children = prop($$props, "children", 7), dataTestId = prop($$props, "dataTestId", 7);
6589
6631
  let buttonClasses = /* @__PURE__ */ user_derived(() => () => {
6590
6632
  switch (variant()) {
6591
6633
  case "touch-target":
@@ -6672,6 +6714,13 @@ function CommonButton($$anchor, $$props) {
6672
6714
  set children($$value) {
6673
6715
  children($$value);
6674
6716
  flushSync();
6717
+ },
6718
+ get dataTestId() {
6719
+ return dataTestId();
6720
+ },
6721
+ set dataTestId($$value) {
6722
+ dataTestId($$value);
6723
+ flushSync();
6675
6724
  }
6676
6725
  };
6677
6726
  var button = root$g();
@@ -6682,7 +6731,7 @@ function CommonButton($$anchor, $$props) {
6682
6731
  var node = child(button);
6683
6732
  {
6684
6733
  var consequent = ($$anchor2) => {
6685
- var span = root_1$l();
6734
+ var span = root_1$k();
6686
6735
  var node_1 = child(span);
6687
6736
  snippet(node_1, () => children() ?? noop);
6688
6737
  reset(span);
@@ -6709,6 +6758,7 @@ function CommonButton($$anchor, $$props) {
6709
6758
  set_attribute(button, "aria-label", ariaLabel());
6710
6759
  set_attribute(button, "aria-haspopup", ariaHaspopup());
6711
6760
  button.disabled = disabled();
6761
+ set_attribute(button, "data-testid", dataTestId());
6712
6762
  },
6713
6763
  [() => clsx(get$1(buttonClasses)())]
6714
6764
  );
@@ -6729,7 +6779,8 @@ create_custom_element(
6729
6779
  type: {},
6730
6780
  tabindex: {},
6731
6781
  onclick: {},
6732
- children: {}
6782
+ children: {},
6783
+ dataTestId: {}
6733
6784
  },
6734
6785
  [],
6735
6786
  [],
@@ -7111,10 +7162,11 @@ function MCQImageModal($$anchor, $$props) {
7111
7162
  variant: "standard",
7112
7163
  transparent: true,
7113
7164
  ariaLabel: "Previous",
7114
- className: "hidden md:flex absolute left-6 lg:left-16 top-1/2 -translate-y-1/2",
7165
+ className: "img-viewer-prev hidden md:flex absolute left-6 lg:left-16 top-1/2 -translate-y-1/2",
7115
7166
  get pressed() {
7116
7167
  return get$1(isLeftPressed);
7117
7168
  },
7169
+ dataTestId: "img-viewer-prev",
7118
7170
  onclick: navigatePrevious,
7119
7171
  children: ($$anchor4, $$slotProps2) => {
7120
7172
  var span = root_3$b();
@@ -7138,10 +7190,11 @@ function MCQImageModal($$anchor, $$props) {
7138
7190
  variant: "standard",
7139
7191
  transparent: true,
7140
7192
  ariaLabel: "Next",
7141
- className: "hidden md:flex absolute right-6 lg:right-16 top-1/2 -translate-y-1/2",
7193
+ className: "img-viewer-next hidden md:flex absolute right-6 lg:right-16 top-1/2 -translate-y-1/2",
7142
7194
  get pressed() {
7143
7195
  return get$1(isRightPressed);
7144
7196
  },
7197
+ dataTestId: "img-viewer-next",
7145
7198
  onclick: navigateNext,
7146
7199
  children: ($$anchor4, $$slotProps2) => {
7147
7200
  var span_1 = root_4$7();
@@ -7201,6 +7254,7 @@ function MCQImageModal($$anchor, $$props) {
7201
7254
  variant: "standard",
7202
7255
  ariaLabel: "Close",
7203
7256
  className: "flex-shrink-0 hidden md:flex",
7257
+ dataTestId: "img-close-btn",
7204
7258
  onclick: closeModal,
7205
7259
  children: ($$anchor4, $$slotProps2) => {
7206
7260
  SvgLoader($$anchor4, {
@@ -7215,6 +7269,7 @@ function MCQImageModal($$anchor, $$props) {
7215
7269
  variant: "touch-target",
7216
7270
  ariaLabel: "Close",
7217
7271
  className: "flex-shrink-0 md:hidden -mr-2.5",
7272
+ dataTestId: "img-close-btn",
7218
7273
  onclick: closeModal,
7219
7274
  children: ($$anchor4, $$slotProps2) => {
7220
7275
  SvgLoader($$anchor4, {
@@ -7240,6 +7295,8 @@ function MCQImageModal($$anchor, $$props) {
7240
7295
  get pressed() {
7241
7296
  return get$1(isLeftPressed);
7242
7297
  },
7298
+ className: "img-viewer-prev",
7299
+ dataTestId: "img-viewer-prev",
7243
7300
  onclick: navigatePrevious,
7244
7301
  children: ($$anchor4, $$slotProps2) => {
7245
7302
  var span_3 = root_8$5();
@@ -7265,6 +7322,8 @@ function MCQImageModal($$anchor, $$props) {
7265
7322
  get pressed() {
7266
7323
  return get$1(isRightPressed);
7267
7324
  },
7325
+ className: "img-viewer-next",
7326
+ dataTestId: "img-viewer-next",
7268
7327
  onclick: navigateNext,
7269
7328
  children: ($$anchor4, $$slotProps2) => {
7270
7329
  var span_4 = root_9$3();
@@ -7344,7 +7403,8 @@ function RubricSection($$anchor, $$props) {
7344
7403
  otherClass: "item-heading mb-4 w-full",
7345
7404
  get htmlHeading() {
7346
7405
  return get$1(headerElement);
7347
- }
7406
+ },
7407
+ dataTestId: "qn-rubric-txt"
7348
7408
  });
7349
7409
  };
7350
7410
  if_block(node, ($$render) => {
@@ -7419,7 +7479,6 @@ function getStimulusTextMaxHeight(fileAlignment, stimulusTextAlignment, hasMedia
7419
7479
  function configureHtmlString(htmlString, maxHeight = "") {
7420
7480
  return htmlString.replace(/<table>/g, `<div class="table-container ${maxHeight}" tabindex="0"><table>`).replace(/<\/table>/g, "</table></div>");
7421
7481
  }
7422
- var root_1$k = /* @__PURE__ */ from_html(`<h1><!></h1>`);
7423
7482
  function PromptSection($$anchor, $$props) {
7424
7483
  push($$props, true);
7425
7484
  let prompt = prop($$props, "prompt", 7);
@@ -7437,16 +7496,13 @@ function PromptSection($$anchor, $$props) {
7437
7496
  var node = first_child(fragment);
7438
7497
  {
7439
7498
  var consequent = ($$anchor2) => {
7440
- var h1 = root_1$k();
7441
- var node_1 = child(h1);
7442
- CommonStringToHtml(node_1, {
7499
+ CommonStringToHtml($$anchor2, {
7443
7500
  get htmlString() {
7444
7501
  return get$1(configuredPrompt);
7445
7502
  },
7446
- otherClass: "item-heading prompt"
7503
+ otherClass: "item-heading prompt",
7504
+ dataTestId: "qn-prompt-txt"
7447
7505
  });
7448
- reset(h1);
7449
- append($$anchor2, h1);
7450
7506
  };
7451
7507
  if_block(node, ($$render) => {
7452
7508
  if (prompt()) $$render(consequent);
@@ -7611,6 +7667,7 @@ function PromptStimulusImageModal($$anchor, $$props) {
7611
7667
  return get$1(modalData);
7612
7668
  },
7613
7669
  modalClass: "bg-charcoal/80 backdrop-blur-md",
7670
+ dataTestId: "img-viewer-modal",
7614
7671
  onupdateModalSettings: updateModalSettings,
7615
7672
  children: ($$anchor3, $$slotProps) => {
7616
7673
  var div = root_2$c();
@@ -7627,7 +7684,8 @@ function PromptStimulusImageModal($$anchor, $$props) {
7627
7684
  variant: "standard",
7628
7685
  ariaLabel: "Close",
7629
7686
  transparent: true,
7630
- className: "absolute top-1.5 right-1.5",
7687
+ className: "img-close-btn absolute top-1.5 right-1.5",
7688
+ dataTestId: "img-close-btn",
7631
7689
  onclick: closeModal,
7632
7690
  children: ($$anchor4, $$slotProps2) => {
7633
7691
  SvgLoader($$anchor4, {
@@ -8201,7 +8259,8 @@ function CommonMedia($$anchor, $$props) {
8201
8259
  variant: "standard",
8202
8260
  ariaLabel: "Expand image",
8203
8261
  ariaHaspopup: "dialog",
8204
- className: "absolute bottom-1.5 right-1.5 bg-white/80",
8262
+ className: "img-exp-btn absolute bottom-1.5 right-1.5 bg-white/80",
8263
+ dataTestId: "img-exp-btn",
8205
8264
  onclick: handleExpandClick,
8206
8265
  children: ($$anchor4, $$slotProps) => {
8207
8266
  SvgLoader($$anchor4, {
@@ -8239,7 +8298,8 @@ function CommonMedia($$anchor, $$props) {
8239
8298
  var node_5 = child(div_5);
8240
8299
  {
8241
8300
  let $0 = /* @__PURE__ */ user_derived(() => get$1(isLongDescOpened) ? "smallChevronUp" : "smallChevronDown");
8242
- let $1 = /* @__PURE__ */ user_derived(() => get$1(isLongDescOpened) ? "collapse-icon" : "expand-icon");
8301
+ let $1 = /* @__PURE__ */ user_derived(() => get$1(isLongDescOpened) ? "img-desc-coll collapse-icon" : "img-desc-ex expand-icon");
8302
+ let $2 = /* @__PURE__ */ user_derived(() => get$1(isLongDescOpened) ? "img-desc-coll" : "img-desc-ex");
8243
8303
  SvgLoader(node_5, {
8244
8304
  get svgName() {
8245
8305
  return get$1($0);
@@ -8247,6 +8307,9 @@ function CommonMedia($$anchor, $$props) {
8247
8307
  get className() {
8248
8308
  return get$1($1);
8249
8309
  },
8310
+ get dataTestId() {
8311
+ return get$1($2);
8312
+ },
8250
8313
  width: 12,
8251
8314
  height: 7
8252
8315
  });
@@ -8314,11 +8377,11 @@ create_custom_element(
8314
8377
  [],
8315
8378
  true
8316
8379
  );
8317
- var root_4$4 = /* @__PURE__ */ from_html(`<div><!></div>`);
8318
- var root_5$4 = /* @__PURE__ */ from_html(`<div><!></div>`);
8380
+ var root_4$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8381
+ var root_5$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8319
8382
  var root_3$a = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8320
- var root_7$3 = /* @__PURE__ */ from_html(`<div><!></div>`);
8321
- var root_8$4 = /* @__PURE__ */ from_html(`<div><!></div>`);
8383
+ var root_7$3 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-img-ctr"><!></div>`);
8384
+ var root_8$4 = /* @__PURE__ */ from_html(`<div data-testid="stimulus-txt-ctr"><!></div>`);
8322
8385
  var root_6$2 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
8323
8386
  var root_1$i = /* @__PURE__ */ from_html(`<div class="stimulus-section flex flex-col w-full"><!> <div><!></div></div>`);
8324
8387
  function StimulusSection($$anchor, $$props) {
@@ -8423,7 +8486,7 @@ function StimulusSection($$anchor, $$props) {
8423
8486
  }
8424
8487
  });
8425
8488
  reset(div_2);
8426
- template_effect(() => set_class(div_2, 1, clsx(get$1(textContainerClass))));
8489
+ template_effect(() => set_class(div_2, 1, `stimulus-txt-ctr ${get$1(textContainerClass) ?? ""}`));
8427
8490
  append($$anchor4, div_2);
8428
8491
  };
8429
8492
  if_block(node_3, ($$render) => {
@@ -8458,7 +8521,7 @@ function StimulusSection($$anchor, $$props) {
8458
8521
  }
8459
8522
  });
8460
8523
  reset(div_3);
8461
- template_effect(() => classes_2 = set_class(div_3, 1, clsx(get$1(mediaContainerClass)), null, classes_2, { hidden: !get$1(shouldShowMedia) }));
8524
+ template_effect(() => classes_2 = set_class(div_3, 1, `stimulus-img-ctr ${get$1(mediaContainerClass) ?? ""}`, null, classes_2, { hidden: !get$1(shouldShowMedia) }));
8462
8525
  append($$anchor4, div_3);
8463
8526
  };
8464
8527
  if_block(node_5, ($$render) => {
@@ -8497,7 +8560,7 @@ function StimulusSection($$anchor, $$props) {
8497
8560
  }
8498
8561
  });
8499
8562
  reset(div_4);
8500
- template_effect(() => classes_3 = set_class(div_4, 1, clsx(get$1(mediaContainerClass)), null, classes_3, { hidden: !get$1(shouldShowMedia) }));
8563
+ template_effect(() => classes_3 = set_class(div_4, 1, `stimulus-img-ctr ${get$1(mediaContainerClass) ?? ""}`, null, classes_3, { hidden: !get$1(shouldShowMedia) }));
8501
8564
  append($$anchor4, div_4);
8502
8565
  };
8503
8566
  if_block(node_7, ($$render) => {
@@ -8518,7 +8581,7 @@ function StimulusSection($$anchor, $$props) {
8518
8581
  }
8519
8582
  });
8520
8583
  reset(div_5);
8521
- template_effect(() => set_class(div_5, 1, clsx(get$1(textContainerClass))));
8584
+ template_effect(() => set_class(div_5, 1, `stimulus-txt-ctr ${get$1(textContainerClass) ?? ""}`));
8522
8585
  append($$anchor4, div_5);
8523
8586
  };
8524
8587
  if_block(node_9, ($$render) => {
@@ -8951,7 +9014,7 @@ var root_4$3 = /* @__PURE__ */ from_html(`<span aria-hidden="true" class="text-g
8951
9014
  var root_5$3 = /* @__PURE__ */ from_html(`<span aria-hidden="true"><!></span>`);
8952
9015
  var root_9$2 = /* @__PURE__ */ from_html(`<span class="w-3 h-2 flex items-center justify-center"><!></span>`);
8953
9016
  var root_8$2 = /* @__PURE__ */ from_html(`<span><!></span>`);
8954
- var root_10$2 = /* @__PURE__ */ from_html(`<div class="w-full overflow-hidden bg-white rounded-b-lg flex items-center justify-center relative"><img class="min-h-[154px] max-h-[184px] w-auto max-w-full object-contain pointer-events-none" loading="lazy"/></div>`);
9017
+ var root_10$2 = /* @__PURE__ */ from_html(`<div class="w-full overflow-hidden bg-white rounded-b-lg flex items-center justify-center relative"><img class="mcq-opt-img min-h-[154px] max-h-[184px] w-auto max-w-full object-contain pointer-events-none" data-testid="mcq-opt-img" loading="lazy"/></div>`);
8955
9018
  var root$d = /* @__PURE__ */ from_html(`<!> <div class="relative"><button><span><span class="flex items-center justify-between w-full"><span class="flex items-center"><span> </span> <span class="flex flex-col px-3 text-left"><!> <!> <!></span></span> <span class="flex items-center"><!> <!> <!></span></span></span> <!></button> <!></div>`, 1);
8956
9019
  function MCQOption($$anchor, $$props) {
8957
9020
  push($$props, true);
@@ -9102,7 +9165,11 @@ function MCQOption($$anchor, $$props) {
9102
9165
  var consequent_3 = ($$anchor2) => {
9103
9166
  var span_8 = root_4$3();
9104
9167
  var node_5 = child(span_8);
9105
- SvgLoader(node_5, { svgName: "success", className: "missing-correct-icon" });
9168
+ SvgLoader(node_5, {
9169
+ svgName: "success",
9170
+ className: "missing-correct-icon",
9171
+ dataTestId: "icon-miss-corr"
9172
+ });
9106
9173
  reset(span_8);
9107
9174
  append($$anchor2, span_8);
9108
9175
  };
@@ -9117,10 +9184,18 @@ function MCQOption($$anchor, $$props) {
9117
9184
  var node_7 = child(span_9);
9118
9185
  {
9119
9186
  var consequent_4 = ($$anchor3) => {
9120
- SvgLoader($$anchor3, { svgName: "successSolid", className: "correct-icon" });
9187
+ SvgLoader($$anchor3, {
9188
+ svgName: "successSolid",
9189
+ className: "correct-icon",
9190
+ dataTestId: "icon-correct"
9191
+ });
9121
9192
  };
9122
9193
  var alternate = ($$anchor3) => {
9123
- SvgLoader($$anchor3, { svgName: "errorSolid", className: "incorrect-icon" });
9194
+ SvgLoader($$anchor3, {
9195
+ svgName: "errorSolid",
9196
+ className: "incorrect-icon",
9197
+ dataTestId: "icon-incorrect"
9198
+ });
9124
9199
  };
9125
9200
  if_block(node_7, ($$render) => {
9126
9201
  if (get$1(correctAnswerIds).includes(option().id) || get$1(isPreviewMode2) && !get$1(isInteractiveMode2)) $$render(consequent_4);
@@ -9146,7 +9221,11 @@ function MCQOption($$anchor, $$props) {
9146
9221
  var consequent_6 = ($$anchor3) => {
9147
9222
  var span_11 = root_9$2();
9148
9223
  var node_10 = child(span_11);
9149
- SvgLoader(node_10, { svgName: "successRounded", className: "selected-icon" });
9224
+ SvgLoader(node_10, {
9225
+ svgName: "successRounded",
9226
+ className: "selected-icon",
9227
+ dataTestId: "icon-check-selected"
9228
+ });
9150
9229
  reset(span_11);
9151
9230
  append($$anchor3, span_11);
9152
9231
  };
@@ -9214,7 +9293,8 @@ function MCQOption($$anchor, $$props) {
9214
9293
  set_attribute(button, "aria-checked", get$1(totalCorrectAnswers) > 1 ? get$1(optionState)?.isSelected : null);
9215
9294
  set_attribute(button, "aria-disabled", get$1(optionState)?.isFinished && !get$1(isInteractiveMode2) ? "true" : null);
9216
9295
  set_attribute(button, "aria-label", get$1(ariaLabel));
9217
- set_class(button, 1, clsx(get$1(optionState)?.buttonClasses || "group btn-mcq-option"));
9296
+ set_class(button, 1, `${get$1(totalCorrectAnswers) > 1 ? "mcq-opt-chk" : "mcq-opt-btn"} ${(get$1(optionState)?.buttonClasses || "group btn-mcq-option") ?? ""}`);
9297
+ set_attribute(button, "data-testid", get$1(totalCorrectAnswers) > 1 ? "mcq-opt-chk" : "mcq-opt-btn");
9218
9298
  set_class(span, 1, `btn-mcq-text ${optionHasMedia() ? "min-h-[44px]" : ""}`);
9219
9299
  set_class(span_3, 1, `choice ${optionHasMedia() ? "my-1.5" : ""}`);
9220
9300
  set_text(text_1, $0);
@@ -9957,9 +10037,9 @@ function shouldSaveTextAnswer(currentAnswer, latestAnswer, isDataSaving) {
9957
10037
  const hasChanged = currentAnswer !== latestAnswer;
9958
10038
  return !isDataSaving && hasChanged;
9959
10039
  }
9960
- var root_1$e = /* @__PURE__ */ from_html(`<label class="absolute left-0 top-0 bottom-0" aria-hidden="true"><span class="absolute inset-0 bg-black opacity-5 rounded-l-lg w-8.5 h-10.5 top-1"></span> <span class="absolute font-semibold text-base leading-[19px] text-charcoal px-3 inline-block pt-[15px]"> </span></label>`);
10040
+ var root_1$e = /* @__PURE__ */ from_html(`<label class="inline-txb-lbl absolute left-0 top-0 bottom-0" data-testid="inline-txb-lbl" aria-hidden="true"><span class="absolute inset-0 bg-black opacity-5 rounded-l-lg w-8.5 h-10.5 top-1"></span> <span class="absolute font-semibold text-base leading-[19px] text-charcoal px-3 inline-block pt-[15px]"> </span></label>`);
9961
10041
  var root_2$8 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-3.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
9962
- var root$b = /* @__PURE__ */ from_html(`<span><!> <input placeholder="Type your answer here" autocomplete="off"/> <!></span>`);
10042
+ var root$b = /* @__PURE__ */ from_html(`<span><!> <input data-testid="input-inline-txb" placeholder="Type your answer here" autocomplete="off"/> <!></span>`);
9963
10043
  function TypeInInlineField($$anchor, $$props) {
9964
10044
  push($$props, true);
9965
10045
  let index2 = prop($$props, "index", 7), value = prop($$props, "value", 15), readonly = prop($$props, "readonly", 7, false), showStatus = prop($$props, "showStatus", 7, false), isCorrect = prop($$props, "isCorrect", 7, null), isMultiple = prop($$props, "isMultiple", 7, false), marginClass = prop($$props, "marginClass", 7, ""), onBlur = prop($$props, "onBlur", 7);
@@ -10109,7 +10189,7 @@ function TypeInInlineField($$anchor, $$props) {
10109
10189
  template_effect(() => {
10110
10190
  set_class(span, 1, `relative inline-block h-fit my-2 ${marginClass() ?? ""}`);
10111
10191
  set_attribute(input, "id", `inline-${index2() ?? ""}`);
10112
- set_class(input, 1, clsx(get$1(inputClasses)));
10192
+ set_class(input, 1, `input-inline-txb ${get$1(inputClasses) ?? ""}`);
10113
10193
  set_attribute(input, "aria-label", get$1(ariaLabel));
10114
10194
  input.readOnly = readonly();
10115
10195
  });
@@ -10137,9 +10217,9 @@ create_custom_element(
10137
10217
  );
10138
10218
  var root_1$d = /* @__PURE__ */ from_html(`<p class="p2 text-red-400 mb-3">Student's answer</p>`);
10139
10219
  var root_3$7 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10140
- var root_2$7 = /* @__PURE__ */ from_html(`<div class="relative"><textarea id="answerText" placeholder="Type your answer here" autocomplete="off" rows="3"></textarea> <!></div>`);
10220
+ var root_2$7 = /* @__PURE__ */ from_html(`<div class="relative"><textarea id="answerText" data-testid="input-long-txa" placeholder="Type your answer here" autocomplete="off" rows="3"></textarea> <!></div>`);
10141
10221
  var root_5$2 = /* @__PURE__ */ from_html(`<span class="w-8 h-8 absolute right-2 top-2.5 flex items-center justify-center" aria-hidden="true"><!></span>`);
10142
- var root_4$1 = /* @__PURE__ */ from_html(`<div class="relative"><input autocomplete="off" placeholder="Type your answer here"/> <!></div>`);
10222
+ var root_4$1 = /* @__PURE__ */ from_html(`<div class="relative"><input data-testid="input-short-txb" autocomplete="off" placeholder="Type your answer here"/> <!></div>`);
10143
10223
  var root$a = /* @__PURE__ */ from_html(`<div class="relative"><!> <!></div>`);
10144
10224
  function TypeInTextField($$anchor, $$props) {
10145
10225
  push($$props, true);
@@ -10268,7 +10348,7 @@ function TypeInTextField($$anchor, $$props) {
10268
10348
  }
10269
10349
  reset(div_1);
10270
10350
  template_effect(() => {
10271
- set_class(textarea, 1, `typein-textbox resize-none ${showStatus() && !isSkipped() && isCorrect() === true ? "border-2 border-green-700 bg-green-400" : ""} ${showStatus() && !isSkipped() && isCorrect() === false ? "border-2 border-red-850" : ""}`);
10351
+ set_class(textarea, 1, `input-long-txa typein-textbox resize-none ${showStatus() && !isSkipped() && isCorrect() === true ? "border-2 border-green-700 bg-green-400" : ""} ${showStatus() && !isSkipped() && isCorrect() === false ? "border-2 border-red-850" : ""}`);
10272
10352
  set_attribute(textarea, "aria-label", get$1(ariaLabel));
10273
10353
  textarea.readOnly = readonly();
10274
10354
  textarea.disabled = disabled();
@@ -10311,7 +10391,7 @@ function TypeInTextField($$anchor, $$props) {
10311
10391
  }
10312
10392
  reset(div_2);
10313
10393
  template_effect(() => {
10314
- set_class(input, 1, `typein-textbox typein-input ${showStatus() && !isSkipped() && isCorrect() === true ? "border-2 border-green-700 bg-green-400" : ""} ${showStatus() && !isSkipped() && isCorrect() === false ? "border-2 border-red-850" : ""}`);
10394
+ set_class(input, 1, `input-short-txb typein-textbox typein-input ${showStatus() && !isSkipped() && isCorrect() === true ? "border-2 border-green-700 bg-green-400" : ""} ${showStatus() && !isSkipped() && isCorrect() === false ? "border-2 border-red-850" : ""}`);
10315
10395
  set_attribute(input, "aria-label", get$1(ariaLabel));
10316
10396
  input.readOnly = readonly();
10317
10397
  input.disabled = disabled();
@@ -10412,7 +10492,7 @@ const action = (node) => {
10412
10492
  };
10413
10493
  action.update = n.update;
10414
10494
  action.destroy = n.destroy;
10415
- var root_1$c = /* @__PURE__ */ from_html(`<label aria-hidden="true"><span></span> <span> </span></label>`);
10495
+ var root_1$c = /* @__PURE__ */ from_html(`<label data-testid="qn-number-txt" aria-hidden="true"><span></span> <span> </span></label>`);
10416
10496
  var root_2$6 = /* @__PURE__ */ from_html(`<div role="textbox" aria-readonly="true"><!></div>`);
10417
10497
  var root_3$6 = /* @__PURE__ */ from_html(`<textarea rows="1" readonly=""></textarea>`);
10418
10498
  var root_4 = /* @__PURE__ */ from_html(`<span class="w-6 h-6 absolute right-4 top-[calc(50%+0.375rem)] -translate-y-1/2 flex items-center justify-center"><!></span>`);
@@ -10556,7 +10636,7 @@ function AnswerDisplay($$anchor, $$props) {
10556
10636
  reset(label);
10557
10637
  template_effect(() => {
10558
10638
  set_attribute(label, "for", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10559
- set_class(label, 1, clsx(get$1(labelClasses)));
10639
+ set_class(label, 1, `qn-number-txt ${get$1(labelClasses) ?? ""}`);
10560
10640
  set_class(span, 1, clsx(get$1(backgroundSpanClasses)));
10561
10641
  set_class(span_1, 1, clsx(get$1(numberSpanClasses)));
10562
10642
  set_text(text, questionNumber());
@@ -10584,7 +10664,8 @@ function AnswerDisplay($$anchor, $$props) {
10584
10664
  set_attribute(div_1, "aria-label", $0);
10585
10665
  set_attribute(div_1, "aria-labelledby", `textbox-${comparison().id ?? ""}-${questionNumber() - 1}`);
10586
10666
  set_attribute(div_1, "aria-describedby", `textbox-value-${comparison().id ?? ""}-${questionNumber() - 1}`);
10587
- set_class(div_1, 1, clsx(get$1(textareaClasses)));
10667
+ set_class(div_1, 1, `${type() === "correct" ? "ans-sum-corr-txb" : "ans-sum-stud-txb"} ${get$1(textareaClasses) ?? ""}`);
10668
+ set_attribute(div_1, "data-testid", type() === "correct" ? "ans-sum-corr-txb" : "ans-sum-stud-txb");
10588
10669
  set_attribute(div_1, "id", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10589
10670
  set_attribute(div_1, "tabindex", get$1(tabIndex));
10590
10671
  },
@@ -10600,7 +10681,8 @@ function AnswerDisplay($$anchor, $$props) {
10600
10681
  action$1(textarea, ($$node) => action?.($$node));
10601
10682
  template_effect(() => {
10602
10683
  set_attribute(textarea, "aria-label", get$1(ariaLabel));
10603
- set_class(textarea, 1, clsx(get$1(textareaClasses)));
10684
+ set_class(textarea, 1, `${type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb"} ${get$1(textareaClasses) ?? ""}`);
10685
+ set_attribute(textarea, "data-testid", type() === "student" ? "ans-sum-stud-txb" : "ans-sum-corr-txb");
10604
10686
  set_attribute(textarea, "id", `${type() ?? ""}-${comparison().id ?? ""}-${questionNumber() - 1}`);
10605
10687
  set_value(textarea, get$1(displayAnswer));
10606
10688
  set_attribute(textarea, "tabindex", get$1(tabIndex));
@@ -10656,7 +10738,7 @@ create_custom_element(
10656
10738
  [],
10657
10739
  true
10658
10740
  );
10659
- var root$8 = /* @__PURE__ */ from_html(`<div class="flex flex-col md:flex-row"><div class="flex flex-col md:w-1/2 md:pr-4"><p>Student's answers:</p> <!></div> <div><p>Correct answers:</p> <!></div></div>`);
10741
+ var root$8 = /* @__PURE__ */ from_html(`<div class="flex flex-col md:flex-row"><div class="flex flex-col md:w-1/2 md:pr-4"><p data-testid="ans-sum-stud-hdr">Student's answers:</p> <!></div> <div><p data-testid="ans-sum-corr-hdr">Correct answers:</p> <!></div></div>`);
10660
10742
  function ComparisonRow($$anchor, $$props) {
10661
10743
  push($$props, true);
10662
10744
  let comparison = prop($$props, "comparison", 7), showHeaders = prop($$props, "showHeaders", 7, false), isMultipleAnswers = prop($$props, "isMultipleAnswers", 7, false), isFirstRow = prop($$props, "isFirstRow", 7, false), interactionType = prop($$props, "interactionType", 7);
@@ -10770,9 +10852,9 @@ function ComparisonRow($$anchor, $$props) {
10770
10852
  reset(div_2);
10771
10853
  reset(div);
10772
10854
  template_effect(() => {
10773
- set_class(p, 1, clsx(get$1(studentHeaderClasses)));
10855
+ set_class(p, 1, `ans-sum-stud-hdr ${get$1(studentHeaderClasses) ?? ""}`);
10774
10856
  set_class(div_2, 1, `flex flex-col md:w-1/2 ml-8.5 md:ml-0 md:pl-4 ${comparison().isCorrect ? "hidden md:block" : ""}`);
10775
- set_class(p_1, 1, clsx(get$1(correctHeaderClasses)));
10857
+ set_class(p_1, 1, `ans-sum-corr-hdr ${get$1(correctHeaderClasses) ?? ""}`);
10776
10858
  });
10777
10859
  append($$anchor, div);
10778
10860
  return pop($$exports);
@@ -14283,7 +14365,11 @@ function CategoriseItem($$anchor, $$props) {
14283
14365
  var consequent = ($$anchor2) => {
14284
14366
  var span_3 = root_1$9();
14285
14367
  var node_2 = child(span_3);
14286
- SvgLoader(node_2, { svgName: "successSolid", className: "correct-icon" });
14368
+ SvgLoader(node_2, {
14369
+ svgName: "successSolid",
14370
+ className: "correct-icon",
14371
+ dataTestId: "icon-correct"
14372
+ });
14287
14373
  reset(span_3);
14288
14374
  append($$anchor2, span_3);
14289
14375
  };
@@ -14294,7 +14380,11 @@ function CategoriseItem($$anchor, $$props) {
14294
14380
  var consequent_1 = ($$anchor3) => {
14295
14381
  var span_4 = root_3$4();
14296
14382
  var node_4 = child(span_4);
14297
- SvgLoader(node_4, { svgName: "errorSolid", className: "incorrect-icon" });
14383
+ SvgLoader(node_4, {
14384
+ svgName: "errorSolid",
14385
+ className: "incorrect-icon",
14386
+ dataTestId: "icon-incorrect"
14387
+ });
14298
14388
  reset(span_4);
14299
14389
  append($$anchor3, span_4);
14300
14390
  };
@@ -14305,12 +14395,20 @@ function CategoriseItem($$anchor, $$props) {
14305
14395
  var consequent_2 = ($$anchor4) => {
14306
14396
  var span_5 = root_5$1();
14307
14397
  var node_6 = child(span_5);
14308
- SvgLoader(node_6, { svgName: "success", className: "missing-correct-icon" });
14398
+ SvgLoader(node_6, {
14399
+ svgName: "success",
14400
+ className: "missing-correct-icon",
14401
+ dataTestId: "icon-miss-corr"
14402
+ });
14309
14403
  reset(span_5);
14310
14404
  append($$anchor4, span_5);
14311
14405
  };
14312
14406
  var alternate = ($$anchor4) => {
14313
- SvgLoader($$anchor4, { svgName: "gripVertical", className: "grip-icon" });
14407
+ SvgLoader($$anchor4, {
14408
+ svgName: "gripVertical",
14409
+ className: "grip-icon",
14410
+ dataTestId: "icon-grip"
14411
+ });
14314
14412
  };
14315
14413
  if_block(
14316
14414
  node_5,
@@ -14344,7 +14442,11 @@ function CategoriseItem($$anchor, $$props) {
14344
14442
  var consequent_3 = ($$anchor2) => {
14345
14443
  var span_6 = root_7$2();
14346
14444
  var node_8 = child(span_6);
14347
- SvgLoader(node_8, { svgName: "gripVertical", className: "grip-icon" });
14445
+ SvgLoader(node_8, {
14446
+ svgName: "gripVertical",
14447
+ className: "grip-icon",
14448
+ dataTestId: "icon-grip"
14449
+ });
14348
14450
  reset(span_6);
14349
14451
  append($$anchor2, span_6);
14350
14452
  };
@@ -14356,19 +14458,21 @@ function CategoriseItem($$anchor, $$props) {
14356
14458
  reset(div);
14357
14459
  reset(button);
14358
14460
  template_effect(
14359
- ($0, $1, $2, $3, $4, $5) => {
14461
+ ($0, $1, $2, $3, $4, $5, $6) => {
14360
14462
  set_attribute(button, "id", itemId());
14361
14463
  set_attribute(button, "aria-label", $0);
14362
14464
  set_class(button, 1, $1);
14363
- set_attribute(button, "tabindex", $2);
14465
+ set_attribute(button, "data-testid", $2);
14466
+ set_attribute(button, "tabindex", $3);
14364
14467
  button.disabled = isLocked() && !resultType();
14365
- set_class(span, 1, $3);
14366
- set_class(div, 1, $4);
14367
- set_class(span_1, 1, $5);
14468
+ set_class(span, 1, $4);
14469
+ set_class(div, 1, $5);
14470
+ set_class(span_1, 1, $6);
14368
14471
  },
14369
14472
  [
14370
14473
  () => get$1(ariaLabel)(),
14371
14474
  () => clsx(get$1(buttonClasses)()),
14475
+ () => get$1(buttonClasses)().includes("cat-corr-ans-btn") ? "cat-corr-ans-btn" : get$1(buttonClasses)().includes("cat-mis-ans-btn") ? "cat-mis-ans-btn" : get$1(buttonClasses)().includes("cat-skip-ans-btn") ? "cat-skip-ans-btn" : get$1(buttonClasses)().includes("cat-stud-ans-btn") ? "cat-stud-ans-btn" : "cat-item-btn",
14372
14476
  () => get$1(itemTabIndex)(),
14373
14477
  () => clsx(get$1(textClasses)()),
14374
14478
  () => clsx(get$1(iconContainerClasses)()),
@@ -14869,10 +14973,10 @@ create_custom_element(
14869
14973
  [],
14870
14974
  true
14871
14975
  );
14872
- var root_2$3 = /* @__PURE__ */ from_svg(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>`);
14873
- var root_3$3 = /* @__PURE__ */ from_svg(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>`);
14976
+ var root_2$3 = /* @__PURE__ */ from_svg(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-testid="icon-chevron-coll"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>`);
14977
+ var root_3$3 = /* @__PURE__ */ from_svg(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-testid="icon-chevron-exp"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>`);
14874
14978
  var root_1$7 = /* @__PURE__ */ from_html(`<button type="button" class="focus-ring flex items-center rounded-[32px] p-1.5 text-charcoal text-sm border border-gray-800 bg-gray-50 min-w-[85px] ml-3 whitespace-nowrap active:raw-focus-ring active:bg-black-55"><span class="mx-0.5"> </span> <span class="w-4 h-4 text-inherit flex items-center justify-center"><!></span></button>`);
14875
- var root$4 = /* @__PURE__ */ from_html(`<div role="group"><div><!> <!></div> <!></div>`);
14979
+ var root$4 = /* @__PURE__ */ from_html(`<div role="group" data-testid="cat-ctr"><div><!> <!></div> <!></div>`);
14876
14980
  function CategoriseCategory($$anchor, $$props) {
14877
14981
  push($$props, true);
14878
14982
  let categoryId = prop($$props, "categoryId", 7), categoryTitle = prop($$props, "categoryTitle", 7), categoryIndex = prop($$props, "categoryIndex", 7, 1), items = prop($$props, "items", 23, () => []), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), isCollapsed = prop($$props, "isCollapsed", 7, false), isDraggingOver = prop($$props, "isDraggingOver", 7, false), dropContainerId = prop($$props, "dropContainerId", 7, void 0), hasAddItemAnimation = prop($$props, "hasAddItemAnimation", 7, false), dragSourceContainerId = prop($$props, "dragSourceContainerId", 7, void 0), mode = prop($$props, "mode", 7), isMobile = prop($$props, "isMobile", 7, false), hasStimulus = prop($$props, "hasStimulus", 7, false), dndType = prop($$props, "dndType", 7, "categorise"), tabindex = prop($$props, "tabindex", 7, 0), activeContainerForKeyboard = prop($$props, "activeContainerForKeyboard", 7, void 0), onitemdrop = prop($$props, "onitemdrop", 7), onitemselect = prop($$props, "onitemselect", 7), oncontainerclick = prop($$props, "oncontainerclick", 7), ontogglecollapse = prop($$props, "ontogglecollapse", 7), onitemfocus = prop($$props, "onitemfocus", 7), onitemblur = prop($$props, "onitemblur", 7), onitemkeydown = prop($$props, "onitemkeydown", 7), onkeydown = prop($$props, "onkeydown", 7), ondraghover = prop($$props, "ondraghover", 7), ondragstart = prop($$props, "ondragstart", 7);
@@ -15251,7 +15355,7 @@ function CategoriseCategory($$anchor, $$props) {
15251
15355
  template_effect(() => {
15252
15356
  set_attribute(div, "tabindex", get$1(adjustedTabindex));
15253
15357
  set_attribute(div, "aria-label", get$1(shouldShowAriaLabel) ? `Category ${categoryIndex()}: ${get$1(cleanCategoryTitle)}. ${get$1(getTotalWords)} added.` : void 0);
15254
- set_class(div, 1, clsx(get$1(outerClasses)));
15358
+ set_class(div, 1, `cat-ctr ${get$1(outerClasses) ?? ""}`);
15255
15359
  set_class(div_1, 1, clsx(get$1(titleClasses)));
15256
15360
  });
15257
15361
  bind_element_size(div_1, "clientHeight", ($$value) => set(categoryTitleHeight, $$value));
@@ -15298,7 +15402,7 @@ var root_1$6 = /* @__PURE__ */ from_html(`<div role="group" tabindex="-1" class=
15298
15402
  absolute top-12 right-4 left-4 bottom-4 flex items-center justify-center !bg-white md:top-20">Word Bin is empty</div>`);
15299
15403
  var root_2$2 = /* @__PURE__ */ from_html(`<button type="button" class="focus-ring p-2 text-blue-1000 rounded-md w-11 h-11 mt-9 td:hover:bg-black-50 active:bg-black-60 disabled:text-gray-40 disabled:hover:bg-white md:hidden" aria-label="Left"><span class="w-6 h-6 text-inherit flex items-center justify-center"><!></span></button>`);
15300
15404
  var root_3$2 = /* @__PURE__ */ from_html(`<button type="button" class="focus-ring p-2 text-blue-1000 rounded-md w-11 h-11 mt-9 td:hover:bg-black-50 active:bg-black-60 disabled:text-gray-40 disabled:hover:bg-white md:hidden" aria-label="Right"><span class="w-6 h-6 text-inherit flex items-center justify-center ml-[3px]"><!></span></button>`);
15301
- var root$3 = /* @__PURE__ */ from_html(`<div role="group"><div><span class="text-base leading-5 !text-gray-900 font-semibold md:mb-2 md:item-heading" aria-hidden="true">Word Bin&nbsp;</span> <span class="text-base leading-5 !text-gray-900 md:item-heading" aria-hidden="true"> </span></div> <div class="flex items-center justify-between px-4 min-h-[133px] md:min-h-0 md:block md:px-0 md:justify-normal"><!> <!> <!> <!></div></div>`);
15405
+ var root$3 = /* @__PURE__ */ from_html(`<div role="group" data-testid="cat-bin-grp"><div><span class="text-base leading-5 !text-gray-900 font-semibold md:mb-2 md:item-heading" aria-hidden="true">Word Bin&nbsp;</span> <span class="text-base leading-5 !text-gray-900 md:item-heading" aria-hidden="true"> </span></div> <div class="flex items-center justify-between px-4 min-h-[133px] md:min-h-0 md:block md:px-0 md:justify-normal"><!> <!> <!> <!></div></div>`);
15302
15406
  function CategoriseWordBin($$anchor, $$props) {
15303
15407
  push($$props, true);
15304
15408
  let containerId = prop($$props, "containerId", 7), items = prop($$props, "items", 23, () => []), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), isDraggingOver = prop($$props, "isDraggingOver", 7, false), dropContainerId = prop($$props, "dropContainerId", 7, void 0), hasAddItemAnimation = prop($$props, "hasAddItemAnimation", 7, false), dragSourceContainerId = prop($$props, "dragSourceContainerId", 7, void 0), mode = prop($$props, "mode", 7), isMobile = prop($$props, "isMobile", 7, false), currentMobileIndex = prop($$props, "currentMobileIndex", 7, 0), totalItems = prop($$props, "totalItems", 7, 0), tabindex = prop($$props, "tabindex", 7, 0), dndType = prop($$props, "dndType", 7, "categorise"), activeContainerForKeyboard = prop($$props, "activeContainerForKeyboard", 7, void 0), onitemdrop = prop($$props, "onitemdrop", 7), onitemselect = prop($$props, "onitemselect", 7), oncontainerclick = prop($$props, "oncontainerclick", 7), onnavigateitem = prop($$props, "onnavigateitem", 7), onitemfocus = prop($$props, "onitemfocus", 7), onitemblur = prop($$props, "onitemblur", 7), onitemkeydown = prop($$props, "onitemkeydown", 7), ondraghover = prop($$props, "ondraghover", 7), ondragstart = prop($$props, "ondragstart", 7), onkeydown = prop($$props, "onkeydown", 7), onfocus = prop($$props, "onfocus", 7, void 0);
@@ -15592,7 +15696,12 @@ function CategoriseWordBin($$anchor, $$props) {
15592
15696
  };
15593
15697
  var span_1 = child(button);
15594
15698
  var node_2 = child(span_1);
15595
- SvgLoader(node_2, { svgName: "smallChevronLeft", width: 7, height: 12 });
15699
+ SvgLoader(node_2, {
15700
+ svgName: "smallChevronLeft",
15701
+ width: 7,
15702
+ height: 12,
15703
+ dataTestId: "icon-chevron-prev"
15704
+ });
15596
15705
  reset(span_1);
15597
15706
  reset(button);
15598
15707
  template_effect(() => button.disabled = currentMobileIndex() === 0);
@@ -15669,7 +15778,12 @@ function CategoriseWordBin($$anchor, $$props) {
15669
15778
  };
15670
15779
  var span_2 = child(button_1);
15671
15780
  var node_5 = child(span_2);
15672
- SvgLoader(node_5, { svgName: "smallChevronRight", width: 7, height: 12 });
15781
+ SvgLoader(node_5, {
15782
+ svgName: "smallChevronRight",
15783
+ width: 7,
15784
+ height: 12,
15785
+ dataTestId: "icon-chevron-next"
15786
+ });
15673
15787
  reset(span_2);
15674
15788
  reset(button_1);
15675
15789
  template_effect(() => button_1.disabled = currentMobileIndex() >= items().length - 1);
@@ -15685,7 +15799,7 @@ function CategoriseWordBin($$anchor, $$props) {
15685
15799
  template_effect(() => {
15686
15800
  set_attribute(div, "tabindex", tabindex());
15687
15801
  set_attribute(div, "aria-label", !get$1(hasSelectedItem) || !get$1(isNotSourceContainer) ? `Word Bin. ${get$1(itemsRemaining)} out of ${totalItems()} left.` : void 0);
15688
- set_class(div, 1, clsx(get$1(outerClasses)));
15802
+ set_class(div, 1, `cat-bin-grp ${get$1(outerClasses) ?? ""}`);
15689
15803
  set_class(div_1, 1, clsx(get$1(titleClasses)));
15690
15804
  set_text(text, `${get$1(itemsRemaining) ?? ""} out of ${totalItems() ?? ""} left`);
15691
15805
  });
@@ -15759,7 +15873,7 @@ function CategoriseCategoryList($$anchor, $$props) {
15759
15873
  return pop($$exports);
15760
15874
  }
15761
15875
  create_custom_element(CategoriseCategoryList, { hasStimulus: {}, children: {} }, [], [], true);
15762
- var root_1$5 = /* @__PURE__ */ from_html(`<div tabindex="-1" class="sr-only">&nbsp;</div> <div class="absolute inset-y-0 right-4 left-4 w-fit h-fit m-auto bg-white p-6 max-w-[400px] shadow-md rounded-lg focus-visible:outline-none md:inset-0"><div class="flex items-center mb-3"><span><!></span> <span class="text-xl leading-6 font-bold ml-3 grow">Reset words?</span> <button aria-label="Close" class="focus-ring text-charcoal rounded h-6 w-6 flex items-center justify-center hover:bg-black-50 active:bg-black-60" type="button"><!></button></div> <p class="text-base font-semibold mb-10">Are you sure you want to reset your answers for this question? This cannot be undone.</p> <div class="flex flex-col-reverse items-center space-y-2 space-y-reverse md:justify-between md:flex-row md:space-y-0"><button aria-label="Cancel" class="focus-ring w-full py-2 px-3 text-blue-1000 text-base leading-4 rounded-lg font-bold border-2 border-white hover:bg-black-50 active:bg-black-60 md:w-fit" type="button">Cancel</button> <button aria-label="Reset" class="focus-ring w-full py-2 px-3 text-white text-base leading-4 rounded-lg font-bold border-2 border-blue-1000 bg-soft-blue hover:bg-yellow-1000 hover:text-charcoal active:bg-yellow-1100 active:text-charcoal md:w-fit" type="button">Reset</button></div></div>`, 1);
15876
+ var root_1$5 = /* @__PURE__ */ from_html(`<div tabindex="-1" class="sr-only">&nbsp;</div> <div class="absolute inset-y-0 right-4 left-4 w-fit h-fit m-auto bg-white p-6 max-w-[400px] shadow-md rounded-lg focus-visible:outline-none md:inset-0"><div class="flex items-center mb-3"><span><!></span> <span class="text-xl leading-6 font-bold ml-3 grow">Reset words?</span> <button aria-label="Close" class="cat-reset-close-btn focus-ring text-charcoal rounded h-6 w-6 flex items-center justify-center hover:bg-black-50 active:bg-black-60" data-testid="cat-reset-close-btn" type="button"><!></button></div> <p class="text-base font-semibold mb-10">Are you sure you want to reset your answers for this question? This cannot be undone.</p> <div class="flex flex-col-reverse items-center space-y-2 space-y-reverse md:justify-between md:flex-row md:space-y-0"><button aria-label="Cancel" class="cat-reset-cancel-btn focus-ring w-full py-2 px-3 text-blue-1000 text-base leading-4 rounded-lg font-bold border-2 border-white hover:bg-black-50 active:bg-black-60 md:w-fit" data-testid="cat-reset-cancel-btn" type="button">Cancel</button> <button aria-label="Reset" class="cat-reset-confirm-btn focus-ring w-full py-2 px-3 text-white text-base leading-4 rounded-lg font-bold border-2 border-blue-1000 bg-soft-blue hover:bg-yellow-1000 hover:text-charcoal active:bg-yellow-1100 active:text-charcoal md:w-fit" data-testid="cat-reset-confirm-btn" type="button">Reset</button></div></div>`, 1);
15763
15877
  function CategoriseModal($$anchor, $$props) {
15764
15878
  push($$props, true);
15765
15879
  let isOpen = prop($$props, "isOpen", 7, false), onclose = prop($$props, "onclose", 7), onreset = prop($$props, "onreset", 7);
@@ -15808,7 +15922,8 @@ function CategoriseModal($$anchor, $$props) {
15808
15922
  get modalData() {
15809
15923
  return get$1(modalData);
15810
15924
  },
15811
- modalClass: "bg-charcoal/30 pointer-events-none",
15925
+ modalClass: "cat-reset-mdl bg-charcoal/30 pointer-events-none",
15926
+ dataTestId: "cat-reset-mdl",
15812
15927
  onclose: handleClose,
15813
15928
  children: ($$anchor2, $$slotProps) => {
15814
15929
  var fragment_1 = root_1$5();
@@ -15818,12 +15933,20 @@ function CategoriseModal($$anchor, $$props) {
15818
15933
  var div_2 = child(div_1);
15819
15934
  var span = child(div_2);
15820
15935
  var node = child(span);
15821
- SvgLoader(node, { svgName: "alertIcon", className: "alert-icon" });
15936
+ SvgLoader(node, {
15937
+ svgName: "alertIcon",
15938
+ className: "alert-icon",
15939
+ dataTestId: "icon-mdl-alt"
15940
+ });
15822
15941
  reset(span);
15823
15942
  var button = sibling(span, 4);
15824
15943
  button.__click = handleClose;
15825
15944
  var node_1 = child(button);
15826
- SvgLoader(node_1, { svgName: "crossIcon", className: "cross-icon" });
15945
+ SvgLoader(node_1, {
15946
+ svgName: "crossIcon",
15947
+ className: "cross-icon",
15948
+ dataTestId: "icon-mdl-close"
15949
+ });
15827
15950
  reset(button);
15828
15951
  reset(div_2);
15829
15952
  var div_3 = sibling(div_2, 4);
@@ -17476,7 +17599,7 @@ function useDropdownPosition(config) {
17476
17599
  };
17477
17600
  }
17478
17601
  var root_1$3 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 bg-transparent z-10"></div>`);
17479
- var root_2 = /* @__PURE__ */ from_html(`<div class="bg-black bg-opacity-5 h-full flex flex-none justify-center items-center"><div class="font-semibold text-base leading-[19px] text-charcoal px-3 flex items-center" aria-hidden="true"> </div></div>`);
17602
+ var root_2 = /* @__PURE__ */ from_html(`<div class="bg-black bg-opacity-5 h-full flex flex-none justify-center items-center"><div class="inline-txb-lbl font-semibold text-base leading-[19px] text-charcoal px-3 flex items-center" data-testid="inline-txb-lbl" aria-hidden="true"> </div></div>`);
17480
17603
  var root_3$1 = /* @__PURE__ */ from_html(`<span class="text-green-900 mr-2"><span aria-hidden="true"><!></span> <span class="sr-only">Correct</span></span>`);
17481
17604
  var root_6 = /* @__PURE__ */ from_html(`<span class="text-green-900 mr-2"><span aria-hidden="true"><!></span> <span class="sr-only">Correct</span></span>`);
17482
17605
  var root_7 = /* @__PURE__ */ from_html(`<span class="text-red-900 mr-2"><span aria-hidden="true"><!></span> <span class="sr-only">Incorrect</span></span>`);
@@ -17486,8 +17609,8 @@ var root_12 = /* @__PURE__ */ from_html(`<span class="flex items-center text-gre
17486
17609
  var root_14 = /* @__PURE__ */ from_html(`<span class="flex items-center text-red-900" aria-hidden="true"><!></span>`);
17487
17610
  var root_16 = /* @__PURE__ */ from_html(`<span class="flex items-center text-blue-850" aria-hidden="true"><!></span>`);
17488
17611
  var root_11 = /* @__PURE__ */ from_html(`<li role="option" tabindex="-1"><div class="p-0.5 flex justify-between w-full text-base whitespace-normal"><!> <!></div></li>`);
17489
- var root_10 = /* @__PURE__ */ from_html(`<ul class="dropdown-menu block" role="listbox" tabindex="-1"></ul>`);
17490
- var root$1 = /* @__PURE__ */ from_html(`<span class="dropdown inline-block relative align-middle"><span class="sr-only"> </span> <!> <div role="combobox" aria-haspopup="listbox" tabindex="0"><!> <div class="px-4 flex flex-1 min-w-0 align-middle truncate items-center justify-between w-full"><span><!></span> <div class="flex items-center"><!> <!></div></div></div> <!></span>`);
17612
+ var root_10 = /* @__PURE__ */ from_html(`<ul class="drp-list dropdown-menu block" data-testid="drp-list" role="listbox" tabindex="-1"></ul>`);
17613
+ var root$1 = /* @__PURE__ */ from_html(`<span class="dropdown inline-block relative align-middle"><span class="sr-only"> </span> <!> <div role="combobox" data-testid="drp-cmb" aria-haspopup="listbox" tabindex="0"><!> <div class="px-4 flex flex-1 min-w-0 align-middle truncate items-center justify-between w-full"><span><!></span> <div class="flex items-center"><!> <!></div></div></div> <!></span>`);
17491
17614
  function DropdownContainer($$anchor, $$props) {
17492
17615
  push($$props, true);
17493
17616
  let dropdownId = prop($$props, "dropdownId", 7), dropdownNumber = prop($$props, "dropdownNumber", 7), options = prop($$props, "options", 7), selected = prop($$props, "selected", 7), correctAnswers = prop($$props, "correctAnswers", 23, () => []), isCorrect = prop($$props, "isCorrect", 7, false), isFinished = prop($$props, "isFinished", 7, false), isLocked = prop($$props, "isLocked", 7, false), isDataSaving = prop($$props, "isDataSaving", 7, false), mode = prop($$props, "mode", 7), showFeedback = prop($$props, "showFeedback", 7, false), showNumbering = prop($$props, "showNumbering", 7, true), onselect = prop($$props, "onselect", 7), viewportBuffer = prop($$props, "viewportBuffer", 7, 60);
@@ -18123,7 +18246,7 @@ function DropdownContainer($$anchor, $$props) {
18123
18246
  set_attribute(span_1, "id", labelId);
18124
18247
  set_text(text, get$1(ariaLabel));
18125
18248
  set_attribute(div_1, "id", comboId);
18126
- set_class(div_1, 1, clsx(get$1(containerClasses)));
18249
+ set_class(div_1, 1, `drp-cmb ${get$1(containerClasses) ?? ""}`);
18127
18250
  set_attribute(div_1, "aria-expanded", get$1(state$1).isOpen);
18128
18251
  set_attribute(div_1, "aria-labelledby", labelId);
18129
18252
  set_attribute(div_1, "aria-controls", listId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "change version": "2.1.0",
5
5
  "description": "Authoring tool frontend SDK",
6
6
  "contributors": [
@@ -27,6 +27,10 @@
27
27
  {
28
28
  "name": "Aimer Jay Pedrozo",
29
29
  "email": "aimer.pedrozo@cambridge.org"
30
+ },
31
+ {
32
+ "name": "John David De Chavez",
33
+ "email": "johndavid.chavez@cambridge.org"
30
34
  }
31
35
  ],
32
36
  "scripts": {