eat-js-sdk 0.0.52 → 0.0.53

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.
@@ -5587,19 +5587,19 @@
5587
5587
  function select_block_type(ctx2, dirty) {
5588
5588
  if (
5589
5589
  /*resultType*/
5590
- ctx2[1] === ANSWER_CORRECT && !/*isWordItemSelected*/
5590
+ ctx2[0] === ANSWER_CORRECT && !/*isWordItemSelected*/
5591
5591
  ctx2[10]
5592
5592
  )
5593
5593
  return 0;
5594
5594
  if (
5595
5595
  /*resultType*/
5596
- ctx2[1] === ANSWER_INCORRECT && !/*isWordItemSelected*/
5596
+ ctx2[0] === ANSWER_INCORRECT && !/*isWordItemSelected*/
5597
5597
  ctx2[10]
5598
5598
  )
5599
5599
  return 1;
5600
5600
  if (
5601
5601
  /*resultType*/
5602
- ctx2[1] === ANSWER_MISSED
5602
+ ctx2[0] === ANSWER_MISSED
5603
5603
  )
5604
5604
  return 2;
5605
5605
  return 3;
@@ -5608,8 +5608,8 @@
5608
5608
  if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
5609
5609
  let if_block1 = (
5610
5610
  /*resultType*/
5611
- (ctx[1] === ANSWER_CORRECT || /*resultType*/
5612
- ctx[1] === ANSWER_INCORRECT) && create_if_block5(ctx)
5611
+ (ctx[0] === ANSWER_CORRECT || /*resultType*/
5612
+ ctx[0] === ANSWER_INCORRECT) && create_if_block5(ctx)
5613
5613
  );
5614
5614
  return {
5615
5615
  c() {
@@ -5617,7 +5617,7 @@
5617
5617
  span0 = element("span");
5618
5618
  t0 = text(
5619
5619
  /*word*/
5620
- ctx[0]
5620
+ ctx[1]
5621
5621
  );
5622
5622
  t1 = space();
5623
5623
  div = element("div");
@@ -5644,21 +5644,21 @@
5644
5644
  ctx[3]
5645
5645
  );
5646
5646
  attr(button, "aria-label", button_aria_label_value = /*resultType*/
5647
- ctx[1] === ANSWER_INCORRECT && /*containerId*/
5647
+ ctx[0] === ANSWER_INCORRECT && /*containerId*/
5648
5648
  ctx[5] === CONTAINER_WORD_BIN_ID && !/*isWordItemSelected*/
5649
5649
  ctx[10] ? `Skipped answer: ${/*word*/
5650
- ctx[0]}` : (
5650
+ ctx[1]}` : (
5651
5651
  /*resultType*/
5652
- (ctx[1] === ANSWER_CORRECT || /*resultType*/
5653
- ctx[1] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5652
+ (ctx[0] === ANSWER_CORRECT || /*resultType*/
5653
+ ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5654
5654
  ctx[10] ? `Student's answer: ${/*word*/
5655
- ctx[0]} (${/*resultType*/
5656
- ctx[1]})` : (
5655
+ ctx[1]} (${/*resultType*/
5656
+ ctx[0]})` : (
5657
5657
  /*resultType*/
5658
- ctx[1] === ANSWER_MISSED ? `Missing answer: ${/*word*/
5659
- ctx[0]}` : `${/*isWordItemSelected*/
5658
+ ctx[0] === ANSWER_MISSED ? `Missing answer: ${/*word*/
5659
+ ctx[1]}` : `${/*isWordItemSelected*/
5660
5660
  ctx[10] ? "Selected option" : "Option"}: ${/*word*/
5661
- ctx[0]}`
5661
+ ctx[1]}`
5662
5662
  )
5663
5663
  ));
