eat-js-sdk 0.0.50 → 0.0.52
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 +997 -787
- 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;
|
|
@@ -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,
|
|
@@ -5689,10 +5664,10 @@
|
|
|
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
5672
|
(ctx[1] === ANSWER_CORRECT && !/*isWordItemSelected*/
|
|
5698
5673
|
ctx[10] ? "border-green-800 bg-green-300" : (
|
|
@@ -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[15](button);
|
|
5724
5699
|
current = true;
|
|
5725
5700
|
if (!mounted) {
|
|
5726
5701
|
dispose = [
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -5857,13 +5832,13 @@
|
|
|
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
|
+
1758 && button_class_value !== (button_class_value = "focus-ring flex items-center justify-between min-h-[54px] p-1 border border-gray-800 rounded-lg " + /*otherClass*/
|
|
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
5843
|
(ctx[1] === ANSWER_CORRECT && !/*isWordItemSelected*/
|
|
5869
5844
|
ctx[10] ? "border-green-800 bg-green-300" : (
|
|
@@ -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[15](null);
|
|
5903
5878
|
mounted = false;
|
|
5904
5879
|
run_all(dispose);
|
|
5905
5880
|
}
|
|
@@ -5914,34 +5889,31 @@
|
|
|
5914
5889
|
let { containerId = "" } = $$props;
|
|
5915
5890
|
let { wordFocus = false } = $$props;
|
|
5916
5891
|
let { disabledClick = false } = $$props;
|
|
5892
|
+
let { categoryData = [] } = $$props;
|
|
5893
|
+
const dispatch = createEventDispatcher();
|
|
5917
5894
|
let considerCloneItemId = "";
|
|
5918
5895
|
let currentSelectedItemId = "";
|
|
5919
5896
|
let isWordItemSelected = false;
|
|
5920
5897
|
let isSelecItemFunctionCalled = false;
|
|
5921
5898
|
let wordButton;
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
$$invalidate(10, isWordItemSelected = currentSelectedItemId === wordButtonId);
|
|
5927
|
-
});
|
|
5899
|
+
const updateCategoryData = (newSettings) => {
|
|
5900
|
+
$$invalidate(13, categoryData = { ...categoryData, ...newSettings });
|
|
5901
|
+
dispatch("updateCategorySettings", categoryData);
|
|
5902
|
+
};
|
|
5928
5903
|
const selectItem = (itemId) => {
|
|
5929
5904
|
if (isSelecItemFunctionCalled || disabledClick) {
|
|
5930
5905
|
return;
|
|
5931
5906
|
}
|
|
5932
5907
|
isSelecItemFunctionCalled = true;
|
|
5933
|
-
const storeCategoriseSettings = get_store_value(categoriseSettings);
|
|
5934
5908
|
if (!currentSelectedItemId) {
|
|
5935
|
-
|
|
5936
|
-
...storeCategoriseSettings,
|
|
5909
|
+
updateCategoryData({
|
|
5937
5910
|
selectedItemId: itemId,
|
|
5938
5911
|
sourceSelectedContainerId: containerId,
|
|
5939
5912
|
selectedItemName: word,
|
|
5940
5913
|
isItemsAriaHidden: false
|
|
5941
5914
|
});
|
|
5942
5915
|
} else if (currentSelectedItemId === itemId) {
|
|
5943
|
-
|
|
5944
|
-
...storeCategoriseSettings,
|
|
5916
|
+
updateCategoryData({
|
|
5945
5917
|
selectedItemId: "",
|
|
5946
5918
|
sourceSelectedContainerId: "",
|
|
5947
5919
|
selectedItemName: ""
|
|
@@ -5960,9 +5932,8 @@
|
|
|
5960
5932
|
selectItem(wordButtonId);
|
|
5961
5933
|
return;
|
|
5962
5934
|
}
|
|
5963
|
-
const { currentTabContainer } =
|
|
5964
|
-
|
|
5965
|
-
...get_store_value(categoriseSettings),
|
|
5935
|
+
const { currentTabContainer } = categoryData;
|
|
5936
|
+
updateCategoryData({
|
|
5966
5937
|
lastSelectedTabContainer: currentTabContainer,
|
|
5967
5938
|
currentTabContainer: ""
|
|
5968
5939
|
});
|
|
@@ -5974,7 +5945,7 @@
|
|
|
5974
5945
|
function button_binding($$value) {
|
|
5975
5946
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
5976
5947
|
wordButton = $$value;
|
|
5977
|
-
$$invalidate(
|
|
5948
|
+
$$invalidate(8, wordButton);
|
|
5978
5949
|
});
|
|
5979
5950
|
}
|
|
5980
5951
|
$$self.$$set = ($$props2) => {
|
|
@@ -5991,13 +5962,15 @@
|
|
|
5991
5962
|
if ("containerId" in $$props2)
|
|
5992
5963
|
$$invalidate(5, containerId = $$props2.containerId);
|
|
5993
5964
|
if ("wordFocus" in $$props2)
|
|
5994
|
-
$$invalidate(
|
|
5965
|
+
$$invalidate(14, wordFocus = $$props2.wordFocus);
|
|
5995
5966
|
if ("disabledClick" in $$props2)
|
|
5996
5967
|
$$invalidate(6, disabledClick = $$props2.disabledClick);
|
|
5968
|
+
if ("categoryData" in $$props2)
|
|
5969
|
+
$$invalidate(13, categoryData = $$props2.categoryData);
|
|
5997
5970
|
};
|
|
5998
5971
|
$$self.$$.update = () => {
|
|
5999
5972
|
if ($$self.$$.dirty & /*wordFocus, wordButton*/
|
|
6000
|
-
|
|
5973
|
+
16640) {
|
|
6001
5974
|
$:
|
|
6002
5975
|
if (wordFocus) {
|
|
6003
5976
|
setTimeout(
|
|
@@ -6008,6 +5981,16 @@
|
|
|
6008
5981
|
);
|
|
6009
5982
|
}
|
|
6010
5983
|
}
|
|
5984
|
+
if ($$self.$$.dirty & /*categoryData, currentSelectedItemId, wordButtonId*/
|
|
5985
|
+
8328) {
|
|
5986
|
+
$:
|
|
5987
|
+
if (categoryData) {
|
|
5988
|
+
const { considerCloneItemId: storeConsiderCloneItemId, selectedItemId: storeSelectedItemId } = categoryData;
|
|
5989
|
+
$$invalidate(9, considerCloneItemId = storeConsiderCloneItemId);
|
|
5990
|
+
$$invalidate(7, currentSelectedItemId = storeSelectedItemId);
|
|
5991
|
+
$$invalidate(10, isWordItemSelected = currentSelectedItemId === wordButtonId);
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
6011
5994
|
};
|
|
6012
5995
|
return [
|
|
6013
5996
|
word,
|
|
@@ -6017,12 +6000,13 @@
|
|
|
6017
6000
|
isClonedItem,
|
|
6018
6001
|
containerId,
|
|
6019
6002
|
disabledClick,
|
|
6003
|
+
currentSelectedItemId,
|
|
6020
6004
|
wordButton,
|
|
6021
6005
|
considerCloneItemId,
|
|
6022
|
-
currentSelectedItemId,
|
|
6023
6006
|
isWordItemSelected,
|
|
6024
6007
|
selectItem,
|
|
6025
6008
|
removeContainerTabSelected,
|
|
6009
|
+
categoryData,
|
|
6026
6010
|
wordFocus,
|
|
6027
6011
|
button_binding
|
|
6028
6012
|
];
|
|
@@ -6037,8 +6021,9 @@
|
|
|
6037
6021
|
wordButtonId: 3,
|
|
6038
6022
|
isClonedItem: 4,
|
|
6039
6023
|
containerId: 5,
|
|
6040
|
-
wordFocus:
|
|
6041
|
-
disabledClick: 6
|
|
6024
|
+
wordFocus: 14,
|
|
6025
|
+
disabledClick: 6,
|
|
6026
|
+
categoryData: 13
|
|
6042
6027
|
});
|
|
6043
6028
|
}
|
|
6044
6029
|
get word() {
|
|
@@ -6084,7 +6069,7 @@
|
|
|
6084
6069
|
flush();
|
|
6085
6070
|
}
|
|
6086
6071
|
get wordFocus() {
|
|
6087
|
-
return this.$$.ctx[
|
|
6072
|
+
return this.$$.ctx[14];
|
|
6088
6073
|
}
|
|
6089
6074
|
set wordFocus(wordFocus) {
|
|
6090
6075
|
this.$$set({ wordFocus });
|
|
@@ -6097,17 +6082,17 @@
|
|
|
6097
6082
|
this.$$set({ disabledClick });
|
|
6098
6083
|
flush();
|
|
6099
6084
|
}
|
|
6085
|
+
get categoryData() {
|
|
6086
|
+
return this.$$.ctx[13];
|
|
6087
|
+
}
|
|
6088
|
+
set categoryData(categoryData) {
|
|
6089
|
+
this.$$set({ categoryData });
|
|
6090
|
+
flush();
|
|
6091
|
+
}
|
|
6100
6092
|
};
|
|
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));
|
|
6093
|
+
customElements.define("prompt-categorise-word-button", create_custom_element(PromptCategoriseWordButton, { "word": {}, "resultType": {}, "otherClass": {}, "wordButtonId": {}, "isClonedItem": { "type": "Boolean" }, "containerId": {}, "wordFocus": { "type": "Boolean" }, "disabledClick": { "type": "Boolean" }, "categoryData": {} }, [], [], true));
|
|
6102
6094
|
var PromptCategoriseWordButton_default = PromptCategoriseWordButton;
|
|
6103
6095
|
|
|
6104
|
-
// src/lib/stores/modal.ts
|
|
6105
|
-
var modalSettings = writable({
|
|
6106
|
-
isModalOpen: false,
|
|
6107
|
-
modalAriaLabel: "",
|
|
6108
|
-
isOpenLastStatus: false
|
|
6109
|
-
});
|
|
6110
|
-
|
|
6111
6096
|
// src/lib/composables/useCategorise.ts
|
|
6112
6097
|
var useNavigateItem = (currentIndex, currentAnswer, direction, addWordBin = false) => {
|
|
6113
6098
|
const wordBinData = currentAnswer.filter(
|
|
@@ -6127,20 +6112,22 @@
|
|
|
6127
6112
|
return;
|
|
6128
6113
|
}
|
|
6129
6114
|
}
|
|
6130
|
-
|
|
6131
|
-
...get_store_value(categoriseSettings),
|
|
6115
|
+
return {
|
|
6132
6116
|
currentWordBinIndex: newIndex < 0 ? lastIndex : newIndex >= totalItem ? 0 : newIndex
|
|
6133
|
-
}
|
|
6117
|
+
};
|
|
6134
6118
|
};
|
|
6135
6119
|
var useFilterUniqueObject = (data, identifier = "id") => {
|
|
6136
6120
|
const uniqueMap = new Map(data.map((obj) => [obj[identifier], obj]));
|
|
6137
6121
|
return Array.from(uniqueMap.values());
|
|
6138
6122
|
};
|
|
6123
|
+
var numberRandomizer = (min = 1, max = 9999) => {
|
|
6124
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
6125
|
+
};
|
|
6139
6126
|
|
|
6140
6127
|
// src/lib/components/prompt/categorise/PromptCategoriseDndContainer.svelte
|
|
6141
6128
|
function get_each_context2(ctx, list, i) {
|
|
6142
6129
|
const child_ctx = ctx.slice();
|
|
6143
|
-
child_ctx[
|
|
6130
|
+
child_ctx[38] = list[i];
|
|
6144
6131
|
return child_ctx;
|
|
6145
6132
|
}
|
|
6146
6133
|
function create_if_block_24(ctx) {
|
|
@@ -6155,10 +6142,10 @@
|
|
|
6155
6142
|
button,
|
|
6156
6143
|
"aria-label",
|
|
6157
6144
|
/*ariaLabel*/
|
|
6158
|
-
ctx[
|
|
6145
|
+
ctx[7]
|
|
6159
6146
|
);
|
|
6160
6147
|
attr(button, "class", button_class_value = "focus-ring absolute inset-0 bg-transparent rounded-lg focus-visible:border " + /*isContainerWordBin*/
|
|
6161
|
-
(ctx[
|
|
6148
|
+
(ctx[20] ? "focus-visible:border-gray-400" : "focus-visible:border-gray-800"));
|
|
6162
6149
|
},
|
|
6163
6150
|
m(target, anchor) {
|
|
6164
6151
|
insert(target, button, anchor);
|
|
@@ -6167,19 +6154,19 @@
|
|
|
6167
6154
|
button,
|
|
6168
6155
|
"click",
|
|
6169
6156
|
/*addAnswerItem*/
|
|
6170
|
-
ctx[
|
|
6157
|
+
ctx[23]
|
|
6171
6158
|
);
|
|
6172
6159
|
mounted = true;
|
|
6173
6160
|
}
|
|
6174
6161
|
},
|
|
6175
6162
|
p(ctx2, dirty) {
|
|
6176
6163
|
if (dirty[0] & /*ariaLabel*/
|
|
6177
|
-
|
|
6164
|
+
128) {
|
|
6178
6165
|
attr(
|
|
6179
6166
|
button,
|
|
6180
6167
|
"aria-label",
|
|
6181
6168
|
/*ariaLabel*/
|
|
6182
|
-
ctx2[
|
|
6169
|
+
ctx2[7]
|
|
6183
6170
|
);
|
|
6184
6171
|
}
|
|
6185
6172
|
},
|
|
@@ -6212,13 +6199,13 @@
|
|
|
6212
6199
|
div,
|
|
6213
6200
|
"click",
|
|
6214
6201
|
/*addAnswerItem*/
|
|
6215
|
-
ctx[
|
|
6202
|
+
ctx[23]
|
|
6216
6203
|
),
|
|
6217
6204
|
listen(
|
|
6218
6205
|
div,
|
|
6219
6206
|
"keypress",
|
|
6220
6207
|
/*addAnswerItem*/
|
|
6221
|
-
ctx[
|
|
6208
|
+
ctx[23]
|
|
6222
6209
|
)
|
|
6223
6210
|
];
|
|
6224
6211
|
mounted = true;
|
|
@@ -6245,7 +6232,7 @@
|
|
|
6245
6232
|
t2 = text("Missing answers:");
|
|
6246
6233
|
attr(button, "aria-label", "Missing answers:");
|
|
6247
6234
|
attr(button, "class", button_class_value = "text-base text-charcoal font-semibold w-full mt-1 mb-2 text-left " + (!/*showButton*/
|
|
6248
|
-
ctx[
|
|
6235
|
+
ctx[5] ? "hidden md:missing-answer-label" : "missing-answer-label"));
|
|
6249
6236
|
button.disabled = button_disabled_value = true;
|
|
6250
6237
|
},
|
|
6251
6238
|
m(target, anchor) {
|
|
@@ -6254,8 +6241,8 @@
|
|
|
6254
6241
|
},
|
|
6255
6242
|
p(ctx2, dirty) {
|
|
6256
6243
|
if (dirty[0] & /*showButton*/
|
|
6257
|
-
|
|
6258
|
-
ctx2[
|
|
6244
|
+
32 && button_class_value !== (button_class_value = "text-base text-charcoal font-semibold w-full mt-1 mb-2 text-left " + (!/*showButton*/
|
|
6245
|
+
ctx2[5] ? "hidden md:missing-answer-label" : "missing-answer-label"))) {
|
|
6259
6246
|
attr(button, "class", button_class_value);
|
|
6260
6247
|
}
|
|
6261
6248
|
},
|
|
@@ -6273,53 +6260,62 @@
|
|
|
6273
6260
|
let current;
|
|
6274
6261
|
let if_block = (
|
|
6275
6262
|
/*item*/
|
|
6276
|
-
ctx[
|
|
6263
|
+
ctx[38].type === ANSWER_MISSED && create_if_block6(ctx)
|
|
6277
6264
|
);
|
|
6278
6265
|
promptcategorisewordbutton = new PromptCategoriseWordButton_default({
|
|
6279
6266
|
props: {
|
|
6280
6267
|
otherClass: "mr-2 mb-2 last:mr-0 " + /*item*/
|
|
6281
|
-
(ctx[
|
|
6282
|
-
ctx[
|
|
6283
|
-
ctx[
|
|
6284
|
-
(ctx[
|
|
6268
|
+
(ctx[38].id === /*considerItemId*/
|
|
6269
|
+
ctx[9] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
|
|
6270
|
+
ctx[5] ? "hidden md:flex" : "") + "\n " + /*items*/
|
|
6271
|
+
(ctx[17][
|
|
6285
6272
|
/*currentWordBinIndex*/
|
|
6286
|
-
ctx[
|
|
6273
|
+
ctx[13]
|
|
6287
6274
|
]?.id !== /*item*/
|
|
6288
|
-
ctx[
|
|
6289
|
-
ctx[
|
|
6275
|
+
ctx[38].id && /*isContainerWordBin*/
|
|
6276
|
+
ctx[20] ? "hidden md:flex" : ""),
|
|
6290
6277
|
word: (
|
|
6291
6278
|
/*item*/
|
|
6292
|
-
ctx[
|
|
6279
|
+
ctx[38].text
|
|
6293
6280
|
),
|
|
6294
6281
|
wordButtonId: (
|
|
6295
6282
|
/*item*/
|
|
6296
|
-
ctx[
|
|
6283
|
+
ctx[38].id
|
|
6297
6284
|
),
|
|
6298
6285
|
isClonedItem: (
|
|
6299
6286
|
/*item*/
|
|
6300
|
-
ctx[
|
|
6287
|
+
ctx[38].isClonedItem
|
|
6301
6288
|
),
|
|
6302
6289
|
containerId: (
|
|
6303
6290
|
/*containerId*/
|
|
6304
|
-
ctx[
|
|
6291
|
+
ctx[3]
|
|
6305
6292
|
),
|
|
6306
6293
|
wordFocus: (
|
|
6307
6294
|
/*currentTabContainer*/
|
|
6308
|
-
ctx[
|
|
6309
|
-
ctx[
|
|
6310
|
-
ctx[
|
|
6311
|
-
ctx[
|
|
6295
|
+
ctx[15] === /*containerId*/
|
|
6296
|
+
ctx[3] && /*item*/
|
|
6297
|
+
ctx[38].id === /*items*/
|
|
6298
|
+
ctx[17][0].id
|
|
6312
6299
|
),
|
|
6313
6300
|
disabledClick: (
|
|
6314
6301
|
/*isFinished*/
|
|
6315
|
-
ctx[
|
|
6302
|
+
ctx[8]
|
|
6316
6303
|
),
|
|
6317
6304
|
resultType: (
|
|
6318
6305
|
/*item*/
|
|
6319
|
-
ctx[
|
|
6306
|
+
ctx[38].type
|
|
6307
|
+
),
|
|
6308
|
+
categoryData: (
|
|
6309
|
+
/*categoryData*/
|
|
6310
|
+
ctx[0]
|
|
6320
6311
|
)
|
|
6321
6312
|
}
|
|
6322
6313
|
});
|
|
6314
|
+
promptcategorisewordbutton.$on(
|
|
6315
|
+
"updateCategorySettings",
|
|
6316
|
+
/*updateCategoryByButton*/
|
|
6317
|
+
ctx[24]
|
|
6318
|
+
);
|
|
6323
6319
|
return {
|
|
6324
6320
|
key: key_1,
|
|
6325
6321
|
first: null,
|
|
@@ -6343,7 +6339,7 @@
|
|
|
6343
6339
|
ctx = new_ctx;
|
|
6344
6340
|
if (
|
|
6345
6341
|
/*item*/
|
|
6346
|
-
ctx[
|
|
6342
|
+
ctx[38].type === ANSWER_MISSED
|
|
6347
6343
|
) {
|
|
6348
6344
|
if (if_block) {
|
|
6349
6345
|
if_block.p(ctx, dirty);
|
|
@@ -6358,48 +6354,52 @@
|
|
|
6358
6354
|
}
|
|
6359
6355
|
const promptcategorisewordbutton_changes = {};
|
|
6360
6356
|
if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex*/
|
|
6361
|
-
|
|
6357
|
+
139808)
|
|
6362
6358
|
promptcategorisewordbutton_changes.otherClass = "mr-2 mb-2 last:mr-0 " + /*item*/
|
|
6363
|
-
(ctx[
|
|
6364
|
-
ctx[
|
|
6365
|
-
ctx[
|
|
6366
|
-
(ctx[
|
|
6359
|
+
(ctx[38].id === /*considerItemId*/
|
|
6360
|
+
ctx[9] ? "!bg-violet-150" : "") + "\n " + (!/*showButton*/
|
|
6361
|
+
ctx[5] ? "hidden md:flex" : "") + "\n " + /*items*/
|
|
6362
|
+
(ctx[17][
|
|
6367
6363
|
/*currentWordBinIndex*/
|
|
6368
|
-
ctx[
|
|
6364
|
+
ctx[13]
|
|
6369
6365
|
]?.id !== /*item*/
|
|
6370
|
-
ctx[
|
|
6371
|
-
ctx[
|
|
6366
|
+
ctx[38].id && /*isContainerWordBin*/
|
|
6367
|
+
ctx[20] ? "hidden md:flex" : "");
|
|
6372
6368
|
if (dirty[0] & /*items*/
|
|
6373
|
-
|
|
6369
|
+
131072)
|
|
6374
6370
|
promptcategorisewordbutton_changes.word = /*item*/
|
|
6375
|
-
ctx[
|
|
6371
|
+
ctx[38].text;
|
|
6376
6372
|
if (dirty[0] & /*items*/
|
|
6377
|
-
|
|
6373
|
+
131072)
|
|
6378
6374
|
promptcategorisewordbutton_changes.wordButtonId = /*item*/
|
|
6379
|
-
ctx[
|
|
6375
|
+
ctx[38].id;
|
|
6380
6376
|
if (dirty[0] & /*items*/
|
|
6381
|
-
|
|
6377
|
+
131072)
|
|
6382
6378
|
promptcategorisewordbutton_changes.isClonedItem = /*item*/
|
|
6383
|
-
ctx[
|
|
6379
|
+
ctx[38].isClonedItem;
|
|
6384
6380
|
if (dirty[0] & /*containerId*/
|
|
6385
|
-
|
|
6381
|
+
8)
|
|
6386
6382
|
promptcategorisewordbutton_changes.containerId = /*containerId*/
|
|
6387
|
-
ctx[
|
|
6383
|
+
ctx[3];
|
|
6388
6384
|
if (dirty[0] & /*currentTabContainer, containerId, items*/
|
|
6389
|
-
|
|
6385
|
+
163848)
|
|
6390
6386
|
promptcategorisewordbutton_changes.wordFocus = /*currentTabContainer*/
|
|
6391
|
-
ctx[
|
|
6392
|
-
ctx[
|
|
6393
|
-
ctx[
|
|
6394
|
-
ctx[
|
|
6387
|
+
ctx[15] === /*containerId*/
|
|
6388
|
+
ctx[3] && /*item*/
|
|
6389
|
+
ctx[38].id === /*items*/
|
|
6390
|
+
ctx[17][0].id;
|
|
6395
6391
|
if (dirty[0] & /*isFinished*/
|
|
6396
|
-
|
|
6392
|
+
256)
|
|
6397
6393
|
promptcategorisewordbutton_changes.disabledClick = /*isFinished*/
|
|
6398
|
-
ctx[
|
|
6394
|
+
ctx[8];
|
|
6399
6395
|
if (dirty[0] & /*items*/
|
|
6400
|
-
|
|
6396
|
+
131072)
|
|
6401
6397
|
promptcategorisewordbutton_changes.resultType = /*item*/
|
|
6402
|
-
ctx[
|
|
6398
|
+
ctx[38].type;
|
|
6399
|
+
if (dirty[0] & /*categoryData*/
|
|
6400
|
+
1)
|
|
6401
|
+
promptcategorisewordbutton_changes.categoryData = /*categoryData*/
|
|
6402
|
+
ctx[0];
|
|
6403
6403
|
promptcategorisewordbutton.$set(promptcategorisewordbutton_changes);
|
|
6404
6404
|
},
|
|
6405
6405
|
i(local) {
|
|
@@ -6437,23 +6437,23 @@
|
|
|
6437
6437
|
let dispose;
|
|
6438
6438
|
let if_block0 = (
|
|
6439
6439
|
/*dragDisabled*/
|
|
6440
|
-
ctx[
|
|
6441
|
-
ctx[
|
|
6442
|
-
ctx[
|
|
6443
|
-
ctx[
|
|
6440
|
+
ctx[11] && /*sourceSelectedContainerId*/
|
|
6441
|
+
ctx[12] !== /*containerId*/
|
|
6442
|
+
ctx[3] && !/*isFinished*/
|
|
6443
|
+
ctx[8] && create_if_block_24(ctx)
|
|
6444
6444
|
);
|
|
6445
6445
|
let if_block1 = (
|
|
6446
6446
|
/*totalRemainingWordBinItem*/
|
|
6447
|
-
ctx[
|
|
6448
|
-
ctx[
|
|
6447
|
+
ctx[14] <= 0 && /*isContainerWordBin*/
|
|
6448
|
+
ctx[20] && create_if_block_16(ctx)
|
|
6449
6449
|
);
|
|
6450
6450
|
let each_value = ensure_array_like(Object.values(
|
|
6451
6451
|
/*items*/
|
|
6452
|
-
ctx[
|
|
6452
|
+
ctx[17]
|
|
6453
6453
|
));
|
|
6454
6454
|
const get_key = (ctx2) => (
|
|
6455
6455
|
/*item*/
|
|
6456
|
-
ctx2[
|
|
6456
|
+
ctx2[38].id
|
|
6457
6457
|
);
|
|
6458
6458
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
6459
6459
|
let child_ctx = get_each_context2(ctx, each_value, i);
|
|
@@ -6474,23 +6474,23 @@
|
|
|
6474
6474
|
}
|
|
6475
6475
|
attr(section, "role", "group");
|
|
6476
6476
|
attr(section, "class", section_class_value = "flex flex-wrap " + /*containerClass*/
|
|
6477
|
-
ctx[
|
|
6477
|
+
ctx[1] + " category-content");
|
|
6478
6478
|
attr(
|
|
6479
6479
|
section,
|
|
6480
6480
|
"aria-hidden",
|
|
6481
6481
|
/*isItemsAriaHidden*/
|
|
6482
|
-
ctx[
|
|
6482
|
+
ctx[18]
|
|
6483
6483
|
);
|
|
6484
6484
|
attr(section, "aria-dropeffect", "move");
|
|
6485
6485
|
attr(
|
|
6486
6486
|
section,
|
|
6487
6487
|
"id",
|
|
6488
6488
|
/*containerId*/
|
|
6489
|
-
ctx[
|
|
6489
|
+
ctx[3]
|
|
6490
6490
|
);
|
|
6491
6491
|
attr(section, "style", section_style_value = !/*isContainerWordBin*/
|
|
6492
|
-
ctx[
|
|
6493
|
-
ctx[
|
|
6492
|
+
ctx[20] ? `padding-top: ${/*paddingTop*/
|
|
6493
|
+
ctx[6]}px;` : "");
|
|
6494
6494
|
},
|
|
6495
6495
|
m(target, anchor) {
|
|
6496
6496
|
if (if_block0)
|
|
@@ -6511,32 +6511,32 @@
|
|
|
6511
6511
|
action_destroyer(dndzone_action = dndzone$2.call(null, section, {
|
|
6512
6512
|
items: (
|
|
6513
6513
|
/*items*/
|
|
6514
|
-
ctx[
|
|
6514
|
+
ctx[17]
|
|
6515
6515
|
),
|
|
6516
6516
|
flipDurationMs: (
|
|
6517
6517
|
/*flipDurationMs*/
|
|
6518
|
-
ctx[
|
|
6518
|
+
ctx[2]
|
|
6519
6519
|
),
|
|
6520
6520
|
type: (
|
|
6521
6521
|
/*type*/
|
|
6522
|
-
ctx[
|
|
6522
|
+
ctx[4]
|
|
6523
6523
|
),
|
|
6524
6524
|
dropTargetClasses: (
|
|
6525
6525
|
/*dropTargetClasses*/
|
|
6526
|
-
ctx[
|
|
6526
|
+
ctx[19]
|
|
6527
6527
|
),
|
|
6528
6528
|
morphDisabled: true,
|
|
6529
6529
|
dragDisabled: (
|
|
6530
6530
|
/*dragDisabled*/
|
|
6531
|
-
ctx[
|
|
6531
|
+
ctx[11]
|
|
6532
6532
|
),
|
|
6533
6533
|
autoAriaDisabled: true,
|
|
6534
6534
|
zoneItemTabIndex: (
|
|
6535
6535
|
/*currentTabContainer*/
|
|
6536
|
-
ctx[
|
|
6537
|
-
ctx[
|
|
6538
|
-
ctx[
|
|
6539
|
-
ctx[
|
|
6536
|
+
ctx[15] !== /*containerId*/
|
|
6537
|
+
ctx[3] || /*selectedItemId*/
|
|
6538
|
+
ctx[10] || /*isModalOpen*/
|
|
6539
|
+
ctx[16] ? -1 : 0
|
|
6540
6540
|
),
|
|
6541
6541
|
zoneTabIndex: -1
|
|
6542
6542
|
})),
|
|
@@ -6544,13 +6544,13 @@
|
|
|
6544
6544
|
section,
|
|
6545
6545
|
"consider",
|
|
6546
6546
|
/*handleDndConsider*/
|
|
6547
|
-
ctx[
|
|
6547
|
+
ctx[21]
|
|
6548
6548
|
),
|
|
6549
6549
|
listen(
|
|
6550
6550
|
section,
|
|
6551
6551
|
"finalize",
|
|
6552
6552
|
/*handleDndFinalize*/
|
|
6553
|
-
ctx[
|
|
6553
|
+
ctx[22]
|
|
6554
6554
|
)
|
|
6555
6555
|
];
|
|
6556
6556
|
mounted = true;
|
|
@@ -6559,10 +6559,10 @@
|
|
|
6559
6559
|
p(ctx2, dirty) {
|
|
6560
6560
|
if (
|
|
6561
6561
|
/*dragDisabled*/
|
|
6562
|
-
ctx2[
|
|
6563
|
-
ctx2[
|
|
6564
|
-
ctx2[
|
|
6565
|
-
ctx2[
|
|
6562
|
+
ctx2[11] && /*sourceSelectedContainerId*/
|
|
6563
|
+
ctx2[12] !== /*containerId*/
|
|
6564
|
+
ctx2[3] && !/*isFinished*/
|
|
6565
|
+
ctx2[8]
|
|
6566
6566
|
) {
|
|
6567
6567
|
if (if_block0) {
|
|
6568
6568
|
if_block0.p(ctx2, dirty);
|
|
@@ -6577,8 +6577,8 @@
|
|
|
6577
6577
|
}
|
|
6578
6578
|
if (
|
|
6579
6579
|
/*totalRemainingWordBinItem*/
|
|
6580
|
-
ctx2[
|
|
6581
|
-
ctx2[
|
|
6580
|
+
ctx2[14] <= 0 && /*isContainerWordBin*/
|
|
6581
|
+
ctx2[20]
|
|
6582
6582
|
) {
|
|
6583
6583
|
if (if_block1) {
|
|
6584
6584
|
if_block1.p(ctx2, dirty);
|
|
@@ -6591,76 +6591,76 @@
|
|
|
6591
6591
|
if_block1.d(1);
|
|
6592
6592
|
if_block1 = null;
|
|
6593
6593
|
}
|
|
6594
|
-
if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex, isContainerWordBin, containerId, currentTabContainer, isFinished*/
|
|
6595
|
-
|
|
6594
|
+
if (dirty[0] & /*items, considerItemId, showButton, currentWordBinIndex, isContainerWordBin, containerId, currentTabContainer, isFinished, categoryData, updateCategoryByButton*/
|
|
6595
|
+
17998633) {
|
|
6596
6596
|
each_value = ensure_array_like(Object.values(
|
|
6597
6597
|
/*items*/
|
|
6598
|
-
ctx2[
|
|
6598
|
+
ctx2[17]
|
|
6599
6599
|
));
|
|
6600
6600
|
group_outros();
|
|
6601
6601
|
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
6602
|
check_outros();
|
|
6603
6603
|
}
|
|
6604
6604
|
if (!current || dirty[0] & /*containerClass*/
|
|
6605
|
-
|
|
6606
|
-
ctx2[
|
|
6605
|
+
2 && section_class_value !== (section_class_value = "flex flex-wrap " + /*containerClass*/
|
|
6606
|
+
ctx2[1] + " category-content")) {
|
|
6607
6607
|
attr(section, "class", section_class_value);
|
|
6608
6608
|
}
|
|
6609
6609
|
if (!current || dirty[0] & /*isItemsAriaHidden*/
|
|
6610
|
-
|
|
6610
|
+
262144) {
|
|
6611
6611
|
attr(
|
|
6612
6612
|
section,
|
|
6613
6613
|
"aria-hidden",
|
|
6614
6614
|
/*isItemsAriaHidden*/
|
|
6615
|
-
ctx2[
|
|
6615
|
+
ctx2[18]
|
|
6616
6616
|
);
|
|
6617
6617
|
}
|
|
6618
6618
|
if (!current || dirty[0] & /*containerId*/
|
|
6619
|
-
|
|
6619
|
+
8) {
|
|
6620
6620
|
attr(
|
|
6621
6621
|
section,
|
|
6622
6622
|
"id",
|
|
6623
6623
|
/*containerId*/
|
|
6624
|
-
ctx2[
|
|
6624
|
+
ctx2[3]
|
|
6625
6625
|
);
|
|
6626
6626
|
}
|
|
6627
6627
|
if (!current || dirty[0] & /*paddingTop*/
|
|
6628
|
-
|
|
6629
|
-
ctx2[
|
|
6630
|
-
ctx2[
|
|
6628
|
+
64 && section_style_value !== (section_style_value = !/*isContainerWordBin*/
|
|
6629
|
+
ctx2[20] ? `padding-top: ${/*paddingTop*/
|
|
6630
|
+
ctx2[6]}px;` : "")) {
|
|
6631
6631
|
attr(section, "style", section_style_value);
|
|
6632
6632
|
}
|
|
6633
6633
|
if (dndzone_action && is_function(dndzone_action.update) && dirty[0] & /*items, flipDurationMs, type, dragDisabled, currentTabContainer, containerId, selectedItemId, isModalOpen*/
|
|
6634
|
-
|
|
6634
|
+
232476)
|
|
6635
6635
|
dndzone_action.update.call(null, {
|
|
6636
6636
|
items: (
|
|
6637
6637
|
/*items*/
|
|
6638
|
-
ctx2[
|
|
6638
|
+
ctx2[17]
|
|
6639
6639
|
),
|
|
6640
6640
|
flipDurationMs: (
|
|
6641
6641
|
/*flipDurationMs*/
|
|
6642
|
-
ctx2[
|
|
6642
|
+
ctx2[2]
|
|
6643
6643
|
),
|
|
6644
6644
|
type: (
|
|
6645
6645
|
/*type*/
|
|
6646
|
-
ctx2[
|
|
6646
|
+
ctx2[4]
|
|
6647
6647
|
),
|
|
6648
6648
|
dropTargetClasses: (
|
|
6649
6649
|
/*dropTargetClasses*/
|
|
6650
|
-
ctx2[
|
|
6650
|
+
ctx2[19]
|
|
6651
6651
|
),
|
|
6652
6652
|
morphDisabled: true,
|
|
6653
6653
|
dragDisabled: (
|
|
6654
6654
|
/*dragDisabled*/
|
|
6655
|
-
ctx2[
|
|
6655
|
+
ctx2[11]
|
|
6656
6656
|
),
|
|
6657
6657
|
autoAriaDisabled: true,
|
|
6658
6658
|
zoneItemTabIndex: (
|
|
6659
6659
|
/*currentTabContainer*/
|
|
6660
|
-
ctx2[
|
|
6661
|
-
ctx2[
|
|
6662
|
-
ctx2[
|
|
6663
|
-
ctx2[
|
|
6660
|
+
ctx2[15] !== /*containerId*/
|
|
6661
|
+
ctx2[3] || /*selectedItemId*/
|
|
6662
|
+
ctx2[10] || /*isModalOpen*/
|
|
6663
|
+
ctx2[16] ? -1 : 0
|
|
6664
6664
|
),
|
|
6665
6665
|
zoneTabIndex: -1
|
|
6666
6666
|
});
|
|
@@ -6708,6 +6708,8 @@
|
|
|
6708
6708
|
let { isFinished = false } = $$props;
|
|
6709
6709
|
let { correctAnswerList = [] } = $$props;
|
|
6710
6710
|
let { isPreviewModeInteractive = false } = $$props;
|
|
6711
|
+
let { categoryData = [] } = $$props;
|
|
6712
|
+
let { modalData = [] } = $$props;
|
|
6711
6713
|
let considerItemId = "";
|
|
6712
6714
|
let selectedItemId = "";
|
|
6713
6715
|
let dragDisabled = isFinished;
|
|
@@ -6723,61 +6725,25 @@
|
|
|
6723
6725
|
const dispatch = createEventDispatcher();
|
|
6724
6726
|
const dropTargetClasses = ["!outline-none"];
|
|
6725
6727
|
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
|
-
});
|
|
6728
|
+
const { rawCategoryItems } = categoryData;
|
|
6729
|
+
const updateCategoryData = (newSettings) => {
|
|
6730
|
+
$$invalidate(0, categoryData = { ...categoryData, ...newSettings });
|
|
6731
|
+
dispatch("updateCategorySettings", categoryData);
|
|
6732
|
+
};
|
|
6766
6733
|
const handleDndConsider = (e2) => {
|
|
6767
6734
|
const { detail, srcElement } = e2;
|
|
6768
6735
|
const { info } = detail;
|
|
6769
6736
|
const { trigger, id } = info;
|
|
6770
|
-
|
|
6771
|
-
...get_store_value(categoriseSettings),
|
|
6737
|
+
updateCategoryData({
|
|
6772
6738
|
considerContainerId: containerId,
|
|
6773
6739
|
considerCloneItemId: id,
|
|
6774
6740
|
considerItemId: id,
|
|
6775
6741
|
isDraggingOver: true
|
|
6776
6742
|
});
|
|
6777
|
-
const { sourceContainerId, sourceCloneContainerId } =
|
|
6743
|
+
const { sourceContainerId, sourceCloneContainerId } = categoryData;
|
|
6778
6744
|
if (trigger === TRIGGERS.DRAG_STARTED) {
|
|
6779
6745
|
const { items: cateoryItems } = detail;
|
|
6780
|
-
$$invalidate(
|
|
6746
|
+
$$invalidate(17, items = cateoryItems);
|
|
6781
6747
|
const orginalId = items.filter((item) => item[SHADOW_ITEM_MARKER_PROPERTY_NAME]);
|
|
6782
6748
|
const originalItemIndex = items.findIndex((item) => item.id === orginalId[0].id);
|
|
6783
6749
|
items.splice(originalItemIndex, 1, {
|
|
@@ -6787,21 +6753,14 @@
|
|
|
6787
6753
|
clonedId: id
|
|
6788
6754
|
});
|
|
6789
6755
|
if (!sourceContainerId) {
|
|
6790
|
-
|
|
6791
|
-
...get_store_value(categoriseSettings),
|
|
6792
|
-
sourceContainerId: srcElement.id
|
|
6793
|
-
});
|
|
6756
|
+
updateCategoryData({ sourceContainerId: srcElement.id });
|
|
6794
6757
|
}
|
|
6795
6758
|
if (!sourceCloneContainerId) {
|
|
6796
|
-
|
|
6797
|
-
...get_store_value(categoriseSettings),
|
|
6798
|
-
sourceCloneContainerId: srcElement.id
|
|
6799
|
-
});
|
|
6759
|
+
updateCategoryData({ sourceCloneContainerId: srcElement.id });
|
|
6800
6760
|
}
|
|
6801
6761
|
}
|
|
6802
6762
|
if (trigger === TRIGGERS.DRAGGED_LEFT) {
|
|
6803
|
-
|
|
6804
|
-
...get_store_value(categoriseSettings),
|
|
6763
|
+
updateCategoryData({
|
|
6805
6764
|
considerContainerId: "",
|
|
6806
6765
|
isDraggingOver: false
|
|
6807
6766
|
});
|
|
@@ -6810,24 +6769,20 @@
|
|
|
6810
6769
|
const handleDndFinalize = (e2) => {
|
|
6811
6770
|
const { items: categoryItems, info } = e2.detail;
|
|
6812
6771
|
const { trigger, id } = info;
|
|
6813
|
-
$$invalidate(
|
|
6772
|
+
$$invalidate(17, items = categoryItems.filter((item) => !item.isClonedItem));
|
|
6814
6773
|
if (trigger === TRIGGERS.DROPPED_INTO_ZONE) {
|
|
6815
6774
|
const { currentTarget } = e2;
|
|
6816
6775
|
addAnswerItemStore(id, currentTarget.id);
|
|
6817
6776
|
const itemIndex = rawCategoryItems.findIndex((item) => item.id === id);
|
|
6818
|
-
|
|
6819
|
-
...get_store_value(categoriseSettings),
|
|
6777
|
+
updateCategoryData({
|
|
6820
6778
|
selectedItemName: rawCategoryItems[itemIndex].text
|
|
6821
6779
|
});
|
|
6822
6780
|
}
|
|
6823
|
-
|
|
6824
|
-
...get_store_value(categoriseSettings),
|
|
6825
|
-
considerCloneItemId: ""
|
|
6826
|
-
});
|
|
6781
|
+
updateCategoryData({ considerCloneItemId: "" });
|
|
6827
6782
|
resetCategoriesSettings();
|
|
6828
6783
|
};
|
|
6829
6784
|
const saveAnswer = () => {
|
|
6830
|
-
const { currentAnswer: currentAnswer2, rawCategories, rawCategoryItems: rawCategoryItems2 } =
|
|
6785
|
+
const { currentAnswer: currentAnswer2, rawCategories, rawCategoryItems: rawCategoryItems2 } = categoryData;
|
|
6831
6786
|
const categoryAnswer = currentAnswer2.filter((answer) => answer.categoryId !== CONTAINER_WORD_BIN_ID).map((answer) => {
|
|
6832
6787
|
const { categoryId, itemId } = answer;
|
|
6833
6788
|
const categoryList = rawCategories.filter((category) => category.id === categoryId).map((category) => category.name)[0];
|
|
@@ -6856,17 +6811,13 @@
|
|
|
6856
6811
|
}
|
|
6857
6812
|
return { ...answer };
|
|
6858
6813
|
});
|
|
6859
|
-
|
|
6860
|
-
...get_store_value(categoriseSettings),
|
|
6861
|
-
currentAnswer: answerResult
|
|
6862
|
-
});
|
|
6814
|
+
updateCategoryData({ currentAnswer: answerResult });
|
|
6863
6815
|
} else {
|
|
6864
6816
|
dispatch("saveCategory", { answer_list: categoryAnswer });
|
|
6865
6817
|
}
|
|
6866
6818
|
};
|
|
6867
6819
|
const resetCategoriesSettings = () => {
|
|
6868
|
-
|
|
6869
|
-
...get_store_value(categoriseSettings),
|
|
6820
|
+
updateCategoryData({
|
|
6870
6821
|
considerContainerId: "",
|
|
6871
6822
|
considerItemId: "",
|
|
6872
6823
|
sourceContainerId: "",
|
|
@@ -6876,23 +6827,16 @@
|
|
|
6876
6827
|
const showAddItemAnimation = (dropContainerId) => {
|
|
6877
6828
|
setTimeout(
|
|
6878
6829
|
() => {
|
|
6879
|
-
|
|
6880
|
-
...get_store_value(categoriseSettings),
|
|
6881
|
-
dropContainerId
|
|
6882
|
-
});
|
|
6830
|
+
updateCategoryData({ dropContainerId });
|
|
6883
6831
|
setTimeout(
|
|
6884
6832
|
() => {
|
|
6885
|
-
|
|
6886
|
-
...get_store_value(categoriseSettings),
|
|
6887
|
-
hasAddItemAnimation: true
|
|
6888
|
-
});
|
|
6833
|
+
updateCategoryData({ hasAddItemAnimation: true });
|
|
6889
6834
|
},
|
|
6890
6835
|
300
|
|
6891
6836
|
);
|
|
6892
6837
|
setTimeout(
|
|
6893
6838
|
() => {
|
|
6894
|
-
|
|
6895
|
-
...get_store_value(categoriseSettings),
|
|
6839
|
+
updateCategoryData({
|
|
6896
6840
|
dropContainerId: "",
|
|
6897
6841
|
sourceCloneContainerId: "",
|
|
6898
6842
|
hasAddItemAnimation: false
|
|
@@ -6909,8 +6853,7 @@
|
|
|
6909
6853
|
return;
|
|
6910
6854
|
}
|
|
6911
6855
|
addAnswerItemStore(selectedItemId, containerId);
|
|
6912
|
-
|
|
6913
|
-
...get_store_value(categoriseSettings),
|
|
6856
|
+
updateCategoryData({
|
|
6914
6857
|
selectedItemId: "",
|
|
6915
6858
|
selectedContainerId: "",
|
|
6916
6859
|
sourceSelectedContainerId: "",
|
|
@@ -6962,40 +6905,97 @@
|
|
|
6962
6905
|
}
|
|
6963
6906
|
updateNavigateItem();
|
|
6964
6907
|
showAddItemAnimation(targetContainerId);
|
|
6965
|
-
|
|
6966
|
-
...get_store_value(categoriseSettings),
|
|
6908
|
+
updateCategoryData({
|
|
6967
6909
|
currentAnswer: updatedCurrentAnswer,
|
|
6968
6910
|
previewResultSr
|
|
6969
6911
|
});
|
|
6970
6912
|
saveAnswer();
|
|
6971
6913
|
};
|
|
6972
6914
|
const updateNavigateItem = () => {
|
|
6973
|
-
const { currentWordBinIndex: currentWordBinIndex2, currentAnswer: currentAnswer2 } =
|
|
6974
|
-
useNavigateItem(currentWordBinIndex2, currentAnswer2, "right", true);
|
|
6915
|
+
const { currentWordBinIndex: currentWordBinIndex2, currentAnswer: currentAnswer2 } = categoryData;
|
|
6916
|
+
const navigateItem = useNavigateItem(currentWordBinIndex2, currentAnswer2, "right", true);
|
|
6917
|
+
updateCategoryData(navigateItem);
|
|
6918
|
+
};
|
|
6919
|
+
const updateCategoryByButton = ({ detail }) => {
|
|
6920
|
+
updateCategoryData(detail);
|
|
6975
6921
|
};
|
|
6976
6922
|
$$self.$$set = ($$props2) => {
|
|
6977
6923
|
if ("containerClass" in $$props2)
|
|
6978
|
-
$$invalidate(
|
|
6924
|
+
$$invalidate(1, containerClass = $$props2.containerClass);
|
|
6979
6925
|
if ("flipDurationMs" in $$props2)
|
|
6980
|
-
$$invalidate(
|
|
6926
|
+
$$invalidate(2, flipDurationMs = $$props2.flipDurationMs);
|
|
6981
6927
|
if ("containerId" in $$props2)
|
|
6982
|
-
$$invalidate(
|
|
6928
|
+
$$invalidate(3, containerId = $$props2.containerId);
|
|
6983
6929
|
if ("type" in $$props2)
|
|
6984
|
-
$$invalidate(
|
|
6930
|
+
$$invalidate(4, type = $$props2.type);
|
|
6985
6931
|
if ("showButton" in $$props2)
|
|
6986
|
-
$$invalidate(
|
|
6932
|
+
$$invalidate(5, showButton = $$props2.showButton);
|
|
6987
6933
|
if ("paddingTop" in $$props2)
|
|
6988
|
-
$$invalidate(
|
|
6934
|
+
$$invalidate(6, paddingTop = $$props2.paddingTop);
|
|
6989
6935
|
if ("ariaLabel" in $$props2)
|
|
6990
|
-
$$invalidate(
|
|
6936
|
+
$$invalidate(7, ariaLabel = $$props2.ariaLabel);
|
|
6991
6937
|
if ("isFinished" in $$props2)
|
|
6992
|
-
$$invalidate(
|
|
6938
|
+
$$invalidate(8, isFinished = $$props2.isFinished);
|
|
6993
6939
|
if ("correctAnswerList" in $$props2)
|
|
6994
|
-
$$invalidate(
|
|
6940
|
+
$$invalidate(25, correctAnswerList = $$props2.correctAnswerList);
|
|
6995
6941
|
if ("isPreviewModeInteractive" in $$props2)
|
|
6996
|
-
$$invalidate(
|
|
6942
|
+
$$invalidate(26, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
|
|
6943
|
+
if ("categoryData" in $$props2)
|
|
6944
|
+
$$invalidate(0, categoryData = $$props2.categoryData);
|
|
6945
|
+
if ("modalData" in $$props2)
|
|
6946
|
+
$$invalidate(27, modalData = $$props2.modalData);
|
|
6947
|
+
};
|
|
6948
|
+
$$self.$$.update = () => {
|
|
6949
|
+
if ($$self.$$.dirty[0] & /*modalData*/
|
|
6950
|
+
134217728) {
|
|
6951
|
+
$:
|
|
6952
|
+
if (modalData) {
|
|
6953
|
+
const { isModalOpen: storeIsModalOpen } = modalData;
|
|
6954
|
+
$$invalidate(16, isModalOpen = storeIsModalOpen);
|
|
6955
|
+
}
|
|
6956
|
+
}
|
|
6957
|
+
if ($$self.$$.dirty[0] & /*categoryData, isFinished, currentAnswer, containerId, considerItemId, isPreviewModeInteractive*/
|
|
6958
|
+
335545097) {
|
|
6959
|
+
$:
|
|
6960
|
+
if (categoryData) {
|
|
6961
|
+
const { considerItemId: storeconsiderItemId, selectedItemId: storeSelectedItemId, currentAnswer: storeCurrentAnswer, sourceSelectedContainerId: storeSourceSelectedContainerId, currentWordBinIndex: storeCurrentWordBinIndex, currentTabContainer: storeCurrentTabContainer, isItemsAriaHidden: storeisItemsAriaHidden } = categoryData;
|
|
6962
|
+
$$invalidate(9, considerItemId = storeconsiderItemId);
|
|
6963
|
+
$$invalidate(11, dragDisabled = isFinished || !!storeSelectedItemId);
|
|
6964
|
+
$$invalidate(28, currentAnswer = storeCurrentAnswer);
|
|
6965
|
+
$$invalidate(10, selectedItemId = storeSelectedItemId);
|
|
6966
|
+
$$invalidate(12, sourceSelectedContainerId = storeSourceSelectedContainerId);
|
|
6967
|
+
$$invalidate(13, currentWordBinIndex = storeCurrentWordBinIndex);
|
|
6968
|
+
$$invalidate(15, currentTabContainer = storeCurrentTabContainer);
|
|
6969
|
+
$$invalidate(18, isItemsAriaHidden = storeisItemsAriaHidden);
|
|
6970
|
+
const storeWordBinItem = currentAnswer.filter((answer) => answer.categoryId === CONTAINER_WORD_BIN_ID);
|
|
6971
|
+
$$invalidate(14, totalRemainingWordBinItem = storeWordBinItem[0].itemId.length);
|
|
6972
|
+
if (storeCurrentAnswer) {
|
|
6973
|
+
const currentAnswerList = currentAnswer.filter((answer) => answer.categoryId === containerId);
|
|
6974
|
+
if (currentAnswerList.length) {
|
|
6975
|
+
$$invalidate(17, items = currentAnswerList[0].itemId.map((rawAnswerId) => {
|
|
6976
|
+
const splitId = rawAnswerId.split(EAT_DASH);
|
|
6977
|
+
const answerId = splitId[0];
|
|
6978
|
+
const answerIndex = rawCategoryItems.findIndex((answer) => answer.id === answerId);
|
|
6979
|
+
if (answerId === considerItemId) {
|
|
6980
|
+
return {
|
|
6981
|
+
id: cloneId,
|
|
6982
|
+
text: rawCategoryItems[answerIndex].text,
|
|
6983
|
+
isClonedItem: true,
|
|
6984
|
+
cloneId: rawCategoryItems[answerIndex].id
|
|
6985
|
+
};
|
|
6986
|
+
}
|
|
6987
|
+
return {
|
|
6988
|
+
...rawCategoryItems[answerIndex],
|
|
6989
|
+
type: isFinished || isPreviewModeInteractive ? splitId[1] : ""
|
|
6990
|
+
};
|
|
6991
|
+
}));
|
|
6992
|
+
}
|
|
6993
|
+
}
|
|
6994
|
+
}
|
|
6995
|
+
}
|
|
6997
6996
|
};
|
|
6998
6997
|
return [
|
|
6998
|
+
categoryData,
|
|
6999
6999
|
containerClass,
|
|
7000
7000
|
flipDurationMs,
|
|
7001
7001
|
containerId,
|
|
@@ -7019,8 +7019,11 @@
|
|
|
7019
7019
|
handleDndConsider,
|
|
7020
7020
|
handleDndFinalize,
|
|
7021
7021
|
addAnswerItem,
|
|
7022
|
+
updateCategoryByButton,
|
|
7022
7023
|
correctAnswerList,
|
|
7023
|
-
isPreviewModeInteractive
|
|
7024
|
+
isPreviewModeInteractive,
|
|
7025
|
+
modalData,
|
|
7026
|
+
currentAnswer
|
|
7024
7027
|
];
|
|
7025
7028
|
}
|
|
7026
7029
|
var PromptCategoriseDndContainer = class extends SvelteComponent {
|
|
@@ -7033,93 +7036,109 @@
|
|
|
7033
7036
|
create_fragment10,
|
|
7034
7037
|
safe_not_equal,
|
|
7035
7038
|
{
|
|
7036
|
-
containerClass:
|
|
7037
|
-
flipDurationMs:
|
|
7038
|
-
containerId:
|
|
7039
|
-
type:
|
|
7040
|
-
showButton:
|
|
7041
|
-
paddingTop:
|
|
7042
|
-
ariaLabel:
|
|
7043
|
-
isFinished:
|
|
7044
|
-
correctAnswerList:
|
|
7045
|
-
isPreviewModeInteractive:
|
|
7039
|
+
containerClass: 1,
|
|
7040
|
+
flipDurationMs: 2,
|
|
7041
|
+
containerId: 3,
|
|
7042
|
+
type: 4,
|
|
7043
|
+
showButton: 5,
|
|
7044
|
+
paddingTop: 6,
|
|
7045
|
+
ariaLabel: 7,
|
|
7046
|
+
isFinished: 8,
|
|
7047
|
+
correctAnswerList: 25,
|
|
7048
|
+
isPreviewModeInteractive: 26,
|
|
7049
|
+
categoryData: 0,
|
|
7050
|
+
modalData: 27
|
|
7046
7051
|
},
|
|
7047
7052
|
null,
|
|
7048
7053
|
[-1, -1]
|
|
7049
7054
|
);
|
|
7050
7055
|
}
|
|
7051
7056
|
get containerClass() {
|
|
7052
|
-
return this.$$.ctx[
|
|
7057
|
+
return this.$$.ctx[1];
|
|
7053
7058
|
}
|
|
7054
7059
|
set containerClass(containerClass) {
|
|
7055
7060
|
this.$$set({ containerClass });
|
|
7056
7061
|
flush();
|
|
7057
7062
|
}
|
|
7058
7063
|
get flipDurationMs() {
|
|
7059
|
-
return this.$$.ctx[
|
|
7064
|
+
return this.$$.ctx[2];
|
|
7060
7065
|
}
|
|
7061
7066
|
set flipDurationMs(flipDurationMs) {
|
|
7062
7067
|
this.$$set({ flipDurationMs });
|
|
7063
7068
|
flush();
|
|
7064
7069
|
}
|
|
7065
7070
|
get containerId() {
|
|
7066
|
-
return this.$$.ctx[
|
|
7071
|
+
return this.$$.ctx[3];
|
|
7067
7072
|
}
|
|
7068
7073
|
set containerId(containerId) {
|
|
7069
7074
|
this.$$set({ containerId });
|
|
7070
7075
|
flush();
|
|
7071
7076
|
}
|
|
7072
7077
|
get type() {
|
|
7073
|
-
return this.$$.ctx[
|
|
7078
|
+
return this.$$.ctx[4];
|
|
7074
7079
|
}
|
|
7075
7080
|
set type(type) {
|
|
7076
7081
|
this.$$set({ type });
|
|
7077
7082
|
flush();
|
|
7078
7083
|
}
|
|
7079
7084
|
get showButton() {
|
|
7080
|
-
return this.$$.ctx[
|
|
7085
|
+
return this.$$.ctx[5];
|
|
7081
7086
|
}
|
|
7082
7087
|
set showButton(showButton) {
|
|
7083
7088
|
this.$$set({ showButton });
|
|
7084
7089
|
flush();
|
|
7085
7090
|
}
|
|
7086
7091
|
get paddingTop() {
|
|
7087
|
-
return this.$$.ctx[
|
|
7092
|
+
return this.$$.ctx[6];
|
|
7088
7093
|
}
|
|
7089
7094
|
set paddingTop(paddingTop) {
|
|
7090
7095
|
this.$$set({ paddingTop });
|
|
7091
7096
|
flush();
|
|
7092
7097
|
}
|
|
7093
7098
|
get ariaLabel() {
|
|
7094
|
-
return this.$$.ctx[
|
|
7099
|
+
return this.$$.ctx[7];
|
|
7095
7100
|
}
|
|
7096
7101
|
set ariaLabel(ariaLabel) {
|
|
7097
7102
|
this.$$set({ ariaLabel });
|
|
7098
7103
|
flush();
|
|
7099
7104
|
}
|
|
7100
7105
|
get isFinished() {
|
|
7101
|
-
return this.$$.ctx[
|
|
7106
|
+
return this.$$.ctx[8];
|
|
7102
7107
|
}
|
|
7103
7108
|
set isFinished(isFinished) {
|
|
7104
7109
|
this.$$set({ isFinished });
|
|
7105
7110
|
flush();
|
|
7106
7111
|
}
|
|
7107
7112
|
get correctAnswerList() {
|
|
7108
|
-
return this.$$.ctx[
|
|
7113
|
+
return this.$$.ctx[25];
|
|
7109
7114
|
}
|
|
7110
7115
|
set correctAnswerList(correctAnswerList) {
|
|
7111
7116
|
this.$$set({ correctAnswerList });
|
|
7112
7117
|
flush();
|
|
7113
7118
|
}
|
|
7114
7119
|
get isPreviewModeInteractive() {
|
|
7115
|
-
return this.$$.ctx[
|
|
7120
|
+
return this.$$.ctx[26];
|
|
7116
7121
|
}
|
|
7117
7122
|
set isPreviewModeInteractive(isPreviewModeInteractive) {
|
|
7118
7123
|
this.$$set({ isPreviewModeInteractive });
|
|
7119
7124
|
flush();
|
|
7120
7125
|
}
|
|
7126
|
+
get categoryData() {
|
|
7127
|
+
return this.$$.ctx[0];
|
|
7128
|
+
}
|
|
7129
|
+
set categoryData(categoryData) {
|
|
7130
|
+
this.$$set({ categoryData });
|
|
7131
|
+
flush();
|
|
7132
|
+
}
|
|
7133
|
+
get modalData() {
|
|
7134
|
+
return this.$$.ctx[27];
|
|
7135
|
+
}
|
|
7136
|
+
set modalData(modalData) {
|
|
7137
|
+
this.$$set({ modalData });
|
|
7138
|
+
flush();
|
|
7139
|
+
}
|
|
7121
7140
|
};
|
|
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));
|
|
7141
|
+
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
7142
|
var PromptCategoriseDndContainer_default = PromptCategoriseDndContainer;
|
|
7124
7143
|
|
|
7125
7144
|
// src/lib/components/common/CommonModal.svelte
|
|
@@ -7134,13 +7153,13 @@
|
|
|
7134
7153
|
let dispose;
|
|
7135
7154
|
const default_slot_template = (
|
|
7136
7155
|
/*#slots*/
|
|
7137
|
-
ctx[
|
|
7156
|
+
ctx[5].default
|
|
7138
7157
|
);
|
|
7139
7158
|
const default_slot = create_slot(
|
|
7140
7159
|
default_slot_template,
|
|
7141
7160
|
ctx,
|
|
7142
7161
|
/*$$scope*/
|
|
7143
|
-
ctx[
|
|
7162
|
+
ctx[4],
|
|
7144
7163
|
null
|
|
7145
7164
|
);
|
|
7146
7165
|
return {
|
|
@@ -7195,20 +7214,20 @@
|
|
|
7195
7214
|
p(ctx2, [dirty]) {
|
|
7196
7215
|
if (default_slot) {
|
|
7197
7216
|
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
7198
|
-
|
|
7217
|
+
16)) {
|
|
7199
7218
|
update_slot_base(
|
|
7200
7219
|
default_slot,
|
|
7201
7220
|
default_slot_template,
|
|
7202
7221
|
ctx2,
|
|
7203
7222
|
/*$$scope*/
|
|
7204
|
-
ctx2[
|
|
7223
|
+
ctx2[4],
|
|
7205
7224
|
!current ? get_all_dirty_from_scope(
|
|
7206
7225
|
/*$$scope*/
|
|
7207
|
-
ctx2[
|
|
7226
|
+
ctx2[4]
|
|
7208
7227
|
) : get_slot_changes(
|
|
7209
7228
|
default_slot_template,
|
|
7210
7229
|
/*$$scope*/
|
|
7211
|
-
ctx2[
|
|
7230
|
+
ctx2[4],
|
|
7212
7231
|
dirty,
|
|
7213
7232
|
null
|
|
7214
7233
|
),
|
|
@@ -7257,33 +7276,47 @@
|
|
|
7257
7276
|
};
|
|
7258
7277
|
function instance7($$self, $$props, $$invalidate) {
|
|
7259
7278
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
7279
|
+
let { modalData = [] } = $$props;
|
|
7280
|
+
const dispatch = createEventDispatcher();
|
|
7260
7281
|
let modalAriaLabel = "";
|
|
7261
7282
|
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
7283
|
const clickModalBackground = () => {
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
isModalOpen: false,
|
|
7271
|
-
modalAriaLabel: ""
|
|
7272
|
-
});
|
|
7284
|
+
$$invalidate(3, modalData = { isModalOpen: false, modalAriaLabel: "" });
|
|
7285
|
+
dispatch("updateModalSettings", modalData);
|
|
7273
7286
|
};
|
|
7274
7287
|
$$self.$$set = ($$props2) => {
|
|
7288
|
+
if ("modalData" in $$props2)
|
|
7289
|
+
$$invalidate(3, modalData = $$props2.modalData);
|
|
7275
7290
|
if ("$$scope" in $$props2)
|
|
7276
|
-
$$invalidate(
|
|
7291
|
+
$$invalidate(4, $$scope = $$props2.$$scope);
|
|
7277
7292
|
};
|
|
7278
|
-
|
|
7293
|
+
$$self.$$.update = () => {
|
|
7294
|
+
if ($$self.$$.dirty & /*modalData*/
|
|
7295
|
+
8) {
|
|
7296
|
+
$:
|
|
7297
|
+
if (modalData) {
|
|
7298
|
+
const { modalAriaLabel: storeModalAriaLabel, isModalOpen: storeIsmodalOpen } = modalData;
|
|
7299
|
+
$$invalidate(0, modalAriaLabel = storeModalAriaLabel);
|
|
7300
|
+
$$invalidate(1, isModalOpen = storeIsmodalOpen);
|
|
7301
|
+
}
|
|
7302
|
+
}
|
|
7303
|
+
};
|
|
7304
|
+
return [modalAriaLabel, isModalOpen, clickModalBackground, modalData, $$scope, slots];
|
|
7279
7305
|
}
|
|
7280
7306
|
var CommonModal = class extends SvelteComponent {
|
|
7281
7307
|
constructor(options) {
|
|
7282
7308
|
super();
|
|
7283
|
-
init(this, options, instance7, create_fragment11, safe_not_equal, {});
|
|
7309
|
+
init(this, options, instance7, create_fragment11, safe_not_equal, { modalData: 3 });
|
|
7310
|
+
}
|
|
7311
|
+
get modalData() {
|
|
7312
|
+
return this.$$.ctx[3];
|
|
7313
|
+
}
|
|
7314
|
+
set modalData(modalData) {
|
|
7315
|
+
this.$$set({ modalData });
|
|
7316
|
+
flush();
|
|
7284
7317
|
}
|
|
7285
7318
|
};
|
|
7286
|
-
customElements.define("common-modal", create_custom_element(CommonModal, {}, ["default"], [], true));
|
|
7319
|
+
customElements.define("common-modal", create_custom_element(CommonModal, { "modalData": {} }, ["default"], [], true));
|
|
7287
7320
|
var CommonModal_default = CommonModal;
|
|
7288
7321
|
|
|
7289
7322
|
// src/lib/assets/img/messaging/AlertIcon.svelte
|
|
@@ -7425,7 +7458,7 @@
|
|
|
7425
7458
|
div0,
|
|
7426
7459
|
"aria-hidden",
|
|
7427
7460
|
/*ariaHidden*/
|
|
7428
|
-
ctx[
|
|
7461
|
+
ctx[2]
|
|
7429
7462
|
);
|
|
7430
7463
|
attr(span1, "class", "text-xl leading-6 font-bold ml-3 grow");
|
|
7431
7464
|
attr(button0, "aria-label", "Close");
|
|
@@ -7442,7 +7475,7 @@
|
|
|
7442
7475
|
m(target, anchor) {
|
|
7443
7476
|
insert(target, div0, anchor);
|
|
7444
7477
|
append(div0, t0);
|
|
7445
|
-
ctx[
|
|
7478
|
+
ctx[7](div0);
|
|
7446
7479
|
insert(target, t1, anchor);
|
|
7447
7480
|
insert(target, div3, anchor);
|
|
7448
7481
|
append(div3, div1);
|
|
@@ -7467,19 +7500,19 @@
|
|
|
7467
7500
|
button0,
|
|
7468
7501
|
"click",
|
|
7469
7502
|
/*closeResetModal*/
|
|
7470
|
-
ctx[
|
|
7503
|
+
ctx[3]
|
|
7471
7504
|
),
|
|
7472
7505
|
listen(
|
|
7473
7506
|
button1,
|
|
7474
7507
|
"click",
|
|
7475
7508
|
/*closeResetModal*/
|
|
7476
|
-
ctx[
|
|
7509
|
+
ctx[3]
|
|
7477
7510
|
),
|
|
7478
7511
|
listen(
|
|
7479
7512
|
button2,
|
|
7480
7513
|
"click",
|
|
7481
7514
|
/*resetCategories*/
|
|
7482
|
-
ctx[
|
|
7515
|
+
ctx[5]
|
|
7483
7516
|
)
|
|
7484
7517
|
];
|
|
7485
7518
|
mounted = true;
|
|
@@ -7487,12 +7520,12 @@
|
|
|
7487
7520
|
},
|
|
7488
7521
|
p(ctx2, dirty) {
|
|
7489
7522
|
if (!current || dirty & /*ariaHidden*/
|
|
7490
|
-
|
|
7523
|
+
4) {
|
|
7491
7524
|
attr(
|
|
7492
7525
|
div0,
|
|
7493
7526
|
"aria-hidden",
|
|
7494
7527
|
/*ariaHidden*/
|
|
7495
|
-
ctx2[
|
|
7528
|
+
ctx2[2]
|
|
7496
7529
|
);
|
|
7497
7530
|
}
|
|
7498
7531
|
},
|
|
@@ -7514,7 +7547,7 @@
|
|
|
7514
7547
|
detach(t1);
|
|
7515
7548
|
detach(div3);
|
|
7516
7549
|
}
|
|
7517
|
-
ctx[
|
|
7550
|
+
ctx[7](null);
|
|
7518
7551
|
destroy_component(alerticon);
|
|
7519
7552
|
destroy_component(crossicon);
|
|
7520
7553
|
mounted = false;
|
|
@@ -7527,10 +7560,19 @@
|
|
|
7527
7560
|
let current;
|
|
7528
7561
|
commonmodal = new CommonModal_default({
|
|
7529
7562
|
props: {
|
|
7563
|
+
modalData: (
|
|
7564
|
+
/*modalData*/
|
|
7565
|
+
ctx[0]
|
|
7566
|
+
),
|
|
7530
7567
|
$$slots: { default: [create_default_slot3] },
|
|
7531
7568
|
$$scope: { ctx }
|
|
7532
7569
|
}
|
|
7533
7570
|
});
|
|
7571
|
+
commonmodal.$on(
|
|
7572
|
+
"updateModalSettings",
|
|
7573
|
+
/*updateModal*/
|
|
7574
|
+
ctx[4]
|
|
7575
|
+
);
|
|
7534
7576
|
return {
|
|
7535
7577
|
c() {
|
|
7536
7578
|
create_component(commonmodal.$$.fragment);
|
|
@@ -7541,8 +7583,12 @@
|
|
|
7541
7583
|
},
|
|
7542
7584
|
p(ctx2, [dirty]) {
|
|
7543
7585
|
const commonmodal_changes = {};
|
|
7586
|
+
if (dirty & /*modalData*/
|
|
7587
|
+
1)
|
|
7588
|
+
commonmodal_changes.modalData = /*modalData*/
|
|
7589
|
+
ctx2[0];
|
|
7544
7590
|
if (dirty & /*$$scope, ariaHidden, categoryModal*/
|
|
7545
|
-
|
|
7591
|
+
2054) {
|
|
7546
7592
|
commonmodal_changes.$$scope = { dirty, ctx: ctx2 };
|
|
7547
7593
|
}
|
|
7548
7594
|
commonmodal.$set(commonmodal_changes);
|
|
@@ -7563,26 +7609,35 @@
|
|
|
7563
7609
|
};
|
|
7564
7610
|
}
|
|
7565
7611
|
function instance8($$self, $$props, $$invalidate) {
|
|
7612
|
+
let { categoryData = [] } = $$props;
|
|
7613
|
+
let { modalData = [] } = $$props;
|
|
7566
7614
|
let categoryModal;
|
|
7567
7615
|
let ariaHidden = false;
|
|
7568
|
-
const { isModalOpen } =
|
|
7616
|
+
const { isModalOpen } = modalData;
|
|
7617
|
+
const dispatch = createEventDispatcher();
|
|
7569
7618
|
if (isModalOpen) {
|
|
7570
7619
|
setTimeout(() => {
|
|
7571
7620
|
categoryModal.focus();
|
|
7572
|
-
$$invalidate(
|
|
7621
|
+
$$invalidate(2, ariaHidden = true);
|
|
7573
7622
|
});
|
|
7574
7623
|
}
|
|
7575
7624
|
const closeResetModal = () => {
|
|
7576
|
-
|
|
7577
|
-
...get_store_value(modalSettings),
|
|
7625
|
+
$$invalidate(0, modalData = {
|
|
7578
7626
|
isModalOpen: false,
|
|
7579
7627
|
modalAriaLabel: "",
|
|
7580
7628
|
isOpenLastStatus: true
|
|
7581
7629
|
});
|
|
7630
|
+
dispatchModalData(modalData);
|
|
7631
|
+
};
|
|
7632
|
+
const updateModal = ({ detail }) => {
|
|
7633
|
+
$$invalidate(0, modalData = { ...modalData, ...detail });
|
|
7634
|
+
dispatchModalData(modalData);
|
|
7635
|
+
};
|
|
7636
|
+
const dispatchModalData = (newSettings) => {
|
|
7637
|
+
dispatch("updateModalSettings", newSettings);
|
|
7582
7638
|
};
|
|
7583
|
-
const dispatch = createEventDispatcher();
|
|
7584
7639
|
const resetCategories = () => {
|
|
7585
|
-
const { currentAnswer, rawCategoryItems } =
|
|
7640
|
+
const { currentAnswer, rawCategoryItems } = categoryData;
|
|
7586
7641
|
const wordBinItems = rawCategoryItems.map((item) => item.id);
|
|
7587
7642
|
const shuffledWordBinItems = wordBinItems.map((value) => ({ value, sort: Math.random() })).sort((a, b) => a.sort - b.sort).map(({ value }) => value);
|
|
7588
7643
|
const resetCurrentAnswer = currentAnswer.map((answer) => {
|
|
@@ -7591,8 +7646,8 @@
|
|
|
7591
7646
|
itemId: answer.categoryId === CONTAINER_WORD_BIN_ID ? shuffledWordBinItems : []
|
|
7592
7647
|
};
|
|
7593
7648
|
});
|
|
7594
|
-
|
|
7595
|
-
...
|
|
7649
|
+
$$invalidate(6, categoryData = {
|
|
7650
|
+
...categoryData,
|
|
7596
7651
|
considerContainerId: "",
|
|
7597
7652
|
considerItemId: "",
|
|
7598
7653
|
considerCloneItemId: "",
|
|
@@ -7606,24 +7661,54 @@
|
|
|
7606
7661
|
currentAnswer: resetCurrentAnswer,
|
|
7607
7662
|
hasAddItemAnimation: false
|
|
7608
7663
|
});
|
|
7664
|
+
dispatch("updateCategorySettings", categoryData);
|
|
7609
7665
|
dispatch("resetCategory", { answer_list: [] });
|
|
7610
7666
|
closeResetModal();
|
|
7611
7667
|
};
|
|
7612
7668
|
function div0_binding($$value) {
|
|
7613
7669
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
7614
7670
|
categoryModal = $$value;
|
|
7615
|
-
$$invalidate(
|
|
7671
|
+
$$invalidate(1, categoryModal);
|
|
7616
7672
|
});
|
|
7617
7673
|
}
|
|
7618
|
-
|
|
7674
|
+
$$self.$$set = ($$props2) => {
|
|
7675
|
+
if ("categoryData" in $$props2)
|
|
7676
|
+
$$invalidate(6, categoryData = $$props2.categoryData);
|
|
7677
|
+
if ("modalData" in $$props2)
|
|
7678
|
+
$$invalidate(0, modalData = $$props2.modalData);
|
|
7679
|
+
};
|
|
7680
|
+
return [
|
|
7681
|
+
modalData,
|
|
7682
|
+
categoryModal,
|
|
7683
|
+
ariaHidden,
|
|
7684
|
+
closeResetModal,
|
|
7685
|
+
updateModal,
|
|
7686
|
+
resetCategories,
|
|
7687
|
+
categoryData,
|
|
7688
|
+
div0_binding
|
|
7689
|
+
];
|
|
7619
7690
|
}
|
|
7620
7691
|
var PromptCategoriseModal = class extends SvelteComponent {
|
|
7621
7692
|
constructor(options) {
|
|
7622
7693
|
super();
|
|
7623
|
-
init(this, options, instance8, create_fragment14, safe_not_equal, {});
|
|
7694
|
+
init(this, options, instance8, create_fragment14, safe_not_equal, { categoryData: 6, modalData: 0 });
|
|
7695
|
+
}
|
|
7696
|
+
get categoryData() {
|
|
7697
|
+
return this.$$.ctx[6];
|
|
7698
|
+
}
|
|
7699
|
+
set categoryData(categoryData) {
|
|
7700
|
+
this.$$set({ categoryData });
|
|
7701
|
+
flush();
|
|
7702
|
+
}
|
|
7703
|
+
get modalData() {
|
|
7704
|
+
return this.$$.ctx[0];
|
|
7705
|
+
}
|
|
7706
|
+
set modalData(modalData) {
|
|
7707
|
+
this.$$set({ modalData });
|
|
7708
|
+
flush();
|
|
7624
7709
|
}
|
|
7625
7710
|
};
|
|
7626
|
-
customElements.define("prompy-categorise-modal", create_custom_element(PromptCategoriseModal, {}, [], [], true));
|
|
7711
|
+
customElements.define("prompy-categorise-modal", create_custom_element(PromptCategoriseModal, { "categoryData": {}, "modalData": {} }, [], [], true));
|
|
7627
7712
|
var PromptCategoriseModal_default = PromptCategoriseModal;
|
|
7628
7713
|
|
|
7629
7714
|
// src/lib/assets/img/action/Switch.svelte
|
|
@@ -8035,19 +8120,40 @@
|
|
|
8035
8120
|
// src/lib/components/prompt/categorise/PromptCategorise.svelte
|
|
8036
8121
|
function get_each_context3(ctx, list, i) {
|
|
8037
8122
|
const child_ctx = ctx.slice();
|
|
8038
|
-
child_ctx[
|
|
8039
|
-
child_ctx[
|
|
8040
|
-
child_ctx[
|
|
8123
|
+
child_ctx[67] = list[i];
|
|
8124
|
+
child_ctx[68] = list;
|
|
8125
|
+
child_ctx[69] = i;
|
|
8041
8126
|
return child_ctx;
|
|
8042
8127
|
}
|
|
8043
8128
|
function create_if_block_6(ctx) {
|
|
8044
8129
|
let promptcategorisemodal;
|
|
8045
8130
|
let current;
|
|
8046
|
-
promptcategorisemodal = new PromptCategoriseModal_default({
|
|
8131
|
+
promptcategorisemodal = new PromptCategoriseModal_default({
|
|
8132
|
+
props: {
|
|
8133
|
+
categoryData: (
|
|
8134
|
+
/*categoriseSettingsData*/
|
|
8135
|
+
ctx[6]
|
|
8136
|
+
),
|
|
8137
|
+
modalData: (
|
|
8138
|
+
/*modalSettingsData*/
|
|
8139
|
+
ctx[7]
|
|
8140
|
+
)
|
|
8141
|
+
}
|
|
8142
|
+
});
|
|
8143
|
+
promptcategorisemodal.$on(
|
|
8144
|
+
"updateCategorySettings",
|
|
8145
|
+
/*updateCategory*/
|
|
8146
|
+
ctx[40]
|
|
8147
|
+
);
|
|
8148
|
+
promptcategorisemodal.$on(
|
|
8149
|
+
"updateModalSettings",
|
|
8150
|
+
/*updateModal*/
|
|
8151
|
+
ctx[46]
|
|
8152
|
+
);
|
|
8047
8153
|
promptcategorisemodal.$on(
|
|
8048
8154
|
"resetCategory",
|
|
8049
8155
|
/*saveCategory*/
|
|
8050
|
-
ctx[
|
|
8156
|
+
ctx[39]
|
|
8051
8157
|
);
|
|
8052
8158
|
return {
|
|
8053
8159
|
c() {
|
|
@@ -8057,7 +8163,18 @@
|
|
|
8057
8163
|
mount_component(promptcategorisemodal, target, anchor);
|
|
8058
8164
|
current = true;
|
|
8059
8165
|
},
|
|
8060
|
-
p
|
|
8166
|
+
p(ctx2, dirty) {
|
|
8167
|
+
const promptcategorisemodal_changes = {};
|
|
8168
|
+
if (dirty[0] & /*categoriseSettingsData*/
|
|
8169
|
+
64)
|
|
8170
|
+
promptcategorisemodal_changes.categoryData = /*categoriseSettingsData*/
|
|
8171
|
+
ctx2[6];
|
|
8172
|
+
if (dirty[0] & /*modalSettingsData*/
|
|
8173
|
+
128)
|
|
8174
|
+
promptcategorisemodal_changes.modalData = /*modalSettingsData*/
|
|
8175
|
+
ctx2[7];
|
|
8176
|
+
promptcategorisemodal.$set(promptcategorisemodal_changes);
|
|
8177
|
+
},
|
|
8061
8178
|
i(local) {
|
|
8062
8179
|
if (current)
|
|
8063
8180
|
return;
|
|
@@ -8097,7 +8214,7 @@
|
|
|
8097
8214
|
button,
|
|
8098
8215
|
"tabindex",
|
|
8099
8216
|
/*categoryTabIndex*/
|
|
8100
|
-
ctx[
|
|
8217
|
+
ctx[20]
|
|
8101
8218
|
);
|
|
8102
8219
|
attr(button, "aria-label", "Reset words");
|
|
8103
8220
|
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 +8231,19 @@
|
|
|
8114
8231
|
button,
|
|
8115
8232
|
"click",
|
|
8116
8233
|
/*openResetModal*/
|
|
8117
|
-
ctx[
|
|
8234
|
+
ctx[33]
|
|
8118
8235
|
);
|
|
8119
8236
|
mounted = true;
|
|
8120
8237
|
}
|
|
8121
8238
|
},
|
|
8122
8239
|
p(ctx2, dirty) {
|
|
8123
8240
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
8124
|
-
|
|
8241
|
+
1048576) {
|
|
8125
8242
|
attr(
|
|
8126
8243
|
button,
|
|
8127
8244
|
"tabindex",
|
|
8128
8245
|
/*categoryTabIndex*/
|
|
8129
|
-
ctx2[
|
|
8246
|
+
ctx2[20]
|
|
8130
8247
|
);
|
|
8131
8248
|
}
|
|
8132
8249
|
},
|
|
@@ -8161,7 +8278,7 @@
|
|
|
8161
8278
|
t0 = text("Option ");
|
|
8162
8279
|
t1 = text(
|
|
8163
8280
|
/*selectedItemName*/
|
|
8164
|
-
ctx[
|
|
8281
|
+
ctx[21]
|
|
8165
8282
|
);
|
|
8166
8283
|
t2 = text(" added in:\xA0");
|
|
8167
8284
|
attr(span, "class", "sr-only");
|
|
@@ -8174,11 +8291,11 @@
|
|
|
8174
8291
|
},
|
|
8175
8292
|
p(ctx2, dirty) {
|
|
8176
8293
|
if (dirty[0] & /*selectedItemName*/
|
|
8177
|
-
|
|
8294
|
+
2097152)
|
|
8178
8295
|
set_data(
|
|
8179
8296
|
t1,
|
|
8180
8297
|
/*selectedItemName*/
|
|
8181
|
-
ctx2[
|
|
8298
|
+
ctx2[21]
|
|
8182
8299
|
);
|
|
8183
8300
|
},
|
|
8184
8301
|
d(detaching) {
|
|
@@ -8193,11 +8310,11 @@
|
|
|
8193
8310
|
let t0;
|
|
8194
8311
|
let t1_value = (
|
|
8195
8312
|
/*getTotalWordsLabel*/
|
|
8196
|
-
ctx[
|
|
8313
|
+
ctx[35](
|
|
8197
8314
|
/*totalCategoryWords*/
|
|
8198
|
-
ctx[
|
|
8315
|
+
ctx[5][
|
|
8199
8316
|
/*category*/
|
|
8200
|
-
ctx[
|
|
8317
|
+
ctx[67].id
|
|
8201
8318
|
]
|
|
8202
8319
|
) + ""
|
|
8203
8320
|
);
|
|
@@ -8219,12 +8336,12 @@
|
|
|
8219
8336
|
},
|
|
8220
8337
|
p(ctx2, dirty) {
|
|
8221
8338
|
if (dirty[0] & /*totalCategoryWords*/
|
|
8222
|
-
|
|
8223
|
-
ctx2[
|
|
8339
|
+
32 && t1_value !== (t1_value = /*getTotalWordsLabel*/
|
|
8340
|
+
ctx2[35](
|
|
8224
8341
|
/*totalCategoryWords*/
|
|
8225
|
-
ctx2[
|
|
8342
|
+
ctx2[5][
|
|
8226
8343
|
/*category*/
|
|
8227
|
-
ctx2[
|
|
8344
|
+
ctx2[67].id
|
|
8228
8345
|
]
|
|
8229
8346
|
) + ""))
|
|
8230
8347
|
set_data(t1, t1_value);
|
|
@@ -8249,12 +8366,12 @@
|
|
|
8249
8366
|
t0 = text(". Student's answer: ");
|
|
8250
8367
|
t1 = text(
|
|
8251
8368
|
/*selectedItemName*/
|
|
8252
|
-
ctx[
|
|
8369
|
+
ctx[21]
|
|
8253
8370
|
);
|
|
8254
8371
|
t2 = text(" (");
|
|
8255
8372
|
t3 = text(
|
|
8256
8373
|
/*previewResultSr*/
|
|
8257
|
-
ctx[
|
|
8374
|
+
ctx[4]
|
|
8258
8375
|
);
|
|
8259
8376
|
t4 = text(")");
|
|
8260
8377
|
attr(span, "class", "sr-only");
|
|
@@ -8269,18 +8386,18 @@
|
|
|
8269
8386
|
},
|
|
8270
8387
|
p(ctx2, dirty) {
|
|
8271
8388
|
if (dirty[0] & /*selectedItemName*/
|
|
8272
|
-
|
|
8389
|
+
2097152)
|
|
8273
8390
|
set_data(
|
|
8274
8391
|
t1,
|
|
8275
8392
|
/*selectedItemName*/
|
|
8276
|
-
ctx2[
|
|
8393
|
+
ctx2[21]
|
|
8277
8394
|
);
|
|
8278
8395
|
if (dirty[0] & /*previewResultSr*/
|
|
8279
|
-
|
|
8396
|
+
16)
|
|
8280
8397
|
set_data(
|
|
8281
8398
|
t3,
|
|
8282
8399
|
/*previewResultSr*/
|
|
8283
|
-
ctx2[
|
|
8400
|
+
ctx2[4]
|
|
8284
8401
|
);
|
|
8285
8402
|
},
|
|
8286
8403
|
d(detaching) {
|
|
@@ -8349,11 +8466,11 @@
|
|
|
8349
8466
|
let div0;
|
|
8350
8467
|
let show_if_1 = (
|
|
8351
8468
|
/*checkContainerDroppedItem*/
|
|
8352
|
-
ctx[
|
|
8469
|
+
ctx[31](
|
|
8353
8470
|
/*category*/
|
|
8354
|
-
ctx[
|
|
8471
|
+
ctx[67].id,
|
|
8355
8472
|
/*dropContainerId*/
|
|
8356
|
-
ctx[
|
|
8473
|
+
ctx[12]
|
|
8357
8474
|
)
|
|
8358
8475
|
);
|
|
8359
8476
|
let t0;
|
|
@@ -8367,11 +8484,11 @@
|
|
|
8367
8484
|
let span2;
|
|
8368
8485
|
let t9_value = (
|
|
8369
8486
|
/*getTotalWords*/
|
|
8370
|
-
ctx[
|
|
8487
|
+
ctx[34](
|
|
8371
8488
|
/*category*/
|
|
8372
|
-
ctx[
|
|
8489
|
+
ctx[67].id,
|
|
8373
8490
|
/*currentAnswer*/
|
|
8374
|
-
ctx[
|
|
8491
|
+
ctx[3]
|
|
8375
8492
|
) + ""
|
|
8376
8493
|
);
|
|
8377
8494
|
let t9;
|
|
@@ -8391,31 +8508,31 @@
|
|
|
8391
8508
|
let div1_class_value;
|
|
8392
8509
|
let category = (
|
|
8393
8510
|
/*category*/
|
|
8394
|
-
ctx[
|
|
8511
|
+
ctx[67]
|
|
8395
8512
|
);
|
|
8396
8513
|
let current;
|
|
8397
8514
|
let mounted;
|
|
8398
8515
|
let dispose;
|
|
8399
8516
|
let if_block0 = show_if_1 && create_if_block_42(ctx);
|
|
8400
8517
|
let if_block1 = !/*previewResultSr*/
|
|
8401
|
-
ctx[
|
|
8518
|
+
ctx[4] && create_if_block_33(ctx);
|
|
8402
8519
|
let if_block2 = (
|
|
8403
8520
|
/*previewResultSr*/
|
|
8404
|
-
ctx[
|
|
8521
|
+
ctx[4] && create_if_block_25(ctx)
|
|
8405
8522
|
);
|
|
8406
8523
|
const if_block_creators = [create_if_block_17, create_else_block4];
|
|
8407
8524
|
const if_blocks = [];
|
|
8408
8525
|
function select_block_type(ctx2, dirty) {
|
|
8409
8526
|
if (dirty[0] & /*openCategoryContainer*/
|
|
8410
|
-
|
|
8527
|
+
262144)
|
|
8411
8528
|
show_if = null;
|
|
8412
8529
|
if (show_if == null)
|
|
8413
8530
|
show_if = !!/*checkifCategoryContainerOpen*/
|
|
8414
|
-
ctx2[
|
|
8531
|
+
ctx2[36](
|
|
8415
8532
|
/*category*/
|
|
8416
|
-
ctx2[
|
|
8533
|
+
ctx2[67].id,
|
|
8417
8534
|
/*openCategoryContainer*/
|
|
8418
|
-
ctx2[
|
|
8535
|
+
ctx2[18]
|
|
8419
8536
|
);
|
|
8420
8537
|
if (show_if)
|
|
8421
8538
|
return 0;
|
|
@@ -8424,102 +8541,115 @@
|
|
|
8424
8541
|
current_block_type_index = select_block_type(ctx, [-1, -1, -1]);
|
|
8425
8542
|
if_block3 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
8426
8543
|
function div0_elementresize_handler() {
|
|
8427
|
-
ctx[
|
|
8544
|
+
ctx[49].call(
|
|
8428
8545
|
div0,
|
|
8429
8546
|
/*category*/
|
|
8430
|
-
ctx[
|
|
8547
|
+
ctx[67]
|
|
8431
8548
|
);
|
|
8432
8549
|
}
|
|
8433
8550
|
promptcategorisedndcontainer = new PromptCategoriseDndContainer_default({
|
|
8434
8551
|
props: {
|
|
8435
8552
|
containerClass: "content-start !outline-none rounded-lg grow w-full md:p-4\n " + /*checkContainerDragOver*/
|
|
8436
|
-
(ctx[
|
|
8553
|
+
(ctx[30](
|
|
8437
8554
|
/*category*/
|
|
8438
|
-
ctx[
|
|
8555
|
+
ctx[67].id,
|
|
8439
8556
|
/*considerContainerId*/
|
|
8440
|
-
ctx[
|
|
8557
|
+
ctx[10],
|
|
8441
8558
|
/*isDraggingOver*/
|
|
8442
|
-
ctx[
|
|
8559
|
+
ctx[11]
|
|
8443
8560
|
) ? "bg-violet-100" : "") + "\n " + /*checkifCategoryContainerOpen*/
|
|
8444
|
-
(ctx[
|
|
8561
|
+
(ctx[36](
|
|
8445
8562
|
/*category*/
|
|
8446
|
-
ctx[
|
|
8563
|
+
ctx[67].id,
|
|
8447
8564
|
/*openCategoryContainer*/
|
|
8448
|
-
ctx[
|
|
8565
|
+
ctx[18]
|
|
8449
8566
|
) ? "h-full p-3 min-h-[86px] md:min-h-0" : ""),
|
|
8450
8567
|
paddingTop: (
|
|
8451
8568
|
/*checkifCategoryContainerOpen*/
|
|
8452
|
-
ctx[
|
|
8569
|
+
ctx[36](
|
|
8453
8570
|
/*category*/
|
|
8454
|
-
ctx[
|
|
8571
|
+
ctx[67].id,
|
|
8455
8572
|
/*openCategoryContainer*/
|
|
8456
|
-
ctx[
|
|
8573
|
+
ctx[18]
|
|
8457
8574
|
) || !useIsSmallScreen() ? (
|
|
8458
8575
|
/*categoryTitleHeight*/
|
|
8459
|
-
ctx[
|
|
8576
|
+
ctx[23][
|
|
8460
8577
|
/*category*/
|
|
8461
|
-
ctx[
|
|
8578
|
+
ctx[67].id
|
|
8462
8579
|
] + 16
|
|
8463
8580
|
) : (
|
|
8464
8581
|
/*categoryTitleHeight*/
|
|
8465
|
-
ctx[
|
|
8582
|
+
ctx[23][
|
|
8466
8583
|
/*category*/
|
|
8467
|
-
ctx[
|
|
8584
|
+
ctx[67].id
|
|
8468
8585
|
]
|
|
8469
8586
|
)
|
|
8470
8587
|
),
|
|
8471
8588
|
containerId: (
|
|
8472
8589
|
/*category*/
|
|
8473
|
-
ctx[
|
|
8590
|
+
ctx[67].id
|
|
8474
8591
|
),
|
|
8475
8592
|
showButton: (
|
|
8476
8593
|
/*checkifCategoryContainerOpen*/
|
|
8477
|
-
ctx[
|
|
8594
|
+
ctx[36](
|
|
8478
8595
|
/*category*/
|
|
8479
|
-
ctx[
|
|
8596
|
+
ctx[67].id,
|
|
8480
8597
|
/*openCategoryContainer*/
|
|
8481
|
-
ctx[
|
|
8598
|
+
ctx[18]
|
|
8482
8599
|
)
|
|
8483
8600
|
),
|
|
8484
8601
|
ariaLabel: `Category ${/*index*/
|
|
8485
|
-
ctx[
|
|
8486
|
-
ctx[
|
|
8602
|
+
ctx[69] + 1}: ${/*category*/
|
|
8603
|
+
ctx[67].name}`,
|
|
8487
8604
|
isFinished: (
|
|
8488
8605
|
/*isFinished*/
|
|
8489
8606
|
ctx[0]
|
|
8490
8607
|
),
|
|
8491
8608
|
correctAnswerList: (
|
|
8492
8609
|
/*scoringMetadata*/
|
|
8493
|
-
ctx[
|
|
8610
|
+
ctx[26]
|
|
8494
8611
|
),
|
|
8495
8612
|
isPreviewModeInteractive: (
|
|
8496
8613
|
/*isPreviewModeInteractive*/
|
|
8497
8614
|
ctx[1]
|
|
8615
|
+
),
|
|
8616
|
+
categoryData: (
|
|
8617
|
+
/*categoriseSettingsData*/
|
|
8618
|
+
ctx[6]
|
|
8619
|
+
),
|
|
8620
|
+
type: (
|
|
8621
|
+
/*categoryDndType*/
|
|
8622
|
+
ctx[24]
|
|
8498
8623
|
)
|
|
8499
8624
|
}
|
|
8500
8625
|
});
|
|
8626
|
+
promptcategorisedndcontainer.$on(
|
|
8627
|
+
"updateCategorySettings",
|
|
8628
|
+
/*updateCategory*/
|
|
8629
|
+
ctx[40]
|
|
8630
|
+
);
|
|
8501
8631
|
promptcategorisedndcontainer.$on(
|
|
8502
8632
|
"saveCategory",
|
|
8503
8633
|
/*saveCategory*/
|
|
8504
|
-
ctx[
|
|
8634
|
+
ctx[39]
|
|
8505
8635
|
);
|
|
8506
8636
|
function keydown_handler(...args) {
|
|
8507
8637
|
return (
|
|
8508
8638
|
/*keydown_handler*/
|
|
8509
|
-
ctx[
|
|
8639
|
+
ctx[50](
|
|
8510
8640
|
/*category*/
|
|
8511
|
-
ctx[
|
|
8641
|
+
ctx[67],
|
|
8512
8642
|
...args
|
|
8513
8643
|
)
|
|
8514
8644
|
);
|
|
8515
8645
|
}
|
|
8516
8646
|
const assign_div1 = () => (
|
|
8517
8647
|
/*div1_binding*/
|
|
8518
|
-
ctx[
|
|
8648
|
+
ctx[52](div1, category)
|
|
8519
8649
|
);
|
|
8520
8650
|
const unassign_div1 = () => (
|
|
8521
8651
|
/*div1_binding*/
|
|
8522
|
-
ctx[
|
|
8652
|
+
ctx[52](null, category)
|
|
8523
8653
|
);
|
|
8524
8654
|
return {
|
|
8525
8655
|
c() {
|
|
@@ -8530,11 +8660,11 @@
|
|
|
8530
8660
|
t0 = space();
|
|
8531
8661
|
span0 = element("span");
|
|
8532
8662
|
span0.textContent = `Category ${/*index*/
|
|
8533
|
-
ctx[
|
|
8663
|
+
ctx[69] + 1}:\xA0`;
|
|
8534
8664
|
t4 = space();
|
|
8535
8665
|
span1 = element("span");
|
|
8536
8666
|
span1.textContent = `${/*category*/
|
|
8537
|
-
ctx[
|
|
8667
|
+
ctx[67].name}`;
|
|
8538
8668
|
t6 = space();
|
|
8539
8669
|
if (if_block1)
|
|
8540
8670
|
if_block1.c();
|
|
@@ -8556,113 +8686,113 @@
|
|
|
8556
8686
|
attr(span2, "class", "mx-0.5");
|
|
8557
8687
|
attr(span3, "class", "w-4 h-4 text-inherit flex items-center justify-center");
|
|
8558
8688
|
attr(button, "aria-label", button_aria_label_value = /*getTotalWords*/
|
|
8559
|
-
ctx[
|
|
8689
|
+
ctx[34](
|
|
8560
8690
|
/*category*/
|
|
8561
|
-
ctx[
|
|
8691
|
+
ctx[67].id,
|
|
8562
8692
|
/*currentAnswer*/
|
|
8563
|
-
ctx[
|
|
8693
|
+
ctx[3]
|
|
8564
8694
|
));
|
|
8565
8695
|
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
8696
|
attr(div0, "id", div0_id_value = `category-title${/*index*/
|
|
8567
|
-
ctx[
|
|
8697
|
+
ctx[69]}`);
|
|
8568
8698
|
attr(div0, "aria-live", div0_aria_live_value = /*checkContainerDroppedItem*/
|
|
8569
|
-
ctx[
|
|
8699
|
+
ctx[31](
|
|
8570
8700
|
/*category*/
|
|
8571
|
-
ctx[
|
|
8701
|
+
ctx[67].id,
|
|
8572
8702
|
/*dropContainerId*/
|
|
8573
|
-
ctx[
|
|
8703
|
+
ctx[12]
|
|
8574
8704
|
) && /*enableAriaLive*/
|
|
8575
|
-
ctx[
|
|
8705
|
+
ctx[22] ? "polite" : "off");
|
|
8576
8706
|
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[
|
|
8707
|
+
(ctx[31](
|
|
8578
8708
|
/*category*/
|
|
8579
|
-
ctx[
|
|
8709
|
+
ctx[67].id,
|
|
8580
8710
|
/*dropContainerId*/
|
|
8581
|
-
ctx[
|
|
8711
|
+
ctx[12]
|
|
8582
8712
|
) ? "bg-tranparent" : "bg-white") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8583
|
-
ctx[
|
|
8713
|
+
ctx[36](
|
|
8584
8714
|
/*category*/
|
|
8585
|
-
ctx[
|
|
8715
|
+
ctx[67].id,
|
|
8586
8716
|
/*openCategoryContainer*/
|
|
8587
|
-
ctx[
|
|
8717
|
+
ctx[18]
|
|
8588
8718
|
) && /*checkContainerDragOver*/
|
|
8589
|
-
ctx[
|
|
8719
|
+
ctx[30](
|
|
8590
8720
|
/*category*/
|
|
8591
|
-
ctx[
|
|
8721
|
+
ctx[67].id,
|
|
8592
8722
|
/*considerContainerId*/
|
|
8593
|
-
ctx[
|
|
8723
|
+
ctx[10],
|
|
8594
8724
|
/*isDraggingOver*/
|
|
8595
|
-
ctx[
|
|
8725
|
+
ctx[11]
|
|
8596
8726
|
) ? "!bg-violet-100 md:!bg-white" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8597
|
-
(ctx[
|
|
8727
|
+
(ctx[36](
|
|
8598
8728
|
/*category*/
|
|
8599
|
-
ctx[
|
|
8729
|
+
ctx[67].id,
|
|
8600
8730
|
/*openCategoryContainer*/
|
|
8601
|
-
ctx[
|
|
8731
|
+
ctx[18]
|
|
8602
8732
|
) ? "" : "rounded-b-lg md:rounded-b-none") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8603
|
-
ctx[
|
|
8733
|
+
ctx[36](
|
|
8604
8734
|
/*category*/
|
|
8605
|
-
ctx[
|
|
8735
|
+
ctx[67].id,
|
|
8606
8736
|
/*openCategoryContainer*/
|
|
8607
|
-
ctx[
|
|
8737
|
+
ctx[18]
|
|
8608
8738
|
) && /*checkSelectedSourceContainer*/
|
|
8609
|
-
ctx[
|
|
8739
|
+
ctx[32](
|
|
8610
8740
|
/*category*/
|
|
8611
|
-
ctx[
|
|
8741
|
+
ctx[67].id,
|
|
8612
8742
|
/*sourceSelectedContainerId*/
|
|
8613
|
-
ctx[
|
|
8743
|
+
ctx[14],
|
|
8614
8744
|
/*currentSelectedItemId*/
|
|
8615
|
-
ctx[
|
|
8745
|
+
ctx[13]
|
|
8616
8746
|
) ? "group-hover/itemContainer:bg-violet-100 md:group-hover/itemContainer:bg-white" : ""));
|
|
8617
8747
|
add_render_callback(() => div0_elementresize_handler.call(div0));
|
|
8618
8748
|
attr(
|
|
8619
8749
|
div1,
|
|
8620
8750
|
"aria-hidden",
|
|
8621
8751
|
/*isModalOpen*/
|
|
8622
|
-
ctx[
|
|
8752
|
+
ctx[17]
|
|
8623
8753
|
);
|
|
8624
8754
|
attr(
|
|
8625
8755
|
div1,
|
|
8626
8756
|
"tabindex",
|
|
8627
8757
|
/*categoryTabIndex*/
|
|
8628
|
-
ctx[
|
|
8758
|
+
ctx[20]
|
|
8629
8759
|
);
|
|
8630
8760
|
attr(div1, "role", "group");
|
|
8631
8761
|
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[
|
|
8762
|
+
(ctx[30](
|
|
8633
8763
|
/*category*/
|
|
8634
|
-
ctx[
|
|
8764
|
+
ctx[67].id,
|
|
8635
8765
|
/*considerContainerId*/
|
|
8636
|
-
ctx[
|
|
8766
|
+
ctx[10],
|
|
8637
8767
|
/*isDraggingOver*/
|
|
8638
|
-
ctx[
|
|
8768
|
+
ctx[11]
|
|
8639
8769
|
) ? "raw-focus-ring" : "") + " " + /*checkContainerDroppedItem*/
|
|
8640
|
-
(ctx[
|
|
8770
|
+
(ctx[31](
|
|
8641
8771
|
/*category*/
|
|
8642
|
-
ctx[
|
|
8772
|
+
ctx[67].id,
|
|
8643
8773
|
/*dropContainerId*/
|
|
8644
|
-
ctx[
|
|
8774
|
+
ctx[12]
|
|
8645
8775
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
8646
|
-
(ctx[
|
|
8776
|
+
(ctx[31](
|
|
8647
8777
|
/*category*/
|
|
8648
|
-
ctx[
|
|
8778
|
+
ctx[67].id,
|
|
8649
8779
|
/*dropContainerId*/
|
|
8650
|
-
ctx[
|
|
8780
|
+
ctx[12]
|
|
8651
8781
|
) && /*hasAddItemAnimation*/
|
|
8652
|
-
ctx[
|
|
8653
|
-
(ctx[
|
|
8782
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
8783
|
+
(ctx[32](
|
|
8654
8784
|
/*category*/
|
|
8655
|
-
ctx[
|
|
8785
|
+
ctx[67].id,
|
|
8656
8786
|
/*sourceSelectedContainerId*/
|
|
8657
|
-
ctx[
|
|
8787
|
+
ctx[14],
|
|
8658
8788
|
/*currentSelectedItemId*/
|
|
8659
|
-
ctx[
|
|
8789
|
+
ctx[13]
|
|
8660
8790
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8661
|
-
(ctx[
|
|
8791
|
+
(ctx[36](
|
|
8662
8792
|
/*category*/
|
|
8663
|
-
ctx[
|
|
8793
|
+
ctx[67].id,
|
|
8664
8794
|
/*openCategoryContainer*/
|
|
8665
|
-
ctx[
|
|
8795
|
+
ctx[18]
|
|
8666
8796
|
) ? "min-h-[140px]" : ""));
|
|
8667
8797
|
},
|
|
8668
8798
|
m(target, anchor) {
|
|
@@ -8698,18 +8828,18 @@
|
|
|
8698
8828
|
listen(button, "click", function() {
|
|
8699
8829
|
if (is_function(
|
|
8700
8830
|
/*addCategoryContainer*/
|
|
8701
|
-
ctx[
|
|
8831
|
+
ctx[37](
|
|
8702
8832
|
/*category*/
|
|
8703
|
-
ctx[
|
|
8833
|
+
ctx[67].id,
|
|
8704
8834
|
/*openCategoryContainer*/
|
|
8705
|
-
ctx[
|
|
8835
|
+
ctx[18]
|
|
8706
8836
|
)
|
|
8707
8837
|
))
|
|
8708
|
-
ctx[
|
|
8838
|
+
ctx[37](
|
|
8709
8839
|
/*category*/
|
|
8710
|
-
ctx[
|
|
8840
|
+
ctx[67].id,
|
|
8711
8841
|
/*openCategoryContainer*/
|
|
8712
|
-
ctx[
|
|
8842
|
+
ctx[18]
|
|
8713
8843
|
).apply(this, arguments);
|
|
8714
8844
|
}),
|
|
8715
8845
|
listen(div1, "keydown", keydown_handler),
|
|
@@ -8717,13 +8847,13 @@
|
|
|
8717
8847
|
div1,
|
|
8718
8848
|
"focus",
|
|
8719
8849
|
/*resetTabCategory*/
|
|
8720
|
-
ctx[
|
|
8850
|
+
ctx[42]
|
|
8721
8851
|
),
|
|
8722
8852
|
listen(
|
|
8723
8853
|
div1,
|
|
8724
8854
|
"blur",
|
|
8725
8855
|
/*blur_handler*/
|
|
8726
|
-
ctx[
|
|
8856
|
+
ctx[51]
|
|
8727
8857
|
)
|
|
8728
8858
|
];
|
|
8729
8859
|
mounted = true;
|
|
@@ -8732,13 +8862,13 @@
|
|
|
8732
8862
|
p(new_ctx, dirty) {
|
|
8733
8863
|
ctx = new_ctx;
|
|
8734
8864
|
if (dirty[0] & /*dropContainerId*/
|
|
8735
|
-
|
|
8865
|
+
4096)
|
|
8736
8866
|
show_if_1 = /*checkContainerDroppedItem*/
|
|
8737
|
-
ctx[
|
|
8867
|
+
ctx[31](
|
|
8738
8868
|
/*category*/
|
|
8739
|
-
ctx[
|
|
8869
|
+
ctx[67].id,
|
|
8740
8870
|
/*dropContainerId*/
|
|
8741
|
-
ctx[
|
|
8871
|
+
ctx[12]
|
|
8742
8872
|
);
|
|
8743
8873
|
if (show_if_1) {
|
|
8744
8874
|
if (if_block0) {
|
|
@@ -8753,7 +8883,7 @@
|
|
|
8753
8883
|
if_block0 = null;
|
|
8754
8884
|
}
|
|
8755
8885
|
if (!/*previewResultSr*/
|
|
8756
|
-
ctx[
|
|
8886
|
+
ctx[4]) {
|
|
8757
8887
|
if (if_block1) {
|
|
8758
8888
|
if_block1.p(ctx, dirty);
|
|
8759
8889
|
} else {
|
|
@@ -8767,7 +8897,7 @@
|
|
|
8767
8897
|
}
|
|
8768
8898
|
if (
|
|
8769
8899
|
/*previewResultSr*/
|
|
8770
|
-
ctx[
|
|
8900
|
+
ctx[4]
|
|
8771
8901
|
) {
|
|
8772
8902
|
if (if_block2) {
|
|
8773
8903
|
if_block2.p(ctx, dirty);
|
|
@@ -8781,12 +8911,12 @@
|
|
|
8781
8911
|
if_block2 = null;
|
|
8782
8912
|
}
|
|
8783
8913
|
if ((!current || dirty[0] & /*currentAnswer*/
|
|
8784
|
-
|
|
8785
|
-
ctx[
|
|
8914
|
+
8) && t9_value !== (t9_value = /*getTotalWords*/
|
|
8915
|
+
ctx[34](
|
|
8786
8916
|
/*category*/
|
|
8787
|
-
ctx[
|
|
8917
|
+
ctx[67].id,
|
|
8788
8918
|
/*currentAnswer*/
|
|
8789
|
-
ctx[
|
|
8919
|
+
ctx[3]
|
|
8790
8920
|
) + ""))
|
|
8791
8921
|
set_data(t9, t9_value);
|
|
8792
8922
|
let previous_block_index = current_block_type_index;
|
|
@@ -8807,117 +8937,117 @@
|
|
|
8807
8937
|
if_block3.m(span3, null);
|
|
8808
8938
|
}
|
|
8809
8939
|
if (!current || dirty[0] & /*currentAnswer*/
|
|
8810
|
-
|
|
8811
|
-
ctx[
|
|
8940
|
+
8 && button_aria_label_value !== (button_aria_label_value = /*getTotalWords*/
|
|
8941
|
+
ctx[34](
|
|
8812
8942
|
/*category*/
|
|
8813
|
-
ctx[
|
|
8943
|
+
ctx[67].id,
|
|
8814
8944
|
/*currentAnswer*/
|
|
8815
|
-
ctx[
|
|
8945
|
+
ctx[3]
|
|
8816
8946
|
))) {
|
|
8817
8947
|
attr(button, "aria-label", button_aria_label_value);
|
|
8818
8948
|
}
|
|
8819
8949
|
if (!current || dirty[0] & /*dropContainerId, enableAriaLive*/
|
|
8820
|
-
|
|
8821
|
-
ctx[
|
|
8950
|
+
4198400 && div0_aria_live_value !== (div0_aria_live_value = /*checkContainerDroppedItem*/
|
|
8951
|
+
ctx[31](
|
|
8822
8952
|
/*category*/
|
|
8823
|
-
ctx[
|
|
8953
|
+
ctx[67].id,
|
|
8824
8954
|
/*dropContainerId*/
|
|
8825
|
-
ctx[
|
|
8955
|
+
ctx[12]
|
|
8826
8956
|
) && /*enableAriaLive*/
|
|
8827
|
-
ctx[
|
|
8957
|
+
ctx[22] ? "polite" : "off")) {
|
|
8828
8958
|
attr(div0, "aria-live", div0_aria_live_value);
|
|
8829
8959
|
}
|
|
8830
8960
|
if (!current || dirty[0] & /*dropContainerId, openCategoryContainer, considerContainerId, isDraggingOver, sourceSelectedContainerId, currentSelectedItemId*/
|
|
8831
|
-
|
|
8832
|
-
(ctx[
|
|
8961
|
+
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*/
|
|
8962
|
+
(ctx[31](
|
|
8833
8963
|
/*category*/
|
|
8834
|
-
ctx[
|
|
8964
|
+
ctx[67].id,
|
|
8835
8965
|
/*dropContainerId*/
|
|
8836
|
-
ctx[
|
|
8966
|
+
ctx[12]
|
|
8837
8967
|
) ? "bg-tranparent" : "bg-white") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8838
|
-
ctx[
|
|
8968
|
+
ctx[36](
|
|
8839
8969
|
/*category*/
|
|
8840
|
-
ctx[
|
|
8970
|
+
ctx[67].id,
|
|
8841
8971
|
/*openCategoryContainer*/
|
|
8842
|
-
ctx[
|
|
8972
|
+
ctx[18]
|
|
8843
8973
|
) && /*checkContainerDragOver*/
|
|
8844
|
-
ctx[
|
|
8974
|
+
ctx[30](
|
|
8845
8975
|
/*category*/
|
|
8846
|
-
ctx[
|
|
8976
|
+
ctx[67].id,
|
|
8847
8977
|
/*considerContainerId*/
|
|
8848
|
-
ctx[
|
|
8978
|
+
ctx[10],
|
|
8849
8979
|
/*isDraggingOver*/
|
|
8850
|
-
ctx[
|
|
8980
|
+
ctx[11]
|
|
8851
8981
|
) ? "!bg-violet-100 md:!bg-white" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8852
|
-
(ctx[
|
|
8982
|
+
(ctx[36](
|
|
8853
8983
|
/*category*/
|
|
8854
|
-
ctx[
|
|
8984
|
+
ctx[67].id,
|
|
8855
8985
|
/*openCategoryContainer*/
|
|
8856
|
-
ctx[
|
|
8986
|
+
ctx[18]
|
|
8857
8987
|
) ? "" : "rounded-b-lg md:rounded-b-none") + " " + (!/*checkifCategoryContainerOpen*/
|
|
8858
|
-
ctx[
|
|
8988
|
+
ctx[36](
|
|
8859
8989
|
/*category*/
|
|
8860
|
-
ctx[
|
|
8990
|
+
ctx[67].id,
|
|
8861
8991
|
/*openCategoryContainer*/
|
|
8862
|
-
ctx[
|
|
8992
|
+
ctx[18]
|
|
8863
8993
|
) && /*checkSelectedSourceContainer*/
|
|
8864
|
-
ctx[
|
|
8994
|
+
ctx[32](
|
|
8865
8995
|
/*category*/
|
|
8866
|
-
ctx[
|
|
8996
|
+
ctx[67].id,
|
|
8867
8997
|
/*sourceSelectedContainerId*/
|
|
8868
|
-
ctx[
|
|
8998
|
+
ctx[14],
|
|
8869
8999
|
/*currentSelectedItemId*/
|
|
8870
|
-
ctx[
|
|
9000
|
+
ctx[13]
|
|
8871
9001
|
) ? "group-hover/itemContainer:bg-violet-100 md:group-hover/itemContainer:bg-white" : ""))) {
|
|
8872
9002
|
attr(div0, "class", div0_class_value);
|
|
8873
9003
|
}
|
|
8874
9004
|
const promptcategorisedndcontainer_changes = {};
|
|
8875
9005
|
if (dirty[0] & /*considerContainerId, isDraggingOver, openCategoryContainer*/
|
|
8876
|
-
|
|
9006
|
+
265216)
|
|
8877
9007
|
promptcategorisedndcontainer_changes.containerClass = "content-start !outline-none rounded-lg grow w-full md:p-4\n " + /*checkContainerDragOver*/
|
|
8878
|
-
(ctx[
|
|
9008
|
+
(ctx[30](
|
|
8879
9009
|
/*category*/
|
|
8880
|
-
ctx[
|
|
9010
|
+
ctx[67].id,
|
|
8881
9011
|
/*considerContainerId*/
|
|
8882
|
-
ctx[
|
|
9012
|
+
ctx[10],
|
|
8883
9013
|
/*isDraggingOver*/
|
|
8884
|
-
ctx[
|
|
9014
|
+
ctx[11]
|
|
8885
9015
|
) ? "bg-violet-100" : "") + "\n " + /*checkifCategoryContainerOpen*/
|
|
8886
|
-
(ctx[
|
|
9016
|
+
(ctx[36](
|
|
8887
9017
|
/*category*/
|
|
8888
|
-
ctx[
|
|
9018
|
+
ctx[67].id,
|
|
8889
9019
|
/*openCategoryContainer*/
|
|
8890
|
-
ctx[
|
|
9020
|
+
ctx[18]
|
|
8891
9021
|
) ? "h-full p-3 min-h-[86px] md:min-h-0" : "");
|
|
8892
9022
|
if (dirty[0] & /*openCategoryContainer, categoryTitleHeight*/
|
|
8893
|
-
|
|
9023
|
+
8650752)
|
|
8894
9024
|
promptcategorisedndcontainer_changes.paddingTop = /*checkifCategoryContainerOpen*/
|
|
8895
|
-
ctx[
|
|
9025
|
+
ctx[36](
|
|
8896
9026
|
/*category*/
|
|
8897
|
-
ctx[
|
|
9027
|
+
ctx[67].id,
|
|
8898
9028
|
/*openCategoryContainer*/
|
|
8899
|
-
ctx[
|
|
9029
|
+
ctx[18]
|
|
8900
9030
|
) || !useIsSmallScreen() ? (
|
|
8901
9031
|
/*categoryTitleHeight*/
|
|
8902
|
-
ctx[
|
|
9032
|
+
ctx[23][
|
|
8903
9033
|
/*category*/
|
|
8904
|
-
ctx[
|
|
9034
|
+
ctx[67].id
|
|
8905
9035
|
] + 16
|
|
8906
9036
|
) : (
|
|
8907
9037
|
/*categoryTitleHeight*/
|
|
8908
|
-
ctx[
|
|
9038
|
+
ctx[23][
|
|
8909
9039
|
/*category*/
|
|
8910
|
-
ctx[
|
|
9040
|
+
ctx[67].id
|
|
8911
9041
|
]
|
|
8912
9042
|
);
|
|
8913
9043
|
if (dirty[0] & /*openCategoryContainer*/
|
|
8914
|
-
|
|
9044
|
+
262144)
|
|
8915
9045
|
promptcategorisedndcontainer_changes.showButton = /*checkifCategoryContainerOpen*/
|
|
8916
|
-
ctx[
|
|
9046
|
+
ctx[36](
|
|
8917
9047
|
/*category*/
|
|
8918
|
-
ctx[
|
|
9048
|
+
ctx[67].id,
|
|
8919
9049
|
/*openCategoryContainer*/
|
|
8920
|
-
ctx[
|
|
9050
|
+
ctx[18]
|
|
8921
9051
|
);
|
|
8922
9052
|
if (dirty[0] & /*isFinished*/
|
|
8923
9053
|
1)
|
|
@@ -8927,69 +9057,73 @@
|
|
|
8927
9057
|
2)
|
|
8928
9058
|
promptcategorisedndcontainer_changes.isPreviewModeInteractive = /*isPreviewModeInteractive*/
|
|
8929
9059
|
ctx[1];
|
|
9060
|
+
if (dirty[0] & /*categoriseSettingsData*/
|
|
9061
|
+
64)
|
|
9062
|
+
promptcategorisedndcontainer_changes.categoryData = /*categoriseSettingsData*/
|
|
9063
|
+
ctx[6];
|
|
8930
9064
|
promptcategorisedndcontainer.$set(promptcategorisedndcontainer_changes);
|
|
8931
9065
|
if (!current || dirty[0] & /*isModalOpen*/
|
|
8932
|
-
|
|
9066
|
+
131072) {
|
|
8933
9067
|
attr(
|
|
8934
9068
|
div1,
|
|
8935
9069
|
"aria-hidden",
|
|
8936
9070
|
/*isModalOpen*/
|
|
8937
|
-
ctx[
|
|
9071
|
+
ctx[17]
|
|
8938
9072
|
);
|
|
8939
9073
|
}
|
|
8940
9074
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
8941
|
-
|
|
9075
|
+
1048576) {
|
|
8942
9076
|
attr(
|
|
8943
9077
|
div1,
|
|
8944
9078
|
"tabindex",
|
|
8945
9079
|
/*categoryTabIndex*/
|
|
8946
|
-
ctx[
|
|
9080
|
+
ctx[20]
|
|
8947
9081
|
);
|
|
8948
9082
|
}
|
|
8949
9083
|
if (!current || dirty[0] & /*considerContainerId, isDraggingOver, dropContainerId, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId, openCategoryContainer*/
|
|
8950
|
-
|
|
8951
|
-
(ctx[
|
|
9084
|
+
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*/
|
|
9085
|
+
(ctx[30](
|
|
8952
9086
|
/*category*/
|
|
8953
|
-
ctx[
|
|
9087
|
+
ctx[67].id,
|
|
8954
9088
|
/*considerContainerId*/
|
|
8955
|
-
ctx[
|
|
9089
|
+
ctx[10],
|
|
8956
9090
|
/*isDraggingOver*/
|
|
8957
|
-
ctx[
|
|
9091
|
+
ctx[11]
|
|
8958
9092
|
) ? "raw-focus-ring" : "") + " " + /*checkContainerDroppedItem*/
|
|
8959
|
-
(ctx[
|
|
9093
|
+
(ctx[31](
|
|
8960
9094
|
/*category*/
|
|
8961
|
-
ctx[
|
|
9095
|
+
ctx[67].id,
|
|
8962
9096
|
/*dropContainerId*/
|
|
8963
|
-
ctx[
|
|
9097
|
+
ctx[12]
|
|
8964
9098
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
8965
|
-
(ctx[
|
|
9099
|
+
(ctx[31](
|
|
8966
9100
|
/*category*/
|
|
8967
|
-
ctx[
|
|
9101
|
+
ctx[67].id,
|
|
8968
9102
|
/*dropContainerId*/
|
|
8969
|
-
ctx[
|
|
9103
|
+
ctx[12]
|
|
8970
9104
|
) && /*hasAddItemAnimation*/
|
|
8971
|
-
ctx[
|
|
8972
|
-
(ctx[
|
|
9105
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
9106
|
+
(ctx[32](
|
|
8973
9107
|
/*category*/
|
|
8974
|
-
ctx[
|
|
9108
|
+
ctx[67].id,
|
|
8975
9109
|
/*sourceSelectedContainerId*/
|
|
8976
|
-
ctx[
|
|
9110
|
+
ctx[14],
|
|
8977
9111
|
/*currentSelectedItemId*/
|
|
8978
|
-
ctx[
|
|
9112
|
+
ctx[13]
|
|
8979
9113
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : "") + " " + /*checkifCategoryContainerOpen*/
|
|
8980
|
-
(ctx[
|
|
9114
|
+
(ctx[36](
|
|
8981
9115
|
/*category*/
|
|
8982
|
-
ctx[
|
|
9116
|
+
ctx[67].id,
|
|
8983
9117
|
/*openCategoryContainer*/
|
|
8984
|
-
ctx[
|
|
9118
|
+
ctx[18]
|
|
8985
9119
|
) ? "min-h-[140px]" : ""))) {
|
|
8986
9120
|
attr(div1, "class", div1_class_value);
|
|
8987
9121
|
}
|
|
8988
9122
|
if (category !== /*category*/
|
|
8989
|
-
ctx[
|
|
9123
|
+
ctx[67]) {
|
|
8990
9124
|
unassign_div1();
|
|
8991
9125
|
category = /*category*/
|
|
8992
|
-
ctx[
|
|
9126
|
+
ctx[67];
|
|
8993
9127
|
assign_div1();
|
|
8994
9128
|
}
|
|
8995
9129
|
},
|
|
@@ -9035,7 +9169,7 @@
|
|
|
9035
9169
|
t0 = text("Option ");
|
|
9036
9170
|
t1 = text(
|
|
9037
9171
|
/*selectedItemName*/
|
|
9038
|
-
ctx[
|
|
9172
|
+
ctx[21]
|
|
9039
9173
|
);
|
|
9040
9174
|
t2 = text(" added in:\xA0");
|
|
9041
9175
|
attr(span, "class", "sr-only");
|
|
@@ -9048,11 +9182,11 @@
|
|
|
9048
9182
|
},
|
|
9049
9183
|
p(ctx2, dirty) {
|
|
9050
9184
|
if (dirty[0] & /*selectedItemName*/
|
|
9051
|
-
|
|
9185
|
+
2097152)
|
|
9052
9186
|
set_data(
|
|
9053
9187
|
t1,
|
|
9054
9188
|
/*selectedItemName*/
|
|
9055
|
-
ctx2[
|
|
9189
|
+
ctx2[21]
|
|
9056
9190
|
);
|
|
9057
9191
|
},
|
|
9058
9192
|
d(detaching) {
|
|
@@ -9080,10 +9214,10 @@
|
|
|
9080
9214
|
let div2;
|
|
9081
9215
|
let show_if = (
|
|
9082
9216
|
/*checkContainerDroppedItem*/
|
|
9083
|
-
ctx[
|
|
9217
|
+
ctx[31](
|
|
9084
9218
|
CONTAINER_WORD_BIN_ID,
|
|
9085
9219
|
/*dropContainerId*/
|
|
9086
|
-
ctx[
|
|
9220
|
+
ctx[12]
|
|
9087
9221
|
)
|
|
9088
9222
|
);
|
|
9089
9223
|
let t8;
|
|
@@ -9117,17 +9251,17 @@
|
|
|
9117
9251
|
arrowdowncircle = new ArrowDownCircle_default({});
|
|
9118
9252
|
let if_block0 = (
|
|
9119
9253
|
/*isModalOpen*/
|
|
9120
|
-
ctx[
|
|
9254
|
+
ctx[17] && create_if_block_6(ctx)
|
|
9121
9255
|
);
|
|
9122
9256
|
let if_block1 = (
|
|
9123
9257
|
/*totalRemainingWordBinItem*/
|
|
9124
|
-
ctx[
|
|
9125
|
-
ctx[
|
|
9258
|
+
ctx[15] !== /*totalCategoryItems*/
|
|
9259
|
+
ctx[9] && !/*isFinished*/
|
|
9126
9260
|
ctx[0] && create_if_block_5(ctx)
|
|
9127
9261
|
);
|
|
9128
9262
|
let each_value = ensure_array_like(Object.values(
|
|
9129
9263
|
/*categoryGroups*/
|
|
9130
|
-
ctx[
|
|
9264
|
+
ctx[29]
|
|
9131
9265
|
));
|
|
9132
9266
|
let each_blocks = [];
|
|
9133
9267
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -9141,14 +9275,14 @@
|
|
|
9141
9275
|
promptcategorisedndcontainer = new PromptCategoriseDndContainer_default({
|
|
9142
9276
|
props: {
|
|
9143
9277
|
containerClass: "bg-transparent p-4 pt-[55px] grow md:grow-0 md:pt-20.5 justify-center md:justify-normal\n " + /*isWordBInTotalZero*/
|
|
9144
|
-
(ctx[
|
|
9278
|
+
(ctx[38](
|
|
9145
9279
|
/*totalRemainingWordBinItem*/
|
|
9146
|
-
ctx[
|
|
9280
|
+
ctx[15]
|
|
9147
9281
|
) && !/*currentSelectedItemId*/
|
|
9148
|
-
ctx[
|
|
9282
|
+
ctx[13] ? "absolute inset-0" : ""),
|
|
9149
9283
|
items: (
|
|
9150
9284
|
/*categoryItems*/
|
|
9151
|
-
ctx[
|
|
9285
|
+
ctx[28]
|
|
9152
9286
|
),
|
|
9153
9287
|
containerId: CONTAINER_WORD_BIN_ID,
|
|
9154
9288
|
ariaLabel: "Word bin",
|
|
@@ -9158,18 +9292,31 @@
|
|
|
9158
9292
|
),
|
|
9159
9293
|
correctAnswerList: (
|
|
9160
9294
|
/*scoringMetadata*/
|
|
9161
|
-
ctx[
|
|
9295
|
+
ctx[26]
|
|
9162
9296
|
),
|
|
9163
9297
|
isPreviewModeInteractive: (
|
|
9164
9298
|
/*isPreviewModeInteractive*/
|
|
9165
9299
|
ctx[1]
|
|
9300
|
+
),
|
|
9301
|
+
categoryData: (
|
|
9302
|
+
/*categoriseSettingsData*/
|
|
9303
|
+
ctx[6]
|
|
9304
|
+
),
|
|
9305
|
+
type: (
|
|
9306
|
+
/*categoryDndType*/
|
|
9307
|
+
ctx[24]
|
|
9166
9308
|
)
|
|
9167
9309
|
}
|
|
9168
9310
|
});
|
|
9311
|
+
promptcategorisedndcontainer.$on(
|
|
9312
|
+
"updateCategorySettings",
|
|
9313
|
+
/*updateCategory*/
|
|
9314
|
+
ctx[40]
|
|
9315
|
+
);
|
|
9169
9316
|
promptcategorisedndcontainer.$on(
|
|
9170
9317
|
"saveCategory",
|
|
9171
9318
|
/*saveCategory*/
|
|
9172
|
-
ctx[
|
|
9319
|
+
ctx[39]
|
|
9173
9320
|
);
|
|
9174
9321
|
smallchevronright = new SmallChevronRight_default({});
|
|
9175
9322
|
return {
|
|
@@ -9207,12 +9354,12 @@
|
|
|
9207
9354
|
span3 = element("span");
|
|
9208
9355
|
t11 = text(
|
|
9209
9356
|
/*totalRemainingWordBinItem*/
|
|
9210
|
-
ctx[
|
|
9357
|
+
ctx[15]
|
|
9211
9358
|
);
|
|
9212
9359
|
t12 = text(" out of ");
|
|
9213
9360
|
t13 = text(
|
|
9214
9361
|
/*totalCategoryItems*/
|
|
9215
|
-
ctx[
|
|
9362
|
+
ctx[9]
|
|
9216
9363
|
);
|
|
9217
9364
|
t14 = text(" left");
|
|
9218
9365
|
t15 = space();
|
|
@@ -9232,7 +9379,7 @@
|
|
|
9232
9379
|
button0,
|
|
9233
9380
|
"tabindex",
|
|
9234
9381
|
/*categoryTabIndex*/
|
|
9235
|
-
ctx[
|
|
9382
|
+
ctx[20]
|
|
9236
9383
|
);
|
|
9237
9384
|
attr(button0, "aria-label", "Skip to word bin");
|
|
9238
9385
|
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 +9389,7 @@
|
|
|
9242
9389
|
div0,
|
|
9243
9390
|
"aria-hidden",
|
|
9244
9391
|
/*isModalOpen*/
|
|
9245
|
-
ctx[
|
|
9392
|
+
ctx[17]
|
|
9246
9393
|
);
|
|
9247
9394
|
attr(div1, "class", "mb-5 grid gap-2 grid-cols-1 md:grid-cols-2 md:gap-6 lg:flex lg:gap-0");
|
|
9248
9395
|
attr(span2, "class", "text-base leading-5 !text-gray-900 font-semibold md:mb-2 md:item-heading");
|
|
@@ -9251,67 +9398,67 @@
|
|
|
9251
9398
|
attr(span4, "class", "w-6 h-6 text-inherit flex items-center justify-center");
|
|
9252
9399
|
attr(button1, "aria-label", "Left");
|
|
9253
9400
|
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[
|
|
9401
|
+
(ctx[38](
|
|
9255
9402
|
/*totalRemainingWordBinItem*/
|
|
9256
|
-
ctx[
|
|
9403
|
+
ctx[15]
|
|
9257
9404
|
) ? "hidden" : ""));
|
|
9258
9405
|
button1.disabled = button1_disabled_value = /*currentWordBinIndex*/
|
|
9259
|
-
ctx[
|
|
9406
|
+
ctx[19] === 0;
|
|
9260
9407
|
attr(span5, "class", "w-6 h-6 text-inherit flex items-center justify-center ml-[3px]");
|
|
9261
9408
|
attr(button2, "aria-label", "Right");
|
|
9262
9409
|
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[
|
|
9410
|
+
(ctx[38](
|
|
9264
9411
|
/*totalRemainingWordBinItem*/
|
|
9265
|
-
ctx[
|
|
9412
|
+
ctx[15]
|
|
9266
9413
|
) ? "hidden" : ""));
|
|
9267
9414
|
button2.disabled = button2_disabled_value = /*currentWordBinIndex*/
|
|
9268
|
-
ctx[
|
|
9269
|
-
ctx[
|
|
9415
|
+
ctx[19] === /*totalRemainingWordBinItem*/
|
|
9416
|
+
ctx[15] - 1;
|
|
9270
9417
|
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
9418
|
attr(
|
|
9272
9419
|
div4,
|
|
9273
9420
|
"aria-hidden",
|
|
9274
9421
|
/*isModalOpen*/
|
|
9275
|
-
ctx[
|
|
9422
|
+
ctx[17]
|
|
9276
9423
|
);
|
|
9277
9424
|
attr(
|
|
9278
9425
|
div4,
|
|
9279
9426
|
"tabindex",
|
|
9280
9427
|
/*categoryTabIndex*/
|
|
9281
|
-
ctx[
|
|
9428
|
+
ctx[20]
|
|
9282
9429
|
);
|
|
9283
9430
|
attr(div4, "aria-live", div4_aria_live_value = /*checkContainerDroppedItem*/
|
|
9284
|
-
ctx[
|
|
9431
|
+
ctx[31](
|
|
9285
9432
|
CONTAINER_WORD_BIN_ID,
|
|
9286
9433
|
/*dropContainerId*/
|
|
9287
|
-
ctx[
|
|
9434
|
+
ctx[12]
|
|
9288
9435
|
) ? "polite" : "off");
|
|
9289
9436
|
attr(div4, "role", "group");
|
|
9290
9437
|
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[
|
|
9438
|
+
(ctx[30](
|
|
9292
9439
|
CONTAINER_WORD_BIN_ID,
|
|
9293
9440
|
/*considerContainerId*/
|
|
9294
|
-
ctx[
|
|
9441
|
+
ctx[10],
|
|
9295
9442
|
/*isDraggingOver*/
|
|
9296
|
-
ctx[
|
|
9443
|
+
ctx[11]
|
|
9297
9444
|
) ? "raw-focus-ring bg-violet-100" : "") + " " + /*checkContainerDroppedItem*/
|
|
9298
|
-
(ctx[
|
|
9445
|
+
(ctx[31](
|
|
9299
9446
|
CONTAINER_WORD_BIN_ID,
|
|
9300
9447
|
/*dropContainerId*/
|
|
9301
|
-
ctx[
|
|
9448
|
+
ctx[12]
|
|
9302
9449
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
9303
|
-
(ctx[
|
|
9450
|
+
(ctx[31](
|
|
9304
9451
|
CONTAINER_WORD_BIN_ID,
|
|
9305
9452
|
/*dropContainerId*/
|
|
9306
|
-
ctx[
|
|
9453
|
+
ctx[12]
|
|
9307
9454
|
) && /*hasAddItemAnimation*/
|
|
9308
|
-
ctx[
|
|
9309
|
-
(ctx[
|
|
9455
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
9456
|
+
(ctx[32](
|
|
9310
9457
|
CONTAINER_WORD_BIN_ID,
|
|
9311
9458
|
/*sourceSelectedContainerId*/
|
|
9312
|
-
ctx[
|
|
9459
|
+
ctx[14],
|
|
9313
9460
|
/*currentSelectedItemId*/
|
|
9314
|
-
ctx[
|
|
9461
|
+
ctx[13]
|
|
9315
9462
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : ""));
|
|
9316
9463
|
},
|
|
9317
9464
|
m(target, anchor) {
|
|
@@ -9360,7 +9507,7 @@
|
|
|
9360
9507
|
append(div3, button2);
|
|
9361
9508
|
append(button2, span5);
|
|
9362
9509
|
mount_component(smallchevronright, span5, null);
|
|
9363
|
-
ctx[
|
|
9510
|
+
ctx[55](div4);
|
|
9364
9511
|
current = true;
|
|
9365
9512
|
if (!mounted) {
|
|
9366
9513
|
dispose = [
|
|
@@ -9368,37 +9515,43 @@
|
|
|
9368
9515
|
button0,
|
|
9369
9516
|
"keypress",
|
|
9370
9517
|
/*goToWordBin*/
|
|
9371
|
-
ctx[
|
|
9518
|
+
ctx[43]
|
|
9372
9519
|
),
|
|
9373
9520
|
listen(button1, "click", function() {
|
|
9374
|
-
if (is_function(
|
|
9375
|
-
/*
|
|
9376
|
-
ctx[
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9521
|
+
if (is_function(
|
|
9522
|
+
/*navigateCategoryItem*/
|
|
9523
|
+
ctx[45](
|
|
9524
|
+
/*currentWordBinIndex*/
|
|
9525
|
+
ctx[19],
|
|
9526
|
+
/*currentAnswer*/
|
|
9527
|
+
ctx[3],
|
|
9528
|
+
"left"
|
|
9529
|
+
)
|
|
9530
|
+
))
|
|
9531
|
+
ctx[45](
|
|
9382
9532
|
/*currentWordBinIndex*/
|
|
9383
|
-
ctx[
|
|
9533
|
+
ctx[19],
|
|
9384
9534
|
/*currentAnswer*/
|
|
9385
|
-
ctx[
|
|
9535
|
+
ctx[3],
|
|
9386
9536
|
"left"
|
|
9387
9537
|
).apply(this, arguments);
|
|
9388
9538
|
}),
|
|
9389
9539
|
listen(button2, "click", function() {
|
|
9390
|
-
if (is_function(
|
|
9391
|
-
/*
|
|
9392
|
-
ctx[
|
|
9393
|
-
/*currentAnswer*/
|
|
9394
|
-
ctx[9],
|
|
9395
|
-
"right"
|
|
9396
|
-
)))
|
|
9397
|
-
useNavigateItem(
|
|
9540
|
+
if (is_function(
|
|
9541
|
+
/*navigateCategoryItem*/
|
|
9542
|
+
ctx[45](
|
|
9398
9543
|
/*currentWordBinIndex*/
|
|
9399
|
-
ctx[
|
|
9544
|
+
ctx[19],
|
|
9400
9545
|
/*currentAnswer*/
|
|
9401
|
-
ctx[
|
|
9546
|
+
ctx[3],
|
|
9547
|
+
"right"
|
|
9548
|
+
)
|
|
9549
|
+
))
|
|
9550
|
+
ctx[45](
|
|
9551
|
+
/*currentWordBinIndex*/
|
|
9552
|
+
ctx[19],
|
|
9553
|
+
/*currentAnswer*/
|
|
9554
|
+
ctx[3],
|
|
9402
9555
|
"right"
|
|
9403
9556
|
).apply(this, arguments);
|
|
9404
9557
|
}),
|
|
@@ -9406,19 +9559,19 @@
|
|
|
9406
9559
|
div4,
|
|
9407
9560
|
"keydown",
|
|
9408
9561
|
/*keydown_handler_1*/
|
|
9409
|
-
ctx[
|
|
9562
|
+
ctx[53]
|
|
9410
9563
|
),
|
|
9411
9564
|
listen(
|
|
9412
9565
|
div4,
|
|
9413
9566
|
"focus",
|
|
9414
9567
|
/*resetTabCategory*/
|
|
9415
|
-
ctx[
|
|
9568
|
+
ctx[42]
|
|
9416
9569
|
),
|
|
9417
9570
|
listen(
|
|
9418
9571
|
div4,
|
|
9419
9572
|
"blur",
|
|
9420
9573
|
/*blur_handler_1*/
|
|
9421
|
-
ctx[
|
|
9574
|
+
ctx[54]
|
|
9422
9575
|
)
|
|
9423
9576
|
];
|
|
9424
9577
|
mounted = true;
|
|
@@ -9427,22 +9580,22 @@
|
|
|
9427
9580
|
p(new_ctx, dirty) {
|
|
9428
9581
|
ctx = new_ctx;
|
|
9429
9582
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
9430
|
-
|
|
9583
|
+
1048576) {
|
|
9431
9584
|
attr(
|
|
9432
9585
|
button0,
|
|
9433
9586
|
"tabindex",
|
|
9434
9587
|
/*categoryTabIndex*/
|
|
9435
|
-
ctx[
|
|
9588
|
+
ctx[20]
|
|
9436
9589
|
);
|
|
9437
9590
|
}
|
|
9438
9591
|
if (
|
|
9439
9592
|
/*isModalOpen*/
|
|
9440
|
-
ctx[
|
|
9593
|
+
ctx[17]
|
|
9441
9594
|
) {
|
|
9442
9595
|
if (if_block0) {
|
|
9443
9596
|
if_block0.p(ctx, dirty);
|
|
9444
9597
|
if (dirty[0] & /*isModalOpen*/
|
|
9445
|
-
|
|
9598
|
+
131072) {
|
|
9446
9599
|
transition_in(if_block0, 1);
|
|
9447
9600
|
}
|
|
9448
9601
|
} else {
|
|
@@ -9460,14 +9613,14 @@
|
|
|
9460
9613
|
}
|
|
9461
9614
|
if (
|
|
9462
9615
|
/*totalRemainingWordBinItem*/
|
|
9463
|
-
ctx[
|
|
9464
|
-
ctx[
|
|
9616
|
+
ctx[15] !== /*totalCategoryItems*/
|
|
9617
|
+
ctx[9] && !/*isFinished*/
|
|
9465
9618
|
ctx[0]
|
|
9466
9619
|
) {
|
|
9467
9620
|
if (if_block1) {
|
|
9468
9621
|
if_block1.p(ctx, dirty);
|
|
9469
9622
|
if (dirty[0] & /*totalRemainingWordBinItem, totalCategoryItems, isFinished*/
|
|
9470
|
-
|
|
9623
|
+
33281) {
|
|
9471
9624
|
transition_in(if_block1, 1);
|
|
9472
9625
|
}
|
|
9473
9626
|
} else {
|
|
@@ -9484,20 +9637,20 @@
|
|
|
9484
9637
|
check_outros();
|
|
9485
9638
|
}
|
|
9486
9639
|
if (!current || dirty[0] & /*isModalOpen*/
|
|
9487
|
-
|
|
9640
|
+
131072) {
|
|
9488
9641
|
attr(
|
|
9489
9642
|
div0,
|
|
9490
9643
|
"aria-hidden",
|
|
9491
9644
|
/*isModalOpen*/
|
|
9492
|
-
ctx[
|
|
9645
|
+
ctx[17]
|
|
9493
9646
|
);
|
|
9494
9647
|
}
|
|
9495
|
-
if (dirty[0] & /*isModalOpen, categoryTabIndex, checkContainerDragOver, categoryGroups, considerContainerId, isDraggingOver,
|
|
9496
|
-
|
|
9497
|
-
|
|
9648
|
+
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*/
|
|
9649
|
+
1710718331 | dirty[1] & /*checkContainerDroppedItem, checkSelectedSourceContainer, checkifCategoryContainerOpen, getContainerTabSelected, resetTabCategory, handleItemAriaHidden, updateCategory, saveCategory, getTotalWords, addCategoryContainer, getTotalWordsLabel*/
|
|
9650
|
+
12155) {
|
|
9498
9651
|
each_value = ensure_array_like(Object.values(
|
|
9499
9652
|
/*categoryGroups*/
|
|
9500
|
-
ctx[
|
|
9653
|
+
ctx[29]
|
|
9501
9654
|
));
|
|
9502
9655
|
let i;
|
|
9503
9656
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -9519,12 +9672,12 @@
|
|
|
9519
9672
|
check_outros();
|
|
9520
9673
|
}
|
|
9521
9674
|
if (dirty[0] & /*dropContainerId*/
|
|
9522
|
-
|
|
9675
|
+
4096)
|
|
9523
9676
|
show_if = /*checkContainerDroppedItem*/
|
|
9524
|
-
ctx[
|
|
9677
|
+
ctx[31](
|
|
9525
9678
|
CONTAINER_WORD_BIN_ID,
|
|
9526
9679
|
/*dropContainerId*/
|
|
9527
|
-
ctx[
|
|
9680
|
+
ctx[12]
|
|
9528
9681
|
);
|
|
9529
9682
|
if (show_if) {
|
|
9530
9683
|
if (if_block2) {
|
|
@@ -9539,41 +9692,41 @@
|
|
|
9539
9692
|
if_block2 = null;
|
|
9540
9693
|
}
|
|
9541
9694
|
if (!current || dirty[0] & /*totalRemainingWordBinItem*/
|
|
9542
|
-
|
|
9695
|
+
32768)
|
|
9543
9696
|
set_data(
|
|
9544
9697
|
t11,
|
|
9545
9698
|
/*totalRemainingWordBinItem*/
|
|
9546
|
-
ctx[
|
|
9699
|
+
ctx[15]
|
|
9547
9700
|
);
|
|
9548
9701
|
if (!current || dirty[0] & /*totalCategoryItems*/
|
|
9549
|
-
|
|
9702
|
+
512)
|
|
9550
9703
|
set_data(
|
|
9551
9704
|
t13,
|
|
9552
9705
|
/*totalCategoryItems*/
|
|
9553
|
-
ctx[
|
|
9706
|
+
ctx[9]
|
|
9554
9707
|
);
|
|
9555
9708
|
if (!current || dirty[0] & /*totalRemainingWordBinItem*/
|
|
9556
|
-
|
|
9557
|
-
(ctx[
|
|
9709
|
+
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*/
|
|
9710
|
+
(ctx[38](
|
|
9558
9711
|
/*totalRemainingWordBinItem*/
|
|
9559
|
-
ctx[
|
|
9712
|
+
ctx[15]
|
|
9560
9713
|
) ? "hidden" : ""))) {
|
|
9561
9714
|
attr(button1, "class", button1_class_value);
|
|
9562
9715
|
}
|
|
9563
9716
|
if (!current || dirty[0] & /*currentWordBinIndex*/
|
|
9564
|
-
|
|
9565
|
-
ctx[
|
|
9717
|
+
524288 && button1_disabled_value !== (button1_disabled_value = /*currentWordBinIndex*/
|
|
9718
|
+
ctx[19] === 0)) {
|
|
9566
9719
|
button1.disabled = button1_disabled_value;
|
|
9567
9720
|
}
|
|
9568
9721
|
const promptcategorisedndcontainer_changes = {};
|
|
9569
9722
|
if (dirty[0] & /*totalRemainingWordBinItem, currentSelectedItemId*/
|
|
9570
|
-
|
|
9723
|
+
40960)
|
|
9571
9724
|
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[
|
|
9725
|
+
(ctx[38](
|
|
9573
9726
|
/*totalRemainingWordBinItem*/
|
|
9574
|
-
ctx[
|
|
9727
|
+
ctx[15]
|
|
9575
9728
|
) && !/*currentSelectedItemId*/
|
|
9576
|
-
ctx[
|
|
9729
|
+
ctx[13] ? "absolute inset-0" : "");
|
|
9577
9730
|
if (dirty[0] & /*isFinished*/
|
|
9578
9731
|
1)
|
|
9579
9732
|
promptcategorisedndcontainer_changes.isFinished = /*isFinished*/
|
|
@@ -9582,74 +9735,78 @@
|
|
|
9582
9735
|
2)
|
|
9583
9736
|
promptcategorisedndcontainer_changes.isPreviewModeInteractive = /*isPreviewModeInteractive*/
|
|
9584
9737
|
ctx[1];
|
|
9738
|
+
if (dirty[0] & /*categoriseSettingsData*/
|
|
9739
|
+
64)
|
|
9740
|
+
promptcategorisedndcontainer_changes.categoryData = /*categoriseSettingsData*/
|
|
9741
|
+
ctx[6];
|
|
9585
9742
|
promptcategorisedndcontainer.$set(promptcategorisedndcontainer_changes);
|
|
9586
9743
|
if (!current || dirty[0] & /*totalRemainingWordBinItem*/
|
|
9587
|
-
|
|
9588
|
-
(ctx[
|
|
9744
|
+
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*/
|
|
9745
|
+
(ctx[38](
|
|
9589
9746
|
/*totalRemainingWordBinItem*/
|
|
9590
|
-
ctx[
|
|
9747
|
+
ctx[15]
|
|
9591
9748
|
) ? "hidden" : ""))) {
|
|
9592
9749
|
attr(button2, "class", button2_class_value);
|
|
9593
9750
|
}
|
|
9594
9751
|
if (!current || dirty[0] & /*currentWordBinIndex, totalRemainingWordBinItem*/
|
|
9595
|
-
|
|
9596
|
-
ctx[
|
|
9597
|
-
ctx[
|
|
9752
|
+
557056 && button2_disabled_value !== (button2_disabled_value = /*currentWordBinIndex*/
|
|
9753
|
+
ctx[19] === /*totalRemainingWordBinItem*/
|
|
9754
|
+
ctx[15] - 1)) {
|
|
9598
9755
|
button2.disabled = button2_disabled_value;
|
|
9599
9756
|
}
|
|
9600
9757
|
if (!current || dirty[0] & /*isModalOpen*/
|
|
9601
|
-
|
|
9758
|
+
131072) {
|
|
9602
9759
|
attr(
|
|
9603
9760
|
div4,
|
|
9604
9761
|
"aria-hidden",
|
|
9605
9762
|
/*isModalOpen*/
|
|
9606
|
-
ctx[
|
|
9763
|
+
ctx[17]
|
|
9607
9764
|
);
|
|
9608
9765
|
}
|
|
9609
9766
|
if (!current || dirty[0] & /*categoryTabIndex*/
|
|
9610
|
-
|
|
9767
|
+
1048576) {
|
|
9611
9768
|
attr(
|
|
9612
9769
|
div4,
|
|
9613
9770
|
"tabindex",
|
|
9614
9771
|
/*categoryTabIndex*/
|
|
9615
|
-
ctx[
|
|
9772
|
+
ctx[20]
|
|
9616
9773
|
);
|
|
9617
9774
|
}
|
|
9618
9775
|
if (!current || dirty[0] & /*dropContainerId*/
|
|
9619
|
-
|
|
9620
|
-
ctx[
|
|
9776
|
+
4096 && div4_aria_live_value !== (div4_aria_live_value = /*checkContainerDroppedItem*/
|
|
9777
|
+
ctx[31](
|
|
9621
9778
|
CONTAINER_WORD_BIN_ID,
|
|
9622
9779
|
/*dropContainerId*/
|
|
9623
|
-
ctx[
|
|
9780
|
+
ctx[12]
|
|
9624
9781
|
) ? "polite" : "off")) {
|
|
9625
9782
|
attr(div4, "aria-live", div4_aria_live_value);
|
|
9626
9783
|
}
|
|
9627
9784
|
if (!current || dirty[0] & /*considerContainerId, isDraggingOver, dropContainerId, hasAddItemAnimation, sourceSelectedContainerId, currentSelectedItemId*/
|
|
9628
|
-
|
|
9629
|
-
(ctx[
|
|
9785
|
+
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*/
|
|
9786
|
+
(ctx[30](
|
|
9630
9787
|
CONTAINER_WORD_BIN_ID,
|
|
9631
9788
|
/*considerContainerId*/
|
|
9632
|
-
ctx[
|
|
9789
|
+
ctx[10],
|
|
9633
9790
|
/*isDraggingOver*/
|
|
9634
|
-
ctx[
|
|
9791
|
+
ctx[11]
|
|
9635
9792
|
) ? "raw-focus-ring bg-violet-100" : "") + " " + /*checkContainerDroppedItem*/
|
|
9636
|
-
(ctx[
|
|
9793
|
+
(ctx[31](
|
|
9637
9794
|
CONTAINER_WORD_BIN_ID,
|
|
9638
9795
|
/*dropContainerId*/
|
|
9639
|
-
ctx[
|
|
9796
|
+
ctx[12]
|
|
9640
9797
|
) ? "bg-violet-150" : "") + " " + /*checkContainerDroppedItem*/
|
|
9641
|
-
(ctx[
|
|
9798
|
+
(ctx[31](
|
|
9642
9799
|
CONTAINER_WORD_BIN_ID,
|
|
9643
9800
|
/*dropContainerId*/
|
|
9644
|
-
ctx[
|
|
9801
|
+
ctx[12]
|
|
9645
9802
|
) && /*hasAddItemAnimation*/
|
|
9646
|
-
ctx[
|
|
9647
|
-
(ctx[
|
|
9803
|
+
ctx[16] ? "transition bg-white duration-300" : "") + " " + /*checkSelectedSourceContainer*/
|
|
9804
|
+
(ctx[32](
|
|
9648
9805
|
CONTAINER_WORD_BIN_ID,
|
|
9649
9806
|
/*sourceSelectedContainerId*/
|
|
9650
|
-
ctx[
|
|
9807
|
+
ctx[14],
|
|
9651
9808
|
/*currentSelectedItemId*/
|
|
9652
|
-
ctx[
|
|
9809
|
+
ctx[13]
|
|
9653
9810
|
) ? "hover:bg-violet-100 hover-focus-ring cursor-pointer" : ""))) {
|
|
9654
9811
|
attr(div4, "class", div4_class_value);
|
|
9655
9812
|
}
|
|
@@ -9703,7 +9860,7 @@
|
|
|
9703
9860
|
destroy_component(smallchevronleft);
|
|
9704
9861
|
destroy_component(promptcategorisedndcontainer);
|
|
9705
9862
|
destroy_component(smallchevronright);
|
|
9706
|
-
ctx[
|
|
9863
|
+
ctx[55](null);
|
|
9707
9864
|
mounted = false;
|
|
9708
9865
|
run_all(dispose);
|
|
9709
9866
|
}
|
|
@@ -9717,11 +9874,11 @@
|
|
|
9717
9874
|
props: {
|
|
9718
9875
|
rubric: (
|
|
9719
9876
|
/*rubric*/
|
|
9720
|
-
ctx[
|
|
9877
|
+
ctx[25].text
|
|
9721
9878
|
),
|
|
9722
9879
|
prompt: (
|
|
9723
9880
|
/*prompt*/
|
|
9724
|
-
ctx[
|
|
9881
|
+
ctx[27]
|
|
9725
9882
|
),
|
|
9726
9883
|
$$slots: { default: [create_default_slot4] },
|
|
9727
9884
|
$$scope: { ctx }
|
|
@@ -9736,14 +9893,14 @@
|
|
|
9736
9893
|
m(target, anchor) {
|
|
9737
9894
|
insert(target, div, anchor);
|
|
9738
9895
|
mount_component(promptbody, div, null);
|
|
9739
|
-
ctx[
|
|
9896
|
+
ctx[56](div);
|
|
9740
9897
|
current = true;
|
|
9741
9898
|
},
|
|
9742
9899
|
p(ctx2, dirty) {
|
|
9743
9900
|
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
|
-
|
|
9901
|
+
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*/
|
|
9902
|
+
16777211 | dirty[2] & /*$$scope*/
|
|
9903
|
+
256) {
|
|
9747
9904
|
promptbody_changes.$$scope = { dirty, ctx: ctx2 };
|
|
9748
9905
|
}
|
|
9749
9906
|
promptbody.$set(promptbody_changes);
|
|
@@ -9763,7 +9920,7 @@
|
|
|
9763
9920
|
detach(div);
|
|
9764
9921
|
}
|
|
9765
9922
|
destroy_component(promptbody);
|
|
9766
|
-
ctx[
|
|
9923
|
+
ctx[56](null);
|
|
9767
9924
|
}
|
|
9768
9925
|
};
|
|
9769
9926
|
}
|
|
@@ -9792,12 +9949,41 @@
|
|
|
9792
9949
|
let previewResultSr = "";
|
|
9793
9950
|
let enableAriaLive = true;
|
|
9794
9951
|
const totalCategoryWords = [];
|
|
9952
|
+
const categoryDndType = `category-type-${numberRandomizer()}`;
|
|
9953
|
+
let categoriseSettingsData = {
|
|
9954
|
+
considerContainerId: "",
|
|
9955
|
+
considerItemId: "",
|
|
9956
|
+
considerCloneItemId: "",
|
|
9957
|
+
sourceCloneContainerId: "",
|
|
9958
|
+
sourceContainerId: "",
|
|
9959
|
+
dropContainerId: "",
|
|
9960
|
+
isDraggingOver: false,
|
|
9961
|
+
selectedItemId: "",
|
|
9962
|
+
selectedContainerId: "",
|
|
9963
|
+
sourceSelectedContainerId: "",
|
|
9964
|
+
currentAnswer: [],
|
|
9965
|
+
rawCategories: [],
|
|
9966
|
+
rawCategoryItems: [],
|
|
9967
|
+
hasAddItemAnimation: false,
|
|
9968
|
+
openCategoryContainer: [],
|
|
9969
|
+
currentWordBinIndex: 0,
|
|
9970
|
+
currentTabContainer: "",
|
|
9971
|
+
lastSelectedTabContainer: "",
|
|
9972
|
+
selectedItemName: "",
|
|
9973
|
+
previewResultSr: "",
|
|
9974
|
+
isItemsAriaHidden: false
|
|
9975
|
+
};
|
|
9976
|
+
let modalSettingsData = {
|
|
9977
|
+
isModalOpen: false,
|
|
9978
|
+
modalAriaLabel: "",
|
|
9979
|
+
isOpenLastStatus: false
|
|
9980
|
+
};
|
|
9795
9981
|
const { rubric, interaction, metadata, scoringMetadata } = sessionData;
|
|
9796
9982
|
const { prompt, category_groups: interactionCategoryGroups, category_items: interactionCategoryItems } = interaction;
|
|
9797
9983
|
const categoryItems = useFilterUniqueObject(interactionCategoryItems);
|
|
9798
9984
|
const categoryGroups = useFilterUniqueObject(interactionCategoryGroups);
|
|
9799
9985
|
const tabCategory = [];
|
|
9800
|
-
categoryGroups.map((group) => $$invalidate(
|
|
9986
|
+
categoryGroups.map((group) => $$invalidate(8, tabCategory[group.id] = false, tabCategory));
|
|
9801
9987
|
totalCategoryItems = totalRemainingWordBinItem = Object.keys(categoryItems).length;
|
|
9802
9988
|
let wordBinItems = categoryItems.map((item) => item.id);
|
|
9803
9989
|
let initialCategoryAnswer = [
|
|
@@ -9808,24 +9994,39 @@
|
|
|
9808
9994
|
];
|
|
9809
9995
|
let categoryTitleHeight = [];
|
|
9810
9996
|
categoryGroups.map((category) => {
|
|
9811
|
-
$$invalidate(
|
|
9997
|
+
$$invalidate(23, categoryTitleHeight[category.id] = "", categoryTitleHeight);
|
|
9998
|
+
initialCategoryAnswer.push({ categoryId: category.id, itemId: [] });
|
|
9812
9999
|
});
|
|
9813
10000
|
if (metadata) {
|
|
9814
10001
|
const { events } = metadata.interactions;
|
|
9815
10002
|
const currentCategoryList = events.pop();
|
|
9816
10003
|
const { answer_list: answerList } = currentCategoryList;
|
|
9817
10004
|
const selectedItems = [];
|
|
10005
|
+
const selectedCategories = [];
|
|
9818
10006
|
if (answerList.length) {
|
|
9819
10007
|
const categorySavedItems = answerList.map((answer) => {
|
|
9820
10008
|
const { category_id: categoryId, item_id: itemId } = answer;
|
|
10009
|
+
selectedCategories.push(categoryId);
|
|
9821
10010
|
itemId.map((item) => selectedItems.push(item));
|
|
9822
10011
|
return { categoryId, itemId };
|
|
9823
10012
|
});
|
|
10013
|
+
if (selectedCategories.length) {
|
|
10014
|
+
initialCategoryAnswer = initialCategoryAnswer.filter((answer) => !selectedCategories.includes(answer.categoryId));
|
|
10015
|
+
}
|
|
9824
10016
|
wordBinItems = wordBinItems.filter((item) => !new Set(selectedItems).has(item));
|
|
9825
10017
|
initialCategoryAnswer[0].itemId = wordBinItems;
|
|
9826
10018
|
initialCategoryAnswer = [...initialCategoryAnswer, ...categorySavedItems];
|
|
9827
10019
|
}
|
|
9828
10020
|
}
|
|
10021
|
+
const updateCategoriseSettings = (newSettings) => {
|
|
10022
|
+
$$invalidate(6, categoriseSettingsData = {
|
|
10023
|
+
...categoriseSettingsData,
|
|
10024
|
+
...newSettings
|
|
10025
|
+
});
|
|
10026
|
+
};
|
|
10027
|
+
const updateModalSettings = (newSettings) => {
|
|
10028
|
+
$$invalidate(7, modalSettingsData = { ...modalSettingsData, ...newSettings });
|
|
10029
|
+
};
|
|
9829
10030
|
if (isFinished) {
|
|
9830
10031
|
const showOpenContainerList = [];
|
|
9831
10032
|
const { answerList } = scoringMetadata;
|
|
@@ -9857,97 +10058,15 @@
|
|
|
9857
10058
|
itemId: isPreviewMode ? [] : wordBinData
|
|
9858
10059
|
});
|
|
9859
10060
|
initialCategoryAnswer = categoryWithAnswer;
|
|
9860
|
-
|
|
9861
|
-
...get_store_value(categoriseSettings),
|
|
10061
|
+
updateCategoriseSettings({
|
|
9862
10062
|
openCategoryContainer: showOpenContainerList
|
|
9863
10063
|
});
|
|
9864
10064
|
}
|
|
9865
|
-
|
|
9866
|
-
...get_store_value(categoriseSettings),
|
|
10065
|
+
updateCategoriseSettings({
|
|
9867
10066
|
currentAnswer: initialCategoryAnswer,
|
|
9868
10067
|
rawCategoryItems: categoryItems,
|
|
9869
10068
|
rawCategories: categoryGroups
|
|
9870
10069
|
});
|
|
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
10070
|
const checkContainerDragOver = (containerId, storeContainerId, isContainerDragOver) => {
|
|
9952
10071
|
return containerId === storeContainerId && isContainerDragOver && sourceCloneContainerId !== containerId;
|
|
9953
10072
|
};
|
|
@@ -9958,7 +10077,10 @@
|
|
|
9958
10077
|
return !!currentSelectedItemId2 && storeContainerId !== containerId;
|
|
9959
10078
|
};
|
|
9960
10079
|
const openResetModal = () => {
|
|
9961
|
-
|
|
10080
|
+
updateModalSettings({
|
|
10081
|
+
isModalOpen: true,
|
|
10082
|
+
modalAriaLabel: "Reset words"
|
|
10083
|
+
});
|
|
9962
10084
|
};
|
|
9963
10085
|
const getTotalWords = (categoryId, currentAnswerData) => {
|
|
9964
10086
|
let totalWords = 0;
|
|
@@ -9991,10 +10113,7 @@
|
|
|
9991
10113
|
const index = openCategoryContainer2.indexOf(categoryId);
|
|
9992
10114
|
openContainerList.splice(index, 1);
|
|
9993
10115
|
}
|
|
9994
|
-
|
|
9995
|
-
...get_store_value(categoriseSettings),
|
|
9996
|
-
openCategoryContainer: openContainerList
|
|
9997
|
-
});
|
|
10116
|
+
updateCategoriseSettings({ openCategoryContainer: openContainerList });
|
|
9998
10117
|
};
|
|
9999
10118
|
const isWordBInTotalZero = (totalRemainingWordBinItem2) => {
|
|
10000
10119
|
return totalRemainingWordBinItem2 <= 0;
|
|
@@ -10004,12 +10123,14 @@
|
|
|
10004
10123
|
return;
|
|
10005
10124
|
dispatch("saveCategory", detail);
|
|
10006
10125
|
};
|
|
10126
|
+
const updateCategory = ({ detail }) => {
|
|
10127
|
+
updateCategoriseSettings(detail);
|
|
10128
|
+
};
|
|
10007
10129
|
const getContainerTabSelected = (key, containerId) => {
|
|
10008
10130
|
if (key === "Enter" && !currentSelectedItemId) {
|
|
10009
10131
|
setTimeout(
|
|
10010
10132
|
() => {
|
|
10011
|
-
|
|
10012
|
-
...get_store_value(categoriseSettings),
|
|
10133
|
+
updateCategoriseSettings({
|
|
10013
10134
|
currentTabContainer: containerId,
|
|
10014
10135
|
isItemsAriaHidden: false
|
|
10015
10136
|
});
|
|
@@ -10018,8 +10139,7 @@
|
|
|
10018
10139
|
);
|
|
10019
10140
|
}
|
|
10020
10141
|
if (key === "Escape" && currentSelectedItemId) {
|
|
10021
|
-
|
|
10022
|
-
...get_store_value(categoriseSettings),
|
|
10142
|
+
updateCategoriseSettings({
|
|
10023
10143
|
selectedItemId: "",
|
|
10024
10144
|
sourceSelectedContainerId: "",
|
|
10025
10145
|
selectedItemName: ""
|
|
@@ -10027,8 +10147,7 @@
|
|
|
10027
10147
|
}
|
|
10028
10148
|
};
|
|
10029
10149
|
const resetTabCategory = () => {
|
|
10030
|
-
|
|
10031
|
-
...get_store_value(categoriseSettings),
|
|
10150
|
+
updateCategoriseSettings({
|
|
10032
10151
|
isItemsAriaHidden: true,
|
|
10033
10152
|
currentTabContainer: "",
|
|
10034
10153
|
lastSelectedTabContainer: ""
|
|
@@ -10038,21 +10157,25 @@
|
|
|
10038
10157
|
tabCategory[CONTAINER_WORD_BIN_ID].focus();
|
|
10039
10158
|
};
|
|
10040
10159
|
const handleItemAriaHidden = (type) => {
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10160
|
+
updateCategoriseSettings({ isItemsAriaHidden: type });
|
|
10161
|
+
};
|
|
10162
|
+
const navigateCategoryItem = (currentWordBinIndex2, currentAnswer2, position) => {
|
|
10163
|
+
const navigateItem = useNavigateItem(currentWordBinIndex2, currentAnswer2, position);
|
|
10164
|
+
updateCategoriseSettings(navigateItem);
|
|
10165
|
+
};
|
|
10166
|
+
const updateModal = ({ detail }) => {
|
|
10167
|
+
updateModalSettings(detail);
|
|
10045
10168
|
};
|
|
10046
10169
|
function div0_elementresize_handler(category) {
|
|
10047
10170
|
categoryTitleHeight[category.id] = this.clientHeight;
|
|
10048
|
-
$$invalidate(
|
|
10171
|
+
$$invalidate(23, categoryTitleHeight);
|
|
10049
10172
|
}
|
|
10050
10173
|
const keydown_handler = (category, { key }) => getContainerTabSelected(key, category.id);
|
|
10051
10174
|
const blur_handler = () => handleItemAriaHidden(false);
|
|
10052
10175
|
function div1_binding($$value, category) {
|
|
10053
10176
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
10054
10177
|
tabCategory[category.id] = $$value;
|
|
10055
|
-
$$invalidate(
|
|
10178
|
+
$$invalidate(8, tabCategory);
|
|
10056
10179
|
});
|
|
10057
10180
|
}
|
|
10058
10181
|
const keydown_handler_1 = ({ key }) => getContainerTabSelected(key, CONTAINER_WORD_BIN_ID);
|
|
@@ -10060,36 +10183,122 @@
|
|
|
10060
10183
|
function div4_binding($$value) {
|
|
10061
10184
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
10062
10185
|
tabCategory[CONTAINER_WORD_BIN_ID] = $$value;
|
|
10063
|
-
$$invalidate(
|
|
10186
|
+
$$invalidate(8, tabCategory);
|
|
10064
10187
|
});
|
|
10065
10188
|
}
|
|
10066
10189
|
function div_binding($$value) {
|
|
10067
10190
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
10068
10191
|
srDiv = $$value;
|
|
10069
|
-
$$invalidate(2, srDiv);
|
|
10192
|
+
$$invalidate(2, srDiv), $$invalidate(7, modalSettingsData);
|
|
10070
10193
|
});
|
|
10071
10194
|
}
|
|
10072
10195
|
$$self.$$set = ($$props2) => {
|
|
10073
10196
|
if ("sessionData" in $$props2)
|
|
10074
|
-
$$invalidate(
|
|
10197
|
+
$$invalidate(47, sessionData = $$props2.sessionData);
|
|
10075
10198
|
if ("isFinished" in $$props2)
|
|
10076
10199
|
$$invalidate(0, isFinished = $$props2.isFinished);
|
|
10077
10200
|
if ("isPreviewMode" in $$props2)
|
|
10078
|
-
$$invalidate(
|
|
10201
|
+
$$invalidate(48, isPreviewMode = $$props2.isPreviewMode);
|
|
10079
10202
|
if ("isPreviewModeInteractive" in $$props2)
|
|
10080
10203
|
$$invalidate(1, isPreviewModeInteractive = $$props2.isPreviewModeInteractive);
|
|
10081
10204
|
};
|
|
10205
|
+
$$self.$$.update = () => {
|
|
10206
|
+
if ($$self.$$.dirty[0] & /*modalSettingsData, srDiv*/
|
|
10207
|
+
132) {
|
|
10208
|
+
$:
|
|
10209
|
+
if (modalSettingsData) {
|
|
10210
|
+
const { isModalOpen: storeIsModalOpen, isOpenLastStatus } = modalSettingsData;
|
|
10211
|
+
$$invalidate(17, isModalOpen = storeIsModalOpen);
|
|
10212
|
+
$$invalidate(20, categoryTabIndex = storeIsModalOpen ? -1 : 0);
|
|
10213
|
+
if (!storeIsModalOpen && isOpenLastStatus) {
|
|
10214
|
+
setTimeout(() => {
|
|
10215
|
+
$$invalidate(2, srDiv.tabIndex = 0, srDiv);
|
|
10216
|
+
srDiv.focus();
|
|
10217
|
+
$$invalidate(2, srDiv.tabIndex = -1, srDiv);
|
|
10218
|
+
updateModalSettings({ isOpenLastStatus: false });
|
|
10219
|
+
});
|
|
10220
|
+
}
|
|
10221
|
+
}
|
|
10222
|
+
}
|
|
10223
|
+
if ($$self.$$.dirty[0] & /*categoriseSettingsData, currentAnswer, isFinished, totalCategoryWords, tabCategory, previewResultSr*/
|
|
10224
|
+
377) {
|
|
10225
|
+
$:
|
|
10226
|
+
if (categoriseSettingsData) {
|
|
10227
|
+
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;
|
|
10228
|
+
$$invalidate(10, considerContainerId = storeConsiderContainerId);
|
|
10229
|
+
$$invalidate(11, isDraggingOver = storeIsDraggingOver);
|
|
10230
|
+
$$invalidate(12, dropContainerId = storeDropContainerId);
|
|
10231
|
+
sourceCloneContainerId = storeSourceCloneContainerId;
|
|
10232
|
+
$$invalidate(13, currentSelectedItemId = storeSelectedItemId);
|
|
10233
|
+
$$invalidate(14, sourceSelectedContainerId = storeSourceSelectedContainerId);
|
|
10234
|
+
$$invalidate(3, currentAnswer = storeCurrentAnswer);
|
|
10235
|
+
$$invalidate(16, hasAddItemAnimation = storeHasAddItemAnimation);
|
|
10236
|
+
$$invalidate(18, openCategoryContainer = storeOpenCategoryContainer);
|
|
10237
|
+
$$invalidate(19, currentWordBinIndex = storeCurrentWordBinIndex);
|
|
10238
|
+
$$invalidate(21, selectedItemName = storeSelectedItemName);
|
|
10239
|
+
$$invalidate(4, previewResultSr = storepreviewResultSr);
|
|
10240
|
+
$$invalidate(20, categoryTabIndex = storeSelectedItemId.length ? -1 : 0);
|
|
10241
|
+
currentAnswer.map((answer) => {
|
|
10242
|
+
const { categoryId, itemId } = answer;
|
|
10243
|
+
let totalWordCount = itemId.length;
|
|
10244
|
+
if (isFinished) {
|
|
10245
|
+
const items = itemId.filter((item) => {
|
|
10246
|
+
const itemType = item.split(EAT_DASH)[1];
|
|
10247
|
+
return itemType !== ANSWER_MISSED;
|
|
10248
|
+
});
|
|
10249
|
+
totalWordCount = items.length;
|
|
10250
|
+
}
|
|
10251
|
+
$$invalidate(5, totalCategoryWords[categoryId] = totalWordCount, totalCategoryWords);
|
|
10252
|
+
});
|
|
10253
|
+
$$invalidate(15, totalRemainingWordBinItem = totalCategoryWords[CONTAINER_WORD_BIN_ID]);
|
|
10254
|
+
if (lastSelectedTabContainer) {
|
|
10255
|
+
setTimeout(
|
|
10256
|
+
() => {
|
|
10257
|
+
tabCategory[lastSelectedTabContainer].focus();
|
|
10258
|
+
updateCategoriseSettings({ lastSelectedTabContainer: "" });
|
|
10259
|
+
},
|
|
10260
|
+
150
|
|
10261
|
+
);
|
|
10262
|
+
}
|
|
10263
|
+
if (previewResultSr) {
|
|
10264
|
+
setTimeout(
|
|
10265
|
+
() => {
|
|
10266
|
+
$$invalidate(22, enableAriaLive = false);
|
|
10267
|
+
},
|
|
10268
|
+
400
|
|
10269
|
+
);
|
|
10270
|
+
setTimeout(
|
|
10271
|
+
() => {
|
|
10272
|
+
updateCategoriseSettings({ previewResultSr: "" });
|
|
10273
|
+
setTimeout(
|
|
10274
|
+
() => {
|
|
10275
|
+
$$invalidate(22, enableAriaLive = true);
|
|
10276
|
+
},
|
|
10277
|
+
400
|
|
10278
|
+
);
|
|
10279
|
+
},
|
|
10280
|
+
600
|
|
10281
|
+
);
|
|
10282
|
+
}
|
|
10283
|
+
}
|
|
10284
|
+
}
|
|
10285
|
+
};
|
|
10082
10286
|
return [
|
|
10083
10287
|
isFinished,
|
|
10084
10288
|
isPreviewModeInteractive,
|
|
10085
10289
|
srDiv,
|
|
10290
|
+
currentAnswer,
|
|
10291
|
+
previewResultSr,
|
|
10292
|
+
totalCategoryWords,
|
|
10293
|
+
categoriseSettingsData,
|
|
10294
|
+
modalSettingsData,
|
|
10295
|
+
tabCategory,
|
|
10086
10296
|
totalCategoryItems,
|
|
10087
10297
|
considerContainerId,
|
|
10088
10298
|
isDraggingOver,
|
|
10089
10299
|
dropContainerId,
|
|
10090
10300
|
currentSelectedItemId,
|
|
10091
10301
|
sourceSelectedContainerId,
|
|
10092
|
-
currentAnswer,
|
|
10093
10302
|
totalRemainingWordBinItem,
|
|
10094
10303
|
hasAddItemAnimation,
|
|
10095
10304
|
isModalOpen,
|
|
@@ -10097,11 +10306,9 @@
|
|
|
10097
10306
|
currentWordBinIndex,
|
|
10098
10307
|
categoryTabIndex,
|
|
10099
10308
|
selectedItemName,
|
|
10100
|
-
previewResultSr,
|
|
10101
10309
|
enableAriaLive,
|
|
10102
|
-
totalCategoryWords,
|
|
10103
|
-
tabCategory,
|
|
10104
10310
|
categoryTitleHeight,
|
|
10311
|
+
categoryDndType,
|
|
10105
10312
|
rubric,
|
|
10106
10313
|
scoringMetadata,
|
|
10107
10314
|
prompt,
|
|
@@ -10117,10 +10324,13 @@
|
|
|
10117
10324
|
addCategoryContainer,
|
|
10118
10325
|
isWordBInTotalZero,
|
|
10119
10326
|
saveCategory,
|
|
10327
|
+
updateCategory,
|
|
10120
10328
|
getContainerTabSelected,
|
|
10121
10329
|
resetTabCategory,
|
|
10122
10330
|
goToWordBin,
|
|
10123
10331
|
handleItemAriaHidden,
|
|
10332
|
+
navigateCategoryItem,
|
|
10333
|
+
updateModal,
|
|
10124
10334
|
sessionData,
|
|
10125
10335
|
isPreviewMode,
|
|
10126
10336
|
div0_elementresize_handler,
|
|
@@ -10143,9 +10353,9 @@
|
|
|
10143
10353
|
create_fragment21,
|
|
10144
10354
|
safe_not_equal,
|
|
10145
10355
|
{
|
|
10146
|
-
sessionData:
|
|
10356
|
+
sessionData: 47,
|
|
10147
10357
|
isFinished: 0,
|
|
10148
|
-
isPreviewMode:
|
|
10358
|
+
isPreviewMode: 48,
|
|
10149
10359
|
isPreviewModeInteractive: 1
|
|
10150
10360
|
},
|
|
10151
10361
|
null,
|
|
@@ -10153,7 +10363,7 @@
|
|
|
10153
10363
|
);
|
|
10154
10364
|
}
|
|
10155
10365
|
get sessionData() {
|
|
10156
|
-
return this.$$.ctx[
|
|
10366
|
+
return this.$$.ctx[47];
|
|
10157
10367
|
}
|
|
10158
10368
|
set sessionData(sessionData) {
|
|
10159
10369
|
this.$$set({ sessionData });
|
|
@@ -10167,7 +10377,7 @@
|
|
|
10167
10377
|
flush();
|
|
10168
10378
|
}
|
|
10169
10379
|
get isPreviewMode() {
|
|
10170
|
-
return this.$$.ctx[
|
|
10380
|
+
return this.$$.ctx[48];
|
|
10171
10381
|
}
|
|
10172
10382
|
set isPreviewMode(isPreviewMode) {
|
|
10173
10383
|
this.$$set({ isPreviewMode });
|