catchup-library-web 2.6.2 → 2.6.3
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/index.js +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +1 -1
- package/src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx +2 -0
- package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +2 -0
- package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +2 -0
- package/src/components/activities/material-contents/OpenEndedActivityMaterialContent.tsx +2 -2
- package/src/components/activities/material-contents/OrderingActivityMaterialContent.tsx +2 -0
package/dist/index.js
CHANGED
|
@@ -4943,6 +4943,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4943
4943
|
setMousePosition({ x: 0, y: 0 });
|
|
4944
4944
|
};
|
|
4945
4945
|
const handleTouchStart = (e, option, element) => {
|
|
4946
|
+
e.preventDefault();
|
|
4946
4947
|
const touch = e.touches[0];
|
|
4947
4948
|
setDraggedOption(option);
|
|
4948
4949
|
setDraggedElement(element);
|
|
@@ -5060,6 +5061,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
5060
5061
|
{
|
|
5061
5062
|
ref: draggedOption === option ? dragElementRef : null,
|
|
5062
5063
|
className: `${draggedOption === option ? "opacity-40" : selectedOption === option ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5064
|
+
style: { touchAction: "none" },
|
|
5063
5065
|
onMouseDown: (e) => handleMouseDown(e, option),
|
|
5064
5066
|
onTouchStart: (e) => handleTouchStart(e, option, e.currentTarget),
|
|
5065
5067
|
onTouchMove: handleTouchMove,
|
|
@@ -5431,6 +5433,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5431
5433
|
};
|
|
5432
5434
|
const handleTouchStart = (e, materialValue, element) => {
|
|
5433
5435
|
if (!checkCanAnswerQuestion()) return;
|
|
5436
|
+
e.preventDefault();
|
|
5434
5437
|
const touch = e.touches[0];
|
|
5435
5438
|
setDraggedValue(materialValue);
|
|
5436
5439
|
setDraggedElement(element);
|
|
@@ -5540,6 +5543,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5540
5543
|
{
|
|
5541
5544
|
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5542
5545
|
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5546
|
+
style: { touchAction: "none" },
|
|
5543
5547
|
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5544
5548
|
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5545
5549
|
onTouchMove: handleTouchMove,
|
|
@@ -5874,6 +5878,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5874
5878
|
};
|
|
5875
5879
|
const handleTouchStart = (e, materialValue, element) => {
|
|
5876
5880
|
if (!checkCanAnswerQuestion()) return;
|
|
5881
|
+
e.preventDefault();
|
|
5877
5882
|
const touch = e.touches[0];
|
|
5878
5883
|
setDraggedValue(materialValue);
|
|
5879
5884
|
setDraggedElement(element);
|
|
@@ -5987,6 +5992,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5987
5992
|
{
|
|
5988
5993
|
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5989
5994
|
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5995
|
+
style: { touchAction: "none" },
|
|
5990
5996
|
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5991
5997
|
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5992
5998
|
onTouchMove: handleTouchMove,
|
|
@@ -6572,7 +6578,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6572
6578
|
src: answerMapAnswer,
|
|
6573
6579
|
alt: "document",
|
|
6574
6580
|
size: "custom",
|
|
6575
|
-
className: "w-[80%] rounded-catchup-xlarge"
|
|
6581
|
+
className: "w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
6576
6582
|
}
|
|
6577
6583
|
) });
|
|
6578
6584
|
} else if (fileType === "PDF") {
|
|
@@ -6614,7 +6620,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6614
6620
|
src: answerMapAnswer,
|
|
6615
6621
|
alt: "document",
|
|
6616
6622
|
size: "custom",
|
|
6617
|
-
className: "w-[80%] rounded-catchup-xlarge"
|
|
6623
|
+
className: "w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
6618
6624
|
}
|
|
6619
6625
|
) }) : fileType === "PDF" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BasePDF_default, { file: answerMapAnswer }) }) : null });
|
|
6620
6626
|
};
|
|
@@ -6771,6 +6777,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6771
6777
|
};
|
|
6772
6778
|
const handleTouchStart = (e, materialKey, element) => {
|
|
6773
6779
|
if (!checkCanAnswerQuestion()) return;
|
|
6780
|
+
e.preventDefault();
|
|
6774
6781
|
const touch = e.touches[0];
|
|
6775
6782
|
setDraggedKey(materialKey);
|
|
6776
6783
|
setDraggedElement(element);
|
|
@@ -6902,6 +6909,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6902
6909
|
ref: draggedKey === materialKey ? dragElementRef : null,
|
|
6903
6910
|
"data-ordering-drop-zone": materialKey,
|
|
6904
6911
|
className: `flex-1 ${draggedKey === materialKey ? "opacity-40" : selectedKey === materialKey ? "ring-2 ring-blue-500" : "opacity-100"} ${dropTargetKey === materialKey && draggedKey !== materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200`,
|
|
6912
|
+
style: { touchAction: "none" },
|
|
6905
6913
|
onMouseDown: (e) => handleMouseDown(e, materialKey),
|
|
6906
6914
|
onMouseEnter: () => draggedKey && draggedKey !== materialKey && setDropTargetKey(materialKey),
|
|
6907
6915
|
onMouseLeave: () => setDropTargetKey(null),
|
package/dist/index.mjs
CHANGED
|
@@ -4709,6 +4709,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4709
4709
|
setMousePosition({ x: 0, y: 0 });
|
|
4710
4710
|
};
|
|
4711
4711
|
const handleTouchStart = (e, option, element) => {
|
|
4712
|
+
e.preventDefault();
|
|
4712
4713
|
const touch = e.touches[0];
|
|
4713
4714
|
setDraggedOption(option);
|
|
4714
4715
|
setDraggedElement(element);
|
|
@@ -4826,6 +4827,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
4826
4827
|
{
|
|
4827
4828
|
ref: draggedOption === option ? dragElementRef : null,
|
|
4828
4829
|
className: `${draggedOption === option ? "opacity-40" : selectedOption === option ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
4830
|
+
style: { touchAction: "none" },
|
|
4829
4831
|
onMouseDown: (e) => handleMouseDown(e, option),
|
|
4830
4832
|
onTouchStart: (e) => handleTouchStart(e, option, e.currentTarget),
|
|
4831
4833
|
onTouchMove: handleTouchMove,
|
|
@@ -5197,6 +5199,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5197
5199
|
};
|
|
5198
5200
|
const handleTouchStart = (e, materialValue, element) => {
|
|
5199
5201
|
if (!checkCanAnswerQuestion()) return;
|
|
5202
|
+
e.preventDefault();
|
|
5200
5203
|
const touch = e.touches[0];
|
|
5201
5204
|
setDraggedValue(materialValue);
|
|
5202
5205
|
setDraggedElement(element);
|
|
@@ -5306,6 +5309,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5306
5309
|
{
|
|
5307
5310
|
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5308
5311
|
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5312
|
+
style: { touchAction: "none" },
|
|
5309
5313
|
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5310
5314
|
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5311
5315
|
onTouchMove: handleTouchMove,
|
|
@@ -5640,6 +5644,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5640
5644
|
};
|
|
5641
5645
|
const handleTouchStart = (e, materialValue, element) => {
|
|
5642
5646
|
if (!checkCanAnswerQuestion()) return;
|
|
5647
|
+
e.preventDefault();
|
|
5643
5648
|
const touch = e.touches[0];
|
|
5644
5649
|
setDraggedValue(materialValue);
|
|
5645
5650
|
setDraggedElement(element);
|
|
@@ -5753,6 +5758,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5753
5758
|
{
|
|
5754
5759
|
ref: draggedValue === materialValue ? dragElementRef : null,
|
|
5755
5760
|
className: `${draggedValue === materialValue ? "opacity-40" : selectedValue === materialValue ? "ring-2 ring-blue-500" : "opacity-100"} transition-all duration-200`,
|
|
5761
|
+
style: { touchAction: "none" },
|
|
5756
5762
|
onMouseDown: (e) => handleMouseDown(e, materialValue),
|
|
5757
5763
|
onTouchStart: (e) => handleTouchStart(e, materialValue, e.currentTarget),
|
|
5758
5764
|
onTouchMove: handleTouchMove,
|
|
@@ -6338,7 +6344,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6338
6344
|
src: answerMapAnswer,
|
|
6339
6345
|
alt: "document",
|
|
6340
6346
|
size: "custom",
|
|
6341
|
-
className: "w-[80%] rounded-catchup-xlarge"
|
|
6347
|
+
className: "w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
6342
6348
|
}
|
|
6343
6349
|
) });
|
|
6344
6350
|
} else if (fileType === "PDF") {
|
|
@@ -6380,7 +6386,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
6380
6386
|
src: answerMapAnswer,
|
|
6381
6387
|
alt: "document",
|
|
6382
6388
|
size: "custom",
|
|
6383
|
-
className: "w-[80%] rounded-catchup-xlarge"
|
|
6389
|
+
className: "w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
6384
6390
|
}
|
|
6385
6391
|
) }) : fileType === "PDF" ? /* @__PURE__ */ jsx39("div", { className: "flex flex-col justify-center items-center my-5", children: /* @__PURE__ */ jsx39(BasePDF_default, { file: answerMapAnswer }) }) : null });
|
|
6386
6392
|
};
|
|
@@ -6537,6 +6543,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6537
6543
|
};
|
|
6538
6544
|
const handleTouchStart = (e, materialKey, element) => {
|
|
6539
6545
|
if (!checkCanAnswerQuestion()) return;
|
|
6546
|
+
e.preventDefault();
|
|
6540
6547
|
const touch = e.touches[0];
|
|
6541
6548
|
setDraggedKey(materialKey);
|
|
6542
6549
|
setDraggedElement(element);
|
|
@@ -6668,6 +6675,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
6668
6675
|
ref: draggedKey === materialKey ? dragElementRef : null,
|
|
6669
6676
|
"data-ordering-drop-zone": materialKey,
|
|
6670
6677
|
className: `flex-1 ${draggedKey === materialKey ? "opacity-40" : selectedKey === materialKey ? "ring-2 ring-blue-500" : "opacity-100"} ${dropTargetKey === materialKey && draggedKey !== materialKey ? "ring-2 ring-blue-400 bg-blue-50" : ""} transition-all duration-200`,
|
|
6678
|
+
style: { touchAction: "none" },
|
|
6671
6679
|
onMouseDown: (e) => handleMouseDown(e, materialKey),
|
|
6672
6680
|
onMouseEnter: () => draggedKey && draggedKey !== materialKey && setDropTargetKey(materialKey),
|
|
6673
6681
|
onMouseLeave: () => setDropTargetKey(null),
|
package/package.json
CHANGED
package/src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
CHANGED
|
@@ -122,6 +122,7 @@ const FillInTheBlanksActivityMaterialContent = ({
|
|
|
122
122
|
option: any,
|
|
123
123
|
element: HTMLElement,
|
|
124
124
|
): void => {
|
|
125
|
+
e.preventDefault();
|
|
125
126
|
const touch = e.touches[0];
|
|
126
127
|
setDraggedOption(option);
|
|
127
128
|
setDraggedElement(element);
|
|
@@ -273,6 +274,7 @@ const FillInTheBlanksActivityMaterialContent = ({
|
|
|
273
274
|
? "ring-2 ring-blue-500"
|
|
274
275
|
: "opacity-100"
|
|
275
276
|
} transition-all duration-200`}
|
|
277
|
+
style={{ touchAction: "none" }}
|
|
276
278
|
onMouseDown={(e) => handleMouseDown(e, option)}
|
|
277
279
|
onTouchStart={(e) => handleTouchStart(e, option, e.currentTarget)}
|
|
278
280
|
onTouchMove={handleTouchMove}
|
|
@@ -201,6 +201,7 @@ const GroupingActivityMaterialContent = ({
|
|
|
201
201
|
element: HTMLElement,
|
|
202
202
|
): void => {
|
|
203
203
|
if (!checkCanAnswerQuestion()) return;
|
|
204
|
+
e.preventDefault();
|
|
204
205
|
const touch = e.touches[0];
|
|
205
206
|
setDraggedValue(materialValue);
|
|
206
207
|
setDraggedElement(element);
|
|
@@ -366,6 +367,7 @@ const GroupingActivityMaterialContent = ({
|
|
|
366
367
|
? "ring-2 ring-blue-500"
|
|
367
368
|
: "opacity-100"
|
|
368
369
|
} transition-all duration-200`}
|
|
370
|
+
style={{ touchAction: "none" }}
|
|
369
371
|
onMouseDown={(e) => handleMouseDown(e, materialValue)}
|
|
370
372
|
onTouchStart={(e) =>
|
|
371
373
|
handleTouchStart(e, materialValue, e.currentTarget)
|
|
@@ -198,6 +198,7 @@ const MatchingActivityMaterialContent = ({
|
|
|
198
198
|
element: HTMLElement,
|
|
199
199
|
): void => {
|
|
200
200
|
if (!checkCanAnswerQuestion()) return;
|
|
201
|
+
e.preventDefault();
|
|
201
202
|
const touch = e.touches[0];
|
|
202
203
|
setDraggedValue(materialValue);
|
|
203
204
|
setDraggedElement(element);
|
|
@@ -365,6 +366,7 @@ const MatchingActivityMaterialContent = ({
|
|
|
365
366
|
? "ring-2 ring-blue-500"
|
|
366
367
|
: "opacity-100"
|
|
367
368
|
} transition-all duration-200`}
|
|
369
|
+
style={{ touchAction: "none" }}
|
|
368
370
|
onMouseDown={(e) => handleMouseDown(e, materialValue)}
|
|
369
371
|
onTouchStart={(e) =>
|
|
370
372
|
handleTouchStart(e, materialValue, e.currentTarget)
|
|
@@ -29,7 +29,7 @@ const OpenEndedActivityMaterialContent = ({
|
|
|
29
29
|
src={answerMapAnswer}
|
|
30
30
|
alt="document"
|
|
31
31
|
size="custom"
|
|
32
|
-
className="w-[80%] rounded-catchup-xlarge"
|
|
32
|
+
className="w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
33
33
|
/>
|
|
34
34
|
</div>
|
|
35
35
|
);
|
|
@@ -74,7 +74,7 @@ const OpenEndedActivityMaterialContent = ({
|
|
|
74
74
|
src={answerMapAnswer}
|
|
75
75
|
alt="document"
|
|
76
76
|
size="custom"
|
|
77
|
-
className="w-[80%] rounded-catchup-xlarge"
|
|
77
|
+
className="w-[80%] rounded-catchup-xlarge max-h-[50vh] object-contain"
|
|
78
78
|
/>
|
|
79
79
|
</div>
|
|
80
80
|
) : fileType === "PDF" ? (
|
|
@@ -95,6 +95,7 @@ const OrderingActivityMaterialContent = ({
|
|
|
95
95
|
element: HTMLElement,
|
|
96
96
|
): void => {
|
|
97
97
|
if (!checkCanAnswerQuestion()) return;
|
|
98
|
+
e.preventDefault();
|
|
98
99
|
const touch = e.touches[0];
|
|
99
100
|
setDraggedKey(materialKey);
|
|
100
101
|
setDraggedElement(element);
|
|
@@ -286,6 +287,7 @@ const OrderingActivityMaterialContent = ({
|
|
|
286
287
|
? "ring-2 ring-blue-400 bg-blue-50"
|
|
287
288
|
: ""
|
|
288
289
|
} transition-all duration-200`}
|
|
290
|
+
style={{ touchAction: "none" }}
|
|
289
291
|
onMouseDown={(e) => handleMouseDown(e, materialKey)}
|
|
290
292
|
onMouseEnter={() =>
|
|
291
293
|
draggedKey &&
|