catchup-library-web 1.0.22 → 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,
@@ -5988,16 +5989,19 @@ var ActivityPreviewByData = ({
5988
5989
  if (!data) return;
5989
5990
  const answer = constructAnswerBasedOnData(data);
5990
5991
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
5991
- showType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5992
- SelectionBox_default,
5993
- {
5994
- optionList,
5995
- selectedId: selectedType,
5996
- handleSelectOnClick: (itemId) => {
5997
- 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
+ }
5998
6002
  }
5999
- }
6000
- ) : null,
6003
+ )
6004
+ ] }) : null,
6001
6005
  selectedType ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "", children: [
6002
6006
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DividerLine_default, {}),
6003
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,
@@ -5814,16 +5815,19 @@ var ActivityPreviewByData = ({
5814
5815
  if (!data) return;
5815
5816
  const answer = constructAnswerBasedOnData(data);
5816
5817
  return /* @__PURE__ */ jsxs32(Fragment9, { children: [
5817
- showType ? /* @__PURE__ */ jsx41(
5818
- SelectionBox_default,
5819
- {
5820
- optionList,
5821
- selectedId: selectedType,
5822
- handleSelectOnClick: (itemId) => {
5823
- 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
+ }
5824
5828
  }
5825
- }
5826
- ) : null,
5829
+ )
5830
+ ] }) : null,
5827
5831
  selectedType ? /* @__PURE__ */ jsxs32("div", { className: "", children: [
5828
5832
  /* @__PURE__ */ jsx41(DividerLine_default, {}),
5829
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.22",
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,
@@ -90,13 +92,23 @@ const ActivityPreviewByData = ({
90
92
  return (
91
93
  <>
92
94
  {showType ? (
93
- <SelectionBox
94
- optionList={optionList}
95
- selectedId={selectedType}
96
- handleSelectOnClick={(itemId) => {
97
- setSelectedType(itemId);
98
- }}
99
- />
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
+ </>
100
112
  ) : null}
101
113
  {selectedType ? (
102
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;