5664
5664
  attr(button, "class", button_class_value = "focus-ring flex items-center justify-between min-h-[54px] p-1 border border-gray-800 rounded-lg " + /*otherClass*/
@@ -5669,17 +5669,17 @@
5669
5669
  (ctx[10] ? "bg-blue-1000 !border-blue-1000 raw-focus-ring !cursor-pointer" : "bg-gray-100") + " " + (!/*currentSelectedItemId*/
5670
5670
  ctx[7] && !/*disabledClick*/
5671
5671
  ctx[6] ? "td:hover-focus-ring td:hover:bg-violet-100 !cursor-pointer" : "!cursor-default") + " " + /*resultType*/
5672
- (ctx[1] === ANSWER_CORRECT && !/*isWordItemSelected*/
5672
+ (ctx[0] === ANSWER_CORRECT && !/*isWordItemSelected*/
5673
5673
  ctx[10] ? "border-green-800 bg-green-300" : (
5674
5674
  /*resultType*/
5675
- ctx[1] === ANSWER_INCORRECT && !/*isWordItemSelected*/
5675
+ ctx[0] === ANSWER_INCORRECT && !/*isWordItemSelected*/
5676
5676
  ctx[10] ? "border-red-800 bg-red-300" : (
5677
5677
  /*resultType*/
5678
- ctx[1] === ANSWER_MISSED ? "border-green-800" : ""
5678
+ ctx[0] === ANSWER_MISSED ? "border-green-800" : ""
5679
5679
  )
5680
5680
  )) + " " + /*resultType*/
5681
- ((ctx[1] === ANSWER_CORRECT || /*resultType*/
5682
- ctx[1] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5681
+ ((ctx[0] === ANSWER_CORRECT || /*resultType*/
5682
+ ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5683
5683
  ctx[10] ? "td:hover:border-gray-800" : ""));
5684
5684
  },
5685
5685
  m(target, anchor) {
@@ -5695,7 +5695,7 @@
5695
5695
  append(span2, t3);
5696
5696
  if (if_block1)
5697
5697
  if_block1.m(span2, null);
5698
- ctx[15](button);
5698
+ ctx[17](button);
5699
5699
  current = true;
5700
5700
  if (!mounted) {
5701
5701
  dispose = [
@@ -5738,11 +5738,11 @@
5738
5738
  p(new_ctx, [dirty]) {
5739
5739
  ctx = new_ctx;
5740
5740
  if (!current || dirty & /*word*/
5741
- 1)
5741
+ 2)
5742
5742
  set_data(
5743
5743
  t0,
5744
5744
  /*word*/
5745
- ctx[0]
5745
+ ctx[1]
5746
5746
  );
5747
5747
  if (!current || dirty & /*isWordItemSelected*/
5748
5748
  1024 && span0_class_value !== (span0_class_value = "text-charcoal text-base pl-3 mr-4 " + /*isWordItemSelected*/
@@ -5774,12 +5774,12 @@
5774
5774
  }
5775
5775
  if (
5776
5776
  /*resultType*/
5777
- ctx[1] === ANSWER_CORRECT || /*resultType*/
5778
- ctx[1] === ANSWER_INCORRECT
5777
+ ctx[0] === ANSWER_CORRECT || /*resultType*/
5778
+ ctx[0] === ANSWER_INCORRECT
5779
5779
  ) {
5780
5780
  if (if_block1) {
5781
5781
  if (dirty & /*resultType*/
5782
- 2) {
5782
+ 1) {
5783
5783
  transition_in(if_block1, 1);
5784
5784
  }
5785
5785
  } else {
@@ -5812,27 +5812,27 @@
5812
5812
  }
5813
5813
  if (!current || dirty & /*resultType, containerId, isWordItemSelected, word*/
5814
5814
  1059 && button_aria_label_value !== (button_aria_label_value = /*resultType*/
5815
- ctx[1] === ANSWER_INCORRECT && /*containerId*/
5815
+ ctx[0] === ANSWER_INCORRECT && /*containerId*/
5816
5816
  ctx[5] === CONTAINER_WORD_BIN_ID && !/*isWordItemSelected*/
5817
5817
  ctx[10] ? `Skipped answer: ${/*word*/
5818
- ctx[0]}` : (
5818
+ ctx[1]}` : (
5819
5819
  /*resultType*/
5820
- (ctx[1] === ANSWER_CORRECT || /*resultType*/
5821
- ctx[1] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5820
+ (ctx[0] === ANSWER_CORRECT || /*resultType*/
5821
+ ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5822
5822
  ctx[10] ? `Student's answer: ${/*word*/
5823
- ctx[0]} (${/*resultType*/
5824
- ctx[1]})` : (
5823
+ ctx[1]} (${/*resultType*/
5824
+ ctx[0]})` : (
5825
5825
  /*resultType*/
5826
- ctx[1] === ANSWER_MISSED ? `Missing answer: ${/*word*/
5827
- ctx[0]}` : `${/*isWordItemSelected*/
5826
+ ctx[0] === ANSWER_MISSED ? `Missing answer: ${/*word*/
5827
+ ctx[1]}` : `${/*isWordItemSelected*/
5828
5828
  ctx[10] ? "Selected option" : "Option"}: ${/*word*/
5829
- ctx[0]}`
5829
+ ctx[1]}`
5830
5830
  )
5831
5831
  ))) {
5832
5832
  attr(button, "aria-label", button_aria_label_value);
5833
5833
  }
5834
5834
  if (!current || dirty & /*otherClass, isClonedItem, considerCloneItemId, wordButtonId, isWordItemSelected, currentSelectedItemId, disabledClick, resultType*/
5835
- 1758 && button_class_value !== (button_class_value = "focus-ring flex items-center justify-between min-h-[54px] p-1 border border-gray-800 rounded-lg " + /*otherClass*/
5835
+ 1757 && button_class_value !== (button_class_value = "focus-ring flex items-center justify-between min-h-[54px] p-1 border border-gray-800 rounded-lg " + /*otherClass*/
5836
5836
  ctx[2] + " " + /*isClonedItem*/
5837
5837
  (ctx[4] ? "opacity-50 raw-focus-ring bg-violet-100" : "") + " " + /*considerCloneItemId*/
5838
5838
  (ctx[9] === /*wordButtonId*/
@@ -5840,17 +5840,17 @@
5840
5840
  (ctx[10] ? "bg-blue-1000 !border-blue-1000 raw-focus-ring !cursor-pointer" : "bg-gray-100") + " " + (!/*currentSelectedItemId*/
5841
5841
  ctx[7] && !/*disabledClick*/
5842
5842
  ctx[6] ? "td:hover-focus-ring td:hover:bg-violet-100 !cursor-pointer" : "!cursor-default") + " " + /*resultType*/
5843
- (ctx[1] === ANSWER_CORRECT && !/*isWordItemSelected*/
5843
+ (ctx[0] === ANSWER_CORRECT && !/*isWordItemSelected*/
5844
5844
  ctx[10] ? "border-green-800 bg-green-300" : (
5845
5845
  /*resultType*/
5846
- ctx[1] === ANSWER_INCORRECT && !/*isWordItemSelected*/
5846
+ ctx[0] === ANSWER_INCORRECT && !/*isWordItemSelected*/
5847
5847
  ctx[10] ? "border-red-800 bg-red-300" : (
5848
5848
  /*resultType*/
5849
- ctx[1] === ANSWER_MISSED ? "border-green-800" : ""
5849
+ ctx[0] === ANSWER_MISSED ? "border-green-800" : ""
5850
5850
  )
5851
5851
  )) + " " + /*resultType*/
5852
- ((ctx[1] === ANSWER_CORRECT || /*resultType*/
5853
- ctx[1] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5852
+ ((ctx[0] === ANSWER_CORRECT || /*resultType*/
5853
+ ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
5854
5854
  ctx[10] ? "td:hover:border-gray-800" : ""))) {
5855
5855
  attr(button, "class", button_class_value);
5856
5856
  }
@@ -5874,7 +5874,7 @@
5874
5874
  if_blocks[current_block_type_index].d();
5875
5875
  if (if_block1)
5876
5876
  if_block1.d();
5877
- ctx[15](null);
5877
+ ctx[17](null);
5878
5878
  mounted = false;
5879
5879
  run_all(dispose);
5880
5880
  }
@@ -5889,7 +5889,9 @@
5889
5889
  let { containerId = "" } = $$props;
5890
5890
  let { wordFocus = false } = $$props;
5891
5891
  let { disabledClick = false } = $$props;
5892
+ let { isPreviewModeInteractive = false } = $$props;
5892
5893
  let { categoryData = [] } = $$props;
5894
+ let { correctAnswerList = [] } = $$props;
5893
5895
  const dispatch = createEventDispatcher();
5894
5896
  let considerCloneItemId = "";
5895
5897
  let currentSelectedItemId = "";
@@ -5950,9 +5952,9 @@
5950
5952
  }
5951
5953
  $$self.$$set = ($$props2) => {
5952
5954
  if ("word" in $$props2)
5953
- $$invalidate(0, word = $$props2.word);
5955
+ $$invalidate(1, word = $$props2.word);
5954
5956
  if ("resultType" in $$props2)
5955
- $$invalidate(1, resultType = $$props2.resultType);
5957
+ $$invalidate(0, resultType = $$props2.resultType);
5956
5958
  if ("otherClass" in $$props2)
5957
5959
  $$invalidate(2, otherClass = $$props2.otherClass);
5958
5960
  if ("wordButtonId" in $$props2)
@@ -5965,8 +5967,12 @@
5965
5967
  $$invalidate(14, wordFocus = $$props2.wordFocus);
5966
5968
  if ("disabledClick" in $$props2)
5967
5969
  $$invalidate(6, disabledClick = $$props2.disabledClick);
5970
+ if ("isPreviewModeInteractive" in $$props2)
5971
+ $$invalidate(15, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
5968
5972
  if ("categoryData" in $$props2)
5969
5973
  $$invalidate(13, categoryData = $$props2.categoryData);
5974
+ if ("correctAnswerList" in $$props2)
5975
+ $$invalidate(16, correctAnswerList = $$props2.correctAnswerList);
5970
5976
  };
5971
5977
  $$self.$$.update = () => {
5972
5978
  if ($$self.$$.dirty & /*wordFocus, wordButton*/
@@ -5981,6 +5987,18 @@
5981
5987
  );
5982
5988
  }
5983
5989
  }
5990
+ if ($$self.$$.dirty & /*correctAnswerList, isPreviewModeInteractive, containerId, wordButtonId, resultType*/
5991
+ 98345) {
5992
+ $:
5993
+ if (correctAnswerList && isPreviewModeInteractive) {
5994
+ const { answerList } = correctAnswerList;
5995
+ const answers = answerList[containerId];
5996
+ if (containerId !== CONTAINER_WORD_BIN_ID && answers.length) {
5997
+ $$invalidate(0, resultType = answers.includes(wordButtonId) ? ANSWER_CORRECT : ANSWER_INCORRECT);
5998
+ console.log("result:", resultType);
5999
+ }
6000
+ }
6001
+ }
5984
6002
  if ($$self.$$.dirty & /*categoryData, currentSelectedItemId, wordButtonId*/
5985
6003
  8328) {
5986
6004
  $:
@@ -5993,8 +6011,8 @@
5993
6011
  }
5994
6012
  };
5995
6013
  return [
5996
- word,
5997
6014
  resultType,
6015
+ word,
5998
6016
  otherClass,
5999
6017
  wordButtonId,
6000
6018
  isClonedItem,
@@ -6008,6 +6026,8 @@
6008
6026
  removeContainerTabSelected,
6009
6027
  categoryData,
6010
6028
  wordFocus,
6029
+ isPreviewModeInteractive,
6030
+ correctAnswerList,
6011
6031
  button_binding
6012
6032
  ];
6013
6033
  }
@@ -6015,26 +6035,28 @@
6015
6035
  constructor(options) {
6016
6036
  super();
6017
6037
  init(this, options, instance5, create_fragment9, safe_not_equal, {
6018
- word: 0,
6019
- resultType: 1,
6038
+ word: 1,
6039
+ resultType: 0,
6020
6040
  otherClass: 2,
6021
6041
  wordButtonId: 3,
6022
6042
  isClonedItem: 4,
6023
6043
  containerId: 5,
6024
6044
  wordFocus: 14,
6025
6045
  disabledClick: 6,
6026
- categoryData: 13
6046
+ isPreviewModeInteractive: 15,
6047
+ categoryData: 13,
6048
+ correctAnswerList: 16
6027
6049
  });
6028
6050
  }
6029
6051
  get word() {
6030
- return this.$$.ctx[0];
6052
+ return this.$$.ctx[1];
6031
6053
  }
6032
6054
  set word(word) {
6033
6055
  this.$$set({ word });
6034
6056
  flush();
6035
6057
  }
6036
6058
  get resultType() {
6037
- return this.$$.ctx[1];
6059
+ return this.$$.ctx[0];
6038
6060
  }
6039
6061
  set resultType(resultType) {
6040
6062
  this.$$set({ resultType });
@@ -6082,6 +6104,13 @@
6082
6104
  this.$$set({ disabledClick });
6083
6105
  flush();
6084
6106
  }
6107
+ get isPreviewModeInteractive() {
6108
+ return this.$$.ctx[15];
6109
+ }
6110
+ set isPreviewModeInteractive(isPreviewModeInteractive) {
6111
+ this.$$set({ isPreviewModeInteractive });
6112
+ flush();
6113
+ }
6085
6114
  get categoryData() {
6086
6115
  return this.$$.ctx[13];
6087
6116
  }
@@ -6089,8 +6118,15 @@
6089
6118
  this.$$set({ categoryData });
6090
6119
  flush();
6091
6120
  }
6121
+ get correctAnswerList() {
6122
+ return this.$$.ctx[16];
6123
+ }
6124
+ set correctAnswerList(correctAnswerList) {
6125
+ this.$$set({ correctAnswerList });
6126
+ flush();
6127
+ }
6092
6128
  };
6093
- customElements.define("prompt-categorise-word-button", create_custom_element(PromptCategoriseWordButton, { "word": {}, "resultType": {}, "otherClass": {}, "wordButtonId": {}, "isClonedItem": { "type": "Boolean" }, "containerId": {}, "wordFocus": { "type": "Boolean" }, "disabledClick": { "type": "Boolean" }, "categoryData": {} }, [], [], true));
6129
+ customElements.define("prompt-categorise-word-button", create_custom_element(PromptCategoriseWordButton, { "word": {}, "resultType": {}, "otherClass": {}, "wordButtonId": {}, "isClonedItem": { "type": "Boolean" }, "containerId": {}, "wordFocus": { "type": "Boolean" }, "disabledClick": { "type": "Boolean" }, "isPreviewModeInteractive": { "type": "Boolean" }, "categoryData": {}, "correctAnswerList": {} }, [], [], true));
6094
6130
  var PromptCategoriseWordButton_default = PromptCategoriseWordButton;
6095
6131
 
6096
6132
  // src/lib/composables/useCategorise.ts
@@ -6145,7 +6181,7 @@
6145
6181
  ctx[7]
6146
6182
  );
6147
6183
  attr(button, "class", button_class_value = "focus-ring absolute inset-0 bg-transparent rounded-lg focus-visible:border " + /*isContainerWordBin*/
6148
- (ctx[20] ? "focus-visible:border-gray-400" : "focus-visible:border-gray-800"));
6184
+ (ctx[22] ? "focus-visible:border-gray-400" : "focus-visible:border-gray-800"));
6149
6185
  },
6150
6186
  m(target, anchor) {
6151
6187
  insert(target, button, anchor);
@@ -6154,7 +6190,7 @@
6154
6190
  button,
6155
6191
  "click",
6156
6192
  /*addAnswerItem*/
6157
- ctx[23]
6193
+ ctx[25]
6158
6194
  );
6159
6195
  mounted = true;
6160
6196
  }
@@ -6199,13 +6235,13 @@
6199
6235
  div,
6200
6236
  "click",
6201
6237
  /*addAnswerItem*/
6202
- ctx[23]
6238
+ ctx[25]
6203
6239
  ),
6204
6240
  listen(
6205
6241
  div,
6206
6242
  "keypress",
6207
6243
  /*addAnswerItem*/
6208
- ctx[23]
6244
+ ctx[25]
6209
6245
  )
6210
6246
  ];
