eat-js-sdk 2.1.5 → 2.1.6

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.
@@ -7149,6 +7149,7 @@ function MCQImageModal($$anchor, $$props) {
7149
7149
  onupdateModalSettings: updateModalSettings,
7150
7150
  onclose: closeModal,
7151
7151
  modalClass: "bg-charcoal/80 backdrop-blur-md pointer-events-none",
7152
+ dataTestId: "mcq-img-viewer-mdl",
7152
7153
  children: ($$anchor3, $$slotProps) => {
7153
7154
  var div = root_2$d();
7154
7155
  var div_1 = child(div);
@@ -7233,7 +7234,8 @@ function MCQImageModal($$anchor, $$props) {
7233
7234
  CommonStringToHtml(node_6, {
7234
7235
  get htmlString() {
7235
7236
  return get$1($02);
7236
- }
7237
+ },
7238
+ dataTestId: "mcq-img-viewer-lbl"
7237
7239
  });
7238
7240
  }
7239
7241
  reset(span_2);
@@ -7536,7 +7538,7 @@ create_custom_element(InteractionSection, { children: {} }, [], [], true);
7536
7538
  var root_5$6 = /* @__PURE__ */ from_html(`<div></div>`);
7537
7539
  var root_4$6 = /* @__PURE__ */ from_html(`<div class="px-4 w-full max-w-[1008px] mx-auto flex-shrink-0 text-center font-semibold text-sm md:text-lg leading-[150%] text-white" aria-hidden="true" data-testid="img-viewer-cap-txt"> </div> <!>`, 1);
7538
7540
  var root_7$4 = /* @__PURE__ */ from_html(`<div></div>`);
7539
- var root_2$c = /* @__PURE__ */ from_html(`<div class="absolute inset-0"><div class="w-full h-full flex items-center justify-center pt-14 pb-[72px] lg:py-24"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="flex flex-col items-center overflow-y-auto overflow-x-hidden w-full px-0 md:px-6 lg:px-16"><div class="relative bg-white rounded-md md:rounded-lg shadow-sm overflow-hidden flex-shrink-0"><img class="block object-contain w-full h-auto max-w-full mx-auto" data-testid="img-viewer-lbl"/> <!></div> <!></div></div></div>`);
7541
+ var root_2$c = /* @__PURE__ */ from_html(`<div class="absolute inset-0"><div class="w-full h-full flex items-center justify-center pt-14 pb-[72px] lg:py-24"><div aria-live="polite" aria-atomic="true" class="sr-only"> </div> <div class="flex flex-col items-center overflow-y-auto overflow-x-hidden w-full px-0 md:px-6 lg:px-16"><div class="relative bg-white rounded-md md:rounded-lg shadow-sm overflow-hidden flex-shrink-0"><img class="block object-contain w-full h-auto max-w-full mx-auto"/> <!></div> <!></div></div></div>`);
7540
7542
  function PromptStimulusImageModal($$anchor, $$props) {
7541
7543
  push($$props, true);
7542
7544
  let isOpen = prop($$props, "isOpen", 7, false), imageUrl = prop($$props, "imageUrl", 7, ""), altText = prop($$props, "altText", 7, ""), caption = prop($$props, "caption", 7, ""), onclose = prop($$props, "onclose", 7);
@@ -8155,8 +8157,8 @@ const getViewTemplate = (context) => templates.find((template) => template.match
8155
8157
  const shouldRenderSection = (section) => section.condition !== false;
8156
8158
  const getClassString = (classes = []) => classes.join(" ");
8157
8159
  const getStyleString = (styles = {}) => Object.entries(styles).map(([k, v]) => `${k}:${v}`).join(";");
8158
- var root_4$5 = /* @__PURE__ */ from_html(`<p class="text-lg leading-[22px] text-blue-1000 font-semibold mt-4"> </p>`);
8159
- var root_5$5 = /* @__PURE__ */ from_html(`<div class="mt-6 w-full"><button class="flex items-center font-semibold leading-[1.5] outline-none group w-fit h-11 text-charcoal" aria-controls="long-description-content" aria-labelledby="image-description-label" type="button" data-testid="img-cap-txt"><div class="w-6 h-6 flex items-center justify-center mr-2" data-testid="img-desc-txt"><!></div> <div id="image-description-label" class="image-description-accordion group-[.active]:border-b-2">Image Description</div></button> <div id="long-description-content"><!></div></div>`);
8160
+ var root_4$5 = /* @__PURE__ */ from_html(`<p class="text-lg leading-[22px] text-blue-1000 font-semibold mt-4" data-testid="img-cap-txt"> </p>`);
8161
+ var root_5$5 = /* @__PURE__ */ from_html(`<div class="mt-6 w-full"><button class="flex items-center font-semibold leading-[1.5] outline-none group w-fit h-11 text-charcoal" aria-controls="long-description-content" aria-labelledby="image-description-label" type="button"><div class="w-6 h-6 flex items-center justify-center mr-2" data-testid="img-desc-txt"><!></div> <div id="image-description-label" class="image-description-accordion group-[.active]:border-b-2">Image Description</div></button> <div id="long-description-content" data-testid="img-desc-txt"><!></div></div>`);
8160
8162
  var root_2$b = /* @__PURE__ */ from_html(`<div class="flex flex-col justify-center items-center text-center"><div class="flex flex-col items-center"><div class="relative inline-block"><img/> <!></div> <!></div></div> <!>`, 1);
8161
8163
  var root_1$j = /* @__PURE__ */ from_html(`<div class="w-full"><!></div>`);
8162
8164
  function CommonMedia($$anchor, $$props) {
@@ -14242,14 +14244,19 @@ function CategoriseItem($$anchor, $$props) {
14242
14244
  return base;
14243
14245
  });
14244
14246
  const getItemTestId = /* @__PURE__ */ user_derived(() => () => {
14245
- if (isWordBin) {
14246
- if (resultType() === ANSWER_RESULTS.CORRECT) return "cat-corr-ans-btn";
14247
- if (resultType() === ANSWER_RESULTS.MISSED) return "cat-mis-ans-btn";
14248
- if (resultType() === ANSWER_RESULTS.INCORRECT) return "cat-skip-ans-btn";
14249
- }
14250
- if (resultType() === ANSWER_RESULTS.CORRECT || resultType() === ANSWER_RESULTS.INCORRECT || resultType() === ANSWER_RESULTS.MISSED) {
14251
- return "cat-stud-ans-btn";
14247
+ if (mode() === MODES.SESSION || mode() === MODES.INTERACTIVE) {
14248
+ if (resultType() === ANSWER_RESULTS.INCORRECT && isWordBin && !get$1(isSelected)) {
14249
+ return "cat-skip-ans-btn";
14250
+ }
14251
+ if ((resultType() === ANSWER_RESULTS.CORRECT || resultType() === ANSWER_RESULTS.INCORRECT) && !get$1(isSelected)) {
14252
+ return "cat-stud-ans-btn";
14253
+ }
14254
+ if (resultType() === ANSWER_RESULTS.MISSED) {
14255
+ return "cat-mis-ans-btn";
14256
+ }
14257
+ return;
14252
14258
  }
14259
+ if (resultType() === ANSWER_RESULTS.CORRECT && !get$1(isSelected)) return "cat-corr-ans-btn";
14253
14260
  return "cat-item-btn";
14254
14261
  });
14255
14262
  var $$exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "change version": "2.1.0",
5
5
  "description": "Authoring tool frontend SDK",
6
6
  "contributors": [