catchup-library-web 1.0.21 → 1.0.23

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
@@ -143,6 +143,7 @@ interface IActivitySolutionProps {
143
143
  interface IActivityPreviewByDataProps {
144
144
  data: any;
145
145
  showType: boolean;
146
+ showDescription: boolean;
146
147
  lockedType: string;
147
148
  typeOptionList: any[];
148
149
  showTaxonomy: boolean;
@@ -169,7 +170,7 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
169
170
 
170
171
  declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
171
172
 
172
- declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, showSolution, showTaxonomy, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
173
+ declare const ActivityPreviewByData: ({ data, showType, showDescription, lockedType, typeOptionList, showSolution, showTaxonomy, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
173
174
 
174
175
  interface IDividerLineProps {
175
176
  opacity: string;
package/dist/index.d.ts CHANGED
@@ -143,6 +143,7 @@ interface IActivitySolutionProps {
143
143
  interface IActivityPreviewByDataProps {
144
144
  data: any;
145
145
  showType: boolean;
146
+ showDescription: boolean;
146
147
  lockedType: string;
147
148
  typeOptionList: any[];
148
149
  showTaxonomy: boolean;
@@ -169,7 +170,7 @@ declare const TrueFalseActivityContent: ({ answer, data, canAnswerQuestion, chan
169
170
 
170
171
  declare const ActivitySolutionContent: ({ activityTemplateType, data, }: IActivitySolutionProps) => react_jsx_runtime.JSX.Element | undefined;
171
172
 
172
- declare const ActivityPreviewByData: ({ data, showType, lockedType, typeOptionList, showSolution, showTaxonomy, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
173
+ declare const ActivityPreviewByData: ({ data, showType, showDescription, lockedType, typeOptionList, showSolution, showTaxonomy, }: IActivityPreviewByDataProps) => react_jsx_runtime.JSX.Element | undefined;
173
174
 
174
175
  interface IDividerLineProps {
175
176
  opacity: string;
package/dist/index.js CHANGED
@@ -5923,6 +5923,7 @@ var import_jsx_runtime41 = require("react/jsx-runtime");
5923
5923
  var ActivityPreviewByData = ({
5924
5924
  data,
5925
5925
  showType,
5926
+ showDescription,
5926
5927
  lockedType,
5927
5928
  typeOptionList,
5928
5929
  showSolution,
@@ -5977,26 +5978,30 @@ var ActivityPreviewByData = ({
5977
5978
  if (showTaxonomy) {
5978
5979
  setOptionList(
5979
5980
  typeOptionList.map((typeOption) => __spreadProps(__spreadValues({}, typeOption), {
5980
- subTitle: retrieveTaxonomyNameByActivityTypeFromData(typeOption)
5981
+ subText: retrieveTaxonomyNameByActivityTypeFromData(typeOption)
5981
5982
  }))
5982
5983
  );
5983
5984
  } else {
5984
5985
  setOptionList(typeOptionList);
5985
5986
  }
5986
5987
  }, [data, typeOptionList, showTaxonomy]);
5988
+ console.log(optionList);
5987
5989
  if (!data) return;
5988
5990
  const answer = constructAnswerBasedOnData(data);
5989
5991
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5990
- showType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5991
- SelectionBox_default,
5992
- {
5993
- optionList,
5994
- selectedId: selectedType,
5995
- handleSelectOnClick: (itemId) => {
5996
- setSelectedType(itemId);
5992
+ showType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5993
+ showDescription ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
5994
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5995
+ SelectionBox_default,
5996
+ {
5997
+ optionList,
5998
+ selectedId: selectedType,
5999
+ handleSelectOnClick: (itemId) => {
6000
+ setSelectedType(itemId);
6001
+ }
5997
6002
  }
5998
- }
5999
- ) : null,
6003
+ )
6004
+ ] }) : null,
6000
6005
  selectedType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "", children: [
6001
6006
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DividerLine_default, {}),
6002
6007
  selectedType === "ORDERING" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
package/dist/index.mjs CHANGED
@@ -5749,6 +5749,7 @@ import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-r
5749
5749
  var ActivityPreviewByData = ({
5750
5750
  data,
5751
5751
  showType,
5752
+ showDescription,
5752
5753
  lockedType,
5753
5754
  typeOptionList,
5754
5755
  showSolution,
@@ -5803,26 +5804,30 @@ var ActivityPreviewByData = ({
5803
5804
  if (showTaxonomy) {
5804
5805
  setOptionList(
5805
5806
  typeOptionList.map((typeOption) => __spreadProps(__spreadValues({}, typeOption), {
5806
- subTitle: retrieveTaxonomyNameByActivityTypeFromData(typeOption)
5807
+ subText: retrieveTaxonomyNameByActivityTypeFromData(typeOption)
5807
5808
  }))
5808
5809
  );
5809
5810
  } else {
5810
5811
  setOptionList(typeOptionList);
5811
5812
  }
5812
5813
  }, [data, typeOptionList, showTaxonomy]);
5814
+ console.log(optionList);
5813
5815
  if (!data) return;
5814
5816
  const answer = constructAnswerBasedOnData(data);
5815
5817
  return /* @__PURE__ */ jsxs32(Fragment9, { children: [
5816
- showType ? /* @__PURE__ */ jsx41(
5817
- SelectionBox_default,
5818
- {
5819
- optionList,
5820
- selectedId: selectedType,
5821
- handleSelectOnClick: (itemId) => {
5822
- setSelectedType(itemId);
5818
+ showType ? /* @__PURE__ */ jsxs32(Fragment9, { children: [
5819
+ showDescription ? /* @__PURE__ */ jsx41("div", { className: "my-2", children: /* @__PURE__ */ jsx41("p", { className: "font-semibold text-lg", children: i18n_default.t("activity_template") }) }) : null,
5820
+ /* @__PURE__ */ jsx41(
5821
+ SelectionBox_default,
5822
+ {
5823
+ optionList,
5824
+ selectedId: selectedType,
5825
+ handleSelectOnClick: (itemId) => {
5826
+ setSelectedType(itemId);
5827
+ }
5823
5828
  }
5824
- }
5825
- ) : null,
5829
+ )
5830
+ ] }) : null,
5826
5831
  selectedType ? /* @__PURE__ */ jsxs32("div", { className: "", children: [
5827
5832
  /* @__PURE__ */ jsx41(DividerLine_default, {}),
5828
5833
  selectedType === "ORDERING" ? /* @__PURE__ */ jsx41(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -13,10 +13,12 @@ import TrueFalseActivityContent from "./TrueFalseActivityContent";
13
13
  import { IActivityPreviewByDataProps } from "../../properties/ActivityProperties";
14
14
  import ActivitySolutionContent from "./solution-content/ActivitySolutionContent";
15
15
  import DividerLine from "../dividers/DividerLine";
16
+ import i18n from "../../language/i18n";
16
17
 
17
18
  const ActivityPreviewByData = ({
18
19
  data,
19
20
  showType,
21
+ showDescription,
20
22
  lockedType,
21
23
  typeOptionList,
22
24
  showSolution,
@@ -74,7 +76,7 @@ const ActivityPreviewByData = ({
74
76
  setOptionList(
75
77
  typeOptionList.map((typeOption) => ({
76
78
  ...typeOption,
77
- subTitle: retrieveTaxonomyNameByActivityTypeFromData(typeOption),
79
+ subText: retrieveTaxonomyNameByActivityTypeFromData(typeOption),
78
80
  }))
79
81
  );
80
82
  } else {
@@ -82,19 +84,31 @@ const ActivityPreviewByData = ({
82
84
  }
83
85
  }, [data, typeOptionList, showTaxonomy]);
84
86
 
87
+ console.log(optionList);
88
+
85
89
  if (!data) return;
86
90
  const answer = constructAnswerBasedOnData(data);
87
91
 
88
92
  return (
89
93
  <>
90
94
  {showType ? (
91
- <SelectionBox
92
- optionList={optionList}
93
- selectedId={selectedType}
94
- handleSelectOnClick={(itemId) => {
95
- setSelectedType(itemId);
96
- }}
97
- />
95
+ <>
96
+ {showDescription ? (
97
+ <div className="my-2">
98
+ <p className="font-semibold text-lg">
99
+ {i18n.t("activity_template")}
100
+ </p>
101
+ </div>
102
+ ) : null}
103
+
104
+ <SelectionBox
105
+ optionList={optionList}
106
+ selectedId={selectedType}
107
+ handleSelectOnClick={(itemId) => {
108
+ setSelectedType(itemId);
109
+ }}
110
+ />
111
+ </>
98
112
  ) : null}
99
113
  {selectedType ? (
100
114
  <div className="">
@@ -206,6 +206,7 @@ export interface IActivitySolutionProps {
206
206
  export interface IActivityPreviewByDataProps {
207
207
  data: any;
208
208
  showType: boolean;
209
+ showDescription: boolean;
209
210
  lockedType: string;
210
211
  typeOptionList: any[];
211
212
  showTaxonomy: boolean;