6211
6247
  mounted = true;
@@ -6266,14 +6302,14 @@
6266
6302
  props: {
6267
6303
  otherClass: "mr-2 mb-2 last:mr-0 " + /*item*/
6268
6304
  (ctx[38].id === /*considerItemId*/
6269
- ctx[9] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
6305
+ ctx[11] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
6270
6306
  ctx[5] ? "hidden md:flex" : "") + "\n " + /*items*/
6271
- (ctx[17][
6307
+ (ctx[19][
6272
6308
  /*currentWordBinIndex*/
6273
- ctx[13]
6309
+ ctx[15]
6274
6310
  ]?.id !== /*item*/
6275
6311
  ctx[38].id && /*isContainerWordBin*/
6276
- ctx[20] ? "hidden md:flex" : ""),
6312
+ ctx[22] ? "hidden md:flex" : ""),
6277
6313
  word: (
6278
6314
  /*item*/
6279
6315
  ctx[38].text
@@ -6292,10 +6328,10 @@
6292
6328
  ),
6293
6329
  wordFocus: (
6294
6330
  /*currentTabContainer*/
6295
- ctx[15] === /*containerId*/
6331
+ ctx[17] === /*containerId*/
6296
6332
  ctx[3] && /*item*/
6297
6333
  ctx[38].id === /*items*/
6298
- ctx[17][0].id
6334
+ ctx[19][0].id
6299
6335
  ),
6300
6336
  disabledClick: (
6301
6337
  /*isFinished*/
@@ -6308,13 +6344,21 @@
6308
6344
  categoryData: (
6309
6345
  /*categoryData*/
6310
6346
  ctx[0]
6347
+ ),
6348
+ correctAnswerList: (
6349
+ /*correctAnswerList*/
6350
+ ctx[9]
6351
+ ),
6352
+ isPreviewModeInteractive: (
6353
+ /*isPreviewModeInteractive*/
6354
+ ctx[10]
6311
6355
  )
6312
6356
  }
6313
6357
  });
