catchup-library-web 1.20.19 → 1.20.21
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 +7 -8
- package/dist/index.mjs +7 -8
- package/package.json +1 -1
- package/src/components/activities/material-contents/GroupingActivityMaterialContent.tsx +1 -1
- package/src/components/activities/material-contents/MatchingActivityMaterialContent.tsx +1 -1
- package/src/utilization/DateUtilization.ts +6 -6
package/dist/index.js
CHANGED
|
@@ -5379,7 +5379,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5379
5379
|
"div",
|
|
5380
5380
|
{
|
|
5381
5381
|
className: `border-catchup-blue ${contentMap.type === "TEXT" ? "h-catchup-activity-text-outer-box-item" : "h-catchup-activity-media-outer-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`,
|
|
5382
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5383
5383
|
(inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5384
5384
|
"span",
|
|
5385
5385
|
{
|
|
@@ -5677,7 +5677,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5677
5677
|
"div",
|
|
5678
5678
|
{
|
|
5679
5679
|
className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
5680
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5680
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5681
5681
|
answerMapKey
|
|
5682
5682
|
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5683
5683
|
"span",
|
|
@@ -9215,12 +9215,11 @@ var calculateStartDateOfWeek = (date, isGMT) => {
|
|
|
9215
9215
|
}
|
|
9216
9216
|
};
|
|
9217
9217
|
var calculateEndDateOfWeek = (date, isGMT) => {
|
|
9218
|
-
|
|
9219
|
-
const
|
|
9220
|
-
endDate
|
|
9221
|
-
endDate.
|
|
9222
|
-
endDate.
|
|
9223
|
-
endDate.setMilliseconds(999);
|
|
9218
|
+
const dayOfWeek = date.getDay();
|
|
9219
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9220
|
+
const endDate = new Date(date);
|
|
9221
|
+
endDate.setDate(date.getDate() + daysUntilSunday);
|
|
9222
|
+
endDate.setHours(23, 59, 59, 999);
|
|
9224
9223
|
if (isGMT) {
|
|
9225
9224
|
return adjustForTimezone(endDate);
|
|
9226
9225
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -5163,7 +5163,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
5163
5163
|
"div",
|
|
5164
5164
|
{
|
|
5165
5165
|
className: `border-catchup-blue ${contentMap.type === "TEXT" ? "h-catchup-activity-text-outer-box-item" : "h-catchup-activity-media-outer-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`,
|
|
5166
|
-
children: /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4", children: /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5166
|
+
children: /* @__PURE__ */ jsx32("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ jsx32("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
5167
5167
|
(inputPart, index2) => /* @__PURE__ */ jsx32(
|
|
5168
5168
|
"span",
|
|
5169
5169
|
{
|
|
@@ -5461,7 +5461,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
5461
5461
|
"div",
|
|
5462
5462
|
{
|
|
5463
5463
|
className: `${contentMap.type === "TEXT" ? "h-catchup-activity-text-box-item" : "h-catchup-activity-media-box-item"} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
5464
|
-
children: /* @__PURE__ */ jsx34("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4", children: /* @__PURE__ */ jsx34("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5464
|
+
children: /* @__PURE__ */ jsx34("div", { className: "flex flex-col items-center justify-center transition-all duration-300 px-4 text-center", children: /* @__PURE__ */ jsx34("p", { className: "text-lg whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5465
5465
|
answerMapKey
|
|
5466
5466
|
).map((inputPart, index2) => /* @__PURE__ */ jsx34(
|
|
5467
5467
|
"span",
|
|
@@ -8999,12 +8999,11 @@ var calculateStartDateOfWeek = (date, isGMT) => {
|
|
|
8999
8999
|
}
|
|
9000
9000
|
};
|
|
9001
9001
|
var calculateEndDateOfWeek = (date, isGMT) => {
|
|
9002
|
-
|
|
9003
|
-
const
|
|
9004
|
-
endDate
|
|
9005
|
-
endDate.
|
|
9006
|
-
endDate.
|
|
9007
|
-
endDate.setMilliseconds(999);
|
|
9002
|
+
const dayOfWeek = date.getDay();
|
|
9003
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
9004
|
+
const endDate = new Date(date);
|
|
9005
|
+
endDate.setDate(date.getDate() + daysUntilSunday);
|
|
9006
|
+
endDate.setHours(23, 59, 59, 999);
|
|
9008
9007
|
if (isGMT) {
|
|
9009
9008
|
return adjustForTimezone(endDate);
|
|
9010
9009
|
} else {
|
package/package.json
CHANGED
|
@@ -201,7 +201,7 @@ const GroupingActivityMaterialContent = ({
|
|
|
201
201
|
: "h-catchup-activity-media-outer-box-item"
|
|
202
202
|
} flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`}
|
|
203
203
|
>
|
|
204
|
-
<div className="flex flex-col items-center justify-center transition-all duration-300 px-4">
|
|
204
|
+
<div className="flex flex-col items-center justify-center transition-all duration-300 px-4 text-center">
|
|
205
205
|
<p className="text-lg whitespace-pre-wrap">
|
|
206
206
|
{constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
207
207
|
(inputPart, index) => (
|
|
@@ -223,7 +223,7 @@ const MatchingActivityMaterialContent = ({
|
|
|
223
223
|
: "border-catchup-blue"
|
|
224
224
|
}`}
|
|
225
225
|
>
|
|
226
|
-
<div className="flex flex-col items-center justify-center transition-all duration-300 px-4">
|
|
226
|
+
<div className="flex flex-col items-center justify-center transition-all duration-300 px-4 text-center">
|
|
227
227
|
<p className="text-lg whitespace-pre-wrap">
|
|
228
228
|
{constructInputWithSpecialExpressionList(
|
|
229
229
|
answerMapKey
|
|
@@ -71,12 +71,12 @@ export const calculateStartDateOfWeek = (date: Date, isGMT: boolean) => {
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
export const calculateEndDateOfWeek = (date: Date, isGMT: boolean) => {
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
endDate
|
|
78
|
-
endDate.
|
|
79
|
-
endDate.
|
|
74
|
+
const dayOfWeek = date.getDay();
|
|
75
|
+
const daysUntilSunday = (7 - dayOfWeek) % 7;
|
|
76
|
+
|
|
77
|
+
const endDate = new Date(date);
|
|
78
|
+
endDate.setDate(date.getDate() + daysUntilSunday);
|
|
79
|
+
endDate.setHours(23, 59, 59, 999);
|
|
80
80
|
|
|
81
81
|
if (isGMT) {
|
|
82
82
|
return adjustForTimezone(endDate);
|