catchup-library-web 1.0.25 → 1.1.1

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
@@ -5945,7 +5945,7 @@ var ActivityPreviewByData = ({
5945
5945
  } else {
5946
5946
  setSelectedType(typeOptionList[0].id);
5947
5947
  }
5948
- }, [data, typeOptionList, lockedType]);
5948
+ }, [typeOptionList, lockedType]);
5949
5949
  (0, import_react24.useEffect)(() => {
5950
5950
  const retrieveTaxonomyNameByActivityTypeFromData = (type) => {
5951
5951
  let taxonomyMap = {
@@ -6003,7 +6003,7 @@ var ActivityPreviewByData = ({
6003
6003
  ] }) : null,
6004
6004
  selectedType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "", children: [
6005
6005
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DividerLine_default, {}),
6006
- selectedType === "ORDERING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6006
+ selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6007
6007
  OrderingActivityContent_default,
6008
6008
  {
6009
6009
  answer,
@@ -6016,7 +6016,7 @@ var ActivityPreviewByData = ({
6016
6016
  isPreview: true,
6017
6017
  showCorrectAnswer: true
6018
6018
  }
6019
- ) : selectedType === "DROPDOWN" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6019
+ ) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6020
6020
  DropdownActivityContent_default,
6021
6021
  {
6022
6022
  answer,
@@ -6029,7 +6029,7 @@ var ActivityPreviewByData = ({
6029
6029
  isPreview: true,
6030
6030
  showCorrectAnswer: true
6031
6031
  }
6032
- ) : selectedType === "MCSA" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6032
+ ) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6033
6033
  MCSAActivityContent_default,
6034
6034
  {
6035
6035
  answer,
@@ -6042,7 +6042,7 @@ var ActivityPreviewByData = ({
6042
6042
  isPreview: true,
6043
6043
  showCorrectAnswer: true
6044
6044
  }
6045
- ) : selectedType === "MCMA" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6045
+ ) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6046
6046
  MCMAActivityContent_default,
6047
6047
  {
6048
6048
  answer,
@@ -6055,7 +6055,7 @@ var ActivityPreviewByData = ({
6055
6055
  isPreview: true,
6056
6056
  showCorrectAnswer: true
6057
6057
  }
6058
- ) : selectedType === "MATCHING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6058
+ ) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6059
6059
  MatchingActivityContent_default,
6060
6060
  {
6061
6061
  answer,
@@ -6068,7 +6068,7 @@ var ActivityPreviewByData = ({
6068
6068
  isPreview: true,
6069
6069
  showCorrectAnswer: true
6070
6070
  }
6071
- ) : selectedType === "GROUPING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6071
+ ) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6072
6072
  GroupingActivityContent_default,
6073
6073
  {
6074
6074
  answer,
@@ -6081,7 +6081,7 @@ var ActivityPreviewByData = ({
6081
6081
  isPreview: true,
6082
6082
  showCorrectAnswer: true
6083
6083
  }
6084
- ) : selectedType === "FILL_IN_THE_BLANKS" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6084
+ ) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6085
6085
  FillInTheBlanksActivityContent_default,
6086
6086
  {
6087
6087
  answer,
@@ -6094,7 +6094,7 @@ var ActivityPreviewByData = ({
6094
6094
  isPreview: true,
6095
6095
  showCorrectAnswer: true
6096
6096
  }
6097
- ) : selectedType === "OPEN_ENDED" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6097
+ ) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6098
6098
  OpenEndedActivityContent_default,
6099
6099
  {
6100
6100
  answer,
@@ -6103,7 +6103,7 @@ var ActivityPreviewByData = ({
6103
6103
  showMaterialContent: false,
6104
6104
  data
6105
6105
  }
6106
- ) : selectedType === "TRUE_FALSE" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6106
+ ) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6107
6107
  TrueFalseActivityContent_default,
6108
6108
  {
6109
6109
  answer,
package/dist/index.mjs CHANGED
@@ -5771,7 +5771,7 @@ var ActivityPreviewByData = ({
5771
5771
  } else {
5772
5772
  setSelectedType(typeOptionList[0].id);
5773
5773
  }
5774
- }, [data, typeOptionList, lockedType]);
5774
+ }, [typeOptionList, lockedType]);
5775
5775
  useEffect11(() => {
5776
5776
  const retrieveTaxonomyNameByActivityTypeFromData = (type) => {
5777
5777
  let taxonomyMap = {
@@ -5829,7 +5829,7 @@ var ActivityPreviewByData = ({
5829
5829
  ] }) : null,
5830
5830
  selectedType ? /* @__PURE__ */ jsxs32("div", { className: "", children: [
5831
5831
  /* @__PURE__ */ jsx41(DividerLine_default, {}),
5832
- selectedType === "ORDERING" ? /* @__PURE__ */ jsx41(
5832
+ selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5833
5833
  OrderingActivityContent_default,
5834
5834
  {
5835
5835
  answer,
@@ -5842,7 +5842,7 @@ var ActivityPreviewByData = ({
5842
5842
  isPreview: true,
5843
5843
  showCorrectAnswer: true
5844
5844
  }
5845
- ) : selectedType === "DROPDOWN" ? /* @__PURE__ */ jsx41(
5845
+ ) : selectedType === "DROPDOWN" && data["dropdownBodyMap"] != null && data["dropdownMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5846
5846
  DropdownActivityContent_default,
5847
5847
  {
5848
5848
  answer,
@@ -5855,7 +5855,7 @@ var ActivityPreviewByData = ({
5855
5855
  isPreview: true,
5856
5856
  showCorrectAnswer: true
5857
5857
  }
5858
- ) : selectedType === "MCSA" ? /* @__PURE__ */ jsx41(
5858
+ ) : selectedType === "MCSA" && data["MCSABodyMap"] != null && data["MCSAMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5859
5859
  MCSAActivityContent_default,
5860
5860
  {
5861
5861
  answer,
@@ -5868,7 +5868,7 @@ var ActivityPreviewByData = ({
5868
5868
  isPreview: true,
5869
5869
  showCorrectAnswer: true
5870
5870
  }
5871
- ) : selectedType === "MCMA" ? /* @__PURE__ */ jsx41(
5871
+ ) : selectedType === "MCMA" && data["MCMABodyMap"] != null && data["MCMAMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5872
5872
  MCMAActivityContent_default,
5873
5873
  {
5874
5874
  answer,
@@ -5881,7 +5881,7 @@ var ActivityPreviewByData = ({
5881
5881
  isPreview: true,
5882
5882
  showCorrectAnswer: true
5883
5883
  }
5884
- ) : selectedType === "MATCHING" ? /* @__PURE__ */ jsx41(
5884
+ ) : selectedType === "MATCHING" && data["matchingBodyMap"] != null && data["matchingMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5885
5885
  MatchingActivityContent_default,
5886
5886
  {
5887
5887
  answer,
@@ -5894,7 +5894,7 @@ var ActivityPreviewByData = ({
5894
5894
  isPreview: true,
5895
5895
  showCorrectAnswer: true
5896
5896
  }
5897
- ) : selectedType === "GROUPING" ? /* @__PURE__ */ jsx41(
5897
+ ) : selectedType === "GROUPING" && data["groupingBodyMap"] != null && data["groupingMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5898
5898
  GroupingActivityContent_default,
5899
5899
  {
5900
5900
  answer,
@@ -5907,7 +5907,7 @@ var ActivityPreviewByData = ({
5907
5907
  isPreview: true,
5908
5908
  showCorrectAnswer: true
5909
5909
  }
5910
- ) : selectedType === "FILL_IN_THE_BLANKS" ? /* @__PURE__ */ jsx41(
5910
+ ) : selectedType === "FILL_IN_THE_BLANKS" && data["fillInTheBlanksBodyMap"] != null && data["fillInTheBlanksMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5911
5911
  FillInTheBlanksActivityContent_default,
5912
5912
  {
5913
5913
  answer,
@@ -5920,7 +5920,7 @@ var ActivityPreviewByData = ({
5920
5920
  isPreview: true,
5921
5921
  showCorrectAnswer: true
5922
5922
  }
5923
- ) : selectedType === "OPEN_ENDED" ? /* @__PURE__ */ jsx41(
5923
+ ) : selectedType === "OPEN_ENDED" && data["openEndedBodyMap"] != null ? /* @__PURE__ */ jsx41(
5924
5924
  OpenEndedActivityContent_default,
5925
5925
  {
5926
5926
  answer,
@@ -5929,7 +5929,7 @@ var ActivityPreviewByData = ({
5929
5929
  showMaterialContent: false,
5930
5930
  data
5931
5931
  }
5932
- ) : selectedType === "TRUE_FALSE" ? /* @__PURE__ */ jsx41(
5932
+ ) : selectedType === "TRUE_FALSE" && data["trueFalseBodyMap"] != null && data["trueFalseMaterialMap"] != null ? /* @__PURE__ */ jsx41(
5933
5933
  TrueFalseActivityContent_default,
5934
5934
  {
5935
5935
  answer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.0.25",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -41,7 +41,7 @@ const ActivityPreviewByData = ({
41
41
  } else {
42
42
  setSelectedType(typeOptionList[0].id);
43
43
  }
44
- }, [data, typeOptionList, lockedType]);
44
+ }, [typeOptionList, lockedType]);
45
45
 
46
46
  useEffect(() => {
47
47
  const retrieveTaxonomyNameByActivityTypeFromData = (
@@ -113,7 +113,9 @@ const ActivityPreviewByData = ({
113
113
  {selectedType ? (
114
114
  <div className="">
115
115
  <DividerLine />
116
- {selectedType === "ORDERING" ? (
116
+ {selectedType === "ORDERING" &&
117
+ data["orderingBodyMap"] != null &&
118
+ data["orderingMaterialMap"] != null ? (
117
119
  <OrderingActivityContent
118
120
  answer={answer}
119
121
  changeAnswer={() => {}}
@@ -124,7 +126,9 @@ const ActivityPreviewByData = ({
124
126
  isPreview={true}
125
127
  showCorrectAnswer={true}
126
128
  />
127
- ) : selectedType === "DROPDOWN" ? (
129
+ ) : selectedType === "DROPDOWN" &&
130
+ data["dropdownBodyMap"] != null &&
131
+ data["dropdownMaterialMap"] != null ? (
128
132
  <DropdownActivityContent
129
133
  answer={answer}
130
134
  changeAnswer={() => {}}
@@ -135,7 +139,9 @@ const ActivityPreviewByData = ({
135
139
  isPreview={true}
136
140
  showCorrectAnswer={true}
137
141
  />
138
- ) : selectedType === "MCSA" ? (
142
+ ) : selectedType === "MCSA" &&
143
+ data["MCSABodyMap"] != null &&
144
+ data["MCSAMaterialMap"] != null ? (
139
145
  <MCSAActivityContent
140
146
  answer={answer}
141
147
  changeAnswer={() => {}}
@@ -146,7 +152,9 @@ const ActivityPreviewByData = ({
146
152
  isPreview={true}
147
153
  showCorrectAnswer={true}
148
154
  />
149
- ) : selectedType === "MCMA" ? (
155
+ ) : selectedType === "MCMA" &&
156
+ data["MCMABodyMap"] != null &&
157
+ data["MCMAMaterialMap"] != null ? (
150
158
  <MCMAActivityContent
151
159
  answer={answer}
152
160
  changeAnswer={() => {}}
@@ -157,7 +165,9 @@ const ActivityPreviewByData = ({
157
165
  isPreview={true}
158
166
  showCorrectAnswer={true}
159
167
  />
160
- ) : selectedType === "MATCHING" ? (
168
+ ) : selectedType === "MATCHING" &&
169
+ data["matchingBodyMap"] != null &&
170
+ data["matchingMaterialMap"] != null ? (
161
171
  <MatchingActivityContent
162
172
  answer={answer}
163
173
  changeAnswer={() => {}}
@@ -168,7 +178,9 @@ const ActivityPreviewByData = ({
168
178
  isPreview={true}
169
179
  showCorrectAnswer={true}
170
180
  />
171
- ) : selectedType === "GROUPING" ? (
181
+ ) : selectedType === "GROUPING" &&
182
+ data["groupingBodyMap"] != null &&
183
+ data["groupingMaterialMap"] != null ? (
172
184
  <GroupingActivityContent
173
185
  answer={answer}
174
186
  changeAnswer={() => {}}
@@ -179,7 +191,9 @@ const ActivityPreviewByData = ({
179
191
  isPreview={true}
180
192
  showCorrectAnswer={true}
181
193
  />
182
- ) : selectedType === "FILL_IN_THE_BLANKS" ? (
194
+ ) : selectedType === "FILL_IN_THE_BLANKS" &&
195
+ data["fillInTheBlanksBodyMap"] != null &&
196
+ data["fillInTheBlanksMaterialMap"] != null ? (
183
197
  <FillInTheBlanksActivityContent
184
198
  answer={answer}
185
199
  changeAnswer={() => {}}
@@ -190,14 +204,17 @@ const ActivityPreviewByData = ({
190
204
  isPreview={true}
191
205
  showCorrectAnswer={true}
192
206
  />
193
- ) : selectedType === "OPEN_ENDED" ? (
207
+ ) : selectedType === "OPEN_ENDED" &&
208
+ data["openEndedBodyMap"] != null ? (
194
209
  <OpenEndedActivityContent
195
210
  answer={answer}
196
211
  changeAnswer={() => {}}
197
212
  showMaterialContent={false}
198
213
  data={data}
199
214
  />
200
- ) : selectedType === "TRUE_FALSE" ? (
215
+ ) : selectedType === "TRUE_FALSE" &&
216
+ data["trueFalseBodyMap"] != null &&
217
+ data["trueFalseMaterialMap"] != null ? (
201
218
  <TrueFalseActivityContent
202
219
  answer={answer}
203
220
  changeAnswer={() => {}}