@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 +14 -11
- package/dist/react-ui.mjs +14 -11
- package/package.json +1 -1
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
|
-
|
|
136017
|
-
if (
|
|
136018
|
-
if (
|
|
136019
|
-
if (
|
|
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
|
-
|
|
136024
|
-
|
|
136025
|
-
|
|
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-
|
|
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",
|
|
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, {
|
|
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
|
-
|
|
135991
|
-
if (
|
|
135992
|
-
if (
|
|
135993
|
-
if (
|
|
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
|
-
|
|
135998
|
-
|
|
135999
|
-
|
|
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-
|
|
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",
|
|
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, {
|
|
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