@thanh01.pmt/interactive-quiz-kit 1.0.28 → 1.0.29

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/react-ui.cjs CHANGED
@@ -136013,19 +136013,22 @@ var ActivityCalendar = ({ stats }) => {
136013
136013
  const startDate = /* @__PURE__ */ new Date();
136014
136014
  startDate.setMonth(endDate.getMonth() - 6);
136015
136015
  const getClassForValue = (value) => {
136016
- if (!value || value.count === 0) return "color-empty";
136017
- if (value.count <= 1) return "color-scale-1";
136018
- if (value.count <= 3) return "color-scale-2";
136019
- if (value.count <= 5) return "color-scale-3";
136016
+ const heatmapValue = value;
136017
+ if (!heatmapValue || heatmapValue.count === 0) return "color-empty";
136018
+ if (heatmapValue.count <= 1) return "color-scale-1";
136019
+ if (heatmapValue.count <= 3) return "color-scale-2";
136020
+ if (heatmapValue.count <= 5) return "color-scale-3";
136020
136021
  return "color-scale-4";
136021
136022
  };
136022
136023
  const getTooltipDataAttrs = (value) => {
136023
- if (!value || !value.date) return null;
136024
- const dateString = new Date(value.date).toLocaleDateString(i18n.language);
136025
- const count4 = value.count || 0;
136024
+ const heatmapValue = value;
136025
+ if (!heatmapValue || !heatmapValue.date || heatmapValue.count === 0) {
136026
+ return {};
136027
+ }
136028
+ const dateString = new Date(heatmapValue.date).toLocaleDateString(i18n.language);
136029
+ const count4 = heatmapValue.count || 0;
136026
136030
  return {
136027
- "data-tooltip-id": "heatmap-tooltip",
136028
- "data-tooltip-content": t4("activityCalendar.tooltip", { count: count4, date: dateString })
136031
+ "data-tip": t4("activityCalendar.tooltip", { count: count4, date: dateString })
136029
136032
  };
136030
136033
  };
136031
136034
  const monthLabels = t4("activityCalendar.monthLabels", { returnObjects: true });
@@ -136033,7 +136036,7 @@ var ActivityCalendar = ({ stats }) => {
136033
136036
  if (!stats) {
136034
136037
  return /* @__PURE__ */ React162__namespace.default.createElement(Card, null, /* @__PURE__ */ React162__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React162__namespace.default.createElement(CardTitle, null, t4("activityCalendar.title")), /* @__PURE__ */ React162__namespace.default.createElement(CardDescription, null, t4("activityCalendar.description"))), /* @__PURE__ */ React162__namespace.default.createElement(CardContent, null, /* @__PURE__ */ React162__namespace.default.createElement(Skeleton, { className: "h-[150px] w-full" })));
136035
136038
  }
136036
- return /* @__PURE__ */ React162__namespace.default.createElement(Card, null, /* @__PURE__ */ React162__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React162__namespace.default.createElement(CardTitle, null, t4("activityCalendar.title")), /* @__PURE__ */ React162__namespace.default.createElement(CardDescription, null, t4("activityCalendar.description"))), /* @__PURE__ */ React162__namespace.default.createElement(CardContent, null, /* @__PURE__ */ React162__namespace.default.createElement("div", { "data-tip": "" }, /* @__PURE__ */ React162__namespace.default.createElement(
136039
+ return /* @__PURE__ */ React162__namespace.default.createElement(Card, null, /* @__PURE__ */ React162__namespace.default.createElement(CardHeader, null, /* @__PURE__ */ React162__namespace.default.createElement(CardTitle, null, t4("activityCalendar.title")), /* @__PURE__ */ React162__namespace.default.createElement(CardDescription, null, t4("activityCalendar.description"))), /* @__PURE__ */ React162__namespace.default.createElement(CardContent, null, /* @__PURE__ */ React162__namespace.default.createElement("div", null, /* @__PURE__ */ React162__namespace.default.createElement(
136037
136040
  react_calendar_heatmap_esm_default,
136038
136041
  {
136039
136042
  startDate,
@@ -136045,7 +136048,7 @@ var ActivityCalendar = ({ stats }) => {
136045
136048
  monthLabels,
136046
136049
  weekdayLabels
136047
136050
  }
136048
- )), /* @__PURE__ */ React162__namespace.default.createElement(M, { id: "heatmap-tooltip", className: "heatmap-tooltip" })));
136051
+ )), /* @__PURE__ */ React162__namespace.default.createElement(M, { className: "heatmap-tooltip" })));
136049
136052
  };
136050
136053
 
136051
136054
  // node_modules/recharts/es6/util/ReactUtils.js
