eat-js-sdk 1.0.36 → 1.0.38

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.
@@ -1649,7 +1649,7 @@
1649
1649
 
1650
1650
  // src/lib/components/prompt/template/PromptBody.svelte
1651
1651
  function add_css(target) {
1652
- append_styles(target, "svelte-c9q74j", "@media only screen and (min-width: 1196px){.container-class.svelte-c9q74j{max-width:var(--interactionWidthValue)}}@media only screen and (min-width: 1440px){.mcq-media-container.svelte-c9q74j{max-width:720px}}");
1652
+ append_styles(target, "svelte-plkvcr", "@media only screen and (min-width: 1196px){.container-class.svelte-plkvcr{max-width:var(--interactionWidthValue)}}@media only screen and (min-width: 1440px){.mcq-media-container.svelte-plkvcr{max-width:720px}.mcq-media-container-stimulus.svelte-plkvcr{max-width:1310px}}");
1653
1653
  }
1654
1654
  function create_if_block_11(ctx) {
1655
1655
  let commonstringtohtml;
@@ -1663,7 +1663,7 @@
1663
1663
  otherClass: "item-heading mb-4",
1664
1664
  htmlHeading: (
1665
1665
  /*promptRubricHeaderElem*/
1666
- ctx[17]
1666
+ ctx[18]
1667
1667
  )
1668
1668
  }
1669
1669
  });
@@ -1705,7 +1705,7 @@
1705
1705
  props: {
1706
1706
  htmlString: (
1707
1707
  /*stimulusText*/
1708
- ctx[9]
1708
+ ctx[10]
1709
1709
  ),
1710
1710
  otherClass: "text-stimulus py-2"
1711
1711
  }
@@ -1721,9 +1721,9 @@
1721
1721
  p(ctx2, dirty) {
1722
1722
  const commonstringtohtml_changes = {};
1723
1723
  if (dirty & /*stimulusText*/
1724
- 512)
1724
+ 1024)
1725
1725
  commonstringtohtml_changes.htmlString = /*stimulusText*/
1726
- ctx2[9];
1726
+ ctx2[10];
1727
1727
  commonstringtohtml.$set(commonstringtohtml_changes);
1728
1728
  },
1729
1729
  i(local) {
@@ -1750,19 +1750,19 @@
1750
1750
  props: {
1751
1751
  fileType: (
1752
1752
  /*fileType*/
1753
- ctx[5]
1753
+ ctx[6]
1754
1754
  ),
1755
1755
  fileUrl: (
1756
1756
  /*fileUrl*/
1757
- ctx[4]
1757
+ ctx[5]
1758
1758
  ),
1759
1759
  altText: (
1760
1760
  /*altText*/
1761
- ctx[7]
1761
+ ctx[8]
1762
1762
  ),
1763
1763
  fileCaption: (
1764
1764
  /*caption*/
1765
- ctx[8]
1765
+ ctx[9]
1766
1766
  )
1767
1767
  }
1768
1768
  });
@@ -1771,10 +1771,10 @@
1771
1771
  div = element("div");
1772
1772
  create_component(commonmedia.$$.fragment);
1773
1773
  attr(div, "class", div_class_value = /*showTextAlignmentInline*/
1774
- (ctx[13] && /*showStimulusLayoutMediaFirst*/
1775
- ctx[15] ? "pb-2" : "pb-10") + " " + /*showTextAlignmentInline*/
1776
- (ctx[13] && /*showStimulusLayoutTextFirst*/
1777
- ctx[16] ? "" : "pt-6"));
1774
+ (ctx[14] && /*showStimulusLayoutMediaFirst*/
1775
+ ctx[16] ? "pb-2" : "pb-10") + " " + /*showTextAlignmentInline*/
1776
+ (ctx[14] && /*showStimulusLayoutTextFirst*/
1777
+ ctx[17] ? "" : "pt-6"));
1778
1778
  },
1779
1779
  m(target, anchor) {
1780
1780
  insert(target, div, anchor);
@@ -1784,21 +1784,21 @@
1784
1784
  p(ctx2, dirty) {
1785
1785
  const commonmedia_changes = {};
1786
1786
  if (dirty & /*fileType*/
1787
- 32)
1787
+ 64)
1788
1788
  commonmedia_changes.fileType = /*fileType*/
1789
- ctx2[5];
1789
+ ctx2[6];
1790
1790
  if (dirty & /*fileUrl*/
1791
- 16)
1791
+ 32)
1792
1792
  commonmedia_changes.fileUrl = /*fileUrl*/
1793
- ctx2[4];
1793
+ ctx2[5];
1794
1794
  if (dirty & /*altText*/
1795
- 128)
1795
+ 256)
1796
1796
  commonmedia_changes.altText = /*altText*/
1797
- ctx2[7];
1797
+ ctx2[8];
1798
1798
  if (dirty & /*caption*/
1799
- 256)
1799
+ 512)
1800
1800
  commonmedia_changes.fileCaption = /*caption*/
1801
- ctx2[8];
1801
+ ctx2[9];
1802
1802
  commonmedia.$set(commonmedia_changes);
1803
1803
  },
1804
1804
  i(local) {
@@ -1826,7 +1826,7 @@
1826
1826
  props: {
1827
1827
  htmlString: (
1828
1828
  /*stimulusText*/
1829
- ctx[9]
1829
+ ctx[10]
1830
1830
  ),
1831
1831
  otherClass: "text-stimulus py-2"
1832
1832
  }
@@ -1842,9 +1842,9 @@
1842
1842
  p(ctx2, dirty) {
1843
1843
  const commonstringtohtml_changes = {};
1844
1844
  if (dirty & /*stimulusText*/
1845
- 512)
1845
+ 1024)
1846
1846
  commonstringtohtml_changes.htmlString = /*stimulusText*/
1847
- ctx2[9];
1847
+ ctx2[10];
1848
1848
  commonstringtohtml.$set(commonstringtohtml_changes);
1849
1849
  },
1850
1850
  i(local) {
@@ -1874,7 +1874,7 @@
1874
1874
  otherClass: "item-heading prompt",
1875
1875
  htmlHeading: (
1876
1876
  /*promptRubricHeaderElem*/
1877
- ctx[17]
1877
+ ctx[18]
1878
1878
  )
1879
1879
  }
