catchup-library-web 1.0.15 → 1.0.16
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +15 -4
- package/dist/index.mjs +26 -15
- package/package.json +1 -1
- package/src/components/activities/ActivityPreviewByData.tsx +8 -0
- package/src/components/tabs/SelectionTab.tsx +5 -2
- package/src/properties/ActivityProperties.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -145,6 +145,7 @@ interface IActivityPreviewByDataProps {
|
|
|
145
145
|
showType: boolean;
|
|
146
146
|
lockedType: string;
|
|
147
147
|
typeOptionList: any[];
|
|
148
|
+
showSolution: boolean;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
declare const DropdownActivityContent: ({ answer, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -167,7 +168,7 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
|
|
|
167
168
|
|
|
168
169
|
declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
169
170
|
|
|
170
|
-
declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
171
|
+
declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, showSolution, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
171
172
|
|
|
172
173
|
interface IDividerLineProps {
|
|
173
174
|
opacity: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ interface IActivityPreviewByDataProps {
|
|
|
145
145
|
showType: boolean;
|
|
146
146
|
lockedType: string;
|
|
147
147
|
typeOptionList: any[];
|
|
148
|
+
showSolution: boolean;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
declare const DropdownActivityContent: ({ answer, data, canAnswerQuestion, changeAnswer, isPreview, showCorrectAnswer, }: IDropdownActivityProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -167,7 +168,7 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
|
|
|
167
168
|
|
|
168
169
|
declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
169
170
|
|
|
170
|
-
declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
171
|
+
declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, showSolution, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
171
172
|
|
|
172
173
|
interface IDividerLineProps {
|
|
173
174
|
opacity: string;
|
package/dist/index.js
CHANGED
|
@@ -5924,7 +5924,8 @@ var ActivityPreviewByData = ({
|
|
|
5924
5924
|
data,
|
|
5925
5925
|
showType,
|
|
5926
5926
|
lockedType,
|
|
5927
|
-
typeOptionList
|
|
5927
|
+
typeOptionList,
|
|
5928
|
+
showSolution
|
|
5928
5929
|
}) => {
|
|
5929
5930
|
const [selectedType, setSelectedType] = (0, import_react24.useState)(null);
|
|
5930
5931
|
(0, import_react24.useEffect)(() => {
|
|
@@ -6062,7 +6063,14 @@ var ActivityPreviewByData = ({
|
|
|
6062
6063
|
isPreview: true,
|
|
6063
6064
|
showCorrectAnswer: true
|
|
6064
6065
|
}
|
|
6065
|
-
) : null : null
|
|
6066
|
+
) : null : null,
|
|
6067
|
+
selectedType && showSolution ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6068
|
+
ActivitySolutionContent_default,
|
|
6069
|
+
{
|
|
6070
|
+
activityTemplateType: selectedType,
|
|
6071
|
+
data
|
|
6072
|
+
}
|
|
6073
|
+
) : null
|
|
6066
6074
|
] });
|
|
6067
6075
|
};
|
|
6068
6076
|
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
@@ -6140,14 +6148,17 @@ var SelectionTab = ({
|
|
|
6140
6148
|
textColor,
|
|
6141
6149
|
borderColor
|
|
6142
6150
|
}) => {
|
|
6143
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-
|
|
6151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-center", children: optionList.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6144
6152
|
"div",
|
|
6145
6153
|
{
|
|
6146
6154
|
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
6147
6155
|
onClick: () => {
|
|
6148
6156
|
handleSelectOnClick(option.id);
|
|
6149
6157
|
},
|
|
6150
|
-
children:
|
|
6158
|
+
children: [
|
|
6159
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-lg", children: option.title }),
|
|
6160
|
+
option.subTitle ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-md", children: option.subTitle }) : null
|
|
6161
|
+
]
|
|
6151
6162
|
},
|
|
6152
6163
|
index
|
|
6153
6164
|
)) });
|
package/dist/index.mjs
CHANGED
|
@@ -5750,7 +5750,8 @@ var ActivityPreviewByData = ({
|
|
|
5750
5750
|
data,
|
|
5751
5751
|
showType,
|
|
5752
5752
|
lockedType,
|
|
5753
|
-
typeOptionList
|
|
5753
|
+
typeOptionList,
|
|
5754
|
+
showSolution
|
|
5754
5755
|
}) => {
|
|
5755
5756
|
const [selectedType, setSelectedType] = useState19(null);
|
|
5756
5757
|
useEffect11(() => {
|
|
@@ -5888,7 +5889,14 @@ var ActivityPreviewByData = ({
|
|
|
5888
5889
|
isPreview: true,
|
|
5889
5890
|
showCorrectAnswer: true
|
|
5890
5891
|
}
|
|
5891
|
-
) : null : null
|
|
5892
|
+
) : null : null,
|
|
5893
|
+
selectedType && showSolution ? /* @__PURE__ */ jsx41(
|
|
5894
|
+
ActivitySolutionContent_default,
|
|
5895
|
+
{
|
|
5896
|
+
activityTemplateType: selectedType,
|
|
5897
|
+
data
|
|
5898
|
+
}
|
|
5899
|
+
) : null
|
|
5892
5900
|
] });
|
|
5893
5901
|
};
|
|
5894
5902
|
var ActivityPreviewByData_default = ActivityPreviewByData;
|
|
@@ -5956,7 +5964,7 @@ var SelectionCheckbox = ({
|
|
|
5956
5964
|
var SelectionCheckbox_default = SelectionCheckbox;
|
|
5957
5965
|
|
|
5958
5966
|
// src/components/tabs/SelectionTab.tsx
|
|
5959
|
-
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
5967
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5960
5968
|
var SelectionTab = ({
|
|
5961
5969
|
optionList,
|
|
5962
5970
|
selectedId,
|
|
@@ -5966,14 +5974,17 @@ var SelectionTab = ({
|
|
|
5966
5974
|
textColor,
|
|
5967
5975
|
borderColor
|
|
5968
5976
|
}) => {
|
|
5969
|
-
return /* @__PURE__ */ jsx44("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-
|
|
5977
|
+
return /* @__PURE__ */ jsx44("div", { className: "flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-center", children: optionList.map((option, index) => /* @__PURE__ */ jsxs34(
|
|
5970
5978
|
"div",
|
|
5971
5979
|
{
|
|
5972
5980
|
className: `${selectedId === option.id ? selectedTextColor ? selectedTextColor : "text-catchup-blue-500" : textColor ? textColor : "text-catchup-gray-300"} ${selectedId === option.id ? selectedBorderColor ? selectedBorderColor : "border-catchup-blue-500" : borderColor ? borderColor : "border-catchup-gray-50"} border-b-2 transition-all duration-300 p-3 cursor-pointer`,
|
|
5973
5981
|
onClick: () => {
|
|
5974
5982
|
handleSelectOnClick(option.id);
|
|
5975
5983
|
},
|
|
5976
|
-
children:
|
|
5984
|
+
children: [
|
|
5985
|
+
/* @__PURE__ */ jsx44("p", { className: "text-lg", children: option.title }),
|
|
5986
|
+
option.subTitle ? /* @__PURE__ */ jsx44("p", { className: "text-md", children: option.subTitle }) : null
|
|
5987
|
+
]
|
|
5977
5988
|
},
|
|
5978
5989
|
index
|
|
5979
5990
|
)) });
|
|
@@ -5981,12 +5992,12 @@ var SelectionTab = ({
|
|
|
5981
5992
|
var SelectionTab_default = SelectionTab;
|
|
5982
5993
|
|
|
5983
5994
|
// src/components/labels/ActivityTemplateLabel.tsx
|
|
5984
|
-
import { jsx as jsx45, jsxs as
|
|
5995
|
+
import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5985
5996
|
var ActivityTemplateLabel = ({
|
|
5986
5997
|
title,
|
|
5987
5998
|
font
|
|
5988
5999
|
}) => {
|
|
5989
|
-
return /* @__PURE__ */ jsx45("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */
|
|
6000
|
+
return /* @__PURE__ */ jsx45("div", { className: "px-3 py-1 gap-x-3 border border-grade-label-border bg-grade-label text-grade-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs35("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
5990
6001
|
/* @__PURE__ */ jsx45(BaseImage_default, { src: "/icons/activity.png", alt: "label", size: "xsmall" }),
|
|
5991
6002
|
/* @__PURE__ */ jsx45("p", { className: font ? font : "text-sm", children: title })
|
|
5992
6003
|
] }) });
|
|
@@ -5994,9 +6005,9 @@ var ActivityTemplateLabel = ({
|
|
|
5994
6005
|
var ActivityTemplateLabel_default = ActivityTemplateLabel;
|
|
5995
6006
|
|
|
5996
6007
|
// src/components/labels/BrandLabel.tsx
|
|
5997
|
-
import { jsx as jsx46, jsxs as
|
|
6008
|
+
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5998
6009
|
var BrandLabel = ({ title, icon, font }) => {
|
|
5999
|
-
return /* @__PURE__ */ jsx46("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */
|
|
6010
|
+
return /* @__PURE__ */ jsx46("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs36("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6000
6011
|
icon ? icon : /* @__PURE__ */ jsx46(BaseImage_default, { src: "/icons/brand-label.png", alt: "label", size: "xsmall" }),
|
|
6001
6012
|
/* @__PURE__ */ jsx46("p", { className: font ? font : "text-sm", children: title })
|
|
6002
6013
|
] }) });
|
|
@@ -6018,9 +6029,9 @@ var GradeLabel = ({ title, font }) => {
|
|
|
6018
6029
|
var GradeLabel_default = GradeLabel;
|
|
6019
6030
|
|
|
6020
6031
|
// src/components/labels/OutcomeLabel.tsx
|
|
6021
|
-
import { jsx as jsx49, jsxs as
|
|
6032
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6022
6033
|
var OutcomeLabel = ({ title, font }) => {
|
|
6023
|
-
return /* @__PURE__ */ jsx49("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */
|
|
6034
|
+
return /* @__PURE__ */ jsx49("div", { className: "px-3 py-1 gap-x-3 border border-brand-label-border bg-brand-label text-brand-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6024
6035
|
/* @__PURE__ */ jsx49(BaseImage_default, { src: "/icons/category.png", alt: "label", size: "xsmall" }),
|
|
6025
6036
|
/* @__PURE__ */ jsx49("p", { className: font ? font : "text-sm", children: title })
|
|
6026
6037
|
] }) });
|
|
@@ -6028,9 +6039,9 @@ var OutcomeLabel = ({ title, font }) => {
|
|
|
6028
6039
|
var OutcomeLabel_default = OutcomeLabel;
|
|
6029
6040
|
|
|
6030
6041
|
// src/components/labels/PersonalLabel.tsx
|
|
6031
|
-
import { jsx as jsx50, jsxs as
|
|
6042
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6032
6043
|
var PersonalLabel = ({ title, icon, font }) => {
|
|
6033
|
-
return /* @__PURE__ */ jsx50("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */
|
|
6044
|
+
return /* @__PURE__ */ jsx50("div", { className: "px-3 py-1 gap-x-3 border border-personal-label-border bg-personal-label text-personal-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6034
6045
|
icon ? icon : /* @__PURE__ */ jsx50(
|
|
6035
6046
|
BaseImage_default,
|
|
6036
6047
|
{
|
|
@@ -6045,9 +6056,9 @@ var PersonalLabel = ({ title, icon, font }) => {
|
|
|
6045
6056
|
var PersonalLabel_default = PersonalLabel;
|
|
6046
6057
|
|
|
6047
6058
|
// src/components/labels/PublishingHouseLabel.tsx
|
|
6048
|
-
import { jsx as jsx51, jsxs as
|
|
6059
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6049
6060
|
var PublishingHouseLabel = ({ title, icon, font }) => {
|
|
6050
|
-
return /* @__PURE__ */ jsx51("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */
|
|
6061
|
+
return /* @__PURE__ */ jsx51("div", { className: "px-3 py-1 gap-x-3 border border-publishing-house-label-border bg-publishing-house-label text-publishing-house-label-text rounded-catchup-3xlarge", children: /* @__PURE__ */ jsxs39("div", { className: "flex flex-row items-center gap-x-2", children: [
|
|
6051
6062
|
icon ? icon : /* @__PURE__ */ jsx51(
|
|
6052
6063
|
BaseImage_default,
|
|
6053
6064
|
{
|
package/package.json
CHANGED
|
@@ -11,12 +11,14 @@ import OrderingActivityContent from "./OrderingActivityContent";
|
|
|
11
11
|
import SelectionBox from "../boxes/SelectionBox";
|
|
12
12
|
import TrueFalseActivityContent from "./TrueFalseActivityContent";
|
|
13
13
|
import { IActivityPreviewByDataProps } from "../../properties/ActivityProperties";
|
|
14
|
+
import ActivitySolutionContent from "./solution-content/ActivitySolutionContent";
|
|
14
15
|
|
|
15
16
|
const ActivityPreviewByData = ({
|
|
16
17
|
data,
|
|
17
18
|
showType,
|
|
18
19
|
lockedType,
|
|
19
20
|
typeOptionList,
|
|
21
|
+
showSolution,
|
|
20
22
|
}: IActivityPreviewByDataProps) => {
|
|
21
23
|
const [selectedType, setSelectedType] = useState(null);
|
|
22
24
|
|
|
@@ -142,6 +144,12 @@ const ActivityPreviewByData = ({
|
|
|
142
144
|
/>
|
|
143
145
|
) : null
|
|
144
146
|
) : null}
|
|
147
|
+
{selectedType && showSolution ? (
|
|
148
|
+
<ActivitySolutionContent
|
|
149
|
+
activityTemplateType={selectedType}
|
|
150
|
+
data={data}
|
|
151
|
+
/>
|
|
152
|
+
) : null}
|
|
145
153
|
</>
|
|
146
154
|
);
|
|
147
155
|
};
|
|
@@ -10,7 +10,7 @@ const SelectionTab = ({
|
|
|
10
10
|
borderColor,
|
|
11
11
|
}: ISelectionTabProps) => {
|
|
12
12
|
return (
|
|
13
|
-
<div className="flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-
|
|
13
|
+
<div className="flex flex-row items-center gap-x-4 gap-y-2 flex-wrap mb-2 text-center">
|
|
14
14
|
{optionList.map((option: any, index: number) => (
|
|
15
15
|
<div
|
|
16
16
|
key={index}
|
|
@@ -35,7 +35,10 @@ const SelectionTab = ({
|
|
|
35
35
|
handleSelectOnClick(option.id);
|
|
36
36
|
}}
|
|
37
37
|
>
|
|
38
|
-
{option.title}
|
|
38
|
+
<p className="text-lg">{option.title}</p>
|
|
39
|
+
{option.subTitle ? (
|
|
40
|
+
<p className="text-md">{option.subTitle}</p>
|
|
41
|
+
) : null}
|
|
39
42
|
</div>
|
|
40
43
|
))}
|
|
41
44
|
</div>
|