catchup-library-web 2.2.12 → 2.2.14

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
@@ -225,6 +225,7 @@ interface IActivityPreviewByDataProps {
225
225
  showDifficulty?: boolean;
226
226
  isFullScreen?: boolean;
227
227
  showCorrectAnswer?: boolean;
228
+ showMaterialContent?: boolean;
228
229
  }
229
230
 
230
231
  declare const ActivityBodyContent: ({ templateType, bodyMap, contentMap, answerMap, }: IActivityBodyContentProps) => react_jsx_runtime.JSX.Element | null;
@@ -251,7 +252,7 @@ declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivi
251
252
 
252
253
  declare const ActivityEvaluationRubricContent: ({ activityTemplateType, data, }: IActivityEvaluationRubricProps) => react_jsx_runtime.JSX.Element | null | undefined;
253
254
 
254
- declare const ActivityPreviewByData: ({ data, answerType, showType, showDescription, typeList, showSolution, showEvaluationRubric, showDifficulty, isFullScreen, showCorrectAnswer, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | null;
255
+ declare const ActivityPreviewByData: ({ data, answerType, showType, showDescription, typeList, showSolution, showEvaluationRubric, showDifficulty, isFullScreen, showCorrectAnswer, showMaterialContent, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | null;
255
256
 
256
257
  interface IStatusErrorProperties {
257
258
  statusCode?: string;
package/dist/index.d.ts CHANGED
@@ -225,6 +225,7 @@ interface IActivityPreviewByDataProps {
225
225
  showDifficulty?: boolean;
226
226
  isFullScreen?: boolean;
227
227
  showCorrectAnswer?: boolean;
228
+ showMaterialContent?: boolean;
228
229
  }
229
230
 
230
231
  declare const ActivityBodyContent: ({ templateType, bodyMap, contentMap, answerMap, }: IActivityBodyContentProps) => react_jsx_runtime.JSX.Element | null;
@@ -251,7 +252,7 @@ declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivi
251
252
 
252
253
  declare const ActivityEvaluationRubricContent: ({ activityTemplateType, data, }: IActivityEvaluationRubricProps) => react_jsx_runtime.JSX.Element | null | undefined;
253
254
 
254
- declare const ActivityPreviewByData: ({ data, answerType, showType, showDescription, typeList, showSolution, showEvaluationRubric, showDifficulty, isFullScreen, showCorrectAnswer, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | null;
255
+ declare const ActivityPreviewByData: ({ data, answerType, showType, showDescription, typeList, showSolution, showEvaluationRubric, showDifficulty, isFullScreen, showCorrectAnswer, showMaterialContent, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | null;
255
256
 
256
257
  interface IStatusErrorProperties {
257
258
  statusCode?: string;
package/dist/index.js CHANGED
@@ -7052,7 +7052,7 @@ var TrueFalseActivityContent = ({
7052
7052
  if (foundFalseIndex !== -1) {
7053
7053
  answerMap2.falseList.splice(foundFalseIndex, 1);
7054
7054
  }
7055
- const foundTrueIndex = answerMap2.falseList.findIndex(
7055
+ const foundTrueIndex = answerMap2.trueList.findIndex(
7056
7056
  (item) => item === value
7057
7057
  );
7058
7058
  if (foundTrueIndex === -1) {
@@ -7293,7 +7293,8 @@ var ActivityPreviewByData = ({
7293
7293
  showEvaluationRubric = false,
7294
7294
  showDifficulty = true,
7295
7295
  isFullScreen = false,
7296
- showCorrectAnswer = false
7296
+ showCorrectAnswer = false,
7297
+ showMaterialContent = true
7297
7298
  }) => {
7298
7299
  const [selectedType, setSelectedType] = (0, import_react27.useState)(null);
7299
7300
  const [optionList, setOptionList] = (0, import_react27.useState)([]);
@@ -7411,7 +7412,7 @@ var ActivityPreviewByData = ({
7411
7412
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7412
7413
  OpenEndedActivityContent_default,
7413
7414
  __spreadProps(__spreadValues({}, commonProps), {
7414
- showMaterialContent: true
7415
+ showMaterialContent
7415
7416
  })
7416
7417
  )
7417
7418
  ] }) : null;
package/dist/index.mjs CHANGED
@@ -6829,7 +6829,7 @@ var TrueFalseActivityContent = ({
6829
6829
  if (foundFalseIndex !== -1) {
6830
6830
  answerMap2.falseList.splice(foundFalseIndex, 1);
6831
6831
  }
6832
- const foundTrueIndex = answerMap2.falseList.findIndex(
6832
+ const foundTrueIndex = answerMap2.trueList.findIndex(
6833
6833
  (item) => item === value
6834
6834
  );
6835
6835
  if (foundTrueIndex === -1) {
@@ -7070,7 +7070,8 @@ var ActivityPreviewByData = ({
7070
7070
  showEvaluationRubric = false,
7071
7071
  showDifficulty = true,
7072
7072
  isFullScreen = false,
7073
- showCorrectAnswer = false
7073
+ showCorrectAnswer = false,
7074
+ showMaterialContent = true
7074
7075
  }) => {
7075
7076
  const [selectedType, setSelectedType] = useState26(null);
7076
7077
  const [optionList, setOptionList] = useState26([]);
@@ -7188,7 +7189,7 @@ var ActivityPreviewByData = ({
7188
7189
  /* @__PURE__ */ jsx47(
7189
7190
  OpenEndedActivityContent_default,
7190
7191
  __spreadProps(__spreadValues({}, commonProps), {
7191
- showMaterialContent: true
7192
+ showMaterialContent
7192
7193
  })
7193
7194
  )
7194
7195
  ] }) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "2.2.12",
3
+ "version": "2.2.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -46,6 +46,7 @@ const ActivityPreviewByData = ({
46
46
  showDifficulty = true,
47
47
  isFullScreen = false,
48
48
  showCorrectAnswer = false,
49
+ showMaterialContent = true,
49
50
  }: IActivityPreviewByDataProps) => {
50
51
  const [selectedType, setSelectedType] = useState<string | null>(null);
51
52
  const [optionList, setOptionList] = useState<any[]>([]);
@@ -195,7 +196,7 @@ const ActivityPreviewByData = ({
195
196
  {isEmpty && <ActivityEmptyContent />}
196
197
  <OpenEndedActivityContent
197
198
  {...commonProps}
198
- showMaterialContent={true}
199
+ showMaterialContent={showMaterialContent}
199
200
  />
200
201
  </>
201
202
  ) : null;
@@ -35,7 +35,7 @@ const TrueFalseActivityContent = ({
35
35
  if (foundFalseIndex !== -1) {
36
36
  answerMap.falseList.splice(foundFalseIndex, 1);
37
37
  }
38
- const foundTrueIndex = answerMap.falseList.findIndex(
38
+ const foundTrueIndex = answerMap.trueList.findIndex(
39
39
  (item: string) => item === value
40
40
  );
41
41
  if (foundTrueIndex === -1) {
@@ -230,4 +230,5 @@ export interface IActivityPreviewByDataProps {
230
230
  showDifficulty?: boolean;
231
231
  isFullScreen?: boolean;
232
232
  showCorrectAnswer?: boolean;
233
+ showMaterialContent?: boolean;
233
234
  }