1880
1880
  });
@@ -1916,7 +1916,7 @@
1916
1916
  props: {
1917
1917
  htmlString: (
1918
1918
  /*stimulusText*/
1919
- ctx[9]
1919
+ ctx[10]
1920
1920
  ),
1921
1921
  otherClass: "text-stimulus pb-0 lg:hidden"
1922
1922
  }
@@ -1932,9 +1932,9 @@
1932
1932
  p(ctx2, dirty) {
1933
1933
  const commonstringtohtml_changes = {};
1934
1934
  if (dirty & /*stimulusText*/
1935
- 512)
1935
+ 1024)
1936
1936
  commonstringtohtml_changes.htmlString = /*stimulusText*/
1937
- ctx2[9];
1937
+ ctx2[10];
1938
1938
  commonstringtohtml.$set(commonstringtohtml_changes);
1939
1939
  },
1940
1940
  i(local) {
@@ -1961,19 +1961,19 @@
1961
1961
  props: {
1962
1962
  fileType: (
1963
1963
  /*fileType*/
1964
- ctx[5]
1964
+ ctx[6]
1965
1965
  ),
1966
1966
  fileUrl: (
1967
1967
  /*fileUrl*/
1968
- ctx[4]
1968
+ ctx[5]
1969
1969
  ),
1970
1970
  altText: (
1971
1971
  /*altText*/
1972
- ctx[7]
1972
+ ctx[8]
1973
1973
  ),
1974
1974
  fileCaption: (
1975
1975
  /*caption*/
1976
- ctx[8]
1976
+ ctx[9]
1977
1977
  )
1978
1978
  }
1979
1979
  });
@@ -1982,8 +1982,8 @@
1982
1982
  div = element("div");
1983
1983
  create_component(commonmedia.$$.fragment);
1984
1984
  attr(div, "class", div_class_value = "lg:hidden " + /*showTextAlignmentDefault*/
1985
- (ctx[12] && /*showStimulusLayoutTextFirst*/
1986
- ctx[16] ? "pt-4" : "pt-6"));
1985
+ (ctx[13] && /*showStimulusLayoutTextFirst*/
1986
+ ctx[17] ? "pt-4" : "pt-6"));
1987
1987
  },
1988
1988
  m(target, anchor) {
1989
1989
  insert(target, div, anchor);
@@ -1993,21 +1993,21 @@
1993
1993
  p(ctx2, dirty) {
1994
1994
  const commonmedia_changes = {};
1995
1995
  if (dirty & /*fileType*/
1996
- 32)
1996
+ 64)
1997
1997
  commonmedia_changes.fileType = /*fileType*/
1998
- ctx2[5];
1998
+ ctx2[6];
1999
1999
  if (dirty & /*fileUrl*/
2000
- 16)
2000
+ 32)
2001
2001
  commonmedia_changes.fileUrl = /*fileUrl*/
2002
- ctx2[4];
2002
+ ctx2[5];
2003
2003
  if (dirty & /*altText*/
2004
- 128)
2004
+ 256)
2005
2005
  commonmedia_changes.altText = /*altText*/
2006
- ctx2[7];
2006
+ ctx2[8];
2007
2007
  if (dirty & /*caption*/
2008
- 256)
2008
+ 512)
2009
2009
  commonmedia_changes.fileCaption = /*caption*/
2010
- ctx2[8];
2010
+ ctx2[9];
2011
2011
  commonmedia.$set(commonmedia_changes);
2012
2012
  },
2013
2013
  i(local) {
@@ -2035,7 +2035,7 @@
2035
2035
  props: {
2036
2036
  htmlString: (
2037
2037
  /*stimulusText*/
2038
- ctx[9]
2038
+ ctx[10]
2039
2039
  ),
2040
2040
  otherClass: "text-stimulus pb-0 lg:hidden"
2041
2041
  }
@@ -2051,9 +2051,9 @@
2051
2051
  p(ctx2, dirty) {
2052
2052
  const commonstringtohtml_changes = {};
2053
2053
  if (dirty & /*stimulusText*/
2054
- 512)
2054
+ 1024)
2055
2055
  commonstringtohtml_changes.htmlString = /*stimulusText*/
2056
- ctx2[9];
2056
+ ctx2[10];
2057
2057
  commonstringtohtml.$set(commonstringtohtml_changes);
2058
2058
  },