6314
6358
  promptcategorisewordbutton.$on(
6315
6359
  "updateCategorySettings",
6316
6360
  /*updateCategoryByButton*/
6317
- ctx[24]
6361
+ ctx[26]
6318
6362
  );
6319
6363
  return {
6320
6364
  key: key_1,
@@ -6354,27 +6398,27 @@
6354
6398
  }
6355
6399
  const promptcategorisewordbutton_changes = {};
6356
6400
  if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex*/
6357
- 139808)
6401
+ 559136)
6358
6402
  promptcategorisewordbutton_changes.otherClass = "mr-2 mb-2 last:mr-0 " + /*item*/
6359
6403
  (ctx[38].id === /*considerItemId*/
6360
- ctx[9] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
6404
+ ctx[11] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
6361
6405
  ctx[5] ? "hidden md:flex" : "") + "\n " + /*items*/
6362
- (ctx[17][
6406
+ (ctx[19][
6363
6407
  /*currentWordBinIndex*/
6364
- ctx[13]
6408
+ ctx[15]
6365
6409
  ]?.id !== /*item*/
6366
6410
  ctx[38].id && /*isContainerWordBin*/
6367
- ctx[20] ? "hidden md:flex" : "");
6411
+ ctx[22] ? "hidden md:flex" : "");
6368
6412
  if (dirty[0] & /*items*/
6369
- 131072)
6413
+ 524288)
6370
6414
  promptcategorisewordbutton_changes.word = /*item*/
