eat-js-sdk 0.0.51 → 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.
- package/dist/eat-prompt-builder.mjs +1093 -835
- package/package.json +1 -1
|
@@ -5316,31 +5316,6 @@
|
|
|
5316
5316
|
}(parseFloat(value));
|
|
5317
5317
|
}
|
|
5318
5318
|
|
|
5319
|
-
// src/lib/stores/prompt.ts
|
|
5320
|
-
var categoriseSettings = writable({
|
|
5321
|
-
considerContainerId: "",
|
|
5322
|
-
considerItemId: "",
|
|
5323
|
-
considerCloneItemId: "",
|
|
5324
|
-
sourceCloneContainerId: "",
|
|
5325
|
-
sourceContainerId: "",
|
|
5326
|
-
dropContainerId: "",
|
|
5327
|
-
isDraggingOver: false,
|
|
5328
|
-
selectedItemId: "",
|
|
5329
|
-
selectedContainerId: "",
|
|
5330
|
-
sourceSelectedContainerId: "",
|
|
5331
|
-
currentAnswer: [],
|
|
5332
|
-
rawCategories: [],
|
|
5333
|
-
rawCategoryItems: [],
|
|
5334
|
-
hasAddItemAnimation: false,
|
|
5335
|
-
openCategoryContainer: [],
|
|
5336
|
-
currentWordBinIndex: 0,
|
|
5337
|
-
currentTabContainer: "",
|
|
5338
|
-
lastSelectedTabContainer: "",
|
|
5339
|
-
selectedItemName: "",
|
|
5340
|
-
previewResultSr: "",
|
|
5341
|
-
isItemsAriaHidden: false
|
|
5342
|
-
});
|
|
5343
|
-
|
|
5344
5319
|
// src/lib/assets/img/product/GripVertical.svelte
|
|
5345
5320
|
function create_fragment7(ctx) {
|
|
5346
5321
|
let svg;
|
|
@@ -5612,19 +5587,19 @@
|
|
|
5612
5587
|
function select_block_type(ctx2, dirty) {
|
|
5613
5588
|
if (
|
|
5614
5589
|
/*resultType*/
|
|
5615
|
-
ctx2[
|
|
5590
|
+
ctx2[0] === ANSWER_CORRECT && !/*isWordItemSelected*/
|
|
5616
5591
|
ctx2[10]
|
|
5617
5592
|
)
|
|
5618
5593
|
return 0;
|
|
5619
5594
|
if (
|
|
5620
5595
|
/*resultType*/
|
|
5621
|
-
ctx2[
|
|
5596
|
+
ctx2[0] === ANSWER_INCORRECT && !/*isWordItemSelected*/
|
|
5622
5597
|
ctx2[10]
|
|
5623
5598
|
)
|
|
5624
5599
|
return 1;
|
|
5625
5600
|
if (
|
|
5626
5601
|
/*resultType*/
|
|
5627
|
-
ctx2[
|
|
5602
|
+
ctx2[0] === ANSWER_MISSED
|
|
5628
5603
|
)
|
|
5629
5604
|
return 2;
|
|
5630
5605
|
return 3;
|
|
@@ -5633,8 +5608,8 @@
|
|
|
5633
5608
|
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
5634
5609
|
let if_block1 = (
|
|
5635
5610
|
/*resultType*/
|
|
5636
|
-
(ctx[
|
|
5637
|
-
ctx[
|
|
5611
|
+
(ctx[0] === ANSWER_CORRECT || /*resultType*/
|
|
5612
|
+
ctx[0] === ANSWER_INCORRECT) && create_if_block5(ctx)
|
|
5638
5613
|
);
|
|
5639
5614
|
return {
|
|
5640
5615
|
c() {
|
|
@@ -5642,7 +5617,7 @@
|
|
|
5642
5617
|
span0 = element("span");
|
|
5643
5618
|
t0 = text(
|
|
5644
5619
|
/*word*/
|
|
5645
|
-
ctx[
|
|
5620
|
+
ctx[1]
|
|
5646
5621
|
);
|
|
5647
5622
|
t1 = space();
|
|
5648
5623
|
div = element("div");
|
|
@@ -5656,11 +5631,11 @@
|
|
|
5656
5631
|
attr(span0, "class", span0_class_value = "text-charcoal text-base pl-3 mr-4 " + /*isWordItemSelected*/
|
|
5657
5632
|
(ctx[10] ? "text-white" : ""));
|
|
5658
5633
|
attr(span1, "class", span1_class_value = "w-full h-full relative rounded-lg " + (!/*currentSelectedItemId*/
|
|
5659
|
-
ctx[
|
|
5634
|
+
ctx[7] && !/*disabledClick*/
|
|
5660
5635
|
ctx[6] ? "td:group-hover:bg-black td:group-hover:opacity-5" : ""));
|
|
5661
5636
|
attr(span2, "class", "absolute");
|
|
5662
5637
|
attr(div, "class", div_class_value = "group text-blue-1000 h-11 w-11 min-w-[44px] flex items-center justify-center btn-vertical-icon " + (!/*currentSelectedItemId*/
|
|
5663
|
-
ctx[
|
|
5638
|
+
ctx[7] && !/*disabledClick*/
|
|
5664
5639
|
ctx[6] ? "td:hover:cursor-grab td:hover:text-soft-blue" : ""));
|
|
5665
5640
|
attr(
|
|
5666
5641
|
button,
|
|
@@ -5669,42 +5644,42 @@
|
|
|
5669
5644
|
ctx[3]
|
|
5670
5645
|
);
|
|
5671
5646
|
attr(button, "aria-label", button_aria_label_value = /*resultType*/
|
|
5672
|
-
ctx[
|
|
5647
|
+
ctx[0] === ANSWER_INCORRECT && /*containerId*/
|
|
5673
5648
|
ctx[5] === CONTAINER_WORD_BIN_ID && !/*isWordItemSelected*/
|
|
5674
5649
|
ctx[10] ? `Skipped answer: ${/*word*/
|
|
5675
|
-
ctx[
|
|
5650
|
+
ctx[1]}` : (
|
|
5676
5651
|
/*resultType*/
|
|
5677
|
-
(ctx[
|
|
5678
|
-
ctx[
|
|
5652
|
+
(ctx[0] === ANSWER_CORRECT || /*resultType*/
|
|
5653
|
+
ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
|
|
5679
5654
|
ctx[10] ? `Student's answer: ${/*word*/
|
|
5680
|
-
ctx[
|
|
5681
|
-
ctx[
|
|
5655
|
+
ctx[1]} (${/*resultType*/
|
|
5656
|
+
ctx[0]})` : (
|
|
5682
5657
|
/*resultType*/
|
|
5683
|
-
ctx[
|
|
5684
|
-
ctx[
|
|
5658
|
+
ctx[0] === ANSWER_MISSED ? `Missing answer: ${/*word*/
|
|
5659
|
+
ctx[1]}` : `${/*isWordItemSelected*/
|
|
5685
5660
|
ctx[10] ? "Selected option" : "Option"}: ${/*word*/
|
|
5686
|
-
ctx[
|
|
5661
|
+
ctx[1]}`
|
|
5687
5662
|
)
|
|
5688
5663
|
));
|
|
5689
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*/
|
|
5690
5665
|
ctx[2] + " " + /*isClonedItem*/
|
|
5691
5666
|
(ctx[4] ? "opacity-50 raw-focus-ring bg-violet-100" : "") + " " + /*considerCloneItemId*/
|
|
5692
|
-
(ctx[
|
|
5667
|
+
(ctx[9] === /*wordButtonId*/
|
|
5693
5668
|
ctx[3] ? "hidden" : "") + " " + /*isWordItemSelected*/
|
|
5694
5669
|
(ctx[10] ? "bg-blue-1000 !border-blue-1000 raw-focus-ring !cursor-pointer" : "bg-gray-100") + " " + (!/*currentSelectedItemId*/
|
|
5695
|
-
ctx[
|
|
5670
|
+
ctx[7] && !/*disabledClick*/
|
|
5696
5671
|
ctx[6] ? "td:hover-focus-ring td:hover:bg-violet-100 !cursor-pointer" : "!cursor-default") + " " + /*resultType*/
|
|
5697
|
-
(ctx[
|
|
5672
|
+
(ctx[0] === ANSWER_CORRECT && !/*isWordItemSelected*/
|
|
5698
5673
|
ctx[10] ? "border-green-800 bg-green-300" : (
|
|
5699
5674
|
/*resultType*/
|
|
5700
|
-
ctx[
|
|
5675
|
+
ctx[0] === ANSWER_INCORRECT && !/*isWordItemSelected*/
|
|
5701
5676
|
ctx[10] ? "border-red-800 bg-red-300" : (
|
|
5702
5677
|
/*resultType*/
|
|
5703
|
-
ctx[
|
|
5678
|
+
ctx[0] === ANSWER_MISSED ? "border-green-800" : ""
|
|
5704
5679
|
)
|
|
5705
5680
|
)) + " " + /*resultType*/
|
|
5706
|
-
((ctx[
|
|
5707
|
-
ctx[
|
|
5681
|
+
((ctx[0] === ANSWER_CORRECT || /*resultType*/
|
|
5682
|
+
ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
|
|
5708
5683
|
ctx[10] ? "td:hover:border-gray-800" : ""));
|
|
5709
5684
|
},
|
|
5710
5685
|
m(target, anchor) {
|
|
@@ -5720,7 +5695,7 @@
|
|
|
5720
5695
|
append(span2, t3);
|
|
5721
5696
|
if (if_block1)
|
|
5722
5697
|
if_block1.m(span2, null);
|
|
5723
|
-
ctx[
|
|
5698
|
+
ctx[17](button);
|
|
5724
5699
|
current = true;
|
|
5725
5700
|
if (!mounted) {
|
|
5726
5701
|
dispose = [
|
|
@@ -5763,11 +5738,11 @@
|
|
|
5763
5738
|
p(new_ctx, [dirty]) {
|
|
5764
5739
|
ctx = new_ctx;
|
|
5765
5740
|
if (!current || dirty & /*word*/
|
|
5766
|
-
|
|
5741
|
+
2)
|
|
5767
5742
|
set_data(
|
|
5768
5743
|
t0,
|
|
5769
5744
|
/*word*/
|
|
5770
|
-
ctx[
|
|
5745
|
+
ctx[1]
|
|
5771
5746
|
);
|
|
5772
5747
|
if (!current || dirty & /*isWordItemSelected*/
|
|
5773
5748
|
1024 && span0_class_value !== (span0_class_value = "text-charcoal text-base pl-3 mr-4 " + /*isWordItemSelected*/
|
|
@@ -5775,8 +5750,8 @@
|
|
|
5775
5750
|
attr(span0, "class", span0_class_value);
|
|
5776
5751
|
}
|
|
5777
5752
|
if (!current || dirty & /*currentSelectedItemId, disabledClick*/
|
|
5778
|
-
|
|
5779
|
-
ctx[
|
|
5753
|
+
192 && span1_class_value !== (span1_class_value = "w-full h-full relative rounded-lg " + (!/*currentSelectedItemId*/
|
|
5754
|
+
ctx[7] && !/*disabledClick*/
|
|
5780
5755
|
ctx[6] ? "td:group-hover:bg-black td:group-hover:opacity-5" : ""))) {
|
|
5781
5756
|
attr(span1, "class", span1_class_value);
|
|
5782
5757
|
}
|
|
@@ -5799,12 +5774,12 @@
|
|
|
5799
5774
|
}
|
|
5800
5775
|
if (
|
|
5801
5776
|
/*resultType*/
|
|
5802
|
-
ctx[
|
|
5803
|
-
ctx[
|
|
5777
|
+
ctx[0] === ANSWER_CORRECT || /*resultType*/
|
|
5778
|
+
ctx[0] === ANSWER_INCORRECT
|
|
5804
5779
|
) {
|
|
5805
5780
|
if (if_block1) {
|
|
5806
5781
|
if (dirty & /*resultType*/
|
|
5807
|
-
|
|
5782
|
+
1) {
|
|
5808
5783
|
transition_in(if_block1, 1);
|
|
5809
5784
|
}
|
|
5810
5785
|
} else {
|
|
@@ -5821,8 +5796,8 @@
|
|
|
5821
5796
|
check_outros();
|
|
5822
5797
|
}
|
|
5823
5798
|
if (!current || dirty & /*currentSelectedItemId, disabledClick*/
|
|
5824
|
-
|
|
5825
|
-
ctx[
|
|
5799
|
+
192 && div_class_value !== (div_class_value = "group text-blue-1000 h-11 w-11 min-w-[44px] flex items-center justify-center btn-vertical-icon " + (!/*currentSelectedItemId*/
|
|
5800
|
+
ctx[7] && !/*disabledClick*/
|
|
5826
5801
|
ctx[6] ? "td:hover:cursor-grab td:hover:text-soft-blue" : ""))) {
|
|
5827
5802
|
attr(div, "class", div_class_value);
|
|
5828
5803
|
}
|
|
@@ -5837,45 +5812,45 @@
|
|
|
5837
5812
|
}
|
|
5838
5813
|
if (!current || dirty & /*resultType, containerId, isWordItemSelected, word*/
|
|
5839
5814
|
1059 && button_aria_label_value !== (button_aria_label_value = /*resultType*/
|
|
5840
|
-
ctx[
|
|
5815
|
+
ctx[0] === ANSWER_INCORRECT && /*containerId*/
|
|
5841
5816
|
ctx[5] === CONTAINER_WORD_BIN_ID && !/*isWordItemSelected*/
|
|
5842
5817
|
ctx[10] ? `Skipped answer: ${/*word*/
|
|
5843
|
-
ctx[
|
|
5818
|
+
ctx[1]}` : (
|
|
5844
5819
|
/*resultType*/
|
|
5845
|
-
(ctx[
|
|
5846
|
-
ctx[
|
|
5820
|
+
(ctx[0] === ANSWER_CORRECT || /*resultType*/
|
|
5821
|
+
ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
|
|
5847
5822
|
ctx[10] ? `Student's answer: ${/*word*/
|
|
5848
|
-
ctx[
|
|
5849
|
-
ctx[
|
|
5823
|
+
ctx[1]} (${/*resultType*/
|
|
5824
|
+
ctx[0]})` : (
|
|
5850
5825
|
/*resultType*/
|
|
5851
|
-
ctx[
|
|
5852
|
-
ctx[
|
|
5826
|
+
ctx[0] === ANSWER_MISSED ? `Missing answer: ${/*word*/
|
|
5827
|
+
ctx[1]}` : `${/*isWordItemSelected*/
|
|
5853
5828
|
ctx[10] ? "Selected option" : "Option"}: ${/*word*/
|
|
5854
|
-
ctx[
|
|
5829
|
+
ctx[1]}`
|
|
5855
5830
|
)
|
|
5856
5831
|
))) {
|
|
5857
5832
|
attr(button, "aria-label", button_aria_label_value);
|
|
5858
5833
|
}
|
|
5859
5834
|
if (!current || dirty & /*otherClass, isClonedItem, considerCloneItemId, wordButtonId, isWordItemSelected, currentSelectedItemId, disabledClick, resultType*/
|
|
5860
|
-
|
|
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*/
|
|
5861
5836
|
ctx[2] + " " + /*isClonedItem*/
|
|
5862
5837
|
(ctx[4] ? "opacity-50 raw-focus-ring bg-violet-100" : "") + " " + /*considerCloneItemId*/
|
|
5863
|
-
(ctx[
|
|
5838
|
+
(ctx[9] === /*wordButtonId*/
|
|
5864
5839
|
ctx[3] ? "hidden" : "") + " " + /*isWordItemSelected*/
|
|
5865
5840
|
(ctx[10] ? "bg-blue-1000 !border-blue-1000 raw-focus-ring !cursor-pointer" : "bg-gray-100") + " " + (!/*currentSelectedItemId*/
|
|
5866
|
-
ctx[
|
|
5841
|
+
ctx[7] && !/*disabledClick*/
|
|
5867
5842
|
ctx[6] ? "td:hover-focus-ring td:hover:bg-violet-100 !cursor-pointer" : "!cursor-default") + " " + /*resultType*/
|
|
5868
|
-
(ctx[
|
|
5843
|
+
(ctx[0] === ANSWER_CORRECT && !/*isWordItemSelected*/
|
|
5869
5844
|
ctx[10] ? "border-green-800 bg-green-300" : (
|
|
5870
5845
|
/*resultType*/
|
|
5871
|
-
ctx[
|
|
5846
|
+
ctx[0] === ANSWER_INCORRECT && !/*isWordItemSelected*/
|
|
5872
5847
|
ctx[10] ? "border-red-800 bg-red-300" : (
|
|
5873
5848
|
/*resultType*/
|
|
5874
|
-
ctx[
|
|
5849
|
+
ctx[0] === ANSWER_MISSED ? "border-green-800" : ""
|
|
5875
5850
|
)
|
|
5876
5851
|
)) + " " + /*resultType*/
|
|
5877
|
-
((ctx[
|
|
5878
|
-
ctx[
|
|
5852
|
+
((ctx[0] === ANSWER_CORRECT || /*resultType*/
|
|
5853
|
+
ctx[0] === ANSWER_INCORRECT) && !/*isWordItemSelected*/
|
|
5879
5854
|
ctx[10] ? "td:hover:border-gray-800" : ""))) {
|
|
5880
5855
|
attr(button, "class", button_class_value);
|
|
5881
5856
|
}
|
|
@@ -5899,7 +5874,7 @@
|
|
|
5899
5874
|
if_blocks[current_block_type_index].d();
|
|
5900
5875
|
if (if_block1)
|
|
5901
5876
|
if_block1.d();
|
|
5902
|
-
ctx[
|
|
5877
|
+
ctx[17](null);
|
|
5903
5878
|
mounted = false;
|
|
5904
5879
|
run_all(dispose);
|
|
5905
5880
|
}
|
|
@@ -5914,34 +5889,33 @@
|
|
|
5914
5889
|
let { containerId = "" } = $$props;
|
|
5915
5890
|
let { wordFocus = false } = $$props;
|
|
5916
5891
|
let { disabledClick = false } = $$props;
|
|
5892
|
+
let { isPreviewModeInteractive = false } = $$props;
|
|
5893
|
+
let { categoryData = [] } = $$props;
|
|
5894
|
+
let { correctAnswerList = [] } = $$props;
|
|
5895
|
+
const dispatch = createEventDispatcher();
|
|
5917
5896
|
let considerCloneItemId = "";
|
|
5918
5897
|
let currentSelectedItemId = "";
|
|
5919
5898
|
let isWordItemSelected = false;
|
|
5920
5899
|
let isSelecItemFunctionCalled = false;
|
|
5921
5900
|
let wordButton;
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
$$invalidate(10, isWordItemSelected = currentSelectedItemId === wordButtonId);
|
|
5927
|
-
});
|
|
5901
|
+
const updateCategoryData = (newSettings) => {
|
|
5902
|
+
$$invalidate(13, categoryData = { ...categoryData, ...newSettings });
|
|
5903
|
+
dispatch("updateCategorySettings", categoryData);
|
|
5904
|
+
};
|
|
5928
5905
|
const selectItem = (itemId) => {
|
|
5929
5906
|
if (isSelecItemFunctionCalled || disabledClick) {
|
|
5930
5907
|
return;
|
|
5931
5908
|
}
|
|
5932
5909
|
isSelecItemFunctionCalled = true;
|
|
5933
|
-
const storeCategoriseSettings = get_store_value(categoriseSettings);
|
|
5934
5910
|
if (!currentSelectedItemId) {
|
|
5935
|
-
|
|
5936
|
-
...storeCategoriseSettings,
|
|
5911
|
+
updateCategoryData({
|
|
5937
5912
|
selectedItemId: itemId,
|
|
5938
5913
|
sourceSelectedContainerId: containerId,
|
|
5939
5914
|
selectedItemName: word,
|
|
5940
5915
|
isItemsAriaHidden: false
|
|
5941
5916
|
});
|
|
5942
5917
|
} else if (currentSelectedItemId === itemId) {
|
|
5943
|
-
|
|
5944
|
-
...storeCategoriseSettings,
|
|
5918
|
+
updateCategoryData({
|
|
5945
5919
|
selectedItemId: "",
|
|
5946
5920
|
sourceSelectedContainerId: "",
|
|
5947
5921
|
selectedItemName: ""
|
|
@@ -5960,9 +5934,8 @@
|
|
|
5960
5934
|
selectItem(wordButtonId);
|
|
5961
5935
|
return;
|
|
5962
5936
|
}
|
|
5963
|
-
const { currentTabContainer } =
|
|
5964
|
-
|
|
5965
|
-
...get_store_value(categoriseSettings),
|
|
5937
|
+
const { currentTabContainer } = categoryData;
|
|
5938
|
+
updateCategoryData({
|
|
5966
5939
|
lastSelectedTabContainer: currentTabContainer,
|
|
5967
5940
|
currentTabContainer: ""
|
|
5968
5941
|
});
|
|
@@ -5974,14 +5947,14 @@
|
|
|
5974
5947
|
function button_binding($$value) {
|
|
5975
5948
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
5976
5949
|
wordButton = $$value;
|
|
5977
|
-
$$invalidate(
|
|
5950
|
+
$$invalidate(8, wordButton);
|
|
5978
5951
|
});
|
|
5979
5952
|
}
|
|
5980
5953
|
$$self.$$set = ($$props2) => {
|
|
5981
5954
|
if ("word" in $$props2)
|
|
5982
|
-
$$invalidate(
|
|
5955
|
+
$$invalidate(1, word = $$props2.word);
|
|
5983
5956
|
if ("resultType" in $$props2)
|
|
5984
|
-
$$invalidate(
|
|
5957
|
+
$$invalidate(0, resultType = $$props2.resultType);
|
|
5985
5958
|
if ("otherClass" in $$props2)
|
|
5986
5959
|
$$invalidate(2, otherClass = $$props2.otherClass);
|
|
5987
5960
|
if ("wordButtonId" in $$props2)
|
|
@@ -5991,13 +5964,19 @@
|
|
|
5991
5964
|
if ("containerId" in $$props2)
|
|
5992
5965
|
$$invalidate(5, containerId = $$props2.containerId);
|
|
5993
5966
|
if ("wordFocus" in $$props2)
|
|
5994
|
-
$$invalidate(
|
|
5967
|
+
$$invalidate(14, wordFocus = $$props2.wordFocus);
|
|
5995
5968
|
if ("disabledClick" in $$props2)
|
|
5996
5969
|
$$invalidate(6, disabledClick = $$props2.disabledClick);
|
|
5970
|
+
if ("isPreviewModeInteractive" in $$props2)
|
|
5971
|
+
$$invalidate(15, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
|
|
5972
|
+
if ("categoryData" in $$props2)
|
|
5973
|
+
$$invalidate(13, categoryData = $$props2.categoryData);
|
|
5974
|
+
if ("correctAnswerList" in $$props2)
|
|
5975
|
+
$$invalidate(16, correctAnswerList = $$props2.correctAnswerList);
|
|
5997
5976
|
};
|
|
5998
5977
|
$$self.$$.update = () => {
|
|
5999
5978
|
if ($$self.$$.dirty & /*wordFocus, wordButton*/
|
|
6000
|
-
|
|
5979
|
+
16640) {
|
|
6001
5980
|
$:
|
|
6002
5981
|
if (wordFocus) {
|
|
6003
5982
|
setTimeout(
|
|
@@ -6008,22 +5987,47 @@
|
|
|
6008
5987
|
);
|
|
6009
5988
|
}
|
|
6010
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
|
+
}
|
|
6002
|
+
if ($$self.$$.dirty & /*categoryData, currentSelectedItemId, wordButtonId*/
|
|
6003
|
+
8328) {
|
|
6004
|
+
$:
|
|
6005
|
+
if (categoryData) {
|
|
6006
|
+
const { considerCloneItemId: storeConsiderCloneItemId, selectedItemId: storeSelectedItemId } = categoryData;
|
|
6007
|
+
$$invalidate(9, considerCloneItemId = storeConsiderCloneItemId);
|
|
6008
|
+
$$invalidate(7, currentSelectedItemId = storeSelectedItemId);
|
|
6009
|
+
$$invalidate(10, isWordItemSelected = currentSelectedItemId === wordButtonId);
|
|
6010
|
+
}
|
|
6011
|
+
}
|
|
6011
6012
|
};
|
|
6012
6013
|
return [
|
|
6013
|
-
word,
|
|
6014
6014
|
resultType,
|
|
6015
|
+
word,
|
|
6015
6016
|
otherClass,
|
|
6016
6017
|
wordButtonId,
|
|
6017
6018
|
isClonedItem,
|
|
6018
6019
|
containerId,
|
|
6019
6020
|
disabledClick,
|
|
6021
|
+
currentSelectedItemId,
|
|
6020
6022
|
wordButton,
|
|
6021
6023
|
considerCloneItemId,
|
|
6022
|
-
currentSelectedItemId,
|
|
6023
6024
|
isWordItemSelected,
|
|
6024
6025
|
selectItem,
|
|
6025
6026
|
removeContainerTabSelected,
|
|
6027
|
+
categoryData,
|
|
6026
6028
|
wordFocus,
|
|
6029
|
+
isPreviewModeInteractive,
|
|
6030
|
+
correctAnswerList,
|
|
6027
6031
|
button_binding
|
|
6028
6032
|
];
|
|
6029
6033
|
}
|
|
@@ -6031,25 +6035,28 @@
|
|
|
6031
6035
|
constructor(options) {
|
|
6032
6036
|
super();
|
|
6033
6037
|
init(this, options, instance5, create_fragment9, safe_not_equal, {
|
|
6034
|
-
word:
|
|
6035
|
-
resultType:
|
|
6038
|
+
word: 1,
|
|
6039
|
+
resultType: 0,
|
|
6036
6040
|
otherClass: 2,
|
|
6037
6041
|
wordButtonId: 3,
|
|
6038
6042
|
isClonedItem: 4,
|
|
6039
6043
|
containerId: 5,
|
|
6040
|
-
wordFocus:
|
|
6041
|
-
disabledClick: 6
|
|
6044
|
+
wordFocus: 14,
|
|
6045
|
+
disabledClick: 6,
|
|
6046
|
+
isPreviewModeInteractive: 15,
|
|
6047
|
+
categoryData: 13,
|
|
6048
|
+
correctAnswerList: 16
|
|
6042
6049
|
});
|
|
6043
6050
|
}
|
|
6044
6051
|
get word() {
|
|
6045
|
-
return this.$$.ctx[
|
|
6052
|
+
return this.$$.ctx[1];
|
|
6046
6053
|
}
|
|
6047
6054
|
set word(word) {
|
|
6048
6055
|
this.$$set({ word });
|
|
6049
6056
|
flush();
|
|
6050
6057
|
}
|
|
6051
6058
|
get resultType() {
|
|
6052
|
-
return this.$$.ctx[
|
|
6059
|
+
return this.$$.ctx[0];
|
|
6053
6060
|
}
|
|
6054
6061
|
set resultType(resultType) {
|
|
6055
6062
|
this.$$set({ resultType });
|
|
@@ -6084,7 +6091,7 @@
|
|
|
6084
6091
|
flush();
|
|
6085
6092
|
}
|
|
6086
6093
|
get wordFocus() {
|
|
6087
|
-
return this.$$.ctx[
|
|
6094
|
+
return this.$$.ctx[14];
|
|
6088
6095
|
}
|
|
6089
6096
|
set wordFocus(wordFocus) {
|
|
6090
6097
|
this.$$set({ wordFocus });
|
|
@@ -6097,17 +6104,31 @@
|
|
|
6097
6104
|
this.$$set({ disabledClick });
|
|
6098
6105
|
flush();
|
|
6099
6106
|
}
|
|
6107
|
+
get isPreviewModeInteractive() {
|
|
6108
|
+
return this.$$.ctx[15];
|
|
6109
|
+
}
|
|
6110
|
+
set isPreviewModeInteractive(isPreviewModeInteractive) {
|
|
6111
|
+
this.$$set({ isPreviewModeInteractive });
|
|
6112
|
+
flush();
|
|
6113
|
+
}
|
|
6114
|
+
get categoryData() {
|
|
6115
|
+
return this.$$.ctx[13];
|
|
6116
|
+
}
|
|
6117
|
+
set categoryData(categoryData) {
|
|
6118
|
+
this.$$set({ categoryData });
|
|
6119
|
+
flush();
|
|
6120
|
+
}
|
|
6121
|
+
get correctAnswerList() {
|
|
6122
|
+
return this.$$.ctx[16];
|
|
6123
|
+
}
|
|
6124
|
+
set correctAnswerList(correctAnswerList) {
|
|
6125
|
+
this.$$set({ correctAnswerList });
|
|
6126
|
+
flush();
|
|
6127
|
+
}
|
|
6100
6128
|
};
|
|
6101
|
-
customElements.define("prompt-categorise-word-button", create_custom_element(PromptCategoriseWordButton, { "word": {}, "resultType": {}, "otherClass": {}, "wordButtonId": {}, "isClonedItem": { "type": "Boolean" }, "containerId": {}, "wordFocus": { "type": "Boolean" }, "disabledClick": { "type": "Boolean" } }, [], [], 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));
|
|
6102
6130
|
var PromptCategoriseWordButton_default = PromptCategoriseWordButton;
|
|
6103
6131
|
|
|
6104
|
-
// src/lib/stores/modal.ts
|
|
6105
|
-
var modalSettings = writable({
|
|
6106
|
-
isModalOpen: false,
|
|
6107
|
-
modalAriaLabel: "",
|
|
6108
|
-
isOpenLastStatus: false
|
|
6109
|
-
});
|
|
6110
|
-
|
|
6111
6132
|
// src/lib/composables/useCategorise.ts
|
|
6112
6133
|
var useNavigateItem = (currentIndex, currentAnswer, direction, addWordBin = false) => {
|
|
6113
6134
|
const wordBinData = currentAnswer.filter(
|
|
@@ -6127,20 +6148,22 @@
|
|
|
6127
6148
|
return;
|
|
6128
6149
|
}
|
|
6129
6150
|
}
|
|
6130
|
-
|
|
6131
|
-
...get_store_value(categoriseSettings),
|
|
6151
|
+
return {
|
|
6132
6152
|
currentWordBinIndex: newIndex < 0 ? lastIndex : newIndex >= totalItem ? 0 : newIndex
|
|
6133
|
-
}
|
|
6153
|
+
};
|
|
6134
6154
|
};
|
|
6135
6155
|
var useFilterUniqueObject = (data, identifier = "id") => {
|
|
6136
6156
|
const uniqueMap = new Map(data.map((obj) => [obj[identifier], obj]));
|
|
6137
6157
|
return Array.from(uniqueMap.values());
|
|
6138
6158
|
};
|
|
6159
|
+
var numberRandomizer = (min = 1, max = 9999) => {
|
|
6160
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
6161
|
+
};
|
|
6139
6162
|
|
|
6140
6163
|
// src/lib/components/prompt/categorise/PromptCategoriseDndContainer.svelte
|
|
6141
6164
|
function get_each_context2(ctx, list, i) {
|
|
6142
6165
|
const child_ctx = ctx.slice();
|
|
6143
|
-
child_ctx[
|
|
6166
|
+
child_ctx[38] = list[i];
|
|
6144
6167
|
return child_ctx;
|
|
6145
6168
|
}
|
|
6146
6169
|
function create_if_block_24(ctx) {
|
|
@@ -6155,10 +6178,10 @@
|
|
|
6155
6178
|
button,
|
|
6156
6179
|
"aria-label",
|
|
6157
6180
|
/*ariaLabel*/
|
|
6158
|
-
ctx[
|
|
6181
|
+
ctx[7]
|
|
6159
6182
|
);
|
|
6160
6183
|
attr(button, "class", button_class_value = "focus-ring absolute inset-0 bg-transparent rounded-lg focus-visible:border " + /*isContainerWordBin*/
|
|
6161
|
-
(ctx[
|
|
6184
|
+
(ctx[22] ? "focus-visible:border-gray-400" : "focus-visible:border-gray-800"));
|
|
6162
6185
|
},
|
|
6163
6186
|
m(target, anchor) {
|
|
6164
6187
|
insert(target, button, anchor);
|
|
@@ -6167,19 +6190,19 @@
|
|
|
6167
6190
|
button,
|
|
6168
6191
|
"click",
|
|
6169
6192
|
/*addAnswerItem*/
|
|
6170
|
-
ctx[
|
|
6193
|
+
ctx[25]
|
|
6171
6194
|
);
|
|
6172
6195
|
mounted = true;
|
|
6173
6196
|
}
|
|
6174
6197
|
},
|
|
6175
6198
|
p(ctx2, dirty) {
|
|
6176
6199
|
if (dirty[0] & /*ariaLabel*/
|
|
6177
|
-
|
|
6200
|
+
128) {
|
|
6178
6201
|
attr(
|
|
6179
6202
|
button,
|
|
6180
6203
|
"aria-label",
|
|
6181
6204
|
/*ariaLabel*/
|
|
6182
|
-
ctx2[
|
|
6205
|
+
ctx2[7]
|
|
6183
6206
|
);
|
|
6184
6207
|
}
|
|
6185
6208
|
},
|
|
@@ -6212,13 +6235,13 @@
|
|
|
6212
6235
|
div,
|
|
6213
6236
|
"click",
|
|
6214
6237
|
/*addAnswerItem*/
|
|
6215
|
-
ctx[
|
|
6238
|
+
ctx[25]
|
|
6216
6239
|
),
|
|
6217
6240
|
listen(
|
|
6218
6241
|
div,
|
|
6219
6242
|
"keypress",
|
|
6220
6243
|
/*addAnswerItem*/
|
|
6221
|
-
ctx[
|
|
6244
|
+
ctx[25]
|
|
6222
6245
|
)
|
|
6223
6246
|
];
|
|
6224
6247
|
mounted = true;
|
|
@@ -6245,7 +6268,7 @@
|
|
|
6245
6268
|
t2 = text("Missing answers:");
|
|
6246
6269
|
attr(button, "aria-label", "Missing answers:");
|
|
6247
6270
|
attr(button, "class", button_class_value = "text-base text-charcoal font-semibold w-full mt-1 mb-2 text-left " + (!/*showButton*/
|
|
6248
|
-
ctx[
|
|
6271
|
+
ctx[5] ? "hidden md:missing-answer-label" : "missing-answer-label"));
|
|
6249
6272
|
button.disabled = button_disabled_value = true;
|
|
6250
6273
|
},
|
|
6251
6274
|
m(target, anchor) {
|
|
@@ -6254,8 +6277,8 @@
|
|
|
6254
6277
|
},
|
|
6255
6278
|
p(ctx2, dirty) {
|
|
6256
6279
|
if (dirty[0] & /*showButton*/
|
|
6257
|
-
|
|
6258
|
-
ctx2[
|
|
6280
|
+
32 && button_class_value !== (button_class_value = "text-base text-charcoal font-semibold w-full mt-1 mb-2 text-left " + (!/*showButton*/
|
|
6281
|
+
ctx2[5] ? "hidden md:missing-answer-label" : "missing-answer-label"))) {
|
|
6259
6282
|
attr(button, "class", button_class_value);
|
|
6260
6283
|
}
|
|
6261
6284
|
},
|
|
@@ -6273,53 +6296,70 @@
|
|
|
6273
6296
|
let current;
|
|
6274
6297
|
let if_block = (
|
|
6275
6298
|
/*item*/
|
|
6276
|
-
ctx[
|
|
6299
|
+
ctx[38].type === ANSWER_MISSED && create_if_block6(ctx)
|
|
6277
6300
|
);
|
|
6278
6301
|
promptcategorisewordbutton = new PromptCategoriseWordButton_default({
|
|
6279
6302
|
props: {
|
|
6280
6303
|
otherClass: "mr-2 mb-2 last:mr-0 " + /*item*/
|
|
6281
|
-
(ctx[
|
|
6282
|
-
ctx[
|
|
6283
|
-
ctx[
|
|
6284
|
-
(ctx[
|
|
6304
|
+
(ctx[38].id === /*considerItemId*/
|
|
6305
|
+
ctx[11] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
|
|
6306
|
+
ctx[5] ? "hidden md:flex" : "") + "\n " + /*items*/
|
|
6307
|
+
(ctx[19][
|
|
6285
6308
|
/*currentWordBinIndex*/
|
|
6286
|
-
ctx[
|
|
6309
|
+
ctx[15]
|
|
6287
6310
|
]?.id !== /*item*/
|
|
6288
|
-
ctx[
|
|
6289
|
-
ctx[
|
|
6311
|
+
ctx[38].id && /*isContainerWordBin*/
|
|
6312
|
+
ctx[22] ? "hidden md:flex" : ""),
|
|
6290
6313
|
word: (
|
|
6291
6314
|
/*item*/
|
|
6292
|
-
ctx[
|
|
6315
|
+
ctx[38].text
|
|
6293
6316
|
),
|
|
6294
6317
|
wordButtonId: (
|
|
6295
6318
|
/*item*/
|
|
6296
|
-
ctx[
|
|
6319
|
+
ctx[38].id
|
|
6297
6320
|
),
|
|
6298
6321
|
isClonedItem: (
|
|
6299
6322
|
/*item*/
|
|
6300
|
-
ctx[
|
|
6323
|
+
ctx[38].isClonedItem
|
|
6301
6324
|
),
|
|
6302
6325
|
containerId: (
|
|
6303
6326
|
/*containerId*/
|
|
6304
|
-
ctx[
|
|
6327
|
+
ctx[3]
|
|
6305
6328
|
),
|
|
6306
6329
|
wordFocus: (
|
|
6307
6330
|
/*currentTabContainer*/
|
|
6308
|
-
ctx[
|
|
6309
|
-
ctx[
|
|
6310
|
-
ctx[
|
|
6311
|
-
ctx[
|
|
6331
|
+
ctx[17] === /*containerId*/
|
|
6332
|
+
ctx[3] && /*item*/
|
|
6333
|
+
ctx[38].id === /*items*/
|
|
6334
|
+
ctx[19][0].id
|
|
6312
6335
|
),
|
|
6313
6336
|
disabledClick: (
|
|
6314
6337
|
/*isFinished*/
|
|
6315
|
-
ctx[
|
|
6338
|
+
ctx[8]
|
|
6316
6339
|
),
|
|
6317
6340
|
resultType: (
|
|
6318
6341
|
/*item*/
|
|
6319
|
-
ctx[
|
|
6342
|
+
ctx[38].type
|
|
6343
|
+
),
|
|
6344
|
+
categoryData: (
|
|
6345
|
+
/*categoryData*/
|
|
6346
|
+
ctx[0]
|
|
6347
|
+
),
|
|
6348
|
+
correctAnswerList: (
|
|
6349
|
+
/*correctAnswerList*/
|
|
6350
|
+
ctx[9]
|
|
6351
|
+
),
|
|
6352
|
+
isPreviewModeInteractive: (
|
|
6353
|
+
/*isPreviewModeInteractive*/
|
|
6354
|
+
ctx[10]
|
|
6320
6355
|
)
|
|
6321
6356
|
}
|
|
6322
6357
|
});
|
|
6358
|
+
promptcategorisewordbutton.$on(
|
|
6359
|
+
"updateCategorySettings",
|
|
6360
|
+
/*updateCategoryByButton*/
|
|
6361
|
+
ctx[26]
|
|
6362
|
+
);
|
|
6323
6363
|
return {
|
|
6324
6364
|
key: key_1,
|
|
6325
6365
|
first: null,
|
|
@@ -6343,7 +6383,7 @@
|
|
|
6343
6383
|
ctx = new_ctx;
|
|
6344
6384
|
if (
|
|
6345
6385
|
/*item*/
|
|
6346
|
-
ctx[
|
|
6386
|
+
ctx[38].type === ANSWER_MISSED
|
|
6347
6387
|
) {
|
|
6348
6388
|
if (if_block) {
|
|
6349
6389
|
if_block.p(ctx, dirty);
|
|
@@ -6358,48 +6398,60 @@
|
|
|
6358
6398
|
}
|
|
6359
6399
|
const promptcategorisewordbutton_changes = {};
|
|
6360
6400
|
if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex*/
|
|
6361
|
-
|
|
6401
|
+
559136)
|
|
6362
6402
|
promptcategorisewordbutton_changes.otherClass = "mr-2 mb-2 last:mr-0 " + /*item*/
|
|
6363
|
-
(ctx[
|
|
6364
|
-
ctx[
|
|
6365
|
-
ctx[
|
|
6366
|
-
(ctx[
|
|
6403
|
+
(ctx[38].id === /*considerItemId*/
|
|
6404
|
+
ctx[11] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
|
|
6405
|
+
ctx[5] ? "hidden md:flex" : "") + "\n " + /*items*/
|
|
6406
|
+
(ctx[19][
|
|
6367
6407
|
/*currentWordBinIndex*/
|
|
6368
|
-
ctx[
|
|
6408
|
+
ctx[15]
|
|
6369
6409
|
]?.id !== /*item*/
|
|
6370
|
-
ctx[
|
|
6371
|
-
ctx[
|
|
6410
|
+
ctx[38].id && /*isContainerWordBin*/
|
|
6411
|
+
ctx[22] ? "hidden md:flex" : "");
|
|
6372
6412
|
if (dirty[0] & /*items*/
|
|
6373
|
-
|
|
6413
|
+
524288)
|
|
6374
6414
|
promptcategorisewordbutton_changes.word = /*item*/
|
|
6375
|
-
ctx[
|
|
6415
|
+
ctx[38].text;
|
|
6376
6416
|
if (dirty[0] & /*items*/
|
|
6377
|
-
|
|
6417
|
+
524288)
|
|
6378
6418
|
promptcategorisewordbutton_changes.wordButtonId = /*item*/
|
|
6379
|
-
ctx[
|
|
6419
|
+
ctx[38].id;
|
|
6380
6420
|
if (dirty[0] & /*items*/
|
|
6381
|
-
|
|
6421
|
+
524288)
|
|
6382
6422
|
promptcategorisewordbutton_changes.isClonedItem = /*item*/
|
|
6383
|
-
ctx[
|
|
6423
|
+
ctx[38].isClonedItem;
|
|
6384
6424
|
if (dirty[0] & /*containerId*/
|
|
6385
|
-
|
|
6425
|
+
8)
|
|
6386
6426
|
promptcategorisewordbutton_changes.containerId = /*containerId*/
|
|
6387
|
-
ctx[
|
|
6427
|
+
ctx[3];
|
|
6388
6428
|
if (dirty[0] & /*currentTabContainer, containerId, items*/
|
|
6389
|
-
|
|
6429
|
+
655368)
|
|
6390
6430
|
promptcategorisewordbutton_changes.wordFocus = /*currentTabContainer*/
|
|
6391
|
-
ctx[
|
|
6392
|
-
ctx[
|
|
6393
|
-
ctx[
|
|
6394
|
-
ctx[
|
|
6431
|
+
ctx[17] === /*containerId*/
|
|
6432
|
+
ctx[3] && /*item*/
|
|
6433
|
+
ctx[38].id === /*items*/
|
|
6434
|
+
ctx[19][0].id;
|
|
6395
6435
|
if (dirty[0] & /*isFinished*/
|
|
6396
|
-
|
|
6436
|
+
256)
|
|
6397
6437
|
promptcategorisewordbutton_changes.disabledClick = /*isFinished*/
|
|
6398
|
-
ctx[
|
|
6438
|
+
ctx[8];
|
|
6399
6439
|
if (dirty[0] & /*items*/
|
|
6400
|
-
|
|
6440
|
+
524288)
|
|
6401
6441
|
promptcategorisewordbutton_changes.resultType = /*item*/
|
|
6402
|
-
ctx[
|
|
6442
|
+
ctx[38].type;
|
|
6443
|
+
if (dirty[0] & /*categoryData*/
|
|
6444
|
+
1)
|
|
6445
|
+
promptcategorisewordbutton_changes.categoryData = /*categoryData*/
|
|
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,23 +6489,23 @@
|
|
|
6437
6489
|
let dispose;
|
|
6438
6490
|
let if_block0 = (
|
|
6439
6491
|
/*dragDisabled*/
|
|
6440
|
-
ctx[
|
|
6441
|
-
ctx[
|
|
6442
|
-
ctx[
|
|
6443
|
-
ctx[
|
|
6492
|
+
ctx[13] && /*sourceSelectedContainerId*/
|
|
6493
|
+
ctx[14] !== /*containerId*/
|
|
6494
|
+
ctx[3] && !/*isFinished*/
|
|
6495
|
+
ctx[8] && create_if_block_24(ctx)
|
|
6444
6496
|
);
|
|
6445
6497
|
let if_block1 = (
|
|
6446
6498
|
/*totalRemainingWordBinItem*/
|
|
6447
|
-
ctx[
|
|
6448
|
-
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[
|
|
6504
|
+
ctx[19]
|
|
6453
6505
|
));
|
|
6454
6506
|
const get_key = (ctx2) => (
|
|
6455
6507
|
/*item*/
|
|
6456
|
-
ctx2[
|
|
6508
|
+
ctx2[38].id
|
|
6457
6509
|
);
|
|
6458
6510
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
6459
6511
|
let child_ctx = get_each_context2(ctx, each_value, i);
|
|
@@ -6474,23 +6526,23 @@
|
|
|
6474
6526
|
}
|
|
6475
6527
|
attr(section, "role", "group");
|
|
6476
6528
|
attr(section, "class", section_class_value = "flex flex-wrap " + /*containerClass*/
|
|
6477
|
-
ctx[
|
|
6529
|
+
ctx[1] + " category-content");
|
|
6478
6530
|
attr(
|
|
6479
6531
|
section,
|
|
6480
6532
|
"aria-hidden",
|
|
6481
6533
|
/*isItemsAriaHidden*/
|
|
6482
|
-
ctx[
|
|
6534
|
+
ctx[20]
|
|
6483
6535
|
);
|
|
6484
6536
|
attr(section, "aria-dropeffect", "move");
|
|
6485
6537
|
attr(
|
|
6486
6538
|
section,
|
|
6487
6539
|
"id",
|
|
6488
6540
|
/*containerId*/
|
|
6489
|
-
ctx[
|
|
6541
|
+
ctx[3]
|
|
6490
6542
|
);
|
|
6491
6543
|
attr(section, "style", section_style_value = !/*isContainerWordBin*/
|
|
6492
|
-
ctx[
|
|
6493
|
-
ctx[
|
|
6544
|
+
ctx[22] ? `padding-top: ${/*paddingTop*/
|
|
6545
|
+
ctx[6]}px;` : "");
|
|
6494
6546
|
},
|
|
6495
6547
|
m(target, anchor) {
|
|
6496
6548
|
if (if_block0)
|
|
@@ -6511,32 +6563,32 @@
|
|
|
6511
6563
|
action_destroyer(dndzone_action = dndzone$2.call(null, section, {
|
|
6512
6564
|
items: (
|
|
6513
6565
|
/*items*/
|
|
6514
|
-
ctx[
|
|
6566
|
+
ctx[19]
|
|
6515
6567
|
),
|
|
6516
6568
|
flipDurationMs: (
|
|
6517
6569
|
/*flipDurationMs*/
|
|
6518
|
-
ctx[
|
|
6570
|
+
ctx[2]
|
|
6519
6571
|
),
|
|
6520
6572
|
type: (
|
|
6521
6573
|
/*type*/
|
|
6522
|
-
ctx[
|
|
6574
|
+
ctx[4]
|
|
6523
6575
|
),
|
|
6524
6576
|
dropTargetClasses: (
|
|
6525
6577
|
/*dropTargetClasses*/
|
|
6526
|
-
ctx[
|
|
6578
|
+
ctx[21]
|
|
6527
6579
|
),
|
|
6528
6580
|
morphDisabled: true,
|
|
6529
6581
|
dragDisabled: (
|
|
6530
6582
|
/*dragDisabled*/
|
|
6531
|
-
ctx[
|
|
6583
|
+
ctx[13]
|
|
6532
6584
|
),
|
|
6533
6585
|
autoAriaDisabled: true,
|
|
6534
6586
|
zoneItemTabIndex: (
|
|
6535
6587
|
/*currentTabContainer*/
|
|
6536
|
-
ctx[
|
|
6537
|
-
ctx[
|
|
6538
|
-
ctx[
|
|
6539
|
-
ctx[
|
|
6588
|
+
ctx[17] !== /*containerId*/
|
|
6589
|
+
ctx[3] || /*selectedItemId*/
|
|
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[
|
|
6599
|
+
ctx[23]
|
|
6548
6600
|
),
|
|
6549
6601
|
listen(
|
|
6550
6602
|
section,
|
|
6551
6603
|
"finalize",
|
|
6552
6604
|
/*handleDndFinalize*/
|
|
6553
|
-
ctx[
|
|
6605
|
+
ctx[24]
|
|
6554
6606
|
)
|
|
6555
6607
|
];
|
|
6556
6608
|
mounted = true;
|
|
@@ -6559,10 +6611,10 @@
|
|
|
6559
6611
|
p(ctx2, dirty) {
|
|
6560
6612
|
if (
|
|
6561
6613
|
/*dragDisabled*/
|
|
6562
|
-
ctx2[
|
|
6563
|
-
ctx2[
|
|
6564
|
-
ctx2[
|
|
6565
|
-
ctx2[
|
|
6614
|
+
ctx2[13] && /*sourceSelectedContainerId*/
|
|
6615
|
+
ctx2[14] !== /*containerId*/
|
|
6616
|
+
ctx2[3] && !/*isFinished*/
|
|
6617
|
+
ctx2[8]
|
|
6566
6618
|
) {
|
|
6567
6619
|
if (if_block0) {
|
|
6568
6620
|
if_block0.p(ctx2, dirty);
|
|
@@ -6577,8 +6629,8 @@
|
|
|
6577
6629
|
}
|
|
6578
6630
|
if (
|
|
6579
6631
|
/*totalRemainingWordBinItem*/
|
|
6580
|
-
ctx2[
|
|
6581
|
-
ctx2[
|
|
6632
|
+
ctx2[16] <= 0 && /*isContainerWordBin*/
|
|
6633
|
+
ctx2[22]
|
|
6582
6634
|
) {
|
|
6583
6635
|
if (if_block1) {
|
|
6584
6636
|
if_block1.p(ctx2, dirty);
|
|
@@ -6591,76 +6643,76 @@
|
|
|
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*/
|
|
6595
|
-
|
|
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[
|
|
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);
|
|
6602
6654
|
check_outros();
|
|
6603
6655
|
}
|
|
6604
6656
|
if (!current || dirty[0] & /*containerClass*/
|
|
6605
|
-
|
|
6606
|
-
ctx2[
|
|
6657
|
+
2 && section_class_value !== (section_class_value = "flex flex-wrap " + /*containerClass*/
|
|
6658
|
+
ctx2[1] + " category-content")) {
|
|
6607
6659
|
attr(section, "class", section_class_value);
|
|
6608
6660
|
}
|
|
6609
6661
|
if (!current || dirty[0] & /*isItemsAriaHidden*/
|
|
6610
|
-
|
|
6662
|
+
1048576) {
|
|
6611
6663
|
attr(
|
|
6612
6664
|
section,
|
|
6613
6665
|
"aria-hidden",
|
|
6614
6666
|
/*isItemsAriaHidden*/
|
|
6615
|
-
ctx2[
|
|
6667
|
+
ctx2[20]
|
|
6616
6668
|
);
|
|
6617
6669
|
}
|
|
6618
6670
|
if (!current || dirty[0] & /*containerId*/
|
|
6619
|
-
|
|
6671
|
+
8) {
|
|
6620
6672
|
attr(
|
|
6621
6673
|
section,
|
|
6622
6674
|
"id",
|
|
6623
6675
|
/*containerId*/
|
|
6624
|
-
ctx2[
|
|
6676
|
+
ctx2[3]
|
|
6625
6677
|
);
|
|
6626
6678
|
}
|
|
6627
6679
|
if (!current || dirty[0] & /*paddingTop*/
|
|
6628
|
-
|
|
6629
|
-
ctx2[
|
|
6630
|
-
ctx2[
|
|
6680
|
+
64 && section_style_value !== (section_style_value = !/*isContainerWordBin*/
|
|
6681
|
+
ctx2[22] ? `padding-top: ${/*paddingTop*/
|
|
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
|
-
|
|
6686
|
+
929820)
|
|
6635
6687
|
dndzone_action.update.call(null, {
|
|
6636
6688
|
items: (
|
|
6637
6689
|
/*items*/
|
|
6638
|
-
ctx2[
|
|
6690
|
+
ctx2[19]
|
|
6639
6691
|
),
|
|
6640
6692
|
flipDurationMs: (
|
|
6641
6693
|
/*flipDurationMs*/
|
|
6642
|
-
ctx2[
|
|
6694
|
+
ctx2[2]
|
|
6643
6695
|
),
|
|
6644
6696
|
type: (
|
|
6645
6697
|
/*type*/
|
|
6646
|
-
ctx2[
|
|
6698
|
+
ctx2[4]
|
|
6647
6699
|
),
|
|
6648
6700
|
dropTargetClasses: (
|
|
6649
6701
|
/*dropTargetClasses*/
|
|
6650
|
-
ctx2[
|
|
6702
|
+
ctx2[21]
|
|
6651
6703
|
),
|
|
6652
6704
|
morphDisabled: true,
|
|
6653
6705
|
dragDisabled: (
|
|
6654
6706
|
/*dragDisabled*/
|
|
6655
|
-
ctx2[
|
|
6707
|
+
ctx2[13]
|
|
6656
6708
|
),
|
|
6657
6709
|
autoAriaDisabled: true,
|
|
6658
6710
|
zoneItemTabIndex: (
|
|
6659
6711
|
/*currentTabContainer*/
|
|
6660
|
-
ctx2[
|
|
6661
|
-
ctx2[
|
|
6662
|
-
ctx2[
|
|
6663
|
-
ctx2[
|
|
6712
|
+
ctx2[17] !== /*containerId*/
|
|
6713
|
+
ctx2[3] || /*selectedItemId*/
|
|
6714
|
+
ctx2[12] || /*isModalOpen*/
|
|
6715
|
+
ctx2[18] ? -1 : 0
|
|
6664
6716
|
),
|
|
6665
6717
|
zoneTabIndex: -1
|
|
6666
6718
|
});
|
|
@@ -6708,6 +6760,8 @@
|
|
|
6708
6760
|
let { isFinished = false } = $$props;
|
|
6709
6761
|
let { correctAnswerList = [] } = $$props;
|
|
6710
6762
|
let { isPreviewModeInteractive = false } = $$props;
|
|
6763
|
+
let { categoryData = [] } = $$props;
|
|
6764
|
+
let { modalData = [] } = $$props;
|
|
6711
6765
|
let considerItemId = "";
|
|
6712
6766
|
let selectedItemId = "";
|
|
6713
6767
|
let dragDisabled = isFinished;
|
|
@@ -6723,61 +6777,25 @@
|
|
|
6723
6777
|
const dispatch = createEventDispatcher();
|
|
6724
6778
|
const dropTargetClasses = ["!outline-none"];
|
|
6725
6779
|
const isContainerWordBin = containerId === CONTAINER_WORD_BIN_ID;
|
|
6726
|
-
const { rawCategoryItems } =
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
}
|
|
6731
|
-
categoriseSettings.subscribe((value) => {
|
|
6732
|
-
const { considerItemId: storeconsiderItemId, selectedItemId: storeSelectedItemId, currentAnswer: storeCurrentAnswer, sourceSelectedContainerId: storeSourceSelectedContainerId, currentWordBinIndex: storeCurrentWordBinIndex, currentTabContainer: storeCurrentTabContainer, isItemsAriaHidden: storeisItemsAriaHidden } = value;
|
|
6733
|
-
$$invalidate(8, considerItemId = storeconsiderItemId);
|
|
6734
|
-
$$invalidate(10, dragDisabled = isFinished || !!storeSelectedItemId);
|
|
6735
|
-
currentAnswer = storeCurrentAnswer;
|
|
6736
|
-
$$invalidate(9, selectedItemId = storeSelectedItemId);
|
|
6737
|
-
$$invalidate(11, sourceSelectedContainerId = storeSourceSelectedContainerId);
|
|
6738
|
-
$$invalidate(12, currentWordBinIndex = storeCurrentWordBinIndex);
|
|
6739
|
-
$$invalidate(14, currentTabContainer = storeCurrentTabContainer);
|
|
6740
|
-
$$invalidate(17, isItemsAriaHidden = storeisItemsAriaHidden);
|
|
6741
|
-
const storeWordBinItem = currentAnswer.filter((answer) => answer.categoryId === CONTAINER_WORD_BIN_ID);
|
|
6742
|
-
$$invalidate(13, totalRemainingWordBinItem = storeWordBinItem[0].itemId.length);
|
|
6743
|
-
if (storeCurrentAnswer) {
|
|
6744
|
-
const currentAnswerList = currentAnswer.filter((answer) => answer.categoryId === containerId);
|
|
6745
|
-
if (currentAnswerList.length) {
|
|
6746
|
-
$$invalidate(16, items = currentAnswerList[0].itemId.map((rawAnswerId) => {
|
|
6747
|
-
const splitId = rawAnswerId.split(EAT_DASH);
|
|
6748
|
-
const answerId = splitId[0];
|
|
6749
|
-
const answerIndex = rawCategoryItems.findIndex((answer) => answer.id === answerId);
|
|
6750
|
-
if (answerId === considerItemId) {
|
|
6751
|
-
return {
|
|
6752
|
-
id: cloneId,
|
|
6753
|
-
text: rawCategoryItems[answerIndex].text,
|
|
6754
|
-
isClonedItem: true,
|
|
6755
|
-
cloneId: rawCategoryItems[answerIndex].id
|
|
6756
|
-
};
|
|
6757
|
-
}
|
|
6758
|
-
return {
|
|
6759
|
-
...rawCategoryItems[answerIndex],
|
|
6760
|
-
type: isFinished || isPreviewModeInteractive ? splitId[1] : ""
|
|
6761
|
-
};
|
|
6762
|
-
}));
|
|
6763
|
-
}
|
|
6764
|
-
}
|
|
6765
|
-
});
|
|
6780
|
+
const { rawCategoryItems } = categoryData;
|
|
6781
|
+
const updateCategoryData = (newSettings) => {
|
|
6782
|
+
$$invalidate(0, categoryData = { ...categoryData, ...newSettings });
|
|
6783
|
+
dispatch("updateCategorySettings", categoryData);
|
|
6784
|
+
};
|
|
6766
6785
|
const handleDndConsider = (e2) => {
|
|
6767
6786
|
const { detail, srcElement } = e2;
|
|
6768
6787
|
const { info } = detail;
|
|
6769
6788
|
const { trigger, id } = info;
|
|
6770
|
-
|
|
6771
|
-
...get_store_value(categoriseSettings),
|
|
6789
|
+
updateCategoryData({
|
|
6772
6790
|
considerContainerId: containerId,
|
|
6773
6791
|
considerCloneItemId: id,
|
|
6774
6792
|
considerItemId: id,
|
|
6775
6793
|
isDraggingOver: true
|
|
6776
6794
|
});
|
|
6777
|
-
const { sourceContainerId, sourceCloneContainerId } =
|
|
6795
|
+
const { sourceContainerId, sourceCloneContainerId } = categoryData;
|
|
6778
6796
|
if (trigger === TRIGGERS.DRAG_STARTED) {
|
|
6779
6797
|
const { items: cateoryItems } = detail;
|
|
6780
|
-
$$invalidate(
|
|
6798
|
+
$$invalidate(19, items = cateoryItems);
|
|
6781
6799
|
const orginalId = items.filter((item) => item[SHADOW_ITEM_MARKER_PROPERTY_NAME]);
|
|
6782
6800
|
const originalItemIndex = items.findIndex((item) => item.id === orginalId[0].id);
|
|
6783
6801
|
items.splice(originalItemIndex, 1, {
|
|
@@ -6787,21 +6805,14 @@
|
|
|
6787
6805
|
clonedId: id
|
|
6788
6806
|
});
|
|
6789
6807
|
if (!sourceContainerId) {
|
|
6790
|
-
|
|
6791
|
-
...get_store_value(categoriseSettings),
|
|
6792
|
-
sourceContainerId: srcElement.id
|
|
6793
|
-
});
|
|
6808
|
+
updateCategoryData({ sourceContainerId: srcElement.id });
|
|
6794
6809
|
}
|
|
6795
6810
|
if (!sourceCloneContainerId) {
|
|
6796
|
-
|
|
6797
|
-
...get_store_value(categoriseSettings),
|
|
6798
|
-
sourceCloneContainerId: srcElement.id
|
|
6799
|
-
});
|
|
6811
|
+
updateCategoryData({ sourceCloneContainerId: srcElement.id });
|
|
6800
6812
|
}
|
|
6801
6813
|
}
|
|
6802
6814
|
if (trigger === TRIGGERS.DRAGGED_LEFT) {
|
|
6803
|
-
|
|
6804
|
-
...get_store_value(categoriseSettings),
|
|
6815
|
+
updateCategoryData({
|
|
6805
6816
|
considerContainerId: "",
|
|
6806
6817
|
isDraggingOver: false
|
|
6807
6818
|
});
|
|
@@ -6810,24 +6821,20 @@
|
|
|
6810
6821
|
const handleDndFinalize = (e2) => {
|
|
6811
6822
|
const { items: categoryItems, info } = e2.detail;
|
|
6812
6823
|
const { trigger, id } = info;
|
|
6813
|
-
$$invalidate(
|
|
6824
|
+
$$invalidate(19, items = categoryItems.filter((item) => !item.isClonedItem));
|
|
6814
6825
|
if (trigger === TRIGGERS.DROPPED_INTO_ZONE) {
|
|
6815
6826
|
const { currentTarget } = e2;
|
|
6816
6827
|
addAnswerItemStore(id, currentTarget.id);
|
|
6817
6828
|
const itemIndex = rawCategoryItems.findIndex((item) => item.id === id);
|
|
6818
|
-
|
|
6819
|
-
...get_store_value(categoriseSettings),
|
|
6829
|
+
updateCategoryData({
|
|
6820
6830
|
selectedItemName: rawCategoryItems[itemIndex].text
|
|
6821
6831
|
});
|
|
6822
6832
|
}
|
|
6823
|
-
|
|
6824
|
-
...get_store_value(categoriseSettings),
|
|
6825
|
-
considerCloneItemId: ""
|
|
6826
|
-
});
|
|
6833
|
+
updateCategoryData({ considerCloneItemId: "" });
|
|
6827
6834
|
resetCategoriesSettings();
|
|
6828
6835
|
};
|
|
6829
6836
|
const saveAnswer = () => {
|
|
6830
|
-
const { currentAnswer: currentAnswer2, rawCategories, rawCategoryItems: rawCategoryItems2 } =
|
|
6837
|
+
const { currentAnswer: currentAnswer2, rawCategories, rawCategoryItems: rawCategoryItems2 } = categoryData;
|
|
6831
6838
|
const categoryAnswer = currentAnswer2.filter((answer) => answer.categoryId !== CONTAINER_WORD_BIN_ID).map((answer) => {
|
|
6832
6839
|
const { categoryId, itemId } = answer;
|
|
6833
6840
|
const categoryList = rawCategories.filter((category) => category.id === categoryId).map((category) => category.name)[0];
|
|
@@ -6856,17 +6863,13 @@
|
|
|
6856
6863
|
}
|
|
6857
6864
|
return { ...answer };
|
|
6858
6865
|
});
|
|
6859
|
-
|
|
6860
|
-
...get_store_value(categoriseSettings),
|
|
6861
|
-
currentAnswer: answerResult
|
|
6862
|
-
});
|
|
6866
|
+
updateCategoryData({ currentAnswer: answerResult });
|
|
6863
6867
|
} else {
|
|
6864
6868
|
dispatch("saveCategory", { answer_list: categoryAnswer });
|
|
6865
6869
|
}
|
|
6866
6870
|
};
|
|
6867
6871
|
const resetCategoriesSettings = () => {
|
|
6868
|
-
|
|
6869
|
-
...get_store_value(categoriseSettings),
|
|
6872
|
+
updateCategoryData({
|
|
6870
6873
|
considerContainerId: "",
|
|
6871
6874
|
considerItemId: "",
|
|
6872
6875
|
sourceContainerId: "",
|
|
@@ -6876,23 +6879,16 @@
|
|
|
6876
6879
|
const showAddItemAnimation = (dropContainerId) => {
|
|
6877
6880
|
setTimeout(
|
|
6878
6881
|
() => {
|
|
6879
|
-
|
|
6880
|
-
...get_store_value(categoriseSettings),
|
|
6881
|
-
dropContainerId
|
|
6882
|
-
});
|
|
6882
|
+
updateCategoryData({ dropContainerId });
|
|
6883
6883
|
setTimeout(
|
|
6884
6884
|
() => {
|
|
6885
|
-
|
|
6886
|
-
...get_store_value(categoriseSettings),
|
|
6887
|
-
hasAddItemAnimation: true
|
|
6888
|
-
});
|
|
6885
|
+
updateCategoryData({ hasAddItemAnimation: true });
|
|
6889
6886
|
},
|
|
6890
6887
|
300
|
|
6891
6888
|
);
|
|
6892
6889
|
setTimeout(
|
|
6893
6890
|
() => {
|
|
6894
|
-
|
|
6895
|
-
...get_store_value(categoriseSettings),
|
|
6891
|
+
updateCategoryData({
|
|
6896
6892
|
dropContainerId: "",
|
|
6897
6893
|
sourceCloneContainerId: "",
|
|
6898
6894
|
hasAddItemAnimation: false
|
|
@@ -6909,8 +6905,7 @@
|
|
|
6909
6905
|
return;
|
|
6910
6906
|
}
|
|
6911
6907
|
addAnswerItemStore(selectedItemId, containerId);
|
|
6912
|
-
|
|
6913
|
-
...get_store_value(categoriseSettings),
|
|
6908
|
+
updateCategoryData({
|
|
6914
6909
|
selectedItemId: "",
|
|
6915
6910
|
selectedContainerId: "",
|
|
6916
6911
|
sourceSelectedContainerId: "",
|
|
@@ -6962,40 +6957,97 @@
|
|
|
6962
6957
|
}
|
|
6963
6958
|
updateNavigateItem();
|
|
6964
6959
|
showAddItemAnimation(targetContainerId);
|
|
6965
|
-
|
|
6966
|
-
...get_store_value(categoriseSettings),
|
|
6960
|
+
updateCategoryData({
|
|
6967
6961
|
currentAnswer: updatedCurrentAnswer,
|
|
6968
6962
|
previewResultSr
|
|
6969
6963
|
});
|
|
6970
6964
|
saveAnswer();
|
|
6971
6965
|
};
|
|
6972
6966
|
const updateNavigateItem = () => {
|
|
6973
|
-
const { currentWordBinIndex: currentWordBinIndex2, currentAnswer: currentAnswer2 } =
|
|
6974
|
-
useNavigateItem(currentWordBinIndex2, currentAnswer2, "right", true);
|
|
6967
|
+
const { currentWordBinIndex: currentWordBinIndex2, currentAnswer: currentAnswer2 } = categoryData;
|
|
6968
|
+
const navigateItem = useNavigateItem(currentWordBinIndex2, currentAnswer2, "right", true);
|
|
6969
|
+
updateCategoryData(navigateItem);
|
|
6970
|
+
};
|
|
6971
|
+
const updateCategoryByButton = ({ detail }) => {
|
|
6972
|
+
updateCategoryData(detail);
|
|
6975
6973
|
};
|
|
6976
6974
|
$$self.$$set = ($$props2) => {
|
|
6977
6975
|
if ("containerClass" in $$props2)
|
|
6978
|
-
$$invalidate(
|
|
6976
|
+
$$invalidate(1, containerClass = $$props2.containerClass);
|
|
6979
6977
|
if ("flipDurationMs" in $$props2)
|
|
6980
|
-
$$invalidate(
|
|
6978
|
+
$$invalidate(2, flipDurationMs = $$props2.flipDurationMs);
|
|
6981
6979
|
if ("containerId" in $$props2)
|
|
6982
|
-
$$invalidate(
|
|
6980
|
+
$$invalidate(3, containerId = $$props2.containerId);
|
|
6983
6981
|
if ("type" in $$props2)
|
|
6984
|
-
$$invalidate(
|
|
6982
|
+
$$invalidate(4, type = $$props2.type);
|
|
6985
6983
|
if ("showButton" in $$props2)
|
|
6986
|
-
$$invalidate(
|
|
6984
|
+
$$invalidate(5, showButton = $$props2.showButton);
|
|
6987
6985
|
if ("paddingTop" in $$props2)
|
|
6988
|
-
$$invalidate(
|
|
6986
|
+
$$invalidate(6, paddingTop = $$props2.paddingTop);
|
|
6989
6987
|
if ("ariaLabel" in $$props2)
|
|
6990
|
-
$$invalidate(
|
|
6988
|
+
$$invalidate(7, ariaLabel = $$props2.ariaLabel);
|
|
6991
6989
|
if ("isFinished" in $$props2)
|
|
6992
|
-
$$invalidate(
|
|
6990
|
+
$$invalidate(8, isFinished = $$props2.isFinished);
|
|
6993
6991
|
if ("correctAnswerList" in $$props2)
|
|
6994
|
-
$$invalidate(
|
|
6992
|
+
$$invalidate(9, correctAnswerList = $$props2.correctAnswerList);
|
|
6995
6993
|
if ("isPreviewModeInteractive" in $$props2)
|
|
6996
|
-
$$invalidate(
|
|
6994
|
+
$$invalidate(10, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
|
|
6995
|
+
if ("categoryData" in $$props2)
|
|
6996
|
+
$$invalidate(0, categoryData = $$props2.categoryData);
|
|
6997
|
+
if ("modalData" in $$props2)
|
|
6998
|
+
$$invalidate(27, modalData = $$props2.modalData);
|
|
6999
|
+
};
|
|
7000
|
+
$$self.$$.update = () => {
|
|
7001
|
+
if ($$self.$$.dirty[0] & /*modalData*/
|
|
7002
|
+
134217728) {
|
|
7003
|
+
$:
|
|
7004
|
+
if (modalData) {
|
|
7005
|
+
const { isModalOpen: storeIsModalOpen } = modalData;
|
|
7006
|
+
$$invalidate(18, isModalOpen = storeIsModalOpen);
|
|
7007
|
+
}
|
|
7008
|
+
}
|
|
7009
|
+
if ($$self.$$.dirty[0] & /*categoryData, isFinished, currentAnswer, containerId, considerItemId, isPreviewModeInteractive*/
|
|
7010
|
+
268438793) {
|
|
7011
|
+
$:
|
|
7012
|
+
if (categoryData) {
|
|
7013
|
+
const { considerItemId: storeconsiderItemId, selectedItemId: storeSelectedItemId, currentAnswer: storeCurrentAnswer, sourceSelectedContainerId: storeSourceSelectedContainerId, currentWordBinIndex: storeCurrentWordBinIndex, currentTabContainer: storeCurrentTabContainer, isItemsAriaHidden: storeisItemsAriaHidden } = categoryData;
|
|
7014
|
+
$$invalidate(11, considerItemId = storeconsiderItemId);
|
|
7015
|
+
$$invalidate(13, dragDisabled = isFinished || !!storeSelectedItemId);
|
|
7016
|
+
$$invalidate(28, currentAnswer = storeCurrentAnswer);
|
|
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);
|
|
7022
|
+
const storeWordBinItem = currentAnswer.filter((answer) => answer.categoryId === CONTAINER_WORD_BIN_ID);
|
|
7023
|
+
$$invalidate(16, totalRemainingWordBinItem = storeWordBinItem[0].itemId.length);
|
|
7024
|
+
if (storeCurrentAnswer) {
|
|
7025
|
+
const currentAnswerList = currentAnswer.filter((answer) => answer.categoryId === containerId);
|
|
7026
|
+
if (currentAnswerList.length) {
|
|
7027
|
+
$$invalidate(19, items = currentAnswerList[0].itemId.map((rawAnswerId) => {
|
|
7028
|
+
const splitId = rawAnswerId.split(EAT_DASH);
|
|
7029
|
+
const answerId = splitId[0];
|
|
7030
|
+
const answerIndex = rawCategoryItems.findIndex((answer) => answer.id === answerId);
|
|
7031
|
+
if (answerId === considerItemId) {
|
|
7032
|
+
return {
|
|
7033
|
+
id: cloneId,
|
|
7034
|
+
text: rawCategoryItems[answerIndex].text,
|
|
7035
|
+
isClonedItem: true,
|
|
7036
|
+
cloneId: rawCategoryItems[answerIndex].id
|
|
7037
|
+
};
|
|
7038
|
+
}
|
|
7039
|
+
return {
|
|
7040
|
+
...rawCategoryItems[answerIndex],
|
|
7041
|
+
type: isFinished || isPreviewModeInteractive ? splitId[1] : ""
|
|
7042
|
+
};
|
|
7043
|
+
}));
|
|
7044
|
+
}
|
|
7045
|
+
}
|
|
7046
|
+
}
|
|
7047
|
+
}
|
|
6997
7048
|
};
|
|
6998
7049
|
return [
|
|
7050
|
+
categoryData,
|
|
6999
7051
|
containerClass,
|
|
7000
7052
|
flipDurationMs,
|
|
7001
7053
|
containerId,
|
|
@@ -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,
|
|
@@ -7019,8 +7073,9 @@
|
|
|
7019
7073
|
handleDndConsider,
|
|
7020
7074
|
handleDndFinalize,
|
|
7021
7075
|
addAnswerItem,
|
|
7022
|
-
|
|
7023
|
-
|
|
7076
|
+
updateCategoryByButton,
|
|
7077
|
+
modalData,
|
|
7078
|
+
currentAnswer
|
|
7024
7079
|
];
|
|
7025
7080
|
}
|
|
7026
7081
|
var PromptCategoriseDndContainer = class extends SvelteComponent {
|
|
@@ -7033,93 +7088,109 @@
|
|
|
7033
7088
|
create_fragment10,
|
|
7034
7089
|
safe_not_equal,
|
|
7035
7090
|
{
|
|
7036
|
-
containerClass:
|
|
7037
|
-
flipDurationMs:
|
|
7038
|
-
containerId:
|
|
7039
|
-
type:
|
|
7040
|
-
showButton:
|
|
7041
|
-
paddingTop:
|
|
7042
|
-
ariaLabel:
|
|
7043
|
-
isFinished:
|
|
7044
|
-
correctAnswerList:
|
|
7045
|
-
isPreviewModeInteractive:
|
|
7091
|
+
containerClass: 1,
|
|
7092
|
+
flipDurationMs: 2,
|
|
7093
|
+
containerId: 3,
|
|
7094
|
+
type: 4,
|
|
7095
|
+
showButton: 5,
|
|
7096
|
+
paddingTop: 6,
|
|
7097
|
+
ariaLabel: 7,
|
|
7098
|
+
isFinished: 8,
|
|
7099
|
+
correctAnswerList: 9,
|
|
7100
|
+
isPreviewModeInteractive: 10,
|
|
7101
|
+
categoryData: 0,
|
|
7102
|
+
modalData: 27
|
|
7046
7103
|
},
|
|
7047
7104
|
null,
|
|
7048
7105
|
[-1, -1]
|
|
7049
7106
|
);
|
|
7050
7107
|
}
|
|
7051
7108
|
get containerClass() {
|
|
7052
|
-
return this.$$.ctx[
|
|
7109
|
+
return this.$$.ctx[1];
|
|
7053
7110
|
}
|
|
7054
7111
|
set containerClass(containerClass) {
|
|
7055
7112
|
this.$$set({ containerClass });
|
|
7056
7113
|
flush();
|
|
7057
7114
|
}
|
|
7058
7115
|
get flipDurationMs() {
|
|
7059
|
-
return this.$$.ctx[
|
|
7116
|
+
return this.$$.ctx[2];
|
|
7060
7117
|
}
|
|
7061
7118
|
set flipDurationMs(flipDurationMs) {
|
|
7062
7119
|
this.$$set({ flipDurationMs });
|
|
7063
7120
|
flush();
|
|
7064
7121
|
}
|
|
7065
7122
|
get containerId() {
|
|
7066
|
-
return this.$$.ctx[
|
|
7123
|
+
return this.$$.ctx[3];
|
|
7067
7124
|
}
|
|
7068
7125
|
set containerId(containerId) {
|
|
7069
7126
|
this.$$set({ containerId });
|
|
7070
7127
|
flush();
|
|
7071
7128
|
}
|
|
7072
7129
|
get type() {
|
|
7073
|
-
return this.$$.ctx[
|
|
7130
|
+
return this.$$.ctx[4];
|
|
7074
7131
|
}
|
|
7075
7132
|
set type(type) {
|
|
7076
7133
|
this.$$set({ type });
|
|
7077
7134
|
flush();
|
|
7078
7135
|
}
|
|
7079
7136
|
get showButton() {
|
|
7080
|
-
return this.$$.ctx[
|
|
7137
|
+
return this.$$.ctx[5];
|
|
7081
7138
|
}
|
|
7082
7139
|
set showButton(showButton) {
|
|
7083
7140
|
this.$$set({ showButton });
|
|
7084
7141
|
flush();
|
|
7085
7142
|
}
|
|
7086
7143
|
get paddingTop() {
|
|
7087
|
-
return this.$$.ctx[
|
|
7144
|
+
return this.$$.ctx[6];
|
|
7088
7145
|
}
|
|
7089
7146
|
set paddingTop(paddingTop) {
|
|
7090
7147
|
this.$$set({ paddingTop });
|
|
7091
7148
|
flush();
|
|
7092
7149
|
}
|
|
7093
7150
|
get ariaLabel() {
|
|
7094
|
-
return this.$$.ctx[
|
|
7151
|
+
return this.$$.ctx[7];
|
|
7095
7152
|
}
|
|
7096
7153
|
set ariaLabel(ariaLabel) {
|
|
7097
7154
|
this.$$set({ ariaLabel });
|
|
7098
7155
|
flush();
|
|
7099
7156
|
}
|
|
7100
7157
|
get isFinished() {
|
|
7101
|
-
return this.$$.ctx[
|
|
7158
|
+
return this.$$.ctx[8];
|
|
7102
7159
|
}
|
|
7103
7160
|
set isFinished(isFinished) {
|
|
7104
7161
|
this.$$set({ isFinished });
|
|
7105
7162
|
flush();
|
|
7106
7163
|
}
|
|
7107
7164
|
get correctAnswerList() {
|
|
7108
|
-
return this.$$.ctx[
|
|
7165
|
+
return this.$$.ctx[9];
|
|
7109
7166
|
}
|
|
7110
7167
|
set correctAnswerList(correctAnswerList) {
|
|
7111
7168
|
this.$$set({ correctAnswerList });
|
|
7112
7169
|
flush();
|
|
7113
7170
|
}
|
|
7114
7171
|
get isPreviewModeInteractive() {
|
|
7115
|
-
return this.$$.ctx[
|
|
7172
|
+
return this.$$.ctx[10];
|
|
7116
7173
|
}
|
|
7117
7174
|
set isPreviewModeInteractive(isPreviewModeInteractive) {
|
|
7118
7175
|
this.$$set({ isPreviewModeInteractive });
|
|
7119
7176
|
flush();
|
|
7120
7177
|
}
|
|
7178
|
+
get categoryData() {
|
|
7179
|
+
return this.$$.ctx[0];
|
|
7180
|
+
}
|
|
7181
|
+
set categoryData(categoryData) {
|
|
7182
|
+
this.$$set({ categoryData });
|
|
7183
|
+
flush();
|
|
7184
|
+
}
|
|
7185
|
+
get modalData() {
|
|
7186
|
+
return this.$$.ctx[27];
|
|
7187
|
+
}
|
|
7188
|
+
set modalData(modalData) {
|
|
7189
|
+
this.$$set({ modalData });
|
|
7190
|
+
flush();
|
|
7191
|
+
}
|
|
7121
7192
|
};
|
|
7122
|
-
customElements.define("prompt-categorise-dnd-container", create_custom_element(PromptCategoriseDndContainer, { "containerClass": {}, "flipDurationMs": {}, "containerId": {}, "type": {}, "showButton": { "type": "Boolean" }, "paddingTop": {}, "ariaLabel": {}, "isFinished": { "type": "Boolean" }, "correctAnswerList": {}, "isPreviewModeInteractive": { "type": "Boolean" } }, [], [], true));
|
|
7193
|
+
customElements.define("prompt-categorise-dnd-container", create_custom_element(PromptCategoriseDndContainer, { "containerClass": {}, "flipDurationMs": {}, "containerId": {}, "type": {}, "showButton": { "type": "Boolean" }, "paddingTop": {}, "ariaLabel": {}, "isFinished": { "type": "Boolean" }, "correctAnswerList": {}, "isPreviewModeInteractive": { "type": "Boolean" }, "categoryData": {}, "modalData": {} }, [], [], true));
|
|
7123
7194
|
var PromptCategoriseDndContainer_default = PromptCategoriseDndContainer;
|
|
7124
7195
|
|
|
7125
7196
|
// src/lib/components/common/CommonModal.svelte
|
|
@@ -7134,13 +7205,13 @@
|
|
|
7134
7205
|
let dispose;
|
|
7135
7206
|
const default_slot_template = (
|
|
7136
7207
|
/*#slots*/
|
|
7137
|
-
ctx[
|
|
7208
|
+
ctx[5].default
|
|
7138
7209
|
);
|
|
7139
7210
|
const default_slot = create_slot(
|
|
7140
7211
|
default_slot_template,
|
|
7141
7212
|
ctx,
|
|
7142
7213
|
/*$$scope*/
|
|
7143
|
-
ctx[
|
|
7214
|
+
ctx[4],
|
|
7144
7215
|
null
|
|
7145
7216
|
);
|
|
7146
7217
|
return {
|
|
@@ -7195,20 +7266,20 @@
|
|
|
7195
7266
|
p(ctx2, [dirty]) {
|
|
7196
7267
|
if (default_slot) {
|
|
7197
7268
|
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
7198
|
-
|
|
7269
|
+
16)) {
|
|
7199
7270
|
update_slot_base(
|
|
7200
7271
|
default_slot,
|
|
7201
7272
|
default_slot_template,
|
|
7202
7273
|
ctx2,
|
|
7203
7274
|
/*$$scope*/
|
|
7204
|
-
ctx2[
|
|
7275
|
+
ctx2[4],
|
|
7205
7276
|
!current ? get_all_dirty_from_scope(
|
|
7206
7277
|
/*$$scope*/
|
|
7207
|
-
ctx2[
|
|
7278
|
+
ctx2[4]
|
|
7208
7279
|
) : get_slot_changes(
|
|
7209
7280
|
default_slot_template,
|
|
7210
7281
|
/*$$scope*/
|
|
7211
|
-
ctx2[
|
|
7282
|
+
ctx2[4],
|
|
7212
7283
|
dirty,
|
|
7213
7284
|
null
|
|
7214
7285
|
),
|
|
@@ -7257,33 +7328,47 @@
|
|
|
7257
7328
|
};
|
|
7258
7329
|
function instance7($$self, $$props, $$invalidate) {
|
|
7259
7330
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
7331
|
+
let { modalData = [] } = $$props;
|
|
7332
|
+
const dispatch = createEventDispatcher();
|
|
7260
7333
|
let modalAriaLabel = "";
|
|
7261
7334
|
let isModalOpen = false;
|
|
7262
|
-
modalSettings.subscribe((value) => {
|
|
7263
|
-
const { modalAriaLabel: storeModalAriaLabel, isModalOpen: storeIsmodalOpen } = value;
|
|
7264
|
-
$$invalidate(0, modalAriaLabel = storeModalAriaLabel);
|
|
7265
|
-
$$invalidate(1, isModalOpen = storeIsmodalOpen);
|
|
7266
|
-
});
|
|
7267
7335
|
const clickModalBackground = () => {
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
isModalOpen: false,
|
|
7271
|
-
modalAriaLabel: ""
|
|
7272
|
-
});
|
|
7336
|
+
$$invalidate(3, modalData = { isModalOpen: false, modalAriaLabel: "" });
|
|
7337
|
+
dispatch("updateModalSettings", modalData);
|
|
7273
7338
|
};
|
|
7274
7339
|
$$self.$$set = ($$props2) => {
|
|
7340
|
+
if ("modalData" in $$props2)
|
|
7341
|
+
$$invalidate(3, modalData = $$props2.modalData);
|
|
7275
7342
|
if ("$$scope" in $$props2)
|
|
7276
|
-
$$invalidate(
|
|
7343
|
+
$$invalidate(4, $$scope = $$props2.$$scope);
|
|
7344
|
+
};
|
|
7345
|
+
$$self.$$.update = () => {
|
|
7346
|
+
if ($$self.$$.dirty & /*modalData*/
|
|
7347
|
+
8) {
|
|
7348
|
+
$:
|
|
7349
|
+
if (modalData) {
|
|
7350
|
+
const { modalAriaLabel: storeModalAriaLabel, isModalOpen: storeIsmodalOpen } = modalData;
|
|
7351
|
+
$$invalidate(0, modalAriaLabel = storeModalAriaLabel);
|
|
7352
|
+
$$invalidate(1, isModalOpen = storeIsmodalOpen);
|
|
7353
|
+
}
|
|
7354
|
+
}
|
|
7277
7355
|
};
|
|
7278
|
-
return [modalAriaLabel, isModalOpen, clickModalBackground, $$scope, slots];
|
|
7356
|
+
return [modalAriaLabel, isModalOpen, clickModalBackground, modalData, $$scope, slots];
|
|
7279
7357
|
}
|
|
7280
7358
|
var CommonModal = class extends SvelteComponent {
|
|
7281
7359
|
constructor(options) {
|
|
7282
7360
|
super();
|
|
7283
|
-
init(this, options, instance7, create_fragment11, safe_not_equal, {});
|
|
7361
|
+
init(this, options, instance7, create_fragment11, safe_not_equal, { modalData: 3 });
|
|
7362
|
+
}
|
|
7363
|
+
get modalData() {
|
|
7364
|
+
return this.$$.ctx[3];
|
|
7365
|
+
}
|
|
7366
|
+
set modalData(modalData) {
|
|
7367
|
+
this.$$set({ modalData });
|
|
7368
|
+
flush();
|
|
7284
7369
|
}
|
|
7285
7370
|
};
|
|
7286
|
-
customElements.define("common-modal", create_custom_element(CommonModal, {}, ["default"], [], true));
|
|
7371
|
+
customElements.define("common-modal", create_custom_element(CommonModal, { "modalData": {} }, ["default"], [], true));
|
|
7287
7372
|
var CommonModal_default = CommonModal;
|
|
7288
7373
|
|
|
7289
7374
|
// src/lib/assets/img/messaging/AlertIcon.svelte
|
|
@@ -7425,7 +7510,7 @@
|
|
|
7425
7510
|
div0,
|
|
7426
7511
|
"aria-hidden",
|
|
7427
7512
|
/*ariaHidden*/
|
|
7428
|
-
ctx[
|
|
7513
|
+
ctx[2]
|
|
7429
7514
|
);
|
|
7430
7515
|
attr(span1, "class", "text-xl leading-6 font-bold ml-3 grow");
|
|
7431
7516
|
attr(button0, "aria-label", "Close");
|
|
@@ -7442,7 +7527,7 @@
|
|
|
7442
7527
|
m(target, anchor) {
|
|
7443
7528
|
insert(target, div0, anchor);
|
|
7444
7529
|
append(div0, t0);
|
|
7445
|
-
ctx[
|
|
7530
|
+
ctx[7](div0);
|
|
7446
7531
|
insert(target, t1, anchor);
|
|
7447
7532
|
insert(target, div3, anchor);
|
|
7448
7533
|
append(div3, div1);
|
|
@@ -7467,19 +7552,19 @@
|
|
|
7467
7552
|
button0,
|
|
7468
7553
|
"click",
|
|
7469
7554
|
/*closeResetModal*/
|
|
7470
|
-
ctx[
|
|
7555
|
+
ctx[3]
|
|
7471
7556
|
),
|
|
7472
7557
|
listen(
|
|
7473
7558
|
button1,
|
|
7474
7559
|
"click",
|
|
7475
7560
|
/*closeResetModal*/
|
|
7476
|
-
ctx[
|
|
7561
|
+
ctx[3]
|
|
7477
7562
|
),
|
|
7478
7563
|
listen(
|
|
7479
7564
|
button2,
|
|
7480
7565
|
"click",
|
|
7481
7566
|
/*resetCategories*/
|
|
7482
|
-
ctx[
|
|
7567
|
+
ctx[5]
|
|
7483
7568
|
)
|
|
7484
7569
|
];
|
|
7485
7570
|
mounted = true;
|
|
@@ -7487,12 +7572,12 @@
|
|
|
7487
7572
|
},
|
|
7488
7573
|
p(ctx2, dirty) {
|
|
7489
7574
|
if (!current || dirty & /*ariaHidden*/
|
|
7490
|
-
|
|
7575
|
+
4) {
|
|
7491
7576
|
attr(
|
|
7492
7577
|
div0,
|
|
7493
7578
|
"aria-hidden",
|
|
7494
7579
|
/*ariaHidden*/
|
|
7495
|
-
ctx2[
|
|
7580
|
+
ctx2[2]
|
|
7496
7581
|
);
|
|
7497
7582
|
}
|
|
7498
7583
|
},
|
|
@@ -7514,7 +7599,7 @@
|
|
|
7514
7599
|
detach(t1);
|
|
7515
7600
|
detach(div3);
|
|
7516
7601
|
}
|
|
7517
|
-
ctx[
|
|
7602
|
+
ctx[7](null);
|
|
7518
7603
|
destroy_component(alerticon);
|
|
7519
7604
|
destroy_component(crossicon);
|
|
7520
7605
|
mounted = false;
|
|
@@ -7527,10 +7612,19 @@
|
|
|
7527
7612
|
let current;
|
|
7528
7613
|
commonmodal = new CommonModal_default({
|
|
7529
7614
|
props: {
|
|
7615
|
+
modalData: (
|
|
7616
|
+
/*modalData*/
|
|
7617
|
+
ctx[0]
|
|
7618
|
+
),
|
|
7530
7619
|
$$slots: { default: [create_default_slot3] },
|
|
7531
7620
|
$$scope: { ctx }
|
|
7532
7621
|
}
|
|
7533
7622
|
});
|
|
7623
|
+
commonmodal.$on(
|
|
7624
|
+
"updateModalSettings",
|
|
7625
|
+
/*updateModal*/
|
|
7626
|
+
ctx[4]
|
|
7627
|
+
);
|
|
7534
7628
|
return {
|
|
7535
7629
|
c() {
|
|
7536
7630
|
create_component(commonmodal.$$.fragment);
|
|
@@ -7541,8 +7635,12 @@
|
|
|
7541
7635
|
},
|
|
7542
7636
|
p(ctx2, [dirty]) {
|
|
7543
7637
|
const commonmodal_changes = {};
|
|
7638
|
+
if (dirty & /*modalData*/
|
|
7639
|
+
1)
|
|
7640
|
+
commonmodal_changes.modalData = /*modalData*/
|
|
7641
|
+
ctx2[0];
|
|
7544
7642
|
if (dirty & /*$$scope, ariaHidden, categoryModal*/
|
|
7545
|
-
|
|
7643
|
+
2054) {
|
|
7546
7644
|
commonmodal_changes.$$scope = { dirty, ctx: ctx2 };
|
|
7547
7645
|
}
|
|
7548
7646
|
commonmodal.$set(commonmodal_changes);
|
|
@@ -7563,26 +7661,35 @@
|
|
|
7563
7661
|
};
|
|
7564
7662
|
}
|
|
7565
7663
|
function instance8($$self, $$props, $$invalidate) {
|
|
7664
|
+
let { categoryData = [] } = $$props;
|
|
7665
|
+
let { modalData = [] } = $$props;
|
|
7566
7666
|
let categoryModal;
|
|
7567
7667
|
let ariaHidden = false;
|
|
7568
|
-
const { isModalOpen } =
|
|
7668
|
+
const { isModalOpen } = modalData;
|
|
7669
|
+
const dispatch = createEventDispatcher();
|
|
7569
7670
|
if (isModalOpen) {
|
|
7570
7671
|
setTimeout(() => {
|
|
7571
7672
|
categoryModal.focus();
|
|
7572
|
-
$$invalidate(
|
|
7673
|
+
$$invalidate(2, ariaHidden = true);
|
|
7573
7674
|
});
|
|
7574
7675
|
}
|
|
7575
7676
|
const closeResetModal = () => {
|
|
7576
|
-
|
|
7577
|
-
...get_store_value(modalSettings),
|
|
7677
|
+
$$invalidate(0, modalData = {
|
|
7578
7678
|
isModalOpen: false,
|
|
7579
7679
|
modalAriaLabel: "",
|
|
7580
7680
|
isOpenLastStatus: true
|
|
7581
7681
|
});
|
|
7682
|
+
dispatchModalData(modalData);
|
|
7683
|
+
};
|
|
7684
|
+
const updateModal = ({ detail }) => {
|
|
7685
|
+
$$invalidate(0, modalData = { ...modalData, ...detail });
|
|
7686
|
+
dispatchModalData(modalData);
|
|
7687
|
+
};
|
|
7688
|
+
const dispatchModalData = (newSettings) => {
|
|
7689
|
+
dispatch("updateModalSettings", newSettings);
|
|
7582
7690
|
};
|
|
7583
|
-
const dispatch = createEventDispatcher();
|
|
7584
7691
|
const resetCategories = () => {
|
|
7585
|
-
const { currentAnswer, rawCategoryItems } =
|
|
7692
|
+
const { currentAnswer, rawCategoryItems } = categoryData;
|
|
7586
7693
|
const wordBinItems = rawCategoryItems.map((item) => item.id);
|
|
7587
7694
|
const shuffledWordBinItems = wordBinItems.map((value) => ({ value, sort: Math.random() })).sort((a, b) => a.sort - b.sort).map(({ value }) => value);
|
|
7588
7695
|
const resetCurrentAnswer = currentAnswer.map((answer) => {
|
|
@@ -7591,8 +7698,8 @@
|
|
|
7591
7698
|
itemId: answer.categoryId === CONTAINER_WORD_BIN_ID ? shuffledWordBinItems : []
|
|
7592
7699
|
};
|
|
7593
7700
|
});
|
|
7594
|
-
|
|
7595
|
-
...
|
|
7701
|
+
$$invalidate(6, categoryData = {
|
|
7702
|
+
...categoryData,
|
|
7596
7703
|
considerContainerId: "",
|
|
7597
7704
|
considerItemId: "",
|
|
7598
7705
|
considerCloneItemId: "",
|
|
@@ -7606,24 +7713,54 @@
|
|
|
7606
7713
|
currentAnswer: resetCurrentAnswer,
|
|
7607
7714
|
hasAddItemAnimation: false
|
|
7608
7715
|
});
|
|
7716
|
+
dispatch("updateCategorySettings", categoryData);
|
|
7609
7717
|
dispatch("resetCategory", { answer_list: [] });
|
|
7610
7718
|
closeResetModal();
|
|
7611
7719
|
};
|
|
7612
7720
|
function div0_binding($$value) {
|
|
7613
7721
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
7614
7722
|
categoryModal = $$value;
|
|
7615
|
-
$$invalidate(
|
|
7723
|
+
$$invalidate(1, categoryModal);
|
|
7616
7724
|
});
|
|
7617
7725
|
}
|
|
7618
|
-
|
|
7726
|
+
$$self.$$set = ($$props2) => {
|
|
7727
|
+
if ("categoryData" in $$props2)
|
|
7728
|
+
$$invalidate(6, categoryData = $$props2.categoryData);
|
|
7729
|
+
if ("modalData" in $$props2)
|
|
7730
|
+
$$invalidate(0, modalData = $$props2.modalData);
|
|
7731
|
+
};
|
|
7732
|
+
return [
|
|
7733
|
+
modalData,
|
|
7734
|
+
categoryModal,
|
|
7735
|
+
ariaHidden,
|
|
7736
|
+
closeResetModal,
|
|
7737
|
+
updateModal,
|
|
7738
|
+
resetCategories,
|
|
7739
|
+
categoryData,
|
|
7740
|
+
div0_binding
|
|
7741
|
+
];
|
|
7619
7742
|
}
|
|
7620
7743
|
var PromptCategoriseModal = class extends SvelteComponent {
|
|
7621
7744
|
constructor(options) {
|
|
7622
7745
|
super();
|
|
7623
|
-
init(this, options, instance8, create_fragment14, safe_not_equal, {});
|
|
7746
|
+
init(this, options, instance8, create_fragment14, safe_not_equal, { categoryData: 6, modalData: 0 });
|
|
7747
|
+
}
|
|
7748
|
+
get categoryData() {
|
|
7749
|
+
return this.$$.ctx[6];
|
|
7750
|
+
}
|
|
7751
|
+
set categoryData(categoryData) {
|
|
7752
|
+
this.$$set({ categoryData });
|
|
7753
|
+
flush();
|
|
7754
|
+
}
|
|
7755
|
+
get modalData() {
|
|
7756
|
+
return this.$$.ctx[0];
|
|
7757
|
+
}
|
|
7758
|
+
set modalData(modalData) {
|
|
7759
|
+
this.$$set({ modalData });
|
|
7760
|
+
flush();
|
|
7624
7761
|
}
|
|
7625
7762
|
};
|
|
7626
|
-
customElements.define("prompy-categorise-modal", create_custom_element(PromptCategoriseModal, {}, [], [], true));
|
|
7763
|
+
customElements.define("prompy-categorise-modal", create_custom_element(PromptCategoriseModal, { "categoryData": {}, "modalData": {} }, [], [], true));
|
|
7627
7764
|
var PromptCategoriseModal_default = PromptCategoriseModal;
|
|
7628
7765
|
|
|
7629
7766
|
// src/lib/assets/img/action/Switch.svelte
|
|
@@ -8035,19 +8172,40 @@
|
|
|
8035
8172
|
// src/lib/components/prompt/categorise/PromptCategorise.svelte
|
|
8036
8173
|
function get_each_context3(ctx, list, i) {
|
|
8037
8174
|
const child_ctx = ctx.slice();
|
|
8038
|
-
child_ctx[
|
|
8039
|
-
child_ctx[
|
|
8040
|
-
child_ctx[
|
|
8175
|
+
child_ctx[67] = list[i];
|
|
8176
|
+
child_ctx[68] = list;
|
|
8177
|
+
child_ctx[69] = i;
|
|
8041
8178
|
return child_ctx;
|
|
8042
8179
|
}
|
|
8043
8180
|
function create_if_block_6(ctx) {
|
|
8044
8181
|
let promptcategorisemodal;
|
|
8045
8182
|
let current;
|
|
8046
|
-
promptcategorisemodal = new PromptCategoriseModal_default({
|
|
8183
|
+
promptcategorisemodal = new PromptCategoriseModal_default({
|
|
8184
|
+
props: {
|
|
8185
|
+
categoryData: (
|
|
8186
|
+
/*categoriseSettingsData*/
|
|
8187
|
+
ctx[6]
|
|
8188
|
+
),
|
|
8189
|
+
modalData: (
|
|
8190
|
+
/*modalSettingsData*/
|
|
8191
|
+
ctx[7]
|
|
8192
|
+
)
|
|
8193
|
+
}
|
|
8194
|
+
});
|
|
8195
|
+
promptcategorisemodal.$on(
|
|
8196
|
+
"updateCategorySettings",
|
|
8197
|
+
/*updateCategory*/
|
|
8198
|
+
ctx[40]
|
|
8199
|
+
);
|
|
8200
|
+
promptcategorisemodal.$on(
|
|
8201
|
+
"updateModalSettings",
|
|
8202
|
+
/*updateModal*/
|
|
8203
|
+
ctx[46]
|
|
8204
|
+
);
|
|
8047
8205
|
promptcategorisemodal.$on(
|
|
8048
8206
|
"resetCategory",
|
|
8049
8207
|
/*saveCategory*/
|
|
8050
|
-
ctx[
|
|
8208
|
+
ctx[39]
|
|
8051
8209
|
);
|
|
8052
8210
|
return {
|
|
8053
8211
|
c() {
|
|
@@ -8057,7 +8215,18 @@
|
|
|
8057
8215
|
mount_component(promptcategorisemodal, target, anchor);
|
|
8058
8216
|
current = true;
|
|
8059
8217
|
},
|
|
8060
|
-
p
|
|
8218
|
+
p(ctx2, dirty) {
|
|
8219
|
+
const promptcategorisemodal_changes = {};
|
|
8220
|
+
if (dirty[0] & /*categoriseSettingsData*/
|
|
8221
|
+
64)
|
|
8222
|
+
promptcategorisemodal_changes.categoryData = /*categoriseSettingsData*/
|
|
8223
|
+
ctx2[6];
|
|
8224
|
+
if (dirty[0] & /*modalSettingsData*/
|
|
8225
|
+
128)
|
|
8226
|
+
promptcategorisemodal_changes.modalData = /*modalSettingsData*/
|
|
8227
|
+
ctx2[7];
|
|
8228
|
+
promptcategorisemodal.$set(promptcategorisemodal_changes);
|
|
8229
|
+
},
|
|
8061
8230
|
i(local) {
|
|
8062
8231
|
if (current)
|
|
8063
8232
|
return;
|
|
@@ -8097,7 +8266,7 @@
|
|
|
8097
8266
|
button,
|
|
8098
8267
|
"tabindex",
|
|
8099
8268
|
/*categoryTabIndex*/
|
|
8100
|
-
ctx[
|
|
8269
|
+
ctx[20]
|
|
8101
8270
|
);
|
|
8102
8271
|
attr(button, "aria-label", "Reset words");
|
|
8103
8272
|
attr(button, "class", "group focus-ring flex items-center rounded-lg border-2 border-soft-blue text-blue-1000 px-3 py-2 absolute right-0 -top-2.5 hover:bg-blue-100");
|
|
@@ -8114,19 +8283,19 @@
|
|
|
8114
8283
|
button,
|
|
8115
8284
|
"click",
|
|
8116
8285
|
/*openResetModal*/
|
|
8117
|
-
ctx[
|
|
8286
|
+
ctx[33]
|
|
8118
8287
|
);
|
|
8119
8288
|
mounted = true;
|
|
8120
8289
|
}
|
|
8121
8290
|
},
|
|
8122
8291
|
p(ctx2, dirty) {
|
|
8123
8292
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
8124
|
-
|
|
8293
|
+
1048576) {
|
|
8125
8294
|
attr(
|
|
8126
8295
|
button,
|
|
8127
8296
|
"tabindex",
|
|
8128
8297
|
/*categoryTabIndex*/
|
|
8129
|
-
ctx2[
|
|
8298
|
+
ctx2[20]
|
|
8130
8299
|
);
|
|
8131
8300
|
}
|
|
8132
8301
|
},
|
|
@@ -8161,7 +8330,7 @@
|
|
|
8161
8330
|
t0 = text("Option ");
|
|
8162
8331
|
t1 = text(
|
|
8163
8332
|
/*selectedItemName*/
|
|
8164
|
-
ctx[
|
|
8333
|
+
ctx[21]
|
|
8165
8334
|
);
|
|
8166
8335
|
t2 = text(" added in:\xA0");
|
|
8167
8336
|
attr(span, "class", "sr-only");
|
|
@@ -8174,11 +8343,11 @@
|
|
|
8174
8343
|
},
|
|
8175
8344
|
p(ctx2, dirty) {
|
|
8176
8345
|
if (dirty[0] & /*selectedItemName*/
|
|
8177
|
-
|
|
8346
|
+
2097152)
|
|
8178
8347
|
set_data(
|
|
8179
8348
|
t1,
|
|
8180
8349
|
/*selectedItemName*/
|
|
8181
|
-
ctx2[
|
|
8350
|
+
ctx2[21]
|
|
8182
8351
|
);
|
|
8183
8352
|
},
|
|
8184
8353
|
d(detaching) {
|
|
@@ -8193,11 +8362,11 @@
|
|
|
8193
8362
|
let t0;
|
|
8194
8363
|
let t1_value = (
|
|
8195
8364
|
/*getTotalWordsLabel*/
|
|
8196
|
-
ctx[
|
|
8365
|
+
ctx[35](
|
|
8197
8366
|
/*totalCategoryWords*/
|
|
8198
|
-
ctx[
|
|
8367
|
+
ctx[5][
|
|
8199
8368
|
/*category*/
|
|
8200
|
-
ctx[
|
|
8369
|
+
ctx[67].id
|
|
8201
8370
|
]
|
|
8202
8371
|
) + ""
|
|
8203
8372
|
);
|
|
@@ -8219,12 +8388,12 @@
|
|
|
8219
8388
|
},
|
|
8220
8389
|
p(ctx2, dirty) {
|
|
8221
8390
|
if (dirty[0] & /*totalCategoryWords*/
|
|
8222
|
-
|
|
8223
|
-
ctx2[
|
|
8391
|
+
32 && t1_value !== (t1_value = /*getTotalWordsLabel*/
|
|
8392
|
+
ctx2[35](
|
|
8224
8393
|
/*totalCategoryWords*/
|
|
8225
|
-
ctx2[
|
|
8394
|
+
ctx2[5][
|
|
8226
8395
|
/*category*/
|
|
8227
|
-
ctx2[
|
|
8396
|
+
ctx2[67].id
|
|
8228
8397
|
]
|
|
8229
8398
|
) + ""))
|
|
8230
8399
|
set_data(t1, t1_value);
|
|
@@ -8249,12 +8418,12 @@
|
|
|
8249
8418
|
t0 = text(". Student's answer: ");
|
|
8250
8419
|
t1 = text(
|
|
8251
8420
|
/*selectedItemName*/
|
|
8252
|
-
ctx[
|
|
8421
|
+
ctx[21]
|
|
8253
8422
|
);
|
|
8254
8423
|
t2 = text(" (");
|
|
8255
8424
|
t3 = text(
|
|
8256
8425
|
/*previewResultSr*/
|
|
8257
|
-
ctx[
|
|
8426
|
+
ctx[4]
|
|
8258
8427
|
);
|
|
8259
8428
|
t4 = text(")");
|
|
8260
8429
|
attr(span, "class", "sr-only");
|
|
@@ -8269,18 +8438,18 @@
|
|
|
8269
8438
|
},
|
|
8270
8439
|
p(ctx2, dirty) {
|
|
8271
8440
|
if (dirty[0] & /*selectedItemName*/
|
|
8272
|
-
|
|
8441
|
+
2097152)
|
|
8273
8442
|
set_data(
|
|
8274
8443
|
t1,
|
|
8275
8444
|
/*selectedItemName*/
|
|
8276
|
-
ctx2[
|
|
8445
|
+
ctx2[21]
|
|
8277
8446
|
);
|
|
8278
8447
|
if (dirty[0] & /*previewResultSr*/
|
|
8279
|
-
|
|
8448
|
+
16)
|
|
8280
8449
|
set_data(
|
|
8281
8450
|
t3,
|
|
8282
8451
|
/*previewResultSr*/
|
|
8283
|
-
ctx2[
|
|
8452
|
+
ctx2[4]
|
|
8284
8453
|
);
|
|
8285
8454
|
},
|
|
8286
8455
|
d(detaching) {
|
|
@@ -8349,11 +8518,11 @@
|
|
|
8349
8518
|
let div0;
|
|
8350
8519
|
let show_if_1 = (
|
|
8351
8520
|
/*checkContainerDroppedItem*/
|
|
8352
|
-
ctx[
|
|
8521
|
+
ctx[31](
|
|
8353
8522
|
/*category*/
|
|
8354
|
-
ctx[
|
|
8523
|
+
ctx[67].id,
|
|
8355
8524
|
/*dropContainerId*/
|
|
8356
|
-
ctx[
|
|
8525
|
+
ctx[12]
|
|
8357
8526
|
)
|
|
8358
8527
|
);
|
|
8359
8528
|
let t0;
|
|
@@ -8367,11 +8536,11 @@
|
|
|
8367
8536
|
let span2;
|
|
8368
8537
|
let t9_value = (
|
|
8369
8538
|
/*getTotalWords*/
|
|
8370
|
-
ctx[
|
|
8539
|
+
ctx[34](
|
|
8371
8540
|
/*category*/
|
|
8372
|
-
ctx[
|
|
8541
|
+
ctx[67].id,
|
|
8373
8542
|
/*currentAnswer*/
|
|
8374
|
-
ctx[
|
|
8543
|
+
ctx[3]
|
|
8375
8544
|
) + ""
|
|
8376
8545
|
);
|
|
8377
8546
|
let t9;
|
|
@@ -8391,31 +8560,31 @@
|
|
|
8391
8560
|
let div1_class_value;
|
|
8392
8561
|
let category = (
|
|
8393
8562
|
/*category*/
|
|
8394
|
-
ctx[
|
|
8563
|
+
ctx[67]
|
|
8395
8564
|
);
|
|
8396
8565
|
let current;
|
|
8397
8566
|
let mounted;
|
|
8398
8567
|
let dispose;
|
|
8399
8568
|
let if_block0 = show_if_1 && create_if_block_42(ctx);
|
|
8400
8569
|
let if_block1 = !/*previewResultSr*/
|
|
8401
|
-
ctx[
|
|
8570
|
+
ctx[4] && create_if_block_33(ctx);
|
|
8402
8571
|
let if_block2 = (
|
|
8403
8572
|
/*previewResultSr*/
|
|
8404
|
-
ctx[
|
|
8573
|
+
ctx[4] && create_if_block_25(ctx)
|
|
8405
8574
|
);
|
|
8406
8575
|
const if_block_creators = [create_if_block_17, create_else_block4];
|
|
8407
8576
|
const if_blocks = [];
|
|
8408
8577
|
function select_block_type(ctx2, dirty) {
|
|
8409
8578
|
if (dirty[0] & /*openCategoryContainer*/
|
|
8410
|
-
|
|
8579
|
+
262144)
|
|
8411
8580
|
show_if = null;
|
|
8412
8581
|
if (show_if == null)
|
|
8413
8582
|
show_if = !!/*checkifCategoryContainerOpen*/
|
|
8414
|
-
ctx2[
|
|
8583
|
+
ctx2[36](
|
|
8415
8584
|
/*category*/
|
|
8416
|
-
ctx2[
|
|
8585
|
+
ctx2[67].id,
|
|
8417
8586
|
/*openCategoryContainer*/
|
|
8418
|
-
ctx2[
|
|
8587
|
+
ctx2[18]
|
|
8419
8588
|
);
|
|
8420
8589
|
if (show_if)
|
|
8421
8590
|
return 0;
|
|
@@ -8424,102 +8593,115 @@
|
|
|
8424
8593
|
current_block_type_index = select_block_type(ctx, [-1, -1, -1]);
|
|
8425
8594
|
if_block3 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
8426
8595
|
function div0_elementresize_handler() {
|
|
8427
|
-
ctx[
|
|
8596
|
+
ctx[49].call(
|
|
8428
8597
|
div0,
|
|
8429
8598
|
/*category*/
|
|
8430
|
-
ctx[
|
|
8599
|
+
ctx[67]
|
|
8431
8600
|
);
|
|
8432
8601
|
}
|
|
8433
8602
|
promptcategorisedndcontainer = new PromptCategoriseDndContainer_default({
|
|
8434
8603
|
props: {
|
|
8435
8604
|
containerClass: "content-start !outline-none rounded-lg grow w-full md:p-4\n " + /*checkContainerDragOver*/
|
|
8436
|
-
(ctx[
|
|
8605
|
+
(ctx[30](
|
|
8437
8606
|
/*category*/
|
|
8438
|
-
ctx[
|
|
8607
|
+
ctx[67].id,
|
|
8439
8608
|
/*considerContainerId*/
|
|
8440
|
-
ctx[
|
|
8609
|
+
ctx[10],
|
|
8441
8610
|
/*isDraggingOver*/
|
|
8442
|
-
ctx[
|
|
8611
|
+
ctx[11]
|
|
8443
8612
|
) ? "bg-violet-100" : "") + "\n " + /*checkifCategoryContainerOpen*/
|
|
8444
|
-
(ctx[
|
|
8613
|
+
(ctx[36](
|
|
8445
8614
|
/*category*/
|
|
8446
|
-
ctx[
|
|
8615
|
+
ctx[67].id,
|
|
8447
8616
|
/*openCategoryContainer*/
|
|
8448
|
-
ctx[
|
|
8617
|
+
ctx[18]
|
|
8449
8618
|
) ? "h-full p-3 min-h-[86px] md:min-h-0" : ""),
|
|
8450
8619
|
paddingTop: (
|
|
8451
8620
|
/*checkifCategoryContainerOpen*/
|
|
8452
|
-
ctx[
|
|
8621
|
+
ctx[36](
|
|
8453
8622
|
/*category*/
|
|
8454
|
-
ctx[
|
|
8623
|
+
ctx[67].id,
|
|
8455
8624
|
/*openCategoryContainer*/
|
|
8456
|
-
ctx[
|
|
8625
|
+
ctx[18]
|
|
8457
8626
|
) || !useIsSmallScreen() ? (
|
|
8458
8627
|
/*categoryTitleHeight*/
|
|
8459
|
-
ctx[
|
|
8628
|
+
ctx[23][
|
|
8460
8629
|
/*category*/
|
|
8461
|
-
ctx[
|
|
8630
|
+
ctx[67].id
|
|
8462
8631
|
] + 16
|
|
8463
8632
|
) : (
|
|
8464
8633
|
/*categoryTitleHeight*/
|
|
8465
|
-
ctx[
|
|
8634
|
+
ctx[23][
|
|
8466
8635
|
/*category*/
|
|
8467
|
-
ctx[
|
|
8636
|
+
ctx[67].id
|
|
8468
8637
|
]
|
|
8469
8638
|
)
|
|
8470
8639
|
),
|
|
8471
8640
|
containerId: (
|
|
8472
8641
|
/*category*/
|
|
8473
|
-
ctx[
|
|
8642
|
+
ctx[67].id
|
|
8474
8643
|
),
|
|
8475
8644
|
showButton: (
|
|
8476
8645
|
/*checkifCategoryContainerOpen*/
|
|
8477
|
-
ctx[
|
|
8646
|
+
ctx[36](
|
|
8478
8647
|
/*category*/
|
|
8479
|
-
ctx[
|
|
8648
|
+
ctx[67].id,
|
|
8480
8649
|
/*openCategoryContainer*/
|
|
8481
|
-
ctx[
|
|
8650
|
+
ctx[18]
|
|
8482
8651
|
)
|
|
8483
8652
|
),
|
|
8484
8653
|
ariaLabel: `Category ${/*index*/
|
|
8485
|
-
ctx[
|
|
8486
|
-
ctx[
|
|
8654
|
+
ctx[69] + 1}: ${/*category*/
|
|
8655
|
+
ctx[67].name}`,
|
|
8487
8656
|
isFinished: (
|
|
8488
8657
|
/*isFinished*/
|
|
8489
8658
|
ctx[0]
|
|
8490
8659
|
),
|
|
8491
8660
|
correctAnswerList: (
|
|
8492
8661
|
/*scoringMetadata*/
|
|
8493
|
-
ctx[
|
|
8662
|
+
ctx[26]
|
|
8494
8663
|
),
|
|
8495
8664
|
isPreviewModeInteractive: (
|
|
8496
8665
|
/*isPreviewModeInteractive*/
|
|
8497
8666
|
ctx[1]
|
|
8667
|
+
),
|
|
8668
|
+
categoryData: (
|
|
8669
|
+
/*categoriseSettingsData*/
|
|
8670
|
+
ctx[6]
|
|
8671
|
+
),
|
|
8672
|
+
type: (
|
|
8673
|
+
/*categoryDndType*/
|
|
8674
|
+
ctx[24]
|
|
8498
8675
|
)
|
|
8499
8676
|
}
|
|
8500
8677
|
});
|
|
8678
|
+
promptcategorisedndcontainer.$on(
|
|
8679
|
+
"updateCategorySettings",
|
|
8680
|
+
/*updateCategory*/
|
|
8681
|
+
ctx[40]
|
|
8682
|
+
);
|
|
8501
8683
|
promptcategorisedndcontainer.$on(
|
|
8502
8684
|
"saveCategory",
|
|
8503
8685
|
/*saveCategory*/
|
|
8504
|
-
ctx[
|
|
8686
|
+
ctx[39]
|
|
8505
8687
|
);
|
|
8506
8688
|
function keydown_handler(...args) {
|
|
8507
8689
|
return (
|
|
8508
8690
|
/*keydown_handler*/
|
|
8509
|
-
ctx[
|
|
8691
|
+
ctx[50](
|
|
8510
8692
|
/*category*/
|
|
8511
|
-
ctx[
|
|
8693
|
+
ctx[67],
|
|
8512
8694
|
...args
|
|
8513
8695
|
)
|
|
8514
8696
|
);
|
|
8515
8697
|
}
|
|
8516
8698
|
const assign_div1 = () => (
|
|
8517
8699
|
/*div1_binding*/
|
|
8518
|
-
ctx[
|
|
8700
|
+
ctx[52](div1, category)
|
|
8519
8701
|
);
|
|
8520
8702
|
const unassign_div1 = () => (
|
|
8521
8703
|
/*div1_binding*/
|
|
8522
|
-
ctx[
|
|
8704
|
+
ctx[52](null, category)
|
|
8523
8705
|
);
|
|
8524
8706
|
return {
|
|
8525
8707
|
c() {
|
|
@@ -8530,11 +8712,11 @@
|
|
|
8530
8712
|
t0 = space();
|
|
8531
8713
|
span0 = element("span");
|
|
8532
8714
|
span0.textContent = `Category ${/*index*/
|
|
8533
|
-
ctx[
|
|
8715
|
+
ctx[69] + 1}:\xA0`;
|
|
8534
8716
|
t4 = space();
|
|
8535
8717
|
span1 = element("span");
|
|
8536
8718
|
span1.textContent = `${/*category*/
|
|
8537
|
-
ctx[
|
|
8719
|
+
ctx[67].name}`;
|
|
8538
8720
|
t6 = space();
|
|
8539
8721
|
if (if_block1)
|
|
8540
8722
|
if_block1.c();
|
|
@@ -8556,113 +8738,113 @@
|
|
|
8556
8738
|
attr(span2, "class", "mx-0.5");
|
|
8557
8739
|
attr(span3, "class", "w-4 h-4 text-inherit flex items-center justify-center");
|
|
8558
8740
|
attr(button, "aria-label", button_aria_label_value = /*getTotalWords*/
|
|
8559
|
-
ctx[
|
|
8741
|
+
ctx[34](
|
|
8560
8742
|
/*category*/
|
|
8561
|
-
ctx[
|
|
8743
|
+
ctx[67].id,
|
|
8562
8744
|
/*currentAnswer*/
|
|
8563
|
-
ctx[
|
|
8745
|
+
ctx[3]
|
|
8564
8746
|
));
|
|
8565
8747
|
attr(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 md:hidden");
|
|
8566
8748
|
attr(div0, "id", div0_id_value = `category-title${/*index*/
|
|
8567
|
-
ctx[
|
|
8749
|
+
ctx[69]}`);
|
|
8568
8750
|
attr(div0, "aria-live", div0_aria_live_value = /*checkContainerDroppedItem*/
|
|
8569
|
-
ctx[
|
|
8751
|
+
ctx[31](
|
|
8570
8752
|
/*category*/
|
|
8571
|
-
ctx[
|
|
8753
|
+
ctx[67].id,
|
|
8572
8754
|
/*dropContainerId*/
|
|
8573
|
-
ctx[
|
|
8755
|
+
ctx[12]
|
|
8574
8756
|
) && /*enableAriaLive*/
|
|
8575
|
-
ctx[
|
|
8757
|
+
ctx[22] ? "polite" : "off");
|
|
8576
8758
|
attr(div0, "class", div0_class_value = "absolute flex items-center justify-between border-b border-gray-800 w-full rounded-t-lg p-3 md:p-4 md:justify-center " + /*checkContainerDroppedItem*/
|
|
8577
|
-
(ctx[
|
|
8759
|
+
(ctx[31](
|
|
8578
8760
|
/*category*/
|
|
8579
|
-
ctx[
|
|
8761
|
+
ctx[67].id,
|
|
8580
8762
|
/*dropContainerId*/
|
|
8581
|
-
ctx[
|
|
8763
|
+
ctx[12]
|
|
8582
8764
|
) ? "bg-tranparent" : "bg-white") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8583
|
-
ctx[
|
|
8765
|
+
ctx[36](
|
|
8584
8766
|
/*category*/
|
|
8585
|
-
ctx[
|
|
8767
|
+
ctx[67].id,
|
|
8586
8768
|
/*openCategoryContainer*/
|
|
8587
|
-
ctx[
|
|
8769
|
+
ctx[18]
|
|
8588
8770
|
) && /*checkContainerDragOver*/
|
|
8589
|
-
ctx[
|
|
8771
|
+
ctx[30](
|
|
8590
8772
|
/*category*/
|
|
8591
|
-
ctx[
|
|
8773
|
+
ctx[67].id,
|
|
8592
8774
|
/*considerContainerId*/
|
|
8593
|
-
ctx[
|
|
8775
|
+
ctx[10],
|
|
8594
8776
|
/*isDraggingOver*/
|
|
8595
|
-
ctx[
|
|
8777
|
+
ctx[11]
|
|
8596
8778
|
) ? "!bg-violet-100 md:!bg-white" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8597
|
-
(ctx[
|
|
8779
|
+
(ctx[36](
|
|
8598
8780
|
/*category*/
|
|
8599
|
-
ctx[
|
|
8781
|
+
ctx[67].id,
|
|
8600
8782
|
/*openCategoryContainer*/
|
|
8601
|
-
ctx[
|
|
8783
|
+
ctx[18]
|
|
8602
8784
|
) ? "" : "rounded-b-lg md:rounded-b-none") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8603
|
-
ctx[
|
|
8785
|
+
ctx[36](
|
|
8604
8786
|
/*category*/
|
|
8605
|
-
ctx[
|
|
8787
|
+
ctx[67].id,
|
|
8606
8788
|
/*openCategoryContainer*/
|
|
8607
|
-
ctx[
|
|
8789
|
+
ctx[18]
|
|
8608
8790
|
) && /*checkSelectedSourceContainer*/
|
|
8609
|
-
ctx[
|
|
8791
|
+
ctx[32](
|
|
8610
8792
|
/*category*/
|
|
8611
|
-
ctx[
|
|
8793
|
+
ctx[67].id,
|
|
8612
8794
|
/*sourceSelectedContainerId*/
|
|
8613
|
-
ctx[
|
|
8795
|
+
ctx[14],
|
|
8614
8796
|
/*currentSelectedItemId*/
|
|
8615
|
-
ctx[
|
|
8797
|
+
ctx[13]
|
|
8616
8798
|
) ? "group-hover/itemContainer:bg-violet-100 md:group-hover/itemContainer:bg-white" : ""));
|
|
8617
8799
|
add_render_callback(() => div0_elementresize_handler.call(div0));
|
|
8618
8800
|
attr(
|
|
8619
8801
|
div1,
|
|
8620
8802
|
"aria-hidden",
|
|
8621
8803
|
/*isModalOpen*/
|
|
8622
|
-
ctx[
|
|
8804
|
+
ctx[17]
|
|
8623
8805
|
);
|
|
8624
8806
|
attr(
|
|
8625
8807
|
div1,
|
|
8626
8808
|
"tabindex",
|
|
8627
8809
|
/*categoryTabIndex*/
|
|
8628
|
-
ctx[
|
|
8810
|
+
ctx[20]
|
|
8629
8811
|
);
|
|
8630
8812
|
attr(div1, "role", "group");
|
|
8631
8813
|
attr(div1, "class", div1_class_value = "focus-ring group/itemContainer flex flex-col border border-gray-800 rounded-lg basis-0 grow relative md:h-fit md:min-h-[140px] md:items-center lg:mr-6 lg:last:mr-0 lg:min-h-[224px] " + /*checkContainerDragOver*/
|
|
8632
|
-
(ctx[
|
|
8814
|
+
(ctx[30](
|
|
8633
8815
|
/*category*/
|
|
8634
|
-
ctx[
|
|
8816
|
+
ctx[67].id,
|
|
8635
8817
|
/*considerContainerId*/
|
|
8636
|
-
ctx[
|
|
8818
|
+
ctx[10],
|
|
8637
8819
|
/*isDraggingOver*/
|
|
8638
|
-
ctx[
|
|
8820
|
+
ctx[11]
|
|
8639
8821
|
) ? "raw-focus-ring" : "") + " " + /*checkContainerDroppedItem*/
|
|
8640
|
-
(ctx[
|
|
8822
|
+
(ctx[31](
|
|
8641
8823
|
/*category*/
|
|
8642
|
-
ctx[
|
|
8824
|
+
ctx[67].id,
|
|
8643
8825
|
/*dropContainerId*/
|
|
8644
|
-
ctx[
|
|
8826
|
+
ctx[12]
|
|
8645
8827
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
8646
|
-
(ctx[
|
|
8828
|
+
(ctx[31](
|
|
8647
8829
|
/*category*/
|
|
8648
|
-
ctx[
|
|
8830
|
+
ctx[67].id,
|
|
8649
8831
|
/*dropContainerId*/
|
|
8650
|
-
ctx[
|
|
8832
|
+
ctx[12]
|
|
8651
8833
|
) && /*hasAddItemAnimation*/
|
|
8652
|
-
ctx[
|
|
8653
|
-
(ctx[
|
|
8834
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
8835
|
+
(ctx[32](
|
|
8654
8836
|
/*category*/
|
|
8655
|
-
ctx[
|
|
8837
|
+
ctx[67].id,
|
|
8656
8838
|
/*sourceSelectedContainerId*/
|
|
8657
|
-
ctx[
|
|
8839
|
+
ctx[14],
|
|
8658
8840
|
/*currentSelectedItemId*/
|
|
8659
|
-
ctx[
|
|
8841
|
+
ctx[13]
|
|
8660
8842
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8661
|
-
(ctx[
|
|
8843
|
+
(ctx[36](
|
|
8662
8844
|
/*category*/
|
|
8663
|
-
ctx[
|
|
8845
|
+
ctx[67].id,
|
|
8664
8846
|
/*openCategoryContainer*/
|
|
8665
|
-
ctx[
|
|
8847
|
+
ctx[18]
|
|
8666
8848
|
) ? "min-h-[140px]" : ""));
|
|
8667
8849
|
},
|
|
8668
8850
|
m(target, anchor) {
|
|
@@ -8698,18 +8880,18 @@
|
|
|
8698
8880
|
listen(button, "click", function() {
|
|
8699
8881
|
if (is_function(
|
|
8700
8882
|
/*addCategoryContainer*/
|
|
8701
|
-
ctx[
|
|
8883
|
+
ctx[37](
|
|
8702
8884
|
/*category*/
|
|
8703
|
-
ctx[
|
|
8885
|
+
ctx[67].id,
|
|
8704
8886
|
/*openCategoryContainer*/
|
|
8705
|
-
ctx[
|
|
8887
|
+
ctx[18]
|
|
8706
8888
|
)
|
|
8707
8889
|
))
|
|
8708
|
-
ctx[
|
|
8890
|
+
ctx[37](
|
|
8709
8891
|
/*category*/
|
|
8710
|
-
ctx[
|
|
8892
|
+
ctx[67].id,
|
|
8711
8893
|
/*openCategoryContainer*/
|
|
8712
|
-
ctx[
|
|
8894
|
+
ctx[18]
|
|
8713
8895
|
).apply(this, arguments);
|
|
8714
8896
|
}),
|
|
8715
8897
|
listen(div1, "keydown", keydown_handler),
|
|
@@ -8717,13 +8899,13 @@
|
|
|
8717
8899
|
div1,
|
|
8718
8900
|
"focus",
|
|
8719
8901
|
/*resetTabCategory*/
|
|
8720
|
-
ctx[
|
|
8902
|
+
ctx[42]
|
|
8721
8903
|
),
|
|
8722
8904
|
listen(
|
|
8723
8905
|
div1,
|
|
8724
8906
|
"blur",
|
|
8725
8907
|
/*blur_handler*/
|
|
8726
|
-
ctx[
|
|
8908
|
+
ctx[51]
|
|
8727
8909
|
)
|
|
8728
8910
|
];
|
|
8729
8911
|
mounted = true;
|
|
@@ -8732,13 +8914,13 @@
|
|
|
8732
8914
|
p(new_ctx, dirty) {
|
|
8733
8915
|
ctx = new_ctx;
|
|
8734
8916
|
if (dirty[0] & /*dropContainerId*/
|
|
8735
|
-
|
|
8917
|
+
4096)
|
|
8736
8918
|
show_if_1 = /*checkContainerDroppedItem*/
|
|
8737
|
-
ctx[
|
|
8919
|
+
ctx[31](
|
|
8738
8920
|
/*category*/
|
|
8739
|
-
ctx[
|
|
8921
|
+
ctx[67].id,
|
|
8740
8922
|
/*dropContainerId*/
|
|
8741
|
-
ctx[
|
|
8923
|
+
ctx[12]
|
|
8742
8924
|
);
|
|
8743
8925
|
if (show_if_1) {
|
|
8744
8926
|
if (if_block0) {
|
|
@@ -8753,7 +8935,7 @@
|
|
|
8753
8935
|
if_block0 = null;
|
|
8754
8936
|
}
|
|
8755
8937
|
if (!/*previewResultSr*/
|
|
8756
|
-
ctx[
|
|
8938
|
+
ctx[4]) {
|
|
8757
8939
|
if (if_block1) {
|
|
8758
8940
|
if_block1.p(ctx, dirty);
|
|
8759
8941
|
} else {
|
|
@@ -8767,7 +8949,7 @@
|
|
|
8767
8949
|
}
|
|
8768
8950
|
if (
|
|
8769
8951
|
/*previewResultSr*/
|
|
8770
|
-
ctx[
|
|
8952
|
+
ctx[4]
|
|
8771
8953
|
) {
|
|
8772
8954
|
if (if_block2) {
|
|
8773
8955
|
if_block2.p(ctx, dirty);
|
|
@@ -8781,12 +8963,12 @@
|
|
|
8781
8963
|
if_block2 = null;
|
|
8782
8964
|
}
|
|
8783
8965
|
if ((!current || dirty[0] & /*currentAnswer*/
|
|
8784
|
-
|
|
8785
|
-
ctx[
|
|
8966
|
+
8) && t9_value !== (t9_value = /*getTotalWords*/
|
|
8967
|
+
ctx[34](
|
|
8786
8968
|
/*category*/
|
|
8787
|
-
ctx[
|
|
8969
|
+
ctx[67].id,
|
|
8788
8970
|
/*currentAnswer*/
|
|
8789
|
-
ctx[
|
|
8971
|
+
ctx[3]
|
|
8790
8972
|
) + ""))
|
|
8791
8973
|
set_data(t9, t9_value);
|
|
8792
8974
|
let previous_block_index = current_block_type_index;
|
|
@@ -8807,117 +8989,117 @@
|
|
|
8807
8989
|
if_block3.m(span3, null);
|
|
8808
8990
|
}
|
|
8809
8991
|
if (!current || dirty[0] & /*currentAnswer*/
|
|
8810
|
-
|
|
8811
|
-
ctx[
|
|
8992
|
+
8 && button_aria_label_value !== (button_aria_label_value = /*getTotalWords*/
|
|
8993
|
+
ctx[34](
|
|
8812
8994
|
/*category*/
|
|
8813
|
-
ctx[
|
|
8995
|
+
ctx[67].id,
|
|
8814
8996
|
/*currentAnswer*/
|
|
8815
|
-
ctx[
|
|
8997
|
+
ctx[3]
|
|
8816
8998
|
))) {
|
|
8817
8999
|
attr(button, "aria-label", button_aria_label_value);
|
|
8818
9000
|
}
|
|
8819
9001
|
if (!current || dirty[0] & /*dropContainerId, enableAriaLive*/
|
|
8820
|
-
|
|
8821
|
-
ctx[
|
|
9002
|
+
4198400 && div0_aria_live_value !== (div0_aria_live_value = /*checkContainerDroppedItem*/
|
|
9003
|
+
ctx[31](
|
|
8822
9004
|
/*category*/
|
|
8823
|
-
ctx[
|
|
9005
|
+
ctx[67].id,
|
|
8824
9006
|
/*dropContainerId*/
|
|
8825
|
-
ctx[
|
|
9007
|
+
ctx[12]
|
|
8826
9008
|
) && /*enableAriaLive*/
|
|
8827
|
-
ctx[
|
|
9009
|
+
ctx[22] ? "polite" : "off")) {
|
|
8828
9010
|
attr(div0, "aria-live", div0_aria_live_value);
|
|
8829
9011
|
}
|
|
8830
9012
|
if (!current || dirty[0] & /*dropContainerId, openCategoryContainer, considerContainerId, isDraggingOver, sourceSelectedContainerId, currentSelectedItemId*/
|
|
8831
|
-
|
|
8832
|
-
(ctx[
|
|
9013
|
+
293888 && div0_class_value !== (div0_class_value = "absolute flex items-center justify-between border-b border-gray-800 w-full rounded-t-lg p-3 md:p-4 md:justify-center " + /*checkContainerDroppedItem*/
|
|
9014
|
+
(ctx[31](
|
|
8833
9015
|
/*category*/
|
|
8834
|
-
ctx[
|
|
9016
|
+
ctx[67].id,
|
|
8835
9017
|
/*dropContainerId*/
|
|
8836
|
-
ctx[
|
|
9018
|
+
ctx[12]
|
|
8837
9019
|
) ? "bg-tranparent" : "bg-white") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8838
|
-
ctx[
|
|
9020
|
+
ctx[36](
|
|
8839
9021
|
/*category*/
|
|
8840
|
-
ctx[
|
|
9022
|
+
ctx[67].id,
|
|
8841
9023
|
/*openCategoryContainer*/
|
|
8842
|
-
ctx[
|
|
9024
|
+
ctx[18]
|
|
8843
9025
|
) && /*checkContainerDragOver*/
|
|
8844
|
-
ctx[
|
|
9026
|
+
ctx[30](
|
|
8845
9027
|
/*category*/
|
|
8846
|
-
ctx[
|
|
9028
|
+
ctx[67].id,
|
|
8847
9029
|
/*considerContainerId*/
|
|
8848
|
-
ctx[
|
|
9030
|
+
ctx[10],
|
|
8849
9031
|
/*isDraggingOver*/
|
|
8850
|
-
ctx[
|
|
9032
|
+
ctx[11]
|
|
8851
9033
|
) ? "!bg-violet-100 md:!bg-white" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8852
|
-
(ctx[
|
|
9034
|
+
(ctx[36](
|
|
8853
9035
|
/*category*/
|
|
8854
|
-
ctx[
|
|
9036
|
+
ctx[67].id,
|
|
8855
9037
|
/*openCategoryContainer*/
|
|
8856
|
-
ctx[
|
|
9038
|
+
ctx[18]
|
|
8857
9039
|
) ? "" : "rounded-b-lg md:rounded-b-none") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8858
|
-
ctx[
|
|
9040
|
+
ctx[36](
|
|
8859
9041
|
/*category*/
|
|
8860
|
-
ctx[
|
|
9042
|
+
ctx[67].id,
|
|
8861
9043
|
/*openCategoryContainer*/
|
|
8862
|
-
ctx[
|
|
9044
|
+
ctx[18]
|
|
8863
9045
|
) && /*checkSelectedSourceContainer*/
|
|
8864
|
-
ctx[
|
|
9046
|
+
ctx[32](
|
|
8865
9047
|
/*category*/
|
|
8866
|
-
ctx[
|
|
9048
|
+
ctx[67].id,
|
|
8867
9049
|
/*sourceSelectedContainerId*/
|
|
8868
|
-
ctx[
|
|
9050
|
+
ctx[14],
|
|
8869
9051
|
/*currentSelectedItemId*/
|
|
8870
|
-
ctx[
|
|
9052
|
+
ctx[13]
|
|
8871
9053
|
) ? "group-hover/itemContainer:bg-violet-100 md:group-hover/itemContainer:bg-white" : ""))) {
|
|
8872
9054
|
attr(div0, "class", div0_class_value);
|
|
8873
9055
|
}
|
|
8874
9056
|
const promptcategorisedndcontainer_changes = {};
|
|
8875
9057
|
if (dirty[0] & /*considerContainerId, isDraggingOver, openCategoryContainer*/
|
|
8876
|
-
|
|
9058
|
+
265216)
|
|
8877
9059
|
promptcategorisedndcontainer_changes.containerClass = "content-start !outline-none rounded-lg grow w-full md:p-4\n " + /*checkContainerDragOver*/
|
|
8878
|
-
(ctx[
|
|
9060
|
+
(ctx[30](
|
|
8879
9061
|
/*category*/
|
|
8880
|
-
ctx[
|
|
9062
|
+
ctx[67].id,
|
|
8881
9063
|
/*considerContainerId*/
|
|
8882
|
-
ctx[
|
|
9064
|
+
ctx[10],
|
|
8883
9065
|
/*isDraggingOver*/
|
|
8884
|
-
ctx[
|
|
9066
|
+
ctx[11]
|
|
8885
9067
|
) ? "bg-violet-100" : "") + "\n " + /*checkifCategoryContainerOpen*/
|
|
8886
|
-
(ctx[
|
|
9068
|
+
(ctx[36](
|
|
8887
9069
|
/*category*/
|
|
8888
|
-
ctx[
|
|
9070
|
+
ctx[67].id,
|
|
8889
9071
|
/*openCategoryContainer*/
|
|
8890
|
-
ctx[
|
|
9072
|
+
ctx[18]
|
|
8891
9073
|
) ? "h-full p-3 min-h-[86px] md:min-h-0" : "");
|
|
8892
9074
|
if (dirty[0] & /*openCategoryContainer, categoryTitleHeight*/
|
|
8893
|
-
|
|
9075
|
+
8650752)
|
|
8894
9076
|
promptcategorisedndcontainer_changes.paddingTop = /*checkifCategoryContainerOpen*/
|
|
8895
|
-
ctx[
|
|
9077
|
+
ctx[36](
|
|
8896
9078
|
/*category*/
|
|
8897
|
-
ctx[
|
|
9079
|
+
ctx[67].id,
|
|
8898
9080
|
/*openCategoryContainer*/
|
|
8899
|
-
ctx[
|
|
9081
|
+
ctx[18]
|
|
8900
9082
|
) || !useIsSmallScreen() ? (
|
|
8901
9083
|
/*categoryTitleHeight*/
|
|
8902
|
-
ctx[
|
|
9084
|
+
ctx[23][
|
|
8903
9085
|
/*category*/
|
|
8904
|
-
ctx[
|
|
9086
|
+
ctx[67].id
|
|
8905
9087
|
] + 16
|
|
8906
9088
|
) : (
|
|
8907
9089
|
/*categoryTitleHeight*/
|
|
8908
|
-
ctx[
|
|
9090
|
+
ctx[23][
|
|
8909
9091
|
/*category*/
|
|
8910
|
-
ctx[
|
|
9092
|
+
ctx[67].id
|
|
8911
9093
|
]
|
|
8912
9094
|
);
|
|
8913
9095
|
if (dirty[0] & /*openCategoryContainer*/
|
|
8914
|
-
|
|
9096
|
+
262144)
|
|
8915
9097
|
promptcategorisedndcontainer_changes.showButton = /*checkifCategoryContainerOpen*/
|
|
8916
|
-
ctx[
|
|
9098
|
+
ctx[36](
|
|
8917
9099
|
/*category*/
|
|
8918
|
-
ctx[
|
|
9100
|
+
ctx[67].id,
|
|
8919
9101
|
/*openCategoryContainer*/
|
|
8920
|
-
ctx[
|
|
9102
|
+
ctx[18]
|
|
8921
9103
|
);
|
|
8922
9104
|
if (dirty[0] & /*isFinished*/
|
|
8923
9105
|
1)
|
|
@@ -8927,69 +9109,73 @@
|
|
|
8927
9109
|
2)
|
|
8928
9110
|
promptcategorisedndcontainer_changes.isPreviewModeInteractive = /*isPreviewModeInteractive*/
|
|
8929
9111
|
ctx[1];
|
|
9112
|
+
if (dirty[0] & /*categoriseSettingsData*/
|
|
9113
|
+
64)
|
|
9114
|
+
promptcategorisedndcontainer_changes.categoryData = /*categoriseSettingsData*/
|
|
9115
|
+
ctx[6];
|
|
8930
9116
|
promptcategorisedndcontainer.$set(promptcategorisedndcontainer_changes);
|
|
8931
9117
|
if (!current || dirty[0] & /*isModalOpen*/
|
|
8932
|
-
|
|
9118
|
+
131072) {
|
|
8933
9119
|
attr(
|
|
8934
9120
|
div1,
|
|
8935
9121
|
"aria-hidden",
|
|
8936
9122
|
/*isModalOpen*/
|
|
8937
|
-
ctx[
|
|
9123
|
+
ctx[17]
|
|
8938
9124
|
);
|
|
8939
9125
|
}
|
|
8940
9126
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
8941
|
-
|
|
9127
|
+
1048576) {
|
|
8942
9128
|
attr(
|
|
8943
9129
|
div1,
|
|
8944
9130
|
"tabindex",
|
|
8945
9131
|
/*categoryTabIndex*/
|
|
8946
|
-
ctx[
|
|
9132
|
+
ctx[20]
|
|
8947
9133
|
);
|
|
8948
9134
|
}
|
|
8949
9135
|
if (!current || dirty[0] & /*considerContainerId, isDraggingOver, dropContainerId, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId, openCategoryContainer*/
|
|
8950
|
-
|
|
8951
|
-
(ctx[
|
|
9136
|
+
359424 && div1_class_value !== (div1_class_value = "focus-ring group/itemContainer flex flex-col border border-gray-800 rounded-lg basis-0 grow relative md:h-fit md:min-h-[140px] md:items-center lg:mr-6 lg:last:mr-0 lg:min-h-[224px] " + /*checkContainerDragOver*/
|
|
9137
|
+
(ctx[30](
|
|
8952
9138
|
/*category*/
|
|
8953
|
-
ctx[
|
|
9139
|
+
ctx[67].id,
|
|
8954
9140
|
/*considerContainerId*/
|
|
8955
|
-
ctx[
|
|
9141
|
+
ctx[10],
|
|
8956
9142
|
/*isDraggingOver*/
|
|
8957
|
-
ctx[
|
|
9143
|
+
ctx[11]
|
|
8958
9144
|
) ? "raw-focus-ring" : "") + " " + /*checkContainerDroppedItem*/
|
|
8959
|
-
(ctx[
|
|
9145
|
+
(ctx[31](
|
|
8960
9146
|
/*category*/
|
|
8961
|
-
ctx[
|
|
9147
|
+
ctx[67].id,
|
|
8962
9148
|
/*dropContainerId*/
|
|
8963
|
-
ctx[
|
|
9149
|
+
ctx[12]
|
|
8964
9150
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
8965
|
-
(ctx[
|
|
9151
|
+
(ctx[31](
|
|
8966
9152
|
/*category*/
|
|
8967
|
-
ctx[
|
|
9153
|
+
ctx[67].id,
|
|
8968
9154
|
/*dropContainerId*/
|
|
8969
|
-
ctx[
|
|
9155
|
+
ctx[12]
|
|
8970
9156
|
) && /*hasAddItemAnimation*/
|
|
8971
|
-
ctx[
|
|
8972
|
-
(ctx[
|
|
9157
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
9158
|
+
(ctx[32](
|
|
8973
9159
|
/*category*/
|
|
8974
|
-
ctx[
|
|
9160
|
+
ctx[67].id,
|
|
8975
9161
|
/*sourceSelectedContainerId*/
|
|
8976
|
-
ctx[
|
|
9162
|
+
ctx[14],
|
|
8977
9163
|
/*currentSelectedItemId*/
|
|
8978
|
-
ctx[
|
|
9164
|
+
ctx[13]
|
|
8979
9165
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8980
|
-
(ctx[
|
|
9166
|
+
(ctx[36](
|
|
8981
9167
|
/*category*/
|
|
8982
|
-
ctx[
|
|
9168
|
+
ctx[67].id,
|
|
8983
9169
|
/*openCategoryContainer*/
|
|
8984
|
-
ctx[
|
|
9170
|
+
ctx[18]
|
|
8985
9171
|
) ? "min-h-[140px]" : ""))) {
|
|
8986
9172
|
attr(div1, "class", div1_class_value);
|
|
8987
9173
|
}
|
|
8988
9174
|
if (category !== /*category*/
|
|
8989
|
-
ctx[
|
|
9175
|
+
ctx[67]) {
|
|
8990
9176
|
unassign_div1();
|
|
8991
9177
|
category = /*category*/
|
|
8992
|
-
ctx[
|
|
9178
|
+
ctx[67];
|
|
8993
9179
|
assign_div1();
|
|
8994
9180
|
}
|
|
8995
9181
|
},
|
|
@@ -9035,7 +9221,7 @@
|
|
|
9035
9221
|
t0 = text("Option ");
|
|
9036
9222
|
t1 = text(
|
|
9037
9223
|
/*selectedItemName*/
|
|
9038
|
-
ctx[
|
|
9224
|
+
ctx[21]
|
|
9039
9225
|
);
|
|
9040
9226
|
t2 = text(" added in:\xA0");
|
|
9041
9227
|
attr(span, "class", "sr-only");
|
|
@@ -9048,11 +9234,11 @@
|
|
|
9048
9234
|
},
|
|
9049
9235
|
p(ctx2, dirty) {
|
|
9050
9236
|
if (dirty[0] & /*selectedItemName*/
|
|
9051
|
-
|
|
9237
|
+
2097152)
|
|
9052
9238
|
set_data(
|
|
9053
9239
|
t1,
|
|
9054
9240
|
/*selectedItemName*/
|
|
9055
|
-
ctx2[
|
|
9241
|
+
ctx2[21]
|
|
9056
9242
|
);
|
|
9057
9243
|
},
|
|
9058
9244
|
d(detaching) {
|
|
@@ -9080,10 +9266,10 @@
|
|
|
9080
9266
|
let div2;
|
|
9081
9267
|
let show_if = (
|
|
9082
9268
|
/*checkContainerDroppedItem*/
|
|
9083
|
-
ctx[
|
|
9269
|
+
ctx[31](
|
|
9084
9270
|
CONTAINER_WORD_BIN_ID,
|
|
9085
9271
|
/*dropContainerId*/
|
|
9086
|
-
ctx[
|
|
9272
|
+
ctx[12]
|
|
9087
9273
|
)
|
|
9088
9274
|
);
|
|
9089
9275
|
let t8;
|
|
@@ -9117,17 +9303,17 @@
|
|
|
9117
9303
|
arrowdowncircle = new ArrowDownCircle_default({});
|
|
9118
9304
|
let if_block0 = (
|
|
9119
9305
|
/*isModalOpen*/
|
|
9120
|
-
ctx[
|
|
9306
|
+
ctx[17] && create_if_block_6(ctx)
|
|
9121
9307
|
);
|
|
9122
9308
|
let if_block1 = (
|
|
9123
9309
|
/*totalRemainingWordBinItem*/
|
|
9124
|
-
ctx[
|
|
9125
|
-
ctx[
|
|
9310
|
+
ctx[15] !== /*totalCategoryItems*/
|
|
9311
|
+
ctx[9] && !/*isFinished*/
|
|
9126
9312
|
ctx[0] && create_if_block_5(ctx)
|
|
9127
9313
|
);
|
|
9128
9314
|
let each_value = ensure_array_like(Object.values(
|
|
9129
9315
|
/*categoryGroups*/
|
|
9130
|
-
ctx[
|
|
9316
|
+
ctx[29]
|
|
9131
9317
|
));
|
|
9132
9318
|
let each_blocks = [];
|
|
9133
9319
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -9141,14 +9327,14 @@
|
|
|
9141
9327
|
promptcategorisedndcontainer = new PromptCategoriseDndContainer_default({
|
|
9142
9328
|
props: {
|
|
9143
9329
|
containerClass: "bg-transparent p-4 pt-[55px] grow md:grow-0 md:pt-20.5 justify-center md:justify-normal\n " + /*isWordBInTotalZero*/
|
|
9144
|
-
(ctx[
|
|
9330
|
+
(ctx[38](
|
|
9145
9331
|
/*totalRemainingWordBinItem*/
|
|
9146
|
-
ctx[
|
|
9332
|
+
ctx[15]
|
|
9147
9333
|
) && !/*currentSelectedItemId*/
|
|
9148
|
-
ctx[
|
|
9334
|
+
ctx[13] ? "absolute inset-0" : ""),
|
|
9149
9335
|
items: (
|
|
9150
9336
|
/*categoryItems*/
|
|
9151
|
-
ctx[
|
|
9337
|
+
ctx[28]
|
|
9152
9338
|
),
|
|
9153
9339
|
containerId: CONTAINER_WORD_BIN_ID,
|
|
9154
9340
|
ariaLabel: "Word bin",
|
|
@@ -9158,18 +9344,31 @@
|
|
|
9158
9344
|
),
|
|
9159
9345
|
correctAnswerList: (
|
|
9160
9346
|
/*scoringMetadata*/
|
|
9161
|
-
ctx[
|
|
9347
|
+
ctx[26]
|
|
9162
9348
|
),
|
|
9163
9349
|
isPreviewModeInteractive: (
|
|
9164
9350
|
/*isPreviewModeInteractive*/
|
|
9165
9351
|
ctx[1]
|
|
9352
|
+
),
|
|
9353
|
+
categoryData: (
|
|
9354
|
+
/*categoriseSettingsData*/
|
|
9355
|
+
ctx[6]
|
|
9356
|
+
),
|
|
9357
|
+
type: (
|
|
9358
|
+
/*categoryDndType*/
|
|
9359
|
+
ctx[24]
|
|
9166
9360
|
)
|
|
9167
9361
|
}
|
|
9168
9362
|
});
|
|
9363
|
+
promptcategorisedndcontainer.$on(
|
|
9364
|
+
"updateCategorySettings",
|
|
9365
|
+
/*updateCategory*/
|
|
9366
|
+
ctx[40]
|
|
9367
|
+
);
|
|
9169
9368
|
promptcategorisedndcontainer.$on(
|
|
9170
9369
|
"saveCategory",
|
|
9171
9370
|
/*saveCategory*/
|
|
9172
|
-
ctx[
|
|
9371
|
+
ctx[39]
|
|
9173
9372
|
);
|
|
9174
9373
|
smallchevronright = new SmallChevronRight_default({});
|
|
9175
9374
|
return {
|
|
@@ -9207,12 +9406,12 @@
|
|
|
9207
9406
|
span3 = element("span");
|
|
9208
9407
|
t11 = text(
|
|
9209
9408
|
/*totalRemainingWordBinItem*/
|
|
9210
|
-
ctx[
|
|
9409
|
+
ctx[15]
|
|
9211
9410
|
);
|
|
9212
9411
|
t12 = text(" out of ");
|
|
9213
9412
|
t13 = text(
|
|
9214
9413
|
/*totalCategoryItems*/
|
|
9215
|
-
ctx[
|
|
9414
|
+
ctx[9]
|
|
9216
9415
|
);
|
|
9217
9416
|
t14 = text(" left");
|
|
9218
9417
|
t15 = space();
|
|
@@ -9232,7 +9431,7 @@
|
|
|
9232
9431
|
button0,
|
|
9233
9432
|
"tabindex",
|
|
9234
9433
|
/*categoryTabIndex*/
|
|
9235
|
-
ctx[
|
|
9434
|
+
ctx[20]
|
|
9236
9435
|
);
|
|
9237
9436
|
attr(button0, "aria-label", "Skip to word bin");
|
|
9238
9437
|
attr(button0, "class", "flex items-center text-charcoal border-l-6 border-charcoal bg-yellow-1000 py-1.5 pr-3 pl-4 focus-visible:border-charcoal left-[-9999px] z-0 focus-within:left-0 focus-within:right-0 focus-within:top-0 absolute focus-within:z-30 focus-visible:outline-none");
|
|
@@ -9242,7 +9441,7 @@
|
|
|
9242
9441
|
div0,
|
|
9243
9442
|
"aria-hidden",
|
|
9244
9443
|
/*isModalOpen*/
|
|
9245
|
-
ctx[
|
|
9444
|
+
ctx[17]
|
|
9246
9445
|
);
|
|
9247
9446
|
attr(div1, "class", "mb-5 grid gap-2 grid-cols-1 md:grid-cols-2 md:gap-6 lg:flex lg:gap-0");
|
|
9248
9447
|
attr(span2, "class", "text-base leading-5 !text-gray-900 font-semibold md:mb-2 md:item-heading");
|
|
@@ -9251,67 +9450,67 @@
|
|
|
9251
9450
|
attr(span4, "class", "w-6 h-6 text-inherit flex items-center justify-center");
|
|
9252
9451
|
attr(button1, "aria-label", "Left");
|
|
9253
9452
|
attr(button1, "class", button1_class_value = "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 " + /*isWordBInTotalZero*/
|
|
9254
|
-
(ctx[
|
|
9453
|
+
(ctx[38](
|
|
9255
9454
|
/*totalRemainingWordBinItem*/
|
|
9256
|
-
ctx[
|
|
9455
|
+
ctx[15]
|
|
9257
9456
|
) ? "hidden" : ""));
|
|
9258
9457
|
button1.disabled = button1_disabled_value = /*currentWordBinIndex*/
|
|
9259
|
-
ctx[
|
|
9458
|
+
ctx[19] === 0;
|
|
9260
9459
|
attr(span5, "class", "w-6 h-6 text-inherit flex items-center justify-center ml-[3px]");
|
|
9261
9460
|
attr(button2, "aria-label", "Right");
|
|
9262
9461
|
attr(button2, "class", button2_class_value = "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 " + /*isWordBInTotalZero*/
|
|
9263
|
-
(ctx[
|
|
9462
|
+
(ctx[38](
|
|
9264
9463
|
/*totalRemainingWordBinItem*/
|
|
9265
|
-
ctx[
|
|
9464
|
+
ctx[15]
|
|
9266
9465
|
) ? "hidden" : ""));
|
|
9267
9466
|
button2.disabled = button2_disabled_value = /*currentWordBinIndex*/
|
|
9268
|
-
ctx[
|
|
9269
|
-
ctx[
|
|
9467
|
+
ctx[19] === /*totalRemainingWordBinItem*/
|
|
9468
|
+
ctx[15] - 1;
|
|
9270
9469
|
attr(div3, "class", "flex items-center justify-between px-4 min-h-[133px] md:min-h-0 md:block md:px-0 md:justify-normal");
|
|
9271
9470
|
attr(
|
|
9272
9471
|
div4,
|
|
9273
9472
|
"aria-hidden",
|
|
9274
9473
|
/*isModalOpen*/
|
|
9275
|
-
ctx[
|
|
9474
|
+
ctx[17]
|
|
9276
9475
|
);
|
|
9277
9476
|
attr(
|
|
9278
9477
|
div4,
|
|
9279
9478
|
"tabindex",
|
|
9280
9479
|
/*categoryTabIndex*/
|
|
9281
|
-
ctx[
|
|
9480
|
+
ctx[20]
|
|
9282
9481
|
);
|
|
9283
9482
|
attr(div4, "aria-live", div4_aria_live_value = /*checkContainerDroppedItem*/
|
|
9284
|
-
ctx[
|
|
9483
|
+
ctx[31](
|
|
9285
9484
|
CONTAINER_WORD_BIN_ID,
|
|
9286
9485
|
/*dropContainerId*/
|
|
9287
|
-
ctx[
|
|
9486
|
+
ctx[12]
|
|
9288
9487
|
) ? "polite" : "off");
|
|
9289
9488
|
attr(div4, "role", "group");
|
|
9290
9489
|
attr(div4, "class", div4_class_value = "focus-ring shadow-[0_-12px_14px_-16px_#00000033] rounded-lg relative min-h-[133px] md:min-h-[164px] md:border md:shadow-[0_0_#0000] md:border-gray-400 " + /*checkContainerDragOver*/
|
|
9291
|
-
(ctx[
|
|
9490
|
+
(ctx[30](
|
|
9292
9491
|
CONTAINER_WORD_BIN_ID,
|
|
9293
9492
|
/*considerContainerId*/
|
|
9294
|
-
ctx[
|
|
9493
|
+
ctx[10],
|
|
9295
9494
|
/*isDraggingOver*/
|
|
9296
|
-
ctx[
|
|
9495
|
+
ctx[11]
|
|
9297
9496
|
) ? "raw-focus-ring bg-violet-100" : "") + " " + /*checkContainerDroppedItem*/
|
|
9298
|
-
(ctx[
|
|
9497
|
+
(ctx[31](
|
|
9299
9498
|
CONTAINER_WORD_BIN_ID,
|
|
9300
9499
|
/*dropContainerId*/
|
|
9301
|
-
ctx[
|
|
9500
|
+
ctx[12]
|
|
9302
9501
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
9303
|
-
(ctx[
|
|
9502
|
+
(ctx[31](
|
|
9304
9503
|
CONTAINER_WORD_BIN_ID,
|
|
9305
9504
|
/*dropContainerId*/
|
|
9306
|
-
ctx[
|
|
9505
|
+
ctx[12]
|
|
9307
9506
|
) && /*hasAddItemAnimation*/
|
|
9308
|
-
ctx[
|
|
9309
|
-
(ctx[
|
|
9507
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
9508
|
+
(ctx[32](
|
|
9310
9509
|
CONTAINER_WORD_BIN_ID,
|
|
9311
9510
|
/*sourceSelectedContainerId*/
|
|
9312
|
-
ctx[
|
|
9511
|
+
ctx[14],
|
|
9313
9512
|
/*currentSelectedItemId*/
|
|
9314
|
-
ctx[
|
|
9513
|
+
ctx[13]
|
|
9315
9514
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : ""));
|
|
9316
9515
|
},
|
|
9317
9516
|
m(target, anchor) {
|
|
@@ -9360,7 +9559,7 @@
|
|
|
9360
9559
|
append(div3, button2);
|
|
9361
9560
|
append(button2, span5);
|
|
9362
9561
|
mount_component(smallchevronright, span5, null);
|
|
9363
|
-
ctx[
|
|
9562
|
+
ctx[55](div4);
|
|
9364
9563
|
current = true;
|
|
9365
9564
|
if (!mounted) {
|
|
9366
9565
|
dispose = [
|
|
@@ -9368,37 +9567,43 @@
|
|
|
9368
9567
|
button0,
|
|
9369
9568
|
"keypress",
|
|
9370
9569
|
/*goToWordBin*/
|
|
9371
|
-
ctx[
|
|
9570
|
+
ctx[43]
|
|
9372
9571
|
),
|
|
9373
9572
|
listen(button1, "click", function() {
|
|
9374
|
-
if (is_function(
|
|
9375
|
-
/*
|
|
9376
|
-
ctx[
|
|
9377
|
-
/*currentAnswer*/
|
|
9378
|
-
ctx[9],
|
|
9379
|
-
"left"
|
|
9380
|
-
)))
|
|
9381
|
-
useNavigateItem(
|
|
9573
|
+
if (is_function(
|
|
9574
|
+
/*navigateCategoryItem*/
|
|
9575
|
+
ctx[45](
|
|
9382
9576
|
/*currentWordBinIndex*/
|
|
9383
|
-
ctx[
|
|
9577
|
+
ctx[19],
|
|
9384
9578
|
/*currentAnswer*/
|
|
9385
|
-
ctx[
|
|
9579
|
+
ctx[3],
|
|
9580
|
+
"left"
|
|
9581
|
+
)
|
|
9582
|
+
))
|
|
9583
|
+
ctx[45](
|
|
9584
|
+
/*currentWordBinIndex*/
|
|
9585
|
+
ctx[19],
|
|
9586
|
+
/*currentAnswer*/
|
|
9587
|
+
ctx[3],
|
|
9386
9588
|
"left"
|
|
9387
9589
|
).apply(this, arguments);
|
|
9388
9590
|
}),
|
|
9389
9591
|
listen(button2, "click", function() {
|
|
9390
|
-
if (is_function(
|
|
9391
|
-
/*
|
|
9392
|
-
ctx[
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9592
|
+
if (is_function(
|
|
9593
|
+
/*navigateCategoryItem*/
|
|
9594
|
+
ctx[45](
|
|
9595
|
+
/*currentWordBinIndex*/
|
|
9596
|
+
ctx[19],
|
|
9597
|
+
/*currentAnswer*/
|
|
9598
|
+
ctx[3],
|
|
9599
|
+
"right"
|
|
9600
|
+
)
|
|
9601
|
+
))
|
|
9602
|
+
ctx[45](
|
|
9398
9603
|
/*currentWordBinIndex*/
|
|
9399
|
-
ctx[
|
|
9604
|
+
ctx[19],
|
|
9400
9605
|
/*currentAnswer*/
|
|
9401
|
-
ctx[
|
|
9606
|
+
ctx[3],
|
|
9402
9607
|
"right"
|
|
9403
9608
|
).apply(this, arguments);
|
|
9404
9609
|
}),
|
|
@@ -9406,19 +9611,19 @@
|
|
|
9406
9611
|
div4,
|
|
9407
9612
|
"keydown",
|
|
9408
9613
|
/*keydown_handler_1*/
|
|
9409
|
-
ctx[
|
|
9614
|
+
ctx[53]
|
|
9410
9615
|
),
|
|
9411
9616
|
listen(
|
|
9412
9617
|
div4,
|
|
9413
9618
|
"focus",
|
|
9414
9619
|
/*resetTabCategory*/
|
|
9415
|
-
ctx[
|
|
9620
|
+
ctx[42]
|
|
9416
9621
|
),
|
|
9417
9622
|
listen(
|
|
9418
9623
|
div4,
|
|
9419
9624
|
"blur",
|
|
9420
9625
|
/*blur_handler_1*/
|
|
9421
|
-
ctx[
|
|
9626
|
+
ctx[54]
|
|
9422
9627
|
)
|
|
9423
9628
|
];
|
|
9424
9629
|
mounted = true;
|
|
@@ -9427,22 +9632,22 @@
|
|
|
9427
9632
|
p(new_ctx, dirty) {
|
|
9428
9633
|
ctx = new_ctx;
|
|
9429
9634
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
9430
|
-
|
|
9635
|
+
1048576) {
|
|
9431
9636
|
attr(
|
|
9432
9637
|
button0,
|
|
9433
9638
|
"tabindex",
|
|
9434
9639
|
/*categoryTabIndex*/
|
|
9435
|
-
ctx[
|
|
9640
|
+
ctx[20]
|
|
9436
9641
|
);
|
|
9437
9642
|
}
|
|
9438
9643
|
if (
|
|
9439
9644
|
/*isModalOpen*/
|
|
9440
|
-
ctx[
|
|
9645
|
+
ctx[17]
|
|
9441
9646
|
) {
|
|
9442
9647
|
if (if_block0) {
|
|
9443
9648
|
if_block0.p(ctx, dirty);
|
|
9444
9649
|
if (dirty[0] & /*isModalOpen*/
|
|
9445
|
-
|
|
9650
|
+
131072) {
|
|
9446
9651
|
transition_in(if_block0, 1);
|
|
9447
9652
|
}
|
|
9448
9653
|
} else {
|
|
@@ -9460,14 +9665,14 @@
|
|
|
9460
9665
|
}
|
|
9461
9666
|
if (
|
|
9462
9667
|
/*totalRemainingWordBinItem*/
|
|
9463
|
-
ctx[
|
|
9464
|
-
ctx[
|
|
9668
|
+
ctx[15] !== /*totalCategoryItems*/
|
|
9669
|
+
ctx[9] && !/*isFinished*/
|
|
9465
9670
|
ctx[0]
|
|
9466
9671
|
) {
|
|
9467
9672
|
if (if_block1) {
|
|
9468
9673
|
if_block1.p(ctx, dirty);
|
|
9469
9674
|
if (dirty[0] & /*totalRemainingWordBinItem, totalCategoryItems, isFinished*/
|
|
9470
|
-
|
|
9675
|
+
33281) {
|
|
9471
9676
|
transition_in(if_block1, 1);
|
|
9472
9677
|
}
|
|
9473
9678
|
} else {
|
|
@@ -9484,20 +9689,20 @@
|
|
|
9484
9689
|
check_outros();
|
|
9485
9690
|
}
|
|
9486
9691
|
if (!current || dirty[0] & /*isModalOpen*/
|
|
9487
|
-
|
|
9692
|
+
131072) {
|
|
9488
9693
|
attr(
|
|
9489
9694
|
div0,
|
|
9490
9695
|
"aria-hidden",
|
|
9491
9696
|
/*isModalOpen*/
|
|
9492
|
-
ctx[
|
|
9697
|
+
ctx[17]
|
|
9493
9698
|
);
|
|
9494
9699
|
}
|
|
9495
|
-
if (dirty[0] & /*isModalOpen, categoryTabIndex, checkContainerDragOver, categoryGroups, considerContainerId, isDraggingOver,
|
|
9496
|
-
|
|
9497
|
-
|
|
9700
|
+
if (dirty[0] & /*isModalOpen, categoryTabIndex, checkContainerDragOver, categoryGroups, considerContainerId, isDraggingOver, dropContainerId, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId, openCategoryContainer, tabCategory, categoryTitleHeight, isFinished, scoringMetadata, isPreviewModeInteractive, categoriseSettingsData, categoryDndType, enableAriaLive, currentAnswer, previewResultSr, selectedItemName, totalCategoryWords*/
|
|
9701
|
+
1710718331 | dirty[1] & /*checkContainerDroppedItem, checkSelectedSourceContainer, checkifCategoryContainerOpen, getContainerTabSelected, resetTabCategory, handleItemAriaHidden, updateCategory, saveCategory, getTotalWords, addCategoryContainer, getTotalWordsLabel*/
|
|
9702
|
+
12155) {
|
|
9498
9703
|
each_value = ensure_array_like(Object.values(
|
|
9499
9704
|
/*categoryGroups*/
|
|
9500
|
-
ctx[
|
|
9705
|
+
ctx[29]
|
|
9501
9706
|
));
|
|
9502
9707
|
let i;
|
|
9503
9708
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -9519,12 +9724,12 @@
|
|
|
9519
9724
|
check_outros();
|
|
9520
9725
|
}
|
|
9521
9726
|
if (dirty[0] & /*dropContainerId*/
|
|
9522
|
-
|
|
9727
|
+
4096)
|
|
9523
9728
|
show_if = /*checkContainerDroppedItem*/
|
|
9524
|
-
ctx[
|
|
9729
|
+
ctx[31](
|
|
9525
9730
|
CONTAINER_WORD_BIN_ID,
|
|
9526
9731
|
/*dropContainerId*/
|
|
9527
|
-
ctx[
|
|
9732
|
+
ctx[12]
|
|
9528
9733
|
);
|
|
9529
9734
|
if (show_if) {
|
|
9530
9735
|
if (if_block2) {
|
|
@@ -9539,41 +9744,41 @@
|
|
|
9539
9744
|
if_block2 = null;
|
|
9540
9745
|
}
|
|
9541
9746
|
if (!current || dirty[0] & /*totalRemainingWordBinItem*/
|
|
9542
|
-
|
|
9747
|
+
32768)
|
|
9543
9748
|
set_data(
|
|
9544
9749
|
t11,
|
|
9545
9750
|
/*totalRemainingWordBinItem*/
|
|
9546
|
-
ctx[
|
|
9751
|
+
ctx[15]
|
|
9547
9752
|
);
|
|
9548
9753
|
if (!current || dirty[0] & /*totalCategoryItems*/
|
|
9549
|
-
|
|
9754
|
+
512)
|
|
9550
9755
|
set_data(
|
|
9551
9756
|
t13,
|
|
9552
9757
|
/*totalCategoryItems*/
|
|
9553
|
-
ctx[
|
|
9758
|
+
ctx[9]
|
|
9554
9759
|
);
|
|
9555
9760
|
if (!current || dirty[0] & /*totalRemainingWordBinItem*/
|
|
9556
|
-
|
|
9557
|
-
(ctx[
|
|
9761
|
+
32768 && button1_class_value !== (button1_class_value = "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 " + /*isWordBInTotalZero*/
|
|
9762
|
+
(ctx[38](
|
|
9558
9763
|
/*totalRemainingWordBinItem*/
|
|
9559
|
-
ctx[
|
|
9764
|
+
ctx[15]
|
|
9560
9765
|
) ? "hidden" : ""))) {
|
|
9561
9766
|
attr(button1, "class", button1_class_value);
|
|
9562
9767
|
}
|
|
9563
9768
|
if (!current || dirty[0] & /*currentWordBinIndex*/
|
|
9564
|
-
|
|
9565
|
-
ctx[
|
|
9769
|
+
524288 && button1_disabled_value !== (button1_disabled_value = /*currentWordBinIndex*/
|
|
9770
|
+
ctx[19] === 0)) {
|
|
9566
9771
|
button1.disabled = button1_disabled_value;
|
|
9567
9772
|
}
|
|
9568
9773
|
const promptcategorisedndcontainer_changes = {};
|
|
9569
9774
|
if (dirty[0] & /*totalRemainingWordBinItem, currentSelectedItemId*/
|
|
9570
|
-
|
|
9775
|
+
40960)
|
|
9571
9776
|
promptcategorisedndcontainer_changes.containerClass = "bg-transparent p-4 pt-[55px] grow md:grow-0 md:pt-20.5 justify-center md:justify-normal\n " + /*isWordBInTotalZero*/
|
|
9572
|
-
(ctx[
|
|
9777
|
+
(ctx[38](
|
|
9573
9778
|
/*totalRemainingWordBinItem*/
|
|
9574
|
-
ctx[
|
|
9779
|
+
ctx[15]
|
|
9575
9780
|
) && !/*currentSelectedItemId*/
|
|
9576
|
-
ctx[
|
|
9781
|
+
ctx[13] ? "absolute inset-0" : "");
|
|
9577
9782
|
if (dirty[0] & /*isFinished*/
|
|
9578
9783
|
1)
|
|
9579
9784
|
promptcategorisedndcontainer_changes.isFinished = /*isFinished*/
|
|
@@ -9582,74 +9787,78 @@
|
|
|
9582
9787
|
2)
|
|
9583
9788
|
promptcategorisedndcontainer_changes.isPreviewModeInteractive = /*isPreviewModeInteractive*/
|
|
9584
9789
|
ctx[1];
|
|
9790
|
+
if (dirty[0] & /*categoriseSettingsData*/
|
|
9791
|
+
64)
|
|
9792
|
+
promptcategorisedndcontainer_changes.categoryData = /*categoriseSettingsData*/
|
|
9793
|
+
ctx[6];
|
|
9585
9794
|
promptcategorisedndcontainer.$set(promptcategorisedndcontainer_changes);
|
|
9586
9795
|
if (!current || dirty[0] & /*totalRemainingWordBinItem*/
|
|
9587
|
-
|
|
9588
|
-
(ctx[
|
|
9796
|
+
32768 && button2_class_value !== (button2_class_value = "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 " + /*isWordBInTotalZero*/
|
|
9797
|
+
(ctx[38](
|
|
9589
9798
|
/*totalRemainingWordBinItem*/
|
|
9590
|
-
ctx[
|
|
9799
|
+
ctx[15]
|
|
9591
9800
|
) ? "hidden" : ""))) {
|
|
9592
9801
|
attr(button2, "class", button2_class_value);
|
|
9593
9802
|
}
|
|
9594
9803
|
if (!current || dirty[0] & /*currentWordBinIndex, totalRemainingWordBinItem*/
|
|
9595
|
-
|
|
9596
|
-
ctx[
|
|
9597
|
-
ctx[
|
|
9804
|
+
557056 && button2_disabled_value !== (button2_disabled_value = /*currentWordBinIndex*/
|
|
9805
|
+
ctx[19] === /*totalRemainingWordBinItem*/
|
|
9806
|
+
ctx[15] - 1)) {
|
|
9598
9807
|
button2.disabled = button2_disabled_value;
|
|
9599
9808
|
}
|
|
9600
9809
|
if (!current || dirty[0] & /*isModalOpen*/
|
|
9601
|
-
|
|
9810
|
+
131072) {
|
|
9602
9811
|
attr(
|
|
9603
9812
|
div4,
|
|
9604
9813
|
"aria-hidden",
|
|
9605
9814
|
/*isModalOpen*/
|
|
9606
|
-
ctx[
|
|
9815
|
+
ctx[17]
|
|
9607
9816
|
);
|
|
9608
9817
|
}
|
|
9609
9818
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
9610
|
-
|
|
9819
|
+
1048576) {
|
|
9611
9820
|
attr(
|
|
9612
9821
|
div4,
|
|
9613
9822
|
"tabindex",
|
|
9614
9823
|
/*categoryTabIndex*/
|
|
9615
|
-
ctx[
|
|
9824
|
+
ctx[20]
|
|
9616
9825
|
);
|
|
9617
9826
|
}
|
|
9618
9827
|
if (!current || dirty[0] & /*dropContainerId*/
|
|
9619
|
-
|
|
9620
|
-
ctx[
|
|
9828
|
+
4096 && div4_aria_live_value !== (div4_aria_live_value = /*checkContainerDroppedItem*/
|
|
9829
|
+
ctx[31](
|
|
9621
9830
|
CONTAINER_WORD_BIN_ID,
|
|
9622
9831
|
/*dropContainerId*/
|
|
9623
|
-
ctx[
|
|
9832
|
+
ctx[12]
|
|
9624
9833
|
) ? "polite" : "off")) {
|
|
9625
9834
|
attr(div4, "aria-live", div4_aria_live_value);
|
|
9626
9835
|
}
|
|
9627
9836
|
if (!current || dirty[0] & /*considerContainerId, isDraggingOver, dropContainerId, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId*/
|
|
9628
|
-
|
|
9629
|
-
(ctx[
|
|
9837
|
+
97280 && div4_class_value !== (div4_class_value = "focus-ring shadow-[0_-12px_14px_-16px_#00000033] rounded-lg relative min-h-[133px] md:min-h-[164px] md:border md:shadow-[0_0_#0000] md:border-gray-400 " + /*checkContainerDragOver*/
|
|
9838
|
+
(ctx[30](
|
|
9630
9839
|
CONTAINER_WORD_BIN_ID,
|
|
9631
9840
|
/*considerContainerId*/
|
|
9632
|
-
ctx[
|
|
9841
|
+
ctx[10],
|
|
9633
9842
|
/*isDraggingOver*/
|
|
9634
|
-
ctx[
|
|
9843
|
+
ctx[11]
|
|
9635
9844
|
) ? "raw-focus-ring bg-violet-100" : "") + " " + /*checkContainerDroppedItem*/
|
|
9636
|
-
(ctx[
|
|
9845
|
+
(ctx[31](
|
|
9637
9846
|
CONTAINER_WORD_BIN_ID,
|
|
9638
9847
|
/*dropContainerId*/
|
|
9639
|
-
ctx[
|
|
9848
|
+
ctx[12]
|
|
9640
9849
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
9641
|
-
(ctx[
|
|
9850
|
+
(ctx[31](
|
|
9642
9851
|
CONTAINER_WORD_BIN_ID,
|
|
9643
9852
|
/*dropContainerId*/
|
|
9644
|
-
ctx[
|
|
9853
|
+
ctx[12]
|
|
9645
9854
|
) && /*hasAddItemAnimation*/
|
|
9646
|
-
ctx[
|
|
9647
|
-
(ctx[
|
|
9855
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
9856
|
+
(ctx[32](
|
|
9648
9857
|
CONTAINER_WORD_BIN_ID,
|
|
9649
9858
|
/*sourceSelectedContainerId*/
|
|
9650
|
-
ctx[
|
|
9859
|
+
ctx[14],
|
|
9651
9860
|
/*currentSelectedItemId*/
|
|
9652
|
-
ctx[
|
|
9861
|
+
ctx[13]
|
|
9653
9862
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : ""))) {
|
|
9654
9863
|
attr(div4, "class", div4_class_value);
|
|
9655
9864
|
}
|
|
@@ -9703,7 +9912,7 @@
|
|
|
9703
9912
|
destroy_component(smallchevronleft);
|
|
9704
9913
|
destroy_component(promptcategorisedndcontainer);
|
|
9705
9914
|
destroy_component(smallchevronright);
|
|
9706
|
-
ctx[
|
|
9915
|
+
ctx[55](null);
|
|
9707
9916
|
mounted = false;
|
|
9708
9917
|
run_all(dispose);
|
|
9709
9918
|
}
|
|
@@ -9717,11 +9926,11 @@
|
|
|
9717
9926
|
props: {
|
|
9718
9927
|
rubric: (
|
|
9719
9928
|
/*rubric*/
|
|
9720
|
-
ctx[
|
|
9929
|
+
ctx[25].text
|
|
9721
9930
|
),
|
|
9722
9931
|
prompt: (
|
|
9723
9932
|
/*prompt*/
|
|
9724
|
-
ctx[
|
|
9933
|
+
ctx[27]
|
|
9725
9934
|
),
|
|
9726
9935
|
$$slots: { default: [create_default_slot4] },
|
|
9727
9936
|
$$scope: { ctx }
|
|
@@ -9736,14 +9945,14 @@
|
|
|
9736
9945
|
m(target, anchor) {
|
|
9737
9946
|
insert(target, div, anchor);
|
|
9738
9947
|
mount_component(promptbody, div, null);
|
|
9739
|
-
ctx[
|
|
9948
|
+
ctx[56](div);
|
|
9740
9949
|
current = true;
|
|
9741
9950
|
},
|
|
9742
9951
|
p(ctx2, dirty) {
|
|
9743
9952
|
const promptbody_changes = {};
|
|
9744
|
-
if (dirty[0] & /*isModalOpen, categoryTabIndex, dropContainerId, considerContainerId, isDraggingOver, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId, tabCategory, totalRemainingWordBinItem, currentWordBinIndex, currentAnswer, isFinished, isPreviewModeInteractive, totalCategoryItems, selectedItemName, openCategoryContainer, categoryTitleHeight, enableAriaLive, previewResultSr, totalCategoryWords*/
|
|
9745
|
-
|
|
9746
|
-
|
|
9953
|
+
if (dirty[0] & /*isModalOpen, categoryTabIndex, dropContainerId, considerContainerId, isDraggingOver, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId, tabCategory, totalRemainingWordBinItem, currentWordBinIndex, currentAnswer, isFinished, isPreviewModeInteractive, categoriseSettingsData, totalCategoryItems, selectedItemName, openCategoryContainer, categoryTitleHeight, enableAriaLive, previewResultSr, totalCategoryWords, modalSettingsData*/
|
|
9954
|
+
16777211 | dirty[2] & /*$$scope*/
|
|
9955
|
+
256) {
|
|
9747
9956
|
promptbody_changes.$$scope = { dirty, ctx: ctx2 };
|
|
9748
9957
|
}
|
|
9749
9958
|
promptbody.$set(promptbody_changes);
|
|
@@ -9763,7 +9972,7 @@
|
|
|
9763
9972
|
detach(div);
|
|
9764
9973
|
}
|
|
9765
9974
|
destroy_component(promptbody);
|
|
9766
|
-
ctx[
|
|
9975
|
+
ctx[56](null);
|
|
9767
9976
|
}
|
|
9768
9977
|
};
|
|
9769
9978
|
}
|
|
@@ -9792,12 +10001,41 @@
|
|
|
9792
10001
|
let previewResultSr = "";
|
|
9793
10002
|
let enableAriaLive = true;
|
|
9794
10003
|
const totalCategoryWords = [];
|
|
10004
|
+
const categoryDndType = `category-type-${numberRandomizer()}`;
|
|
10005
|
+
let categoriseSettingsData = {
|
|
10006
|
+
considerContainerId: "",
|
|
10007
|
+
considerItemId: "",
|
|
10008
|
+
considerCloneItemId: "",
|
|
10009
|
+
sourceCloneContainerId: "",
|
|
10010
|
+
sourceContainerId: "",
|
|
10011
|
+
dropContainerId: "",
|
|
10012
|
+
isDraggingOver: false,
|
|
10013
|
+
selectedItemId: "",
|
|
10014
|
+
selectedContainerId: "",
|
|
10015
|
+
sourceSelectedContainerId: "",
|
|
10016
|
+
currentAnswer: [],
|
|
10017
|
+
rawCategories: [],
|
|
10018
|
+
rawCategoryItems: [],
|
|
10019
|
+
hasAddItemAnimation: false,
|
|
10020
|
+
openCategoryContainer: [],
|
|
10021
|
+
currentWordBinIndex: 0,
|
|
10022
|
+
currentTabContainer: "",
|
|
10023
|
+
lastSelectedTabContainer: "",
|
|
10024
|
+
selectedItemName: "",
|
|
10025
|
+
previewResultSr: "",
|
|
10026
|
+
isItemsAriaHidden: false
|
|
10027
|
+
};
|
|
10028
|
+
let modalSettingsData = {
|
|
10029
|
+
isModalOpen: false,
|
|
10030
|
+
modalAriaLabel: "",
|
|
10031
|
+
isOpenLastStatus: false
|
|
10032
|
+
};
|
|
9795
10033
|
const { rubric, interaction, metadata, scoringMetadata } = sessionData;
|
|
9796
10034
|
const { prompt, category_groups: interactionCategoryGroups, category_items: interactionCategoryItems } = interaction;
|
|
9797
10035
|
const categoryItems = useFilterUniqueObject(interactionCategoryItems);
|
|
9798
10036
|
const categoryGroups = useFilterUniqueObject(interactionCategoryGroups);
|
|
9799
10037
|
const tabCategory = [];
|
|
9800
|
-
categoryGroups.map((group) => $$invalidate(
|
|
10038
|
+
categoryGroups.map((group) => $$invalidate(8, tabCategory[group.id] = false, tabCategory));
|
|
9801
10039
|
totalCategoryItems = totalRemainingWordBinItem = Object.keys(categoryItems).length;
|
|
9802
10040
|
let wordBinItems = categoryItems.map((item) => item.id);
|
|
9803
10041
|
let initialCategoryAnswer = [
|
|
@@ -9808,24 +10046,39 @@
|
|
|
9808
10046
|
];
|
|
9809
10047
|
let categoryTitleHeight = [];
|
|
9810
10048
|
categoryGroups.map((category) => {
|
|
9811
|
-
$$invalidate(
|
|
10049
|
+
$$invalidate(23, categoryTitleHeight[category.id] = "", categoryTitleHeight);
|
|
10050
|
+
initialCategoryAnswer.push({ categoryId: category.id, itemId: [] });
|
|
9812
10051
|
});
|
|
9813
10052
|
if (metadata) {
|
|
9814
10053
|
const { events } = metadata.interactions;
|
|
9815
10054
|
const currentCategoryList = events.pop();
|
|
9816
10055
|
const { answer_list: answerList } = currentCategoryList;
|
|
9817
10056
|
const selectedItems = [];
|
|
10057
|
+
const selectedCategories = [];
|
|
9818
10058
|
if (answerList.length) {
|
|
9819
10059
|
const categorySavedItems = answerList.map((answer) => {
|
|
9820
10060
|
const { category_id: categoryId, item_id: itemId } = answer;
|
|
10061
|
+
selectedCategories.push(categoryId);
|
|
9821
10062
|
itemId.map((item) => selectedItems.push(item));
|
|
9822
10063
|
return { categoryId, itemId };
|
|
9823
10064
|
});
|
|
10065
|
+
if (selectedCategories.length) {
|
|
10066
|
+
initialCategoryAnswer = initialCategoryAnswer.filter((answer) => !selectedCategories.includes(answer.categoryId));
|
|
10067
|
+
}
|
|
9824
10068
|
wordBinItems = wordBinItems.filter((item) => !new Set(selectedItems).has(item));
|
|
9825
10069
|
initialCategoryAnswer[0].itemId = wordBinItems;
|
|
9826
10070
|
initialCategoryAnswer = [...initialCategoryAnswer, ...categorySavedItems];
|
|
9827
10071
|
}
|
|
9828
10072
|
}
|
|
10073
|
+
const updateCategoriseSettings = (newSettings) => {
|
|
10074
|
+
$$invalidate(6, categoriseSettingsData = {
|
|
10075
|
+
...categoriseSettingsData,
|
|
10076
|
+
...newSettings
|
|
10077
|
+
});
|
|
10078
|
+
};
|
|
10079
|
+
const updateModalSettings = (newSettings) => {
|
|
10080
|
+
$$invalidate(7, modalSettingsData = { ...modalSettingsData, ...newSettings });
|
|
10081
|
+
};
|
|
9829
10082
|
if (isFinished) {
|
|
9830
10083
|
const showOpenContainerList = [];
|
|
9831
10084
|
const { answerList } = scoringMetadata;
|
|
@@ -9857,97 +10110,15 @@
|
|
|
9857
10110
|
itemId: isPreviewMode ? [] : wordBinData
|
|
9858
10111
|
});
|
|
9859
10112
|
initialCategoryAnswer = categoryWithAnswer;
|
|
9860
|
-
|
|
9861
|
-
...get_store_value(categoriseSettings),
|
|
10113
|
+
updateCategoriseSettings({
|
|
9862
10114
|
openCategoryContainer: showOpenContainerList
|
|
9863
10115
|
});
|
|
9864
10116
|
}
|
|
9865
|
-
|
|
9866
|
-
...get_store_value(categoriseSettings),
|
|
10117
|
+
updateCategoriseSettings({
|
|
9867
10118
|
currentAnswer: initialCategoryAnswer,
|
|
9868
10119
|
rawCategoryItems: categoryItems,
|
|
9869
10120
|
rawCategories: categoryGroups
|
|
9870
10121
|
});
|
|
9871
|
-
modalSettings.subscribe((value) => {
|
|
9872
|
-
const { isModalOpen: storeIsModalOpen, isOpenLastStatus } = value;
|
|
9873
|
-
$$invalidate(12, isModalOpen = storeIsModalOpen);
|
|
9874
|
-
$$invalidate(15, categoryTabIndex = storeIsModalOpen ? -1 : 0);
|
|
9875
|
-
if (!storeIsModalOpen && isOpenLastStatus) {
|
|
9876
|
-
setTimeout(() => {
|
|
9877
|
-
$$invalidate(2, srDiv.tabIndex = 0, srDiv);
|
|
9878
|
-
srDiv.focus();
|
|
9879
|
-
$$invalidate(2, srDiv.tabIndex = -1, srDiv);
|
|
9880
|
-
modalSettings.set({
|
|
9881
|
-
...get_store_value(modalSettings),
|
|
9882
|
-
isOpenLastStatus: false
|
|
9883
|
-
});
|
|
9884
|
-
});
|
|
9885
|
-
}
|
|
9886
|
-
});
|
|
9887
|
-
categoriseSettings.subscribe((value) => {
|
|
9888
|
-
const { considerContainerId: storeConsiderContainerId, isDraggingOver: storeIsDraggingOver, dropContainerId: storeDropContainerId, sourceCloneContainerId: storeSourceCloneContainerId, selectedItemId: storeSelectedItemId, sourceSelectedContainerId: storeSourceSelectedContainerId, currentAnswer: storeCurrentAnswer, hasAddItemAnimation: storeHasAddItemAnimation, openCategoryContainer: storeOpenCategoryContainer, currentWordBinIndex: storeCurrentWordBinIndex, selectedItemName: storeSelectedItemName, lastSelectedTabContainer, previewResultSr: storepreviewResultSr } = value;
|
|
9889
|
-
$$invalidate(4, considerContainerId = storeConsiderContainerId);
|
|
9890
|
-
$$invalidate(5, isDraggingOver = storeIsDraggingOver);
|
|
9891
|
-
$$invalidate(6, dropContainerId = storeDropContainerId);
|
|
9892
|
-
sourceCloneContainerId = storeSourceCloneContainerId;
|
|
9893
|
-
$$invalidate(7, currentSelectedItemId = storeSelectedItemId);
|
|
9894
|
-
$$invalidate(8, sourceSelectedContainerId = storeSourceSelectedContainerId);
|
|
9895
|
-
$$invalidate(9, currentAnswer = storeCurrentAnswer);
|
|
9896
|
-
$$invalidate(11, hasAddItemAnimation = storeHasAddItemAnimation);
|
|
9897
|
-
$$invalidate(13, openCategoryContainer = storeOpenCategoryContainer);
|
|
9898
|
-
$$invalidate(14, currentWordBinIndex = storeCurrentWordBinIndex);
|
|
9899
|
-
$$invalidate(16, selectedItemName = storeSelectedItemName);
|
|
9900
|
-
$$invalidate(17, previewResultSr = storepreviewResultSr);
|
|
9901
|
-
$$invalidate(15, categoryTabIndex = storeSelectedItemId.length ? -1 : 0);
|
|
9902
|
-
currentAnswer.map((answer) => {
|
|
9903
|
-
const { categoryId, itemId } = answer;
|
|
9904
|
-
let totalWordCount = itemId.length;
|
|
9905
|
-
if (isFinished) {
|
|
9906
|
-
const items = itemId.filter((item) => {
|
|
9907
|
-
const itemType = item.split(EAT_DASH)[1];
|
|
9908
|
-
return itemType !== ANSWER_MISSED;
|
|
9909
|
-
});
|
|
9910
|
-
totalWordCount = items.length;
|
|
9911
|
-
}
|
|
9912
|
-
$$invalidate(19, totalCategoryWords[categoryId] = totalWordCount, totalCategoryWords);
|
|
9913
|
-
});
|
|
9914
|
-
$$invalidate(10, totalRemainingWordBinItem = totalCategoryWords[CONTAINER_WORD_BIN_ID]);
|
|
9915
|
-
if (lastSelectedTabContainer) {
|
|
9916
|
-
setTimeout(
|
|
9917
|
-
() => {
|
|
9918
|
-
tabCategory[lastSelectedTabContainer].focus();
|
|
9919
|
-
categoriseSettings.set({
|
|
9920
|
-
...get_store_value(categoriseSettings),
|
|
9921
|
-
lastSelectedTabContainer: ""
|
|
9922
|
-
});
|
|
9923
|
-
},
|
|
9924
|
-
150
|
|
9925
|
-
);
|
|
9926
|
-
}
|
|
9927
|
-
if (previewResultSr) {
|
|
9928
|
-
setTimeout(
|
|
9929
|
-
() => {
|
|
9930
|
-
$$invalidate(18, enableAriaLive = false);
|
|
9931
|
-
},
|
|
9932
|
-
400
|
|
9933
|
-
);
|
|
9934
|
-
setTimeout(
|
|
9935
|
-
() => {
|
|
9936
|
-
categoriseSettings.set({
|
|
9937
|
-
...get_store_value(categoriseSettings),
|
|
9938
|
-
previewResultSr: ""
|
|
9939
|
-
});
|
|
9940
|
-
setTimeout(
|
|
9941
|
-
() => {
|
|
9942
|
-
$$invalidate(18, enableAriaLive = true);
|
|
9943
|
-
},
|
|
9944
|
-
400
|
|
9945
|
-
);
|
|
9946
|
-
},
|
|
9947
|
-
600
|
|
9948
|
-
);
|
|
9949
|
-
}
|
|
9950
|
-
});
|
|
9951
10122
|
const checkContainerDragOver = (containerId, storeContainerId, isContainerDragOver) => {
|
|
9952
10123
|
return containerId === storeContainerId && isContainerDragOver && sourceCloneContainerId !== containerId;
|
|
9953
10124
|
};
|
|
@@ -9958,8 +10129,7 @@
|
|
|
9958
10129
|
return !!currentSelectedItemId2 && storeContainerId !== containerId;
|
|
9959
10130
|
};
|
|
9960
10131
|
const openResetModal = () => {
|
|
9961
|
-
|
|
9962
|
-
...get_store_value(modalSettings),
|
|
10132
|
+
updateModalSettings({
|
|
9963
10133
|
isModalOpen: true,
|
|
9964
10134
|
modalAriaLabel: "Reset words"
|
|
9965
10135
|
});
|
|
@@ -9995,10 +10165,7 @@
|
|
|
9995
10165
|
const index = openCategoryContainer2.indexOf(categoryId);
|
|
9996
10166
|
openContainerList.splice(index, 1);
|
|
9997
10167
|
}
|
|
9998
|
-
|
|
9999
|
-
...get_store_value(categoriseSettings),
|
|
10000
|
-
openCategoryContainer: openContainerList
|
|
10001
|
-
});
|
|
10168
|
+
updateCategoriseSettings({ openCategoryContainer: openContainerList });
|
|
10002
10169
|
};
|
|
10003
10170
|
const isWordBInTotalZero = (totalRemainingWordBinItem2) => {
|
|
10004
10171
|
return totalRemainingWordBinItem2 <= 0;
|
|
@@ -10008,12 +10175,14 @@
|
|
|
10008
10175
|
return;
|
|
10009
10176
|
dispatch("saveCategory", detail);
|
|
10010
10177
|
};
|
|
10178
|
+
const updateCategory = ({ detail }) => {
|
|
10179
|
+
updateCategoriseSettings(detail);
|
|
10180
|
+
};
|
|
10011
10181
|
const getContainerTabSelected = (key, containerId) => {
|
|
10012
10182
|
if (key === "Enter" && !currentSelectedItemId) {
|
|
10013
10183
|
setTimeout(
|
|
10014
10184
|
() => {
|
|
10015
|
-
|
|
10016
|
-
...get_store_value(categoriseSettings),
|
|
10185
|
+
updateCategoriseSettings({
|
|
10017
10186
|
currentTabContainer: containerId,
|
|
10018
10187
|
isItemsAriaHidden: false
|
|
10019
10188
|
});
|
|
@@ -10022,8 +10191,7 @@
|
|
|
10022
10191
|
);
|
|
10023
10192
|
}
|
|
10024
10193
|
if (key === "Escape" && currentSelectedItemId) {
|
|
10025
|
-
|
|
10026
|
-
...get_store_value(categoriseSettings),
|
|
10194
|
+
updateCategoriseSettings({
|
|
10027
10195
|
selectedItemId: "",
|
|
10028
10196
|
sourceSelectedContainerId: "",
|
|
10029
10197
|
selectedItemName: ""
|
|
@@ -10031,8 +10199,7 @@
|
|
|
10031
10199
|
}
|
|
10032
10200
|
};
|
|
10033
10201
|
const resetTabCategory = () => {
|
|
10034
|
-
|
|
10035
|
-
...get_store_value(categoriseSettings),
|
|
10202
|
+
updateCategoriseSettings({
|
|
10036
10203
|
isItemsAriaHidden: true,
|
|
10037
10204
|
currentTabContainer: "",
|
|
10038
10205
|
lastSelectedTabContainer: ""
|
|
@@ -10042,21 +10209,25 @@
|
|
|
10042
10209
|
tabCategory[CONTAINER_WORD_BIN_ID].focus();
|
|
10043
10210
|
};
|
|
10044
10211
|
const handleItemAriaHidden = (type) => {
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10212
|
+
updateCategoriseSettings({ isItemsAriaHidden: type });
|
|
10213
|
+
};
|
|
10214
|
+
const navigateCategoryItem = (currentWordBinIndex2, currentAnswer2, position) => {
|
|
10215
|
+
const navigateItem = useNavigateItem(currentWordBinIndex2, currentAnswer2, position);
|
|
10216
|
+
updateCategoriseSettings(navigateItem);
|
|
10217
|
+
};
|
|
10218
|
+
const updateModal = ({ detail }) => {
|
|
10219
|
+
updateModalSettings(detail);
|
|
10049
10220
|
};
|
|
10050
10221
|
function div0_elementresize_handler(category) {
|
|
10051
10222
|
categoryTitleHeight[category.id] = this.clientHeight;
|
|
10052
|
-
$$invalidate(
|
|
10223
|
+
$$invalidate(23, categoryTitleHeight);
|
|
10053
10224
|
}
|
|
10054
10225
|
const keydown_handler = (category, { key }) => getContainerTabSelected(key, category.id);
|
|
10055
10226
|
const blur_handler = () => handleItemAriaHidden(false);
|
|
10056
10227
|
function div1_binding($$value, category) {
|
|
10057
10228
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
10058
10229
|
tabCategory[category.id] = $$value;
|
|
10059
|
-
$$invalidate(
|
|
10230
|
+
$$invalidate(8, tabCategory);
|
|
10060
10231
|
});
|
|
10061
10232
|
}
|
|
10062
10233
|
const keydown_handler_1 = ({ key }) => getContainerTabSelected(key, CONTAINER_WORD_BIN_ID);
|
|
@@ -10064,36 +10235,122 @@
|
|
|
10064
10235
|
function div4_binding($$value) {
|
|
10065
10236
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
10066
10237
|
tabCategory[CONTAINER_WORD_BIN_ID] = $$value;
|
|
10067
|
-
$$invalidate(
|
|
10238
|
+
$$invalidate(8, tabCategory);
|
|
10068
10239
|
});
|
|
10069
10240
|
}
|
|
10070
10241
|
function div_binding($$value) {
|
|
10071
10242
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
10072
10243
|
srDiv = $$value;
|
|
10073
|
-
$$invalidate(2, srDiv);
|
|
10244
|
+
$$invalidate(2, srDiv), $$invalidate(7, modalSettingsData);
|
|
10074
10245
|
});
|
|
10075
10246
|
}
|
|
10076
10247
|
$$self.$$set = ($$props2) => {
|
|
10077
10248
|
if ("sessionData" in $$props2)
|
|
10078
|
-
$$invalidate(
|
|
10249
|
+
$$invalidate(47, sessionData = $$props2.sessionData);
|
|
10079
10250
|
if ("isFinished" in $$props2)
|
|
10080
10251
|
$$invalidate(0, isFinished = $$props2.isFinished);
|
|
10081
10252
|
if ("isPreviewMode" in $$props2)
|
|
10082
|
-
$$invalidate(
|
|
10253
|
+
$$invalidate(48, isPreviewMode = $$props2.isPreviewMode);
|
|
10083
10254
|
if ("isPreviewModeInteractive" in $$props2)
|
|
10084
10255
|
$$invalidate(1, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
|
|
10085
10256
|
};
|
|
10257
|
+
$$self.$$.update = () => {
|
|
10258
|
+
if ($$self.$$.dirty[0] & /*modalSettingsData, srDiv*/
|
|
10259
|
+
132) {
|
|
10260
|
+
$:
|
|
10261
|
+
if (modalSettingsData) {
|
|
10262
|
+
const { isModalOpen: storeIsModalOpen, isOpenLastStatus } = modalSettingsData;
|
|
10263
|
+
$$invalidate(17, isModalOpen = storeIsModalOpen);
|
|
10264
|
+
$$invalidate(20, categoryTabIndex = storeIsModalOpen ? -1 : 0);
|
|
10265
|
+
if (!storeIsModalOpen && isOpenLastStatus) {
|
|
10266
|
+
setTimeout(() => {
|
|
10267
|
+
$$invalidate(2, srDiv.tabIndex = 0, srDiv);
|
|
10268
|
+
srDiv.focus();
|
|
10269
|
+
$$invalidate(2, srDiv.tabIndex = -1, srDiv);
|
|
10270
|
+
updateModalSettings({ isOpenLastStatus: false });
|
|
10271
|
+
});
|
|
10272
|
+
}
|
|
10273
|
+
}
|
|
10274
|
+
}
|
|
10275
|
+
if ($$self.$$.dirty[0] & /*categoriseSettingsData, currentAnswer, isFinished, totalCategoryWords, tabCategory, previewResultSr*/
|
|
10276
|
+
377) {
|
|
10277
|
+
$:
|
|
10278
|
+
if (categoriseSettingsData) {
|
|
10279
|
+
const { considerContainerId: storeConsiderContainerId, isDraggingOver: storeIsDraggingOver, dropContainerId: storeDropContainerId, sourceCloneContainerId: storeSourceCloneContainerId, selectedItemId: storeSelectedItemId, sourceSelectedContainerId: storeSourceSelectedContainerId, currentAnswer: storeCurrentAnswer, hasAddItemAnimation: storeHasAddItemAnimation, openCategoryContainer: storeOpenCategoryContainer, currentWordBinIndex: storeCurrentWordBinIndex, selectedItemName: storeSelectedItemName, lastSelectedTabContainer, previewResultSr: storepreviewResultSr } = categoriseSettingsData;
|
|
10280
|
+
$$invalidate(10, considerContainerId = storeConsiderContainerId);
|
|
10281
|
+
$$invalidate(11, isDraggingOver = storeIsDraggingOver);
|
|
10282
|
+
$$invalidate(12, dropContainerId = storeDropContainerId);
|
|
10283
|
+
sourceCloneContainerId = storeSourceCloneContainerId;
|
|
10284
|
+
$$invalidate(13, currentSelectedItemId = storeSelectedItemId);
|
|
10285
|
+
$$invalidate(14, sourceSelectedContainerId = storeSourceSelectedContainerId);
|
|
10286
|
+
$$invalidate(3, currentAnswer = storeCurrentAnswer);
|
|
10287
|
+
$$invalidate(16, hasAddItemAnimation = storeHasAddItemAnimation);
|
|
10288
|
+
$$invalidate(18, openCategoryContainer = storeOpenCategoryContainer);
|
|
10289
|
+
$$invalidate(19, currentWordBinIndex = storeCurrentWordBinIndex);
|
|
10290
|
+
$$invalidate(21, selectedItemName = storeSelectedItemName);
|
|
10291
|
+
$$invalidate(4, previewResultSr = storepreviewResultSr);
|
|
10292
|
+
$$invalidate(20, categoryTabIndex = storeSelectedItemId.length ? -1 : 0);
|
|
10293
|
+
currentAnswer.map((answer) => {
|
|
10294
|
+
const { categoryId, itemId } = answer;
|
|
10295
|
+
let totalWordCount = itemId.length;
|
|
10296
|
+
if (isFinished) {
|
|
10297
|
+
const items = itemId.filter((item) => {
|
|
10298
|
+
const itemType = item.split(EAT_DASH)[1];
|
|
10299
|
+
return itemType !== ANSWER_MISSED;
|
|
10300
|
+
});
|
|
10301
|
+
totalWordCount = items.length;
|
|
10302
|
+
}
|
|
10303
|
+
$$invalidate(5, totalCategoryWords[categoryId] = totalWordCount, totalCategoryWords);
|
|
10304
|
+
});
|
|
10305
|
+
$$invalidate(15, totalRemainingWordBinItem = totalCategoryWords[CONTAINER_WORD_BIN_ID]);
|
|
10306
|
+
if (lastSelectedTabContainer) {
|
|
10307
|
+
setTimeout(
|
|
10308
|
+
() => {
|
|
10309
|
+
tabCategory[lastSelectedTabContainer].focus();
|
|
10310
|
+
updateCategoriseSettings({ lastSelectedTabContainer: "" });
|
|
10311
|
+
},
|
|
10312
|
+
150
|
|
10313
|
+
);
|
|
10314
|
+
}
|
|
10315
|
+
if (previewResultSr) {
|
|
10316
|
+
setTimeout(
|
|
10317
|
+
() => {
|
|
10318
|
+
$$invalidate(22, enableAriaLive = false);
|
|
10319
|
+
},
|
|
10320
|
+
400
|
|
10321
|
+
);
|
|
10322
|
+
setTimeout(
|
|
10323
|
+
() => {
|
|
10324
|
+
updateCategoriseSettings({ previewResultSr: "" });
|
|
10325
|
+
setTimeout(
|
|
10326
|
+
() => {
|
|
10327
|
+
$$invalidate(22, enableAriaLive = true);
|
|
10328
|
+
},
|
|
10329
|
+
400
|
|
10330
|
+
);
|
|
10331
|
+
},
|
|
10332
|
+
600
|
|
10333
|
+
);
|
|
10334
|
+
}
|
|
10335
|
+
}
|
|
10336
|
+
}
|
|
10337
|
+
};
|
|
10086
10338
|
return [
|
|
10087
10339
|
isFinished,
|
|
10088
10340
|
isPreviewModeInteractive,
|
|
10089
10341
|
srDiv,
|
|
10342
|
+
currentAnswer,
|
|
10343
|
+
previewResultSr,
|
|
10344
|
+
totalCategoryWords,
|
|
10345
|
+
categoriseSettingsData,
|
|
10346
|
+
modalSettingsData,
|
|
10347
|
+
tabCategory,
|
|
10090
10348
|
totalCategoryItems,
|
|
10091
10349
|
considerContainerId,
|
|
10092
10350
|
isDraggingOver,
|
|
10093
10351
|
dropContainerId,
|
|
10094
10352
|
currentSelectedItemId,
|
|
10095
10353
|
sourceSelectedContainerId,
|
|
10096
|
-
currentAnswer,
|
|
10097
10354
|
totalRemainingWordBinItem,
|
|
10098
10355
|
hasAddItemAnimation,
|
|
10099
10356
|
isModalOpen,
|
|
@@ -10101,11 +10358,9 @@
|
|
|
10101
10358
|
currentWordBinIndex,
|
|
10102
10359
|
categoryTabIndex,
|
|
10103
10360
|
selectedItemName,
|
|
10104
|
-
previewResultSr,
|
|
10105
10361
|
enableAriaLive,
|
|
10106
|
-
totalCategoryWords,
|
|
10107
|
-
tabCategory,
|
|
10108
10362
|
categoryTitleHeight,
|
|
10363
|
+
categoryDndType,
|
|
10109
10364
|
rubric,
|
|
10110
10365
|
scoringMetadata,
|
|
10111
10366
|
prompt,
|
|
@@ -10121,10 +10376,13 @@
|
|
|
10121
10376
|
addCategoryContainer,
|
|
10122
10377
|
isWordBInTotalZero,
|
|
10123
10378
|
saveCategory,
|
|
10379
|
+
updateCategory,
|
|
10124
10380
|
getContainerTabSelected,
|
|
10125
10381
|
resetTabCategory,
|
|
10126
10382
|
goToWordBin,
|
|
10127
10383
|
handleItemAriaHidden,
|
|
10384
|
+
navigateCategoryItem,
|
|
10385
|
+
updateModal,
|
|
10128
10386
|
sessionData,
|
|
10129
10387
|
isPreviewMode,
|
|
10130
10388
|
div0_elementresize_handler,
|
|
@@ -10147,9 +10405,9 @@
|
|
|
10147
10405
|
create_fragment21,
|
|
10148
10406
|
safe_not_equal,
|
|
10149
10407
|
{
|
|
10150
|
-
sessionData:
|
|
10408
|
+
sessionData: 47,
|
|
10151
10409
|
isFinished: 0,
|
|
10152
|
-
isPreviewMode:
|
|
10410
|
+
isPreviewMode: 48,
|
|
10153
10411
|
isPreviewModeInteractive: 1
|
|
10154
10412
|
},
|
|
10155
10413
|
null,
|
|
@@ -10157,7 +10415,7 @@
|
|
|
10157
10415
|
);
|
|
10158
10416
|
}
|
|
10159
10417
|
get sessionData() {
|
|
10160
|
-
return this.$$.ctx[
|
|
10418
|
+
return this.$$.ctx[47];
|
|
10161
10419
|
}
|
|
10162
10420
|
set sessionData(sessionData) {
|
|
10163
10421
|
this.$$set({ sessionData });
|
|
@@ -10171,7 +10429,7 @@
|
|
|
10171
10429
|
flush();
|
|
10172
10430
|
}
|
|
10173
10431
|
get isPreviewMode() {
|
|
10174
|
-
return this.$$.ctx[
|
|
10432
|
+
return this.$$.ctx[48];
|
|
10175
10433
|
}
|
|
10176
10434
|
set isPreviewMode(isPreviewMode) {
|
|
10177
10435
|
this.$$set({ isPreviewMode });
|