catchup-library-web 2.5.10 → 2.5.12

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 CHANGED
@@ -127,6 +127,7 @@ interface IActivityBodyContentProps {
127
127
  bodyMap: any;
128
128
  contentMap?: any;
129
129
  answerMap?: any;
130
+ fillHeight?: boolean;
130
131
  }
131
132
  interface IOrderingActivityProps {
132
133
  answerMap: any;
@@ -232,7 +233,7 @@ interface IActivityPreviewByDataProps {
232
233
  isPreview: boolean;
233
234
  }
234
235
 
235
- declare const ActivityBodyContent: ({ templateType, bodyMap, contentMap, answerMap, }: IActivityBodyContentProps) => react_jsx_runtime.JSX.Element | null;
236
+ declare const ActivityBodyContent: ({ templateType, bodyMap, contentMap, answerMap, fillHeight, }: IActivityBodyContentProps) => react_jsx_runtime.JSX.Element | null;
236
237
 
237
238
  declare const DropdownActivityContent: ({ answerMap, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, isFullScreen, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
238
239
 
package/dist/index.d.ts CHANGED
@@ -127,6 +127,7 @@ interface IActivityBodyContentProps {
127
127
  bodyMap: any;
128
128
  contentMap?: any;
129
129
  answerMap?: any;
130
+ fillHeight?: boolean;
130
131
  }
131
132
  interface IOrderingActivityProps {
132
133
  answerMap: any;
@@ -232,7 +233,7 @@ interface IActivityPreviewByDataProps {
232
233
  isPreview: boolean;
233
234
  }
234
235
 
235
- declare const ActivityBodyContent: ({ templateType, bodyMap, contentMap, answerMap, }: IActivityBodyContentProps) => react_jsx_runtime.JSX.Element | null;
236
+ declare const ActivityBodyContent: ({ templateType, bodyMap, contentMap, answerMap, fillHeight, }: IActivityBodyContentProps) => react_jsx_runtime.JSX.Element | null;
236
237
 
237
238
  declare const DropdownActivityContent: ({ answerMap, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, isFullScreen, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
238
239
 
package/dist/index.js CHANGED
@@ -3743,7 +3743,8 @@ var ActivityBodyContent = ({
3743
3743
  templateType,
3744
3744
  bodyMap,
3745
3745
  contentMap,
3746
- answerMap
3746
+ answerMap,
3747
+ fillHeight = false
3747
3748
  }) => {
3748
3749
  if (!bodyMap) return null;
3749
3750
  const processBodyValue = (bodyValue, contentType, answerMap2, startIndex) => {
@@ -3819,7 +3820,7 @@ var ActivityBodyContent = ({
3819
3820
  key
3820
3821
  });
3821
3822
  }).filter(Boolean);
3822
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col justify-center items-center max-h-[40vh] overflow-y-auto", children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3823
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: `flex flex-col justify-center items-center overflow-y-auto ${fillHeight ? "h-full" : "max-h-[40vh]"}`, children: processedBodies.map((body, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3823
3824
  ShowBodyMediaByContentType_default,
3824
3825
  {
3825
3826
  index,
@@ -6098,16 +6099,17 @@ var MatchingActivityContent = ({
6098
6099
  changeAnswer(answerMap2);
6099
6100
  };
6100
6101
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
6101
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6102
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[30%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6102
6103
  ActivityBodyContent_default,
6103
6104
  {
6104
6105
  bodyMap: matchingBodyMap,
6105
- templateType: "MATCHING"
6106
+ templateType: "MATCHING",
6107
+ fillHeight: !isFullScreen
6106
6108
  }
6107
6109
  ) }),
6108
6110
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) }),
6109
6111
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerticalDividerLine_default, {}) }),
6110
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6112
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[70%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6111
6113
  MatchingActivityMaterialContent_default,
6112
6114
  {
6113
6115
  uniqueValue: JSON.stringify(data.contentMap),
@@ -6939,16 +6941,17 @@ var OrderingActivityContent = ({
6939
6941
  changeAnswer(answerMap2);
6940
6942
  };
6941
6943
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row flex-wrap", children: [
6942
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6944
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[30%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6943
6945
  ActivityBodyContent_default,
6944
6946
  {
6945
6947
  bodyMap: orderingBodyMap,
6946
- templateType: "ORDERING"
6948
+ templateType: "ORDERING",
6949
+ fillHeight: !isFullScreen
6947
6950
  }
6948
6951
  ) }),
6949
6952
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DividerLine_default, {}) }),
6950
6953
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VerticalDividerLine_default, {}) }),
6951
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6954
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[70%]"}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6952
6955
  OrderingActivityMaterialContent_default,