6371
6415
  ctx[38].text;
6372
6416
  if (dirty[0] & /*items*/
6373
- 131072)
6417
+ 524288)
6374
6418
  promptcategorisewordbutton_changes.wordButtonId = /*item*/
6375
6419
  ctx[38].id;
6376
6420
  if (dirty[0] & /*items*/
6377
- 131072)
6421
+ 524288)
6378
6422
  promptcategorisewordbutton_changes.isClonedItem = /*item*/
6379
6423
  ctx[38].isClonedItem;
6380
6424
  if (dirty[0] & /*containerId*/
@@ -6382,24 +6426,32 @@
6382
6426
  promptcategorisewordbutton_changes.containerId = /*containerId*/
6383
6427
  ctx[3];
6384
6428
  if (dirty[0] & /*currentTabContainer, containerId, items*/
6385
- 163848)
6429
+ 655368)
6386
6430
  promptcategorisewordbutton_changes.wordFocus = /*currentTabContainer*/
6387
- ctx[15] === /*containerId*/
6431
+ ctx[17] === /*containerId*/
6388
6432
  ctx[3] && /*item*/
6389
6433
  ctx[38].id === /*items*/
6390
- ctx[17][0].id;
6434
+ ctx[19][0].id;
6391
6435
  if (dirty[0] & /*isFinished*/
6392
6436
  256)
6393
6437
  promptcategorisewordbutton_changes.disabledClick = /*isFinished*/
6394
6438
  ctx[8];
6395
6439
  if (dirty[0] & /*items*/
6396
- 131072)
6440
+ 524288)
6397
6441
  promptcategorisewordbutton_changes.resultType = /*item*/
6398
6442
  ctx[38].type;
6399
6443
  if (dirty[0] & /*categoryData*/
6400
6444
  1)
6401
6445
  promptcategorisewordbutton_changes.categoryData = /*categoryData*/
6402
6446
  ctx[0];
6447
+ if (dirty[0] & /*correctAnswerList*/
6448
+ 512)
6449
+ promptcategorisewordbutton_changes.correctAnswerList = /*correctAnswerList*/
6450
+ ctx[9];
6451
+ if (dirty[0] & /*isPreviewModeInteractive*/
6452
+ 1024)
6453
+ promptcategorisewordbutton_changes.isPreviewModeInteractive = /*isPreviewModeInteractive*/
6454
+ ctx[10];
6403
6455
  promptcategorisewordbutton.$set(promptcategorisewordbutton_changes);
6404
6456
  },