2059
2059
  i(local) {
@@ -2079,17 +2079,17 @@
2079
2079
  let current;
2080
2080
  let if_block0 = (
2081
2081
  /*showTextAlignmentDefault*/
2082
- ctx[12] && /*showStimulusLayoutTextFirst*/
2083
- ctx[16] && create_if_block_3(ctx)
2082
+ ctx[13] && /*showStimulusLayoutTextFirst*/
2083
+ ctx[17] && create_if_block_3(ctx)
2084
2084
  );
2085
2085
  let if_block1 = (
2086
2086
  /*showAssetAlignmentDefault*/
2087
- ctx[11] && create_if_block_22(ctx)
2087
+ ctx[12] && create_if_block_22(ctx)
2088
2088
  );
2089
2089
  let if_block2 = (
2090
2090
  /*showTextAlignmentDefault*/
2091
- ctx[12] && /*showStimulusLayoutMediaFirst*/
2092
- ctx[15] && create_if_block_12(ctx)
2091
+ ctx[13] && /*showStimulusLayoutMediaFirst*/
2092
+ ctx[16] && create_if_block_12(ctx)
2093
2093
  );
2094
2094
  return {
2095
2095
  c() {
@@ -2122,19 +2122,19 @@
2122
2122
  p(ctx2, dirty) {
2123
2123
  if (
2124
2124
  /*showTextAlignmentDefault*/
2125
- ctx2[12] && /*showStimulusLayoutTextFirst*/
2126
- ctx2[16]
2125
+ ctx2[13] && /*showStimulusLayoutTextFirst*/
2126
+ ctx2[17]
2127
2127
  )
2128
2128
  if_block0.p(ctx2, dirty);
2129
2129
  if (
2130
2130
  /*showAssetAlignmentDefault*/
2131
- ctx2[11]
2131
+ ctx2[12]
2132
2132
  )
2133
2133
  if_block1.p(ctx2, dirty);
2134
2134
  if (
2135
2135
  /*showTextAlignmentDefault*/
2136
- ctx2[12] && /*showStimulusLayoutMediaFirst*/
2137
- ctx2[15]
2136
+ ctx2[13] && /*showStimulusLayoutMediaFirst*/
2137
+ ctx2[16]
2138
2138
  )
2139
2139
  if_block2.p(ctx2, dirty);
2140
2140
  },
@@ -2172,7 +2172,7 @@
2172
2172
  props: {
2173
2173
  htmlString: (
2174
2174
  /*stimulusText*/
2175
- ctx[9]
2175
+ ctx[10]
2176
2176
  ),
2177
2177
  otherClass: "text-stimulus pt-0"
2178
2178
  }
@@ -2188,9 +2188,9 @@
2188
2188
  p(ctx2, dirty) {
2189
2189
  const commonstringtohtml_changes = {};
2190
2190
  if (dirty & /*stimulusText*/
2191
- 512)
2191
+ 1024)
2192
2192
  commonstringtohtml_changes.htmlString = /*stimulusText*/
2193
- ctx2[9];
2193
+ ctx2[10];
2194
2194
  commonstringtohtml.$set(commonstringtohtml_changes);
2195
2195
  },
2196
2196
  i(local) {
@@ -2215,19 +2215,19 @@
2215
2215
  props: {
2216
2216
  fileType: (
2217
2217
  /*fileType*/
2218
- ctx[5]
2218
+ ctx[6]
2219
2219
  ),
2220
2220
  fileUrl: (
2221
2221
  /*fileUrl*/
2222
- ctx[4]
2222
+ ctx[5]
2223
2223
  ),
2224
2224
  altText: (
2225
2225
  /*altText*/
2226
- ctx[7]
2226
+ ctx[8]
2227
2227
  ),
2228
2228
  fileCaption: (
2229
2229
  /*caption*/
2230
- ctx[8]
2230
+ ctx[9]
2231
2231
  )
2232
2232
  }
2233
2233
  });
@@ -2242,21 +2242,21 @@
2242
2242
  p(ctx2, dirty) {
2243
2243
  const commonmedia_changes = {};
2244
2244
  if (dirty & /*fileType*/
2245
- 32)
2245
+ 64)
2246
2246
  commonmedia_changes.fileType = /*fileType*/
2247
- ctx2[5];
2247
+ ctx2[6];
2248
2248
  if (dirty & /*fileUrl*/
2249
- 16)
2249
+ 32)
2250
2250
  commonmedia_changes.fileUrl = /*fileUrl*/
2251
- ctx2[4];
2251
+ ctx2[5];
2252
2252
  if (dirty & /*altText*/
2253
- 128)
2253
+ 256)
2254
2254
  commonmedia_changes.altText = /*altText*/
2255
- ctx2[7];
2255
+ ctx2[8];
2256
2256
  if (dirty & /*caption*/
2257
- 256)
2257
+ 512)
2258
2258
  commonmedia_changes.fileCaption = /*caption*/
2259
- ctx2[8];
2259
+ ctx2[9];
2260
2260
  commonmedia.$set(commonmedia_changes);
2261
2261
  },
2262
2262
  i(local) {
@@ -2281,10 +2281,10 @@
2281
2281
  props: {
2282
2282
  htmlString: (
2283
2283
  /*stimulusText*/
2284
- ctx[9]
2284
+ ctx[10]
2285
2285
  ),
2286
2286
  otherClass: "text-stimulus " + (!/*showAssetAlignmentDefault*/
2287
- ctx[11] ? "pt-0" : "")
2287
+ ctx[12] ? "pt-0" : "")
2288
2288
  }
2289
2289
  });
2290
2290
  return {
@@ -2298,9 +2298,9 @@
2298
2298
  p(ctx2, dirty) {
2299
2299
  const commonstringtohtml_changes = {};
2300
2300
  if (dirty & /*stimulusText*/
2301
- 512)
2301
+ 1024)
2302
2302
  commonstringtohtml_changes.htmlString = /*stimulusText*/
2303
- ctx2[9];
2303
+ ctx2[10];
2304
2304
  commonstringtohtml.$set(commonstringtohtml_changes);
2305
2305
  },
2306
2306
  i(local) {
@@ -2342,18 +2342,18 @@
2342
2342
  );
2343
2343
  let if_block1 = (
2344
2344
  /*showTextAlignmentInline*/
2345
- ctx[13] && /*showStimulusLayoutTextFirst*/
2346
- ctx[16] && create_if_block_10(ctx)
2345
+ ctx[14] && /*showStimulusLayoutTextFirst*/
2346
+ ctx[17] && create_if_block_10(ctx)
2347
2347
  );
2348
2348
  let if_block2 = (
2349
2349
  /*showAsset*/
2350
- ctx[10] && /*fileAlignment*/
2351
- ctx[6] === ASSET_ALIGNMENT_INLINE && create_if_block_9(ctx)
2350
+ ctx[11] && /*fileAlignment*/
2351
+ ctx[7] === ASSET_ALIGNMENT_INLINE && create_if_block_9(ctx)
2352
2352
  );
2353
2353
  let if_block3 = (
2354
2354
  /*showTextAlignmentInline*/
2355
- ctx[13] && /*showStimulusLayoutMediaFirst*/
2356
- ctx[15] && create_if_block_8(ctx)
2355
+ ctx[14] && /*showStimulusLayoutMediaFirst*/
2356
+ ctx[16] && create_if_block_8(ctx)
2357
2357
  );
2358
2358
  let if_block4 = (
2359
2359
  /*prompt*/
@@ -2361,17 +2361,17 @@
2361
2361
  );
2362
2362
  let if_block5 = (
2363
2363
  /*showTextAlignmentDefault*/
2364
- ctx[12] && /*showStimulusLayoutTextFirst*/
2365
- ctx[16] && create_if_block_6(ctx)
2364
+ ctx[13] && /*showStimulusLayoutTextFirst*/
2365
+ ctx[17] && create_if_block_6(ctx)
2366
2366
  );
