catchup-library-web 1.0.2 → 1.0.4
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.d.mts +305 -2
- package/dist/index.d.ts +305 -2
- package/dist/index.js +2768 -334
- package/dist/index.mjs +2657 -292
- package/package.json +1 -1
- package/src/components/boxes/SelectionBox.tsx +41 -0
- package/src/components/boxes/SelectionCheckbox.tsx +66 -0
- package/src/components/labels/ActivityTemplateLabel.tsx +15 -0
- package/src/components/labels/BrandLabel.tsx +19 -0
- package/src/components/labels/CoterieLabel.tsx +11 -0
- package/src/components/labels/GradeLabel.tsx +11 -0
- package/src/components/labels/OutcomeLabel.tsx +15 -0
- package/src/components/labels/PersonalLabel.tsx +23 -0
- package/src/components/labels/PublishingHouseLabel.tsx +23 -0
- package/src/components/modals/BaseModal.tsx +56 -0
- package/src/components/tabs/SelectionTab.tsx +45 -0
- package/src/index.ts +25 -0
- package/src/properties/BoxProperties.ts +12 -0
- package/src/properties/GroupProperties.ts +1 -1
- package/src/properties/LabelProperties.ts +33 -0
- package/src/properties/ModalProperties.ts +8 -0
- package/src/properties/TabProperties.ts +9 -0
- package/src/utilization/AuthorizationUtilization.ts +15 -0
- package/src/utilization/CategoryUtilization.ts +314 -0
- package/src/utilization/DateUtilization.ts +85 -0
- package/src/utilization/FunctionUtilization.ts +50 -0
- package/src/utilization/GamificationUtilization.ts +495 -0
- package/src/utilization/IndividualModelUtilization.ts +48 -0
- package/src/utilization/ManagementUtilization.ts +1201 -0
- package/src/utilization/NotificationUtilization.ts +59 -0
- package/src/utilization/ReportUtilization.ts +42 -0
- package/src/utilization/TokenUtilization.ts +39 -0
package/dist/index.mjs
CHANGED
|
@@ -649,6 +649,56 @@ var ApproveButton = ({
|
|
|
649
649
|
};
|
|
650
650
|
var ApproveButton_default = ApproveButton;
|
|
651
651
|
|
|
652
|
+
// src/components/modals/BaseModal.tsx
|
|
653
|
+
import Modal from "react-modal";
|
|
654
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
655
|
+
var BaseModal = ({
|
|
656
|
+
isOpen,
|
|
657
|
+
size,
|
|
658
|
+
onAfterOpen,
|
|
659
|
+
onRequestClose,
|
|
660
|
+
customSize,
|
|
661
|
+
children
|
|
662
|
+
}) => {
|
|
663
|
+
return /* @__PURE__ */ jsx9(
|
|
664
|
+
Modal,
|
|
665
|
+
{
|
|
666
|
+
isOpen,
|
|
667
|
+
onAfterOpen,
|
|
668
|
+
onRequestClose,
|
|
669
|
+
style: {
|
|
670
|
+
content: {
|
|
671
|
+
top: "50%",
|
|
672
|
+
left: "50%",
|
|
673
|
+
right: "auto",
|
|
674
|
+
bottom: "auto",
|
|
675
|
+
marginRight: "-50%",
|
|
676
|
+
transform: "translate(-50%, -50%)",
|
|
677
|
+
padding: 0,
|
|
678
|
+
borderRadius: 20,
|
|
679
|
+
background: "",
|
|
680
|
+
border: "",
|
|
681
|
+
maxHeight: "70%",
|
|
682
|
+
overflow: "auto",
|
|
683
|
+
zIndex: 20
|
|
684
|
+
},
|
|
685
|
+
overlay: {
|
|
686
|
+
background: "rgba(0, 0, 0, 0.6)"
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
contentLabel: "",
|
|
690
|
+
children: customSize ? /* @__PURE__ */ jsx9("div", { className: `${customSize}`, children }) : /* @__PURE__ */ jsx9(
|
|
691
|
+
"div",
|
|
692
|
+
{
|
|
693
|
+
className: `${size === "small" ? "w-[600px]" : "w-[600px] lg:w-[900px] xl:w-[1200px] 2xl:w-[1500px]"}`,
|
|
694
|
+
children
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
};
|
|
700
|
+
var BaseModal_default = BaseModal;
|
|
701
|
+
|
|
652
702
|
// src/language/i18n.ts
|
|
653
703
|
import i18n from "i18next";
|
|
654
704
|
import { initReactI18next } from "react-i18next";
|
|
@@ -1996,24 +2046,24 @@ var parseMaterialMapFromData = (data, type) => {
|
|
|
1996
2046
|
};
|
|
1997
2047
|
|
|
1998
2048
|
// src/components/dividers/DividerLine.tsx
|
|
1999
|
-
import { jsx as
|
|
2049
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2000
2050
|
var DividerLine = () => {
|
|
2001
|
-
return /* @__PURE__ */
|
|
2051
|
+
return /* @__PURE__ */ jsx10("div", { className: "bg-catchup-gray-50 h-[1px] w-full my-3" });
|
|
2002
2052
|
};
|
|
2003
2053
|
var DividerLine_default = DividerLine;
|
|
2004
2054
|
|
|
2005
2055
|
// src/components/dividers/VerticalDividerLine.tsx
|
|
2006
|
-
import { jsx as
|
|
2056
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2007
2057
|
var VerticalDividerLine = () => {
|
|
2008
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ jsx11("div", { className: "bg-catchup-gray-50 h-full w-[1px] mx-3" });
|
|
2009
2059
|
};
|
|
2010
2060
|
var VerticalDividerLine_default = VerticalDividerLine;
|
|
2011
2061
|
|
|
2012
2062
|
// src/components/activities/body-content/ShowBodyMediaByContentType.tsx
|
|
2013
2063
|
import { useState as useState8 } from "react";
|
|
2014
|
-
import
|
|
2064
|
+
import Modal2 from "react-modal";
|
|
2015
2065
|
import { InlineMath } from "react-katex";
|
|
2016
|
-
import { jsx as
|
|
2066
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2017
2067
|
var ShowBodyMediaByContentType = ({
|
|
2018
2068
|
index,
|
|
2019
2069
|
type,
|
|
@@ -2055,16 +2105,16 @@ var ShowBodyMediaByContentType = ({
|
|
|
2055
2105
|
addition += 1;
|
|
2056
2106
|
}
|
|
2057
2107
|
valuePartList.push(
|
|
2058
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ jsx12(
|
|
2059
2109
|
"span",
|
|
2060
2110
|
{
|
|
2061
2111
|
className: "text-xl whitespace-pre-wrap",
|
|
2062
2112
|
children: constructInputWithSpecialExpressionList(textValue).map(
|
|
2063
|
-
(inputPart, index2) => /* @__PURE__ */
|
|
2113
|
+
(inputPart, index2) => /* @__PURE__ */ jsx12(
|
|
2064
2114
|
"span",
|
|
2065
2115
|
{
|
|
2066
2116
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
2067
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
2117
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx12("span", { className: "text-2xl", children: /* @__PURE__ */ jsx12(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
2068
2118
|
},
|
|
2069
2119
|
index2
|
|
2070
2120
|
)
|
|
@@ -2078,17 +2128,17 @@ var ShowBodyMediaByContentType = ({
|
|
|
2078
2128
|
const secondIndex = subValue.indexOf(checkText) + checkText.length + textValue.length - addition;
|
|
2079
2129
|
currentIndex++;
|
|
2080
2130
|
valuePartList.push(
|
|
2081
|
-
/* @__PURE__ */
|
|
2131
|
+
/* @__PURE__ */ jsx12(
|
|
2082
2132
|
"span",
|
|
2083
2133
|
{
|
|
2084
2134
|
className: `text-xl font-bold whitespace-pre-wrap`,
|
|
2085
2135
|
children: constructInputWithSpecialExpressionList(
|
|
2086
2136
|
copyValue.substring(firstIndex + checkText.length, secondIndex)
|
|
2087
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
2137
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx12(
|
|
2088
2138
|
"span",
|
|
2089
2139
|
{
|
|
2090
2140
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
2091
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
2141
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx12("span", { className: "text-2xl", children: /* @__PURE__ */ jsx12(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
2092
2142
|
},
|
|
2093
2143
|
index2
|
|
2094
2144
|
))
|
|
@@ -2108,7 +2158,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2108
2158
|
if (textValue.trim() !== "") {
|
|
2109
2159
|
currentIndex++;
|
|
2110
2160
|
valuePartList.push(
|
|
2111
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xl", children: textValue }, `${index}_${currentIndex}`)
|
|
2112
2162
|
);
|
|
2113
2163
|
}
|
|
2114
2164
|
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
@@ -2120,7 +2170,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2120
2170
|
currentIndex++;
|
|
2121
2171
|
valuePartList.push(
|
|
2122
2172
|
/* @__PURE__ */ jsxs7("div", { className: "relative w-[200px]", children: [
|
|
2123
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ jsx12(
|
|
2124
2174
|
BaseImage_default,
|
|
2125
2175
|
{
|
|
2126
2176
|
src: imageSource,
|
|
@@ -2129,7 +2179,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2129
2179
|
className: "rounded-catchup-xlarge"
|
|
2130
2180
|
}
|
|
2131
2181
|
),
|
|
2132
|
-
/* @__PURE__ */
|
|
2182
|
+
/* @__PURE__ */ jsx12(
|
|
2133
2183
|
"div",
|
|
2134
2184
|
{
|
|
2135
2185
|
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
@@ -2137,7 +2187,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2137
2187
|
setShowFullScreen(true);
|
|
2138
2188
|
setSelectedFullScreenItem(imageSource);
|
|
2139
2189
|
},
|
|
2140
|
-
children: /* @__PURE__ */
|
|
2190
|
+
children: /* @__PURE__ */ jsx12(
|
|
2141
2191
|
BaseImage_default,
|
|
2142
2192
|
{
|
|
2143
2193
|
src: "/icons/arrow-up.png",
|
|
@@ -2159,7 +2209,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2159
2209
|
if (textValue.trim() !== "") {
|
|
2160
2210
|
currentIndex++;
|
|
2161
2211
|
valuePartList.push(
|
|
2162
|
-
/* @__PURE__ */
|
|
2212
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xl", children: textValue }, `${index}-${currentIndex}`)
|
|
2163
2213
|
);
|
|
2164
2214
|
}
|
|
2165
2215
|
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
@@ -2170,7 +2220,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2170
2220
|
);
|
|
2171
2221
|
currentIndex++;
|
|
2172
2222
|
valuePartList.push(
|
|
2173
|
-
/* @__PURE__ */
|
|
2223
|
+
/* @__PURE__ */ jsx12(
|
|
2174
2224
|
"video",
|
|
2175
2225
|
{
|
|
2176
2226
|
src: videoSource,
|
|
@@ -2188,7 +2238,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2188
2238
|
if (textValue.trim() !== "") {
|
|
2189
2239
|
currentIndex++;
|
|
2190
2240
|
valuePartList.push(
|
|
2191
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsx12("p", { className: "text-xl", children: textValue }, `${index}-${currentIndex}`)
|
|
2192
2242
|
);
|
|
2193
2243
|
}
|
|
2194
2244
|
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
@@ -2199,7 +2249,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2199
2249
|
);
|
|
2200
2250
|
currentIndex++;
|
|
2201
2251
|
valuePartList.push(
|
|
2202
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsx12(
|
|
2203
2253
|
"audio",
|
|
2204
2254
|
{
|
|
2205
2255
|
src: audioSource,
|
|
@@ -2226,8 +2276,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
2226
2276
|
const imageText = regexMatchImageText[1];
|
|
2227
2277
|
valuePartList.push(
|
|
2228
2278
|
/* @__PURE__ */ jsxs7("div", { className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2", children: [
|
|
2229
|
-
/* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsx12("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ jsx12("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
2280
|
+
/* @__PURE__ */ jsx12(
|
|
2231
2281
|
"span",
|
|
2232
2282
|
{
|
|
2233
2283
|
className: "text-xl whitespace-pre-wrap ",
|
|
@@ -2239,16 +2289,16 @@ var ShowBodyMediaByContentType = ({
|
|
|
2239
2289
|
);
|
|
2240
2290
|
} else {
|
|
2241
2291
|
valuePartList.push(
|
|
2242
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ jsx12(
|
|
2243
2293
|
"span",
|
|
2244
2294
|
{
|
|
2245
2295
|
className: "text-xl whitespace-pre-wrap",
|
|
2246
2296
|
children: constructInputWithSpecialExpressionList(copyValue).map(
|
|
2247
|
-
(inputPart, index2) => /* @__PURE__ */
|
|
2297
|
+
(inputPart, index2) => /* @__PURE__ */ jsx12(
|
|
2248
2298
|
"span",
|
|
2249
2299
|
{
|
|
2250
2300
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
2251
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
2301
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx12("span", { className: "text-2xl", children: /* @__PURE__ */ jsx12(InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
2252
2302
|
},
|
|
2253
2303
|
index2
|
|
2254
2304
|
)
|
|
@@ -2262,8 +2312,8 @@ var ShowBodyMediaByContentType = ({
|
|
|
2262
2312
|
return valuePartList;
|
|
2263
2313
|
};
|
|
2264
2314
|
const RenderShowFullScreenItem = () => {
|
|
2265
|
-
return /* @__PURE__ */
|
|
2266
|
-
|
|
2315
|
+
return /* @__PURE__ */ jsx12(
|
|
2316
|
+
Modal2,
|
|
2267
2317
|
{
|
|
2268
2318
|
isOpen: showFullScreen,
|
|
2269
2319
|
onAfterOpen: () => {
|
|
@@ -2294,7 +2344,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2294
2344
|
},
|
|
2295
2345
|
contentLabel: "",
|
|
2296
2346
|
children: /* @__PURE__ */ jsxs7("div", { className: "flex-1 flex flex-col", children: [
|
|
2297
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ jsx12("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ jsx12(
|
|
2298
2348
|
BaseImage_default,
|
|
2299
2349
|
{
|
|
2300
2350
|
src: "/icons/cross-red.png",
|
|
@@ -2306,7 +2356,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2306
2356
|
}
|
|
2307
2357
|
}
|
|
2308
2358
|
) }),
|
|
2309
|
-
/* @__PURE__ */
|
|
2359
|
+
/* @__PURE__ */ jsx12("div", { className: "flex items-center justify-center h-[500]", children: /* @__PURE__ */ jsx12(
|
|
2310
2360
|
BaseImage_default,
|
|
2311
2361
|
{
|
|
2312
2362
|
src: selectedFullScreenItem,
|
|
@@ -2321,14 +2371,14 @@ var ShowBodyMediaByContentType = ({
|
|
|
2321
2371
|
};
|
|
2322
2372
|
const RenderMainContent = () => {
|
|
2323
2373
|
if (type === "TEXT") {
|
|
2324
|
-
return /* @__PURE__ */
|
|
2374
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-row flex-wrap items-center mx-auto w-full", children: /* @__PURE__ */ jsx12("span", { children: retrieveValueParts(value) }) });
|
|
2325
2375
|
} else if (type === "IMAGE") {
|
|
2326
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-col items-center relative", children: /* @__PURE__ */ jsxs7(
|
|
2327
2377
|
"div",
|
|
2328
2378
|
{
|
|
2329
2379
|
className: `${size ? `${convertToPercentage(size)}` : ""} rounded-catchup-xlarge relative`,
|
|
2330
2380
|
children: [
|
|
2331
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ jsx12(
|
|
2332
2382
|
BaseImage_default,
|
|
2333
2383
|
{
|
|
2334
2384
|
src: value,
|
|
@@ -2337,7 +2387,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2337
2387
|
className: "w-full rounded-catchup-xlarge"
|
|
2338
2388
|
}
|
|
2339
2389
|
),
|
|
2340
|
-
/* @__PURE__ */
|
|
2390
|
+
/* @__PURE__ */ jsx12(
|
|
2341
2391
|
"div",
|
|
2342
2392
|
{
|
|
2343
2393
|
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
@@ -2345,7 +2395,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2345
2395
|
setShowFullScreen(true);
|
|
2346
2396
|
setSelectedFullScreenItem(value);
|
|
2347
2397
|
},
|
|
2348
|
-
children: /* @__PURE__ */
|
|
2398
|
+
children: /* @__PURE__ */ jsx12(
|
|
2349
2399
|
BaseImage_default,
|
|
2350
2400
|
{
|
|
2351
2401
|
src: "/icons/arrow-up.png",
|
|
@@ -2360,7 +2410,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2360
2410
|
}
|
|
2361
2411
|
) });
|
|
2362
2412
|
} else if (type === "VIDEO") {
|
|
2363
|
-
return /* @__PURE__ */
|
|
2413
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ jsx12(
|
|
2364
2414
|
"video",
|
|
2365
2415
|
{
|
|
2366
2416
|
src: value,
|
|
@@ -2369,7 +2419,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2369
2419
|
}
|
|
2370
2420
|
) });
|
|
2371
2421
|
} else if (type === "AUDIO") {
|
|
2372
|
-
return /* @__PURE__ */
|
|
2422
|
+
return /* @__PURE__ */ jsx12("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ jsx12("audio", { src: value, controls: true, className: `rounded-catchup-xlarge` }) });
|
|
2373
2423
|
}
|
|
2374
2424
|
};
|
|
2375
2425
|
return /* @__PURE__ */ jsxs7("div", { className: "w-full", children: [
|
|
@@ -2380,7 +2430,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
2380
2430
|
var ShowBodyMediaByContentType_default = ShowBodyMediaByContentType;
|
|
2381
2431
|
|
|
2382
2432
|
// src/components/activities/body-content/ActivityBodyContent.tsx
|
|
2383
|
-
import { jsx as
|
|
2433
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2384
2434
|
var ActivityBodyContent = ({
|
|
2385
2435
|
templateType,
|
|
2386
2436
|
bodyMap,
|
|
@@ -2388,7 +2438,7 @@ var ActivityBodyContent = ({
|
|
|
2388
2438
|
answerMap
|
|
2389
2439
|
}) => {
|
|
2390
2440
|
let currentQQIndex = 0;
|
|
2391
|
-
return /* @__PURE__ */
|
|
2441
|
+
return /* @__PURE__ */ jsx13("div", { className: "flex flex-col justify-center items-center", children: Object.keys(bodyMap).map((key, index) => {
|
|
2392
2442
|
const body = JSON.parse(bodyMap[key]);
|
|
2393
2443
|
if (templateType === "DROPDOWN") {
|
|
2394
2444
|
while (body.value.includes("@@")) {
|
|
@@ -2465,7 +2515,7 @@ var ActivityBodyContent = ({
|
|
|
2465
2515
|
currentQQIndex++;
|
|
2466
2516
|
}
|
|
2467
2517
|
}
|
|
2468
|
-
return /* @__PURE__ */
|
|
2518
|
+
return /* @__PURE__ */ jsx13(
|
|
2469
2519
|
ShowBodyMediaByContentType_default,
|
|
2470
2520
|
{
|
|
2471
2521
|
index,
|
|
@@ -2484,7 +2534,7 @@ import { InlineMath as InlineMath2 } from "react-katex";
|
|
|
2484
2534
|
// src/components/groups/InputGroup.tsx
|
|
2485
2535
|
import Select from "react-select";
|
|
2486
2536
|
import { useEffect, useRef } from "react";
|
|
2487
|
-
import { jsx as
|
|
2537
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2488
2538
|
var InputGroup = ({
|
|
2489
2539
|
type,
|
|
2490
2540
|
title,
|
|
@@ -2548,7 +2598,7 @@ var InputGroup = ({
|
|
|
2548
2598
|
className: "flex flex-row items-center gap-x-1 cursor-pointer",
|
|
2549
2599
|
onClick,
|
|
2550
2600
|
children: [
|
|
2551
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ jsx14(
|
|
2552
2602
|
BaseImage_default,
|
|
2553
2603
|
{
|
|
2554
2604
|
src: value ? "/icons/checkbox.png" : "/icons/checkbox-empty.png",
|
|
@@ -2558,15 +2608,15 @@ var InputGroup = ({
|
|
|
2558
2608
|
}
|
|
2559
2609
|
}
|
|
2560
2610
|
),
|
|
2561
|
-
/* @__PURE__ */
|
|
2611
|
+
/* @__PURE__ */ jsx14("p", { className: "", children: title })
|
|
2562
2612
|
]
|
|
2563
2613
|
}
|
|
2564
2614
|
);
|
|
2565
2615
|
};
|
|
2566
2616
|
const FileInputGroup = () => {
|
|
2567
2617
|
return /* @__PURE__ */ jsxs8("div", { className: "my-1", children: [
|
|
2568
|
-
title ? /* @__PURE__ */
|
|
2569
|
-
/* @__PURE__ */
|
|
2618
|
+
title ? /* @__PURE__ */ jsx14("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
2619
|
+
/* @__PURE__ */ jsx14(
|
|
2570
2620
|
"input",
|
|
2571
2621
|
{
|
|
2572
2622
|
className: "w-full py-2 px-4 border border-catchup-gray-100 placeholder-catchup-gray-200 rounded-catchup-large text-black focus:outline-none focus:border-catchup-blue-400 focus:shadow-input",
|
|
@@ -2584,8 +2634,8 @@ var InputGroup = ({
|
|
|
2584
2634
|
};
|
|
2585
2635
|
const DateInputGroup = () => {
|
|
2586
2636
|
return /* @__PURE__ */ jsxs8("div", { className: "my-1", children: [
|
|
2587
|
-
title ? /* @__PURE__ */
|
|
2588
|
-
/* @__PURE__ */
|
|
2637
|
+
title ? /* @__PURE__ */ jsx14("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
2638
|
+
/* @__PURE__ */ jsx14(
|
|
2589
2639
|
"input",
|
|
2590
2640
|
{
|
|
2591
2641
|
className: `w-full py-2 px-4 border ${errorText ? "border-catchup-red shadow-error" : theme === "red" ? "border-catchup-red bg-catchup-red text-catchup-white focus:border-catchup-red" : "border-catchup-gray-100 placeholder-catchup-gray-200 focus:border-catchup-blue-400"} rounded-catchup-large text-black focus:outline-none focus:shadow-input`,
|
|
@@ -2601,8 +2651,8 @@ var InputGroup = ({
|
|
|
2601
2651
|
};
|
|
2602
2652
|
const SearchableSelectInputGroup = () => {
|
|
2603
2653
|
return /* @__PURE__ */ jsxs8("div", { className: "my-1", children: [
|
|
2604
|
-
title ? /* @__PURE__ */
|
|
2605
|
-
/* @__PURE__ */
|
|
2654
|
+
title ? /* @__PURE__ */ jsx14("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400 ", children: title }) : null,
|
|
2655
|
+
/* @__PURE__ */ jsx14(
|
|
2606
2656
|
Select,
|
|
2607
2657
|
{
|
|
2608
2658
|
options: convertOptionListToSelectComponent(
|
|
@@ -2667,14 +2717,14 @@ var InputGroup = ({
|
|
|
2667
2717
|
const TextAreaInputGroup = () => {
|
|
2668
2718
|
return /* @__PURE__ */ jsxs8("div", { className: "my-1 flex-1 flex flex-col relative", children: [
|
|
2669
2719
|
/* @__PURE__ */ jsxs8("div", { className: "flex flex-row justify-between items-center", children: [
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx14("div", { children: title ? /* @__PURE__ */ jsx14("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null }),
|
|
2721
|
+
/* @__PURE__ */ jsx14("div", { children: limit ? /* @__PURE__ */ jsxs8("p", { className: "text-md font-semibold pr-2 py-1 text-catchup-gray-400", children: [
|
|
2672
2722
|
value.length,
|
|
2673
2723
|
" / ",
|
|
2674
2724
|
limit
|
|
2675
2725
|
] }) : null })
|
|
2676
2726
|
] }),
|
|
2677
|
-
/* @__PURE__ */
|
|
2727
|
+
/* @__PURE__ */ jsx14(
|
|
2678
2728
|
"textarea",
|
|
2679
2729
|
{
|
|
2680
2730
|
ref: textAreaRef,
|
|
@@ -2694,8 +2744,8 @@ var InputGroup = ({
|
|
|
2694
2744
|
};
|
|
2695
2745
|
const TextInputGroup = () => {
|
|
2696
2746
|
return /* @__PURE__ */ jsxs8("div", { className: "my-1 relative", children: [
|
|
2697
|
-
title ? /* @__PURE__ */
|
|
2698
|
-
/* @__PURE__ */
|
|
2747
|
+
title ? /* @__PURE__ */ jsx14("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
2748
|
+
/* @__PURE__ */ jsx14(
|
|
2699
2749
|
"input",
|
|
2700
2750
|
{
|
|
2701
2751
|
disabled,
|
|
@@ -2835,7 +2885,7 @@ var getColorByIndex = (index) => {
|
|
|
2835
2885
|
|
|
2836
2886
|
// src/components/dropdowns/MediaDropdown.tsx
|
|
2837
2887
|
import { useState as useState9 } from "react";
|
|
2838
|
-
import { jsx as
|
|
2888
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2839
2889
|
var MediaDropdown = ({ id, answer, optionList }) => {
|
|
2840
2890
|
const [showDropdown, setShowDropdown] = useState9(false);
|
|
2841
2891
|
return /* @__PURE__ */ jsxs9(
|
|
@@ -2849,8 +2899,8 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
2849
2899
|
setShowDropdown(false);
|
|
2850
2900
|
},
|
|
2851
2901
|
children: [
|
|
2852
|
-
/* @__PURE__ */
|
|
2853
|
-
/* @__PURE__ */
|
|
2902
|
+
/* @__PURE__ */ jsx15("div", { className: "w-full flex flex-col items-center justify-center", children: answer }),
|
|
2903
|
+
/* @__PURE__ */ jsx15(
|
|
2854
2904
|
"ul",
|
|
2855
2905
|
{
|
|
2856
2906
|
className: `absolute ${showDropdown ? "opacity-100 visible" : "opacity-0 invisible"} flex flex-col items-center w-[300px] rounded-catchup-xlarge border-3 transition-all duration-300 border-catchup-blue bg-catchup-white px-4 py-4 translate-x-1/2 right-1/2 mt-2 z-10`,
|
|
@@ -2859,7 +2909,7 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
2859
2909
|
{
|
|
2860
2910
|
className: `${option.listItemClassNames ? option.listItemClassNames : ""}`,
|
|
2861
2911
|
children: [
|
|
2862
|
-
/* @__PURE__ */
|
|
2912
|
+
/* @__PURE__ */ jsx15(
|
|
2863
2913
|
"div",
|
|
2864
2914
|
{
|
|
2865
2915
|
className: `w-full flex flex-col my-2 ${option.divClassNames ? option.divClassNames : ""}`,
|
|
@@ -2867,7 +2917,7 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
2867
2917
|
children: option.media
|
|
2868
2918
|
}
|
|
2869
2919
|
),
|
|
2870
|
-
index !== optionList.length - 1 ? /* @__PURE__ */
|
|
2920
|
+
index !== optionList.length - 1 ? /* @__PURE__ */ jsx15("div", { className: "w-full border my-1 border-catchup-light-blue rounded-catchup-full" }) : null
|
|
2871
2921
|
]
|
|
2872
2922
|
},
|
|
2873
2923
|
option.id
|
|
@@ -2883,8 +2933,8 @@ var MediaDropdown_default = MediaDropdown;
|
|
|
2883
2933
|
|
|
2884
2934
|
// src/components/activities/material-content/ShowMaterialMediaByContentType.tsx
|
|
2885
2935
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState10 } from "react";
|
|
2886
|
-
import
|
|
2887
|
-
import { jsx as
|
|
2936
|
+
import Modal3 from "react-modal";
|
|
2937
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2888
2938
|
var ShowMaterialMediaByContentType = ({
|
|
2889
2939
|
key,
|
|
2890
2940
|
contentType,
|
|
@@ -2912,8 +2962,8 @@ var ShowMaterialMediaByContentType = ({
|
|
|
2912
2962
|
}
|
|
2913
2963
|
}, [isLoaded, key]);
|
|
2914
2964
|
const RenderShowFullScreenItem = () => {
|
|
2915
|
-
return /* @__PURE__ */
|
|
2916
|
-
|
|
2965
|
+
return /* @__PURE__ */ jsx16(
|
|
2966
|
+
Modal3,
|
|
2917
2967
|
{
|
|
2918
2968
|
isOpen: showFullScreen,
|
|
2919
2969
|
onAfterOpen: () => {
|
|
@@ -2944,7 +2994,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
2944
2994
|
},
|
|
2945
2995
|
contentLabel: "",
|
|
2946
2996
|
children: /* @__PURE__ */ jsxs10("div", { className: "flex-1 flex flex-col", children: [
|
|
2947
|
-
/* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ jsx16("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ jsx16(
|
|
2948
2998
|
BaseImage_default,
|
|
2949
2999
|
{
|
|
2950
3000
|
src: "/icons/cross-red.png",
|
|
@@ -2956,7 +3006,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
2956
3006
|
}
|
|
2957
3007
|
}
|
|
2958
3008
|
) }),
|
|
2959
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx16(
|
|
2960
3010
|
BaseImage_default,
|
|
2961
3011
|
{
|
|
2962
3012
|
src: selectedFullScreenItem,
|
|
@@ -2971,12 +3021,12 @@ var ShowMaterialMediaByContentType = ({
|
|
|
2971
3021
|
};
|
|
2972
3022
|
return contentType === "IMAGE" ? /* @__PURE__ */ jsxs10("div", { children: [
|
|
2973
3023
|
RenderShowFullScreenItem(),
|
|
2974
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ jsx16("div", { className: "my-2", children: /* @__PURE__ */ jsx16("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ jsxs10(
|
|
2975
3025
|
"div",
|
|
2976
3026
|
{
|
|
2977
3027
|
className: `${isFullHeight ? "h-catchup-activity-box-item" : "max-w-catchup-activity-box-item"} flex flex-col justify-center items-center relative`,
|
|
2978
3028
|
children: [
|
|
2979
|
-
/* @__PURE__ */
|
|
3029
|
+
/* @__PURE__ */ jsx16(
|
|
2980
3030
|
BaseImage_default,
|
|
2981
3031
|
{
|
|
2982
3032
|
src,
|
|
@@ -2989,7 +3039,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
2989
3039
|
}
|
|
2990
3040
|
}
|
|
2991
3041
|
),
|
|
2992
|
-
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */
|
|
3042
|
+
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ jsx16(
|
|
2993
3043
|
"div",
|
|
2994
3044
|
{
|
|
2995
3045
|
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
@@ -3001,7 +3051,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
3001
3051
|
setShowFullScreen(true);
|
|
3002
3052
|
setSelectedFullScreenItem(src);
|
|
3003
3053
|
},
|
|
3004
|
-
children: /* @__PURE__ */
|
|
3054
|
+
children: /* @__PURE__ */ jsx16(
|
|
3005
3055
|
BaseImage_default,
|
|
3006
3056
|
{
|
|
3007
3057
|
src: "/icons/arrow-up.png",
|
|
@@ -3015,7 +3065,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
3015
3065
|
]
|
|
3016
3066
|
}
|
|
3017
3067
|
) }) })
|
|
3018
|
-
] }, key) : contentType === "VIDEO" ? /* @__PURE__ */
|
|
3068
|
+
] }, key) : contentType === "VIDEO" ? /* @__PURE__ */ jsx16("div", { className: "my-2", children: /* @__PURE__ */ jsx16("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ jsx16("div", { className: "h-full flex flex-col justify-center items-center", children: /* @__PURE__ */ jsx16(
|
|
3019
3069
|
"video",
|
|
3020
3070
|
{
|
|
3021
3071
|
className: "h-catchup-activity-box-item rounded-catchup-xlarge",
|
|
@@ -3024,7 +3074,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
3024
3074
|
onClick: () => {
|
|
3025
3075
|
}
|
|
3026
3076
|
}
|
|
3027
|
-
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */
|
|
3077
|
+
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ jsx16("div", { className: "my-2", children: /* @__PURE__ */ jsx16("div", { className: "h-full flex flex-row flex-wrap items-center", children: /* @__PURE__ */ jsx16("div", { className: "h-full flex flex-col justify-center items-center", children: /* @__PURE__ */ jsx16(
|
|
3028
3078
|
"audio",
|
|
3029
3079
|
{
|
|
3030
3080
|
className: "h-catchup-activity-box-item rounded-catchup-xlarge",
|
|
@@ -3038,7 +3088,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
3038
3088
|
var ShowMaterialMediaByContentType_default = ShowMaterialMediaByContentType;
|
|
3039
3089
|
|
|
3040
3090
|
// src/components/activities/material-content/DropdownActivityMaterialContent.tsx
|
|
3041
|
-
import { jsx as
|
|
3091
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3042
3092
|
var DropdownActivityMaterialContent = ({
|
|
3043
3093
|
uniqueValue,
|
|
3044
3094
|
answer,
|
|
@@ -3081,21 +3131,21 @@ var DropdownActivityMaterialContent = ({
|
|
|
3081
3131
|
};
|
|
3082
3132
|
const answerMap = retrieveAnswerMap();
|
|
3083
3133
|
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-row flex-wrap items-center", children: [
|
|
3084
|
-
/* @__PURE__ */
|
|
3085
|
-
/* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3134
|
+
/* @__PURE__ */ jsx17("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx17("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
3135
|
+
/* @__PURE__ */ jsx17("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx17(DividerLine_default, {}) }),
|
|
3136
|
+
/* @__PURE__ */ jsx17("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
3087
3137
|
const answerKey = Object.keys(materialMap[materialKey])[0];
|
|
3088
3138
|
const learnerAnswerState = checkAnswerState(
|
|
3089
3139
|
answerKey,
|
|
3090
3140
|
answerMap[materialKey]
|
|
3091
3141
|
);
|
|
3092
|
-
return /* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ jsx17("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ jsx17("div", { className: "mx-2", children: /* @__PURE__ */ jsxs11("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
3143
|
+
/* @__PURE__ */ jsx17("div", { className: "my-auto", children: /* @__PURE__ */ jsxs11("p", { className: "text-xl", children: [
|
|
3094
3144
|
parseFloat(materialKey) + 1,
|
|
3095
3145
|
"."
|
|
3096
3146
|
] }) }),
|
|
3097
3147
|
/* @__PURE__ */ jsxs11("div", { className: "w-full relative", children: [
|
|
3098
|
-
/* @__PURE__ */
|
|
3148
|
+
/* @__PURE__ */ jsx17("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsx17("div", { className: "flex-1", children: /* @__PURE__ */ jsx17(
|
|
3099
3149
|
InputGroup_default,
|
|
3100
3150
|
{
|
|
3101
3151
|
type: "select",
|
|
@@ -3103,13 +3153,13 @@ var DropdownActivityMaterialContent = ({
|
|
|
3103
3153
|
optionList: shuffleArray(
|
|
3104
3154
|
materialMap[materialKey][answerKey]
|
|
3105
3155
|
).map((materialOption) => ({
|
|
3106
|
-
text: /* @__PURE__ */
|
|
3156
|
+
text: /* @__PURE__ */ jsx17("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
3107
3157
|
materialOption
|
|
3108
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
3158
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx17(
|
|
3109
3159
|
"span",
|
|
3110
3160
|
{
|
|
3111
3161
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3112
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
3162
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx17("span", { className: "text-2xl", children: /* @__PURE__ */ jsx17(
|
|
3113
3163
|
InlineMath2,
|
|
3114
3164
|
{
|
|
3115
3165
|
math: inputPart.value
|
|
@@ -3124,11 +3174,11 @@ var DropdownActivityMaterialContent = ({
|
|
|
3124
3174
|
onChange(answer, materialKey, e.target.value);
|
|
3125
3175
|
}
|
|
3126
3176
|
}
|
|
3127
|
-
) }) : /* @__PURE__ */
|
|
3177
|
+
) }) : /* @__PURE__ */ jsx17(
|
|
3128
3178
|
MediaDropdown_default,
|
|
3129
3179
|
{
|
|
3130
3180
|
id: materialKey,
|
|
3131
|
-
answer: answerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */
|
|
3181
|
+
answer: answerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ jsx17("div", { className: "w-catchup-activity-box-item border h-catchup-activity-box-item rounded-catchup-xlarge border-dashed border-catchup-blue", children: /* @__PURE__ */ jsx17("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ jsx17("span", { className: "italic", children: i18n_default.t("please_select") }) }) }) : /* @__PURE__ */ jsx17(
|
|
3132
3182
|
ShowMaterialMediaByContentType_default,
|
|
3133
3183
|
{
|
|
3134
3184
|
contentType: contentMap.type,
|
|
@@ -3140,7 +3190,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
3140
3190
|
optionList: materialMap[materialKey][answerKey].map(
|
|
3141
3191
|
(materialOption, index2) => ({
|
|
3142
3192
|
id: index2,
|
|
3143
|
-
media: /* @__PURE__ */
|
|
3193
|
+
media: /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17(
|
|
3144
3194
|
ShowMaterialMediaByContentType_default,
|
|
3145
3195
|
{
|
|
3146
3196
|
contentType: contentMap.type,
|
|
@@ -3159,24 +3209,24 @@ var DropdownActivityMaterialContent = ({
|
|
|
3159
3209
|
})
|
|
3160
3210
|
)
|
|
3161
3211
|
}
|
|
3162
|
-
) : /* @__PURE__ */
|
|
3212
|
+
) : /* @__PURE__ */ jsx17("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
3163
3213
|
answerMap[materialKey]
|
|
3164
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
3214
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx17(
|
|
3165
3215
|
"span",
|
|
3166
3216
|
{
|
|
3167
3217
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3168
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
3218
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx17("span", { className: "text-2xl", children: /* @__PURE__ */ jsx17(InlineMath2, { math: inputPart.value }) }) : inputPart.value
|
|
3169
3219
|
},
|
|
3170
3220
|
index2
|
|
3171
3221
|
)) }) }),
|
|
3172
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */
|
|
3222
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx17("div", { className: "absolute top-[0px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx17(
|
|
3173
3223
|
BaseImage_default,
|
|
3174
3224
|
{
|
|
3175
3225
|
src: "/icons/checkbox.png",
|
|
3176
3226
|
alt: "chekbbox",
|
|
3177
3227
|
size: "small"
|
|
3178
3228
|
}
|
|
3179
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */
|
|
3229
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx17("div", { className: "absolute top-[0px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx17(
|
|
3180
3230
|
BaseImage_default,
|
|
3181
3231
|
{
|
|
3182
3232
|
src: "/icons/cross-red.png",
|
|
@@ -3192,7 +3242,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
3192
3242
|
var DropdownActivityMaterialContent_default = DropdownActivityMaterialContent;
|
|
3193
3243
|
|
|
3194
3244
|
// src/components/activities/DropdownActivityContent.tsx
|
|
3195
|
-
import { jsx as
|
|
3245
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3196
3246
|
var DropdownActivityContent = ({
|
|
3197
3247
|
answer,
|
|
3198
3248
|
data,
|
|
@@ -3216,7 +3266,7 @@ var DropdownActivityContent = ({
|
|
|
3216
3266
|
changeAnswer(answer2);
|
|
3217
3267
|
};
|
|
3218
3268
|
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-row flex-wrap", children: [
|
|
3219
|
-
/* @__PURE__ */
|
|
3269
|
+
/* @__PURE__ */ jsx18("div", { className: "w-full md:w-[60%]", children: /* @__PURE__ */ jsx18(
|
|
3220
3270
|
ActivityBodyContent_default,
|
|
3221
3271
|
{
|
|
3222
3272
|
bodyMap: dropdownBodyMap,
|
|
@@ -3225,9 +3275,9 @@ var DropdownActivityContent = ({
|
|
|
3225
3275
|
templateType: "DROPDOWN"
|
|
3226
3276
|
}
|
|
3227
3277
|
) }),
|
|
3228
|
-
/* @__PURE__ */
|
|
3229
|
-
/* @__PURE__ */
|
|
3230
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ jsx18("div", { className: "contents md:hidden", children: /* @__PURE__ */ jsx18(DividerLine_default, {}) }),
|
|
3279
|
+
/* @__PURE__ */ jsx18("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx18(VerticalDividerLine_default, {}) }),
|
|
3280
|
+
/* @__PURE__ */ jsx18("div", { className: "w-full md:flex-1", children: /* @__PURE__ */ jsx18(
|
|
3231
3281
|
DropdownActivityMaterialContent_default,
|
|
3232
3282
|
{
|
|
3233
3283
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -3252,7 +3302,7 @@ import { useDrop as useDrop2 } from "react-dnd";
|
|
|
3252
3302
|
|
|
3253
3303
|
// src/components/dnds/DraggableItem.tsx
|
|
3254
3304
|
import { useDrag } from "react-dnd";
|
|
3255
|
-
import { jsx as
|
|
3305
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
3256
3306
|
var DraggableItem = ({
|
|
3257
3307
|
key,
|
|
3258
3308
|
item,
|
|
@@ -3274,11 +3324,11 @@ var DraggableItem = ({
|
|
|
3274
3324
|
})
|
|
3275
3325
|
});
|
|
3276
3326
|
const opacity = isDragging ? 0.4 : 1;
|
|
3277
|
-
return /* @__PURE__ */
|
|
3327
|
+
return /* @__PURE__ */ jsx19(
|
|
3278
3328
|
"div",
|
|
3279
3329
|
{
|
|
3280
3330
|
className: `${isDragging ? "w-[0px] opacity-0" : "opacity-100"} transition-all duration-500`,
|
|
3281
|
-
children: /* @__PURE__ */
|
|
3331
|
+
children: /* @__PURE__ */ jsx19("div", { ref: drag, className: "", style: { opacity }, children: component })
|
|
3282
3332
|
},
|
|
3283
3333
|
key
|
|
3284
3334
|
);
|
|
@@ -3288,7 +3338,7 @@ var DraggableItem_default = DraggableItem;
|
|
|
3288
3338
|
// src/components/dnds/DroppableItem.tsx
|
|
3289
3339
|
import { useRef as useRef3 } from "react";
|
|
3290
3340
|
import { useDrop } from "react-dnd";
|
|
3291
|
-
import { jsx as
|
|
3341
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
3292
3342
|
var DroppableItem = ({
|
|
3293
3343
|
key,
|
|
3294
3344
|
item,
|
|
@@ -3308,7 +3358,7 @@ var DroppableItem = ({
|
|
|
3308
3358
|
}
|
|
3309
3359
|
});
|
|
3310
3360
|
dropRef(drop(ref));
|
|
3311
|
-
return /* @__PURE__ */
|
|
3361
|
+
return /* @__PURE__ */ jsx20(
|
|
3312
3362
|
"div",
|
|
3313
3363
|
{
|
|
3314
3364
|
className: `w-full transition-all duration-500 h-full`,
|
|
@@ -3321,7 +3371,7 @@ var DroppableItem = ({
|
|
|
3321
3371
|
var DroppableItem_default = DroppableItem;
|
|
3322
3372
|
|
|
3323
3373
|
// src/components/activities/material-content/FillInTheBlanksActivityMaterialContent.tsx
|
|
3324
|
-
import { jsx as
|
|
3374
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3325
3375
|
var FillInTheBlanksActivityMaterialContent = ({
|
|
3326
3376
|
uniqueValue,
|
|
3327
3377
|
answer,
|
|
@@ -3381,10 +3431,10 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3381
3431
|
const answerMap = retrieveAnswerMap();
|
|
3382
3432
|
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-row flex-wrap items-center", onMouseUp: () => {
|
|
3383
3433
|
}, children: [
|
|
3384
|
-
/* @__PURE__ */
|
|
3385
|
-
/* @__PURE__ */
|
|
3386
|
-
/* @__PURE__ */
|
|
3387
|
-
(option, index) => checkAnswerProvided(answerMap, option) ? /* @__PURE__ */
|
|
3434
|
+
/* @__PURE__ */ jsx21("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx21("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
|
|
3435
|
+
/* @__PURE__ */ jsx21("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx21(DividerLine_default, {}) }),
|
|
3436
|
+
/* @__PURE__ */ jsx21("div", { className: "w-full flex flex-row flex-wrap gap-x-2 gap-y-2 my-2", children: shuffleOptionList.map(
|
|
3437
|
+
(option, index) => checkAnswerProvided(answerMap, option) ? /* @__PURE__ */ jsx21("div", { className: "opacity-30", children: /* @__PURE__ */ jsx21(
|
|
3388
3438
|
ShowMaterialMediaByContentType_default,
|
|
3389
3439
|
{
|
|
3390
3440
|
contentType: contentMap.type,
|
|
@@ -3392,12 +3442,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3392
3442
|
canFullScreen: true
|
|
3393
3443
|
},
|
|
3394
3444
|
`${uniqueValue}-${index}`
|
|
3395
|
-
) }) : /* @__PURE__ */
|
|
3445
|
+
) }) : /* @__PURE__ */ jsx21(
|
|
3396
3446
|
DraggableItem_default,
|
|
3397
3447
|
{
|
|
3398
3448
|
item: { index: option },
|
|
3399
3449
|
type: "FILL_IN_THE_BLANKS",
|
|
3400
|
-
component: contentMap.type === "TEXT" ? /* @__PURE__ */
|
|
3450
|
+
component: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx21(
|
|
3401
3451
|
"div",
|
|
3402
3452
|
{
|
|
3403
3453
|
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
|
|
@@ -3405,9 +3455,9 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3405
3455
|
setSelectedOption(option);
|
|
3406
3456
|
setPasteOptionIndex(null);
|
|
3407
3457
|
},
|
|
3408
|
-
children: /* @__PURE__ */
|
|
3458
|
+
children: /* @__PURE__ */ jsx21("p", { className: "italic whitespace-pre-wrap", children: option })
|
|
3409
3459
|
}
|
|
3410
|
-
) : /* @__PURE__ */
|
|
3460
|
+
) : /* @__PURE__ */ jsx21(
|
|
3411
3461
|
"div",
|
|
3412
3462
|
{
|
|
3413
3463
|
className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
|
|
@@ -3415,7 +3465,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3415
3465
|
setSelectedOption(option);
|
|
3416
3466
|
setPasteOptionIndex(null);
|
|
3417
3467
|
},
|
|
3418
|
-
children: /* @__PURE__ */
|
|
3468
|
+
children: /* @__PURE__ */ jsx21(
|
|
3419
3469
|
ShowMaterialMediaByContentType_default,
|
|
3420
3470
|
{
|
|
3421
3471
|
contentType: contentMap.type,
|
|
@@ -3433,12 +3483,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3433
3483
|
index
|
|
3434
3484
|
)
|
|
3435
3485
|
) }),
|
|
3436
|
-
/* @__PURE__ */
|
|
3486
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
3437
3487
|
const learnerAnswerState = checkAnswerState(
|
|
3438
3488
|
JSON.parse(materialMap[materialKey]),
|
|
3439
3489
|
answerMap[materialKey]
|
|
3440
3490
|
);
|
|
3441
|
-
return /* @__PURE__ */
|
|
3491
|
+
return /* @__PURE__ */ jsx21("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ jsx21("div", { className: "mx-2", children: /* @__PURE__ */ jsx21(
|
|
3442
3492
|
DroppableItem_default,
|
|
3443
3493
|
{
|
|
3444
3494
|
item: { index },
|
|
@@ -3447,12 +3497,12 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3447
3497
|
setTarget: setPasteOptionIndex,
|
|
3448
3498
|
dropRef: drop,
|
|
3449
3499
|
component: /* @__PURE__ */ jsxs13("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
3450
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ jsx21("div", { className: "my-auto", children: /* @__PURE__ */ jsxs13("p", { className: "text-xl", children: [
|
|
3451
3501
|
parseFloat(materialKey) + 1,
|
|
3452
3502
|
"."
|
|
3453
3503
|
] }) }),
|
|
3454
|
-
/* @__PURE__ */
|
|
3455
|
-
/* @__PURE__ */
|
|
3504
|
+
/* @__PURE__ */ jsx21("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ jsxs13("div", { className: "relative", children: [
|
|
3505
|
+
/* @__PURE__ */ jsx21("div", { className: "flex-1", children: /* @__PURE__ */ jsx21(
|
|
3456
3506
|
InputGroup_default,
|
|
3457
3507
|
{
|
|
3458
3508
|
type: "textarea",
|
|
@@ -3467,14 +3517,14 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3467
3517
|
}
|
|
3468
3518
|
}
|
|
3469
3519
|
) }),
|
|
3470
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */
|
|
3520
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ jsx21("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx21(
|
|
3471
3521
|
BaseImage_default,
|
|
3472
3522
|
{
|
|
3473
3523
|
src: "/icons/checkbox.png",
|
|
3474
3524
|
alt: "checkbox",
|
|
3475
3525
|
size: "small"
|
|
3476
3526
|
}
|
|
3477
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */
|
|
3527
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ jsx21("div", { className: "absolute -top-[10px] right-4 bg-catchup-white", children: /* @__PURE__ */ jsx21(
|
|
3478
3528
|
BaseImage_default,
|
|
3479
3529
|
{
|
|
3480
3530
|
src: "/icons/cross-red.png",
|
|
@@ -3482,20 +3532,20 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3482
3532
|
size: "small"
|
|
3483
3533
|
}
|
|
3484
3534
|
) }) : null
|
|
3485
|
-
] }) : answerMap[materialKey] === "" ? /* @__PURE__ */
|
|
3535
|
+
] }) : answerMap[materialKey] === "" ? /* @__PURE__ */ jsx21(
|
|
3486
3536
|
"div",
|
|
3487
3537
|
{
|
|
3488
3538
|
className: `w-catchup-activity-box-item border h-catchup-activity-box-item rounded-catchup-xlarge border-dashed ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
3489
|
-
children: /* @__PURE__ */
|
|
3539
|
+
children: /* @__PURE__ */ jsx21("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ jsx21("span", { className: "italic", children: i18n_default.t("please_drop_here") }) })
|
|
3490
3540
|
}
|
|
3491
|
-
) : /* @__PURE__ */
|
|
3541
|
+
) : /* @__PURE__ */ jsx21(
|
|
3492
3542
|
"div",
|
|
3493
3543
|
{
|
|
3494
3544
|
className: "flex-1 cursor-pointer",
|
|
3495
3545
|
onClick: () => {
|
|
3496
3546
|
onChange(answer, materialKey, "");
|
|
3497
3547
|
},
|
|
3498
|
-
children: /* @__PURE__ */
|
|
3548
|
+
children: /* @__PURE__ */ jsx21(
|
|
3499
3549
|
ShowMaterialMediaByContentType_default,
|
|
3500
3550
|
{
|
|
3501
3551
|
contentType: contentMap.type,
|
|
@@ -3505,13 +3555,13 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3505
3555
|
`${uniqueValue}-${index}`
|
|
3506
3556
|
)
|
|
3507
3557
|
}
|
|
3508
|
-
) : /* @__PURE__ */
|
|
3558
|
+
) : /* @__PURE__ */ jsx21("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
3509
3559
|
answerMap[materialKey]
|
|
3510
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
3560
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx21(
|
|
3511
3561
|
"span",
|
|
3512
3562
|
{
|
|
3513
3563
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3514
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
3564
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx21("span", { className: "text-2xl", children: /* @__PURE__ */ jsx21(InlineMath3, { math: inputPart.value }) }) : inputPart.value
|
|
3515
3565
|
},
|
|
3516
3566
|
index2
|
|
3517
3567
|
)) }, materialKey) })
|
|
@@ -3525,7 +3575,7 @@ var FillInTheBlanksActivityMaterialContent = ({
|
|
|
3525
3575
|
var FillInTheBlanksActivityMaterialContent_default = FillInTheBlanksActivityMaterialContent;
|
|
3526
3576
|
|
|
3527
3577
|
// src/components/activities/FillInTheBlanksActivityContent.tsx
|
|
3528
|
-
import { jsx as
|
|
3578
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3529
3579
|
var FillInTheBlanksActivityContent = ({
|
|
3530
3580
|
answer,
|
|
3531
3581
|
data,
|
|
@@ -3574,7 +3624,7 @@ var FillInTheBlanksActivityContent = ({
|
|
|
3574
3624
|
changeAnswer(answer2);
|
|
3575
3625
|
};
|
|
3576
3626
|
return /* @__PURE__ */ jsxs14("div", { className: "flex flex-row flex-wrap", children: [
|
|
3577
|
-
/* @__PURE__ */
|
|
3627
|
+
/* @__PURE__ */ jsx22("div", { className: "w-full md:w-[60%]", children: /* @__PURE__ */ jsx22(
|
|
3578
3628
|
ActivityBodyContent_default,
|
|
3579
3629
|
{
|
|
3580
3630
|
bodyMap: fillInTheBlanksBodyMap,
|
|
@@ -3583,9 +3633,9 @@ var FillInTheBlanksActivityContent = ({
|
|
|
3583
3633
|
templateType: "FILL_IN_THE_BLANKS"
|
|
3584
3634
|
}
|
|
3585
3635
|
) }),
|
|
3586
|
-
/* @__PURE__ */
|
|
3587
|
-
/* @__PURE__ */
|
|
3588
|
-
/* @__PURE__ */
|
|
3636
|
+
/* @__PURE__ */ jsx22("div", { className: "contents md:hidden", children: /* @__PURE__ */ jsx22(DividerLine_default, {}) }),
|
|
3637
|
+
/* @__PURE__ */ jsx22("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx22(VerticalDividerLine_default, {}) }),
|
|
3638
|
+
/* @__PURE__ */ jsx22("div", { className: "w-full md:flex-1", children: /* @__PURE__ */ jsx22(
|
|
3589
3639
|
FillInTheBlanksActivityMaterialContent_default,
|
|
3590
3640
|
{
|
|
3591
3641
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -3644,7 +3694,7 @@ var useScreenSize = () => {
|
|
|
3644
3694
|
var useScreenSize_default = useScreenSize;
|
|
3645
3695
|
|
|
3646
3696
|
// src/components/activities/material-content/GroupingActivityMaterialContent.tsx
|
|
3647
|
-
import { Fragment, jsx as
|
|
3697
|
+
import { Fragment, jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3648
3698
|
var GroupingActivityMaterialContent = ({
|
|
3649
3699
|
uniqueValue,
|
|
3650
3700
|
answer,
|
|
@@ -3750,18 +3800,18 @@ var GroupingActivityMaterialContent = ({
|
|
|
3750
3800
|
const answerMap = retrieveAnswerMap();
|
|
3751
3801
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
3752
3802
|
return /* @__PURE__ */ jsxs15(Fragment, { children: [
|
|
3753
|
-
/* @__PURE__ */
|
|
3803
|
+
/* @__PURE__ */ jsx23(
|
|
3754
3804
|
"div",
|
|
3755
3805
|
{
|
|
3756
3806
|
ref: itemsRef,
|
|
3757
3807
|
className: "flex-1 flex flex-row gap-x-4 gap-y-4 overflow-auto py-2",
|
|
3758
3808
|
children: filteredMaterialList.map((materialValue, index) => {
|
|
3759
|
-
return /* @__PURE__ */
|
|
3809
|
+
return /* @__PURE__ */ jsx23(
|
|
3760
3810
|
DraggableItem_default,
|
|
3761
3811
|
{
|
|
3762
3812
|
item: { index: materialValue },
|
|
3763
3813
|
type: "GROUPING",
|
|
3764
|
-
component: /* @__PURE__ */
|
|
3814
|
+
component: /* @__PURE__ */ jsx23(
|
|
3765
3815
|
"div",
|
|
3766
3816
|
{
|
|
3767
3817
|
className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} h-catchup-activity-covering-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
|
|
@@ -3775,22 +3825,22 @@ var GroupingActivityMaterialContent = ({
|
|
|
3775
3825
|
setSelectedValue(null);
|
|
3776
3826
|
}
|
|
3777
3827
|
},
|
|
3778
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */
|
|
3828
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx23(
|
|
3779
3829
|
"div",
|
|
3780
3830
|
{
|
|
3781
3831
|
className: `flex flex-col items-center justify-center m-4 min-h-[64px] min-w-[200px]`,
|
|
3782
|
-
children: /* @__PURE__ */
|
|
3832
|
+
children: /* @__PURE__ */ jsx23("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
3783
3833
|
materialValue
|
|
3784
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
3834
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx23(
|
|
3785
3835
|
"span",
|
|
3786
3836
|
{
|
|
3787
3837
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3788
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
3838
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx23("span", { className: "text-2xl", children: /* @__PURE__ */ jsx23(InlineMath4, { math: inputPart.value }) }) : inputPart.value
|
|
3789
3839
|
},
|
|
3790
3840
|
index2
|
|
3791
3841
|
)) })
|
|
3792
3842
|
}
|
|
3793
|
-
) : /* @__PURE__ */
|
|
3843
|
+
) : /* @__PURE__ */ jsx23(
|
|
3794
3844
|
ShowMaterialMediaByContentType_default,
|
|
3795
3845
|
{
|
|
3796
3846
|
contentType: contentMap.type,
|
|
@@ -3815,22 +3865,22 @@ var GroupingActivityMaterialContent = ({
|
|
|
3815
3865
|
})
|
|
3816
3866
|
}
|
|
3817
3867
|
),
|
|
3818
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */
|
|
3868
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsx23(DividerLine_default, {}) : null,
|
|
3819
3869
|
Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ jsxs15("div", { className: "flex flex-row w-full", children: [
|
|
3820
|
-
/* @__PURE__ */
|
|
3870
|
+
/* @__PURE__ */ jsx23("div", { className: "w-1/3", children: /* @__PURE__ */ jsx23(
|
|
3821
3871
|
"div",
|
|
3822
3872
|
{
|
|
3823
3873
|
className: `border-catchup-blue h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge transition-all duration-300 my-3`,
|
|
3824
|
-
children: /* @__PURE__ */
|
|
3874
|
+
children: /* @__PURE__ */ jsx23(
|
|
3825
3875
|
"div",
|
|
3826
3876
|
{
|
|
3827
3877
|
className: `flex flex-col items-center justify-center transition-all duration-300 m-4`,
|
|
3828
|
-
children: /* @__PURE__ */
|
|
3829
|
-
(inputPart, index2) => /* @__PURE__ */
|
|
3878
|
+
children: /* @__PURE__ */ jsx23("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
3879
|
+
(inputPart, index2) => /* @__PURE__ */ jsx23(
|
|
3830
3880
|
"span",
|
|
3831
3881
|
{
|
|
3832
3882
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3833
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
3883
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx23("span", { className: "text-2xl", children: /* @__PURE__ */ jsx23(InlineMath4, { math: inputPart.value }) }) : inputPart.value
|
|
3834
3884
|
},
|
|
3835
3885
|
index2
|
|
3836
3886
|
)
|
|
@@ -3839,12 +3889,12 @@ var GroupingActivityMaterialContent = ({
|
|
|
3839
3889
|
)
|
|
3840
3890
|
}
|
|
3841
3891
|
) }),
|
|
3842
|
-
/* @__PURE__ */
|
|
3843
|
-
/* @__PURE__ */
|
|
3892
|
+
/* @__PURE__ */ jsx23("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
3893
|
+
/* @__PURE__ */ jsx23("div", { className: "flex-1", ref, children: /* @__PURE__ */ jsx23("div", { className: "h-full py-3", children: /* @__PURE__ */ jsx23(
|
|
3844
3894
|
"div",
|
|
3845
3895
|
{
|
|
3846
3896
|
className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} flex-1 border-catchup-blue rounded-catchup-xlarge border-2 h-full p-1`,
|
|
3847
|
-
children: /* @__PURE__ */
|
|
3897
|
+
children: /* @__PURE__ */ jsx23(
|
|
3848
3898
|
DroppableItem_default,
|
|
3849
3899
|
{
|
|
3850
3900
|
item: { index: answerMapKey },
|
|
@@ -3852,7 +3902,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
3852
3902
|
target: selectedTargetKey,
|
|
3853
3903
|
setTarget: setSelectedTargetKey,
|
|
3854
3904
|
dropRef: drop,
|
|
3855
|
-
component: /* @__PURE__ */
|
|
3905
|
+
component: /* @__PURE__ */ jsx23(
|
|
3856
3906
|
"div",
|
|
3857
3907
|
{
|
|
3858
3908
|
className: "h-full flex-1 flex flex-row items-center overflow-x-auto",
|
|
@@ -3865,7 +3915,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
3865
3915
|
materialMap[answerMapKey],
|
|
3866
3916
|
answerMapValue
|
|
3867
3917
|
);
|
|
3868
|
-
return /* @__PURE__ */
|
|
3918
|
+
return /* @__PURE__ */ jsx23("div", { className: "p-1", children: /* @__PURE__ */ jsx23("div", { className: "h-catchup-activity-box-item", children: /* @__PURE__ */ jsx23(
|
|
3869
3919
|
"div",
|
|
3870
3920
|
{
|
|
3871
3921
|
className: `${learnerAnswerState === "EMPTY" ? "border-catchup-lighter-gray" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"} border-2 rounded-catchup-xlarge h-full flex flex-col items-center justify-center transition-all duration-300 cursor-pointer`,
|
|
@@ -3881,17 +3931,17 @@ var GroupingActivityMaterialContent = ({
|
|
|
3881
3931
|
setSelectedValue(null);
|
|
3882
3932
|
}
|
|
3883
3933
|
},
|
|
3884
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */
|
|
3934
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx23(
|
|
3885
3935
|
"div",
|
|
3886
3936
|
{
|
|
3887
3937
|
className: `flex flex-col items-center justify-center transition-all duration-300 min-h-[64px] min-w-[200px]`,
|
|
3888
|
-
children: /* @__PURE__ */
|
|
3938
|
+
children: /* @__PURE__ */ jsx23("div", { className: "m-2", children: /* @__PURE__ */ jsx23("p", { className: "text-xl text-center whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
3889
3939
|
answerMapValue
|
|
3890
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
3940
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx23(
|
|
3891
3941
|
"span",
|
|
3892
3942
|
{
|
|
3893
3943
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3894
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
3944
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx23("span", { className: "text-2xl", children: /* @__PURE__ */ jsx23(
|
|
3895
3945
|
InlineMath4,
|
|
3896
3946
|
{
|
|
3897
3947
|
math: inputPart.value
|
|
@@ -3901,7 +3951,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
3901
3951
|
index2
|
|
3902
3952
|
)) }) })
|
|
3903
3953
|
}
|
|
3904
|
-
) : /* @__PURE__ */
|
|
3954
|
+
) : /* @__PURE__ */ jsx23(
|
|
3905
3955
|
ShowMaterialMediaByContentType_default,
|
|
3906
3956
|
{
|
|
3907
3957
|
contentType: contentMap.type,
|
|
@@ -3927,7 +3977,7 @@ var GroupingActivityMaterialContent = ({
|
|
|
3927
3977
|
var GroupingActivityMaterialContent_default = GroupingActivityMaterialContent;
|
|
3928
3978
|
|
|
3929
3979
|
// src/components/activities/GroupingActivityContent.tsx
|
|
3930
|
-
import { Fragment as Fragment2, jsx as
|
|
3980
|
+
import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3931
3981
|
var GroupingActivityContent = ({
|
|
3932
3982
|
answer,
|
|
3933
3983
|
data,
|
|
@@ -3952,15 +4002,15 @@ var GroupingActivityContent = ({
|
|
|
3952
4002
|
changeAnswer(answer2);
|
|
3953
4003
|
};
|
|
3954
4004
|
return /* @__PURE__ */ jsxs16(Fragment2, { children: [
|
|
3955
|
-
/* @__PURE__ */
|
|
4005
|
+
/* @__PURE__ */ jsx24(
|
|
3956
4006
|
ActivityBodyContent_default,
|
|
3957
4007
|
{
|
|
3958
4008
|
bodyMap: groupingBodyMap,
|
|
3959
4009
|
templateType: "GROUPING"
|
|
3960
4010
|
}
|
|
3961
4011
|
),
|
|
3962
|
-
/* @__PURE__ */
|
|
3963
|
-
/* @__PURE__ */
|
|
4012
|
+
/* @__PURE__ */ jsx24(DividerLine_default, {}),
|
|
4013
|
+
/* @__PURE__ */ jsx24(
|
|
3964
4014
|
GroupingActivityMaterialContent_default,
|
|
3965
4015
|
{
|
|
3966
4016
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -3981,7 +4031,7 @@ var GroupingActivityContent_default = GroupingActivityContent;
|
|
|
3981
4031
|
import { useEffect as useEffect7, useRef as useRef5, useState as useState15 } from "react";
|
|
3982
4032
|
import { useDrop as useDrop4 } from "react-dnd";
|
|
3983
4033
|
import { InlineMath as InlineMath5 } from "react-katex";
|
|
3984
|
-
import { Fragment as Fragment3, jsx as
|
|
4034
|
+
import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3985
4035
|
var MatchingActivityMaterialContent = ({
|
|
3986
4036
|
uniqueValue,
|
|
3987
4037
|
answer,
|
|
@@ -4078,17 +4128,17 @@ var MatchingActivityMaterialContent = ({
|
|
|
4078
4128
|
const answerMap = retrieveAnswerMap();
|
|
4079
4129
|
const filteredMaterialList = retrieveFilteredMaterialList(answerMap);
|
|
4080
4130
|
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
4081
|
-
/* @__PURE__ */
|
|
4131
|
+
/* @__PURE__ */ jsx25(
|
|
4082
4132
|
"div",
|
|
4083
4133
|
{
|
|
4084
4134
|
ref: itemsRef,
|
|
4085
4135
|
className: "flex-1 flex flex-row gap-x-4 gap-y-4 overflow-auto py-2",
|
|
4086
|
-
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */
|
|
4136
|
+
children: filteredMaterialList.map((materialValue, index) => /* @__PURE__ */ jsx25(
|
|
4087
4137
|
DraggableItem_default,
|
|
4088
4138
|
{
|
|
4089
4139
|
item: { index: materialValue },
|
|
4090
4140
|
type: "MATCHING",
|
|
4091
|
-
component: /* @__PURE__ */
|
|
4141
|
+
component: /* @__PURE__ */ jsx25(
|
|
4092
4142
|
"div",
|
|
4093
4143
|
{
|
|
4094
4144
|
className: `${selectedValue === materialValue ? "border-catchup-blue" : "border-catchup-lighter-gray"} h-catchup-activity-covering-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
|
|
@@ -4102,22 +4152,22 @@ var MatchingActivityMaterialContent = ({
|
|
|
4102
4152
|
setSelectedValue(null);
|
|
4103
4153
|
}
|
|
4104
4154
|
},
|
|
4105
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */
|
|
4155
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx25(
|
|
4106
4156
|
"div",
|
|
4107
4157
|
{
|
|
4108
4158
|
className: `flex flex-col items-center justify-center m-4 min-h-[64px] min-w-[200px]`,
|
|
4109
|
-
children: /* @__PURE__ */
|
|
4159
|
+
children: /* @__PURE__ */ jsx25("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4110
4160
|
materialValue
|
|
4111
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
4161
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx25(
|
|
4112
4162
|
"span",
|
|
4113
4163
|
{
|
|
4114
4164
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4115
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4165
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx25("span", { className: "text-2xl", children: /* @__PURE__ */ jsx25(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
4116
4166
|
},
|
|
4117
4167
|
index2
|
|
4118
4168
|
)) })
|
|
4119
4169
|
}
|
|
4120
|
-
) : /* @__PURE__ */
|
|
4170
|
+
) : /* @__PURE__ */ jsx25(
|
|
4121
4171
|
ShowMaterialMediaByContentType_default,
|
|
4122
4172
|
{
|
|
4123
4173
|
contentType: contentMap.type,
|
|
@@ -4141,27 +4191,27 @@ var MatchingActivityMaterialContent = ({
|
|
|
4141
4191
|
))
|
|
4142
4192
|
}
|
|
4143
4193
|
),
|
|
4144
|
-
filteredMaterialList.length > 0 ? /* @__PURE__ */
|
|
4194
|
+
filteredMaterialList.length > 0 ? /* @__PURE__ */ jsx25(DividerLine_default, {}) : null,
|
|
4145
4195
|
Object.keys(answerMap).map((answerMapKey, index) => {
|
|
4146
4196
|
const learnerAnswerState = checkAnswerState(
|
|
4147
4197
|
materialMap[answerMapKey],
|
|
4148
4198
|
answerMap[answerMapKey]
|
|
4149
4199
|
);
|
|
4150
4200
|
return /* @__PURE__ */ jsxs17("div", { className: "flex flex-row w-full", children: [
|
|
4151
|
-
/* @__PURE__ */
|
|
4201
|
+
/* @__PURE__ */ jsx25("div", { className: "w-1/3", children: /* @__PURE__ */ jsx25(
|
|
4152
4202
|
"div",
|
|
4153
4203
|
{
|
|
4154
4204
|
className: `h-catchup-activity-outer-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"}`,
|
|
4155
|
-
children: /* @__PURE__ */
|
|
4205
|
+
children: /* @__PURE__ */ jsx25(
|
|
4156
4206
|
"div",
|
|
4157
4207
|
{
|
|
4158
4208
|
className: `flex flex-col items-center justify-center transition-all duration-300 m-4`,
|
|
4159
|
-
children: /* @__PURE__ */
|
|
4160
|
-
(inputPart, index2) => /* @__PURE__ */
|
|
4209
|
+
children: /* @__PURE__ */ jsx25("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(answerMapKey).map(
|
|
4210
|
+
(inputPart, index2) => /* @__PURE__ */ jsx25(
|
|
4161
4211
|
"span",
|
|
4162
4212
|
{
|
|
4163
4213
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4164
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4214
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx25("span", { className: "text-2xl", children: /* @__PURE__ */ jsx25(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
4165
4215
|
},
|
|
4166
4216
|
index2
|
|
4167
4217
|
)
|
|
@@ -4170,8 +4220,8 @@ var MatchingActivityMaterialContent = ({
|
|
|
4170
4220
|
)
|
|
4171
4221
|
}
|
|
4172
4222
|
) }),
|
|
4173
|
-
/* @__PURE__ */
|
|
4174
|
-
/* @__PURE__ */
|
|
4223
|
+
/* @__PURE__ */ jsx25("div", { className: "mx-4 w-[2px] bg-catchup-lighter-gray" }),
|
|
4224
|
+
/* @__PURE__ */ jsx25("div", { className: "flex-1", children: /* @__PURE__ */ jsx25(
|
|
4175
4225
|
"div",
|
|
4176
4226
|
{
|
|
4177
4227
|
className: `${canDrop ? selectedTargetKey === answerMapKey ? "bg-catchup-light-blue" : "bg-catchup-light-blue opacity-40" : ""} h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300 my-3 ${learnerAnswerState === "EMPTY" ? "border-catchup-blue" : learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
@@ -4180,7 +4230,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
4180
4230
|
setSelectedValue(null);
|
|
4181
4231
|
}
|
|
4182
4232
|
},
|
|
4183
|
-
children: /* @__PURE__ */
|
|
4233
|
+
children: /* @__PURE__ */ jsx25(
|
|
4184
4234
|
DroppableItem_default,
|
|
4185
4235
|
{
|
|
4186
4236
|
item: { index: answerMapKey },
|
|
@@ -4188,7 +4238,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
4188
4238
|
target: selectedTargetKey,
|
|
4189
4239
|
setTarget: setSelectedTargetKey,
|
|
4190
4240
|
dropRef: drop,
|
|
4191
|
-
component: /* @__PURE__ */
|
|
4241
|
+
component: /* @__PURE__ */ jsx25(
|
|
4192
4242
|
"div",
|
|
4193
4243
|
{
|
|
4194
4244
|
className: `h-full flex-1 flex flex-row items-center justify-center `,
|
|
@@ -4201,16 +4251,16 @@ var MatchingActivityMaterialContent = ({
|
|
|
4201
4251
|
);
|
|
4202
4252
|
}
|
|
4203
4253
|
},
|
|
4204
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */
|
|
4254
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx25("p", { className: "text-xl p-5 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4205
4255
|
answerMap[answerMapKey]
|
|
4206
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
4256
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx25(
|
|
4207
4257
|
"span",
|
|
4208
4258
|
{
|
|
4209
4259
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4210
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4260
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx25("span", { className: "text-2xl", children: /* @__PURE__ */ jsx25(InlineMath5, { math: inputPart.value }) }) : inputPart.value
|
|
4211
4261
|
},
|
|
4212
4262
|
index2
|
|
4213
|
-
)) }) : /* @__PURE__ */
|
|
4263
|
+
)) }) : /* @__PURE__ */ jsx25(
|
|
4214
4264
|
ShowMaterialMediaByContentType_default,
|
|
4215
4265
|
{
|
|
4216
4266
|
contentType: contentMap.type,
|
|
@@ -4233,7 +4283,7 @@ var MatchingActivityMaterialContent = ({
|
|
|
4233
4283
|
var MatchingActivityMaterialContent_default = MatchingActivityMaterialContent;
|
|
4234
4284
|
|
|
4235
4285
|
// src/components/activities/MatchingActivityContent.tsx
|
|
4236
|
-
import { Fragment as Fragment4, jsx as
|
|
4286
|
+
import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4237
4287
|
var MatchingActivityContent = ({
|
|
4238
4288
|
answer,
|
|
4239
4289
|
data,
|
|
@@ -4254,15 +4304,15 @@ var MatchingActivityContent = ({
|
|
|
4254
4304
|
changeAnswer(answer2);
|
|
4255
4305
|
};
|
|
4256
4306
|
return /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
4257
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsx26(
|
|
4258
4308
|
ActivityBodyContent_default,
|
|
4259
4309
|
{
|
|
4260
4310
|
bodyMap: matchingBodyMap,
|
|
4261
4311
|
templateType: "MATCHING"
|
|
4262
4312
|
}
|
|
4263
4313
|
),
|
|
4264
|
-
/* @__PURE__ */
|
|
4265
|
-
/* @__PURE__ */
|
|
4314
|
+
/* @__PURE__ */ jsx26(DividerLine_default, {}),
|
|
4315
|
+
/* @__PURE__ */ jsx26(
|
|
4266
4316
|
MatchingActivityMaterialContent_default,
|
|
4267
4317
|
{
|
|
4268
4318
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4281,7 +4331,7 @@ var MatchingActivityContent_default = MatchingActivityContent;
|
|
|
4281
4331
|
|
|
4282
4332
|
// src/components/activities/material-content/MCMAActivityMaterialContent.tsx
|
|
4283
4333
|
import { InlineMath as InlineMath6 } from "react-katex";
|
|
4284
|
-
import { jsx as
|
|
4334
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4285
4335
|
var MCMAActivityMaterialContent = ({
|
|
4286
4336
|
uniqueValue,
|
|
4287
4337
|
answer,
|
|
@@ -4314,10 +4364,10 @@ var MCMAActivityMaterialContent = ({
|
|
|
4314
4364
|
const answerMap = retrieveAnswerMap();
|
|
4315
4365
|
const correctAnswerList = retrieveCorrectAnswerList();
|
|
4316
4366
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
4317
|
-
return /* @__PURE__ */
|
|
4318
|
-
/* @__PURE__ */
|
|
4319
|
-
/* @__PURE__ */
|
|
4320
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsx27("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ jsxs19("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5", children: [
|
|
4368
|
+
/* @__PURE__ */ jsx27("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx27("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcma_text") }) }),
|
|
4369
|
+
/* @__PURE__ */ jsx27("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx27(DividerLine_default, {}) }),
|
|
4370
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx27("div", { className: "flex flex-row w-full flex-wrap ", children: materialMap[materialKey].map(
|
|
4321
4371
|
(materialSubKey, index2) => {
|
|
4322
4372
|
const foundAnswer = answerMap[materialKey].find(
|
|
4323
4373
|
(learnerAnswer) => learnerAnswer === materialSubKey
|
|
@@ -4338,7 +4388,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
4338
4388
|
onChange(answer, materialKey, materialSubKey);
|
|
4339
4389
|
},
|
|
4340
4390
|
children: [
|
|
4341
|
-
/* @__PURE__ */
|
|
4391
|
+
/* @__PURE__ */ jsx27("div", { className: "", children: /* @__PURE__ */ jsx27(
|
|
4342
4392
|
BaseImage_default,
|
|
4343
4393
|
{
|
|
4344
4394
|
src: answerMap[materialKey].includes(materialSubKey) ? "/icons/checkbox.png" : "/icons/empty-checkbox.png",
|
|
@@ -4348,16 +4398,16 @@ var MCMAActivityMaterialContent = ({
|
|
|
4348
4398
|
}
|
|
4349
4399
|
}
|
|
4350
4400
|
) }),
|
|
4351
|
-
/* @__PURE__ */
|
|
4401
|
+
/* @__PURE__ */ jsx27("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx27("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4352
4402
|
materialSubKey
|
|
4353
|
-
).map((inputPart, index3) => /* @__PURE__ */
|
|
4403
|
+
).map((inputPart, index3) => /* @__PURE__ */ jsx27(
|
|
4354
4404
|
"span",
|
|
4355
4405
|
{
|
|
4356
4406
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4357
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4407
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx27("span", { className: "text-2xl", children: /* @__PURE__ */ jsx27(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
4358
4408
|
},
|
|
4359
4409
|
index3
|
|
4360
|
-
)) }) : /* @__PURE__ */
|
|
4410
|
+
)) }) : /* @__PURE__ */ jsx27(
|
|
4361
4411
|
ShowMaterialMediaByContentType_default,
|
|
4362
4412
|
{
|
|
4363
4413
|
contentType: contentMap.type,
|
|
@@ -4371,13 +4421,13 @@ var MCMAActivityMaterialContent = ({
|
|
|
4371
4421
|
index2
|
|
4372
4422
|
);
|
|
4373
4423
|
}
|
|
4374
|
-
) }) : /* @__PURE__ */
|
|
4424
|
+
) }) : /* @__PURE__ */ jsx27("p", { className: "text-xl", children: constructInputWithSpecialExpressionList(
|
|
4375
4425
|
answerMap[materialKey]
|
|
4376
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
4426
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx27(
|
|
4377
4427
|
"span",
|
|
4378
4428
|
{
|
|
4379
4429
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4380
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4430
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx27("span", { className: "text-2xl", children: /* @__PURE__ */ jsx27(InlineMath6, { math: inputPart.value }) }) : inputPart.value
|
|
4381
4431
|
},
|
|
4382
4432
|
index2
|
|
4383
4433
|
)) }, materialKey)
|
|
@@ -4387,7 +4437,7 @@ var MCMAActivityMaterialContent = ({
|
|
|
4387
4437
|
var MCMAActivityMaterialContent_default = MCMAActivityMaterialContent;
|
|
4388
4438
|
|
|
4389
4439
|
// src/components/activities/MCMAActivityContent.tsx
|
|
4390
|
-
import { jsx as
|
|
4440
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4391
4441
|
var MCMAActivityContent = ({
|
|
4392
4442
|
answer,
|
|
4393
4443
|
data,
|
|
@@ -4414,10 +4464,10 @@ var MCMAActivityContent = ({
|
|
|
4414
4464
|
changeAnswer(answer2);
|
|
4415
4465
|
};
|
|
4416
4466
|
return /* @__PURE__ */ jsxs20("div", { className: "flex flex-row flex-wrap", children: [
|
|
4417
|
-
/* @__PURE__ */
|
|
4418
|
-
/* @__PURE__ */
|
|
4419
|
-
/* @__PURE__ */
|
|
4420
|
-
/* @__PURE__ */
|
|
4467
|
+
/* @__PURE__ */ jsx28("div", { className: "w-full md:w-[60%]", children: /* @__PURE__ */ jsx28(ActivityBodyContent_default, { bodyMap: MCMABodyMap, templateType: "MCMA" }) }),
|
|
4468
|
+
/* @__PURE__ */ jsx28("div", { className: "contents md:hidden", children: /* @__PURE__ */ jsx28(DividerLine_default, {}) }),
|
|
4469
|
+
/* @__PURE__ */ jsx28("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx28(VerticalDividerLine_default, {}) }),
|
|
4470
|
+
/* @__PURE__ */ jsx28("div", { className: "w-full md:flex-1", children: /* @__PURE__ */ jsx28(
|
|
4421
4471
|
MCMAActivityMaterialContent_default,
|
|
4422
4472
|
{
|
|
4423
4473
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4435,7 +4485,7 @@ var MCMAActivityContent_default = MCMAActivityContent;
|
|
|
4435
4485
|
|
|
4436
4486
|
// src/components/activities/material-content/MCSAActivityMaterialContent.tsx
|
|
4437
4487
|
import { InlineMath as InlineMath7 } from "react-katex";
|
|
4438
|
-
import { jsx as
|
|
4488
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4439
4489
|
var MCSAActivityMaterialContent = ({
|
|
4440
4490
|
uniqueValue,
|
|
4441
4491
|
answer,
|
|
@@ -4465,10 +4515,10 @@ var MCSAActivityMaterialContent = ({
|
|
|
4465
4515
|
const answerMap = retrieveAnswerMap();
|
|
4466
4516
|
const correctAnswer = retrieveCorrectAnswer();
|
|
4467
4517
|
return Object.keys(materialMap).map((materialKey, index) => {
|
|
4468
|
-
return /* @__PURE__ */
|
|
4469
|
-
/* @__PURE__ */
|
|
4470
|
-
/* @__PURE__ */
|
|
4471
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ jsx29("div", { className: "flex flex-row items-center my-1", children: /* @__PURE__ */ jsxs21("div", { className: "flex-1 flex flex-col justify-center border-catchup-lighter-gray rounded-catchup-xlarge px-5", children: [
|
|
4519
|
+
/* @__PURE__ */ jsx29("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx29("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_mcsa_text") }) }),
|
|
4520
|
+
/* @__PURE__ */ jsx29("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx29(DividerLine_default, {}) }),
|
|
4521
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx29(
|
|
4472
4522
|
"div",
|
|
4473
4523
|
{
|
|
4474
4524
|
className: `flex flex-row w-full ${Object.keys(materialMap[materialKey]).length <= 4 ? "justify-center" : ""} flex-wrap`,
|
|
@@ -4487,7 +4537,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
4487
4537
|
onChange(answer, materialKey, materialSubKey);
|
|
4488
4538
|
},
|
|
4489
4539
|
children: [
|
|
4490
|
-
/* @__PURE__ */
|
|
4540
|
+
/* @__PURE__ */ jsx29("div", { className: "", children: /* @__PURE__ */ jsx29(
|
|
4491
4541
|
BaseImage_default,
|
|
4492
4542
|
{
|
|
4493
4543
|
src: answerMap[materialKey] === materialSubKey ? "/icons/item-element.png" : "/icons/not-selected-item-element.png",
|
|
@@ -4497,16 +4547,16 @@ var MCSAActivityMaterialContent = ({
|
|
|
4497
4547
|
}
|
|
4498
4548
|
}
|
|
4499
4549
|
) }),
|
|
4500
|
-
/* @__PURE__ */
|
|
4550
|
+
/* @__PURE__ */ jsx29("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx29("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4501
4551
|
materialSubKey
|
|
4502
|
-
).map((inputPart, index3) => /* @__PURE__ */
|
|
4552
|
+
).map((inputPart, index3) => /* @__PURE__ */ jsx29(
|
|
4503
4553
|
"span",
|
|
4504
4554
|
{
|
|
4505
4555
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4506
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4556
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx29("span", { className: "text-2xl", children: /* @__PURE__ */ jsx29(InlineMath7, { math: inputPart.value }) }) : inputPart.value
|
|
4507
4557
|
},
|
|
4508
4558
|
index3
|
|
4509
|
-
)) }) : /* @__PURE__ */
|
|
4559
|
+
)) }) : /* @__PURE__ */ jsx29(
|
|
4510
4560
|
ShowMaterialMediaByContentType_default,
|
|
4511
4561
|
{
|
|
4512
4562
|
contentType: contentMap.type,
|
|
@@ -4522,13 +4572,13 @@ var MCSAActivityMaterialContent = ({
|
|
|
4522
4572
|
}
|
|
4523
4573
|
)
|
|
4524
4574
|
}
|
|
4525
|
-
) : /* @__PURE__ */
|
|
4575
|
+
) : /* @__PURE__ */ jsx29("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4526
4576
|
answerMap[materialKey]
|
|
4527
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
4577
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx29(
|
|
4528
4578
|
"span",
|
|
4529
4579
|
{
|
|
4530
4580
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4531
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4581
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx29("span", { className: "text-2xl", children: /* @__PURE__ */ jsx29(InlineMath7, { math: inputPart.value }) }) : inputPart.value
|
|
4532
4582
|
},
|
|
4533
4583
|
index2
|
|
4534
4584
|
)) })
|
|
@@ -4538,7 +4588,7 @@ var MCSAActivityMaterialContent = ({
|
|
|
4538
4588
|
var MCSAActivityMaterialContent_default = MCSAActivityMaterialContent;
|
|
4539
4589
|
|
|
4540
4590
|
// src/components/activities/MCSAActivityContent.tsx
|
|
4541
|
-
import { jsx as
|
|
4591
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4542
4592
|
var MCSAActivityContent = ({
|
|
4543
4593
|
answer,
|
|
4544
4594
|
data,
|
|
@@ -4558,10 +4608,10 @@ var MCSAActivityContent = ({
|
|
|
4558
4608
|
changeAnswer(answer2);
|
|
4559
4609
|
};
|
|
4560
4610
|
return /* @__PURE__ */ jsxs22("div", { className: "flex flex-row flex-wrap", children: [
|
|
4561
|
-
/* @__PURE__ */
|
|
4562
|
-
/* @__PURE__ */
|
|
4563
|
-
/* @__PURE__ */
|
|
4564
|
-
/* @__PURE__ */
|
|
4611
|
+
/* @__PURE__ */ jsx30("div", { className: "w-full md:w-[60%]", children: /* @__PURE__ */ jsx30(ActivityBodyContent_default, { bodyMap: MCSABodyMap, templateType: "MCSA" }) }),
|
|
4612
|
+
/* @__PURE__ */ jsx30("div", { className: "contents md:hidden", children: /* @__PURE__ */ jsx30(DividerLine_default, {}) }),
|
|
4613
|
+
/* @__PURE__ */ jsx30("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx30(VerticalDividerLine_default, {}) }),
|
|
4614
|
+
/* @__PURE__ */ jsx30("div", { className: "w-full md:flex-1", children: /* @__PURE__ */ jsx30(
|
|
4565
4615
|
MCSAActivityMaterialContent_default,
|
|
4566
4616
|
{
|
|
4567
4617
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4578,7 +4628,7 @@ var MCSAActivityContent = ({
|
|
|
4578
4628
|
var MCSAActivityContent_default = MCSAActivityContent;
|
|
4579
4629
|
|
|
4580
4630
|
// src/components/activities/material-content/OpenEndedActivityMaterialContent.tsx
|
|
4581
|
-
import { Fragment as Fragment5, jsx as
|
|
4631
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4582
4632
|
var OpenEndedActivityMaterialContent = ({
|
|
4583
4633
|
answer,
|
|
4584
4634
|
contentMap,
|
|
@@ -4604,7 +4654,7 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
4604
4654
|
};
|
|
4605
4655
|
const RenderTextContent = (answerMap2) => {
|
|
4606
4656
|
const answerMapAnswer = answerMap2["ANSWER"];
|
|
4607
|
-
return /* @__PURE__ */
|
|
4657
|
+
return /* @__PURE__ */ jsx31(
|
|
4608
4658
|
InputGroup_default,
|
|
4609
4659
|
{
|
|
4610
4660
|
type: "textarea",
|
|
@@ -4617,16 +4667,16 @@ var OpenEndedActivityMaterialContent = ({
|
|
|
4617
4667
|
);
|
|
4618
4668
|
};
|
|
4619
4669
|
const answerMap = retrieveAnswerMap();
|
|
4620
|
-
return /* @__PURE__ */
|
|
4621
|
-
/* @__PURE__ */
|
|
4622
|
-
/* @__PURE__ */
|
|
4670
|
+
return /* @__PURE__ */ jsx31(Fragment5, { children: /* @__PURE__ */ jsxs23("div", { className: "", children: [
|
|
4671
|
+
/* @__PURE__ */ jsx31("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx31("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_open_ended_text") }) }),
|
|
4672
|
+
/* @__PURE__ */ jsx31("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx31(DividerLine_default, {}) }),
|
|
4623
4673
|
contentMap.type === "TEXT" ? RenderTextContent(answerMap) : null
|
|
4624
4674
|
] }) });
|
|
4625
4675
|
};
|
|
4626
4676
|
var OpenEndedActivityMaterialContent_default = OpenEndedActivityMaterialContent;
|
|
4627
4677
|
|
|
4628
4678
|
// src/components/activities/OpenEndedActivityContent.tsx
|
|
4629
|
-
import { Fragment as Fragment6, jsx as
|
|
4679
|
+
import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4630
4680
|
var OpenEndedActivityContent = ({
|
|
4631
4681
|
answer,
|
|
4632
4682
|
data,
|
|
@@ -4644,11 +4694,11 @@ var OpenEndedActivityContent = ({
|
|
|
4644
4694
|
changeAnswer(answer2);
|
|
4645
4695
|
};
|
|
4646
4696
|
return /* @__PURE__ */ jsxs24("div", { className: "flex flex-row flex-wrap", children: [
|
|
4647
|
-
/* @__PURE__ */
|
|
4697
|
+
/* @__PURE__ */ jsx32(
|
|
4648
4698
|
"div",
|
|
4649
4699
|
{
|
|
4650
4700
|
className: `${showMaterialContent ? "w-full md:w-[40%]" : "w-full"}`,
|
|
4651
|
-
children: /* @__PURE__ */
|
|
4701
|
+
children: /* @__PURE__ */ jsx32(
|
|
4652
4702
|
ActivityBodyContent_default,
|
|
4653
4703
|
{
|
|
4654
4704
|
bodyMap: openEndedBodyMap,
|
|
@@ -4658,9 +4708,9 @@ var OpenEndedActivityContent = ({
|
|
|
4658
4708
|
}
|
|
4659
4709
|
),
|
|
4660
4710
|
showMaterialContent ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
4661
|
-
/* @__PURE__ */
|
|
4662
|
-
/* @__PURE__ */
|
|
4663
|
-
/* @__PURE__ */
|
|
4711
|
+
/* @__PURE__ */ jsx32("div", { className: "contents md:hidden", children: /* @__PURE__ */ jsx32(DividerLine_default, {}) }),
|
|
4712
|
+
/* @__PURE__ */ jsx32("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx32(VerticalDividerLine_default, {}) }),
|
|
4713
|
+
/* @__PURE__ */ jsx32("div", { className: "w-full md:flex-1", children: /* @__PURE__ */ jsx32(
|
|
4664
4714
|
OpenEndedActivityMaterialContent_default,
|
|
4665
4715
|
{
|
|
4666
4716
|
answer,
|
|
@@ -4681,7 +4731,7 @@ import { InlineMath as InlineMath8 } from "react-katex";
|
|
|
4681
4731
|
// src/components/dnds/DraggableDroppableItem.tsx
|
|
4682
4732
|
import { useRef as useRef6 } from "react";
|
|
4683
4733
|
import { useDrag as useDrag2, useDrop as useDrop5 } from "react-dnd";
|
|
4684
|
-
import { jsx as
|
|
4734
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4685
4735
|
var DraggableDroppableItem = ({
|
|
4686
4736
|
key,
|
|
4687
4737
|
item,
|
|
@@ -4719,12 +4769,12 @@ var DraggableDroppableItem = ({
|
|
|
4719
4769
|
});
|
|
4720
4770
|
const opacity = isDragging ? 0.4 : 1;
|
|
4721
4771
|
drag(drop(ref));
|
|
4722
|
-
return /* @__PURE__ */
|
|
4772
|
+
return /* @__PURE__ */ jsx33(
|
|
4723
4773
|
"div",
|
|
4724
4774
|
{
|
|
4725
4775
|
className: `${isDragging ? "w-[0px] opacity-0" : "w-full opacity-100"} transition-all duration-500`,
|
|
4726
4776
|
ref: dropRef,
|
|
4727
|
-
children: /* @__PURE__ */
|
|
4777
|
+
children: /* @__PURE__ */ jsx33("div", { ref, className: "w-full", style: { opacity }, children: component })
|
|
4728
4778
|
},
|
|
4729
4779
|
key
|
|
4730
4780
|
);
|
|
@@ -4732,7 +4782,7 @@ var DraggableDroppableItem = ({
|
|
|
4732
4782
|
var DraggableDroppableItem_default = DraggableDroppableItem;
|
|
4733
4783
|
|
|
4734
4784
|
// src/components/activities/material-content/OrderingActivityMaterialContent.tsx
|
|
4735
|
-
import { jsx as
|
|
4785
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4736
4786
|
var OrderingActivityMaterialContent = ({
|
|
4737
4787
|
uniqueValue,
|
|
4738
4788
|
answer,
|
|
@@ -4809,12 +4859,12 @@ var OrderingActivityMaterialContent = ({
|
|
|
4809
4859
|
return 0;
|
|
4810
4860
|
};
|
|
4811
4861
|
const answerMap = retrieveAnswerMap();
|
|
4812
|
-
return /* @__PURE__ */
|
|
4862
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex flex-row flex-wrap", children: Object.keys(answerMap).map((materialKey, index) => {
|
|
4813
4863
|
const learnerAnswerState = checkAnswerState(
|
|
4814
4864
|
answerMap[materialKey] + "",
|
|
4815
4865
|
index + ""
|
|
4816
4866
|
);
|
|
4817
|
-
return /* @__PURE__ */
|
|
4867
|
+
return /* @__PURE__ */ jsx34("div", { className: "w-full lg:w-1/2", children: /* @__PURE__ */ jsxs25(
|
|
4818
4868
|
"div",
|
|
4819
4869
|
{
|
|
4820
4870
|
className: `flex flex-row items-center my-4 mx-2`,
|
|
@@ -4822,26 +4872,26 @@ var OrderingActivityMaterialContent = ({
|
|
|
4822
4872
|
marginTop: view === "PC" ? calculateMarginTop(parseFloat(materialKey)) : 0
|
|
4823
4873
|
},
|
|
4824
4874
|
children: [
|
|
4825
|
-
/* @__PURE__ */
|
|
4875
|
+
/* @__PURE__ */ jsx34("div", { className: "mr-3", children: /* @__PURE__ */ jsx34(
|
|
4826
4876
|
"div",
|
|
4827
4877
|
{
|
|
4828
4878
|
className: `${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : selectedKey === materialKey ? "border-catchup-blue" : "border-catchup-lighter-gray"} min-h-catchup-activity-outer-box-item w-catchup-activity-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer transition-all duration-300`,
|
|
4829
|
-
children: /* @__PURE__ */
|
|
4879
|
+
children: /* @__PURE__ */ jsx34(
|
|
4830
4880
|
"div",
|
|
4831
4881
|
{
|
|
4832
4882
|
className: `${selectedKey === materialKey ? "border-2 border-catchup-light-gray" : "border-2 border-catchup-blue"} flex flex-col items-center justify-center transition-all duration-300 rounded-catchup-full w-[50px] h-[50px]`,
|
|
4833
|
-
children: /* @__PURE__ */
|
|
4883
|
+
children: /* @__PURE__ */ jsx34("p", { className: "", children: parseFloat(materialKey) + 1 })
|
|
4834
4884
|
}
|
|
4835
4885
|
)
|
|
4836
4886
|
}
|
|
4837
4887
|
) }),
|
|
4838
|
-
/* @__PURE__ */
|
|
4888
|
+
/* @__PURE__ */ jsx34(
|
|
4839
4889
|
DraggableDroppableItem_default,
|
|
4840
4890
|
{
|
|
4841
4891
|
item: { index: materialKey },
|
|
4842
4892
|
type: "ORDERING",
|
|
4843
4893
|
dropRef: drop,
|
|
4844
|
-
component: /* @__PURE__ */
|
|
4894
|
+
component: /* @__PURE__ */ jsx34(
|
|
4845
4895
|
"div",
|
|
4846
4896
|
{
|
|
4847
4897
|
className: `${canDrop ? selectedKey !== materialKey ? selectedTargetKey === materialKey ? "bg-catchup-light-blue rounded-catchup-xlarge" : "bg-catchup-light-blue rounded-catchup-xlarge opacity-40" : "" : ""} flex-1 min-h-catchup-activity-outer-box-item flex flex-col items-center justify-center border-2 rounded-catchup-xlarge cursor-pointer p-3 ${learnerAnswerState === "CORRECT" ? "border-catchup-green" : learnerAnswerState === "INCORRECT" ? "border-catchup-red" : "border-catchup-blue"}`,
|
|
@@ -4850,16 +4900,16 @@ var OrderingActivityMaterialContent = ({
|
|
|
4850
4900
|
setSelectedKey(materialKey);
|
|
4851
4901
|
}
|
|
4852
4902
|
},
|
|
4853
|
-
children: contentMap.type === "TEXT" ? /* @__PURE__ */
|
|
4903
|
+
children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx34("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4854
4904
|
materialMap[answerMap[materialKey]]
|
|
4855
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
4905
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx34(
|
|
4856
4906
|
"span",
|
|
4857
4907
|
{
|
|
4858
4908
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4859
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
4909
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx34("span", { className: "text-2xl", children: /* @__PURE__ */ jsx34(InlineMath8, { math: inputPart.value }) }) : inputPart.value
|
|
4860
4910
|
},
|
|
4861
4911
|
index2
|
|
4862
|
-
)) }) : /* @__PURE__ */
|
|
4912
|
+
)) }) : /* @__PURE__ */ jsx34(
|
|
4863
4913
|
ShowMaterialMediaByContentType_default,
|
|
4864
4914
|
{
|
|
4865
4915
|
contentType: contentMap.type,
|
|
@@ -4891,7 +4941,7 @@ var OrderingActivityMaterialContent = ({
|
|
|
4891
4941
|
var OrderingActivityMaterialContent_default = OrderingActivityMaterialContent;
|
|
4892
4942
|
|
|
4893
4943
|
// src/components/activities/OrderingActivityContent.tsx
|
|
4894
|
-
import { Fragment as Fragment7, jsx as
|
|
4944
|
+
import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4895
4945
|
var OrderingActivityContent = ({
|
|
4896
4946
|
answer,
|
|
4897
4947
|
data,
|
|
@@ -4914,15 +4964,15 @@ var OrderingActivityContent = ({
|
|
|
4914
4964
|
changeAnswer(answer2);
|
|
4915
4965
|
};
|
|
4916
4966
|
return /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
4917
|
-
/* @__PURE__ */
|
|
4967
|
+
/* @__PURE__ */ jsx35(
|
|
4918
4968
|
ActivityBodyContent_default,
|
|
4919
4969
|
{
|
|
4920
4970
|
bodyMap: orderingBodyMap,
|
|
4921
4971
|
templateType: "ORDERING"
|
|
4922
4972
|
}
|
|
4923
4973
|
),
|
|
4924
|
-
/* @__PURE__ */
|
|
4925
|
-
/* @__PURE__ */
|
|
4974
|
+
/* @__PURE__ */ jsx35(DividerLine_default, {}),
|
|
4975
|
+
/* @__PURE__ */ jsx35(
|
|
4926
4976
|
OrderingActivityMaterialContent_default,
|
|
4927
4977
|
{
|
|
4928
4978
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -4942,7 +4992,7 @@ var OrderingActivityContent_default = OrderingActivityContent;
|
|
|
4942
4992
|
// src/components/activities/material-content/TrueFalseActivityMaterialContent.tsx
|
|
4943
4993
|
import { useEffect as useEffect9, useState as useState17 } from "react";
|
|
4944
4994
|
import { InlineMath as InlineMath9 } from "react-katex";
|
|
4945
|
-
import { Fragment as Fragment8, jsx as
|
|
4995
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4946
4996
|
var TrueFalseActivityMaterialContent = ({
|
|
4947
4997
|
uniqueValue,
|
|
4948
4998
|
answer,
|
|
@@ -4996,13 +5046,13 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
4996
5046
|
};
|
|
4997
5047
|
const answerMap = retrieveAnswerMap();
|
|
4998
5048
|
return /* @__PURE__ */ jsxs27("div", { className: "", children: [
|
|
4999
|
-
/* @__PURE__ */
|
|
5000
|
-
/* @__PURE__ */
|
|
5049
|
+
/* @__PURE__ */ jsx36("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx36("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_true_false_text") }) }),
|
|
5050
|
+
/* @__PURE__ */ jsx36("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx36(DividerLine_default, {}) }),
|
|
5001
5051
|
/* @__PURE__ */ jsxs27("div", { className: "flex flex-row justify-end items-center gap-x-2", children: [
|
|
5002
|
-
/* @__PURE__ */
|
|
5003
|
-
/* @__PURE__ */
|
|
5052
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx36("p", { className: "font-bold text-lg", children: i18n_default.t("true") }) }),
|
|
5053
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx36("p", { className: "font-bold text-lg", children: i18n_default.t("false") }) })
|
|
5004
5054
|
] }),
|
|
5005
|
-
checkCanAnswerQuestion() ? /* @__PURE__ */
|
|
5055
|
+
checkCanAnswerQuestion() ? /* @__PURE__ */ jsx36("div", { className: `flex flex-row w-full justify-center flex-wrap`, children: shuffleOptionList.map((shuffleOption, index) => {
|
|
5006
5056
|
const correctAnswer = materialMap.trueList.find(
|
|
5007
5057
|
(trueItem) => trueItem === shuffleOption
|
|
5008
5058
|
) !== void 0 ? "TRUE" : "FALSE";
|
|
@@ -5018,16 +5068,16 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
5018
5068
|
{
|
|
5019
5069
|
className: `w-full flex flex-row items-center justify-center cursor-pointer my-2 ${learnerAnswerState === "CORRECT" ? "border-2 border-catchup-green rounded-catchup-xlarge" : learnerAnswerState === "INCORRECT" ? "border-2 border-catchup-red rounded-catchup-xlarge" : ""}`,
|
|
5020
5070
|
children: [
|
|
5021
|
-
/* @__PURE__ */
|
|
5071
|
+
/* @__PURE__ */ jsx36("div", { className: "flex-1", children: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx36("p", { className: "text-xl p-2 whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5022
5072
|
shuffleOption
|
|
5023
|
-
).map((inputPart, index2) => /* @__PURE__ */
|
|
5073
|
+
).map((inputPart, index2) => /* @__PURE__ */ jsx36(
|
|
5024
5074
|
"span",
|
|
5025
5075
|
{
|
|
5026
5076
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5027
|
-
children: inputPart.isEquation ? /* @__PURE__ */
|
|
5077
|
+
children: inputPart.isEquation ? /* @__PURE__ */ jsx36("span", { className: "text-2xl", children: /* @__PURE__ */ jsx36(InlineMath9, { math: inputPart.value }) }) : inputPart.value
|
|
5028
5078
|
},
|
|
5029
5079
|
index2
|
|
5030
|
-
)) }) : /* @__PURE__ */
|
|
5080
|
+
)) }) : /* @__PURE__ */ jsx36(
|
|
5031
5081
|
ShowMaterialMediaByContentType_default,
|
|
5032
5082
|
{
|
|
5033
5083
|
contentType: contentMap.type,
|
|
@@ -5037,7 +5087,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
5037
5087
|
`${uniqueValue}-${index}`
|
|
5038
5088
|
) }),
|
|
5039
5089
|
/* @__PURE__ */ jsxs27("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5040
|
-
/* @__PURE__ */
|
|
5090
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx36("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ jsx36(
|
|
5041
5091
|
BaseImage_default,
|
|
5042
5092
|
{
|
|
5043
5093
|
src: answerMap.trueList.includes(shuffleOption) ? "/icons/checkbox.png" : "/icons/empty-checkbox.png",
|
|
@@ -5048,7 +5098,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
5048
5098
|
}
|
|
5049
5099
|
}
|
|
5050
5100
|
) }) }),
|
|
5051
|
-
/* @__PURE__ */
|
|
5101
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx36("div", { className: "flex flex-col items-center justify-center", children: /* @__PURE__ */ jsx36(
|
|
5052
5102
|
BaseImage_default,
|
|
5053
5103
|
{
|
|
5054
5104
|
src: answerMap.falseList.includes(shuffleOption) ? "/icons/checkbox.png" : "/icons/empty-checkbox.png",
|
|
@@ -5066,12 +5116,12 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
5066
5116
|
);
|
|
5067
5117
|
}) }) : /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
5068
5118
|
answerMap.trueList.map((item) => /* @__PURE__ */ jsxs27("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5069
|
-
/* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5119
|
+
/* @__PURE__ */ jsx36("div", { className: "flex-1", children: /* @__PURE__ */ jsx36("p", { children: item }) }),
|
|
5120
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx36("p", { className: "underline", children: i18n_default.t("true") }) })
|
|
5071
5121
|
] })),
|
|
5072
5122
|
answerMap.falseList.map((item) => /* @__PURE__ */ jsxs27("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5073
|
-
/* @__PURE__ */
|
|
5074
|
-
/* @__PURE__ */
|
|
5123
|
+
/* @__PURE__ */ jsx36("div", { className: "flex-1", children: /* @__PURE__ */ jsx36("p", { children: item }) }),
|
|
5124
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[50px]", children: /* @__PURE__ */ jsx36("p", { className: "underline", children: i18n_default.t("false") }) })
|
|
5075
5125
|
] }))
|
|
5076
5126
|
] })
|
|
5077
5127
|
] });
|
|
@@ -5079,7 +5129,7 @@ var TrueFalseActivityMaterialContent = ({
|
|
|
5079
5129
|
var TrueFalseActivityMaterialContent_default = TrueFalseActivityMaterialContent;
|
|
5080
5130
|
|
|
5081
5131
|
// src/components/activities/TrueFalseActivityContent.tsx
|
|
5082
|
-
import { jsx as
|
|
5132
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5083
5133
|
var TrueFalseActivityContent = ({
|
|
5084
5134
|
answer,
|
|
5085
5135
|
data,
|
|
@@ -5129,16 +5179,16 @@ var TrueFalseActivityContent = ({
|
|
|
5129
5179
|
changeAnswer(answer2);
|
|
5130
5180
|
};
|
|
5131
5181
|
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-row flex-wrap", children: [
|
|
5132
|
-
/* @__PURE__ */
|
|
5182
|
+
/* @__PURE__ */ jsx37("div", { className: "w-full md:w-[40%]", children: /* @__PURE__ */ jsx37(
|
|
5133
5183
|
ActivityBodyContent_default,
|
|
5134
5184
|
{
|
|
5135
5185
|
bodyMap: trueFalseBodyMap,
|
|
5136
5186
|
templateType: "GROUPING"
|
|
5137
5187
|
}
|
|
5138
5188
|
) }),
|
|
5139
|
-
/* @__PURE__ */
|
|
5140
|
-
/* @__PURE__ */
|
|
5141
|
-
/* @__PURE__ */
|
|
5189
|
+
/* @__PURE__ */ jsx37("div", { className: "contents md:hidden", children: /* @__PURE__ */ jsx37(DividerLine_default, {}) }),
|
|
5190
|
+
/* @__PURE__ */ jsx37("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx37(VerticalDividerLine_default, {}) }),
|
|
5191
|
+
/* @__PURE__ */ jsx37("div", { className: "w-full md:flex-1", children: /* @__PURE__ */ jsx37(
|
|
5142
5192
|
TrueFalseActivityMaterialContent_default,
|
|
5143
5193
|
{
|
|
5144
5194
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5156,9 +5206,9 @@ var TrueFalseActivityContent = ({
|
|
|
5156
5206
|
var TrueFalseActivityContent_default = TrueFalseActivityContent;
|
|
5157
5207
|
|
|
5158
5208
|
// src/components/dividers/BlueVerticalDividerLine.tsx
|
|
5159
|
-
import { jsx as
|
|
5209
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
5160
5210
|
var BlueVerticalDividerLine = ({ opacity }) => {
|
|
5161
|
-
return /* @__PURE__ */
|
|
5211
|
+
return /* @__PURE__ */ jsx38(
|
|
5162
5212
|
"div",
|
|
5163
5213
|
{
|
|
5164
5214
|
className: `w-[2px] h-[40px] my-4 bg-catchup-blue ${opacity === "medium" ? "opacity-50" : ""}`
|
|
@@ -5167,77 +5217,2372 @@ var BlueVerticalDividerLine = ({ opacity }) => {
|
|
|
5167
5217
|
};
|
|
5168
5218
|
var BlueVerticalDividerLine_default = BlueVerticalDividerLine;
|
|
5169
5219
|
|
|
5170
|
-
// src/
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5220
|
+
// src/components/boxes/SelectionBox.tsx
|
|
5221
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5222
|
+
var SelectionBox = ({
|
|
5223
|
+
optionList,
|
|
5224
|
+
selectedId,
|
|
5225
|
+
handleSelectOnClick
|
|
5226
|
+
}) => {
|
|
5227
|
+
return /* @__PURE__ */ jsx39("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx39(
|
|
5228
|
+
"div",
|
|
5229
|
+
{
|
|
5230
|
+
className: `${option.id === selectedId ? "border-catchup-blue-400" : "border-catchup-gray-100 hover:border-catchup-blue-500"} border-2 rounded-catchup-xlarge py-3 px-8 cursor-pointer duration-300 transition-all`,
|
|
5231
|
+
onClick: () => {
|
|
5232
|
+
handleSelectOnClick(option.id);
|
|
5233
|
+
},
|
|
5234
|
+
children: /* @__PURE__ */ jsxs29(
|
|
5235
|
+
"div",
|
|
5236
|
+
{
|
|
5237
|
+
className: `flex flex-row items-center gap-x-1 ${option.id === selectedId ? "opacity-100" : "opacity-50"}`,
|
|
5238
|
+
children: [
|
|
5239
|
+
/* @__PURE__ */ jsx39("div", { children: option.icon }),
|
|
5240
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex-1 flex flex-col items-center", children: [
|
|
5241
|
+
/* @__PURE__ */ jsx39("p", { children: option.text }),
|
|
5242
|
+
option.subText ? /* @__PURE__ */ jsxs29("p", { className: "text-md", children: [
|
|
5243
|
+
"(",
|
|
5244
|
+
option.subText,
|
|
5245
|
+
")"
|
|
5246
|
+
] }) : null
|
|
5247
|
+
] })
|
|
5248
|
+
]
|
|
5249
|
+
}
|
|
5250
|
+
)
|
|
5251
|
+
},
|
|
5252
|
+
index
|
|
5253
|
+
)) });
|
|
5254
|
+
};
|
|
5255
|
+
var SelectionBox_default = SelectionBox;
|
|
5256
|
+
|
|
5257
|
+
// src/components/boxes/SelectionCheckbox.tsx
|
|
5258
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5259
|
+
var SelectionCheckbox = ({
|
|
5260
|
+
optionList,
|
|
5261
|
+
selectedIdList,
|
|
5262
|
+
handleSelectOnClick,
|
|
5263
|
+
handleRemoveOnClick
|
|
5264
|
+
}) => {
|
|
5265
|
+
return /* @__PURE__ */ jsx40("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx40(
|
|
5266
|
+
"div",
|
|
5267
|
+
{
|
|
5268
|
+
className: `${selectedIdList.findIndex(
|
|
5269
|
+
(selectedId) => selectedId === option.id
|
|
5270
|
+
) > -1 ? "border-catchup-blue-400" : "border-catchup-gray-100 hover:border-catchup-blue-500"} border-2 rounded-catchup-xlarge py-3 px-6 cursor-pointer duration-300 transition-all`,
|
|
5271
|
+
onClick: () => {
|
|
5272
|
+
if (selectedIdList.findIndex(
|
|
5273
|
+
(selectedId) => selectedId === option.id
|
|
5274
|
+
) === -1) {
|
|
5275
|
+
handleSelectOnClick(option.id);
|
|
5276
|
+
} else {
|
|
5277
|
+
handleRemoveOnClick(option.id);
|
|
5278
|
+
}
|
|
5279
|
+
},
|
|
5280
|
+
children: /* @__PURE__ */ jsxs30(
|
|
5281
|
+
"div",
|
|
5282
|
+
{
|
|
5283
|
+
className: `flex flex-row items-center gap-x-1 ${selectedIdList.findIndex(
|
|
5284
|
+
(selectedId) => selectedId === option.id
|
|
5285
|
+
) > -1 ? "opacity-100" : "opacity-50"}`,
|
|
5286
|
+
children: [
|
|
5287
|
+
/* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40(
|
|
5288
|
+
BaseImage_default,
|
|
5289
|
+
{
|
|
5290
|
+
src: selectedIdList.findIndex(
|
|
5291
|
+
(selectedId) => selectedId === option.id
|
|
5292
|
+
) > -1 ? "/icons/checkbox.png" : "/icons/checkbox-empty.png",
|
|
5293
|
+
alt: "checkbox",
|
|
5294
|
+
size: "small"
|
|
5295
|
+
}
|
|
5296
|
+
) }),
|
|
5297
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1", children: /* @__PURE__ */ jsx40("p", { children: option.text }) })
|
|
5298
|
+
]
|
|
5299
|
+
}
|
|
5300
|
+
)
|
|
5301
|
+
},
|
|
5302
|
+
index
|
|
5303
|
+
)) });
|
|
5304
|
+
};
|
|
5305
|
+
var SelectionCheckbox_default = SelectionCheckbox;
|
|
5306
|
+
|
|
5307
|
+
// src/components/tabs/SelectionTab.tsx
|
|
5308
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
5309
|
+
var SelectionTab = ({
|
|
5310
|
+
optionList,
|
|
5311
|
+
selectedId,
|
|
5312
|
+
handleSelectOnClick,
|
|
5313
|
+
selectedTextColor,
|
|
5314
|
+
selectedBorderColor,
|
|
5315
|
+
textColor,
|
|
5316
|
+
borderColor
|
|
5317
|
+
}) => {
|
|
5318
|
+
return /* @__PURE__ */ jsx41("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-5 text-lg text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsx41(
|
|
5319
|
+
"div",
|
|
5320
|
+
{
|
|
5321
|
+
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
5322
|
+
onClick: () => {
|
|
5323
|
+
handleSelectOnClick(option.id);
|
|
5324
|
+
},
|
|
5325
|
+
children: option.title
|
|
5326
|
+
},
|
|
5327
|
+
index
|
|
5328
|
+
)) });
|
|
5329
|
+
};
|
|
5330
|
+
var SelectionTab_default = SelectionTab;
|
|
5331
|
+
|
|
5332
|
+
// src/components/labels/ActivityTemplateLabel.tsx
|
|
5333
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5334
|
+
var ActivityTemplateLabel = ({ title }) => {
|
|
5335
|
+
return /* @__PURE__ */ jsx42("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs31("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5336
|
+
/* @__PURE__ */ jsx42(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
|
|
5337
|
+
/* @__PURE__ */ jsx42("p", { className: "text-md", children: title })
|
|
5338
|
+
] }) });
|
|
5339
|
+
};
|
|
5340
|
+
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
5341
|
+
|
|
5342
|
+
// src/components/labels/BrandLabel.tsx
|
|
5343
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5344
|
+
var BrandLabel = ({ title, icon, font }) => {
|
|
5345
|
+
return /* @__PURE__ */ jsx43("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5346
|
+
icon ? icon : /* @__PURE__ */ jsx43(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
|
|
5347
|
+
/* @__PURE__ */ jsx43("p", { className: font ? font : "text-sm", children: title })
|
|
5348
|
+
] }) });
|
|
5349
|
+
};
|
|
5350
|
+
var BrandLabel_default = BrandLabel;
|
|
5351
|
+
|
|
5352
|
+
// src/components/labels/CoterieLabel.tsx
|
|
5353
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
5354
|
+
var CoterieLabel = ({ title }) => {
|
|
5355
|
+
return /* @__PURE__ */ jsx44("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsx44("p", { className: "text-md", children: title }) });
|
|
5356
|
+
};
|
|
5357
|
+
var CoterieLabel_default = CoterieLabel;
|
|
5358
|
+
|
|
5359
|
+
// src/components/labels/GradeLabel.tsx
|
|
5360
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
5361
|
+
var GradeLabel = ({ title }) => {
|
|
5362
|
+
return /* @__PURE__ */ jsx45("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsx45("p", { className: "text-sm", children: title }) });
|
|
5363
|
+
};
|
|
5364
|
+
var GradeLabel_default = GradeLabel;
|
|
5365
|
+
|
|
5366
|
+
// src/components/labels/OutcomeLabel.tsx
|
|
5367
|
+
import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
5368
|
+
var OutcomeLabel = ({ title }) => {
|
|
5369
|
+
return /* @__PURE__ */ jsx46("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5370
|
+
/* @__PURE__ */ jsx46(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
|
|
5371
|
+
/* @__PURE__ */ jsx46("p", { className: "text-md", children: title })
|
|
5372
|
+
] }) });
|
|
5373
|
+
};
|
|
5374
|
+
var OutcomeLabel_default = OutcomeLabel;
|
|
5375
|
+
|
|
5376
|
+
// src/components/labels/PersonalLabel.tsx
|
|
5377
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5378
|
+
var PersonalLabel = ({ title, icon, font }) => {
|
|
5379
|
+
return /* @__PURE__ */ jsx47("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs34("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5380
|
+
icon ? icon : /* @__PURE__ */ jsx47(
|
|
5381
|
+
BaseImage_default,
|
|
5382
|
+
{
|
|
5383
|
+
src: "/icons/personal-label.png",
|
|
5384
|
+
alt: "label",
|
|
5385
|
+
size: "xsmall"
|
|
5386
|
+
}
|
|
5387
|
+
),
|
|
5388
|
+
/* @__PURE__ */ jsx47("p", { className: font ? font : "text-sm", children: title })
|
|
5389
|
+
] }) });
|
|
5390
|
+
};
|
|
5391
|
+
var PersonalLabel_default = PersonalLabel;
|
|
5392
|
+
|
|
5393
|
+
// src/components/labels/PublishingHouseLabel.tsx
|
|
5394
|
+
import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5395
|
+
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
5396
|
+
return /* @__PURE__ */ jsx48("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5397
|
+
icon ? icon : /* @__PURE__ */ jsx48(
|
|
5398
|
+
BaseImage_default,
|
|
5399
|
+
{
|
|
5400
|
+
src: "/icons/publishing-house-label.png",
|
|
5401
|
+
alt: "label",
|
|
5402
|
+
size: "xsmall"
|
|
5403
|
+
}
|
|
5404
|
+
),
|
|
5405
|
+
/* @__PURE__ */ jsx48("p", { className: font ? font : "text-sm", children: title })
|
|
5406
|
+
] }) });
|
|
5407
|
+
};
|
|
5408
|
+
var PublishingHouseLabel_default = PublishingHouseLabel;
|
|
5409
|
+
|
|
5410
|
+
// src/utilization/AuthorizationUtilization.ts
|
|
5411
|
+
var parseJwt = (token) => {
|
|
5412
|
+
var base64Url = token.split(".")[1];
|
|
5413
|
+
var base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
5414
|
+
var jsonPayload = decodeURIComponent(
|
|
5415
|
+
window.atob(base64).split("").map(function(c) {
|
|
5416
|
+
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
|
5417
|
+
}).join("")
|
|
5418
|
+
);
|
|
5419
|
+
return JSON.parse(jsonPayload);
|
|
5420
|
+
};
|
|
5421
|
+
|
|
5422
|
+
// src/utilization/ManagementUtilization.ts
|
|
5423
|
+
var retrieveBrandDTOByUserProfileOptionList = (userProfile) => {
|
|
5424
|
+
const brandDTOOptionList = [];
|
|
5425
|
+
if (userProfile) {
|
|
5426
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
5427
|
+
const currentBrand = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
5428
|
+
if (brandDTOOptionList.findIndex(
|
|
5429
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
5430
|
+
) === -1) {
|
|
5431
|
+
brandDTOOptionList.push({
|
|
5432
|
+
value: currentBrand.id,
|
|
5433
|
+
fullValue: currentBrand,
|
|
5434
|
+
text: currentBrand.name
|
|
5435
|
+
});
|
|
5436
|
+
}
|
|
5437
|
+
}
|
|
5438
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
5439
|
+
const currentBrand = gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
5440
|
+
if (brandDTOOptionList.findIndex(
|
|
5441
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
5442
|
+
) === -1) {
|
|
5443
|
+
brandDTOOptionList.push({
|
|
5444
|
+
value: currentBrand.id,
|
|
5445
|
+
fullValue: currentBrand,
|
|
5446
|
+
text: currentBrand.name
|
|
5447
|
+
});
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
5451
|
+
const currentBrand = seasonDTO.institutionDTO.campusDTO.brandDTO;
|
|
5452
|
+
if (brandDTOOptionList.findIndex(
|
|
5453
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
5454
|
+
) === -1) {
|
|
5455
|
+
brandDTOOptionList.push({
|
|
5456
|
+
value: currentBrand.id,
|
|
5457
|
+
fullValue: currentBrand,
|
|
5458
|
+
text: currentBrand.name
|
|
5459
|
+
});
|
|
5460
|
+
}
|
|
5461
|
+
}
|
|
5462
|
+
for (const institutionDTO of userProfile.institutionDTOList) {
|
|
5463
|
+
const currentBrand = institutionDTO.campusDTO.brandDTO;
|
|
5464
|
+
if (brandDTOOptionList.findIndex(
|
|
5465
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
5466
|
+
) === -1) {
|
|
5467
|
+
brandDTOOptionList.push({
|
|
5468
|
+
value: currentBrand.id,
|
|
5469
|
+
fullValue: currentBrand,
|
|
5470
|
+
text: currentBrand.name
|
|
5471
|
+
});
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
for (const campusDTO of userProfile.campusDTOList) {
|
|
5475
|
+
const currentBrand = campusDTO.brandDTO;
|
|
5476
|
+
if (brandDTOOptionList.findIndex(
|
|
5477
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
5478
|
+
) === -1) {
|
|
5479
|
+
brandDTOOptionList.push({
|
|
5480
|
+
value: currentBrand.id,
|
|
5481
|
+
fullValue: currentBrand,
|
|
5482
|
+
text: currentBrand.name
|
|
5483
|
+
});
|
|
5484
|
+
}
|
|
5485
|
+
}
|
|
5486
|
+
for (const brandDTO of userProfile.brandDTOList) {
|
|
5487
|
+
const currentBrand = brandDTO;
|
|
5488
|
+
if (brandDTOOptionList.findIndex(
|
|
5489
|
+
(brandDTOOption) => brandDTOOption.value === currentBrand.id
|
|
5490
|
+
) === -1) {
|
|
5491
|
+
brandDTOOptionList.push({
|
|
5492
|
+
value: currentBrand.id,
|
|
5493
|
+
fullValue: currentBrand,
|
|
5494
|
+
text: currentBrand.name
|
|
5495
|
+
});
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5175
5498
|
}
|
|
5176
|
-
return
|
|
5499
|
+
return brandDTOOptionList;
|
|
5177
5500
|
};
|
|
5178
|
-
var
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
}
|
|
5184
|
-
|
|
5501
|
+
var retrieveBrandDTOOptionList = (brandDTOList) => {
|
|
5502
|
+
return brandDTOList.map((brandDTO) => ({
|
|
5503
|
+
value: brandDTO.id,
|
|
5504
|
+
text: brandDTO.name,
|
|
5505
|
+
fullValue: brandDTO
|
|
5506
|
+
}));
|
|
5507
|
+
};
|
|
5508
|
+
var retrieveCampusDTOOptionList = (campusDTOList) => {
|
|
5509
|
+
return campusDTOList.map((campusDTO) => ({
|
|
5510
|
+
value: campusDTO.id,
|
|
5511
|
+
text: `${campusDTO.name} (${campusDTO.brandDTO.name})`,
|
|
5512
|
+
fullValue: campusDTO
|
|
5513
|
+
}));
|
|
5514
|
+
};
|
|
5515
|
+
var retrieveInstitutionDTOOptionList = (institutionDTOList) => {
|
|
5516
|
+
return institutionDTOList.map((institutionDTO) => ({
|
|
5517
|
+
value: institutionDTO.id,
|
|
5518
|
+
text: `${institutionDTO.name} (${institutionDTO.campusDTO.name} - ${institutionDTO.campusDTO.brandDTO.name})`,
|
|
5519
|
+
fullValue: institutionDTO
|
|
5520
|
+
}));
|
|
5521
|
+
};
|
|
5522
|
+
var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
5523
|
+
return seasonDTOList.map((seasonDTO) => ({
|
|
5524
|
+
value: seasonDTO.id,
|
|
5525
|
+
text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name})`,
|
|
5526
|
+
fullValue: seasonDTO
|
|
5527
|
+
// text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name} - ${seasonDTO.institutionDTO.campusDTO.name}/${seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
5528
|
+
}));
|
|
5529
|
+
};
|
|
5530
|
+
var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
5531
|
+
return gradeDTOList.map((gradeDTO) => ({
|
|
5532
|
+
value: gradeDTO.id,
|
|
5533
|
+
text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
5534
|
+
fullValue: gradeDTO
|
|
5535
|
+
// text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} ${gradeDTO.seasonDTO.institutionDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
5536
|
+
}));
|
|
5537
|
+
};
|
|
5538
|
+
var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
5539
|
+
return branchDTOList.map((branchDTO) => ({
|
|
5540
|
+
value: branchDTO.id,
|
|
5541
|
+
text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
5542
|
+
fullValue: branchDTO
|
|
5543
|
+
// text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
5544
|
+
}));
|
|
5545
|
+
};
|
|
5546
|
+
var retrieveCampusDTOByUserProfileOptionList = (userProfile, selectedBrandId) => {
|
|
5547
|
+
const campusDTOOptionList = [];
|
|
5548
|
+
if (userProfile) {
|
|
5549
|
+
if (selectedBrandId) {
|
|
5550
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
5551
|
+
const currentCampus = branchDTO.gradeDTO.seasonDTO.institutionDTO.campusDTO;
|
|
5552
|
+
if (campusDTOOptionList.findIndex(
|
|
5553
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
5554
|
+
) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
|
|
5555
|
+
campusDTOOptionList.push({
|
|
5556
|
+
value: currentCampus.id,
|
|
5557
|
+
fullValue: currentCampus,
|
|
5558
|
+
text: currentCampus.name
|
|
5559
|
+
});
|
|
5560
|
+
}
|
|
5561
|
+
}
|
|
5562
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
5563
|
+
const currentCampus = gradeDTO.seasonDTO.institutionDTO.campusDTO;
|
|
5564
|
+
if (campusDTOOptionList.findIndex(
|
|
5565
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
5566
|
+
) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
|
|
5567
|
+
campusDTOOptionList.push({
|
|
5568
|
+
value: currentCampus.id,
|
|
5569
|
+
fullValue: currentCampus,
|
|
5570
|
+
text: currentCampus.name
|
|
5571
|
+
});
|
|
5572
|
+
}
|
|
5573
|
+
}
|
|
5574
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
5575
|
+
const currentCampus = seasonDTO.institutionDTO.campusDTO;
|
|
5576
|
+
if (campusDTOOptionList.findIndex(
|
|
5577
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
5578
|
+
) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
|
|
5579
|
+
campusDTOOptionList.push({
|
|
5580
|
+
value: currentCampus.id,
|
|
5581
|
+
fullValue: currentCampus,
|
|
5582
|
+
text: currentCampus.name
|
|
5583
|
+
});
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
for (const institutionDTO of userProfile.institutionDTOList) {
|
|
5587
|
+
const currentCampus = institutionDTO.campusDTO;
|
|
5588
|
+
if (campusDTOOptionList.findIndex(
|
|
5589
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
5590
|
+
) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
|
|
5591
|
+
campusDTOOptionList.push({
|
|
5592
|
+
value: currentCampus.id,
|
|
5593
|
+
fullValue: currentCampus,
|
|
5594
|
+
text: currentCampus.name
|
|
5595
|
+
});
|
|
5596
|
+
}
|
|
5597
|
+
}
|
|
5598
|
+
for (const campusDTO of userProfile.campusDTOList) {
|
|
5599
|
+
const currentCampus = campusDTO;
|
|
5600
|
+
if (campusDTOOptionList.findIndex(
|
|
5601
|
+
(campusDTOOption) => campusDTOOption.value === currentCampus.id
|
|
5602
|
+
) === -1 && currentCampus.brandDTO.id === parseFloat(selectedBrandId)) {
|
|
5603
|
+
campusDTOOptionList.push({
|
|
5604
|
+
value: currentCampus.id,
|
|
5605
|
+
fullValue: currentCampus,
|
|
5606
|
+
text: currentCampus.name
|
|
5607
|
+
});
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
return campusDTOOptionList;
|
|
5611
|
+
}
|
|
5185
5612
|
}
|
|
5613
|
+
return [];
|
|
5186
5614
|
};
|
|
5187
|
-
var
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5615
|
+
var retrieveInstitutionDTOByUserProfileOptionList = (userProfile, selectedBrandId, selectedCampusId) => {
|
|
5616
|
+
const institutionDTOOptionList = [];
|
|
5617
|
+
if (userProfile) {
|
|
5618
|
+
if (selectedCampusId) {
|
|
5619
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
5620
|
+
const currentInstitution = branchDTO.gradeDTO.seasonDTO.institutionDTO;
|
|
5621
|
+
if (institutionDTOOptionList.findIndex(
|
|
5622
|
+
(institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
|
|
5623
|
+
) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
|
|
5624
|
+
institutionDTOOptionList.push({
|
|
5625
|
+
value: currentInstitution.id,
|
|
5626
|
+
fullValue: currentInstitution,
|
|
5627
|
+
text: currentInstitution.name
|
|
5628
|
+
});
|
|
5629
|
+
}
|
|
5630
|
+
}
|
|
5631
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
5632
|
+
const currentInstitution = gradeDTO.seasonDTO.institutionDTO;
|
|
5633
|
+
if (institutionDTOOptionList.findIndex(
|
|
5634
|
+
(institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
|
|
5635
|
+
) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
|
|
5636
|
+
institutionDTOOptionList.push({
|
|
5637
|
+
value: currentInstitution.id,
|
|
5638
|
+
fullValue: currentInstitution,
|
|
5639
|
+
text: currentInstitution.name
|
|
5640
|
+
});
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
5644
|
+
const currentInstitution = seasonDTO.institutionDTO;
|
|
5645
|
+
if (institutionDTOOptionList.findIndex(
|
|
5646
|
+
(institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
|
|
5647
|
+
) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
|
|
5648
|
+
institutionDTOOptionList.push({
|
|
5649
|
+
value: currentInstitution.id,
|
|
5650
|
+
fullValue: currentInstitution,
|
|
5651
|
+
text: currentInstitution.name
|
|
5652
|
+
});
|
|
5653
|
+
}
|
|
5654
|
+
}
|
|
5655
|
+
for (const institutionDTO of userProfile.institutionDTOList) {
|
|
5656
|
+
const currentInstitution = institutionDTO;
|
|
5657
|
+
if (institutionDTOOptionList.findIndex(
|
|
5658
|
+
(institutionDTOOption) => institutionDTOOption.value === currentInstitution.id
|
|
5659
|
+
) === -1 && currentInstitution.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentInstitution.campusDTO.id === parseFloat(selectedCampusId)) {
|
|
5660
|
+
institutionDTOOptionList.push({
|
|
5661
|
+
value: currentInstitution.id,
|
|
5662
|
+
fullValue: currentInstitution,
|
|
5663
|
+
text: currentInstitution.name
|
|
5664
|
+
});
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
}
|
|
5668
|
+
}
|
|
5669
|
+
return institutionDTOOptionList;
|
|
5670
|
+
};
|
|
5671
|
+
var retrieveSeasonDTOByUserProfileOptionList = (userProfile, selectedBrandId, selectedInstitutionId) => {
|
|
5672
|
+
const seasonDTOOptionList = [];
|
|
5673
|
+
if (userProfile) {
|
|
5674
|
+
if (selectedInstitutionId) {
|
|
5675
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
5676
|
+
const currentSeason = branchDTO.gradeDTO.seasonDTO;
|
|
5677
|
+
if (seasonDTOOptionList.findIndex(
|
|
5678
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
5679
|
+
) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
|
|
5680
|
+
seasonDTOOptionList.push({
|
|
5681
|
+
value: currentSeason.id,
|
|
5682
|
+
fullValue: currentSeason,
|
|
5683
|
+
text: currentSeason.name
|
|
5684
|
+
});
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
5688
|
+
const currentSeason = gradeDTO.seasonDTO;
|
|
5689
|
+
if (seasonDTOOptionList.findIndex(
|
|
5690
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
5691
|
+
) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
|
|
5692
|
+
seasonDTOOptionList.push({
|
|
5693
|
+
value: currentSeason.id,
|
|
5694
|
+
fullValue: currentSeason,
|
|
5695
|
+
text: currentSeason.name
|
|
5696
|
+
});
|
|
5697
|
+
}
|
|
5698
|
+
}
|
|
5699
|
+
for (const seasonDTO of userProfile.seasonDTOList) {
|
|
5700
|
+
const currentSeason = seasonDTO;
|
|
5701
|
+
if (seasonDTOOptionList.findIndex(
|
|
5702
|
+
(seasonDTOOption) => seasonDTOOption.value === currentSeason.id
|
|
5703
|
+
) === -1 && currentSeason.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentSeason.institutionDTO.id === parseFloat(selectedInstitutionId)) {
|
|
5704
|
+
seasonDTOOptionList.push({
|
|
5705
|
+
value: currentSeason.id,
|
|
5706
|
+
fullValue: currentSeason,
|
|
5707
|
+
text: currentSeason.name
|
|
5708
|
+
});
|
|
5709
|
+
}
|
|
5710
|
+
}
|
|
5711
|
+
}
|
|
5712
|
+
}
|
|
5713
|
+
return seasonDTOOptionList;
|
|
5714
|
+
};
|
|
5715
|
+
var retrieveGradeDTOByUserProfileOptionList = (userProfile, selectedBrandId, selectedSeasonId) => {
|
|
5716
|
+
const gradeDTOOptionList = [];
|
|
5717
|
+
if (userProfile) {
|
|
5718
|
+
if (selectedSeasonId) {
|
|
5719
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
5720
|
+
const currentGrade = branchDTO.gradeDTO;
|
|
5721
|
+
if (gradeDTOOptionList.findIndex(
|
|
5722
|
+
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id
|
|
5723
|
+
) === -1 && currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)) {
|
|
5724
|
+
gradeDTOOptionList.push({
|
|
5725
|
+
value: currentGrade.id,
|
|
5726
|
+
fullValue: currentGrade,
|
|
5727
|
+
text: currentGrade.name
|
|
5728
|
+
});
|
|
5729
|
+
}
|
|
5730
|
+
}
|
|
5731
|
+
for (const gradeDTO of userProfile.gradeDTOList) {
|
|
5732
|
+
const currentGrade = gradeDTO;
|
|
5733
|
+
if (gradeDTOOptionList.findIndex(
|
|
5734
|
+
(gradeDTOOption) => gradeDTOOption.value === currentGrade.id
|
|
5735
|
+
) === -1 && currentGrade.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentGrade.seasonDTO.id === parseFloat(selectedSeasonId)) {
|
|
5736
|
+
gradeDTOOptionList.push({
|
|
5737
|
+
value: currentGrade.id,
|
|
5738
|
+
fullValue: currentGrade,
|
|
5739
|
+
text: currentGrade.name
|
|
5740
|
+
});
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5744
|
+
}
|
|
5745
|
+
return gradeDTOOptionList;
|
|
5746
|
+
};
|
|
5747
|
+
var retrieveBranchDTOByUserProfileOptionList = (userProfile, selectedBrandId, selectedGradeId) => {
|
|
5748
|
+
const branchDTOOptionList = [];
|
|
5749
|
+
if (userProfile) {
|
|
5750
|
+
if (selectedGradeId) {
|
|
5751
|
+
for (const branchDTO of userProfile.branchDTOList) {
|
|
5752
|
+
const currentBranch = branchDTO;
|
|
5753
|
+
if (branchDTOOptionList.findIndex(
|
|
5754
|
+
(branchDTOOption) => branchDTOOption.value === currentBranch.id
|
|
5755
|
+
) === -1 && currentBranch.gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.id === parseFloat(selectedBrandId) && currentBranch.gradeDTO.id === parseFloat(selectedGradeId)) {
|
|
5756
|
+
branchDTOOptionList.push({
|
|
5757
|
+
value: currentBranch.id,
|
|
5758
|
+
fullValue: currentBranch,
|
|
5759
|
+
text: currentBranch.name
|
|
5760
|
+
});
|
|
5761
|
+
}
|
|
5762
|
+
}
|
|
5763
|
+
}
|
|
5194
5764
|
}
|
|
5765
|
+
return branchDTOOptionList;
|
|
5766
|
+
};
|
|
5767
|
+
var retrieveExternalRegistrationDTOOptionList = (externalRegistrationDTOList) => {
|
|
5768
|
+
return externalRegistrationDTOList.map((externalRegistrationDTO) => ({
|
|
5769
|
+
value: externalRegistrationDTO.id,
|
|
5770
|
+
text: externalRegistrationDTO.name,
|
|
5771
|
+
fullValue: externalRegistrationDTO
|
|
5772
|
+
// text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name} - ${seasonDTO.institutionDTO.campusDTO.name}/${seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
5773
|
+
}));
|
|
5774
|
+
};
|
|
5775
|
+
var retrieveGenderOptionList = () => {
|
|
5776
|
+
return [
|
|
5777
|
+
{
|
|
5778
|
+
value: "MALE",
|
|
5779
|
+
text: i18n_default.t("MALE")
|
|
5780
|
+
},
|
|
5781
|
+
{
|
|
5782
|
+
value: "FEMALE",
|
|
5783
|
+
text: i18n_default.t("FEMALE")
|
|
5784
|
+
},
|
|
5785
|
+
{
|
|
5786
|
+
value: "NOT_GIVEN",
|
|
5787
|
+
text: i18n_default.t("NOT_GIVEN")
|
|
5788
|
+
}
|
|
5789
|
+
];
|
|
5790
|
+
};
|
|
5791
|
+
var retrieveEnableOptionList = () => {
|
|
5792
|
+
return [
|
|
5793
|
+
{
|
|
5794
|
+
value: true,
|
|
5795
|
+
text: i18n_default.t("yes")
|
|
5796
|
+
},
|
|
5797
|
+
{
|
|
5798
|
+
value: false,
|
|
5799
|
+
text: i18n_default.t("no")
|
|
5800
|
+
}
|
|
5801
|
+
];
|
|
5802
|
+
};
|
|
5803
|
+
var retrieveUserRoleOptionList = () => {
|
|
5804
|
+
return [
|
|
5805
|
+
{
|
|
5806
|
+
value: "STAFF",
|
|
5807
|
+
text: i18n_default.t("STAFF")
|
|
5808
|
+
},
|
|
5809
|
+
{
|
|
5810
|
+
value: "LEARNER",
|
|
5811
|
+
text: i18n_default.t("LEARNER")
|
|
5812
|
+
},
|
|
5813
|
+
{
|
|
5814
|
+
value: "PARENT",
|
|
5815
|
+
text: i18n_default.t("PARENT")
|
|
5816
|
+
},
|
|
5817
|
+
{
|
|
5818
|
+
value: "INDIVIDUAL",
|
|
5819
|
+
text: i18n_default.t("INDIVIDUAL")
|
|
5820
|
+
},
|
|
5821
|
+
{
|
|
5822
|
+
value: "CONTENT_CREATOR",
|
|
5823
|
+
text: i18n_default.t("CONTENT_CREATOR")
|
|
5824
|
+
}
|
|
5825
|
+
];
|
|
5826
|
+
};
|
|
5827
|
+
var filterUserRoleOptionList = (accountType, userProfileRole) => {
|
|
5828
|
+
if (accountType === "GENIXO") {
|
|
5829
|
+
return retrieveUserRoleOptionList().filter(
|
|
5830
|
+
(userRoleOption) => userRoleOption.value === "STAFF" || userRoleOption.value === "LEARNER" || userRoleOption.value === "CONTENT_CREATOR"
|
|
5831
|
+
);
|
|
5832
|
+
} else {
|
|
5833
|
+
if (userProfileRole === "STAFF") {
|
|
5834
|
+
return retrieveUserRoleOptionList().filter(
|
|
5835
|
+
(userRoleOption) => userRoleOption.value === "STAFF" || userRoleOption.value === "LEARNER"
|
|
5836
|
+
);
|
|
5837
|
+
} else if (userProfileRole === "INDIVIDUAL") {
|
|
5838
|
+
return retrieveUserRoleOptionList().filter(
|
|
5839
|
+
(userRoleOption) => userRoleOption.value === "LEARNER"
|
|
5840
|
+
);
|
|
5841
|
+
}
|
|
5842
|
+
}
|
|
5843
|
+
return [];
|
|
5844
|
+
};
|
|
5845
|
+
var retrieveDefaultUserRoleOptionList = () => {
|
|
5846
|
+
return [
|
|
5847
|
+
{
|
|
5848
|
+
value: "BASIC",
|
|
5849
|
+
text: i18n_default.t("BASIC")
|
|
5850
|
+
},
|
|
5851
|
+
{
|
|
5852
|
+
value: "LEARNER",
|
|
5853
|
+
text: i18n_default.t("LEARNER")
|
|
5854
|
+
},
|
|
5855
|
+
{
|
|
5856
|
+
value: "STAFF_WRITER",
|
|
5857
|
+
text: i18n_default.t("STAFF_WRITER")
|
|
5858
|
+
},
|
|
5859
|
+
{
|
|
5860
|
+
value: "STAFF_TEACHER",
|
|
5861
|
+
text: i18n_default.t("STAFF_TEACHER")
|
|
5862
|
+
},
|
|
5863
|
+
{
|
|
5864
|
+
value: "STAFF_COTERIE_MANAGER",
|
|
5865
|
+
text: i18n_default.t("STAFF_COTERIE_MANAGER")
|
|
5866
|
+
},
|
|
5867
|
+
{
|
|
5868
|
+
value: "STAFF_INSTITUTION_MANAGER",
|
|
5869
|
+
text: i18n_default.t("STAFF_INSTITUTION_MANAGER")
|
|
5870
|
+
},
|
|
5871
|
+
{
|
|
5872
|
+
value: "STAFF_INSTITUTION_ASSISTANT_MANAGER",
|
|
5873
|
+
text: i18n_default.t("STAFF_INSTITUTION_ASSISTANT_MANAGER")
|
|
5874
|
+
},
|
|
5875
|
+
{
|
|
5876
|
+
value: "STAFF_CAMPUS_MANAGER",
|
|
5877
|
+
text: i18n_default.t("STAFF_CAMPUS_MANAGER")
|
|
5878
|
+
},
|
|
5879
|
+
{
|
|
5880
|
+
value: "STAFF_BRAND_MANAGER",
|
|
5881
|
+
text: i18n_default.t("STAFF_BRAND_MANAGER")
|
|
5882
|
+
},
|
|
5883
|
+
{
|
|
5884
|
+
value: "STAFF_INFORMATION_TECHNOLOGY",
|
|
5885
|
+
text: i18n_default.t("STAFF_INFORMATION_TECHNOLOGY")
|
|
5886
|
+
},
|
|
5887
|
+
{
|
|
5888
|
+
value: "INDIVIDUAL",
|
|
5889
|
+
text: i18n_default.t("INDIVIDUAL")
|
|
5890
|
+
},
|
|
5891
|
+
{
|
|
5892
|
+
value: "CONTENT_CREATOR",
|
|
5893
|
+
text: i18n_default.t("CONTENT_CREATOR")
|
|
5894
|
+
}
|
|
5895
|
+
];
|
|
5896
|
+
};
|
|
5897
|
+
var retrieveCountryCodeOptionList = () => {
|
|
5898
|
+
return [
|
|
5899
|
+
{
|
|
5900
|
+
value: "TR",
|
|
5901
|
+
text: i18n_default.t("TR"),
|
|
5902
|
+
parent: "TURKEY"
|
|
5903
|
+
}
|
|
5904
|
+
// {
|
|
5905
|
+
// value: "US",
|
|
5906
|
+
// text: i18n.t("US"),
|
|
5907
|
+
// parent: "UNITED_STATES",
|
|
5908
|
+
// },
|
|
5909
|
+
// {
|
|
5910
|
+
// value: "DE",
|
|
5911
|
+
// text: i18n.t("DE"),
|
|
5912
|
+
// parent: "GERMANY",
|
|
5913
|
+
// },
|
|
5914
|
+
];
|
|
5915
|
+
};
|
|
5916
|
+
var retrieveCountryNameOptionList = () => {
|
|
5917
|
+
return [
|
|
5918
|
+
{
|
|
5919
|
+
value: "TURKEY",
|
|
5920
|
+
text: i18n_default.t("TURKEY")
|
|
5921
|
+
}
|
|
5922
|
+
// {
|
|
5923
|
+
// value: "UNITED_STATES",
|
|
5924
|
+
// text: i18n.t("UNITED_STATES"),
|
|
5925
|
+
// },
|
|
5926
|
+
// {
|
|
5927
|
+
// value: "GERMANY",
|
|
5928
|
+
// text: i18n.t("GERMANY"),
|
|
5929
|
+
// },
|
|
5930
|
+
];
|
|
5931
|
+
};
|
|
5932
|
+
var retrieveProvinceNameOptionList = () => {
|
|
5933
|
+
return [
|
|
5934
|
+
// { parent: "TURKEY", value: "ADANA", text: "Adana", code: "01" },
|
|
5935
|
+
// { parent: "TURKEY", value: "ADIYAMAN", text: "Adıyaman", code: "02" },
|
|
5936
|
+
// { parent: "TURKEY", value: "AFYON", text: "Afyon", code: "03" },
|
|
5937
|
+
// { parent: "TURKEY", value: "AGRI", text: "Ağrı", code: "04" },
|
|
5938
|
+
// { parent: "TURKEY", value: "AMASYA", text: "Amasya", code: "05" },
|
|
5939
|
+
{ parent: "TURKEY", value: "ANKARA", text: "Ankara", code: "06" },
|
|
5940
|
+
{ parent: "TURKEY", value: "ANTALYA", text: "Antalya", code: "07" },
|
|
5941
|
+
// { parent: "TURKEY", value: "ARTVIN", text: "Artvin", code: "08" },
|
|
5942
|
+
// { parent: "TURKEY", value: "AYDIN", text: "Aydın", code: "09" },
|
|
5943
|
+
// { parent: "TURKEY", value: "BALIKESIR", text: "Balıkesir", code: "10" },
|
|
5944
|
+
// { parent: "TURKEY", value: "BILECIK", text: "Bilecik", code: "11" },
|
|
5945
|
+
// { parent: "TURKEY", value: "BINGOL", text: "Bingöl", code: "12" },
|
|
5946
|
+
// { parent: "TURKEY", value: "BITLIS", text: "Bitlis", code: "13" },
|
|
5947
|
+
// { parent: "TURKEY", value: "BOLU", text: "Bolu", code: "14" },
|
|
5948
|
+
// { parent: "TURKEY", value: "BURDUR", text: "Burdur", code: "15" },
|
|
5949
|
+
// { parent: "TURKEY", value: "BURSA", text: "Bursa", code: "16" },
|
|
5950
|
+
// { parent: "TURKEY", value: "CANAKKALE", text: "Çanakkale", code: "17" },
|
|
5951
|
+
// { parent: "TURKEY", value: "CANKIRI", text: "Çankırı", code: "18" },
|
|
5952
|
+
// { parent: "TURKEY", value: "CORUM", text: "Çorum", code: "19" },
|
|
5953
|
+
// { parent: "TURKEY", value: "DENIZLI", text: "Denizli", code: "20" },
|
|
5954
|
+
// { parent: "TURKEY", value: "DIYARBAKIR", text: "Diyarbakır", code: "21" },
|
|
5955
|
+
// { parent: "TURKEY", value: "EDIRNE", text: "Edirne", code: "22" },
|
|
5956
|
+
// { parent: "TURKEY", value: "ELAZIG", text: "Elazığ", code: "23" },
|
|
5957
|
+
// { parent: "TURKEY", value: "ERZINCAN", text: "Erzincan", code: "24" },
|
|
5958
|
+
// { parent: "TURKEY", value: "ERZURUM", text: "Erzurum", code: "25" },
|
|
5959
|
+
{ parent: "TURKEY", value: "ESKISEHIR", text: "Eski\u015Fehir", code: "26" },
|
|
5960
|
+
{ parent: "TURKEY", value: "GAZIANTEP", text: "Gaziantep", code: "27" },
|
|
5961
|
+
// { parent: "TURKEY", value: "GIRESUN", text: "Giresun", code: "28" },
|
|
5962
|
+
// { parent: "TURKEY", value: "GUMUSHANE", text: "Gümüşhane", code: "29" },
|
|
5963
|
+
// { parent: "TURKEY", value: "HAKKARI", text: "Hakkari", code: "30" },
|
|
5964
|
+
// { parent: "TURKEY", value: "HATAY", text: "Hatay", code: "31" },
|
|
5965
|
+
// { parent: "TURKEY", value: "ISPARTA", text: "Isparta", code: "32" },
|
|
5966
|
+
{ parent: "TURKEY", value: "MERSIN", text: "Mersin", code: "33" },
|
|
5967
|
+
{ parent: "TURKEY", value: "ISTANBUL", text: "\u0130stanbul", code: "34" },
|
|
5968
|
+
{ parent: "TURKEY", value: "IZMIR", text: "\u0130zmir", code: "35" }
|
|
5969
|
+
// { parent: "TURKEY", value: "KARS", text: "Kars", code: "36" },
|
|
5970
|
+
// { parent: "TURKEY", value: "KASTAMONU", text: "Kastamonu", code: "37" },
|
|
5971
|
+
// { parent: "TURKEY", value: "KAYSERI", text: "Kayseri", code: "38" },
|
|
5972
|
+
// { parent: "TURKEY", value: "KIRKLARELI", text: "Kırklareli", code: "39" },
|
|
5973
|
+
// { parent: "TURKEY", value: "KIRSEHIR", text: "Kırşehir", code: "40" },
|
|
5974
|
+
// { parent: "TURKEY", value: "KOCAELI", text: "Kocaeli", code: "41" },
|
|
5975
|
+
// { parent: "TURKEY", value: "KONYA", text: "Konya", code: "42" },
|
|
5976
|
+
// { parent: "TURKEY", value: "KUTAHYA", text: "Kütahya", code: "43" },
|
|
5977
|
+
// { parent: "TURKEY", value: "MALATYA", text: "Malatya", code: "44" },
|
|
5978
|
+
// { parent: "TURKEY", value: "MANISA", text: "Manisa", code: "45" },
|
|
5979
|
+
// {
|
|
5980
|
+
// parent: "TURKEY",
|
|
5981
|
+
// value: "KAHRAMANMARAS",
|
|
5982
|
+
// text: "Kahramanmaraş",
|
|
5983
|
+
// code: "46",
|
|
5984
|
+
// },
|
|
5985
|
+
// { parent: "TURKEY", value: "MARDIN", text: "Mardin", code: "47" },
|
|
5986
|
+
// { parent: "TURKEY", value: "MUGLA", text: "Muğla", code: "48" },
|
|
5987
|
+
// { parent: "TURKEY", value: "MUS", text: "Muş", code: "49" },
|
|
5988
|
+
// { parent: "TURKEY", value: "NEVSEHIR", text: "Nevşehir", code: "50" },
|
|
5989
|
+
// { parent: "TURKEY", value: "NIGDE", text: "Niğde", code: "51" },
|
|
5990
|
+
// { parent: "TURKEY", value: "ORDU", text: "Ordu", code: "52" },
|
|
5991
|
+
// { parent: "TURKEY", value: "RIZE", text: "Rize", code: "53" },
|
|
5992
|
+
// { parent: "TURKEY", value: "SAKARYA", text: "Sakarya", code: "54" },
|
|
5993
|
+
// { parent: "TURKEY", value: "SAMSUN", text: "Samsun", code: "55" },
|
|
5994
|
+
// { parent: "TURKEY", value: "SIIRT", text: "Siirt", code: "56" },
|
|
5995
|
+
// { parent: "TURKEY", value: "SINOP", text: "Sinop", code: "57" },
|
|
5996
|
+
// { parent: "TURKEY", value: "SIVAS", text: "Sivas", code: "58" },
|
|
5997
|
+
// { parent: "TURKEY", value: "TEKIRDAG", text: "Tekirdağ", code: "59" },
|
|
5998
|
+
// { parent: "TURKEY", value: "TOKAT", text: "Tokat", code: "60" },
|
|
5999
|
+
// { parent: "TURKEY", value: "TRABZON", text: "Trabzon", code: "61" },
|
|
6000
|
+
// { parent: "TURKEY", value: "TUNCELI", text: "Tunceli", code: "62" },
|
|
6001
|
+
// { parent: "TURKEY", value: "SANLIURFA", text: "Şanlıurfa", code: "63" },
|
|
6002
|
+
// { parent: "TURKEY", value: "USAK", text: "Uşak", code: "64" },
|
|
6003
|
+
// { parent: "TURKEY", value: "VAN", text: "Van", code: "65" },
|
|
6004
|
+
// { parent: "TURKEY", value: "YOZGAT", text: "Yozgat", code: "66" },
|
|
6005
|
+
// { parent: "TURKEY", value: "ZONGULDAK", text: "Zonguldak", code: "67" },
|
|
6006
|
+
// { parent: "TURKEY", value: "AKSARAY", text: "Aksaray", code: "68" },
|
|
6007
|
+
// { parent: "TURKEY", value: "BAYBURT", text: "Bayburt", code: "69" },
|
|
6008
|
+
// { parent: "TURKEY", value: "KARAMAN", text: "Karaman", code: "70" },
|
|
6009
|
+
// { parent: "TURKEY", value: "KIRIKKALE", text: "Kırıkkale", code: "71" },
|
|
6010
|
+
// { parent: "TURKEY", value: "BATMAN", text: "Batman", code: "72" },
|
|
6011
|
+
// { parent: "TURKEY", value: "SIRNAK", text: "Şırnak", code: "73" },
|
|
6012
|
+
// { parent: "TURKEY", value: "BARTIN", text: "Bartın", code: "74" },
|
|
6013
|
+
// { parent: "TURKEY", value: "ARDAHAN", text: "Ardahan", code: "75" },
|
|
6014
|
+
// { parent: "TURKEY", value: "IGDIR", text: "Iğdır", code: "76" },
|
|
6015
|
+
// { parent: "TURKEY", value: "YALOVA", text: "Yalova", code: "77" },
|
|
6016
|
+
// { parent: "TURKEY", value: "KARABUK", text: "Karabük", code: "78" },
|
|
6017
|
+
// { parent: "TURKEY", value: "KILIS", text: "Kilis", code: "79" },
|
|
6018
|
+
// { parent: "TURKEY", value: "OSMANIYE", text: "Osmaniye", code: "80" },
|
|
6019
|
+
// { parent: "TURKEY", value: "Düzce", text: "Düzce", code: "81" },
|
|
6020
|
+
];
|
|
6021
|
+
};
|
|
6022
|
+
var retrievePhoneNumberAreaCodeList = () => {
|
|
6023
|
+
return [
|
|
6024
|
+
{
|
|
6025
|
+
parent: "UNITED_STATES",
|
|
6026
|
+
value: "+1",
|
|
6027
|
+
text: "+1"
|
|
6028
|
+
},
|
|
6029
|
+
{
|
|
6030
|
+
parent: "GERMANY",
|
|
6031
|
+
value: "+49",
|
|
6032
|
+
text: "+49"
|
|
6033
|
+
},
|
|
6034
|
+
{
|
|
6035
|
+
parent: "TURKEY",
|
|
6036
|
+
value: "+90",
|
|
6037
|
+
text: "+90"
|
|
6038
|
+
}
|
|
6039
|
+
];
|
|
6040
|
+
};
|
|
6041
|
+
var retrieveInstitutionTypeOptionList = () => {
|
|
6042
|
+
return [
|
|
6043
|
+
{
|
|
6044
|
+
value: "WEST_PRIMARY",
|
|
6045
|
+
text: i18n_default.t("WEST_PRIMARY")
|
|
6046
|
+
},
|
|
6047
|
+
{
|
|
6048
|
+
value: "EAST_PRIMARY",
|
|
6049
|
+
text: i18n_default.t("EAST_PRIMARY")
|
|
6050
|
+
},
|
|
6051
|
+
{
|
|
6052
|
+
value: "EAST_SECONDARY",
|
|
6053
|
+
text: i18n_default.t("EAST_SECONDARY")
|
|
6054
|
+
},
|
|
6055
|
+
{
|
|
6056
|
+
value: "HIGH_SCHOOL",
|
|
6057
|
+
text: i18n_default.t("HIGH_SCHOOL")
|
|
6058
|
+
},
|
|
6059
|
+
{
|
|
6060
|
+
value: "COLLEGE",
|
|
6061
|
+
text: i18n_default.t("COLLEGE")
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
value: "PRIVATE_TRAINING",
|
|
6065
|
+
text: i18n_default.t("PRIVATE_TRAINING")
|
|
6066
|
+
},
|
|
6067
|
+
{
|
|
6068
|
+
value: "PRIVATE_LESSON",
|
|
6069
|
+
text: i18n_default.t("PRIVATE_LESSON")
|
|
6070
|
+
},
|
|
6071
|
+
{
|
|
6072
|
+
value: "COURSE",
|
|
6073
|
+
text: i18n_default.t("COURSE")
|
|
6074
|
+
},
|
|
6075
|
+
{
|
|
6076
|
+
value: "COMPANY",
|
|
6077
|
+
text: i18n_default.t("COMPANY")
|
|
6078
|
+
},
|
|
6079
|
+
{
|
|
6080
|
+
value: "ORGANIZATION",
|
|
6081
|
+
text: i18n_default.t("ORGANIZATION")
|
|
6082
|
+
}
|
|
6083
|
+
];
|
|
6084
|
+
};
|
|
6085
|
+
var retrieveGradeLevelOptionList = () => {
|
|
6086
|
+
return [
|
|
6087
|
+
{
|
|
6088
|
+
value: 0,
|
|
6089
|
+
text: i18n_default.t("other")
|
|
6090
|
+
},
|
|
6091
|
+
{
|
|
6092
|
+
value: 1,
|
|
6093
|
+
text: i18n_default.t("1")
|
|
6094
|
+
},
|
|
6095
|
+
{
|
|
6096
|
+
value: 2,
|
|
6097
|
+
text: i18n_default.t("2")
|
|
6098
|
+
},
|
|
6099
|
+
{
|
|
6100
|
+
value: 3,
|
|
6101
|
+
text: i18n_default.t("3")
|
|
6102
|
+
},
|
|
6103
|
+
{
|
|
6104
|
+
value: 4,
|
|
6105
|
+
text: i18n_default.t("4")
|
|
6106
|
+
},
|
|
6107
|
+
{
|
|
6108
|
+
value: 5,
|
|
6109
|
+
text: i18n_default.t("5")
|
|
6110
|
+
},
|
|
6111
|
+
{
|
|
6112
|
+
value: 6,
|
|
6113
|
+
text: i18n_default.t("6")
|
|
6114
|
+
},
|
|
6115
|
+
{
|
|
6116
|
+
value: 7,
|
|
6117
|
+
text: i18n_default.t("7")
|
|
6118
|
+
},
|
|
6119
|
+
{
|
|
6120
|
+
value: 8,
|
|
6121
|
+
text: i18n_default.t("8")
|
|
6122
|
+
},
|
|
6123
|
+
{
|
|
6124
|
+
value: 9,
|
|
6125
|
+
text: i18n_default.t("9")
|
|
6126
|
+
},
|
|
6127
|
+
{
|
|
6128
|
+
value: 10,
|
|
6129
|
+
text: i18n_default.t("10")
|
|
6130
|
+
},
|
|
6131
|
+
{
|
|
6132
|
+
value: 11,
|
|
6133
|
+
text: i18n_default.t("11")
|
|
6134
|
+
},
|
|
6135
|
+
{
|
|
6136
|
+
value: 12,
|
|
6137
|
+
text: i18n_default.t("12")
|
|
6138
|
+
}
|
|
6139
|
+
];
|
|
6140
|
+
};
|
|
6141
|
+
var constructUserProfileQueryParams = (userProfile, userProfileBrand) => {
|
|
6142
|
+
let queryParams;
|
|
6143
|
+
if (userProfile.branchDTOList.length > 0) {
|
|
6144
|
+
queryParams = __spreadProps(__spreadValues({}, queryParams), {
|
|
6145
|
+
branchIdList: userProfile.branchDTOList.map(
|
|
6146
|
+
(branchDTO) => branchDTO.id
|
|
6147
|
+
)
|
|
6148
|
+
});
|
|
6149
|
+
} else if (userProfile.gradeDTOList.length > 0) {
|
|
6150
|
+
queryParams = __spreadProps(__spreadValues({}, queryParams), {
|
|
6151
|
+
gradeIdList: userProfile.gradeDTOList.map((gradeDTO) => gradeDTO.id)
|
|
6152
|
+
});
|
|
6153
|
+
} else if (userProfile.seasonDTOList.length > 0) {
|
|
6154
|
+
queryParams = __spreadProps(__spreadValues({}, queryParams), {
|
|
6155
|
+
seasonIdList: userProfile.seasonDTOList.map(
|
|
6156
|
+
(seasonDTO) => seasonDTO.id
|
|
6157
|
+
)
|
|
6158
|
+
});
|
|
6159
|
+
} else if (userProfile.institutionDTOList.length > 0) {
|
|
6160
|
+
queryParams = __spreadProps(__spreadValues({}, queryParams), {
|
|
6161
|
+
institutionIdList: userProfile.institutionDTOList.map(
|
|
6162
|
+
(institutionDTO) => institutionDTO.id
|
|
6163
|
+
)
|
|
6164
|
+
});
|
|
6165
|
+
} else if (userProfile.campusDTOList.length > 0) {
|
|
6166
|
+
queryParams = __spreadProps(__spreadValues({}, queryParams), {
|
|
6167
|
+
campusIdList: userProfile.campusDTOList.map(
|
|
6168
|
+
(campusDTO) => campusDTO.id
|
|
6169
|
+
)
|
|
6170
|
+
});
|
|
6171
|
+
} else if (userProfile.brandDTOList.length > 0) {
|
|
6172
|
+
queryParams = __spreadProps(__spreadValues({}, queryParams), {
|
|
6173
|
+
brandIdList: [userProfileBrand.id]
|
|
6174
|
+
});
|
|
6175
|
+
}
|
|
6176
|
+
queryParams.deleted = false;
|
|
6177
|
+
return queryParams;
|
|
6178
|
+
};
|
|
6179
|
+
var retrieveCoterieTypeOptionList = () => {
|
|
6180
|
+
return [
|
|
6181
|
+
{
|
|
6182
|
+
text: i18n_default.t("MANAGEMENT"),
|
|
6183
|
+
value: "MANAGEMENT",
|
|
6184
|
+
includes: [
|
|
6185
|
+
"WEST_PRIMARY",
|
|
6186
|
+
"EAST_PRIMARY",
|
|
6187
|
+
"EAST_SECONDARY",
|
|
6188
|
+
"COLLEGE",
|
|
6189
|
+
"HIGH_SCHOOL",
|
|
6190
|
+
"COURSE"
|
|
6191
|
+
]
|
|
6192
|
+
},
|
|
6193
|
+
{
|
|
6194
|
+
text: i18n_default.t("TURKISH"),
|
|
6195
|
+
value: "TURKISH",
|
|
6196
|
+
includes: [
|
|
6197
|
+
"WEST_PRIMARY",
|
|
6198
|
+
"EAST_PRIMARY",
|
|
6199
|
+
"EAST_SECONDARY",
|
|
6200
|
+
"COLLEGE",
|
|
6201
|
+
"HIGH_SCHOOL",
|
|
6202
|
+
"COURSE"
|
|
6203
|
+
]
|
|
6204
|
+
},
|
|
6205
|
+
{
|
|
6206
|
+
text: i18n_default.t("HISTORY"),
|
|
6207
|
+
value: "HISTORY",
|
|
6208
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6209
|
+
},
|
|
6210
|
+
{
|
|
6211
|
+
text: i18n_default.t("MATHEMATICS"),
|
|
6212
|
+
value: "MATHEMATICS",
|
|
6213
|
+
includes: [
|
|
6214
|
+
"WEST_PRIMARY",
|
|
6215
|
+
"EAST_PRIMARY",
|
|
6216
|
+
"EAST_SECONDARY",
|
|
6217
|
+
"COLLEGE",
|
|
6218
|
+
"HIGH_SCHOOL",
|
|
6219
|
+
"COURSE"
|
|
6220
|
+
]
|
|
6221
|
+
},
|
|
6222
|
+
{
|
|
6223
|
+
text: i18n_default.t("BIOLOGY"),
|
|
6224
|
+
value: "BIOLOGY",
|
|
6225
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6226
|
+
},
|
|
6227
|
+
{
|
|
6228
|
+
text: i18n_default.t("LITERATURE"),
|
|
6229
|
+
value: "LITERATURE",
|
|
6230
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6231
|
+
},
|
|
6232
|
+
{
|
|
6233
|
+
text: i18n_default.t("GEOGRAPHY"),
|
|
6234
|
+
value: "GEOGRAPHY",
|
|
6235
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6236
|
+
},
|
|
6237
|
+
{
|
|
6238
|
+
text: i18n_default.t("ENGLISH"),
|
|
6239
|
+
value: "ENGLISH",
|
|
6240
|
+
includes: [
|
|
6241
|
+
"WEST_PRIMARY",
|
|
6242
|
+
"EAST_PRIMARY",
|
|
6243
|
+
"EAST_SECONDARY",
|
|
6244
|
+
"COLLEGE",
|
|
6245
|
+
"HIGH_SCHOOL",
|
|
6246
|
+
"COURSE"
|
|
6247
|
+
]
|
|
6248
|
+
},
|
|
6249
|
+
{
|
|
6250
|
+
text: i18n_default.t("PHYSICS"),
|
|
6251
|
+
value: "PHYSICS",
|
|
6252
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6253
|
+
},
|
|
6254
|
+
{
|
|
6255
|
+
text: i18n_default.t("CHEMISTRY"),
|
|
6256
|
+
value: "CHEMISTRY",
|
|
6257
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6258
|
+
},
|
|
6259
|
+
{
|
|
6260
|
+
text: i18n_default.t("PHILOSOPHY"),
|
|
6261
|
+
value: "PHILOSOPHY",
|
|
6262
|
+
includes: ["COLLEGE", "HIGH_SCHOOL", "COURSE"]
|
|
6263
|
+
},
|
|
6264
|
+
{
|
|
6265
|
+
text: i18n_default.t("PHYSICAL_EDUCATION"),
|
|
6266
|
+
value: "PHYSICAL_EDUCATION",
|
|
6267
|
+
includes: [
|
|
6268
|
+
"WEST_PRIMARY",
|
|
6269
|
+
"EAST_PRIMARY",
|
|
6270
|
+
"EAST_SECONDARY",
|
|
6271
|
+
"COLLEGE",
|
|
6272
|
+
"HIGH_SCHOOL",
|
|
6273
|
+
"COURSE"
|
|
6274
|
+
]
|
|
6275
|
+
},
|
|
6276
|
+
{
|
|
6277
|
+
text: i18n_default.t("SOCIAL_STUDIES"),
|
|
6278
|
+
value: "SOCIAL_STUDIES",
|
|
6279
|
+
includes: [
|
|
6280
|
+
"WEST_PRIMARY",
|
|
6281
|
+
"EAST_PRIMARY",
|
|
6282
|
+
"EAST_SECONDARY",
|
|
6283
|
+
"COLLEGE",
|
|
6284
|
+
"COURSE"
|
|
6285
|
+
]
|
|
6286
|
+
},
|
|
6287
|
+
{
|
|
6288
|
+
text: i18n_default.t("SCIENCE"),
|
|
6289
|
+
value: "SCIENCE",
|
|
6290
|
+
includes: [
|
|
6291
|
+
"WEST_PRIMARY",
|
|
6292
|
+
"EAST_PRIMARY",
|
|
6293
|
+
"EAST_SECONDARY",
|
|
6294
|
+
"COLLEGE",
|
|
6295
|
+
"COURSE"
|
|
6296
|
+
]
|
|
6297
|
+
},
|
|
6298
|
+
{
|
|
6299
|
+
text: i18n_default.t("LIFE_STUDIES"),
|
|
6300
|
+
value: "LIFE_STUDIES",
|
|
6301
|
+
includes: ["WEST_PRIMARY", "EAST_PRIMARY", "COLLEGE", "COURSE"]
|
|
6302
|
+
},
|
|
6303
|
+
{
|
|
6304
|
+
text: i18n_default.t("CULTURE_AND_RELIGION_KNOWLEDGE"),
|
|
6305
|
+
value: "CULTURE_AND_RELIGION_KNOWLEDGE",
|
|
6306
|
+
includes: [
|
|
6307
|
+
"WEST_PRIMARY",
|
|
6308
|
+
"EAST_PRIMARY",
|
|
6309
|
+
"EAST_SECONDARY",
|
|
6310
|
+
"COLLEGE",
|
|
6311
|
+
"HIGH_SCHOOL",
|
|
6312
|
+
"COURSE"
|
|
6313
|
+
]
|
|
6314
|
+
},
|
|
6315
|
+
{
|
|
6316
|
+
text: i18n_default.t("TRAFFIC_SAFETY"),
|
|
6317
|
+
value: "TRAFFIC_SAFETY",
|
|
6318
|
+
includes: ["WEST_PRIMARY", "EAST_PRIMARY", "COLLEGE", "COURSE"]
|
|
6319
|
+
},
|
|
6320
|
+
{
|
|
6321
|
+
text: i18n_default.t("GENERAL_CULTURE"),
|
|
6322
|
+
value: "GENERAL_CULTURE",
|
|
6323
|
+
includes: [
|
|
6324
|
+
"WEST_PRIMARY",
|
|
6325
|
+
"EAST_PRIMARY",
|
|
6326
|
+
"EAST_SECONDARY",
|
|
6327
|
+
"COLLEGE",
|
|
6328
|
+
"HIGH_SCHOOL",
|
|
6329
|
+
"COURSE"
|
|
6330
|
+
]
|
|
6331
|
+
}
|
|
6332
|
+
];
|
|
6333
|
+
};
|
|
6334
|
+
var retrieveUserAuthorityGeneralOptionList = () => {
|
|
6335
|
+
return [
|
|
6336
|
+
{ text: i18n_default.t("all"), value: "" },
|
|
6337
|
+
{ text: i18n_default.t("user"), value: "USER" },
|
|
6338
|
+
{ text: i18n_default.t("activity"), value: "ACTIVITY" },
|
|
6339
|
+
{ text: i18n_default.t("catchtivity"), value: "CATCHTIVITY" },
|
|
6340
|
+
{ text: i18n_default.t("catchxam"), value: "CATCHXAM" },
|
|
6341
|
+
{ text: i18n_default.t("label"), value: "LABEL" },
|
|
6342
|
+
{ text: i18n_default.t("announcement"), value: "NOTIFICATION" },
|
|
6343
|
+
{ text: i18n_default.t("report"), value: "REPORT" },
|
|
6344
|
+
{ text: i18n_default.t("category"), value: "CATEGORY" },
|
|
6345
|
+
{ text: i18n_default.t("library"), value: "STORAGE_FILE" },
|
|
6346
|
+
{ text: i18n_default.t("brand"), value: "BRAND" },
|
|
6347
|
+
{ text: i18n_default.t("region"), value: "REGION" },
|
|
6348
|
+
{ text: i18n_default.t("campus"), value: "CAMPUS" },
|
|
6349
|
+
{ text: i18n_default.t("institution"), value: "INSTITUTION" },
|
|
6350
|
+
{ text: i18n_default.t("season"), value: "SEASON" },
|
|
6351
|
+
{ text: i18n_default.t("grade"), value: "GRADE" },
|
|
6352
|
+
{ text: i18n_default.t("branch"), value: "BRANCH" },
|
|
6353
|
+
{ text: i18n_default.t("plan"), value: "PLAN" },
|
|
6354
|
+
{ text: i18n_default.t("standard_exam"), value: "STANDARD_EXAM" },
|
|
6355
|
+
{ text: i18n_default.t("etude"), value: "ETUDE" }
|
|
6356
|
+
];
|
|
6357
|
+
};
|
|
6358
|
+
var filterGradeLevelOptionList = (institutionDTO, gradeDTO) => {
|
|
6359
|
+
if (gradeDTO) {
|
|
6360
|
+
return retrieveGradeLevelOptionList().filter(
|
|
6361
|
+
(gradeLevel) => parseFloat(gradeLevel.value) === gradeDTO.level
|
|
6362
|
+
);
|
|
6363
|
+
}
|
|
6364
|
+
if (institutionDTO) {
|
|
6365
|
+
const { type } = institutionDTO;
|
|
6366
|
+
if (type === "WEST_PRIMARY") {
|
|
6367
|
+
return retrieveGradeLevelOptionList().filter(
|
|
6368
|
+
(gradeLevel) => parseFloat(gradeLevel.value) <= 8
|
|
6369
|
+
);
|
|
6370
|
+
} else if (type === "EAST_PRIMARY") {
|
|
6371
|
+
return retrieveGradeLevelOptionList().filter(
|
|
6372
|
+
(gradeLevel) => parseFloat(gradeLevel.value) <= 4
|
|
6373
|
+
);
|
|
6374
|
+
} else if (type === "EAST_SECONDARY") {
|
|
6375
|
+
return retrieveGradeLevelOptionList().filter(
|
|
6376
|
+
(gradeLevel) => parseFloat(gradeLevel.value) > 4 && parseFloat(gradeLevel.value) <= 8
|
|
6377
|
+
);
|
|
6378
|
+
} else if (type === "HIGH_SCHOOL") {
|
|
6379
|
+
return retrieveGradeLevelOptionList().filter(
|
|
6380
|
+
(gradeLevel) => parseFloat(gradeLevel.value) > 8
|
|
6381
|
+
);
|
|
6382
|
+
} else if (type === "COLLEGE" || type === "PRIVATE_TRAINING" || type === "PRIVATE_LESSON" || type === "COURSE") {
|
|
6383
|
+
return retrieveGradeLevelOptionList();
|
|
6384
|
+
} else {
|
|
6385
|
+
return [];
|
|
6386
|
+
}
|
|
6387
|
+
}
|
|
6388
|
+
return retrieveGradeLevelOptionList();
|
|
6389
|
+
};
|
|
6390
|
+
var filterCoterieTypeOptionList = (userInformation, userProfile, userProfileInstitution) => {
|
|
6391
|
+
if (userInformation.accountType === "GENIXO") {
|
|
6392
|
+
return retrieveCoterieTypeOptionList().sort(
|
|
6393
|
+
(a, b) => a.text.localeCompare(b.text)
|
|
6394
|
+
);
|
|
6395
|
+
}
|
|
6396
|
+
if (userProfile.role === "STAFF" || userProfile.role === "CONTENT_CREATOR") {
|
|
6397
|
+
if (userProfile.coterieType === "MANAGEMENT") {
|
|
6398
|
+
if (userProfileInstitution) {
|
|
6399
|
+
return retrieveCoterieTypeOptionList().filter(
|
|
6400
|
+
(coterieTypeOption) => coterieTypeOption.includes.includes(userProfileInstitution.type)
|
|
6401
|
+
).sort((a, b) => a.text.localeCompare(b.text));
|
|
6402
|
+
} else {
|
|
6403
|
+
return retrieveCoterieTypeOptionList().sort(
|
|
6404
|
+
(a, b) => a.text.localeCompare(b.text)
|
|
6405
|
+
);
|
|
6406
|
+
}
|
|
6407
|
+
} else {
|
|
6408
|
+
return retrieveCoterieTypeOptionList().filter(
|
|
6409
|
+
(coterieTypeOption) => coterieTypeOption.value === userProfile.coterieType
|
|
6410
|
+
).sort((a, b) => a.text.localeCompare(b.text));
|
|
6411
|
+
}
|
|
6412
|
+
} else if (userProfile.role === "INDIVIDUAL") {
|
|
6413
|
+
const individualCoterieTypeOptionList = [];
|
|
6414
|
+
const coterieTypeOptionList = retrieveCoterieTypeOptionList();
|
|
6415
|
+
userProfile.coterieTypeList.forEach((coterieType) => {
|
|
6416
|
+
const foundCoterieTypeOption = coterieTypeOptionList.find(
|
|
6417
|
+
(coterieTypeOption) => coterieTypeOption.value === coterieType
|
|
6418
|
+
);
|
|
6419
|
+
if (foundCoterieTypeOption) {
|
|
6420
|
+
individualCoterieTypeOptionList.push(foundCoterieTypeOption);
|
|
6421
|
+
}
|
|
6422
|
+
});
|
|
6423
|
+
return individualCoterieTypeOptionList;
|
|
6424
|
+
}
|
|
6425
|
+
return [];
|
|
6426
|
+
};
|
|
6427
|
+
var findAISettingsFromCurrentProfile = (userProfileBrand, userProfileCampus, userProfileInstitution) => {
|
|
6428
|
+
if (userProfileInstitution) {
|
|
6429
|
+
const { institutionSettingsDTO } = userProfileInstitution;
|
|
6430
|
+
const { institutionAISettingsDTO } = institutionSettingsDTO;
|
|
6431
|
+
return institutionAISettingsDTO;
|
|
6432
|
+
} else {
|
|
6433
|
+
if (userProfileCampus) {
|
|
6434
|
+
const { campusSettingsDTO } = userProfileCampus;
|
|
6435
|
+
const { campusAISettingsDTO } = campusSettingsDTO;
|
|
6436
|
+
return campusAISettingsDTO;
|
|
6437
|
+
} else {
|
|
6438
|
+
if (userProfileBrand) {
|
|
6439
|
+
const { brandSettingsDTO } = userProfileBrand;
|
|
6440
|
+
const { brandAISettingsDTO } = brandSettingsDTO;
|
|
6441
|
+
return brandAISettingsDTO;
|
|
6442
|
+
}
|
|
6443
|
+
}
|
|
6444
|
+
}
|
|
6445
|
+
};
|
|
6446
|
+
|
|
6447
|
+
// src/utilization/CategoryUtilization.ts
|
|
6448
|
+
var retrieveCategoryVersionCodeOptionList = () => {
|
|
6449
|
+
return [
|
|
6450
|
+
{
|
|
6451
|
+
value: "MEB-IO-MAT-2024",
|
|
6452
|
+
text: i18n_default.t("MEB-IO-MAT-2024"),
|
|
6453
|
+
type: "MATHEMATICS",
|
|
6454
|
+
availableLevelList: [5]
|
|
6455
|
+
},
|
|
6456
|
+
{
|
|
6457
|
+
value: "MEB-IO-MAT-2018",
|
|
6458
|
+
text: i18n_default.t("MEB-IO-MAT-2018"),
|
|
6459
|
+
type: "MATHEMATICS",
|
|
6460
|
+
availableLevelList: [4, 6, 7, 8]
|
|
6461
|
+
},
|
|
6462
|
+
{
|
|
6463
|
+
value: "MEB-IO-TUR-2024",
|
|
6464
|
+
text: i18n_default.t("MEB-IO-TUR-2024"),
|
|
6465
|
+
type: "TURKISH",
|
|
6466
|
+
availableLevelList: [5]
|
|
6467
|
+
},
|
|
6468
|
+
{
|
|
6469
|
+
value: "MEB-IO-TUR-2019",
|
|
6470
|
+
text: i18n_default.t("MEB-IO-TUR-2019"),
|
|
6471
|
+
type: "TURKISH",
|
|
6472
|
+
availableLevelList: [4, 6, 7, 8]
|
|
6473
|
+
},
|
|
6474
|
+
{
|
|
6475
|
+
value: "MEB-IO-HAY-2018",
|
|
6476
|
+
text: i18n_default.t("MEB-IO-HAY-2018"),
|
|
6477
|
+
type: "LIFE_STUDIES",
|
|
6478
|
+
availableLevelList: [3]
|
|
6479
|
+
},
|
|
6480
|
+
{
|
|
6481
|
+
value: "MEB-IO-TRAF-2018",
|
|
6482
|
+
text: i18n_default.t("MEB-IO-TRAF-2018"),
|
|
6483
|
+
type: "TRAFFIC_SAFETY",
|
|
6484
|
+
availableLevelList: [4]
|
|
6485
|
+
},
|
|
6486
|
+
{
|
|
6487
|
+
value: "MEB-IO-FEN-2024",
|
|
6488
|
+
text: i18n_default.t("MEB-IO-FEN-2024"),
|
|
6489
|
+
type: "SCIENCE",
|
|
6490
|
+
availableLevelList: [5]
|
|
6491
|
+
},
|
|
6492
|
+
{
|
|
6493
|
+
value: "MEB-IO-SCI-2018",
|
|
6494
|
+
text: i18n_default.t("MEB-IO-SCI-2018"),
|
|
6495
|
+
type: "SCIENCE",
|
|
6496
|
+
availableLevelList: [4, 6, 7, 8]
|
|
6497
|
+
},
|
|
6498
|
+
{
|
|
6499
|
+
value: "MEB-IO-SOS-2024",
|
|
6500
|
+
text: i18n_default.t("MEB-IO-SOS-2024"),
|
|
6501
|
+
type: "SOCIAL_STUDIES",
|
|
6502
|
+
availableLevelList: [5]
|
|
6503
|
+
},
|
|
6504
|
+
{
|
|
6505
|
+
value: "MEB-IO-SOS-2018",
|
|
6506
|
+
text: i18n_default.t("MEB-IO-SOS-2018"),
|
|
6507
|
+
type: "SOCIAL_STUDIES",
|
|
6508
|
+
availableLevelList: [4, 6, 7]
|
|
6509
|
+
},
|
|
6510
|
+
{
|
|
6511
|
+
value: "MEB-IO-ITA-2018",
|
|
6512
|
+
text: i18n_default.t("MEB-IO-ITA-2018"),
|
|
6513
|
+
type: "SOCIAL_STUDIES",
|
|
6514
|
+
availableLevelList: [8]
|
|
6515
|
+
},
|
|
6516
|
+
{
|
|
6517
|
+
value: "MEB-IO-ENG-2018",
|
|
6518
|
+
text: i18n_default.t("MEB-IO-ENG-2018"),
|
|
6519
|
+
type: "ENGLISH",
|
|
6520
|
+
availableLevelList: [4, 5, 6, 7, 8]
|
|
6521
|
+
},
|
|
6522
|
+
{
|
|
6523
|
+
value: "MEB-AL-MAT-2024",
|
|
6524
|
+
text: i18n_default.t("MEB-AL-MAT-2024"),
|
|
6525
|
+
type: "MATHEMATICS",
|
|
6526
|
+
availableLevelList: [9]
|
|
6527
|
+
},
|
|
6528
|
+
{
|
|
6529
|
+
value: "MEB-AL-MAT-2018",
|
|
6530
|
+
text: i18n_default.t("MEB-AL-MAT-2018"),
|
|
6531
|
+
type: "MATHEMATICS",
|
|
6532
|
+
availableLevelList: [10, 11, 12]
|
|
6533
|
+
},
|
|
6534
|
+
{
|
|
6535
|
+
value: "MEB-AL-F\u0130Z-2024",
|
|
6536
|
+
text: i18n_default.t("MEB-AL-F\u0130Z-2024"),
|
|
6537
|
+
type: "PHYSICS",
|
|
6538
|
+
availableLevelList: [9]
|
|
6539
|
+
},
|
|
6540
|
+
{
|
|
6541
|
+
value: "MEB-AL-FIZ-2018",
|
|
6542
|
+
text: i18n_default.t("MEB-AL-FIZ-2018"),
|
|
6543
|
+
type: "PHYSICS",
|
|
6544
|
+
availableLevelList: [10, 11, 12]
|
|
6545
|
+
},
|
|
6546
|
+
{
|
|
6547
|
+
value: "MEB-AL-B\u0130Y-2024",
|
|
6548
|
+
text: i18n_default.t("MEB-AL-B\u0130Y-2024"),
|
|
6549
|
+
type: "BIOLOGY",
|
|
6550
|
+
availableLevelList: [9]
|
|
6551
|
+
},
|
|
6552
|
+
{
|
|
6553
|
+
value: "MEB-AL-BIO-2018",
|
|
6554
|
+
text: i18n_default.t("MEB-AL-BIO-2018"),
|
|
6555
|
+
type: "BIOLOGY",
|
|
6556
|
+
availableLevelList: [10, 11, 12]
|
|
6557
|
+
},
|
|
6558
|
+
{
|
|
6559
|
+
value: "MEB-AL-K\u0130M-2024",
|
|
6560
|
+
text: i18n_default.t("MEB-AL-K\u0130M-2024"),
|
|
6561
|
+
type: "CHEMISTRY",
|
|
6562
|
+
availableLevelList: [9]
|
|
6563
|
+
},
|
|
6564
|
+
{
|
|
6565
|
+
value: "MEB-AL-KIM-2018",
|
|
6566
|
+
text: i18n_default.t("MEB-AL-KIM-2018"),
|
|
6567
|
+
type: "CHEMISTRY",
|
|
6568
|
+
availableLevelList: [10, 11, 12]
|
|
6569
|
+
},
|
|
6570
|
+
{
|
|
6571
|
+
value: "MEB-AL-TAR-2024",
|
|
6572
|
+
text: i18n_default.t("MEB-AL-TAR-2024"),
|
|
6573
|
+
type: "HISTORY",
|
|
6574
|
+
availableLevelList: [9]
|
|
6575
|
+
},
|
|
6576
|
+
{
|
|
6577
|
+
value: "MEB-AL-TAR-2018",
|
|
6578
|
+
text: i18n_default.t("MEB-AL-TAR-2018"),
|
|
6579
|
+
type: "HISTORY",
|
|
6580
|
+
availableLevelList: [10, 11]
|
|
6581
|
+
},
|
|
6582
|
+
{
|
|
6583
|
+
value: "MEB-AL-ITA-2018",
|
|
6584
|
+
text: i18n_default.t("MEB-AL-ITA-2018"),
|
|
6585
|
+
type: "HISTORY",
|
|
6586
|
+
availableLevelList: [12]
|
|
6587
|
+
},
|
|
6588
|
+
{
|
|
6589
|
+
value: "MEB-AL-CO\u011E-2024",
|
|
6590
|
+
text: i18n_default.t("MEB-AL-CO\u011E-2024"),
|
|
6591
|
+
type: "GEOGRAPHY",
|
|
6592
|
+
availableLevelList: [9]
|
|
6593
|
+
},
|
|
6594
|
+
{
|
|
6595
|
+
value: "MEB-AL-CO\u011E-2018",
|
|
6596
|
+
text: i18n_default.t("MEB-AL-CO\u011E-2018"),
|
|
6597
|
+
type: "GEOGRAPHY",
|
|
6598
|
+
availableLevelList: [10, 11, 12]
|
|
6599
|
+
},
|
|
6600
|
+
{
|
|
6601
|
+
value: "MEB-IO-DKAB-2018",
|
|
6602
|
+
text: i18n_default.t("MEB-IO-DKAB-2018"),
|
|
6603
|
+
type: "CULTURE_AND_RELIGION_KNOWLEDGE",
|
|
6604
|
+
availableLevelList: [4, 5, 6, 7, 8]
|
|
6605
|
+
},
|
|
6606
|
+
{
|
|
6607
|
+
value: "MEB-AL-DKAB-2018",
|
|
6608
|
+
text: i18n_default.t("MEB-AL-DKAB-2018"),
|
|
6609
|
+
type: "CULTURE_AND_RELIGION_KNOWLEDGE",
|
|
6610
|
+
availableLevelList: [9, 10, 11, 12]
|
|
6611
|
+
},
|
|
6612
|
+
{
|
|
6613
|
+
value: "MEB-AL-FEL-2018",
|
|
6614
|
+
text: i18n_default.t("MEB-AL-FEL-2018"),
|
|
6615
|
+
type: "PHILOSOPHY",
|
|
6616
|
+
availableLevelList: [10, 11]
|
|
6617
|
+
},
|
|
6618
|
+
{
|
|
6619
|
+
value: "MEB-AL-TDE-2024",
|
|
6620
|
+
text: i18n_default.t("MEB-AL-TDE-2024"),
|
|
6621
|
+
type: "LITERATURE",
|
|
6622
|
+
availableLevelList: [9]
|
|
6623
|
+
},
|
|
6624
|
+
{
|
|
6625
|
+
value: "MEB-AL-LIT-2018",
|
|
6626
|
+
text: i18n_default.t("MEB-AL-LIT-2018"),
|
|
6627
|
+
type: "LITERATURE",
|
|
6628
|
+
availableLevelList: [10, 11, 12]
|
|
6629
|
+
},
|
|
6630
|
+
// {
|
|
6631
|
+
// value: "CEFR-STANDARDS-A1",
|
|
6632
|
+
// text: i18n.t("CEFR-STANDARDS-A1"),
|
|
6633
|
+
// type: "ENGLISH",
|
|
6634
|
+
// availableLevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
6635
|
+
// },
|
|
6636
|
+
// {
|
|
6637
|
+
// value: "CEFR-STANDARDS-A2",
|
|
6638
|
+
// text: i18n.t("CEFR-STANDARDS-A2"),
|
|
6639
|
+
// type: "ENGLISH",
|
|
6640
|
+
// availableLevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
6641
|
+
// },
|
|
6642
|
+
// {
|
|
6643
|
+
// value: "CEFR-STANDARDS-B1",
|
|
6644
|
+
// text: i18n.t("CEFR-STANDARDS-B1"),
|
|
6645
|
+
// type: "ENGLISH",
|
|
6646
|
+
// availableLevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
6647
|
+
// },
|
|
6648
|
+
// {
|
|
6649
|
+
// value: "CEFR-STANDARDS-B2",
|
|
6650
|
+
// text: i18n.t("CEFR-STANDARDS-B2"),
|
|
6651
|
+
// type: "ENGLISH",
|
|
6652
|
+
// availableLevelList: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
6653
|
+
// },
|
|
6654
|
+
{
|
|
6655
|
+
value: "GENERAL-CULTURE",
|
|
6656
|
+
text: i18n_default.t("GENERAL-CULTURE"),
|
|
6657
|
+
type: "GENERAL_CULTURE",
|
|
6658
|
+
availableLevelList: [8, 12]
|
|
6659
|
+
},
|
|
6660
|
+
{
|
|
6661
|
+
value: "SPE-TYT-TUR-2024",
|
|
6662
|
+
text: i18n_default.t("SPE-TYT-TUR-2024"),
|
|
6663
|
+
type: "TURKISH",
|
|
6664
|
+
availableLevelList: [12]
|
|
6665
|
+
},
|
|
6666
|
+
{
|
|
6667
|
+
value: "SPE-LGS-TUR-2024",
|
|
6668
|
+
text: i18n_default.t("SPE-LGS-TUR-2024"),
|
|
6669
|
+
type: "TURKISH",
|
|
6670
|
+
availableLevelList: [8]
|
|
6671
|
+
}
|
|
6672
|
+
];
|
|
6673
|
+
};
|
|
6674
|
+
var filterCategoryVersionCodeOptionList = (categoryVersionCodeOptionList, coterieType, level) => {
|
|
6675
|
+
if (coterieType && coterieType === "DEFAULT_OPTION") return [];
|
|
6676
|
+
if (level && level === "DEFAULT_OPTION") return [];
|
|
6677
|
+
let currentCategoryVersionCodeOptionList = categoryVersionCodeOptionList;
|
|
6678
|
+
if (coterieType !== "MANAGEMENT") {
|
|
6679
|
+
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
6680
|
+
(categoryVersionCode) => categoryVersionCode.type === coterieType
|
|
6681
|
+
);
|
|
6682
|
+
}
|
|
6683
|
+
if (level) {
|
|
6684
|
+
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
6685
|
+
(categoryVersionCode) => categoryVersionCode.availableLevelList.includes(level)
|
|
6686
|
+
);
|
|
6687
|
+
}
|
|
6688
|
+
return currentCategoryVersionCodeOptionList;
|
|
6689
|
+
};
|
|
6690
|
+
var filterCategoryVersionCodeOptionListByGradeDTO = (categoryVersionCodeOptionList, coterieType, gradeDTO) => {
|
|
6691
|
+
if (coterieType && coterieType === "DEFAULT_OPTION") return [];
|
|
6692
|
+
let currentCategoryVersionCodeOptionList = categoryVersionCodeOptionList;
|
|
6693
|
+
if (coterieType !== "MANAGEMENT") {
|
|
6694
|
+
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
6695
|
+
(categoryVersionCode) => categoryVersionCode.type === coterieType
|
|
6696
|
+
);
|
|
6697
|
+
}
|
|
6698
|
+
if (gradeDTO) {
|
|
6699
|
+
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
6700
|
+
(categoryVersionCodeOption) => categoryVersionCodeOption.availableLevelList.includes(gradeDTO.level)
|
|
6701
|
+
);
|
|
6702
|
+
}
|
|
6703
|
+
return currentCategoryVersionCodeOptionList;
|
|
6704
|
+
};
|
|
6705
|
+
var filterCategoryVersionCodeOptionListByInstitutionDTO = (categoryVersionCodeOptionList, coterieType, institutionDTO) => {
|
|
6706
|
+
if (coterieType && coterieType === "DEFAULT_OPTION") return [];
|
|
6707
|
+
let currentCategoryVersionCodeOptionList = categoryVersionCodeOptionList;
|
|
6708
|
+
if (coterieType !== "MANAGEMENT") {
|
|
6709
|
+
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
6710
|
+
(categoryVersionCodeOption) => categoryVersionCodeOption.type === coterieType
|
|
6711
|
+
);
|
|
6712
|
+
}
|
|
6713
|
+
if (institutionDTO) {
|
|
6714
|
+
const gradeLevelList = filterGradeLevelOptionList(institutionDTO, null).map(
|
|
6715
|
+
(option) => option.value
|
|
6716
|
+
);
|
|
6717
|
+
currentCategoryVersionCodeOptionList = currentCategoryVersionCodeOptionList.filter(
|
|
6718
|
+
(categoryVersionCodeOption) => {
|
|
6719
|
+
return gradeLevelList.find(
|
|
6720
|
+
(gradeLevel) => categoryVersionCodeOption.availableLevelList.includes(gradeLevel)
|
|
6721
|
+
) !== void 0;
|
|
6722
|
+
}
|
|
6723
|
+
);
|
|
6724
|
+
}
|
|
6725
|
+
return currentCategoryVersionCodeOptionList;
|
|
6726
|
+
};
|
|
6727
|
+
|
|
6728
|
+
// src/utilization/DateUtilization.ts
|
|
6729
|
+
var ONE_HOUR = 36e5;
|
|
6730
|
+
var ONE_DAY = 864e5;
|
|
6731
|
+
var ONE_WEEK = 6048e5;
|
|
6732
|
+
var ONE_MONTH = 24192e5;
|
|
6733
|
+
var THREE_MONTHS = 72576e5;
|
|
6734
|
+
var retrieveMonthNameByIndex = (index) => {
|
|
6735
|
+
if (index === 0) {
|
|
6736
|
+
return i18n_default.t("january");
|
|
6737
|
+
} else if (index === 1) {
|
|
6738
|
+
return i18n_default.t("february");
|
|
6739
|
+
} else if (index === 2) {
|
|
6740
|
+
return i18n_default.t("march");
|
|
6741
|
+
} else if (index === 3) {
|
|
6742
|
+
return i18n_default.t("april");
|
|
6743
|
+
} else if (index === 4) {
|
|
6744
|
+
return i18n_default.t("may");
|
|
6745
|
+
} else if (index === 5) {
|
|
6746
|
+
return i18n_default.t("june");
|
|
6747
|
+
} else if (index === 6) {
|
|
6748
|
+
return i18n_default.t("july");
|
|
6749
|
+
} else if (index === 7) {
|
|
6750
|
+
return i18n_default.t("august");
|
|
6751
|
+
} else if (index === 8) {
|
|
6752
|
+
return i18n_default.t("september");
|
|
6753
|
+
} else if (index === 9) {
|
|
6754
|
+
return i18n_default.t("october");
|
|
6755
|
+
} else if (index === 10) {
|
|
6756
|
+
return i18n_default.t("november");
|
|
6757
|
+
} else if (index === 11) {
|
|
6758
|
+
return i18n_default.t("december");
|
|
6759
|
+
}
|
|
6760
|
+
};
|
|
6761
|
+
var retrieveDateIntervalOptionList = () => {
|
|
6762
|
+
return [
|
|
6763
|
+
{
|
|
6764
|
+
value: "LAST_DAY",
|
|
6765
|
+
text: i18n_default.t("last_day")
|
|
6766
|
+
},
|
|
6767
|
+
{
|
|
6768
|
+
value: "LAST_WEEK",
|
|
6769
|
+
text: i18n_default.t("last_week")
|
|
6770
|
+
},
|
|
6771
|
+
{
|
|
6772
|
+
value: "LAST_MONTH",
|
|
6773
|
+
text: i18n_default.t("last_month")
|
|
6774
|
+
},
|
|
6775
|
+
{
|
|
6776
|
+
value: "LAST_THREE_MONTHS",
|
|
6777
|
+
text: i18n_default.t("last_three_months")
|
|
6778
|
+
}
|
|
6779
|
+
];
|
|
6780
|
+
};
|
|
6781
|
+
var constructWeekName = (beginDate, endDate) => {
|
|
6782
|
+
let currentEndDate;
|
|
6783
|
+
if (endDate) {
|
|
6784
|
+
currentEndDate = endDate;
|
|
6785
|
+
} else {
|
|
6786
|
+
currentEndDate = new Date(beginDate);
|
|
6787
|
+
currentEndDate.setDate(beginDate.getDate() + 4);
|
|
6788
|
+
}
|
|
6789
|
+
if (beginDate.getFullYear() !== currentEndDate.getFullYear()) {
|
|
6790
|
+
return `${beginDate.getDate()} ${retrieveMonthNameByIndex(
|
|
6791
|
+
beginDate.getMonth()
|
|
6792
|
+
)} ${beginDate.getFullYear()} - ${currentEndDate.getDate()} ${retrieveMonthNameByIndex(
|
|
6793
|
+
currentEndDate.getMonth()
|
|
6794
|
+
)} ${currentEndDate.getFullYear()}`;
|
|
6795
|
+
} else {
|
|
6796
|
+
if (beginDate.getMonth() !== currentEndDate.getMonth()) {
|
|
6797
|
+
return `${beginDate.getDate()} ${retrieveMonthNameByIndex(
|
|
6798
|
+
beginDate.getMonth()
|
|
6799
|
+
)} - ${currentEndDate.getDate()} ${retrieveMonthNameByIndex(
|
|
6800
|
+
currentEndDate.getMonth()
|
|
6801
|
+
)} ${currentEndDate.getFullYear()}`;
|
|
6802
|
+
} else {
|
|
6803
|
+
return `${beginDate.getDate()} - ${currentEndDate.getDate()} ${retrieveMonthNameByIndex(
|
|
6804
|
+
currentEndDate.getMonth()
|
|
6805
|
+
)} ${currentEndDate.getFullYear()}`;
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
};
|
|
6809
|
+
|
|
6810
|
+
// src/utilization/FunctionUtilization.ts
|
|
6811
|
+
var calculateLevenshteinDistance = (s, t) => {
|
|
6812
|
+
if (!s.length) return t.length;
|
|
6813
|
+
if (!t.length) return s.length;
|
|
6814
|
+
const arr = [];
|
|
6815
|
+
for (let i = 0; i <= t.length; i++) {
|
|
6816
|
+
arr[i] = [i];
|
|
6817
|
+
for (let j = 1; j <= s.length; j++) {
|
|
6818
|
+
arr[i][j] = i === 0 ? j : Math.min(
|
|
6819
|
+
arr[i - 1][j] + 1,
|
|
6820
|
+
arr[i][j - 1] + 1,
|
|
6821
|
+
arr[i - 1][j - 1] + (s[j - 1] === t[i - 1] ? 0 : 1)
|
|
6822
|
+
);
|
|
6823
|
+
}
|
|
6824
|
+
}
|
|
6825
|
+
return arr[t.length][s.length];
|
|
6826
|
+
};
|
|
6827
|
+
var convertTurkishCharactersToEnglish = (text) => {
|
|
6828
|
+
return text.replaceAll("\u011E", "g").replaceAll("\xDC", "u").replaceAll("\u015E", "s").replaceAll("I", "i").replaceAll("\u0130", "i").replaceAll("\xD6", "o").replaceAll("\xC7", "c").replaceAll("\u011F", "g").replaceAll("\xFC", "u").replaceAll("\u015F", "s").replaceAll("\u0131", "i").replaceAll("\xF6", "o").replaceAll("\xE7", "c");
|
|
6829
|
+
};
|
|
6830
|
+
function convertToBase64(arrayBuffer) {
|
|
6831
|
+
return new Promise((resolve, reject) => {
|
|
6832
|
+
const blob = new Blob([arrayBuffer], { type: "image/png" });
|
|
6833
|
+
const reader = new FileReader();
|
|
6834
|
+
reader.onloadend = () => {
|
|
6835
|
+
const base64data = typeof reader.result === "string" ? reader.result.split(",")[1] : null;
|
|
6836
|
+
resolve(base64data);
|
|
6837
|
+
};
|
|
6838
|
+
reader.onerror = reject;
|
|
6839
|
+
reader.readAsDataURL(blob);
|
|
6840
|
+
});
|
|
6841
|
+
}
|
|
6842
|
+
|
|
6843
|
+
// src/utilization/GamificationUtilization.ts
|
|
6844
|
+
var retrieveSourceTypeOptionList = (coterieOnly) => {
|
|
6845
|
+
const currentSourceTypeOptionList = [
|
|
6846
|
+
{
|
|
6847
|
+
value: "CATCHTIVITY",
|
|
6848
|
+
text: i18n_default.t("CATCHTIVITY")
|
|
6849
|
+
},
|
|
6850
|
+
{
|
|
6851
|
+
value: "CATCHXAM",
|
|
6852
|
+
text: i18n_default.t("CATCHXAM")
|
|
6853
|
+
},
|
|
6854
|
+
// {
|
|
6855
|
+
// value: "STANDARD_EXAM",
|
|
6856
|
+
// text: i18n.t("STANDARD_EXAM"),
|
|
6857
|
+
// },
|
|
6858
|
+
{
|
|
6859
|
+
value: "ETUDE",
|
|
6860
|
+
text: i18n_default.t("ETUDE")
|
|
6861
|
+
},
|
|
6862
|
+
{
|
|
6863
|
+
value: "CONTEST",
|
|
6864
|
+
text: i18n_default.t("CONTEST")
|
|
6865
|
+
},
|
|
6866
|
+
{
|
|
6867
|
+
value: "ACTIVITY",
|
|
6868
|
+
text: i18n_default.t("ACTIVITY")
|
|
6869
|
+
}
|
|
6870
|
+
];
|
|
6871
|
+
if (!coterieOnly) {
|
|
6872
|
+
currentSourceTypeOptionList.push({
|
|
6873
|
+
value: "LOGIN",
|
|
6874
|
+
text: i18n_default.t("LOGIN")
|
|
6875
|
+
});
|
|
6876
|
+
}
|
|
6877
|
+
return currentSourceTypeOptionList;
|
|
6878
|
+
};
|
|
6879
|
+
var retrieveBadgeTypeOptionList = (isActivity) => {
|
|
6880
|
+
const currentBadgeTypeOptionList = [
|
|
6881
|
+
{
|
|
6882
|
+
value: "COUNT",
|
|
6883
|
+
text: i18n_default.t("COUNT")
|
|
6884
|
+
}
|
|
6885
|
+
];
|
|
6886
|
+
if (isActivity) {
|
|
6887
|
+
currentBadgeTypeOptionList.push({
|
|
6888
|
+
value: "CORRECT",
|
|
6889
|
+
text: i18n_default.t("CORRECT")
|
|
6890
|
+
});
|
|
6891
|
+
currentBadgeTypeOptionList.push({
|
|
6892
|
+
value: "REVIEW",
|
|
6893
|
+
text: i18n_default.t("REVIEW")
|
|
6894
|
+
});
|
|
6895
|
+
currentBadgeTypeOptionList.push({
|
|
6896
|
+
value: "TIME_SPENT",
|
|
6897
|
+
text: i18n_default.t("TIME_SPENT")
|
|
6898
|
+
});
|
|
6899
|
+
}
|
|
6900
|
+
return currentBadgeTypeOptionList;
|
|
6901
|
+
};
|
|
6902
|
+
var retrieveOtherBadgeDTOList = () => {
|
|
6903
|
+
const badgeList = [];
|
|
6904
|
+
const sourceTypeOptionList = retrieveSourceTypeOptionList(false);
|
|
6905
|
+
const filteredSourceTypeOptionList = sourceTypeOptionList.filter(
|
|
6906
|
+
(sourceTypeOption) => sourceTypeOption.value === "LOGIN"
|
|
6907
|
+
);
|
|
6908
|
+
for (let i = 1; i <= 5; i++) {
|
|
6909
|
+
for (const sourceTypeOption of filteredSourceTypeOptionList) {
|
|
6910
|
+
const badgeTypeOptionList = retrieveBadgeTypeOptionList(
|
|
6911
|
+
sourceTypeOption.value === "ACTIVITY"
|
|
6912
|
+
);
|
|
6913
|
+
for (const badgeTypeOption of badgeTypeOptionList) {
|
|
6914
|
+
badgeList.push({
|
|
6915
|
+
badgeDTO: {
|
|
6916
|
+
coterieType: "MANAGEMENT",
|
|
6917
|
+
sourceType: sourceTypeOption.value,
|
|
6918
|
+
badgeType: badgeTypeOption.value
|
|
6919
|
+
},
|
|
6920
|
+
level: i
|
|
6921
|
+
});
|
|
6922
|
+
}
|
|
6923
|
+
}
|
|
6924
|
+
}
|
|
6925
|
+
return badgeList;
|
|
6926
|
+
};
|
|
6927
|
+
var retrieveAllEarnedBadgeDTOListByCoterieTypeList = (coterieTypeList) => {
|
|
6928
|
+
const badgeList = [];
|
|
6929
|
+
for (const coterieType of coterieTypeList) {
|
|
6930
|
+
badgeList.push(...retrieveAllEarnedBadgeDTOListByCoterieType(coterieType));
|
|
6931
|
+
}
|
|
6932
|
+
return badgeList;
|
|
6933
|
+
};
|
|
6934
|
+
var retrieveAllEarnedBadgeDTOListByCoterieType = (coterieType) => {
|
|
6935
|
+
const sourceTypeOptionList = retrieveSourceTypeOptionList(true);
|
|
6936
|
+
const badgeList = [];
|
|
6937
|
+
for (let i = 1; i <= 5; i++) {
|
|
6938
|
+
for (const sourceTypeOption of sourceTypeOptionList) {
|
|
6939
|
+
const badgeTypeOptionList = retrieveBadgeTypeOptionList(
|
|
6940
|
+
sourceTypeOption.value === "ACTIVITY"
|
|
6941
|
+
);
|
|
6942
|
+
for (const badgeTypeOption of badgeTypeOptionList) {
|
|
6943
|
+
badgeList.push({
|
|
6944
|
+
badgeDTO: {
|
|
6945
|
+
coterieType,
|
|
6946
|
+
sourceType: sourceTypeOption.value,
|
|
6947
|
+
badgeType: badgeTypeOption.value
|
|
6948
|
+
},
|
|
6949
|
+
level: i
|
|
6950
|
+
});
|
|
6951
|
+
}
|
|
6952
|
+
}
|
|
6953
|
+
}
|
|
6954
|
+
return badgeList.sort((a, b) => {
|
|
6955
|
+
if (a.badgeDTO.sourceType !== b.badgeDTO.sourceType) {
|
|
6956
|
+
return a.badgeDTO.sourceType.localeCompare(b.badgeDTO.sourceType);
|
|
6957
|
+
}
|
|
6958
|
+
return a.badgeDTO.badgeType.localeCompare(b.badgeDTO.badgeType);
|
|
6959
|
+
});
|
|
6960
|
+
};
|
|
6961
|
+
var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
|
|
6962
|
+
if (coterieType === "MANAGEMENT") {
|
|
6963
|
+
if (sourceType === "ACTIVITY") {
|
|
6964
|
+
if (badgeType === "COUNT") {
|
|
6965
|
+
return [
|
|
6966
|
+
{
|
|
6967
|
+
level: 1,
|
|
6968
|
+
value: 50
|
|
6969
|
+
},
|
|
6970
|
+
{
|
|
6971
|
+
level: 2,
|
|
6972
|
+
value: 100
|
|
6973
|
+
},
|
|
6974
|
+
{
|
|
6975
|
+
level: 3,
|
|
6976
|
+
value: 500
|
|
6977
|
+
},
|
|
6978
|
+
{
|
|
6979
|
+
level: 4,
|
|
6980
|
+
value: 1e3
|
|
6981
|
+
},
|
|
6982
|
+
{
|
|
6983
|
+
level: 5,
|
|
6984
|
+
value: 5e3
|
|
6985
|
+
}
|
|
6986
|
+
];
|
|
6987
|
+
}
|
|
6988
|
+
} else if (sourceType === "LOGIN") {
|
|
6989
|
+
return [
|
|
6990
|
+
{
|
|
6991
|
+
level: 1,
|
|
6992
|
+
value: 3
|
|
6993
|
+
},
|
|
6994
|
+
{
|
|
6995
|
+
level: 2,
|
|
6996
|
+
value: 7
|
|
6997
|
+
},
|
|
6998
|
+
{
|
|
6999
|
+
level: 3,
|
|
7000
|
+
value: 15
|
|
7001
|
+
},
|
|
7002
|
+
{
|
|
7003
|
+
level: 4,
|
|
7004
|
+
value: 30
|
|
7005
|
+
},
|
|
7006
|
+
{
|
|
7007
|
+
level: 5,
|
|
7008
|
+
value: 90
|
|
7009
|
+
}
|
|
7010
|
+
];
|
|
7011
|
+
} else {
|
|
7012
|
+
if (badgeType === "COUNT") {
|
|
7013
|
+
return [
|
|
7014
|
+
{
|
|
7015
|
+
level: 1,
|
|
7016
|
+
value: 5
|
|
7017
|
+
},
|
|
7018
|
+
{
|
|
7019
|
+
level: 2,
|
|
7020
|
+
value: 10
|
|
7021
|
+
},
|
|
7022
|
+
{
|
|
7023
|
+
level: 3,
|
|
7024
|
+
value: 50
|
|
7025
|
+
},
|
|
7026
|
+
{
|
|
7027
|
+
level: 4,
|
|
7028
|
+
value: 100
|
|
7029
|
+
},
|
|
7030
|
+
{
|
|
7031
|
+
level: 5,
|
|
7032
|
+
value: 500
|
|
7033
|
+
}
|
|
7034
|
+
];
|
|
7035
|
+
} else {
|
|
7036
|
+
return [
|
|
7037
|
+
{
|
|
7038
|
+
level: 1,
|
|
7039
|
+
value: 25
|
|
7040
|
+
},
|
|
7041
|
+
{
|
|
7042
|
+
level: 2,
|
|
7043
|
+
value: 50
|
|
7044
|
+
},
|
|
7045
|
+
{
|
|
7046
|
+
level: 3,
|
|
7047
|
+
value: 250
|
|
7048
|
+
},
|
|
7049
|
+
{
|
|
7050
|
+
level: 4,
|
|
7051
|
+
value: 500
|
|
7052
|
+
},
|
|
7053
|
+
{
|
|
7054
|
+
level: 5,
|
|
7055
|
+
value: 1e3
|
|
7056
|
+
}
|
|
7057
|
+
];
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
7060
|
+
} else {
|
|
7061
|
+
if (sourceType === "ACTIVITY") {
|
|
7062
|
+
if (badgeType === "COUNT") {
|
|
7063
|
+
return [
|
|
7064
|
+
{
|
|
7065
|
+
level: 1,
|
|
7066
|
+
value: 10
|
|
7067
|
+
},
|
|
7068
|
+
{
|
|
7069
|
+
level: 2,
|
|
7070
|
+
value: 50
|
|
7071
|
+
},
|
|
7072
|
+
{
|
|
7073
|
+
level: 3,
|
|
7074
|
+
value: 100
|
|
7075
|
+
},
|
|
7076
|
+
{
|
|
7077
|
+
level: 4,
|
|
7078
|
+
value: 500
|
|
7079
|
+
},
|
|
7080
|
+
{
|
|
7081
|
+
level: 5,
|
|
7082
|
+
value: 1e3
|
|
7083
|
+
}
|
|
7084
|
+
];
|
|
7085
|
+
} else {
|
|
7086
|
+
return [
|
|
7087
|
+
{
|
|
7088
|
+
level: 1,
|
|
7089
|
+
value: 5
|
|
7090
|
+
},
|
|
7091
|
+
{
|
|
7092
|
+
level: 2,
|
|
7093
|
+
value: 25
|
|
7094
|
+
},
|
|
7095
|
+
{
|
|
7096
|
+
level: 3,
|
|
7097
|
+
value: 50
|
|
7098
|
+
},
|
|
7099
|
+
{
|
|
7100
|
+
level: 4,
|
|
7101
|
+
value: 250
|
|
7102
|
+
},
|
|
7103
|
+
{
|
|
7104
|
+
level: 5,
|
|
7105
|
+
value: 500
|
|
7106
|
+
}
|
|
7107
|
+
];
|
|
7108
|
+
}
|
|
7109
|
+
} else if (sourceType === "LOGIN") {
|
|
7110
|
+
return [];
|
|
7111
|
+
} else {
|
|
7112
|
+
if (badgeType === "COUNT") {
|
|
7113
|
+
return [
|
|
7114
|
+
{
|
|
7115
|
+
level: 1,
|
|
7116
|
+
value: 1
|
|
7117
|
+
},
|
|
7118
|
+
{
|
|
7119
|
+
level: 2,
|
|
7120
|
+
value: 5
|
|
7121
|
+
},
|
|
7122
|
+
{
|
|
7123
|
+
level: 3,
|
|
7124
|
+
value: 25
|
|
7125
|
+
},
|
|
7126
|
+
{
|
|
7127
|
+
level: 4,
|
|
7128
|
+
value: 50
|
|
7129
|
+
},
|
|
7130
|
+
{
|
|
7131
|
+
level: 5,
|
|
7132
|
+
value: 100
|
|
7133
|
+
}
|
|
7134
|
+
];
|
|
7135
|
+
}
|
|
7136
|
+
}
|
|
7137
|
+
}
|
|
7138
|
+
return [];
|
|
7139
|
+
};
|
|
7140
|
+
var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level) => {
|
|
7141
|
+
const badgeRuleList = retrieveBadgeRuleListByParams(
|
|
7142
|
+
coterieType,
|
|
7143
|
+
sourceType,
|
|
7144
|
+
badgeType
|
|
7145
|
+
);
|
|
7146
|
+
const foundBadgeRule = badgeRuleList[level - 1];
|
|
7147
|
+
if (coterieType === "MANAGEMENT") {
|
|
7148
|
+
if (sourceType === "ACTIVITY") {
|
|
7149
|
+
if (badgeType === "COUNT") {
|
|
7150
|
+
if (foundBadgeRule) {
|
|
7151
|
+
return `${i18n_default.t("total_activity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_count_text_2")}`;
|
|
7152
|
+
} else {
|
|
7153
|
+
return i18n_default.t("none_activity_count_text");
|
|
7154
|
+
}
|
|
7155
|
+
} else if (badgeType === "CORRECT") {
|
|
7156
|
+
if (foundBadgeRule) {
|
|
7157
|
+
return `${i18n_default.t("total_activity_correct_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_correct_text_2")}`;
|
|
7158
|
+
} else {
|
|
7159
|
+
return i18n_default.t("none_activity_correct_text");
|
|
7160
|
+
}
|
|
7161
|
+
} else if (badgeType === "REVIEW") {
|
|
7162
|
+
if (foundBadgeRule) {
|
|
7163
|
+
return `${i18n_default.t("total_activity_review_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_review_text_2")}`;
|
|
7164
|
+
} else {
|
|
7165
|
+
return i18n_default.t("none_activity_review_text");
|
|
7166
|
+
}
|
|
7167
|
+
} else if (badgeType === "TIME_SPENT") {
|
|
7168
|
+
if (foundBadgeRule) {
|
|
7169
|
+
return `${i18n_default.t("total_activity_time_spent_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_time_spent_text_2")}`;
|
|
7170
|
+
} else {
|
|
7171
|
+
return i18n_default.t("none_activity_time_spent_text");
|
|
7172
|
+
}
|
|
7173
|
+
}
|
|
7174
|
+
} else if (sourceType === "CATCHTIVITY") {
|
|
7175
|
+
if (badgeType === "COUNT") {
|
|
7176
|
+
if (foundBadgeRule) {
|
|
7177
|
+
return `${i18n_default.t("total_catchtivity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_catchtivity_count_text_2")}`;
|
|
7178
|
+
} else {
|
|
7179
|
+
return i18n_default.t("none_catchtivity_count_text");
|
|
7180
|
+
}
|
|
7181
|
+
}
|
|
7182
|
+
} else if (sourceType === "CATCHXAM") {
|
|
7183
|
+
if (badgeType === "COUNT") {
|
|
7184
|
+
if (foundBadgeRule) {
|
|
7185
|
+
return `${i18n_default.t("total_catchxam_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_catchxam_count_text_2")}`;
|
|
7186
|
+
} else {
|
|
7187
|
+
return i18n_default.t("none_catchxam_count_text");
|
|
7188
|
+
}
|
|
7189
|
+
}
|
|
7190
|
+
} else if (sourceType === "ETUDE") {
|
|
7191
|
+
if (badgeType === "COUNT") {
|
|
7192
|
+
if (foundBadgeRule) {
|
|
7193
|
+
return `${i18n_default.t("total_etude_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_etude_count_text_2")}`;
|
|
7194
|
+
} else {
|
|
7195
|
+
return i18n_default.t("none_etude_count_text");
|
|
7196
|
+
}
|
|
7197
|
+
}
|
|
7198
|
+
} else if (sourceType === "CONTEST") {
|
|
7199
|
+
if (badgeType === "COUNT") {
|
|
7200
|
+
if (foundBadgeRule) {
|
|
7201
|
+
return `${i18n_default.t("total_contest_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_contest_count_text_2")}`;
|
|
7202
|
+
} else {
|
|
7203
|
+
return i18n_default.t("none_contest_count_text");
|
|
7204
|
+
}
|
|
7205
|
+
}
|
|
7206
|
+
} else if (sourceType === "LOGIN") {
|
|
7207
|
+
if (badgeType === "COUNT") {
|
|
7208
|
+
if (foundBadgeRule) {
|
|
7209
|
+
return `${i18n_default.t("total_login_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_login_count_text_2")}`;
|
|
7210
|
+
} else {
|
|
7211
|
+
return i18n_default.t("none_login_count_text");
|
|
7212
|
+
}
|
|
7213
|
+
}
|
|
7214
|
+
}
|
|
7215
|
+
} else {
|
|
7216
|
+
if (sourceType === "ACTIVITY") {
|
|
7217
|
+
if (badgeType === "COUNT") {
|
|
7218
|
+
if (foundBadgeRule) {
|
|
7219
|
+
return `${i18n_default.t("coterie_activity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_count_text_2")}`;
|
|
7220
|
+
} else {
|
|
7221
|
+
return i18n_default.t("none_activity_count_text");
|
|
7222
|
+
}
|
|
7223
|
+
} else if (badgeType === "CORRECT") {
|
|
7224
|
+
if (foundBadgeRule) {
|
|
7225
|
+
return `${i18n_default.t("coterie_activity_correct_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_correct_text_2")}`;
|
|
7226
|
+
} else {
|
|
7227
|
+
return i18n_default.t("none_activity_correct_text");
|
|
7228
|
+
}
|
|
7229
|
+
} else if (badgeType === "REVIEW") {
|
|
7230
|
+
if (foundBadgeRule) {
|
|
7231
|
+
return `${i18n_default.t("coterie_activity_review_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_review_text_2")}`;
|
|
7232
|
+
} else {
|
|
7233
|
+
return i18n_default.t("none_activity_review_text");
|
|
7234
|
+
}
|
|
7235
|
+
} else if (badgeType === "TIME_SPENT") {
|
|
7236
|
+
if (foundBadgeRule) {
|
|
7237
|
+
return `${i18n_default.t("coterie_activity_time_spent_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_time_spent_text_2")}`;
|
|
7238
|
+
} else {
|
|
7239
|
+
return i18n_default.t("none_activity_time_spent_text");
|
|
7240
|
+
}
|
|
7241
|
+
}
|
|
7242
|
+
} else if (sourceType === "CATCHTIVITY") {
|
|
7243
|
+
if (badgeType === "COUNT") {
|
|
7244
|
+
if (foundBadgeRule) {
|
|
7245
|
+
return `${i18n_default.t("coterie_catchtivity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_catchtivity_count_text_2")}`;
|
|
7246
|
+
} else {
|
|
7247
|
+
return i18n_default.t("none_catchtivity_count_text");
|
|
7248
|
+
}
|
|
7249
|
+
}
|
|
7250
|
+
} else if (sourceType === "CATCHXAM") {
|
|
7251
|
+
if (badgeType === "COUNT") {
|
|
7252
|
+
if (foundBadgeRule) {
|
|
7253
|
+
return `${i18n_default.t("coterie_catchxam_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_catchxam_count_text_2")}`;
|
|
7254
|
+
} else {
|
|
7255
|
+
return i18n_default.t("none_catchxam_count_text");
|
|
7256
|
+
}
|
|
7257
|
+
}
|
|
7258
|
+
} else if (sourceType === "ETUDE") {
|
|
7259
|
+
if (badgeType === "COUNT") {
|
|
7260
|
+
if (foundBadgeRule) {
|
|
7261
|
+
return `${i18n_default.t("coterie_etude_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_etude_count_text_2")}`;
|
|
7262
|
+
} else {
|
|
7263
|
+
return i18n_default.t("none_etude_count_text");
|
|
7264
|
+
}
|
|
7265
|
+
}
|
|
7266
|
+
} else if (sourceType === "CONTEST") {
|
|
7267
|
+
if (badgeType === "COUNT") {
|
|
7268
|
+
if (foundBadgeRule) {
|
|
7269
|
+
return `${i18n_default.t("coterie_contest_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_contest_count_text_2")}`;
|
|
7270
|
+
} else {
|
|
7271
|
+
return i18n_default.t("none_contest_count_text");
|
|
7272
|
+
}
|
|
7273
|
+
}
|
|
7274
|
+
} else if (sourceType === "LOGIN") {
|
|
7275
|
+
}
|
|
7276
|
+
}
|
|
7277
|
+
return null;
|
|
7278
|
+
};
|
|
7279
|
+
|
|
7280
|
+
// src/utilization/IndividualModelUtilization.ts
|
|
7281
|
+
var NUMBER_OF_ACTIVITY_TEMPLATE = 9;
|
|
7282
|
+
var NUMBER_OF_TAXONOMY = 6;
|
|
7283
|
+
var INITIAL_TAXONOMY_VALUE = 1 / NUMBER_OF_TAXONOMY;
|
|
7284
|
+
var INITIAL_TEMPLATE_VALUE = 1 / NUMBER_OF_ACTIVITY_TEMPLATE;
|
|
7285
|
+
var constructBaseVerbalIndvidualModel = (userId) => {
|
|
7286
|
+
return {
|
|
7287
|
+
bloomBloomAnalyze: INITIAL_TAXONOMY_VALUE,
|
|
7288
|
+
bloomBloomApply: INITIAL_TAXONOMY_VALUE,
|
|
7289
|
+
bloomBloomCreate: INITIAL_TAXONOMY_VALUE,
|
|
7290
|
+
bloomBloomEvaluate: INITIAL_TAXONOMY_VALUE,
|
|
7291
|
+
bloomBloomRemember: INITIAL_TAXONOMY_VALUE,
|
|
7292
|
+
bloomBloomUnderstand: INITIAL_TAXONOMY_VALUE,
|
|
7293
|
+
dropdown: INITIAL_TEMPLATE_VALUE,
|
|
7294
|
+
coterieField: "VERBAL",
|
|
7295
|
+
fillInTheBlanks: INITIAL_TEMPLATE_VALUE,
|
|
7296
|
+
grouping: INITIAL_TEMPLATE_VALUE,
|
|
7297
|
+
matching: INITIAL_TEMPLATE_VALUE,
|
|
7298
|
+
mcma: INITIAL_TEMPLATE_VALUE,
|
|
7299
|
+
mcsa: INITIAL_TEMPLATE_VALUE,
|
|
7300
|
+
openEnded: INITIAL_TEMPLATE_VALUE,
|
|
7301
|
+
ordering: INITIAL_TEMPLATE_VALUE,
|
|
7302
|
+
trueFalse: INITIAL_TEMPLATE_VALUE,
|
|
7303
|
+
userId
|
|
7304
|
+
};
|
|
7305
|
+
};
|
|
7306
|
+
var constructBaseNumericIndividualModel = (userId) => {
|
|
7307
|
+
return {
|
|
7308
|
+
bloomBloomAnalyze: INITIAL_TAXONOMY_VALUE,
|
|
7309
|
+
bloomBloomApply: INITIAL_TAXONOMY_VALUE,
|
|
7310
|
+
bloomBloomCreate: INITIAL_TAXONOMY_VALUE,
|
|
7311
|
+
bloomBloomEvaluate: INITIAL_TAXONOMY_VALUE,
|
|
7312
|
+
bloomBloomRemember: INITIAL_TAXONOMY_VALUE,
|
|
7313
|
+
bloomBloomUnderstand: INITIAL_TAXONOMY_VALUE,
|
|
7314
|
+
dropdown: INITIAL_TEMPLATE_VALUE,
|
|
7315
|
+
coterieField: "NUMERIC",
|
|
7316
|
+
fillInTheBlanks: INITIAL_TEMPLATE_VALUE,
|
|
7317
|
+
grouping: INITIAL_TEMPLATE_VALUE,
|
|
7318
|
+
matching: INITIAL_TEMPLATE_VALUE,
|
|
7319
|
+
mcma: INITIAL_TEMPLATE_VALUE,
|
|
7320
|
+
mcsa: INITIAL_TEMPLATE_VALUE,
|
|
7321
|
+
openEnded: INITIAL_TEMPLATE_VALUE,
|
|
7322
|
+
ordering: INITIAL_TEMPLATE_VALUE,
|
|
7323
|
+
trueFalse: INITIAL_TEMPLATE_VALUE,
|
|
7324
|
+
userId
|
|
7325
|
+
};
|
|
7326
|
+
};
|
|
7327
|
+
|
|
7328
|
+
// src/utilization/NotificationUtilization.ts
|
|
7329
|
+
var retrieveAnnouncementTypeOptionList = () => {
|
|
7330
|
+
return [
|
|
7331
|
+
{
|
|
7332
|
+
value: "USER",
|
|
7333
|
+
text: i18n_default.t("USER")
|
|
7334
|
+
},
|
|
7335
|
+
{
|
|
7336
|
+
value: "USER_PROFILE",
|
|
7337
|
+
text: i18n_default.t("USER_PROFILE")
|
|
7338
|
+
},
|
|
7339
|
+
{
|
|
7340
|
+
value: "BRAND",
|
|
7341
|
+
text: i18n_default.t("BRAND")
|
|
7342
|
+
},
|
|
7343
|
+
{
|
|
7344
|
+
value: "CAMPUS",
|
|
7345
|
+
text: i18n_default.t("CAMPUS")
|
|
7346
|
+
},
|
|
7347
|
+
{
|
|
7348
|
+
value: "INSTITUTION",
|
|
7349
|
+
text: i18n_default.t("INSTITUTION")
|
|
7350
|
+
},
|
|
7351
|
+
{
|
|
7352
|
+
value: "SEASON",
|
|
7353
|
+
text: i18n_default.t("SEASON")
|
|
7354
|
+
},
|
|
7355
|
+
{
|
|
7356
|
+
value: "GRADE",
|
|
7357
|
+
text: i18n_default.t("GRADE")
|
|
7358
|
+
},
|
|
7359
|
+
{
|
|
7360
|
+
value: "BRANCH",
|
|
7361
|
+
text: i18n_default.t("BRANCH")
|
|
7362
|
+
}
|
|
7363
|
+
];
|
|
7364
|
+
};
|
|
7365
|
+
var retrieveAnnouncementAudienceOptionList = () => {
|
|
7366
|
+
return [
|
|
7367
|
+
{
|
|
7368
|
+
value: "EVERYONE",
|
|
7369
|
+
text: i18n_default.t("EVERYONE")
|
|
7370
|
+
},
|
|
7371
|
+
{
|
|
7372
|
+
value: "STAFF",
|
|
7373
|
+
text: i18n_default.t("STAFF")
|
|
7374
|
+
},
|
|
7375
|
+
{
|
|
7376
|
+
value: "COTERIE",
|
|
7377
|
+
text: i18n_default.t("COTERIE")
|
|
7378
|
+
},
|
|
7379
|
+
{
|
|
7380
|
+
value: "LEARNER",
|
|
7381
|
+
text: i18n_default.t("LEARNER")
|
|
7382
|
+
}
|
|
7383
|
+
];
|
|
7384
|
+
};
|
|
7385
|
+
|
|
7386
|
+
// src/utilization/ReportUtilization.ts
|
|
7387
|
+
var retrieveReportTypeOptionList = () => {
|
|
7388
|
+
return [
|
|
7389
|
+
{
|
|
7390
|
+
value: "USER",
|
|
7391
|
+
text: i18n_default.t("USER")
|
|
7392
|
+
},
|
|
7393
|
+
{
|
|
7394
|
+
value: "USER_PROFILE",
|
|
7395
|
+
text: i18n_default.t("USER_PROFILE")
|
|
7396
|
+
},
|
|
7397
|
+
{
|
|
7398
|
+
value: "BRANCH",
|
|
7399
|
+
text: i18n_default.t("BRANCH")
|
|
7400
|
+
},
|
|
7401
|
+
{
|
|
7402
|
+
value: "GRADE",
|
|
7403
|
+
text: i18n_default.t("GRADE")
|
|
7404
|
+
},
|
|
7405
|
+
{
|
|
7406
|
+
value: "SEASON",
|
|
7407
|
+
text: i18n_default.t("SEASON")
|
|
7408
|
+
},
|
|
7409
|
+
{
|
|
7410
|
+
value: "INSTITUTION",
|
|
7411
|
+
text: i18n_default.t("INSTITUTION")
|
|
7412
|
+
},
|
|
7413
|
+
{
|
|
7414
|
+
value: "CAMPUS",
|
|
7415
|
+
text: i18n_default.t("CAMPUS")
|
|
7416
|
+
},
|
|
7417
|
+
{
|
|
7418
|
+
value: "REGION",
|
|
7419
|
+
text: i18n_default.t("REGION")
|
|
7420
|
+
},
|
|
7421
|
+
{
|
|
7422
|
+
value: "BRAND",
|
|
7423
|
+
text: i18n_default.t("BRAND")
|
|
7424
|
+
}
|
|
7425
|
+
];
|
|
7426
|
+
};
|
|
7427
|
+
|
|
7428
|
+
// src/utilization/StorageUtilization.ts
|
|
7429
|
+
var convertDataURLtoFile = (dataurl, filename) => {
|
|
7430
|
+
var arr = dataurl.split(","), mime = (arr[0].match(/:(.*?);/) || [])[1], bstr = atob(arr[arr.length - 1]), n = bstr.length, u8arr = new Uint8Array(n);
|
|
7431
|
+
while (n--) {
|
|
7432
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
7433
|
+
}
|
|
7434
|
+
return new File([u8arr], filename, { type: mime });
|
|
7435
|
+
};
|
|
7436
|
+
var retrieveDocumentTypeFromAcceptedFormat = (format) => {
|
|
7437
|
+
if (format === "application/pdf") {
|
|
7438
|
+
return "PDF";
|
|
7439
|
+
} else if (format === "image/jpeg" || format === "image/png" || format === "image/jpg") {
|
|
7440
|
+
return "IMAGE";
|
|
7441
|
+
} else if (format === "audio/mp3") {
|
|
7442
|
+
return "AUDIO";
|
|
7443
|
+
}
|
|
7444
|
+
};
|
|
7445
|
+
var retrieveDocumentTypeFromExtension = (format) => {
|
|
7446
|
+
if (format === "pdf") {
|
|
7447
|
+
return "PDF";
|
|
7448
|
+
} else if (format === "jpeg" || format === "png" || format === "jpg") {
|
|
7449
|
+
return "IMAGE";
|
|
7450
|
+
} else if (format === "mp3") {
|
|
7451
|
+
return "AUDIO";
|
|
7452
|
+
}
|
|
7453
|
+
};
|
|
7454
|
+
|
|
7455
|
+
// src/utilization/TokenUtilization.ts
|
|
7456
|
+
var retrieveTokenUsageTypeOptionList = () => {
|
|
7457
|
+
return [
|
|
7458
|
+
{
|
|
7459
|
+
text: i18n_default.t("AI"),
|
|
7460
|
+
value: "AI"
|
|
7461
|
+
},
|
|
7462
|
+
{
|
|
7463
|
+
text: i18n_default.t("SYSTEM"),
|
|
7464
|
+
value: "SYSTEM"
|
|
7465
|
+
}
|
|
7466
|
+
];
|
|
7467
|
+
};
|
|
7468
|
+
var retrieveTokenUsageSubTypeOptionList = () => {
|
|
7469
|
+
return [
|
|
7470
|
+
{
|
|
7471
|
+
text: i18n_default.t("ACTIVITY_EVALUATION"),
|
|
7472
|
+
value: "ACTIVITY_EVALUATION"
|
|
7473
|
+
},
|
|
7474
|
+
{
|
|
7475
|
+
text: i18n_default.t("ACTIVITY_TEMPLATE_GENERATION"),
|
|
7476
|
+
value: "ACTIVITY_TEMPLATE_GENERATION"
|
|
7477
|
+
},
|
|
7478
|
+
{
|
|
7479
|
+
text: i18n_default.t("IMAGE_PROCESSING"),
|
|
7480
|
+
value: "IMAGE_PROCESSING"
|
|
7481
|
+
},
|
|
7482
|
+
{
|
|
7483
|
+
text: i18n_default.t("ACTIVITY_SOLUTION"),
|
|
7484
|
+
value: "ACTIVITY_SOLUTION"
|
|
7485
|
+
},
|
|
7486
|
+
{
|
|
7487
|
+
text: i18n_default.t("ACTIVITY_HINT"),
|
|
7488
|
+
value: "ACTIVITY_HINT"
|
|
7489
|
+
}
|
|
7490
|
+
];
|
|
5195
7491
|
};
|
|
5196
7492
|
export {
|
|
7493
|
+
ActivityTemplateLabel_default as ActivityTemplateLabel,
|
|
5197
7494
|
ApproveButton_default as ApproveButton,
|
|
5198
7495
|
BaseImage_default as BaseImage,
|
|
5199
7496
|
BaseLoading_default as BaseLoading,
|
|
7497
|
+
BaseModal_default as BaseModal,
|
|
5200
7498
|
BlueVerticalDividerLine_default as BlueVerticalDividerLine,
|
|
7499
|
+
BrandLabel_default as BrandLabel,
|
|
5201
7500
|
CancelButton_default as CancelButton,
|
|
7501
|
+
CoterieLabel_default as CoterieLabel,
|
|
5202
7502
|
CreateButton_default as CreateButton,
|
|
5203
7503
|
DeleteButton_default as DeleteButton,
|
|
5204
7504
|
DividerLine_default as DividerLine,
|
|
5205
7505
|
DropdownActivityContent_default as DropdownActivityContent,
|
|
5206
7506
|
FillInTheBlanksActivityContent_default as FillInTheBlanksActivityContent,
|
|
7507
|
+
GradeLabel_default as GradeLabel,
|
|
5207
7508
|
GroupingActivityContent_default as GroupingActivityContent,
|
|
5208
7509
|
InputGroup_default as InputGroup,
|
|
5209
7510
|
MCMAActivityContent_default as MCMAActivityContent,
|
|
5210
7511
|
MCSAActivityContent_default as MCSAActivityContent,
|
|
5211
7512
|
MatchingActivityContent_default as MatchingActivityContent,
|
|
7513
|
+
ONE_DAY,
|
|
7514
|
+
ONE_HOUR,
|
|
7515
|
+
ONE_MONTH,
|
|
7516
|
+
ONE_WEEK,
|
|
5212
7517
|
OpenEndedActivityContent_default as OpenEndedActivityContent,
|
|
5213
7518
|
OrderingActivityContent_default as OrderingActivityContent,
|
|
7519
|
+
OutcomeLabel_default as OutcomeLabel,
|
|
7520
|
+
PersonalLabel_default as PersonalLabel,
|
|
5214
7521
|
PrimaryButton_default as PrimaryButton,
|
|
7522
|
+
PublishingHouseLabel_default as PublishingHouseLabel,
|
|
5215
7523
|
SecondaryButton_default as SecondaryButton,
|
|
7524
|
+
SelectionBox_default as SelectionBox,
|
|
7525
|
+
SelectionCheckbox_default as SelectionCheckbox,
|
|
7526
|
+
SelectionTab_default as SelectionTab,
|
|
7527
|
+
THREE_MONTHS,
|
|
5216
7528
|
TrueFalseActivityContent_default as TrueFalseActivityContent,
|
|
5217
7529
|
VerticalDividerLine_default as VerticalDividerLine,
|
|
7530
|
+
calculateLevenshteinDistance,
|
|
5218
7531
|
checkActivityAnswerState,
|
|
5219
7532
|
checkIfAnswerIsEmpty,
|
|
5220
7533
|
constructActivityAnswerMap,
|
|
5221
7534
|
constructActivityAnswerStateList,
|
|
5222
7535
|
constructActivityItemListWithAnswersForAI,
|
|
5223
7536
|
constructActivityItemListWithSolutionForAI,
|
|
7537
|
+
constructBaseNumericIndividualModel,
|
|
7538
|
+
constructBaseVerbalIndvidualModel,
|
|
5224
7539
|
constructInputWithSpecialExpressionList,
|
|
7540
|
+
constructUserProfileQueryParams,
|
|
7541
|
+
constructWeekName,
|
|
5225
7542
|
convertDataURLtoFile,
|
|
7543
|
+
convertToBase64,
|
|
7544
|
+
convertTurkishCharactersToEnglish,
|
|
7545
|
+
filterCategoryVersionCodeOptionList,
|
|
7546
|
+
filterCategoryVersionCodeOptionListByGradeDTO,
|
|
7547
|
+
filterCategoryVersionCodeOptionListByInstitutionDTO,
|
|
7548
|
+
filterCoterieTypeOptionList,
|
|
7549
|
+
filterGradeLevelOptionList,
|
|
7550
|
+
filterUserRoleOptionList,
|
|
7551
|
+
findAISettingsFromCurrentProfile,
|
|
5226
7552
|
findBestFitActivity,
|
|
5227
7553
|
getColorByIndex,
|
|
5228
7554
|
i18n_default as i18n,
|
|
5229
7555
|
ignoreMathematicalExpression,
|
|
5230
7556
|
parseBodyMapFromData,
|
|
5231
7557
|
parseContentMapFromData,
|
|
7558
|
+
parseJwt,
|
|
5232
7559
|
parseMaterialMapFromData,
|
|
5233
7560
|
retrieveActivityAnswerFromAnswerList,
|
|
5234
7561
|
retrieveActivityTemplateDTOOptionList,
|
|
7562
|
+
retrieveAllEarnedBadgeDTOListByCoterieType,
|
|
7563
|
+
retrieveAllEarnedBadgeDTOListByCoterieTypeList,
|
|
7564
|
+
retrieveAnnouncementAudienceOptionList,
|
|
7565
|
+
retrieveAnnouncementTypeOptionList,
|
|
7566
|
+
retrieveBadgeRuleListByParams,
|
|
7567
|
+
retrieveBadgeRuleTextByParams,
|
|
7568
|
+
retrieveBranchDTOByUserProfileOptionList,
|
|
7569
|
+
retrieveBranchDTOOptionList,
|
|
7570
|
+
retrieveBrandDTOByUserProfileOptionList,
|
|
7571
|
+
retrieveBrandDTOOptionList,
|
|
7572
|
+
retrieveCampusDTOByUserProfileOptionList,
|
|
7573
|
+
retrieveCampusDTOOptionList,
|
|
7574
|
+
retrieveCategoryVersionCodeOptionList,
|
|
5235
7575
|
retrieveClockTimeLeft,
|
|
5236
7576
|
retrieveColorByScore,
|
|
5237
7577
|
retrieveContentTypeOptionList,
|
|
5238
7578
|
retrieveContestTypeOptionList,
|
|
5239
7579
|
retrieveCoterieTypeFromStandardExamCoterieType,
|
|
7580
|
+
retrieveCoterieTypeOptionList,
|
|
7581
|
+
retrieveCountryCodeOptionList,
|
|
7582
|
+
retrieveCountryNameOptionList,
|
|
5240
7583
|
retrieveCurrentDefaultDataMap,
|
|
7584
|
+
retrieveDateIntervalOptionList,
|
|
7585
|
+
retrieveDefaultUserRoleOptionList,
|
|
5241
7586
|
retrieveDistintCoterieTypeFromCatchtivityApplicationDTO,
|
|
5242
7587
|
retrieveDocumentTypeFromAcceptedFormat,
|
|
5243
7588
|
retrieveDocumentTypeFromExtension,
|
|
@@ -5245,7 +7590,23 @@ export {
|
|
|
5245
7590
|
retrieveDurationInSecondsOptionList,
|
|
5246
7591
|
retrieveDurationTypeOptionList,
|
|
5247
7592
|
retrieveEachTimeSpentInSeconds,
|
|
7593
|
+
retrieveEnableOptionList,
|
|
7594
|
+
retrieveExternalRegistrationDTOOptionList,
|
|
5248
7595
|
retrieveFrequencyTypeOptionList,
|
|
7596
|
+
retrieveGenderOptionList,
|
|
7597
|
+
retrieveGradeDTOByUserProfileOptionList,
|
|
7598
|
+
retrieveGradeDTOOptionList,
|
|
7599
|
+
retrieveGradeLevelOptionList,
|
|
7600
|
+
retrieveInstitutionDTOByUserProfileOptionList,
|
|
7601
|
+
retrieveInstitutionDTOOptionList,
|
|
7602
|
+
retrieveInstitutionTypeOptionList,
|
|
7603
|
+
retrieveMonthNameByIndex,
|
|
7604
|
+
retrieveOtherBadgeDTOList,
|
|
7605
|
+
retrievePhoneNumberAreaCodeList,
|
|
7606
|
+
retrieveProvinceNameOptionList,
|
|
7607
|
+
retrieveReportTypeOptionList,
|
|
7608
|
+
retrieveSeasonDTOByUserProfileOptionList,
|
|
7609
|
+
retrieveSeasonDTOOptionList,
|
|
5249
7610
|
retrieveStandardExamCoterieTypeOptionListByStandardExamType,
|
|
5250
7611
|
retrieveStandardExamTypeIcon,
|
|
5251
7612
|
retrieveStandardExamTypeOptionList,
|
|
@@ -5253,8 +7614,12 @@ export {
|
|
|
5253
7614
|
retrieveTaxonomyGroupName,
|
|
5254
7615
|
retrieveTaxonomyName,
|
|
5255
7616
|
retrieveTaxonomyType,
|
|
7617
|
+
retrieveTokenUsageSubTypeOptionList,
|
|
7618
|
+
retrieveTokenUsageTypeOptionList,
|
|
5256
7619
|
retrieveTotalTimeSpentInMinutes,
|
|
5257
7620
|
retrieveTotalTimeSpentInSeconds,
|
|
7621
|
+
retrieveUserAuthorityGeneralOptionList,
|
|
7622
|
+
retrieveUserRoleOptionList,
|
|
5258
7623
|
retrieveValidationRequirementList,
|
|
5259
7624
|
shuffleArray,
|
|
5260
7625
|
useScreenSize_default as useScreenSize
|