eat-js-sdk 0.0.6 → 0.0.7

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.
@@ -991,14 +991,10 @@
991
991
  }
992
992
  function create_if_block_1(ctx) {
993
993
  let html_tag;
994
- let raw_value = (
995
- /*buildPromptRubric*/
996
- ctx[6](
997
- /*rubric*/
998
- ctx[2].text,
999
- "item-heading mb-2 md:mb-4"
1000
- ) + ""
1001
- );
994
+ let raw_value = `<${/*promptRubricHeaderElem*/
995
+ ctx[5]} class="item-heading mb-2 md:mb-4">${/*rubric*/
996
+ ctx[2].text}</${/*promptRubricHeaderElem*/
997
+ ctx[5]}>`;
1002
998
  let html_anchor;
1003
999
  return {
1004
1000
  c() {
@@ -1061,7 +1057,7 @@
1061
1057
  attr(div0, "class", div0_class_value);
1062
1058
  }
1063
1059
  if (dirty & /*selectedOption, Object, options, handleOptionClick*/
1064
- 50) {
1060
+ 82) {
1065
1061
  each_value = ensure_array_like(Object.entries(
1066
1062
  /*options*/
1067
1063
  ctx2[4]
@@ -1180,14 +1176,10 @@
1180
1176
  let div1;
1181
1177
  let t0;
1182
1178
  let html_tag;
1183
- let raw_value = (
1184
- /*buildPromptRubric*/
1185
- ctx[6](
1186
- /*prompt*/
1187
- ctx[3],
1188
- "item-heading font-semibold"
1189
- ) + ""
1190
- );
1179
+ let raw_value = `<${/*promptRubricHeaderElem*/
1180
+ ctx[5]} class="item-heading font-semibold">${/*prompt*/
1181
+ ctx[3]}</${/*promptRubricHeaderElem*/
1182
+ ctx[5]}>`;
1191
1183
  let t1;
1192
1184
  let div0;
1193
1185
  let t2;
@@ -1259,6 +1251,7 @@
1259
1251
  const { prompt, options } = interaction;
1260
1252
  let selectedOption;
1261
1253
  const dispatch = createEventDispatcher();
1254
+ const promptRubricHeaderElem = get_store_value(promptRubricElem);
1262
1255
  if (metadata) {
1263
1256
  const { events } = metadata.interactions;
1264
1257
  const currentOption = events.pop();
@@ -1274,10 +1267,6 @@
1274
1267
  answerChoice: option
1275
1268
  });
1276
1269
  };
1277
- const buildPromptRubric = (elemText, elemClass) => {
1278
- const heading = get_store_value(promptRubricElem);
1279
- return `<${heading} class="${elemClass}">${elemText}</${heading}>`;
1280
- };
1281
1270
  const click_handler = (option) => handleOptionClick(option.id, option.answer);
1282
1271
  $$self.$$set = ($$props2) => {
1283
1272
  if ("sessionData" in $$props2)
@@ -1291,8 +1280,8 @@
1291
1280
  rubric,
1292
1281
  prompt,
1293
1282
  options,
1283
+ promptRubricHeaderElem,
1294
1284
  handleOptionClick,
1295
- buildPromptRubric,
1296
1285
  sessionData,
1297
1286
  click_handler
1298
1287
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Authoring tool frontend SDK",
5
5
  "contributors": [
6
6
  {