2367
2367
  let if_block6 = (
2368
2368
  /*showAssetAlignmentDefault*/
2369
- ctx[11] && create_if_block_5(ctx)
2369
+ ctx[12] && create_if_block_5(ctx)
2370
2370
  );
2371
2371
  let if_block7 = (
2372
2372
  /*showTextAlignmentDefault*/
2373
- ctx[12] && /*showStimulusLayoutMediaFirst*/
2374
- ctx[15] && create_if_block_4(ctx)
2373
+ ctx[13] && /*showStimulusLayoutMediaFirst*/
2374
+ ctx[16] && create_if_block_4(ctx)
2375
2375
  );
2376
2376
  const default_slot_template = (
2377
2377
  /*#slots*/
@@ -2386,7 +2386,7 @@
2386
2386
  );
2387
2387
  let if_block8 = (
2388
2388
  /*showAlignmentDefault*/
2389
- ctx[14] && create_if_block3(ctx)
2389
+ ctx[15] && create_if_block3(ctx)
2390
2390
  );
2391
2391
  return {
2392
2392
  c() {
@@ -2426,15 +2426,16 @@
2426
2426
  attr(div0, "class", div0_class_value = "divider my-6 " + (!/*hasDivider*/
2427
2427
  ctx[2] ? "hidden" : ""));
2428
2428
  attr(div1, "class", div1_class_value = "bg-transparent relative " + /*showAlignmentDefault*/
2429
- (ctx[14] ? "lg:basis-1/2 lg:max-w-[50%]" : ""));
2429
+ (ctx[15] ? "lg:basis-1/2 lg:max-w-[50%]" : ""));
2430
2430
  attr(div2, "class", div2_class_value = null_to_empty(`${/*showAlignmentDefault*/
2431
- ctx[14] ? "lg:w-full lg:flex" : "container-class"} ${INTERACTION_TYPE_MCQ && /*optionHasMedia*/
2432
- ctx[3] ? "mcq-media-container" : ""}`) + " svelte-c9q74j");
2431
+ ctx[15] ? "lg:w-full lg:flex" : "container-class"} ${INTERACTION_TYPE_MCQ && /*optionHasMedia*/
2432
+ ctx[4] ? !/*stimulus*/
2433
+ ctx[3] ? "mcq-media-container" : "mcq-media-container-stimulus" : ""}`) + " svelte-plkvcr");
2433
2434
  set_style(
2434
2435
  div2,
2435
2436
  "--interactionWidthValue",
2436
2437
  /*interactionWidthValue*/
2437
- ctx[18]
2438
+ ctx[19]
2438
2439
  );
2439
2440
  },
2440
2441
  m(target, anchor) {
@@ -2500,19 +2501,19 @@
2500
2501
  }
2501
2502
  if (
2502
2503
  /*showTextAlignmentInline*/
2503
- ctx2[13] && /*showStimulusLayoutTextFirst*/
2504
- ctx2[16]
2504
+ ctx2[14] && /*showStimulusLayoutTextFirst*/
2505
+ ctx2[17]
2505
2506
  )
2506
2507
  if_block1.p(ctx2, dirty);
2507
2508
  if (
2508
2509
  /*showAsset*/
2509
- ctx2[10] && /*fileAlignment*/
2510
- ctx2[6] === ASSET_ALIGNMENT_INLINE
2510
+ ctx2[11] && /*fileAlignment*/
2511
+ ctx2[7] === ASSET_ALIGNMENT_INLINE
2511
2512
  ) {
2512
2513
  if (if_block2) {
2513
2514
  if_block2.p(ctx2, dirty);
2514
2515
  if (dirty & /*fileAlignment*/
2515
- 64) {
2516
+ 128) {
2516
2517
  transition_in(if_block2, 1);
2517
2518
  }
2518
2519
  } else {
@@ -2530,8 +2531,8 @@
2530
2531
  }
2531
2532
  if (
2532
2533
  /*showTextAlignmentInline*/
2533
- ctx2[13] && /*showStimulusLayoutMediaFirst*/
2534
- ctx2[15]
2534
+ ctx2[14] && /*showStimulusLayoutMediaFirst*/
2535
+ ctx2[16]
2535
2536
  )
2536
2537
  if_block3.p(ctx2, dirty);
2537
2538
  if (
@@ -2559,19 +2560,19 @@
2559
2560
  }
2560
2561
  if (
2561
2562
  /*showTextAlignmentDefault*/
2562
- ctx2[12] && /*showStimulusLayoutTextFirst*/
2563
- ctx2[16]
2563
+ ctx2[13] && /*showStimulusLayoutTextFirst*/
2564
+ ctx2[17]
2564
2565
  )
2565
2566
  if_block5.p(ctx2, dirty);
2566
2567
  if (
2567
2568
  /*showAssetAlignmentDefault*/
2568
- ctx2[11]
2569
+ ctx2[12]
2569
2570
  )
2570
2571
  if_block6.p(ctx2, dirty);
2571
2572
  if (
2572
2573
  /*showTextAlignmentDefault*/
2573
- ctx2[12] && /*showStimulusLayoutMediaFirst*/
2574
- ctx2[15]
2574
+ ctx2[13] && /*showStimulusLayoutMediaFirst*/
2575
+ ctx2[16]
2575
2576
  )
2576
2577
  if_block7.p(ctx2, dirty);
2577
2578
  if (!current || dirty & /*hasDivider*/
@@ -2604,13 +2605,14 @@
2604
2605
  }
2605
2606
  if (
2606
2607
  /*showAlignmentDefault*/
2607
- ctx2[14]
2608
+ ctx2[15]
2608
2609
  )
2609
2610
  if_block8.p(ctx2, dirty);
2610
- if (!current || dirty & /*optionHasMedia*/
2611
- 8 && div2_class_value !== (div2_class_value = null_to_empty(`${/*showAlignmentDefault*/
2612
- ctx2[14] ? "lg:w-full lg:flex" : "container-class"} ${INTERACTION_TYPE_MCQ && /*optionHasMedia*/
2613
- ctx2[3] ? "mcq-media-container" : ""}`) + " svelte-c9q74j")) {
2611
+ if (!current || dirty & /*optionHasMedia, stimulus*/
2612
+ 24 && div2_class_value !== (div2_class_value = null_to_empty(`${/*showAlignmentDefault*/
2613
+ ctx2[15] ? "lg:w-full lg:flex" : "container-class"} ${INTERACTION_TYPE_MCQ && /*optionHasMedia*/
2614
+ ctx2[4] ? !/*stimulus*/
2615
+ ctx2[3] ? "mcq-media-container" : "mcq-media-container-stimulus" : ""}`) + " svelte-plkvcr")) {
2614
2616
  attr(div2, "class", div2_class_value);
2615
2617
  }
2616
2618
  },
@@ -2730,13 +2732,13 @@
2730
2732
  if ("prompt" in $$props2)
2731
2733
  $$invalidate(1, prompt = $$props2.prompt);
2732
2734
  if ("interactionType" in $$props2)
2733
- $$invalidate(19, interactionType = $$props2.interactionType);
2735
+ $$invalidate(20, interactionType = $$props2.interactionType);
2734
2736
  if ("hasDivider" in $$props2)
2735
2737
  $$invalidate(2, hasDivider = $$props2.hasDivider);
2736
2738
  if ("stimulus" in $$props2)
2737
- $$invalidate(20, stimulus = $$props2.stimulus);
2739
+ $$invalidate(3, stimulus = $$props2.stimulus);
2738
2740
  if ("optionHasMedia" in $$props2)
2739
- $$invalidate(3, optionHasMedia = $$props2.optionHasMedia);
2741
+ $$invalidate(4, optionHasMedia = $$props2.optionHasMedia);
2740
2742
  if ("$$scope" in $$props2)
2741
2743
  $$invalidate(21, $$scope = $$props2.$$scope);
2742
2744
  };
@@ -2744,6 +2746,7 @@
2744
2746
  rubric,
2745
2747
  prompt,
2746
2748
  hasDivider,
2749
+ stimulus,
2747
2750
  optionHasMedia,
2748
2751
  fileUrl,
2749
2752
  fileType,
@@ -2761,7 +2764,6 @@
2761
2764
  promptRubricHeaderElem,
2762
2765
  interactionWidthValue,
2763
2766
  interactionType,
2764
- stimulus,
2765
2767
  $$scope,
2766
2768
  slots
2767
2769
  ];
@@ -2778,10 +2780,10 @@
2778
2780
  {
2779
2781
  rubric: 0,
2780
2782
  prompt: 1,
2781
- interactionType: 19,
2783
+ interactionType: 20,
2782
2784
  hasDivider: 2,
2783
- stimulus: 20,
2784
- optionHasMedia: 3
2785
+ stimulus: 3,
2786
+ optionHasMedia: 4
2785
2787
  },
2786
2788
  add_css
2787
2789
  );
@@ -2801,7 +2803,7 @@
2801
2803
  flush();
2802
2804
  }
2803
2805
  get interactionType() {
2804
- return this.$$.ctx[19];
2806
+ return this.$$.ctx[20];
2805
2807
  }
2806
2808
  set interactionType(interactionType) {
2807
2809
  this.$$set({ interactionType });
@@ -2815,14 +2817,14 @@
2815
2817
  flush();
2816
2818
  }
2817
2819
  get stimulus() {
2818
- return this.$$.ctx[20];
2820
+ return this.$$.ctx[3];
2819
2821
  }
2820
2822
  set stimulus(stimulus) {
2821
2823
  this.$$set({ stimulus });
2822
2824
  flush();
2823
2825
  }
2824
2826
  get optionHasMedia() {
2825
- return this.$$.ctx[3];
2827
+ return this.$$.ctx[4];
2826
2828
  }
2827
2829
  set optionHasMedia(optionHasMedia) {
2828
2830
  this.$$set({ optionHasMedia });
@@ -3305,7 +3307,7 @@
3305
3307
  flush();
3306
3308
  }
3307
3309
  };
3308
- customElements.define("prompt-result-feedbackv3", create_custom_element(PromptResultFeedbackAlert, { "hasIcon": { "type": "Boolean" }, "isFeedbackAlert": { "type": "Boolean" }, "isResultCorrect": { "type": "Boolean" }, "isSkipped": { "type": "Boolean" }, "resultFeedback": {}, "resultFeedbackTitle": {} }, [], [], true));
3310
+ customElements.define("prompt-result-feedback-alert", create_custom_element(PromptResultFeedbackAlert, { "hasIcon": { "type": "Boolean" }, "isFeedbackAlert": { "type": "Boolean" }, "isResultCorrect": { "type": "Boolean" }, "isSkipped": { "type": "Boolean" }, "resultFeedback": {}, "resultFeedbackTitle": {} }, [], [], true));
3309
3311
  var PromptResultFeedbackAlert_default = PromptResultFeedbackAlert;
3310
3312
 
3311
3313
  // src/lib/composables/useMCQ.ts
@@ -3626,11 +3628,9 @@
3626
3628
  attr(div0, "class", div0_class_value = /*isDataSaving*/
3627
3629
  ctx[0] ? "absolute inset-0 bg-transparent z-50" : "");
3628
3630
  attr(div1, "class", div1_class_value = /*optionHasMedia*/
3629
- ctx[13] && !/*isPreviewMode*/
3630
- ctx[2] ? "flex flex-col justify-start items-center md:justify-center md:items-start md:flex-none md:grid md:grid-cols-2 md:gap-x-4" : "");
3631
+ ctx[13] ? "flex flex-col justify-start items-center md:justify-center md:items-start md:flex-none md:grid md:grid-cols-2 md:gap-x-4" : "");
3631
3632
  attr(div2, "class", div2_class_value = /*optionHasMedia*/
3632
- ctx[13] && !/*isPreviewMode*/
3633
- ctx[2] ? "w-full" : "relative");
3633
+ ctx[13] ? "w-full" : "relative");
3634
3634
  },
3635
3635
  m(target, anchor) {
3636
3636
  insert(target, div2, anchor);
@@ -3675,18 +3675,6 @@
3675
3675
  }
3676
3676
  check_outros();
3677
3677
  }
3678
- if (!current || dirty[0] & /*isPreviewMode*/
3679
- 4 && div1_class_value !== (div1_class_value = /*optionHasMedia*/
3680
- ctx2[13] && !/*isPreviewMode*/
3681
- ctx2[2] ? "flex flex-col justify-start items-center md:justify-center md:items-start md:flex-none md:grid md:grid-cols-2 md:gap-x-4" : "")) {
3682
- attr(div1, "class", div1_class_value);
3683
- }
3684
- if (!current || dirty[0] & /*isPreviewMode*/
3685
- 4 && div2_class_value !== (div2_class_value = /*optionHasMedia*/
3686
- ctx2[13] && !/*isPreviewMode*/
3687
- ctx2[2] ? "w-full" : "relative")) {
3688
- attr(div2, "class", div2_class_value);
3689
- }
3690
3678
  },
3691
3679
  i(local) {
3692
3680
  if (current)
@@ -4287,8 +4275,7 @@
4287
4275
  let if_block5 = show_if && create_if_block_24(ctx);
4288
4276
  let if_block6 = (
4289
4277
  /*optionHasMedia*/
4290
- ctx[13] && !/*isPreviewMode*/
4291
- ctx[2] && create_if_block_14(ctx)
4278
+ ctx[13] && create_if_block_14(ctx)
4292
4279
  );
4293
4280
  function func() {
4294
4281
  return (
@@ -4343,15 +4330,13 @@
4343
4330
  if_block6.c();
4344
4331
  t9 = space();
4345
4332
  attr(span0, "class", span0_class_value = "choice " + /*optionHasMedia*/
4346
- (ctx[13] && !/*isPreviewMode*/
4347
- ctx[2] ? "my-1.5" : ""));
4333
+ (ctx[13] ? "my-1.5" : ""));
4348
4334
  attr(span1, "class", "flex flex-col px-3 text-left");
4349
4335
  attr(span2, "class", "flex items-center");
4350
4336
  attr(span3, "class", "flex items-center");
4351
4337
  attr(span4, "class", "flex items-center justify-between w-full");
4352
4338
  attr(span5, "class", span5_class_value = "btn-mcq-text " + /*optionHasMedia*/
4353
- (ctx[13] && !/*isPreviewMode*/
4354
- ctx[2] ? "min-h-[44px]" : ""));
4339
+ (ctx[13] ? "min-h-[44px]" : ""));
4355
4340
  attr(button, "role", button_role_value = /*correctAnswersLength*/
4356
4341
  ctx[5] > 1 ? "checkbox" : null);
4357
4342
  attr(button, "tabindex", button_tabindex_value = /*correctAnswersLength*/
@@ -4383,8 +4368,7 @@
4383
4368
  ctx[30].answer
4384
4369
  )} ${func()}`);