package/dist/react-ui.mjs CHANGED
@@ -135987,19 +135987,22 @@ var ActivityCalendar = ({ stats }) => {
135987
135987
  const startDate = /* @__PURE__ */ new Date();
135988
135988
  startDate.setMonth(endDate.getMonth() - 6);
135989
135989
  const getClassForValue = (value) => {
135990
- if (!value || value.count === 0) return "color-empty";
135991
- if (value.count <= 1) return "color-scale-1";
135992
- if (value.count <= 3) return "color-scale-2";
135993
- if (value.count <= 5) return "color-scale-3";
135990
+ const heatmapValue = value;
135991
+ if (!heatmapValue || heatmapValue.count === 0) return "color-empty";
135992
+ if (heatmapValue.count <= 1) return "color-scale-1";
135993
+ if (heatmapValue.count <= 3) return "color-scale-2";
135994
+ if (heatmapValue.count <= 5) return "color-scale-3";
135994
135995
  return "color-scale-4";
135995
135996
  };
135996
135997
  const getTooltipDataAttrs = (value) => {
135997
- if (!value || !value.date) return null;
135998
- const dateString = new Date(value.date).toLocaleDateString(i18n.language);
135999
- const count4 = value.count || 0;
135998
+ const heatmapValue = value;
135999
+ if (!heatmapValue || !heatmapValue.date || heatmapValue.count === 0) {
136000
+ return {};
136001
+ }
136002
+ const dateString = new Date(heatmapValue.date).toLocaleDateString(i18n.language);
136003
+ const count4 = heatmapValue.count || 0;
136000
136004
  return {
136001
- "data-tooltip-id": "heatmap-tooltip",
136002
- "data-tooltip-content": t4("activityCalendar.tooltip", { count: count4, date: dateString })
136005
+ "data-tip": t4("activityCalendar.tooltip", { count: count4, date: dateString })
136003
136006
  };
136004
136007
  };
136005
136008
  const monthLabels = t4("activityCalendar.monthLabels", { returnObjects: true });
@@ -136007,7 +136010,7 @@ var ActivityCalendar = ({ stats }) => {
136007
136010
  if (!stats) {
136008
136011
  return /* @__PURE__ */ React162__default.createElement(Card, null, /* @__PURE__ */ React162__default.createElement(CardHeader, null, /* @__PURE__ */ React162__default.createElement(CardTitle, null, t4("activityCalendar.title")), /* @__PURE__ */ React162__default.createElement(CardDescription, null, t4("activityCalendar.description"))), /* @__PURE__ */ React162__default.createElement(CardContent, null, /* @__PURE__ */ React162__default.createElement(Skeleton, { className: "h-[150px] w-full" })));
136009
136012
  }
136010
- return /* @__PURE__ */ React162__default.createElement(Card, null, /* @__PURE__ */ React162__default.createElement(CardHeader, null, /* @__PURE__ */ React162__default.createElement(CardTitle, null, t4("activityCalendar.title")), /* @__PURE__ */ React162__default.createElement(CardDescription, null, t4("activityCalendar.description"))), /* @__PURE__ */ React162__default.createElement(CardContent, null, /* @__PURE__ */ React162__default.createElement("div", { "data-tip": "" }, /* @__PURE__ */ React162__default.createElement(
136013
+ return /* @__PURE__ */ React162__default.createElement(Card, null, /* @__PURE__ */ React162__default.createElement(CardHeader, null, /* @__PURE__ */ React162__default.createElement(CardTitle, null, t4("activityCalendar.title")), /* @__PURE__ */ React162__default.createElement(CardDescription, null, t4("activityCalendar.description"))), /* @__PURE__ */ React162__default.createElement(CardContent, null, /* @__PURE__ */ React162__default.createElement("div", null, /* @__PURE__ */ React162__default.createElement(
136011
136014
  react_calendar_heatmap_esm_default,
136012
136015
  {
136013
136016
  startDate,
@@ -136019,7 +136022,7 @@ var ActivityCalendar = ({ stats }) => {
136019
136022
  monthLabels,
136020
136023
  weekdayLabels
136021
136024
  }
136022
- )), /* @__PURE__ */ React162__default.createElement(M, { id: "heatmap-tooltip", className: "heatmap-tooltip" })));
136025
+ )), /* @__PURE__ */ React162__default.createElement(M, { className: "heatmap-tooltip" })));
136023
136026
  };
136024
136027
 
136025
136028
  // node_modules/recharts/es6/util/ReactUtils.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thanh01.pmt/interactive-quiz-kit",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "A comprehensive library for creating, managing, and playing interactive quizzes, with AI generation and SCORM support.",
5
5
  "keywords": [
6
6
  "react",