catchup-library-web 2.1.3 → 2.1.5
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 +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
- package/src/components/activities/ActivityPreviewByData.tsx +126 -127
package/dist/index.js
CHANGED
|
@@ -7262,6 +7262,7 @@ var ActivityPreviewByData = ({
|
|
|
7262
7262
|
if (!data) return;
|
|
7263
7263
|
if (!selectedType) return;
|
|
7264
7264
|
const answerMap = constructAnswerBasedOnData(selectedType, data);
|
|
7265
|
+
console.log("answer map: ", answerMap);
|
|
7265
7266
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
|
|
7266
7267
|
showType ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
7267
7268
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mb-4", children: [
|
|
@@ -7279,7 +7280,7 @@ var ActivityPreviewByData = ({
|
|
|
7279
7280
|
] }),
|
|
7280
7281
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DividerLine_default, {})
|
|
7281
7282
|
] }) : null,
|
|
7282
|
-
|
|
7283
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7283
7284
|
OrderingActivityContent_default,
|
|
7284
7285
|
{
|
|
7285
7286
|
answerMap,
|
|
@@ -7400,15 +7401,15 @@ var ActivityPreviewByData = ({
|
|
|
7400
7401
|
showCorrectAnswer: true,
|
|
7401
7402
|
isFullScreen
|
|
7402
7403
|
}
|
|
7403
|
-
) : null }, selectedType)
|
|
7404
|
-
|
|
7404
|
+
) : null }, selectedType),
|
|
7405
|
+
showSolution ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7405
7406
|
ActivitySolutionContent_default,
|
|
7406
7407
|
{
|
|
7407
7408
|
activityTemplateType: selectedType,
|
|
7408
7409
|
data
|
|
7409
7410
|
}
|
|
7410
7411
|
) }) : null,
|
|
7411
|
-
|
|
7412
|
+
showEvaluationRubric ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "my-4", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7412
7413
|
ActivityEvaluationRubricContent_default,
|
|
7413
7414
|
{
|
|
7414
7415
|
activityTemplateType: selectedType,
|
package/dist/index.mjs
CHANGED
|
@@ -7038,6 +7038,7 @@ var ActivityPreviewByData = ({
|
|
|
7038
7038
|
if (!data) return;
|
|
7039
7039
|
if (!selectedType) return;
|
|
7040
7040
|
const answerMap = constructAnswerBasedOnData(selectedType, data);
|
|
7041
|
+
console.log("answer map: ", answerMap);
|
|
7041
7042
|
return /* @__PURE__ */ jsxs36("div", { children: [
|
|
7042
7043
|
showType ? /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
7043
7044
|
/* @__PURE__ */ jsxs36("div", { className: "mb-4", children: [
|
|
@@ -7055,7 +7056,7 @@ var ActivityPreviewByData = ({
|
|
|
7055
7056
|
] }),
|
|
7056
7057
|
/* @__PURE__ */ jsx47(DividerLine_default, {})
|
|
7057
7058
|
] }) : null,
|
|
7058
|
-
|
|
7059
|
+
/* @__PURE__ */ jsx47("div", { className: "", children: selectedType === "ORDERING" && data["orderingBodyMap"] != null && data["orderingMaterialMap"] != null ? /* @__PURE__ */ jsx47(
|
|
7059
7060
|
OrderingActivityContent_default,
|
|
7060
7061
|
{
|
|
7061
7062
|
answerMap,
|
|
@@ -7176,15 +7177,15 @@ var ActivityPreviewByData = ({
|
|
|
7176
7177
|
showCorrectAnswer: true,
|
|
7177
7178
|
isFullScreen
|
|
7178
7179
|
}
|
|
7179
|
-
) : null }, selectedType)
|
|
7180
|
-
|
|
7180
|
+
) : null }, selectedType),
|
|
7181
|
+
showSolution ? /* @__PURE__ */ jsx47("div", { className: "my-4", children: /* @__PURE__ */ jsx47(
|
|
7181
7182
|
ActivitySolutionContent_default,
|
|
7182
7183
|
{
|
|
7183
7184
|
activityTemplateType: selectedType,
|
|
7184
7185
|
data
|
|
7185
7186
|
}
|
|
7186
7187
|
) }) : null,
|
|
7187
|
-
|
|
7188
|
+
showEvaluationRubric ? /* @__PURE__ */ jsx47("div", { className: "my-4", children: /* @__PURE__ */ jsx47(
|
|
7188
7189
|
ActivityEvaluationRubricContent_default,
|
|
7189
7190
|
{
|
|
7190
7191
|
activityTemplateType: selectedType,
|
package/package.json
CHANGED
|
@@ -82,6 +82,7 @@ const ActivityPreviewByData = ({
|
|
|
82
82
|
if (!data) return;
|
|
83
83
|
if (!selectedType) return;
|
|
84
84
|
const answerMap = constructAnswerBasedOnData(selectedType, data);
|
|
85
|
+
console.log("answer map: ", answerMap);
|
|
85
86
|
|
|
86
87
|
return (
|
|
87
88
|
<div key={key}>
|
|
@@ -107,132 +108,130 @@ const ActivityPreviewByData = ({
|
|
|
107
108
|
<DividerLine />
|
|
108
109
|
</>
|
|
109
110
|
) : null}
|
|
110
|
-
{selectedType
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
) : null}
|
|
235
|
-
{selectedType && showSolution ? (
|
|
111
|
+
<div key={selectedType} className="">
|
|
112
|
+
{selectedType === "ORDERING" &&
|
|
113
|
+
data["orderingBodyMap"] != null &&
|
|
114
|
+
data["orderingMaterialMap"] != null ? (
|
|
115
|
+
<OrderingActivityContent
|
|
116
|
+
answerMap={answerMap}
|
|
117
|
+
changeAnswer={() => {}}
|
|
118
|
+
canAnswerQuestion={() => {
|
|
119
|
+
return true;
|
|
120
|
+
}}
|
|
121
|
+
data={data}
|
|
122
|
+
isPreview={true}
|
|
123
|
+
showCorrectAnswer={true}
|
|
124
|
+
/>
|
|
125
|
+
) : selectedType === "DROPDOWN" &&
|
|
126
|
+
data["dropdownBodyMap"] != null &&
|
|
127
|
+
data["dropdownMaterialMap"] != null ? (
|
|
128
|
+
<DropdownActivityContent
|
|
129
|
+
answerMap={answerMap}
|
|
130
|
+
changeAnswer={() => {}}
|
|
131
|
+
canAnswerQuestion={() => {
|
|
132
|
+
return true;
|
|
133
|
+
}}
|
|
134
|
+
data={data}
|
|
135
|
+
isPreview={true}
|
|
136
|
+
showCorrectAnswer={true}
|
|
137
|
+
isFullScreen={isFullScreen}
|
|
138
|
+
/>
|
|
139
|
+
) : selectedType === "MCSA" &&
|
|
140
|
+
data["MCSABodyMap"] != null &&
|
|
141
|
+
data["MCSAMaterialMap"] != null ? (
|
|
142
|
+
<MCSAActivityContent
|
|
143
|
+
answerMap={answerMap}
|
|
144
|
+
changeAnswer={() => {}}
|
|
145
|
+
canAnswerQuestion={() => {
|
|
146
|
+
return true;
|
|
147
|
+
}}
|
|
148
|
+
data={data}
|
|
149
|
+
isPreview={true}
|
|
150
|
+
showCorrectAnswer={true}
|
|
151
|
+
isFullScreen={isFullScreen}
|
|
152
|
+
/>
|
|
153
|
+
) : selectedType === "MCMA" &&
|
|
154
|
+
data["MCMABodyMap"] != null &&
|
|
155
|
+
data["MCMAMaterialMap"] != null ? (
|
|
156
|
+
<MCMAActivityContent
|
|
157
|
+
answerMap={answerMap}
|
|
158
|
+
changeAnswer={() => {}}
|
|
159
|
+
canAnswerQuestion={() => {
|
|
160
|
+
return true;
|
|
161
|
+
}}
|
|
162
|
+
data={data}
|
|
163
|
+
isPreview={true}
|
|
164
|
+
showCorrectAnswer={true}
|
|
165
|
+
isFullScreen={isFullScreen}
|
|
166
|
+
/>
|
|
167
|
+
) : selectedType === "MATCHING" &&
|
|
168
|
+
data["matchingBodyMap"] != null &&
|
|
169
|
+
data["matchingMaterialMap"] != null ? (
|
|
170
|
+
<MatchingActivityContent
|
|
171
|
+
answerMap={answerMap}
|
|
172
|
+
changeAnswer={() => {}}
|
|
173
|
+
canAnswerQuestion={() => {
|
|
174
|
+
return true;
|
|
175
|
+
}}
|
|
176
|
+
data={data}
|
|
177
|
+
isPreview={true}
|
|
178
|
+
showCorrectAnswer={true}
|
|
179
|
+
/>
|
|
180
|
+
) : selectedType === "GROUPING" &&
|
|
181
|
+
data["groupingBodyMap"] != null &&
|
|
182
|
+
data["groupingMaterialMap"] != null ? (
|
|
183
|
+
<GroupingActivityContent
|
|
184
|
+
answerMap={answerMap}
|
|
185
|
+
changeAnswer={() => {}}
|
|
186
|
+
canAnswerQuestion={() => {
|
|
187
|
+
return true;
|
|
188
|
+
}}
|
|
189
|
+
data={data}
|
|
190
|
+
isPreview={true}
|
|
191
|
+
showCorrectAnswer={true}
|
|
192
|
+
/>
|
|
193
|
+
) : selectedType === "FILL_IN_THE_BLANKS" &&
|
|
194
|
+
data["fillInTheBlanksBodyMap"] != null &&
|
|
195
|
+
data["fillInTheBlanksMaterialMap"] != null ? (
|
|
196
|
+
<FillInTheBlanksActivityContent
|
|
197
|
+
answerMap={answerMap}
|
|
198
|
+
changeAnswer={() => {}}
|
|
199
|
+
canAnswerQuestion={() => {
|
|
200
|
+
return true;
|
|
201
|
+
}}
|
|
202
|
+
data={data}
|
|
203
|
+
isPreview={true}
|
|
204
|
+
showCorrectAnswer={true}
|
|
205
|
+
isFullScreen={isFullScreen}
|
|
206
|
+
/>
|
|
207
|
+
) : selectedType === "OPEN_ENDED" &&
|
|
208
|
+
data["openEndedBodyMap"] != null ? (
|
|
209
|
+
<OpenEndedActivityContent
|
|
210
|
+
answerMap={answerMap}
|
|
211
|
+
canAnswerQuestion={() => false}
|
|
212
|
+
changeAnswer={() => {}}
|
|
213
|
+
showMaterialContent={true}
|
|
214
|
+
data={data}
|
|
215
|
+
isPreview={true}
|
|
216
|
+
isFullScreen={isFullScreen}
|
|
217
|
+
/>
|
|
218
|
+
) : selectedType === "TRUE_FALSE" &&
|
|
219
|
+
data["trueFalseBodyMap"] != null &&
|
|
220
|
+
data["trueFalseMaterialMap"] != null ? (
|
|
221
|
+
<TrueFalseActivityContent
|
|
222
|
+
answerMap={answerMap}
|
|
223
|
+
changeAnswer={() => {}}
|
|
224
|
+
canAnswerQuestion={() => {
|
|
225
|
+
return true;
|
|
226
|
+
}}
|
|
227
|
+
data={data}
|
|
228
|
+
isPreview={true}
|
|
229
|
+
showCorrectAnswer={true}
|
|
230
|
+
isFullScreen={isFullScreen}
|
|
231
|
+
/>
|
|
232
|
+
) : null}
|
|
233
|
+
</div>
|
|
234
|
+
{showSolution ? (
|
|
236
235
|
<div className="my-4">
|
|
237
236
|
<ActivitySolutionContent
|
|
238
237
|
activityTemplateType={selectedType}
|
|
@@ -240,7 +239,7 @@ const ActivityPreviewByData = ({
|
|
|
240
239
|
/>
|
|
241
240
|
</div>
|
|
242
241
|
) : null}
|
|
243
|
-
{
|
|
242
|
+
{showEvaluationRubric ? (
|
|
244
243
|
<div className="my-4">
|
|
245
244
|
<ActivityEvaluationRubricContent
|
|
246
245
|
activityTemplateType={selectedType}
|