4385
4370
  attr(button, "class", button_class_value = "group btn-mcq-option " + /*optionHasMedia*/
4386
- (ctx[13] && !/*isPreviewMode*/
4387
- ctx[2] ? "min-w-[288px] max-w-[304px] min-h-[210px] md:min-w-full block" : "") + " " + (!/*isFinished*/
4371
+ (ctx[13] ? "min-w-[288px] max-w-[304px] min-h-[210px] md:min-w-full block" : "") + " " + (!/*isFinished*/
4388
4372
  ctx[1] || /*isPreviewModeInteractive*/
4389
4373
  ctx[3] ? "active:raw-focus-ring-by" : "finished") + " " + /*selectedOptions*/
4390
4374
  (ctx[4].includes(
@@ -4495,12 +4479,6 @@
4495
4479
  if_block0.d(1);
4496
4480
  if_block0 = null;
4497
4481
  }
4498
- if (!current || dirty[0] & /*isPreviewMode*/
4499
- 4 && span0_class_value !== (span0_class_value = "choice " + /*optionHasMedia*/
4500
- (ctx[13] && !/*isPreviewMode*/
4501
- ctx[2] ? "my-1.5" : ""))) {
4502
- attr(span0, "class", span0_class_value);
4503
- }
4504
4482
  if (dirty[0] & /*isFinished, selectedOptions, correctAnswersLength, isPreviewMode, isPreviewModeInteractive*/
4505
4483
  62)
4506
4484
  show_if_4 = /*isFinished*/
@@ -4659,28 +4637,11 @@
4659
4637
  });
4660
4638
  check_outros();
4661
4639
  }