6405
6457
  i(local) {
@@ -6437,19 +6489,19 @@
6437
6489
  let dispose;
6438
6490
  let if_block0 = (
6439
6491
  /*dragDisabled*/
6440
- ctx[11] && /*sourceSelectedContainerId*/
6441
- ctx[12] !== /*containerId*/
6492
+ ctx[13] && /*sourceSelectedContainerId*/
6493
+ ctx[14] !== /*containerId*/
6442
6494
  ctx[3] && !/*isFinished*/
6443
6495
  ctx[8] && create_if_block_24(ctx)
6444
6496
  );
6445
6497
  let if_block1 = (
6446
6498
  /*totalRemainingWordBinItem*/
6447
- ctx[14] <= 0 && /*isContainerWordBin*/
6448
- ctx[20] && create_if_block_16(ctx)
6499
+ ctx[16] <= 0 && /*isContainerWordBin*/
6500
+ ctx[22] && create_if_block_16(ctx)
6449
6501
  );
6450
6502
  let each_value = ensure_array_like(Object.values(
6451
6503
  /*items*/
6452
- ctx[17]
6504
+ ctx[19]
6453
6505
  ));
6454
6506
  const get_key = (ctx2) => (
6455
6507
  /*item*/
@@ -6479,7 +6531,7 @@
6479
6531
  section,
6480
6532
  "aria-hidden",
6481
6533
  /*isItemsAriaHidden*/
6482
- ctx[18]
6534
+ ctx[20]
6483
6535
  );
6484
6536
  attr(section, "aria-dropeffect", "move");
6485
6537
  attr(
@@ -6489,7 +6541,7 @@
6489
6541
  ctx[3]
6490
6542
  );
6491
6543
  attr(section, "style", section_style_value = !/*isContainerWordBin*/
6492
- ctx[20] ? `padding-top: ${/*paddingTop*/
6544
+ ctx[22] ? `padding-top: ${/*paddingTop*/
6493
6545
  ctx[6]}px;` : "");
6494
6546
  },
6495
6547
  m(target, anchor) {
@@ -6511,7 +6563,7 @@
6511
6563
  action_destroyer(dndzone_action = dndzone$2.call(null, section, {
6512
6564
  items: (
6513
6565
  /*items*/
6514
- ctx[17]
6566
+ ctx[19]
6515
6567
  ),
6516
6568
  flipDurationMs: (
6517
6569
  /*flipDurationMs*/
@@ -6523,20 +6575,20 @@
6523
6575
  ),
6524
6576
  dropTargetClasses: (
6525
6577
  /*dropTargetClasses*/
6526
- ctx[19]
6578
+ ctx[21]
6527
6579
  ),
6528
6580
  morphDisabled: true,
6529
6581
  dragDisabled: (
6530
6582
  /*dragDisabled*/
6531
- ctx[11]
6583
+ ctx[13]
6532
6584
  ),
6533
6585
  autoAriaDisabled: true,
6534
6586
  zoneItemTabIndex: (
6535
6587
  /*currentTabContainer*/
6536
- ctx[15] !== /*containerId*/
6588
+ ctx[17] !== /*containerId*/
6537
6589
  ctx[3] || /*selectedItemId*/
6538
- ctx[10] || /*isModalOpen*/
6539
- ctx[16] ? -1 : 0
6590
+ ctx[12] || /*isModalOpen*/
6591
+ ctx[18] ? -1 : 0
6540
6592
  ),
6541
6593
  zoneTabIndex: -1
6542
6594
  })),
@@ -6544,13 +6596,13 @@
6544
6596
  section,
6545
6597
  "consider",
6546
6598
  /*handleDndConsider*/
6547
- ctx[21]
6599
+ ctx[23]
6548
6600
  ),
6549
6601
  listen(
6550
6602
  section,
6551
6603
  "finalize",
6552
6604
  /*handleDndFinalize*/
6553
- ctx[22]
6605
+ ctx[24]
6554
6606
  )
6555
6607
  ];
6556
6608
  mounted = true;
@@ -6559,8 +6611,8 @@
6559
6611
  p(ctx2, dirty) {
6560
6612
  if (
6561
6613
  /*dragDisabled*/
6562
- ctx2[11] && /*sourceSelectedContainerId*/
6563
- ctx2[12] !== /*containerId*/
6614
+ ctx2[13] && /*sourceSelectedContainerId*/
6615
+ ctx2[14] !== /*containerId*/
6564
6616
  ctx2[3] && !/*isFinished*/
6565
6617
  ctx2[8]
6566
6618
  ) {
@@ -6577,8 +6629,8 @@
6577
6629
  }
6578
6630
  if (
6579
6631
  /*totalRemainingWordBinItem*/
6580
- ctx2[14] <= 0 && /*isContainerWordBin*/
6581
- ctx2[20]
6632
+ ctx2[16] <= 0 && /*isContainerWordBin*/
6633
+ ctx2[22]
6582
6634
  ) {
6583
6635
  if (if_block1) {
6584
6636
  if_block1.p(ctx2, dirty);
@@ -6591,11 +6643,11 @@
6591
6643
  if_block1.d(1);
6592
6644
  if_block1 = null;
6593
6645
  }
6594
- if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex, isContainerWordBin, containerId, currentTabContainer, isFinished, categoryData, updateCategoryByButton*/
6595
- 17998633) {
6646
+ if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex, isContainerWordBin, containerId, currentTabContainer, isFinished, categoryData, correctAnswerList, isPreviewModeInteractive, updateCategoryByButton*/
6647
+ 71995177) {
6596
6648
  each_value = ensure_array_like(Object.values(
6597
6649
  /*items*/
6598
- ctx2[17]
6650
+ ctx2[19]
6599
6651
  ));
6600
6652
  group_outros();
6601
6653
  each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value, each_1_lookup, section, outro_and_destroy_block, create_each_block2, null, get_each_context2);
@@ -6607,12 +6659,12 @@
6607
6659
  attr(section, "class", section_class_value);
6608
6660
  }
6609
6661
  if (!current || dirty[0] & /*isItemsAriaHidden*/
6610
- 262144) {
6662
+ 1048576) {
6611
6663
  attr(
6612
6664
  section,
6613
6665
  "aria-hidden",
6614
6666
  /*isItemsAriaHidden*/
6615
- ctx2[18]
6667
+ ctx2[20]
6616
6668
  );
6617
6669
  }
6618
6670
  if (!current || dirty[0] & /*containerId*/
@@ -6626,16 +6678,16 @@
6626
6678
  }
6627
6679
  if (!current || dirty[0] & /*paddingTop*/
6628
6680
  64 && section_style_value !== (section_style_value = !/*isContainerWordBin*/
6629
- ctx2[20] ? `padding-top: ${/*paddingTop*/
6681
+ ctx2[22] ? `padding-top: ${/*paddingTop*/
6630
6682
  ctx2[6]}px;` : "")) {
6631
6683
  attr(section, "style", section_style_value);
6632
6684
  }
6633
6685
  if (dndzone_action && is_function(dndzone_action.update) && dirty[0] & /*items, flipDurationMs, type, dragDisabled, currentTabContainer, containerId, selectedItemId, isModalOpen*/
6634
- 232476)
6686
+ 929820)
6635
6687
  dndzone_action.update.call(null, {
6636
6688
  items: (
6637
6689
  /*items*/
6638
- ctx2[17]
6690
+ ctx2[19]
6639
6691
  ),
6640
6692
  flipDurationMs: (
6641
6693
  /*flipDurationMs*/
@@ -6647,20 +6699,20 @@
6647
6699
  ),
6648
6700
  dropTargetClasses: (
6649
6701
  /*dropTargetClasses*/
6650
- ctx2[19]
6702
+ ctx2[21]
6651
6703
  ),
6652
6704
  morphDisabled: true,
6653
6705
  dragDisabled: (
6654
6706
  /*dragDisabled*/
6655
- ctx2[11]
6707
+ ctx2[13]
6656
6708
  ),
6657
6709
  autoAriaDisabled: true,
6658
6710
  zoneItemTabIndex: (
6659
6711
  /*currentTabContainer*/
6660
- ctx2[15] !== /*containerId*/
6712
+ ctx2[17] !== /*containerId*/
6661
6713
  ctx2[3] || /*selectedItemId*/
6662
- ctx2[10] || /*isModalOpen*/
6663
- ctx2[16] ? -1 : 0
6714
+ ctx2[12] || /*isModalOpen*/
6715
+ ctx2[18] ? -1 : 0
6664
6716
  ),
6665
6717
  zoneTabIndex: -1
6666
6718
  });
