catchup-library-web 1.20.29 → 1.20.30

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
@@ -5006,15 +5006,15 @@ var FillInTheBlanksActivityMaterialContent = ({
5006
5006
  const checkAnswerProvided = (answerMap2, option) => {
5007
5007
  return Object.keys(answerMap2).findIndex((key) => answerMap2[key] === option) !== -1;
5008
5008
  };
5009
+ const handleSelectOption = (option) => {
5010
+ setSelectedOption(option);
5011
+ setPasteOptionIndex(null);
5012
+ };
5009
5013
  const answerMap = retrieveAnswerMap();
5010
5014
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
5011
5015
  "div",
5012
5016
  {
5013
5017
  className: "flex flex-row flex-wrap items-center",
5014
- onMouseUp: () => {
5015
- },
5016
- onTouchStart: () => {
5017
- },
5018
5018
  children: [
5019
5019
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
5020
5020
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "hidden md:contents", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DividerLine_default, {}) }),
@@ -5035,15 +5035,8 @@ var FillInTheBlanksActivityMaterialContent = ({
5035
5035
  component: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5036
5036
  "div",
5037
5037
  {
5038
- className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer",
5039
- onMouseDown: () => {
5040
- setSelectedOption(option);
5041
- setPasteOptionIndex(null);
5042
- },
5043
- onTouchEnd: () => {
5044
- setSelectedOption(option);
5045
- setPasteOptionIndex(null);
5046
- },
5038
+ className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
5039
+ onClick: () => handleSelectOption(option),
5047
5040
  children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5048
5041
  InputWithSpecialExpression_default,
5049
5042
  {
@@ -5055,15 +5048,8 @@ var FillInTheBlanksActivityMaterialContent = ({
5055
5048
  ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5056
5049
  "div",
5057
5050
  {
5058
- className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
5059
- onMouseDown: () => {
5060
- setSelectedOption(option);
5061
- setPasteOptionIndex(null);
5062
- },
5063
- onTouchEnd: () => {
5064
- setSelectedOption(option);
5065
- setPasteOptionIndex(null);
5066
- },
5051
+ className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
5052
+ onClick: () => handleSelectOption(option),
5067
5053
  children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5068
5054
  ShowMaterialMediaByContentType_default,
5069
5055
  {
package/dist/index.mjs CHANGED
@@ -4790,15 +4790,15 @@ var FillInTheBlanksActivityMaterialContent = ({
4790
4790
  const checkAnswerProvided = (answerMap2, option) => {
4791
4791
  return Object.keys(answerMap2).findIndex((key) => answerMap2[key] === option) !== -1;
4792
4792
  };
4793
+ const handleSelectOption = (option) => {
4794
+ setSelectedOption(option);
4795
+ setPasteOptionIndex(null);
4796
+ };
4793
4797
  const answerMap = retrieveAnswerMap();
4794
4798
  return /* @__PURE__ */ jsxs17(
4795
4799
  "div",
4796
4800
  {
4797
4801
  className: "flex flex-row flex-wrap items-center",
4798
- onMouseUp: () => {
4799
- },
4800
- onTouchStart: () => {
4801
- },
4802
4802
  children: [
4803
4803
  /* @__PURE__ */ jsx30("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx30("span", { className: "font-semibold text-xl opacity-60", children: i18n_default.t("please_select_fill_in_the_blanks_text") }) }),
4804
4804
  /* @__PURE__ */ jsx30("div", { className: "hidden md:contents", children: /* @__PURE__ */ jsx30(DividerLine_default, {}) }),
@@ -4819,15 +4819,8 @@ var FillInTheBlanksActivityMaterialContent = ({
4819
4819
  component: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30(
4820
4820
  "div",
4821
4821
  {
4822
- className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer",
4823
- onMouseDown: () => {
4824
- setSelectedOption(option);
4825
- setPasteOptionIndex(null);
4826
- },
4827
- onTouchEnd: () => {
4828
- setSelectedOption(option);
4829
- setPasteOptionIndex(null);
4830
- },
4822
+ className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none",
4823
+ onClick: () => handleSelectOption(option),
4831
4824
  children: /* @__PURE__ */ jsx30("p", { className: "italic whitespace-pre-wrap", children: /* @__PURE__ */ jsx30(
4832
4825
  InputWithSpecialExpression_default,
4833
4826
  {
@@ -4839,15 +4832,8 @@ var FillInTheBlanksActivityMaterialContent = ({
4839
4832
  ) : /* @__PURE__ */ jsx30(
4840
4833
  "div",
4841
4834
  {
4842
- className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
4843
- onMouseDown: () => {
4844
- setSelectedOption(option);
4845
- setPasteOptionIndex(null);
4846
- },
4847
- onTouchEnd: () => {
4848
- setSelectedOption(option);
4849
- setPasteOptionIndex(null);
4850
- },
4835
+ className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none",
4836
+ onClick: () => handleSelectOption(option),
4851
4837
  children: /* @__PURE__ */ jsx30(
4852
4838
  ShowMaterialMediaByContentType_default,
4853
4839
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.20.29",
3
+ "version": "1.20.30",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -80,13 +80,18 @@ const FillInTheBlanksActivityMaterialContent = ({
80
80
  );
81
81
  };
82
82
 
83
+ const handleSelectOption = (option: any) => {
84
+ setSelectedOption(option);
85
+ setPasteOptionIndex(null);
86
+ };
87
+
83
88
  const answerMap = retrieveAnswerMap();
84
89
 
85
90
  return (
86
91
  <div
87
92
  className="flex flex-row flex-wrap items-center"
88
- onMouseUp={() => {}}
89
- onTouchStart={() => {}}
93
+ // onMouseUp={() => {}}
94
+ // onTouchStart={() => {}}
90
95
  >
91
96
  <div className="hidden md:block">
92
97
  <span className="font-semibold text-xl opacity-60">
@@ -116,15 +121,16 @@ const FillInTheBlanksActivityMaterialContent = ({
116
121
  component={
117
122
  contentMap.type === "TEXT" ? (
118
123
  <div
119
- className="border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer"
120
- onMouseDown={() => {
121
- setSelectedOption(option);
122
- setPasteOptionIndex(null);
123
- }}
124
- onTouchEnd={() => {
125
- setSelectedOption(option);
126
- setPasteOptionIndex(null);
127
- }}
124
+ className="border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer select-none"
125
+ onClick={() => handleSelectOption(option)}
126
+ // onMouseDown={() => {
127
+ // setSelectedOption(option);
128
+ // setPasteOptionIndex(null);
129
+ // }}
130
+ // onTouchEnd={() => {
131
+ // setSelectedOption(option);
132
+ // setPasteOptionIndex(null);
133
+ // }}
128
134
  >
129
135
  <p className="italic whitespace-pre-wrap">
130
136
  <InputWithSpecialExpression
@@ -135,15 +141,16 @@ const FillInTheBlanksActivityMaterialContent = ({
135
141
  </div>
136
142
  ) : (
137
143
  <div
138
- className="border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer"
139
- onMouseDown={() => {
140
- setSelectedOption(option);
141
- setPasteOptionIndex(null);
142
- }}
143
- onTouchEnd={() => {
144
- setSelectedOption(option);
145
- setPasteOptionIndex(null);
146
- }}
144
+ className="border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer select-none"
145
+ onClick={() => handleSelectOption(option)}
146
+ // onMouseDown={() => {
147
+ // setSelectedOption(option);
148
+ // setPasteOptionIndex(null);
149
+ // }}
150
+ // onTouchEnd={() => {
151
+ // setSelectedOption(option);
152
+ // setPasteOptionIndex(null);
153
+ // }}
147
154
  >
148
155
  <ShowMaterialMediaByContentType
149
156
  key={`${uniqueValue}-${index}`}