catchup-library-web 1.15.7 → 1.15.9

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
@@ -6997,18 +6997,21 @@ var ActivityPreviewByData = ({
6997
6997
  if (!data) return;
6998
6998
  const answer = constructAnswerBasedOnData(data);
6999
6999
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { children: [
7000
- showType ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mb-4", children: [
7001
- showDescription ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
7002
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7003
- SelectionBox_default,
7004
- {
7005
- optionList,
7006
- selectedId: selectedType,
7007
- handleSelectOnClick: (itemId) => {
7008
- setSelectedType(itemId);
7000
+ showType ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
7001
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "mb-4", children: [
7002
+ showDescription ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
7003
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7004
+ SelectionBox_default,
7005
+ {
7006
+ optionList,
7007
+ selectedId: selectedType,
7008
+ handleSelectOnClick: (itemId) => {
7009
+ setSelectedType(itemId);
7010
+ }
7009
7011
  }
7010
- }
7011
- )
7012
+ )
7013
+ ] }),
7014
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DividerLine_default, {})
7012
7015
  ] }) : null,
7013
7016
  selectedType ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7014
7017
  OrderingActivityContent_default,
@@ -7290,20 +7293,22 @@ var ActivityPreviewByAnswerData = ({
7290
7293
  };
7291
7294
  if (!data) return null;
7292
7295
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { children: [
7293
- showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mb-4", children: [
7294
- 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,
7295
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7296
- SelectionBox_default,
7297
- {
7298
- optionList,
7299
- selectedId: selectedType,
7300
- handleSelectOnClick: (itemId) => {
7301
- setSelectedType(itemId);
7296
+ showType && optionList.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
7297
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mb-4", children: [
7298
+ 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,
7299
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7300
+ SelectionBox_default,
7301
+ {
7302
+ optionList,
7303
+ selectedId: selectedType,
7304
+ handleSelectOnClick: (itemId) => {
7305
+ setSelectedType(itemId);
7306
+ }
7302
7307
  }
7303
- }
7304
- )
7308
+ )
7309
+ ] }),
7310
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DividerLine_default, {})
7305
7311
  ] }) : null,
7306
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DividerLine_default, {}),
7307
7312
  /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col my-2 w-full p-5", children: [
7308
7313
  ((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ActivityEmptyContent_default, {}) : null,
7309
7314
  selectedType ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: RenderSelectedActivityContent() }, selectedType) : null