@@ -6743,7 +6795,7 @@
6743
6795
  const { sourceContainerId, sourceCloneContainerId } = categoryData;
6744
6796
  if (trigger === TRIGGERS.DRAG_STARTED) {
6745
6797
  const { items: cateoryItems } = detail;
6746
- $$invalidate(17, items = cateoryItems);
6798
+ $$invalidate(19, items = cateoryItems);
6747
6799
  const orginalId = items.filter((item) => item[SHADOW_ITEM_MARKER_PROPERTY_NAME]);
6748
6800
  const originalItemIndex = items.findIndex((item) => item.id === orginalId[0].id);
6749
6801
  items.splice(originalItemIndex, 1, {
@@ -6769,7 +6821,7 @@
6769
6821
  const handleDndFinalize = (e2) => {
6770
6822
  const { items: categoryItems, info } = e2.detail;
6771
6823
  const { trigger, id } = info;
6772
- $$invalidate(17, items = categoryItems.filter((item) => !item.isClonedItem));
6824
+ $$invalidate(19, items = categoryItems.filter((item) => !item.isClonedItem));
6773
6825
  if (trigger === TRIGGERS.DROPPED_INTO_ZONE) {
6774
6826
  const { currentTarget } = e2;
6775
6827
  addAnswerItemStore(id, currentTarget.id);
@@ -6937,9 +6989,9 @@
6937
6989
  if ("isFinished" in $$props2)
6938
6990
  $$invalidate(8, isFinished = $$props2.isFinished);
6939
6991
  if ("correctAnswerList" in $$props2)
6940
- $$invalidate(25, correctAnswerList = $$props2.correctAnswerList);
6992
+ $$invalidate(9, correctAnswerList = $$props2.correctAnswerList);
6941
6993
  if ("isPreviewModeInteractive" in $$props2)
6942
- $$invalidate(26, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
6994
+ $$invalidate(10, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
6943
6995
  if ("categoryData" in $$props2)
6944
6996
  $$invalidate(0, categoryData = $$props2.categoryData);
6945
6997
  if ("modalData" in $$props2)
@@ -6951,28 +7003,28 @@
6951
7003
  $:
6952
7004
  if (modalData) {
6953
7005
  const { isModalOpen: storeIsModalOpen } = modalData;
6954
- $$invalidate(16, isModalOpen = storeIsModalOpen);
7006
+ $$invalidate(18, isModalOpen = storeIsModalOpen);
6955
7007
  }
6956
7008
  }
6957
7009
  if ($$self.$$.dirty[0] & /*categoryData, isFinished, currentAnswer, containerId, considerItemId, isPreviewModeInteractive*/
6958
- 335545097) {
7010
+ 268438793) {
6959
7011
  $:
6960
7012
  if (categoryData) {
6961
7013
  const { considerItemId: storeconsiderItemId, selectedItemId: storeSelectedItemId, currentAnswer: storeCurrentAnswer, sourceSelectedContainerId: storeSourceSelectedContainerId, currentWordBinIndex: storeCurrentWordBinIndex, currentTabContainer: storeCurrentTabContainer, isItemsAriaHidden: storeisItemsAriaHidden } = categoryData;
6962
- $$invalidate(9, considerItemId = storeconsiderItemId);
6963
- $$invalidate(11, dragDisabled = isFinished || !!storeSelectedItemId);
7014
+ $$invalidate(11, considerItemId = storeconsiderItemId);
7015
+ $$invalidate(13, dragDisabled = isFinished || !!storeSelectedItemId);
6964
7016
  $$invalidate(28, currentAnswer = storeCurrentAnswer);
6965
- $$invalidate(10, selectedItemId = storeSelectedItemId);
6966
- $$invalidate(12, sourceSelectedContainerId = storeSourceSelectedContainerId);
6967
- $$invalidate(13, currentWordBinIndex = storeCurrentWordBinIndex);
6968
- $$invalidate(15, currentTabContainer = storeCurrentTabContainer);
6969
- $$invalidate(18, isItemsAriaHidden = storeisItemsAriaHidden);
7017
+ $$invalidate(12, selectedItemId = storeSelectedItemId);
7018
+ $$invalidate(14, sourceSelectedContainerId = storeSourceSelectedContainerId);
7019
+ $$invalidate(15, currentWordBinIndex = storeCurrentWordBinIndex);
7020
+ $$invalidate(17, currentTabContainer = storeCurrentTabContainer);
7021
+ $$invalidate(20, isItemsAriaHidden = storeisItemsAriaHidden);
6970
7022
  const storeWordBinItem = currentAnswer.filter((answer) => answer.categoryId === CONTAINER_WORD_BIN_ID);
6971
- $$invalidate(14, totalRemainingWordBinItem = storeWordBinItem[0].itemId.length);
7023
+ $$invalidate(16, totalRemainingWordBinItem = storeWordBinItem[0].itemId.length);
6972
7024
  if (storeCurrentAnswer) {
6973
7025
  const currentAnswerList = currentAnswer.filter((answer) => answer.categoryId === containerId);
6974
7026
  if (currentAnswerList.length) {
6975
- $$invalidate(17, items = currentAnswerList[0].itemId.map((rawAnswerId) => {
7027
+ $$invalidate(19, items = currentAnswerList[0].itemId.map((rawAnswerId) => {
6976
7028
  const splitId = rawAnswerId.split(EAT_DASH);
6977
7029
  const answerId = splitId[0];
6978
7030
  const answerIndex = rawCategoryItems.findIndex((answer) => answer.id === answerId);
@@ -7004,6 +7056,8 @@
7004
7056
  paddingTop,
7005
7057
  ariaLabel,
7006
7058
  isFinished,
7059
+ correctAnswerList,
7060
+ isPreviewModeInteractive,
7007
7061
  considerItemId,
7008
7062
  selectedItemId,
7009
7063
  dragDisabled,
@@ -7020,8 +7074,6 @@
7020
7074
  handleDndFinalize,
7021
7075
  addAnswerItem,
7022
7076
  updateCategoryByButton,
7023
- correctAnswerList,
7024
- isPreviewModeInteractive,
7025
7077
  modalData,
7026
7078
  currentAnswer
7027
7079
  ];
@@ -7044,8 +7096,8 @@
7044
7096
  paddingTop: 6,
7045
7097
  ariaLabel: 7,
7046
7098
  isFinished: 8,
7047
- correctAnswerList: 25,
7048
- isPreviewModeInteractive: 26,
7099
+ correctAnswerList: 9,
7100
+ isPreviewModeInteractive: 10,
7049
7101
  categoryData: 0,
7050
7102
  modalData: 27
7051
7103
  },
@@ -7110,14 +7162,14 @@
7110
7162
  flush();
7111
7163
  }
7112
7164
  get correctAnswerList() {
7113
- return this.$$.ctx[25];
7165
+ return this.$$.ctx[9];
7114
7166
  }
7115
7167
  set correctAnswerList(correctAnswerList) {
7116
7168
  this.$$set({ correctAnswerList });
7117
7169
  flush();
7118
7170
  }
7119
7171
  get isPreviewModeInteractive() {
7120
- return this.$$.ctx[26];
7172
+ return this.$$.ctx[10];
7121
7173
  }
7122
7174
  set isPreviewModeInteractive(isPreviewModeInteractive) {
7123
7175
  this.$$set({ isPreviewModeInteractive });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
4
4
  "description": "Authoring tool frontend SDK",
5
5
  "contributors": [
6
6
  {