catchup-library-web 2.7.0 → 2.7.2
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 +1 -34
- package/dist/index.d.ts +1 -34
- package/dist/index.js +171 -288
- package/dist/index.mjs +138 -255
- package/package.json +1 -1
- package/src/components/groups/InputGroup.tsx +75 -222
- package/src/properties/TextProperties.ts +1 -1
- package/src/utilization/ManagementUtilization.ts +38 -28
package/dist/index.js
CHANGED
|
@@ -3985,13 +3985,39 @@ var VerticalDividerLine = () => {
|
|
|
3985
3985
|
var VerticalDividerLine_default = VerticalDividerLine;
|
|
3986
3986
|
|
|
3987
3987
|
// src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
|
|
3988
|
-
var
|
|
3988
|
+
var import_react_katex3 = require("react-katex");
|
|
3989
3989
|
|
|
3990
3990
|
// src/components/groups/InputGroup.tsx
|
|
3991
3991
|
var import_react_select = __toESM(require("react-select"));
|
|
3992
3992
|
var import_react_switch = __toESM(require("react-switch"));
|
|
3993
3993
|
var import_react13 = require("react");
|
|
3994
|
+
|
|
3995
|
+
// src/components/texts/InputWithSpecialExpression.tsx
|
|
3996
|
+
var import_react_katex2 = require("react-katex");
|
|
3994
3997
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3998
|
+
var InputWithSpecialExpression = ({
|
|
3999
|
+
value,
|
|
4000
|
+
showSpecialOnly
|
|
4001
|
+
}) => {
|
|
4002
|
+
const inputWithSpecialExpressionList = constructInputWithSpecialExpressionList(value);
|
|
4003
|
+
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4004
|
+
"span",
|
|
4005
|
+
{
|
|
4006
|
+
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4007
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_katex2.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
4008
|
+
}
|
|
4009
|
+
)) }) }) : null : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4010
|
+
"span",
|
|
4011
|
+
{
|
|
4012
|
+
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4013
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_katex2.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
4014
|
+
}
|
|
4015
|
+
)) }) });
|
|
4016
|
+
};
|
|
4017
|
+
var InputWithSpecialExpression_default = InputWithSpecialExpression;
|
|
4018
|
+
|
|
4019
|
+
// src/components/groups/InputGroup.tsx
|
|
4020
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3995
4021
|
var InputGroup = ({
|
|
3996
4022
|
type,
|
|
3997
4023
|
title,
|
|
@@ -4017,11 +4043,7 @@ var InputGroup = ({
|
|
|
4017
4043
|
description
|
|
4018
4044
|
}) => {
|
|
4019
4045
|
const textAreaRef = (0, import_react13.useRef)(null);
|
|
4020
|
-
const latexTextAreaRef = (0, import_react13.useRef)(null);
|
|
4021
4046
|
const [showMathConstructor, setShowMathConstructor] = (0, import_react13.useState)(false);
|
|
4022
|
-
const [showCheatSheet, setShowCheatSheet] = (0, import_react13.useState)(false);
|
|
4023
|
-
const [mathValue, setMathValue] = (0, import_react13.useState)("");
|
|
4024
|
-
const mathFieldRef = (0, import_react13.useRef)(null);
|
|
4025
4047
|
(0, import_react13.useEffect)(() => {
|
|
4026
4048
|
if (!textAreaRef) return;
|
|
4027
4049
|
if (!textAreaRef.current) return;
|
|
@@ -4031,23 +4053,6 @@ var InputGroup = ({
|
|
|
4031
4053
|
textAreaRef.current.style.height = `44px`;
|
|
4032
4054
|
}
|
|
4033
4055
|
}, [textAreaRef, value]);
|
|
4034
|
-
(0, import_react13.useEffect)(() => {
|
|
4035
|
-
if (!latexTextAreaRef) return;
|
|
4036
|
-
if (!latexTextAreaRef.current) return;
|
|
4037
|
-
if (value) {
|
|
4038
|
-
latexTextAreaRef.current.style.height = `${latexTextAreaRef.current.scrollHeight}px`;
|
|
4039
|
-
} else {
|
|
4040
|
-
latexTextAreaRef.current.style.height = `44px`;
|
|
4041
|
-
}
|
|
4042
|
-
}, [latexTextAreaRef, value]);
|
|
4043
|
-
(0, import_react13.useEffect)(() => {
|
|
4044
|
-
if (!useMath) return;
|
|
4045
|
-
import("mathlive").then(({ MathfieldElement }) => {
|
|
4046
|
-
if (!customElements.get("math-field")) {
|
|
4047
|
-
customElements.define("math-field", MathfieldElement);
|
|
4048
|
-
}
|
|
4049
|
-
});
|
|
4050
|
-
}, [useMath]);
|
|
4051
4056
|
const retrieveNullableOptionList = () => {
|
|
4052
4057
|
if (!optionList) return [];
|
|
4053
4058
|
const currentOptionList = {
|
|
@@ -4084,30 +4089,11 @@ var InputGroup = ({
|
|
|
4084
4089
|
onChange && onChange(e);
|
|
4085
4090
|
}
|
|
4086
4091
|
};
|
|
4087
|
-
const handleMathFieldChange = (0, import_react13.useCallback)(() => {
|
|
4088
|
-
if (!mathFieldRef.current) return;
|
|
4089
|
-
const latexValue = mathFieldRef.current.value;
|
|
4090
|
-
const wasFocused = mathFieldRef.current === document.activeElement;
|
|
4091
|
-
const cursorPosition = mathFieldRef.current.position;
|
|
4092
|
-
setMathValue(latexValue);
|
|
4093
|
-
if (wasFocused) {
|
|
4094
|
-
setTimeout(() => {
|
|
4095
|
-
if (mathFieldRef.current) {
|
|
4096
|
-
mathFieldRef.current.focus();
|
|
4097
|
-
mathFieldRef.current.position = cursorPosition;
|
|
4098
|
-
}
|
|
4099
|
-
}, 0);
|
|
4100
|
-
}
|
|
4101
|
-
}, []);
|
|
4102
|
-
const handleCopyLatex = () => {
|
|
4103
|
-
navigator.clipboard.writeText(`$$${mathValue}$$`);
|
|
4104
|
-
};
|
|
4105
4092
|
const handleOpenMathConstructor = () => {
|
|
4106
|
-
setMathValue("");
|
|
4107
4093
|
setShowMathConstructor(true);
|
|
4108
4094
|
};
|
|
4109
4095
|
const MathConstructorModal = () => {
|
|
4110
|
-
return /* @__PURE__ */ (0,
|
|
4096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4111
4097
|
BaseModal_default,
|
|
4112
4098
|
{
|
|
4113
4099
|
title: i18n_default.t("math_editor"),
|
|
@@ -4118,164 +4104,87 @@ var InputGroup = ({
|
|
|
4118
4104
|
onRequestClose: () => {
|
|
4119
4105
|
setShowMathConstructor(false);
|
|
4120
4106
|
},
|
|
4121
|
-
children: /* @__PURE__ */ (0,
|
|
4122
|
-
/* @__PURE__ */ (0,
|
|
4123
|
-
|
|
4124
|
-
{
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
"virtual-keyboard-mode": "onfocus",
|
|
4130
|
-
"smart-fence": true,
|
|
4131
|
-
"smart-mode": true,
|
|
4132
|
-
"smart-superscript": true,
|
|
4133
|
-
style: {
|
|
4134
|
-
fontSize: "14px",
|
|
4135
|
-
paddingRight: "16px",
|
|
4136
|
-
paddingLeft: "16px",
|
|
4137
|
-
paddingTop: "8px",
|
|
4138
|
-
paddingBottom: "8px",
|
|
4139
|
-
border: "none",
|
|
4140
|
-
outline: "none",
|
|
4141
|
-
width: "100%",
|
|
4142
|
-
backgroundColor: "transparent",
|
|
4143
|
-
borderRadius: "16px",
|
|
4144
|
-
fontFamily: "inherit"
|
|
4145
|
-
}
|
|
4146
|
-
}
|
|
4147
|
-
) }) }),
|
|
4148
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
4149
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: i18n_default.t("latex_output") }),
|
|
4150
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", children: [
|
|
4151
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4152
|
-
"textarea",
|
|
4153
|
-
{
|
|
4154
|
-
ref: latexTextAreaRef,
|
|
4155
|
-
readOnly: true,
|
|
4156
|
-
value: mathValue ? `$$${mathValue}$$` : "",
|
|
4157
|
-
className: "w-full h-[44px] py-2 px-4 bg-catchup-gray-50 border border-catchup-gray-100 rounded-catchup-large resize-none focus:outline-none",
|
|
4158
|
-
placeholder: i18n_default.t("latex_will_appear_here")
|
|
4159
|
-
}
|
|
4160
|
-
),
|
|
4161
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4162
|
-
"button",
|
|
4163
|
-
{
|
|
4164
|
-
onClick: handleCopyLatex,
|
|
4165
|
-
className: "absolute top-2 right-2 bg-catchup-blue-400 text-white px-3 py-1 rounded-md text-md hover:bg-catchup-blue-500 transition-colors",
|
|
4166
|
-
disabled: !mathValue,
|
|
4167
|
-
children: i18n_default.t("copy")
|
|
4168
|
-
}
|
|
4169
|
-
)
|
|
4170
|
-
] })
|
|
4171
|
-
] }),
|
|
4172
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
4173
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4174
|
-
"button",
|
|
4175
|
-
{
|
|
4176
|
-
onClick: () => setShowCheatSheet(!showCheatSheet),
|
|
4177
|
-
className: "flex items-center gap-x-1 text-md font-semibold pl-2 py-1 text-catchup-blue-400 hover:text-catchup-blue-500 transition-colors",
|
|
4178
|
-
type: "button",
|
|
4179
|
-
children: [
|
|
4180
|
-
i18n_default.t("latex_cheat_sheet"),
|
|
4181
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4182
|
-
"svg",
|
|
4183
|
-
{
|
|
4184
|
-
className: `w-3 h-3 transition-transform ${showCheatSheet ? "rotate-180" : ""}`,
|
|
4185
|
-
fill: "none",
|
|
4186
|
-
stroke: "currentColor",
|
|
4187
|
-
viewBox: "0 0 24 24",
|
|
4188
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4189
|
-
"path",
|
|
4190
|
-
{
|
|
4191
|
-
strokeLinecap: "round",
|
|
4192
|
-
strokeLinejoin: "round",
|
|
4193
|
-
strokeWidth: 2,
|
|
4194
|
-
d: "M19 9l-7 7-7-7"
|
|
4195
|
-
}
|
|
4196
|
-
)
|
|
4197
|
-
}
|
|
4198
|
-
)
|
|
4199
|
-
]
|
|
4200
|
-
}
|
|
4201
|
-
),
|
|
4202
|
-
showCheatSheet && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mt-2 bg-catchup-gray-50 border border-catchup-gray-100 rounded-catchup-large p-4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("table", { className: "w-full text-md", children: [
|
|
4203
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("tr", { className: "text-left text-catchup-gray-400", children: [
|
|
4204
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("th", { className: "pb-2 font-semibold", children: "LaTeX" }),
|
|
4205
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("th", { className: "pb-2 font-semibold" })
|
|
4107
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "bg-catchup-white rounded-lg overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-6", children: [
|
|
4108
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md text-catchup-gray-400 pl-2", children: i18n_default.t("write_equation_in_double_dollars") }),
|
|
4109
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "bg-catchup-gray-50 border border-catchup-gray-100 rounded-catchup-large p-4", children: [
|
|
4110
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-blue-400", children: i18n_default.t("latex_cheat_sheet") }),
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("table", { className: "w-full text-md", children: [
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { className: "text-left text-catchup-gray-400", children: [
|
|
4113
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("th", { className: "pb-2 font-semibold", children: "LaTeX" }),
|
|
4114
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("th", { className: "pb-2 font-semibold" })
|
|
4206
4115
|
] }) }),
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
4208
|
-
/* @__PURE__ */ (0,
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
4210
|
-
/* @__PURE__ */ (0,
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tbody", { className: "font-mono text-catchup-gray-400", children: [
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4118
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\frac{a}{b}" }),
|
|
4119
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\frac{a}{b}$$" }) })
|
|
4211
4120
|
] }),
|
|
4212
|
-
/* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
4121
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "x^{2}" }),
|
|
4123
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$x^{2}$$" }) })
|
|
4215
4124
|
] }),
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4218
|
-
/* @__PURE__ */ (0,
|
|
4125
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4126
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "x_{i}" }),
|
|
4127
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$x_{i}$$" }) })
|
|
4219
4128
|
] }),
|
|
4220
|
-
/* @__PURE__ */ (0,
|
|
4221
|
-
/* @__PURE__ */ (0,
|
|
4222
|
-
/* @__PURE__ */ (0,
|
|
4129
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4130
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\sqrt{x}" }),
|
|
4131
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\sqrt{x}$$" }) })
|
|
4223
4132
|
] }),
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4226
|
-
/* @__PURE__ */ (0,
|
|
4133
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4134
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\sqrt[3]{x}" }),
|
|
4135
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\sqrt[3]{x}$$" }) })
|
|
4227
4136
|
] }),
|
|
4228
|
-
/* @__PURE__ */ (0,
|
|
4229
|
-
/* @__PURE__ */ (0,
|
|
4230
|
-
/* @__PURE__ */ (0,
|
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\sum_{i=1}^{n}" }),
|
|
4139
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\sum_{i=1}^{n}$$" }) })
|
|
4231
4140
|
] }),
|
|
4232
|
-
/* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4234
|
-
/* @__PURE__ */ (0,
|
|
4141
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\int_{a}^{b}" }),
|
|
4143
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\int_{a}^{b}$$" }) })
|
|
4235
4144
|
] }),
|
|
4236
|
-
/* @__PURE__ */ (0,
|
|
4237
|
-
/* @__PURE__ */ (0,
|
|
4238
|
-
/* @__PURE__ */ (0,
|
|
4145
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\infty" }),
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\infty$$" }) })
|
|
4239
4148
|
] }),
|
|
4240
|
-
/* @__PURE__ */ (0,
|
|
4241
|
-
/* @__PURE__ */ (0,
|
|
4242
|
-
/* @__PURE__ */ (0,
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\pi" }),
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\pi$$" }) })
|
|
4243
4152
|
] }),
|
|
4244
|
-
/* @__PURE__ */ (0,
|
|
4245
|
-
/* @__PURE__ */ (0,
|
|
4246
|
-
/* @__PURE__ */ (0,
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\alpha \\beta \\gamma" }),
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\alpha \\beta \\gamma$$" }) })
|
|
4247
4156
|
] }),
|
|
4248
|
-
/* @__PURE__ */ (0,
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4250
|
-
/* @__PURE__ */ (0,
|
|
4157
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4158
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\leq \\geq \\neq" }),
|
|
4159
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\leq \\geq \\neq$$" }) })
|
|
4251
4160
|
] }),
|
|
4252
|
-
/* @__PURE__ */ (0,
|
|
4253
|
-
/* @__PURE__ */ (0,
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4161
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4162
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\pm \\times \\div" }),
|
|
4163
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\pm \\times \\div$$" }) })
|
|
4255
4164
|
] }),
|
|
4256
|
-
/* @__PURE__ */ (0,
|
|
4257
|
-
/* @__PURE__ */ (0,
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\log_{a}{b}" }),
|
|
4167
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\log_{a}{b}$$" }) })
|
|
4259
4168
|
] }),
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4261
|
-
/* @__PURE__ */ (0,
|
|
4262
|
-
/* @__PURE__ */ (0,
|
|
4169
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("tr", { children: [
|
|
4170
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: "\\sin \\cos \\tan" }),
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("td", { className: "py-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputWithSpecialExpression_default, { value: "$$\\sin \\cos \\tan$$" }) })
|
|
4263
4172
|
] })
|
|
4264
4173
|
] })
|
|
4265
|
-
] })
|
|
4174
|
+
] })
|
|
4266
4175
|
] })
|
|
4267
4176
|
] }) })
|
|
4268
4177
|
}
|
|
4269
4178
|
);
|
|
4270
4179
|
};
|
|
4271
4180
|
const CheckboxInputGroup = () => {
|
|
4272
|
-
return /* @__PURE__ */ (0,
|
|
4181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4273
4182
|
"div",
|
|
4274
4183
|
{
|
|
4275
4184
|
className: "flex flex-row items-center gap-x-1 cursor-pointer",
|
|
4276
4185
|
onClick,
|
|
4277
4186
|
children: [
|
|
4278
|
-
/* @__PURE__ */ (0,
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4279
4188
|
BaseImage_default,
|
|
4280
4189
|
{
|
|
4281
4190
|
src: value ? "/icons/checkbox.webp" : "/icons/checkbox-empty.webp",
|
|
@@ -4285,15 +4194,15 @@ var InputGroup = ({
|
|
|
4285
4194
|
}
|
|
4286
4195
|
}
|
|
4287
4196
|
),
|
|
4288
|
-
/* @__PURE__ */ (0,
|
|
4197
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "", children: title })
|
|
4289
4198
|
]
|
|
4290
4199
|
}
|
|
4291
4200
|
);
|
|
4292
4201
|
};
|
|
4293
4202
|
const FileInputGroup = () => {
|
|
4294
|
-
return /* @__PURE__ */ (0,
|
|
4295
|
-
title ? /* @__PURE__ */ (0,
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "my-1", children: [
|
|
4204
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4297
4206
|
"input",
|
|
4298
4207
|
{
|
|
4299
4208
|
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",
|
|
@@ -4310,9 +4219,9 @@ var InputGroup = ({
|
|
|
4310
4219
|
] });
|
|
4311
4220
|
};
|
|
4312
4221
|
const DateInputGroup = () => {
|
|
4313
|
-
return /* @__PURE__ */ (0,
|
|
4314
|
-
title ? /* @__PURE__ */ (0,
|
|
4315
|
-
/* @__PURE__ */ (0,
|
|
4222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "my-1", children: [
|
|
4223
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null,
|
|
4224
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4316
4225
|
"input",
|
|
4317
4226
|
{
|
|
4318
4227
|
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`,
|
|
@@ -4329,9 +4238,9 @@ var InputGroup = ({
|
|
|
4329
4238
|
] });
|
|
4330
4239
|
};
|
|
4331
4240
|
const SearchableSelectInputGroup = () => {
|
|
4332
|
-
return /* @__PURE__ */ (0,
|
|
4333
|
-
title ? /* @__PURE__ */ (0,
|
|
4334
|
-
/* @__PURE__ */ (0,
|
|
4241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "my-1", children: [
|
|
4242
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400 ", children: title }) : null,
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4335
4244
|
import_react_select.default,
|
|
4336
4245
|
{
|
|
4337
4246
|
options: convertOptionListToSelectComponent(
|
|
@@ -4415,16 +4324,16 @@ var InputGroup = ({
|
|
|
4415
4324
|
] });
|
|
4416
4325
|
};
|
|
4417
4326
|
const TextAreaInputGroup = () => {
|
|
4418
|
-
return /* @__PURE__ */ (0,
|
|
4419
|
-
/* @__PURE__ */ (0,
|
|
4420
|
-
/* @__PURE__ */ (0,
|
|
4421
|
-
/* @__PURE__ */ (0,
|
|
4327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "my-1 flex-1 flex flex-col relative", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null }),
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: value && limit ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-md font-semibold pr-2 py-1 text-catchup-gray-400", children: [
|
|
4422
4331
|
value.length,
|
|
4423
4332
|
" / ",
|
|
4424
4333
|
limit
|
|
4425
4334
|
] }) : null })
|
|
4426
4335
|
] }),
|
|
4427
|
-
/* @__PURE__ */ (0,
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4428
4337
|
"textarea",
|
|
4429
4338
|
{
|
|
4430
4339
|
ref: textAreaRef,
|
|
@@ -4437,22 +4346,22 @@ var InputGroup = ({
|
|
|
4437
4346
|
onKeyDown
|
|
4438
4347
|
}
|
|
4439
4348
|
),
|
|
4440
|
-
useMath && /* @__PURE__ */ (0,
|
|
4349
|
+
useMath && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4441
4350
|
"button",
|
|
4442
4351
|
{
|
|
4443
4352
|
className: "absolute right-2 top-1/2 transform -translate-y-1/2 bg-catchup-blue-400 text-white rounded-md px-3 py-1 shadow-sm hover:bg-catchup-blue-500 transition-colors duration-200 z-10",
|
|
4444
4353
|
onClick: handleOpenMathConstructor,
|
|
4445
4354
|
type: "button",
|
|
4446
|
-
children: /* @__PURE__ */ (0,
|
|
4447
|
-
/* @__PURE__ */ (0,
|
|
4448
|
-
/* @__PURE__ */ (0,
|
|
4355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-medium", children: "\u{1D453}(x)" }),
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4449
4358
|
"svg",
|
|
4450
4359
|
{
|
|
4451
4360
|
className: "w-3 h-3",
|
|
4452
4361
|
fill: "none",
|
|
4453
4362
|
stroke: "currentColor",
|
|
4454
4363
|
viewBox: "0 0 24 24",
|
|
4455
|
-
children: /* @__PURE__ */ (0,
|
|
4364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4456
4365
|
"path",
|
|
4457
4366
|
{
|
|
4458
4367
|
strokeLinecap: "round",
|
|
@@ -4469,20 +4378,20 @@ var InputGroup = ({
|
|
|
4469
4378
|
] });
|
|
4470
4379
|
};
|
|
4471
4380
|
const TextInputGroup = () => {
|
|
4472
|
-
return /* @__PURE__ */ (0,
|
|
4473
|
-
/* @__PURE__ */ (0,
|
|
4474
|
-
/* @__PURE__ */ (0,
|
|
4475
|
-
/* @__PURE__ */ (0,
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "my-1 relative", children: [
|
|
4382
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: title ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md font-semibold pl-2 py-1 text-catchup-gray-400", children: title }) : null }),
|
|
4384
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: value && limit ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-md font-semibold pr-2 py-1 text-catchup-gray-400", children: [
|
|
4476
4385
|
value.length,
|
|
4477
4386
|
" / ",
|
|
4478
4387
|
limit
|
|
4479
4388
|
] }) : null })
|
|
4480
4389
|
] }),
|
|
4481
|
-
/* @__PURE__ */ (0,
|
|
4390
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4482
4391
|
"div",
|
|
4483
4392
|
{
|
|
4484
4393
|
className: `w-full border ${errorText ? "border-catchup-red shadow-error" : "border-catchup-gray-100"} rounded-catchup-large focus-within:border-catchup-blue-400 focus-within:shadow-input ${disabled ? "bg-catchup-lighter-gray" : "bg-catchup-white"}`,
|
|
4485
|
-
children: /* @__PURE__ */ (0,
|
|
4394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4486
4395
|
"input",
|
|
4487
4396
|
{
|
|
4488
4397
|
disabled,
|
|
@@ -4500,22 +4409,22 @@ var InputGroup = ({
|
|
|
4500
4409
|
)
|
|
4501
4410
|
}
|
|
4502
4411
|
),
|
|
4503
|
-
useMath && /* @__PURE__ */ (0,
|
|
4412
|
+
useMath && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4504
4413
|
"button",
|
|
4505
4414
|
{
|
|
4506
4415
|
className: "absolute right-2 top-1/2 transform -translate-y-1/2 bg-catchup-blue-400 text-white rounded-md px-3 py-1 shadow-sm hover:bg-catchup-blue-500 transition-colors duration-200",
|
|
4507
4416
|
onClick: handleOpenMathConstructor,
|
|
4508
4417
|
type: "button",
|
|
4509
|
-
children: /* @__PURE__ */ (0,
|
|
4510
|
-
/* @__PURE__ */ (0,
|
|
4511
|
-
/* @__PURE__ */ (0,
|
|
4418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
4419
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-medium", children: "\u{1D453}(x)" }),
|
|
4420
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4512
4421
|
"svg",
|
|
4513
4422
|
{
|
|
4514
4423
|
className: "w-3 h-3",
|
|
4515
4424
|
fill: "none",
|
|
4516
4425
|
stroke: "currentColor",
|
|
4517
4426
|
viewBox: "0 0 24 24",
|
|
4518
|
-
children: /* @__PURE__ */ (0,
|
|
4427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4519
4428
|
"path",
|
|
4520
4429
|
{
|
|
4521
4430
|
strokeLinecap: "round",
|
|
@@ -4532,9 +4441,9 @@ var InputGroup = ({
|
|
|
4532
4441
|
] });
|
|
4533
4442
|
};
|
|
4534
4443
|
const SwitchInputGroup = () => {
|
|
4535
|
-
return /* @__PURE__ */ (0,
|
|
4536
|
-
/* @__PURE__ */ (0,
|
|
4537
|
-
/* @__PURE__ */ (0,
|
|
4444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col my-1", children: [
|
|
4445
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row items-center", children: [
|
|
4446
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4538
4447
|
import_react_switch.default,
|
|
4539
4448
|
{
|
|
4540
4449
|
onChange: () => {
|
|
@@ -4553,7 +4462,7 @@ var InputGroup = ({
|
|
|
4553
4462
|
disabled
|
|
4554
4463
|
}
|
|
4555
4464
|
),
|
|
4556
|
-
/* @__PURE__ */ (0,
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4557
4466
|
"p",
|
|
4558
4467
|
{
|
|
4559
4468
|
className: `${checked ? "font-bold" : "text-catchup-gray"} px-2 transition-all duration-300`,
|
|
@@ -4561,7 +4470,7 @@ var InputGroup = ({
|
|
|
4561
4470
|
}
|
|
4562
4471
|
)
|
|
4563
4472
|
] }),
|
|
4564
|
-
description ? /* @__PURE__ */ (0,
|
|
4473
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-md text-catchup-gray-300 mt-1 ml-12", children: description }) : null
|
|
4565
4474
|
] });
|
|
4566
4475
|
};
|
|
4567
4476
|
const RenderMainContent = () => {
|
|
@@ -4583,9 +4492,9 @@ var InputGroup = ({
|
|
|
4583
4492
|
return SwitchInputGroup();
|
|
4584
4493
|
}
|
|
4585
4494
|
};
|
|
4586
|
-
return /* @__PURE__ */ (0,
|
|
4495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
4587
4496
|
RenderMainContent(),
|
|
4588
|
-
/* @__PURE__ */ (0,
|
|
4497
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(MathConstructorModal, {})
|
|
4589
4498
|
] });
|
|
4590
4499
|
};
|
|
4591
4500
|
var InputGroup_default = InputGroup;
|
|
@@ -4717,7 +4626,7 @@ var getSystemLanguageFromCurriculumType = (curriculumType) => {
|
|
|
4717
4626
|
|
|
4718
4627
|
// src/components/dropdowns/MediaDropdown.tsx
|
|
4719
4628
|
var import_react14 = require("react");
|
|
4720
|
-
var
|
|
4629
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4721
4630
|
var MediaDropdown = ({ id, answer, optionList }) => {
|
|
4722
4631
|
const [showDropdown, setShowDropdown] = (0, import_react14.useState)(false);
|
|
4723
4632
|
const dropdownRef = (0, import_react14.useRef)(null);
|
|
@@ -4747,8 +4656,8 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4747
4656
|
}
|
|
4748
4657
|
setShowDropdown(false);
|
|
4749
4658
|
};
|
|
4750
|
-
return /* @__PURE__ */ (0,
|
|
4751
|
-
/* @__PURE__ */ (0,
|
|
4659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref: dropdownRef, className: "w-full relative", children: [
|
|
4660
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4752
4661
|
"div",
|
|
4753
4662
|
{
|
|
4754
4663
|
className: "w-full flex flex-col items-center justify-center cursor-pointer",
|
|
@@ -4756,16 +4665,16 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4756
4665
|
children: answer
|
|
4757
4666
|
}
|
|
4758
4667
|
),
|
|
4759
|
-
/* @__PURE__ */ (0,
|
|
4668
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4760
4669
|
"ul",
|
|
4761
4670
|
{
|
|
4762
4671
|
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`,
|
|
4763
|
-
children: optionList.map((option, index) => /* @__PURE__ */ (0,
|
|
4672
|
+
children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4764
4673
|
"li",
|
|
4765
4674
|
{
|
|
4766
4675
|
className: `${option.listItemClassNames ? option.listItemClassNames : ""}`,
|
|
4767
4676
|
children: [
|
|
4768
|
-
/* @__PURE__ */ (0,
|
|
4677
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4769
4678
|
"div",
|
|
4770
4679
|
{
|
|
4771
4680
|
className: `w-full flex flex-col my-2 cursor-pointer ${option.divClassNames ? option.divClassNames : ""}`,
|
|
@@ -4773,7 +4682,7 @@ var MediaDropdown = ({ id, answer, optionList }) => {
|
|
|
4773
4682
|
children: option.media
|
|
4774
4683
|
}
|
|
4775
4684
|
),
|
|
4776
|
-
index !== optionList.length - 1 ? /* @__PURE__ */ (0,
|
|
4685
|
+
index !== optionList.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-full border my-1 border-catchup-light-blue rounded-catchup-full" }) : null
|
|
4777
4686
|
]
|
|
4778
4687
|
},
|
|
4779
4688
|
option.id
|
|
@@ -4787,7 +4696,7 @@ var MediaDropdown_default = MediaDropdown;
|
|
|
4787
4696
|
// src/components/activities/material-contents/ShowMaterialMediaByContentType.tsx
|
|
4788
4697
|
var import_react15 = require("react");
|
|
4789
4698
|
var import_react_modal3 = __toESM(require("react-modal"));
|
|
4790
|
-
var
|
|
4699
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4791
4700
|
var ShowMaterialMediaByContentType = ({
|
|
4792
4701
|
key,
|
|
4793
4702
|
contentType,
|
|
@@ -4803,7 +4712,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4803
4712
|
setIsLoaded(false);
|
|
4804
4713
|
}, []);
|
|
4805
4714
|
const RenderShowFullScreenItem = () => {
|
|
4806
|
-
return /* @__PURE__ */ (0,
|
|
4715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4807
4716
|
import_react_modal3.default,
|
|
4808
4717
|
{
|
|
4809
4718
|
isOpen: showFullScreen,
|
|
@@ -4834,8 +4743,8 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4834
4743
|
}
|
|
4835
4744
|
},
|
|
4836
4745
|
contentLabel: "",
|
|
4837
|
-
children: /* @__PURE__ */ (0,
|
|
4838
|
-
/* @__PURE__ */ (0,
|
|
4746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
4747
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4839
4748
|
BaseImage_default,
|
|
4840
4749
|
{
|
|
4841
4750
|
src: "/icons/cross-red.webp",
|
|
@@ -4847,7 +4756,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4847
4756
|
}
|
|
4848
4757
|
}
|
|
4849
4758
|
) }),
|
|
4850
|
-
/* @__PURE__ */ (0,
|
|
4759
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4851
4760
|
BaseImage_default,
|
|
4852
4761
|
{
|
|
4853
4762
|
src: selectedFullScreenItem,
|
|
@@ -4860,10 +4769,10 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4860
4769
|
}
|
|
4861
4770
|
);
|
|
4862
4771
|
};
|
|
4863
|
-
return contentType === "IMAGE" ? /* @__PURE__ */ (0,
|
|
4772
|
+
return contentType === "IMAGE" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
4864
4773
|
RenderShowFullScreenItem(),
|
|
4865
|
-
/* @__PURE__ */ (0,
|
|
4866
|
-
/* @__PURE__ */ (0,
|
|
4774
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center relative", children: [
|
|
4775
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4867
4776
|
BaseImage_default,
|
|
4868
4777
|
{
|
|
4869
4778
|
src,
|
|
@@ -4878,7 +4787,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4878
4787
|
}
|
|
4879
4788
|
}
|
|
4880
4789
|
),
|
|
4881
|
-
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0,
|
|
4790
|
+
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4882
4791
|
"div",
|
|
4883
4792
|
{
|
|
4884
4793
|
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 bg-catchup-white bg-opacity-80",
|
|
@@ -4890,7 +4799,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4890
4799
|
setShowFullScreen(true);
|
|
4891
4800
|
setSelectedFullScreenItem(src);
|
|
4892
4801
|
},
|
|
4893
|
-
children: /* @__PURE__ */ (0,
|
|
4802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4894
4803
|
BaseImage_default,
|
|
4895
4804
|
{
|
|
4896
4805
|
src: "/icons/arrow-up.webp",
|
|
@@ -4902,7 +4811,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4902
4811
|
}
|
|
4903
4812
|
) : null
|
|
4904
4813
|
] }) }) })
|
|
4905
|
-
] }) : contentType === "VIDEO" ? /* @__PURE__ */ (0,
|
|
4814
|
+
] }) : contentType === "VIDEO" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4906
4815
|
"video",
|
|
4907
4816
|
{
|
|
4908
4817
|
ref: videoRef,
|
|
@@ -4912,7 +4821,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4912
4821
|
onClick: () => {
|
|
4913
4822
|
}
|
|
4914
4823
|
}
|
|
4915
|
-
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0,
|
|
4824
|
+
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
4916
4825
|
"audio",
|
|
4917
4826
|
{
|
|
4918
4827
|
className: "w-full rounded-catchup-xlarge",
|
|
@@ -4926,7 +4835,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4926
4835
|
var ShowMaterialMediaByContentType_default = ShowMaterialMediaByContentType;
|
|
4927
4836
|
|
|
4928
4837
|
// src/components/activities/material-contents/DropdownActivityMaterialContent.tsx
|
|
4929
|
-
var
|
|
4838
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4930
4839
|
var DropdownActivityMaterialContent = ({
|
|
4931
4840
|
uniqueValue,
|
|
4932
4841
|
answerMap,
|
|
@@ -4951,20 +4860,20 @@ var DropdownActivityMaterialContent = ({
|
|
|
4951
4860
|
setDisplayAnswerMap(answerMap);
|
|
4952
4861
|
}
|
|
4953
4862
|
}, [showCorrectAnswer, answerMap, materialMap]);
|
|
4954
|
-
return /* @__PURE__ */ (0,
|
|
4955
|
-
/* @__PURE__ */ (0,
|
|
4956
|
-
/* @__PURE__ */ (0,
|
|
4957
|
-
/* @__PURE__ */ (0,
|
|
4863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
4864
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_dropdown_text") }) }),
|
|
4865
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "hidden md:block flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DividerLine_default, {}) }),
|
|
4866
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full flex flex-row flex-wrap", children: Object.keys(displayAnswerMap).map(
|
|
4958
4867
|
(materialKey, index) => {
|
|
4959
4868
|
const answerKey = Object.keys(materialMap[materialKey])[0];
|
|
4960
4869
|
const learnerAnswerState = !isPreview ? null : checkAnswerState(answerKey, displayAnswerMap[materialKey]);
|
|
4961
|
-
return /* @__PURE__ */ (0,
|
|
4962
|
-
/* @__PURE__ */ (0,
|
|
4870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full md:w-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mx-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full flex flex-row my-2 gap-x-2", children: [
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "my-auto", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("p", { className: "text-xl", children: [
|
|
4963
4872
|
parseFloat(materialKey) + 1,
|
|
4964
4873
|
"."
|
|
4965
4874
|
] }) }),
|
|
4966
|
-
/* @__PURE__ */ (0,
|
|
4967
|
-
/* @__PURE__ */ (0,
|
|
4875
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full relative", children: [
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1", children: checkCanAnswerQuestion() ? contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4968
4877
|
InputGroup_default,
|
|
4969
4878
|
{
|
|
4970
4879
|
type: "select",
|
|
@@ -4972,14 +4881,14 @@ var DropdownActivityMaterialContent = ({
|
|
|
4972
4881
|
optionList: shuffleArray(
|
|
4973
4882
|
materialMap[materialKey][answerKey]
|
|
4974
4883
|
).map((materialOption) => ({
|
|
4975
|
-
text: /* @__PURE__ */ (0,
|
|
4884
|
+
text: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
4976
4885
|
materialOption
|
|
4977
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
4886
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4978
4887
|
"span",
|
|
4979
4888
|
{
|
|
4980
4889
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
4981
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4982
|
-
|
|
4890
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4891
|
+
import_react_katex3.InlineMath,
|
|
4983
4892
|
{
|
|
4984
4893
|
math: inputPart.value
|
|
4985
4894
|
}
|
|
@@ -4997,11 +4906,11 @@ var DropdownActivityMaterialContent = ({
|
|
|
4997
4906
|
);
|
|
4998
4907
|
}
|
|
4999
4908
|
}
|
|
5000
|
-
) }) : /* @__PURE__ */ (0,
|
|
4909
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5001
4910
|
MediaDropdown_default,
|
|
5002
4911
|
{
|
|
5003
4912
|
id: materialKey,
|
|
5004
|
-
answer: displayAnswerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0,
|
|
4913
|
+
answer: displayAnswerMap[materialKey] === "DEFAULT_OPTION" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-catchup-activity-media-box-item h-catchup-activity-media-box-item border rounded-catchup-xlarge border-dashed border-catchup-blue", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-full flex flex-col items-center justify-center px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "italic", children: i18n_default.t("please_select") }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5005
4914
|
ShowMaterialMediaByContentType_default,
|
|
5006
4915
|
{
|
|
5007
4916
|
contentType: contentMap.type,
|
|
@@ -5012,7 +4921,7 @@ var DropdownActivityMaterialContent = ({
|
|
|
5012
4921
|
),
|
|
5013
4922
|
optionList: materialMap[materialKey][answerKey].map((materialOption, index2) => ({
|
|
5014
4923
|
id: index2,
|
|
5015
|
-
media: /* @__PURE__ */ (0,
|
|
4924
|
+
media: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5016
4925
|
ShowMaterialMediaByContentType_default,
|
|
5017
4926
|
{
|
|
5018
4927
|
contentType: contentMap.type,
|
|
@@ -5030,24 +4939,24 @@ var DropdownActivityMaterialContent = ({
|
|
|
5030
4939
|
}
|
|
5031
4940
|
}))
|
|
5032
4941
|
}
|
|
5033
|
-
) : /* @__PURE__ */ (0,
|
|
4942
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(
|
|
5034
4943
|
displayAnswerMap[materialKey]
|
|
5035
|
-
).map((inputPart, index2) => /* @__PURE__ */ (0,
|
|
4944
|
+
).map((inputPart, index2) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5036
4945
|
"span",
|
|
5037
4946
|
{
|
|
5038
4947
|
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5039
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0,
|
|
4948
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
5040
4949
|
},
|
|
5041
4950
|
index2
|
|
5042
4951
|
)) }) }),
|
|
5043
|
-
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0,
|
|
4952
|
+
learnerAnswerState === "CORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5044
4953
|
BaseImage_default,
|
|
5045
4954
|
{
|
|
5046
4955
|
src: "/icons/checkbox.webp",
|
|
5047
4956
|
alt: "chekbbox",
|
|
5048
4957
|
size: "small"
|
|
5049
4958
|
}
|
|
5050
|
-
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0,
|
|
4959
|
+
) }) : learnerAnswerState === "INCORRECT" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute -top-2 right-3 bg-catchup-white", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5051
4960
|
BaseImage_default,
|
|
5052
4961
|
{
|
|
5053
4962
|
src: "/icons/cross-red.webp",
|
|
@@ -5065,7 +4974,7 @@ var DropdownActivityMaterialContent_default = DropdownActivityMaterialContent;
|
|
|
5065
4974
|
|
|
5066
4975
|
// src/components/activities/DropdownActivityContent.tsx
|
|
5067
4976
|
var import_react18 = require("react");
|
|
5068
|
-
var
|
|
4977
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5069
4978
|
var DropdownActivityContent = ({
|
|
5070
4979
|
answerMap,
|
|
5071
4980
|
data,
|
|
@@ -5088,8 +4997,8 @@ var DropdownActivityContent = ({
|
|
|
5088
4997
|
setCurrentAnswerMap(answerMap2);
|
|
5089
4998
|
changeAnswer(answerMap2);
|
|
5090
4999
|
};
|
|
5091
|
-
return /* @__PURE__ */ (0,
|
|
5092
|
-
/* @__PURE__ */ (0,
|
|
5000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: `flex flex-col ${isFullScreen ? "" : "md:flex-row"} h-full`, children: [
|
|
5001
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[60%] md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5093
5002
|
ActivityBodyContent_default,
|
|
5094
5003
|
{
|
|
5095
5004
|
bodyMap: dropdownBodyMap,
|
|
@@ -5098,9 +5007,9 @@ var DropdownActivityContent = ({
|
|
|
5098
5007
|
templateType: "DROPDOWN"
|
|
5099
5008
|
}
|
|
5100
5009
|
) }),
|
|
5101
|
-
/* @__PURE__ */ (0,
|
|
5102
|
-
/* @__PURE__ */ (0,
|
|
5103
|
-
/* @__PURE__ */ (0,
|
|
5010
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DividerLine_default, {}) }),
|
|
5011
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(VerticalDividerLine_default, {}) }),
|
|
5012
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1 md:overflow-y-auto"}`, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5104
5013
|
DropdownActivityMaterialContent_default,
|
|
5105
5014
|
{
|
|
5106
5015
|
uniqueValue: JSON.stringify(data.contentMap),
|
|
@@ -5120,32 +5029,6 @@ var DropdownActivityContent_default = DropdownActivityContent;
|
|
|
5120
5029
|
// src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
|
|
5121
5030
|
var import_react_katex4 = require("react-katex");
|
|
5122
5031
|
var import_react19 = require("react");
|
|
5123
|
-
|
|
5124
|
-
// src/components/texts/InputWithSpecialExpression.tsx
|
|
5125
|
-
var import_react_katex3 = require("react-katex");
|
|
5126
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5127
|
-
var InputWithSpecialExpression = ({
|
|
5128
|
-
value,
|
|
5129
|
-
showSpecialOnly
|
|
5130
|
-
}) => {
|
|
5131
|
-
const inputWithSpecialExpressionList = constructInputWithSpecialExpressionList(value);
|
|
5132
|
-
return showSpecialOnly ? inputWithSpecialExpressionList.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5133
|
-
"span",
|
|
5134
|
-
{
|
|
5135
|
-
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5136
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
5137
|
-
}
|
|
5138
|
-
)) }) }) : null : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "m-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "whitespace-pre-wrap", children: inputWithSpecialExpressionList.map((inputPart, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5139
|
-
"span",
|
|
5140
|
-
{
|
|
5141
|
-
className: `${inputPart.isBold ? "font-semibold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
5142
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_katex3.InlineMath, { math: inputPart.value }, index) }) : inputPart.value
|
|
5143
|
-
}
|
|
5144
|
-
)) }) });
|
|
5145
|
-
};
|
|
5146
|
-
var InputWithSpecialExpression_default = InputWithSpecialExpression;
|
|
5147
|
-
|
|
5148
|
-
// src/components/activities/material-contents/FillInTheBlanksActivityMaterialContent.tsx
|
|
5149
5032
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5150
5033
|
var FillInTheBlanksActivityMaterialContent = ({
|
|
5151
5034
|
uniqueValue,
|
|
@@ -8535,14 +8418,14 @@ var retrieveCampusDTOOptionList = (campusDTOList) => {
|
|
|
8535
8418
|
value: campusDTO.id,
|
|
8536
8419
|
text: `${campusDTO.name} (${campusDTO.brandDTO.name})`,
|
|
8537
8420
|
fullValue: campusDTO
|
|
8538
|
-
}));
|
|
8421
|
+
})).sort((a, b) => a.text.localeCompare(b.text, void 0, { numeric: true }));
|
|
8539
8422
|
};
|
|
8540
8423
|
var retrieveInstitutionDTOOptionList = (institutionDTOList) => {
|
|
8541
8424
|
return institutionDTOList.map((institutionDTO) => ({
|
|
8542
8425
|
value: institutionDTO.id,
|
|
8543
8426
|
text: `${institutionDTO.name} (${institutionDTO.campusDTO.name} - ${institutionDTO.campusDTO.brandDTO.name})`,
|
|
8544
8427
|
fullValue: institutionDTO
|
|
8545
|
-
}));
|
|
8428
|
+
})).sort((a, b) => a.text.localeCompare(b.text, void 0, { numeric: true }));
|
|
8546
8429
|
};
|
|
8547
8430
|
var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
8548
8431
|
return seasonDTOList.map((seasonDTO) => ({
|
|
@@ -8550,7 +8433,7 @@ var retrieveSeasonDTOOptionList = (seasonDTOList) => {
|
|
|
8550
8433
|
text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name})`,
|
|
8551
8434
|
fullValue: seasonDTO
|
|
8552
8435
|
// text: `${seasonDTO.name} (${seasonDTO.institutionDTO.name} - ${seasonDTO.institutionDTO.campusDTO.name}/${seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8553
|
-
}));
|
|
8436
|
+
})).sort((a, b) => a.text.localeCompare(b.text, void 0, { numeric: true }));
|
|
8554
8437
|
};
|
|
8555
8438
|
var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
8556
8439
|
return gradeDTOList.map((gradeDTO) => ({
|
|
@@ -8558,7 +8441,7 @@ var retrieveGradeDTOOptionList = (gradeDTOList) => {
|
|
|
8558
8441
|
text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
8559
8442
|
fullValue: gradeDTO
|
|
8560
8443
|
// text: `${gradeDTO.name} (${gradeDTO.seasonDTO.name} ${gradeDTO.seasonDTO.institutionDTO.name} - ${gradeDTO.seasonDTO.institutionDTO.campusDTO.name}/${gradeDTO.seasonDTO.institutionDTO.campusDTO.brandDTO.name})`,
|
|
8561
|
-
}));
|
|
8444
|
+
})).sort((a, b) => a.text.localeCompare(b.text, void 0, { numeric: true }));
|
|
8562
8445
|
};
|
|
8563
8446
|
var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
8564
8447
|
return branchDTOList.map((branchDTO) => ({
|
|
@@ -8566,7 +8449,7 @@ var retrieveBranchDTOOptionList = (branchDTOList) => {
|
|
|
8566
8449
|
text: `${branchDTO.name} (${branchDTO.gradeDTO.name} - ${branchDTO.gradeDTO.seasonDTO.name}/${branchDTO.gradeDTO.seasonDTO.institutionDTO.name})`,
|
|
8567
8450
|
fullValue: branchDTO
|
|
8568
8451
|
// 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})`,
|
|
8569
|
-
}));
|
|
8452
|
+
})).sort((a, b) => a.text.localeCompare(b.text, void 0, { numeric: true }));
|
|
8570
8453
|
};
|
|
8571
8454
|
var retrieveCampusDTOByUserProfileOptionList = (userProfile, selectedBrandId) => {
|
|
8572
8455
|
const campusDTOOptionList = [];
|