package/dist/index.mjs CHANGED
@@ -6728,7 +6728,7 @@ var SelectionBox = ({
6728
6728
  var SelectionBox_default = SelectionBox;
6729
6729
 
6730
6730
  // src/components/activities/ActivityPreviewByData.tsx
6731
- import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
6731
+ import { Fragment as Fragment10, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
6732
6732
  var ActivityPreviewByData = ({
6733
6733
  data,
6734
6734
  showType,
@@ -6787,18 +6787,21 @@ var ActivityPreviewByData = ({
6787
6787
  if (!data) return;
6788
6788
  const answer = constructAnswerBasedOnData(data);
6789
6789
  return /* @__PURE__ */ jsxs36("div", { children: [
6790
- showType ? /* @__PURE__ */ jsxs36("div", { className: "mb-4", children: [
6791
- showDescription ? /* @__PURE__ */ jsx48("div", { className: "my-2", children: /* @__PURE__ */ jsx48("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
6792
- /* @__PURE__ */ jsx48(
6793
- SelectionBox_default,
6794
- {
6795
- optionList,
6796
- selectedId: selectedType,
6797
- handleSelectOnClick: (itemId) => {
6798
- setSelectedType(itemId);
6790
+ showType ? /* @__PURE__ */ jsxs36(Fragment10, { children: [
6791
+ /* @__PURE__ */ jsxs36("div", { className: "mb-4", children: [
6792
+ showDescription ? /* @__PURE__ */ jsx48("div", { className: "my-2", children: /* @__PURE__ */ jsx48("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
6793
+ /* @__PURE__ */ jsx48(
6794
+ SelectionBox_default,
6795
+ {
6796
+ optionList,
6797
+ selectedId: selectedType,
6798
+ handleSelectOnClick: (itemId) => {
6799
+ setSelectedType(itemId);
6800
+ }
6799
6801
  }
6800
- }
6801
- )
6802
+ )
6803
+ ] }),
6804
+ /* @__PURE__ */ jsx48(DividerLine_default, {})
6802
6805
  ] }) : null,
6803
6806
  selectedType ? /* @__PURE__ */ jsx48("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ jsx48(
6804
6807
  OrderingActivityContent_default,
@@ -6944,7 +6947,7 @@ var ActivityPreviewByData_default = ActivityPreviewByData;
6944
6947
 
6945
6948
  // src/components/activities/ActivityPreviewByAnswerData.tsx
6946
6949
  import { useEffect as useEffect15, useState as useState25 } from "react";
6947
- import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
6950
+ import { Fragment as Fragment11, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
6948
6951
  var ActivityPreviewByAnswerData = ({
6949
6952
  data,
6950
6953
  showType = true,
@@ -7080,20 +7083,22 @@ var ActivityPreviewByAnswerData = ({
7080
7083
  };
7081
7084
  if (!data) return null;
7082
7085
  return /* @__PURE__ */ jsxs37("div", { children: [
7083
- showType && optionList.length > 0 ? /* @__PURE__ */ jsxs37("div", { className: "mb-4", children: [
7084
- showDescription ? /* @__PURE__ */ jsx49("div", { className: "my-2", children: /* @__PURE__ */ jsx49("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
7085
- /* @__PURE__ */ jsx49(
7086
- SelectionBox_default,
7087
- {
7088
- optionList,
7089
- selectedId: selectedType,
7090
- handleSelectOnClick: (itemId) => {
7091
- setSelectedType(itemId);
7086
+ showType && optionList.length > 0 ? /* @__PURE__ */ jsxs37(Fragment11, { children: [
7087
+ /* @__PURE__ */ jsxs37("div", { className: "mb-4", children: [
7088
+ showDescription ? /* @__PURE__ */ jsx49("div", { className: "my-2", children: /* @__PURE__ */ jsx49("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
7089
+ /* @__PURE__ */ jsx49(
7090
+ SelectionBox_default,
7091
+ {
7092
+ optionList,
7093
+ selectedId: selectedType,
7094
+ handleSelectOnClick: (itemId) => {
7095
+ setSelectedType(itemId);
7096
+ }
7092
7097
  }
7093
- }
7094
- )
7098
+ )
7099
+ ] }),
7100
+ /* @__PURE__ */ jsx49(DividerLine_default, {})
7095
7101
  ] }) : null,
7096
- /* @__PURE__ */ jsx49(DividerLine_default, {}),
7097
7102
  /* @__PURE__ */ jsxs37("div", { className: "flex flex-col my-2 w-full p-5", children: [
7098
7103
  ((_a = answer == null ? void 0 : answer.data[0]) == null ? void 0 : _a.isEmpty) ? /* @__PURE__ */ jsx49(ActivityEmptyContent_default, {}) : null,
7099
7104
  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.7",
3
+ "version": "1.15.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -218,27 +218,28 @@ const ActivityPreviewByAnswerData = ({
218
218
  return (
219
219
  <div key={key}>
220
220
  {showType && optionList.length > 0 ? (
221
- <div className="mb-4">
222
- {showDescription ? (
223
- <div className="my-2">
224
- <p className="font-semibold text-lg">
225
- {i18n.t("activity_template")}
226
- </p>
227
- </div>
228
- ) : null}
229
-
230
- <SelectionBox
231
- optionList={optionList}
232
- selectedId={selectedType}
233
- handleSelectOnClick={(itemId) => {
234
- setSelectedType(itemId);
235
- }}
236
- />
237
- </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
+ </>
238
241
  ) : null}
239
242
 
240
- <DividerLine />
241
-
242
243
  <div className="flex flex-col my-2 w-full p-5">
243
244
  {answer?.data[0]?.isEmpty ? <ActivityEmptyContent /> : null}
244
245
 
@@ -17,6 +17,7 @@ import { IActivityPreviewByDataProps } from "../../properties/ActivityProperties
17
17
  import ActivitySolutionContent from "./solution-content/ActivitySolutionContent";
18
18
  import i18n from "../../language/i18n";
19
19
  import ActivityEvaluationRubricContent from "./evaluation-rubric-content/ActivityEvaluationRubricContent";
20
+ import DividerLine from "../dividers/DividerLine";
20
21
 
21
22
  const ActivityPreviewByData = ({
22
23
  data,
@@ -84,23 +85,26 @@ const ActivityPreviewByData = ({
84
85
  return (
85
86
  <div key={key}>
86
87
  {showType ? (
87
- <div className="mb-4">
88
- {showDescription ? (
89
- <div className="my-2">
90
- <p className="font-semibold text-lg">
91
- {i18n.t("activity_template")}
92
- </p>
93
- </div>
94
- ) : null}
88
+ <>
89
+ <div className="mb-4">
90
+ {showDescription ? (
91
+ <div className="my-2">
92
+ <p className="font-semibold text-lg">
93
+ {i18n.t("activity_template")}
94
+ </p>
95
+ </div>
96
+ ) : null}
95
97
 
96
- <SelectionBox
97
- optionList={optionList}
98
- selectedId={selectedType}
99
- handleSelectOnClick={(itemId) => {
100
- setSelectedType(itemId);
101
- }}
102
- />
103
- </div>
98
+ <SelectionBox
99
+ optionList={optionList}
100
+ selectedId={selectedType}
101
+ handleSelectOnClick={(itemId) => {
102
+ setSelectedType(itemId);
103
+ }}
104
+ />
105
+ </div>
106
+ <DividerLine />
107
+ </>
104
108
  ) : null}
105
109
  {selectedType ? (
106
110
  <div key={selectedType} className="">