6953
6956
  {
6954
6957
  uniqueValue: JSON.stringify(data.contentMap),
package/dist/index.mjs CHANGED
@@ -3509,7 +3509,8 @@ var ActivityBodyContent = ({
3509
3509
  templateType,
3510
3510
  bodyMap,
3511
3511
  contentMap,
3512
- answerMap
3512
+ answerMap,
3513
+ fillHeight = false
3513
3514
  }) => {
3514
3515
  if (!bodyMap) return null;
3515
3516
  const processBodyValue = (bodyValue, contentType, answerMap2, startIndex) => {
@@ -3585,7 +3586,7 @@ var ActivityBodyContent = ({
3585
3586
  key
3586
3587
  });
3587
3588
  }).filter(Boolean);
3588
- return /* @__PURE__ */ jsx21("div", { className: "flex flex-col justify-center items-center max-h-[40vh] overflow-y-auto", children: processedBodies.map((body, index) => /* @__PURE__ */ jsx21(
3589
+ return /* @__PURE__ */ jsx21("div", { className: `flex flex-col justify-center items-center overflow-y-auto ${fillHeight ? "h-full" : "max-h-[40vh]"}`, children: processedBodies.map((body, index) => /* @__PURE__ */ jsx21(
3589
3590
  ShowBodyMediaByContentType_default,
3590
3591
  {
3591
3592
  index,
@@ -5864,16 +5865,17 @@ var MatchingActivityContent = ({
5864
5865
  changeAnswer(answerMap2);
5865
5866
  };
5866
5867
  return /* @__PURE__ */ jsxs24("div", { className: "flex flex-row flex-wrap", children: [
5867
- /* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ jsx34(
5868
+ /* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[30%]"}`, children: /* @__PURE__ */ jsx34(
5868
5869
  ActivityBodyContent_default,
5869
5870
  {
5870
5871
  bodyMap: matchingBodyMap,
5871
- templateType: "MATCHING"
5872
+ templateType: "MATCHING",
5873
+ fillHeight: !isFullScreen
5872
5874
  }
5873
5875
  ) }),
5874
5876
  /* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx34(DividerLine_default, {}) }),
5875
5877
  /* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx34(VerticalDividerLine_default, {}) }),
5876
- /* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ jsx34(
5878
+ /* @__PURE__ */ jsx34("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[70%]"}`, children: /* @__PURE__ */ jsx34(
5877
5879
  MatchingActivityMaterialContent_default,
5878
5880
  {
5879
5881
  uniqueValue: JSON.stringify(data.contentMap),
@@ -6705,16 +6707,17 @@ var OrderingActivityContent = ({
6705
6707
  changeAnswer(answerMap2);
6706
6708
  };
6707
6709
  return /* @__PURE__ */ jsxs32("div", { className: "flex flex-row flex-wrap", children: [
6708
- /* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`, children: /* @__PURE__ */ jsx42(
6710
+ /* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[30%]"}`, children: /* @__PURE__ */ jsx42(
6709
6711
  ActivityBodyContent_default,
6710
6712
  {
6711
6713
  bodyMap: orderingBodyMap,
6712
- templateType: "ORDERING"
6714
+ templateType: "ORDERING",
6715
+ fillHeight: !isFullScreen
6713
6716
  }
6714
6717
  ) }),
6715
6718
  /* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "contents" : "contents md:hidden"}`, children: /* @__PURE__ */ jsx42(DividerLine_default, {}) }),
6716
6719
  /* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "hidden" : "hidden md:block"}`, children: /* @__PURE__ */ jsx42(VerticalDividerLine_default, {}) }),
6717
- /* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "w-full" : "w-full md:flex-1"}`, children: /* @__PURE__ */ jsx42(
6720
+ /* @__PURE__ */ jsx42("div", { className: `${isFullScreen ? "w-full" : "w-full md:w-[70%]"}`, children: /* @__PURE__ */ jsx42(
6718
6721
  OrderingActivityMaterialContent_default,
6719
6722
  {
6720
6723
  uniqueValue: JSON.stringify(data.contentMap),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "2.5.10",
3
+ "version": "2.5.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -34,10 +34,11 @@ const MatchingActivityContent = ({
34
34
 
35
35
  return (
36
36
  <div className="flex flex-row flex-wrap">
37
- <div className={`${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`}>
37
+ <div className={`${isFullScreen ? "w-full" : "w-full md:w-[30%]"}`}>
38
38
  <ActivityBodyContent
39
39
  bodyMap={matchingBodyMap}
40
40
  templateType={"MATCHING"}
41
+ fillHeight={!isFullScreen}
41
42
  />
42
43
  </div>
43
44
  <div className={`${isFullScreen ? "contents" : "contents md:hidden"}`}>
@@ -46,7 +47,7 @@ const MatchingActivityContent = ({
46
47
  <div className={`${isFullScreen ? "hidden" : "hidden md:block"}`}>
47
48
  <VerticalDividerLine />
48
49
  </div>
49
- <div className={`${isFullScreen ? "w-full" : "w-full md:flex-1"}`}>
50
+ <div className={`${isFullScreen ? "w-full" : "w-full md:w-[70%]"}`}>
50
51
  <MatchingActivityMaterialContent
51
52
  uniqueValue={JSON.stringify(data.contentMap)}
52
53
  answerMap={answerMap}
@@ -36,10 +36,11 @@ const OrderingActivityContent = ({
36
36
 
37
37
  return (
38
38
  <div className="flex flex-row flex-wrap">
39
- <div className={`${isFullScreen ? "w-full" : "w-full md:w-[40%]"}`}>
39
+ <div className={`${isFullScreen ? "w-full" : "w-full md:w-[30%]"}`}>
40
40
  <ActivityBodyContent
41
41
  bodyMap={orderingBodyMap}
42
42
  templateType={"ORDERING"}
43
+ fillHeight={!isFullScreen}
43
44
  />
44
45
  </div>
45
46
  <div className={`${isFullScreen ? "contents" : "contents md:hidden"}`}>
@@ -48,7 +49,7 @@ const OrderingActivityContent = ({
48
49
  <div className={`${isFullScreen ? "hidden" : "hidden md:block"}`}>
49
50
  <VerticalDividerLine />
50
51
  </div>
51
- <div className={`${isFullScreen ? "w-full" : "w-full md:flex-1"}`}>
52
+ <div className={`${isFullScreen ? "w-full" : "w-full md:w-[70%]"}`}>
52
53
  <OrderingActivityMaterialContent
53
54
  uniqueValue={JSON.stringify(data.contentMap)}
54
55
  answerMap={answerMap}
@@ -6,6 +6,7 @@ const ActivityBodyContent = ({
6
6
  bodyMap,
7
7
  contentMap,
8
8
  answerMap,
9
+ fillHeight = false,
9
10
  }: IActivityBodyContentProps) => {
10
11
  if (!bodyMap) return null;
11
12
 
@@ -107,7 +108,7 @@ const ActivityBodyContent = ({
107
108
  .filter(Boolean);
108
109
 
109
110
  return (
110
- <div className="flex flex-col justify-center items-center max-h-[40vh] overflow-y-auto">
111
+ <div className={`flex flex-col justify-center items-center overflow-y-auto ${fillHeight ? "h-full" : "max-h-[40vh]"}`}>
111
112
  {processedBodies.map((body, index) => (
112
113
  <ShowBodyMediaByContentType
113
114
  key={`body-${body.key}-${index}`}
@@ -17,6 +17,7 @@ export interface IActivityBodyContentProps {
17
17
  bodyMap: any;
18
18
  contentMap?: any;
19
19
  answerMap?: any;
20
+ fillHeight?: boolean;
20
21
  }
21
22
 
22
23
  export interface IOrderingActivityProps {