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 CHANGED
@@ -7251,8 +7251,11 @@ var ActivityPreviewByAnswerData = ({
7251
7251
  const commonProps = {
7252
7252
  answer,
7253
7253
  data,
7254
- canAnswerQuestion: () => false,
7255
- changeAnswer: (newAnswer) => setAnswer(JSON.parse(JSON.stringify(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)("div", { className: "mb-4", children: [
7291
- 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,
7292
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7293
- SelectionBox_default,
7294
- {
7295
- optionList,
7296
- selectedId: selectedType,
7297
- handleSelectOnClick: (itemId) => {
7298
- setSelectedType(itemId);
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: () => false,
7045
- changeAnswer: (newAnswer) => setAnswer(JSON.parse(JSON.stringify(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("div", { className: "mb-4", children: [
7081
- showDescription ? /* @__PURE__ */ jsx49("div", { className: "my-2", children: /* @__PURE__ */ jsx49("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
7082
- /* @__PURE__ */ jsx49(
7083
- SelectionBox_default,
7084
- {
7085
- optionList,
7086
- selectedId: selectedType,
7087
- handleSelectOnClick: (itemId) => {
7088
- setSelectedType(itemId);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.15.6",
3
+ "version": "1.15.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -149,9 +149,10 @@ const ActivityPreviewByAnswerData = ({
149
149
  const commonProps = {
150
150
  answer,
151
151
  data,
152
- canAnswerQuestion: () => false,
153
- changeAnswer: (newAnswer: Answer) =>
154
- setAnswer(JSON.parse(JSON.stringify(newAnswer))),
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
- <div className="mb-4">
221
- {showDescription ? (
222
- <div className="my-2">
223
- <p className="font-semibold text-lg">
224
- {i18n.t("activity_template")}
225
- </p>
226
- </div>
227
- ) : null}
228
-
229
- <SelectionBox
230
- optionList={optionList}
231
- selectedId={selectedType}
232
- handleSelectOnClick={(itemId) => {
233
- setSelectedType(itemId);
234
- }}
235
- />
236
- </div>
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