catchup-library-web 1.15.6 → 1.15.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -14
- package/dist/index.mjs +20 -15
- package/package.json +1 -1
- package/src/components/activities/ActivityPreviewByAnswerData.tsx +24 -22
package/dist/index.js
CHANGED
|
@@ -7251,8 +7251,11 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7251
7251
|
const commonProps = {
|
|
7252
7252
|
answer,
|
|
7253
7253
|
data,
|
|
7254
|
-
canAnswerQuestion: () =>
|
|
7255
|
-
changeAnswer: (newAnswer) =>
|
|
7254
|
+
canAnswerQuestion: () => true,
|
|
7255
|
+
// changeAnswer: (newAnswer: Answer) =>
|
|
7256
|
+
// setAnswer(JSON.parse(JSON.stringify(newAnswer))),
|
|
7257
|
+
changeAnswer: () => {
|
|
7258
|
+
},
|
|
7256
7259
|
isPreview: true,
|
|
7257
7260
|
showCorrectAnswer,
|
|
7258
7261
|
isFullScreen
|
|
@@ -7287,20 +7290,22 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7287
7290
|
};
|
|
7288
7291
|
if (!data) return null;
|
|
7289
7292
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { children: [
|
|
7290
|
-
showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7293
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
7294
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mb-4", children: [
|
|
7295
|
+
showDescription ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7296
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7297
|
+
SelectionBox_default,
|
|
7298
|
+
{
|
|
7299
|
+
optionList,
|
|
7300
|
+
selectedId: selectedType,
|
|
7301
|
+
handleSelectOnClick: (itemId) => {
|
|
7302
|
+
setSelectedType(itemId);
|
|
7303
|
+
}
|
|
7299
7304
|
}
|
|
7300
|
-
|
|
7301
|
-
)
|
|
7305
|
+
)
|
|
7306
|
+
] }),
|
|
7307
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DividerLine_default, {})
|
|
7302
7308
|
] }) : null,
|
|
7303
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DividerLine_default, {}),
|
|
7304
7309
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col my-2 w-full p-5", children: [
|
|
7305
7310
|
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}) : null,
|
|
7306
7311
|
selectedType ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: RenderSelectedActivityContent() }, selectedType) : null
|
package/dist/index.mjs
CHANGED
|
@@ -6944,7 +6944,7 @@ var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
|
6944
6944
|
|
|
6945
6945
|
// src/components/activities/ActivityPreviewByAnswerData.tsx
|
|
6946
6946
|
import { useEffect as useEffect15, useState as useState25 } from "react";
|
|
6947
|
-
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6947
|
+
import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6948
6948
|
var ActivityPreviewByAnswerData = ({
|
|
6949
6949
|
data,
|
|
6950
6950
|
showType = true,
|
|
@@ -7041,8 +7041,11 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7041
7041
|
const commonProps = {
|
|
7042
7042
|
answer,
|
|
7043
7043
|
data,
|
|
7044
|
-
canAnswerQuestion: () =>
|
|
7045
|
-
changeAnswer: (newAnswer) =>
|
|
7044
|
+
canAnswerQuestion: () => true,
|
|
7045
|
+
// changeAnswer: (newAnswer: Answer) =>
|
|
7046
|
+
// setAnswer(JSON.parse(JSON.stringify(newAnswer))),
|
|
7047
|
+
changeAnswer: () => {
|
|
7048
|
+
},
|
|
7046
7049
|
isPreview: true,
|
|
7047
7050
|
showCorrectAnswer,
|
|
7048
7051
|
isFullScreen
|
|
@@ -7077,20 +7080,22 @@ var ActivityPreviewByAnswerData = ({
|
|
|
7077
7080
|
};
|
|
7078
7081
|
if (!data) return null;
|
|
7079
7082
|
return /* @__PURE__ */ jsxs37("div", { children: [
|
|
7080
|
-
showType && optionList.length > 0 ? /* @__PURE__ */ jsxs37(
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7083
|
+
showType && optionList.length > 0 ? /* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7084
|
+
/* @__PURE__ */ jsxs37("div", { className: "mb-4", children: [
|
|
7085
|
+
showDescription ? /* @__PURE__ */ jsx49("div", { className: "my-2", children: /* @__PURE__ */ jsx49("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
|
|
7086
|
+
/* @__PURE__ */ jsx49(
|
|
7087
|
+
SelectionBox_default,
|
|
7088
|
+
{
|
|
7089
|
+
optionList,
|
|
7090
|
+
selectedId: selectedType,
|
|
7091
|
+
handleSelectOnClick: (itemId) => {
|
|
7092
|
+
setSelectedType(itemId);
|
|
7093
|
+
}
|
|
7089
7094
|
}
|
|
7090
|
-
|
|
7091
|
-
)
|
|
7095
|
+
)
|
|
7096
|
+
] }),
|
|
7097
|
+
/* @__PURE__ */ jsx49(DividerLine_default, {})
|
|
7092
7098
|
] }) : null,
|
|
7093
|
-
/* @__PURE__ */ jsx49(DividerLine_default, {}),
|
|
7094
7099
|
/* @__PURE__ */ jsxs37("div", { className: "flex flex-col my-2 w-full p-5", children: [
|
|
7095
7100
|
((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ jsx49(ActivityEmptyContent_default, {}) : null,
|
|
7096
7101
|
selectedType ? /* @__PURE__ */ jsx49("div", { children: RenderSelectedActivityContent() }, selectedType) : null
|
package/package.json
CHANGED
|
@@ -149,9 +149,10 @@ const ActivityPreviewByAnswerData = ({
|
|
|
149
149
|
const commonProps = {
|
|
150
150
|
answer,
|
|
151
151
|
data,
|
|
152
|
-
canAnswerQuestion: () =>
|
|
153
|
-
changeAnswer: (newAnswer: Answer) =>
|
|
154
|
-
|
|
152
|
+
canAnswerQuestion: () => true,
|
|
153
|
+
// changeAnswer: (newAnswer: Answer) =>
|
|
154
|
+
// setAnswer(JSON.parse(JSON.stringify(newAnswer))),
|
|
155
|
+
changeAnswer: () => {},
|
|
155
156
|
isPreview: true,
|
|
156
157
|
showCorrectAnswer,
|
|
157
158
|
isFullScreen,
|
|
@@ -217,27 +218,28 @@ const ActivityPreviewByAnswerData = ({
|
|
|
217
218
|
return (
|
|
218
219
|
<div key={key}>
|
|
219
220
|
{showType && optionList.length > 0 ? (
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
221
|
+
<>
|
|
222
|
+
<div className="mb-4">
|
|
223
|
+
{showDescription ? (
|
|
224
|
+
<div className="my-2">
|
|
225
|
+
<p className="font-semibold text-lg">
|
|
226
|
+
{i18n.t("activity_template")}
|
|
227
|
+
</p>
|
|
228
|
+
</div>
|
|
229
|
+
) : null}
|
|
230
|
+
|
|
231
|
+
<SelectionBox
|
|
232
|
+
optionList={optionList}
|
|
233
|
+
selectedId={selectedType}
|
|
234
|
+
handleSelectOnClick={(itemId) => {
|
|
235
|
+
setSelectedType(itemId);
|
|
236
|
+
}}
|
|
237
|
+
/>
|
|
238
|
+
</div>
|
|
239
|
+
<DividerLine />
|
|
240
|
+
</>
|
|
237
241
|
) : null}
|
|
238
242
|
|
|
239
|
-
<DividerLine />
|
|
240
|
-
|
|
241
243
|
<div className="flex flex-col my-2 w-full p-5">
|
|
242
244
|
{answer?.data[0]?.isEmpty ? <ActivityEmptyContent /> : null}
|
|
243
245
|
|