4662
- if (!current || dirty[0] & /*isPreviewMode*/
4663
- 4 && span5_class_value !== (span5_class_value = "btn-mcq-text " + /*optionHasMedia*/
4664
- (ctx[13] && !/*isPreviewMode*/
4665
- ctx[2] ? "min-h-[44px]" : ""))) {
4666
- attr(span5, "class", span5_class_value);
4667
- }
4668
4640
  if (
4669
4641
  /*optionHasMedia*/
4670
- ctx[13] && !/*isPreviewMode*/
4671
- ctx[2]
4672
- ) {
4673
- if (if_block6) {
4674
- if_block6.p(ctx, dirty);
4675
- } else {
4676
- if_block6 = create_if_block_14(ctx);
4677
- if_block6.c();
4678
- if_block6.m(button, t9);
4679
- }
4680
- } else if (if_block6) {
4681
- if_block6.d(1);
4682
- if_block6 = null;
4683
- }
4642
+ ctx[13]
4643
+ )
4644
+ if_block6.p(ctx, dirty);
4684
4645
  if (!current || dirty[0] & /*correctAnswersLength*/
4685
4646
  32 && button_role_value !== (button_role_value = /*correctAnswersLength*/
4686
4647
  ctx[5] > 1 ? "checkbox" : null)) {
@@ -4724,10 +4685,9 @@
4724
4685
  )} ${func()}`)) {
4725
4686
  attr(button, "aria-label", button_aria_label_value);
4726
4687
  }
4727
- if (!current || dirty[0] & /*isPreviewMode, isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength*/
4688
+ if (!current || dirty[0] & /*isFinished, isPreviewModeInteractive, selectedOptions, correctAnswerIds, correctAnswersLength, isPreviewMode*/
4728
4689
  126 && button_class_value !== (button_class_value = "group btn-mcq-option " + /*optionHasMedia*/
4729
- (ctx[13] && !/*isPreviewMode*/
4730
- ctx[2] ? "min-w-[288px] max-w-[304px] min-h-[210px] md:min-w-full block" : "") + " " + (!/*isFinished*/
4690
+ (ctx[13] ? "min-w-[288px] max-w-[304px] min-h-[210px] md:min-w-full block" : "") + " " + (!/*isFinished*/
4731
4691
  ctx[1] || /*isPreviewModeInteractive*/
4732
4692
  ctx[3] ? "active:raw-focus-ring-by" : "finished") + " " + /*selectedOptions*/
4733
4693
  (ctx[4].includes(
@@ -4924,8 +4884,7 @@
4924
4884
  ),
4925
4885
  optionHasMedia: (
4926
4886
  /*optionHasMedia*/
4927
- ctx[13] && !/*isPreviewMode*/
4928
- ctx[2]
4887
+ ctx[13]
4929
4888
  ),
4930
4889
  $$slots: { default: [create_default_slot] },
4931
4890
  $$scope: { ctx }
@@ -4941,12 +4900,7 @@
4941
4900
  },
4942
4901
  p(ctx2, dirty) {
4943
4902
  const promptbody_changes = {};
4944
- if (dirty[0] & /*isPreviewMode*/
4945
- 4)
4946
- promptbody_changes.optionHasMedia = /*optionHasMedia*/
4947
- ctx2[13] && !/*isPreviewMode*/
4948
- ctx2[2];
4949
- if (dirty[0] & /*isPreviewMode, correctAnswersLength, selectedOptions, isFinished, isPreviewModeInteractive, correctAnswerIds, isDataSaving, resultFeedback, isFeedbackShown*/
4903
+ if (dirty[0] & /*correctAnswersLength, selectedOptions, isFinished, isPreviewModeInteractive, isPreviewMode, correctAnswerIds, isDataSaving, resultFeedback, isFeedbackShown*/
4950
4904
  511 | dirty[1] & /*$$scope*/
4951
4905
  4) {
4952
4906
  promptbody_changes.$$scope = { dirty, ctx: ctx2 };
@@ -17487,7 +17441,7 @@
17487
17441
  }
17488
17442
  };
17489
17443
  }
17490
- function create_if_block_111(ctx) {
17444
+ function create_if_block_211(ctx) {
17491
17445
  let promptdropdowncontainer;
17492
17446
  let current;
17493
17447
  promptdropdowncontainer = new PromptDropdownContainer_default({
@@ -17599,7 +17553,7 @@
17599
17553
  let if_block;
17600
17554
  let if_block_anchor;
17601
17555
  let current;
17602
- const if_block_creators = [create_if_block_111, create_else_block7];
17556
+ const if_block_creators = [create_if_block_211, create_else_block7];
17603
17557
  const if_blocks = [];
17604
17558
  function select_block_type(ctx2, dirty) {
17605
17559
  if (
@@ -17645,27 +17599,17 @@
17645
17599
  function create_if_block12(ctx) {
17646
17600
  let div;
17647
17601
  let t0;
17648
- let promptresult;
17602
+ let show_if = (
17603
+ /*isFinished*/
17604
+ ctx[2] && !/*isResultCorrect*/
17605
+ ctx[8]() || /*isPreviewModeInteractive*/
17606
+ ctx[4] && /*previewInteractiveEvent*/
17607
+ ctx[9]
17608
+ );
17649
17609
  let t1;
17650
17610
  let promptresultfeedbacktable;
17651
17611
  let current;
17652
- promptresult = new PromptResultFeedbackAlert_default({
17653
- props: {
17654
- isResultCorrect: (
17655
- /*isResultCorrect*/
17656
- ctx[8]()
17657
- ),
17658
- resultFeedback: (
17659
- /*resultFeedback*/
17660
- ctx[12]()
17661
- ),
17662
- isSkipped: (
17663
- /*isSkipped*/
17664
- ctx[13]()
17665
- ),
17666
- hasIcon: true
17667
- }
17668
- });
17612
+ let if_block = show_if && create_if_block_111(ctx);
17669
17613
  promptresultfeedbacktable = new PromptResultFeedbackTable_default({
17670
17614
  props: {
17671
17615
  answerResults: (
@@ -17690,7 +17634,8 @@
17690
17634
  c() {
17691
17635
  div = element("div");
17692
17636
  t0 = space();
17693
- create_component(promptresult.$$.fragment);
17637
+ if (if_block)
17638
+ if_block.c();
17694
17639
  t1 = space();
17695
17640
  create_component(promptresultfeedbacktable.$$.fragment);
17696
17641
  attr(div, "class", "divider my-6");
@@ -17698,26 +17643,40 @@
17698
17643
  m(target, anchor) {
17699
17644
  insert(target, div, anchor);
17700
17645
  insert(target, t0, anchor);
17701
- mount_component(promptresult, target, anchor);
17646
+ if (if_block)
17647
+ if_block.m(target, anchor);
17702
17648
  insert(target, t1, anchor);
17703
17649
  mount_component(promptresultfeedbacktable, target, anchor);
17704
17650
  current = true;
17705
17651
  },
17706
17652
  p(ctx2, dirty) {
17707
- const promptresult_changes = {};
17708
- if (dirty[0] & /*isResultCorrect*/
17709
- 256)
17710
- promptresult_changes.isResultCorrect = /*isResultCorrect*/
17711
- ctx2[8]();
17712
- if (dirty[0] & /*resultFeedback*/
17713
- 4096)
17714
- promptresult_changes.resultFeedback = /*resultFeedback*/
17715
- ctx2[12]();
17716
- if (dirty[0] & /*isSkipped*/
17717
- 8192)
17718
- promptresult_changes.isSkipped = /*isSkipped*/
17719
- ctx2[13]();
17720
- promptresult.$set(promptresult_changes);
17653
+ if (dirty[0] & /*isFinished, isResultCorrect, isPreviewModeInteractive, previewInteractiveEvent*/
17654
+ 788)
17655
+ show_if = /*isFinished*/
17656
+ ctx2[2] && !/*isResultCorrect*/
17657
+ ctx2[8]() || /*isPreviewModeInteractive*/
17658
+ ctx2[4] && /*previewInteractiveEvent*/
17659
+ ctx2[9];
17660
+ if (show_if) {
17661
+ if (if_block) {
17662
+ if_block.p(ctx2, dirty);
17663
+ if (dirty[0] & /*isFinished, isResultCorrect, isPreviewModeInteractive, previewInteractiveEvent*/
17664
+ 788) {
17665
+ transition_in(if_block, 1);
17666
+ }
17667
+ } else {
17668
+ if_block = create_if_block_111(ctx2);
17669
+ if_block.c();
17670
+ transition_in(if_block, 1);
17671
+ if_block.m(t1.parentNode, t1);
17672
+ }
17673
+ } else if (if_block) {
17674
+ group_outros();
17675
+ transition_out(if_block, 1, 1, () => {
17676
+ if_block = null;
17677
+ });
17678
+ check_outros();
17679
+ }
17721
17680
  const promptresultfeedbacktable_changes = {};
17722
17681
  if (dirty[0] & /*getDropdownAnswerResult*/
17723
17682
  2048)
@@ -17740,12 +17699,12 @@
17740
17699
  i(local) {
17741
17700
  if (current)
17742
17701
  return;
17743
- transition_in(promptresult.$$.fragment, local);
17702
+ transition_in(if_block);
17744
17703
  transition_in(promptresultfeedbacktable.$$.fragment, local);
17745
17704
  current = true;
17746
17705
  },
17747
17706
  o(local) {
17748
- transition_out(promptresult.$$.fragment, local);
17707
+ transition_out(if_block);
17749
17708
  transition_out(promptresultfeedbacktable.$$.fragment, local);
17750
17709
  current = false;
17751
17710
  },
@@ -17755,11 +17714,71 @@
17755
17714
  detach(t0);
17756
17715
  detach(t1);
17757
17716
  }
17758
- destroy_component(promptresult, detaching);
17717
+ if (if_block)
17718
+ if_block.d(detaching);
17759
17719
  destroy_component(promptresultfeedbacktable, detaching);
17760
17720
  }
17761
17721
  };
17762
17722
  }
17723
+ function create_if_block_111(ctx) {
17724
+ let promptresult;
17725
+ let current;
17726
+ promptresult = new PromptResultFeedbackAlert_default({
17727
+ props: {
17728
+ isResultCorrect: (
17729
+ /*isResultCorrect*/
17730
+ ctx[8]()
17731
+ ),
17732
+ resultFeedback: (
17733
+ /*resultFeedback*/
17734
+ ctx[12]()
17735
+ ),
17736
+ isSkipped: (
17737
+ /*isSkipped*/
17738
+ ctx[13]()
17739
+ ),
17740
+ hasIcon: true
17741
+ }
17742
+ });
17743
+ return {
17744
+ c() {
17745
+ create_component(promptresult.$$.fragment);
17746
+ },
17747
+ m(target, anchor) {
17748
+ mount_component(promptresult, target, anchor);
17749
+ current = true;
17750
+ },
17751
+ p(ctx2, dirty) {
17752
+ const promptresult_changes = {};
17753
+ if (dirty[0] & /*isResultCorrect*/
17754
+ 256)
17755
+ promptresult_changes.isResultCorrect = /*isResultCorrect*/
17756
+ ctx2[8]();
17757
+ if (dirty[0] & /*resultFeedback*/
17758
+ 4096)
17759
+ promptresult_changes.resultFeedback = /*resultFeedback*/
17760
+ ctx2[12]();
17761
+ if (dirty[0] & /*isSkipped*/
17762
+ 8192)
17763
+ promptresult_changes.isSkipped = /*isSkipped*/
17764
+ ctx2[13]();
17765
+ promptresult.$set(promptresult_changes);
17766
+ },
17767
+ i(local) {
17768
+ if (current)
17769
+ return;
17770
+ transition_in(promptresult.$$.fragment, local);
17771
+ current = true;
17772
+ },
17773
+ o(local) {
17774
+ transition_out(promptresult.$$.fragment, local);
17775
+ current = false;
17776
+ },
17777
+ d(detaching) {
17778
+ destroy_component(promptresult, detaching);
17779
+ }
17780
+ };
17781
+ }
17763
17782
  function create_default_slot5(ctx) {
17764
17783
  let p;
17765
17784
  let t2;
@@ -17929,7 +17948,7 @@
17929
17948
  },
17930
17949
  p(ctx2, dirty) {
17931
17950
  const promptbody_changes = {};
17932
- if (dirty[0] & /*getDropdownAnswerResult, getCorrectAnswers, sessionId, getSessionAnswer, isResultCorrect, resultFeedback, isSkipped, isFinished, isPreviewMode, isPreviewModeInteractive, previewInteractiveEvent, sessionData, answer, isDataSaving*/
17951
+ if (dirty[0] & /*getDropdownAnswerResult, getCorrectAnswers, sessionId, getSessionAnswer, isResultCorrect, resultFeedback, isSkipped, isFinished, isPreviewModeInteractive, previewInteractiveEvent, isPreviewMode, sessionData, answer, isDataSaving*/
17933
17952
  16383 | dirty[1] & /*$$scope*/
17934
17953
  2) {
17935
17954
  promptbody_changes.$$scope = { dirty, ctx: ctx2 };
@@ -18290,7 +18309,7 @@
18290
18309
  let if_block_anchor;
18291
18310
  let current;
18292
18311
  const if_block_creators = [
18293
- create_if_block_211,
18312
+ create_if_block_212,
18294
18313
  create_if_block_39,
18295
18314
  create_if_block_47,
18296
18315
  create_if_block_56,
@@ -18665,7 +18684,7 @@
18665
18684
  }
18666
18685
  };
18667
18686
  }
18668
- function create_if_block_211(ctx) {
18687
+ function create_if_block_212(ctx) {
18669
18688
  let promptmcq;
18670
18689
  let current;
18671
18690
  promptmcq = new PromptMCQ_default({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "1.0.36",
4
- "change version": "1.0.7",
3
+ "version": "1.0.38",
4
+ "change version": "1.0.8",
5
5
  "description": "Authoring tool frontend SDK",
6
6
  "contributors": [
7
7
  {