@thanh01.pmt/interactive-quiz-kit 1.0.45 → 1.0.46

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
@@ -142551,7 +142551,7 @@ function z29(e3 = x) {
142551
142551
  }
142552
142552
  var B = { tooltip: "core-styles-module_tooltip__3vRRp", fixed: "core-styles-module_fixed__pcSol", arrow: "core-styles-module_arrow__cvMwQ", noArrow: "core-styles-module_noArrow__xock6", clickable: "core-styles-module_clickable__ZuTTB", show: "core-styles-module_show__Nt9eE", closing: "core-styles-module_closing__sGnxF" };
142553
142553
  var D2 = { tooltip: "styles-module_tooltip__mnnfp", arrow: "styles-module_arrow__K0L3T", dark: "styles-module_dark__xNqje", light: "styles-module_light__Z6W-X", success: "styles-module_success__A2AKt", warning: "styles-module_warning__SCK0X", error: "styles-module_error__JvumD", info: "styles-module_info__BWdHW" };
142554
- var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u2 = "dark", anchorId: d, anchorSelect: p2, place: v = "top", offset: m = 10, events: h3 = ["hover"], openOnClick: w2 = false, positionStrategy: b2 = "absolute", middlewares: S3, wrapper: g, delayShow: A3 = 0, delayHide: O2 = 0, float: T3 = false, hidden: x3 = false, noArrow: N2 = false, clickable: $3 = false, closeOnEsc: I = false, closeOnScroll: j = false, closeOnResize: q2 = false, openEvents: H2, closeEvents: M2, globalCloseEvents: W, imperativeModeOnly: P2, style: V, position: F, afterShow: K, afterHide: U2, disableTooltip: X3, content: Y, contentWrapperRef: G, isOpen: Z2, defaultIsOpen: J = false, setIsOpen: Q, activeAnchor: ee, setActiveAnchor: te, border: oe, opacity: le, arrowColor: re3, arrowSize: ne = 8, role: ie3 = "tooltip" }) => {
142554
+ var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u2 = "dark", anchorId: d, anchorSelect: p2, place: v = "top", offset: m = 10, events: h3 = ["hover"], openOnClick: w2 = false, positionStrategy: b2 = "absolute", middlewares: S3, wrapper: g, delayShow: A3 = 0, delayHide: O2 = 0, float: T3 = false, hidden: x3 = false, noArrow: N2 = false, clickable: $3 = false, closeOnEsc: I = false, closeOnScroll: j = false, closeOnResize: q2 = false, openEvents: H2, closeEvents: M2, globalCloseEvents: W, imperativeModeOnly: P2, style: V, position: F, afterShow: K, afterHide: U2, disableTooltip: X2, content: Y, contentWrapperRef: G, isOpen: Z2, defaultIsOpen: J = false, setIsOpen: Q, activeAnchor: ee, setActiveAnchor: te, border: oe, opacity: le, arrowColor: re3, arrowSize: ne = 8, role: ie3 = "tooltip" }) => {
142555
142555
  var ce;
142556
142556
  const se = React163.useRef(null), ae = React163.useRef(null), ue = React163.useRef(null), de = React163.useRef(null), pe = React163.useRef(null), [ve, me] = React163.useState({ tooltipStyles: {}, tooltipArrowStyles: {}, place: v }), [fe, ye] = React163.useState(false), [he, we] = React163.useState(false), [be, Se] = React163.useState(null), ge = React163.useRef(false), Ee = React163.useRef(null), { anchorRefs: Ae, setActiveAnchor: _e } = z29(l2), Oe = React163.useRef(false), [ke, Te] = React163.useState([]), Le = React163.useRef(false), Ce = w2 || h3.includes("click"), Re = Ce || (null == H2 ? void 0 : H2.click) || (null == H2 ? void 0 : H2.dblclick) || (null == H2 ? void 0 : H2.mousedown), xe = H2 ? { ...H2 } : { mouseover: true, focus: true, mouseenter: false, click: false, dblclick: false, mousedown: false };
142557
142557
  !H2 && Ce && Object.assign(xe, { mouseenter: false, focus: false, mouseover: false, click: true });
@@ -142639,10 +142639,10 @@ var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u
142639
142639
  var e3, t5;
142640
142640
  const o2 = new Set(Ae);
142641
142641
  ke.forEach((e4) => {
142642
- (null == X3 ? void 0 : X3(e4)) || o2.add({ current: e4 });
142642
+ (null == X2 ? void 0 : X2(e4)) || o2.add({ current: e4 });
142643
142643
  });
142644
142644
  const l3 = document.querySelector(`[id='${d}']`);
142645
- l3 && !(null == X3 ? void 0 : X3(l3)) && o2.add({ current: l3 });
142645
+ l3 && !(null == X2 ? void 0 : X2(l3)) && o2.add({ current: l3 });
142646
142646
  const r4 = () => {
142647
142647
  Ie(false);
142648
142648
  }, n2 = L2(ee), i3 = L2(se.current);
@@ -142758,7 +142758,7 @@ var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u
142758
142758
  }, style: { ...V, ...ve.tooltipStyles, opacity: void 0 !== le && Ye ? le : void 0 }, ref: se }, Xe, React163__namespace.default.createElement(g, { className: (0, import_classnames.default)("react-tooltip-arrow", B.arrow, D2.arrow, c4, N2 && B.noArrow), style: { ...ve.tooltipArrowStyles, background: re3 ? `linear-gradient(to right bottom, transparent 50%, ${re3} 50%)` : void 0, "--rt-arrow-size": `${ne}px` }, ref: ae })) : null;
142759
142759
  };
142760
142760
  var H = ({ content: t4 }) => React163__namespace.default.createElement("span", { dangerouslySetInnerHTML: { __html: t4 } });
142761
- var M = React163__namespace.default.forwardRef(({ id: t4, anchorId: l2, anchorSelect: n2, content: i2, html: c4, render: a4, className: u2, classNameArrow: d, variant: p2 = "dark", place: v = "top", offset: m = 10, wrapper: f = "div", children: h3 = null, events: w2 = ["hover"], openOnClick: b2 = false, positionStrategy: S3 = "absolute", middlewares: g, delayShow: E2 = 0, delayHide: _2 = 0, float: O2 = false, hidden: k3 = false, noArrow: T3 = false, clickable: L3 = false, closeOnEsc: C3 = false, closeOnScroll: R3 = false, closeOnResize: x3 = false, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j = false, style: B2, position: D3, isOpen: M2, defaultIsOpen: W = false, disableStyleInjection: P2 = false, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X3, afterShow: Y, afterHide: G, disableTooltip: Z2, role: J = "tooltip" }, Q) => {
142761
+ var M = React163__namespace.default.forwardRef(({ id: t4, anchorId: l2, anchorSelect: n2, content: i2, html: c4, render: a4, className: u2, classNameArrow: d, variant: p2 = "dark", place: v = "top", offset: m = 10, wrapper: f = "div", children: h3 = null, events: w2 = ["hover"], openOnClick: b2 = false, positionStrategy: S3 = "absolute", middlewares: g, delayShow: E2 = 0, delayHide: _2 = 0, float: O2 = false, hidden: k3 = false, noArrow: T3 = false, clickable: L3 = false, closeOnEsc: C3 = false, closeOnScroll: R3 = false, closeOnResize: x3 = false, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j = false, style: B2, position: D3, isOpen: M2, defaultIsOpen: W = false, disableStyleInjection: P2 = false, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X2, afterShow: Y, afterHide: G, disableTooltip: Z2, role: J = "tooltip" }, Q) => {
142762
142762
  const [ee, te] = React163.useState(i2), [oe, le] = React163.useState(c4), [re3, ne] = React163.useState(v), [ie3, ce] = React163.useState(p2), [se, ae] = React163.useState(m), [ue, de] = React163.useState(E2), [pe, ve] = React163.useState(_2), [me, fe] = React163.useState(O2), [ye, he] = React163.useState(k3), [we, be] = React163.useState(f), [Se, ge] = React163.useState(w2), [Ee, Ae] = React163.useState(S3), [_e, Oe] = React163.useState(null), [ke, Te] = React163.useState(null), Le = React163.useRef(P2), { anchorRefs: Ce, activeAnchor: Re } = z29(t4), xe = (e3) => null == e3 ? void 0 : e3.getAttributeNames().reduce((t5, o2) => {
142763
142763
  var l3;
142764
142764
  if (o2.startsWith("data-tooltip-")) {
@@ -142865,7 +142865,7 @@ var M = React163__namespace.default.forwardRef(({ id: t4, anchorId: l2, anchorSe
142865
142865
  $e = t5 ? React163__namespace.default.createElement("div", { ref: Ie, className: "react-tooltip-content-wrapper" }, t5) : null;
142866
142866
  } else ee && ($e = ee);
142867
142867
  oe && ($e = React163__namespace.default.createElement(H, { content: oe }));
142868
- const ze = { forwardRef: Q, id: t4, anchorId: l2, anchorSelect: n2, className: (0, import_classnames.default)(u2, _e), classNameArrow: d, content: $e, contentWrapperRef: Ie, place: re3, variant: ie3, offset: se, wrapper: we, events: Se, openOnClick: b2, positionStrategy: Ee, middlewares: g, delayShow: ue, delayHide: pe, float: me, hidden: ye, noArrow: T3, clickable: L3, closeOnEsc: C3, closeOnScroll: R3, closeOnResize: x3, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j, style: B2, position: D3, isOpen: M2, defaultIsOpen: W, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X3, afterShow: Y, afterHide: G, disableTooltip: Z2, activeAnchor: ke, setActiveAnchor: (e3) => Te(e3), role: J };
142868
+ const ze = { forwardRef: Q, id: t4, anchorId: l2, anchorSelect: n2, className: (0, import_classnames.default)(u2, _e), classNameArrow: d, content: $e, contentWrapperRef: Ie, place: re3, variant: ie3, offset: se, wrapper: we, events: Se, openOnClick: b2, positionStrategy: Ee, middlewares: g, delayShow: ue, delayHide: pe, float: me, hidden: ye, noArrow: T3, clickable: L3, closeOnEsc: C3, closeOnScroll: R3, closeOnResize: x3, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j, style: B2, position: D3, isOpen: M2, defaultIsOpen: W, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X2, afterShow: Y, afterHide: G, disableTooltip: Z2, activeAnchor: ke, setActiveAnchor: (e3) => Te(e3), role: J };
142869
142869
  return React163__namespace.default.createElement(q, { ...ze });
142870
142870
  });
142871
142871
  "undefined" != typeof window && window.addEventListener("react-tooltip-inject-styles", (e3) => {
@@ -167431,6 +167431,18 @@ var PersonalPracticeDashboard = ({ settingsPath }) => {
167431
167431
  return newLayout;
167432
167432
  });
167433
167433
  };
167434
+ const handleSaveLayout = () => {
167435
+ DashboardLayoutService.saveLayout(dashboardLayout);
167436
+ setIsEditMode(false);
167437
+ toast2({
167438
+ title: "Layout \u0111\xE3 \u0111\u01B0\u1EE3c l\u01B0u",
167439
+ description: "Dashboard c\u1EE7a b\u1EA1n \u0111\xE3 \u0111\u01B0\u1EE3c c\u1EADp nh\u1EADt."
167440
+ });
167441
+ };
167442
+ const handleCancelEdit = () => {
167443
+ setDashboardLayout(DashboardLayoutService.getLayout());
167444
+ setIsEditMode(false);
167445
+ };
167434
167446
  const cardComponents = {
167435
167447
  roadmap: /* @__PURE__ */ React163__namespace.default.createElement(RoadmapChecklist, null),
167436
167448
  activity: /* @__PURE__ */ React163__namespace.default.createElement(ActivityCalendar, { stats }),
@@ -167453,33 +167465,72 @@ var PersonalPracticeDashboard = ({ settingsPath }) => {
167453
167465
  collisionDetection: closestCenter,
167454
167466
  onDragEnd: handleDragEnd
167455
167467
  },
167456
- /* @__PURE__ */ React163__namespace.default.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React163__namespace.default.createElement(Card, { className: "text-center shadow-xl bg-gradient-to-br from-primary to-primary/80 text-primary-foreground border-none" }, /* @__PURE__ */ React163__namespace.default.createElement(CardHeader, { className: "p-8 relative" }, /* @__PURE__ */ React163__namespace.default.createElement("div", { className: "absolute top-4 right-4" }, settingsPath ? (
167457
- // If settingsPath is provided, always render a Link regardless of edit mode
167458
- /* @__PURE__ */ React163__namespace.default.createElement(Button, { asChild: true, variant: "secondary", size: "sm" }, /* @__PURE__ */ React163__namespace.default.createElement(Link3__default.default, { href: settingsPath }, /* @__PURE__ */ React163__namespace.default.createElement(Settings, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ React163__namespace.default.createElement(
167468
+ /* @__PURE__ */ React163__namespace.default.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React163__namespace.default.createElement(Card, { className: "text-center shadow-xl bg-gradient-to-br from-primary to-primary/80 text-primary-foreground border-none" }, /* @__PURE__ */ React163__namespace.default.createElement(CardHeader, { className: "p-8 relative" }, /* @__PURE__ */ React163__namespace.default.createElement("div", { className: "absolute top-4 right-4 flex items-center gap-2" }, !isEditMode ? /* @__PURE__ */ React163__namespace.default.createElement(
167469
+ Button,
167470
+ {
167471
+ variant: "secondary",
167472
+ size: "sm",
167473
+ onClick: () => setIsEditMode(true)
167474
+ },
167475
+ /* @__PURE__ */ React163__namespace.default.createElement(LayoutDashboard, { className: "mr-2 h-4 w-4" }),
167476
+ /* @__PURE__ */ React163__namespace.default.createElement(
167459
167477
  ClientTranslation,
167460
167478
  {
167461
- tKey: "common.customize",
167462
- fallback: "Customize"
167479
+ tKey: "common.customizeLayout",
167480
+ fallback: "Customize Layout"
167463
167481
  }
167464
- )))
167465
- ) : (
167466
- // If no settingsPath, always open the modal regardless of edit mode
167482
+ )
167483
+ ) : /* @__PURE__ */ React163__namespace.default.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React163__namespace.default.createElement(
167484
+ Button,
167485
+ {
167486
+ variant: "ghost",
167487
+ size: "sm",
167488
+ onClick: handleCancelEdit,
167489
+ className: "bg-background/20 hover:bg-background/40 text-white"
167490
+ },
167491
+ /* @__PURE__ */ React163__namespace.default.createElement(X, { className: "mr-2 h-4 w-4" }),
167467
167492
  /* @__PURE__ */ React163__namespace.default.createElement(
167468
- Button,
167493
+ ClientTranslation,
167469
167494
  {
167470
- variant: "secondary",
167471
- size: "sm",
167472
- onClick: () => setIsSettingsModalOpen(true)
167473
- },
167474
- /* @__PURE__ */ React163__namespace.default.createElement(Settings, { className: "mr-2 h-4 w-4" }),
167475
- /* @__PURE__ */ React163__namespace.default.createElement(
167476
- ClientTranslation,
167477
- {
167478
- tKey: "common.customize",
167479
- fallback: "Customize"
167480
- }
167481
- )
167495
+ tKey: "common.cancel",
167496
+ fallback: "Cancel"
167497
+ }
167498
+ )
167499
+ ), /* @__PURE__ */ React163__namespace.default.createElement(
167500
+ Button,
167501
+ {
167502
+ variant: "secondary",
167503
+ size: "sm",
167504
+ onClick: handleSaveLayout
167505
+ },
167506
+ /* @__PURE__ */ React163__namespace.default.createElement(Save, { className: "mr-2 h-4 w-4" }),
167507
+ /* @__PURE__ */ React163__namespace.default.createElement(
167508
+ ClientTranslation,
167509
+ {
167510
+ tKey: "common.saveLayout",
167511
+ fallback: "Save Layout"
167512
+ }
167482
167513
  )
167514
+ )), settingsPath ? /* @__PURE__ */ React163__namespace.default.createElement(
167515
+ Button,
167516
+ {
167517
+ asChild: true,
167518
+ variant: "ghost",
167519
+ size: "icon",
167520
+ className: "text-white hover:bg-background/20",
167521
+ title: "Settings"
167522
+ },
167523
+ /* @__PURE__ */ React163__namespace.default.createElement(Link3__default.default, { href: settingsPath }, /* @__PURE__ */ React163__namespace.default.createElement(Settings, { className: "h-5 w-5" }))
167524
+ ) : /* @__PURE__ */ React163__namespace.default.createElement(
167525
+ Button,
167526
+ {
167527
+ variant: "ghost",
167528
+ size: "icon",
167529
+ className: "text-white hover:bg-background/20",
167530
+ title: "Settings",
167531
+ onClick: () => setIsSettingsModalOpen(true)
167532
+ },
167533
+ /* @__PURE__ */ React163__namespace.default.createElement(Settings, { className: "h-5 w-5" })
167483
167534
  )), /* @__PURE__ */ React163__namespace.default.createElement(CardTitle, { className: "text-3xl md:text-4xl font-bold tracking-tight" }, welcomeMessage), /* @__PURE__ */ React163__namespace.default.createElement(CardDescription, { className: "text-lg md:text-xl text-primary-foreground/80 max-w-3xl mx-auto mt-2 h-14 flex items-center justify-center" }, quoteText)), /* @__PURE__ */ React163__namespace.default.createElement(CardContent, { className: "pb-8 flex flex-wrap justify-center items-center gap-4" }, /* @__PURE__ */ React163__namespace.default.createElement(
167484
167535
  Button,
167485
167536
  {
package/dist/react-ui.mjs CHANGED
@@ -142524,7 +142524,7 @@ function z29(e3 = x) {
142524
142524
  }
142525
142525
  var B = { tooltip: "core-styles-module_tooltip__3vRRp", fixed: "core-styles-module_fixed__pcSol", arrow: "core-styles-module_arrow__cvMwQ", noArrow: "core-styles-module_noArrow__xock6", clickable: "core-styles-module_clickable__ZuTTB", show: "core-styles-module_show__Nt9eE", closing: "core-styles-module_closing__sGnxF" };
142526
142526
  var D2 = { tooltip: "styles-module_tooltip__mnnfp", arrow: "styles-module_arrow__K0L3T", dark: "styles-module_dark__xNqje", light: "styles-module_light__Z6W-X", success: "styles-module_success__A2AKt", warning: "styles-module_warning__SCK0X", error: "styles-module_error__JvumD", info: "styles-module_info__BWdHW" };
142527
- var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u2 = "dark", anchorId: d, anchorSelect: p2, place: v = "top", offset: m = 10, events: h3 = ["hover"], openOnClick: w2 = false, positionStrategy: b2 = "absolute", middlewares: S3, wrapper: g, delayShow: A3 = 0, delayHide: O2 = 0, float: T3 = false, hidden: x3 = false, noArrow: N2 = false, clickable: $3 = false, closeOnEsc: I = false, closeOnScroll: j = false, closeOnResize: q2 = false, openEvents: H2, closeEvents: M2, globalCloseEvents: W, imperativeModeOnly: P2, style: V, position: F, afterShow: K, afterHide: U2, disableTooltip: X3, content: Y, contentWrapperRef: G, isOpen: Z2, defaultIsOpen: J = false, setIsOpen: Q, activeAnchor: ee, setActiveAnchor: te, border: oe, opacity: le, arrowColor: re3, arrowSize: ne = 8, role: ie3 = "tooltip" }) => {
142527
+ var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u2 = "dark", anchorId: d, anchorSelect: p2, place: v = "top", offset: m = 10, events: h3 = ["hover"], openOnClick: w2 = false, positionStrategy: b2 = "absolute", middlewares: S3, wrapper: g, delayShow: A3 = 0, delayHide: O2 = 0, float: T3 = false, hidden: x3 = false, noArrow: N2 = false, clickable: $3 = false, closeOnEsc: I = false, closeOnScroll: j = false, closeOnResize: q2 = false, openEvents: H2, closeEvents: M2, globalCloseEvents: W, imperativeModeOnly: P2, style: V, position: F, afterShow: K, afterHide: U2, disableTooltip: X2, content: Y, contentWrapperRef: G, isOpen: Z2, defaultIsOpen: J = false, setIsOpen: Q, activeAnchor: ee, setActiveAnchor: te, border: oe, opacity: le, arrowColor: re3, arrowSize: ne = 8, role: ie3 = "tooltip" }) => {
142528
142528
  var ce;
142529
142529
  const se = useRef(null), ae = useRef(null), ue = useRef(null), de = useRef(null), pe = useRef(null), [ve, me] = useState({ tooltipStyles: {}, tooltipArrowStyles: {}, place: v }), [fe, ye] = useState(false), [he, we] = useState(false), [be, Se] = useState(null), ge = useRef(false), Ee = useRef(null), { anchorRefs: Ae, setActiveAnchor: _e } = z29(l2), Oe = useRef(false), [ke, Te] = useState([]), Le = useRef(false), Ce = w2 || h3.includes("click"), Re = Ce || (null == H2 ? void 0 : H2.click) || (null == H2 ? void 0 : H2.dblclick) || (null == H2 ? void 0 : H2.mousedown), xe = H2 ? { ...H2 } : { mouseover: true, focus: true, mouseenter: false, click: false, dblclick: false, mousedown: false };
142530
142530
  !H2 && Ce && Object.assign(xe, { mouseenter: false, focus: false, mouseover: false, click: true });
@@ -142612,10 +142612,10 @@ var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u
142612
142612
  var e3, t5;
142613
142613
  const o2 = new Set(Ae);
142614
142614
  ke.forEach((e4) => {
142615
- (null == X3 ? void 0 : X3(e4)) || o2.add({ current: e4 });
142615
+ (null == X2 ? void 0 : X2(e4)) || o2.add({ current: e4 });
142616
142616
  });
142617
142617
  const l3 = document.querySelector(`[id='${d}']`);
142618
- l3 && !(null == X3 ? void 0 : X3(l3)) && o2.add({ current: l3 });
142618
+ l3 && !(null == X2 ? void 0 : X2(l3)) && o2.add({ current: l3 });
142619
142619
  const r4 = () => {
142620
142620
  Ie(false);
142621
142621
  }, n2 = L2(ee), i3 = L2(se.current);
@@ -142731,7 +142731,7 @@ var q = ({ forwardRef: t4, id: l2, className: i2, classNameArrow: c4, variant: u
142731
142731
  }, style: { ...V, ...ve.tooltipStyles, opacity: void 0 !== le && Ye ? le : void 0 }, ref: se }, Xe, React163__default.createElement(g, { className: (0, import_classnames.default)("react-tooltip-arrow", B.arrow, D2.arrow, c4, N2 && B.noArrow), style: { ...ve.tooltipArrowStyles, background: re3 ? `linear-gradient(to right bottom, transparent 50%, ${re3} 50%)` : void 0, "--rt-arrow-size": `${ne}px` }, ref: ae })) : null;
142732
142732
  };
142733
142733
  var H = ({ content: t4 }) => React163__default.createElement("span", { dangerouslySetInnerHTML: { __html: t4 } });
142734
- var M = React163__default.forwardRef(({ id: t4, anchorId: l2, anchorSelect: n2, content: i2, html: c4, render: a4, className: u2, classNameArrow: d, variant: p2 = "dark", place: v = "top", offset: m = 10, wrapper: f = "div", children: h3 = null, events: w2 = ["hover"], openOnClick: b2 = false, positionStrategy: S3 = "absolute", middlewares: g, delayShow: E2 = 0, delayHide: _2 = 0, float: O2 = false, hidden: k3 = false, noArrow: T3 = false, clickable: L3 = false, closeOnEsc: C3 = false, closeOnScroll: R3 = false, closeOnResize: x3 = false, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j = false, style: B2, position: D3, isOpen: M2, defaultIsOpen: W = false, disableStyleInjection: P2 = false, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X3, afterShow: Y, afterHide: G, disableTooltip: Z2, role: J = "tooltip" }, Q) => {
142734
+ var M = React163__default.forwardRef(({ id: t4, anchorId: l2, anchorSelect: n2, content: i2, html: c4, render: a4, className: u2, classNameArrow: d, variant: p2 = "dark", place: v = "top", offset: m = 10, wrapper: f = "div", children: h3 = null, events: w2 = ["hover"], openOnClick: b2 = false, positionStrategy: S3 = "absolute", middlewares: g, delayShow: E2 = 0, delayHide: _2 = 0, float: O2 = false, hidden: k3 = false, noArrow: T3 = false, clickable: L3 = false, closeOnEsc: C3 = false, closeOnScroll: R3 = false, closeOnResize: x3 = false, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j = false, style: B2, position: D3, isOpen: M2, defaultIsOpen: W = false, disableStyleInjection: P2 = false, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X2, afterShow: Y, afterHide: G, disableTooltip: Z2, role: J = "tooltip" }, Q) => {
142735
142735
  const [ee, te] = useState(i2), [oe, le] = useState(c4), [re3, ne] = useState(v), [ie3, ce] = useState(p2), [se, ae] = useState(m), [ue, de] = useState(E2), [pe, ve] = useState(_2), [me, fe] = useState(O2), [ye, he] = useState(k3), [we, be] = useState(f), [Se, ge] = useState(w2), [Ee, Ae] = useState(S3), [_e, Oe] = useState(null), [ke, Te] = useState(null), Le = useRef(P2), { anchorRefs: Ce, activeAnchor: Re } = z29(t4), xe = (e3) => null == e3 ? void 0 : e3.getAttributeNames().reduce((t5, o2) => {
142736
142736
  var l3;
142737
142737
  if (o2.startsWith("data-tooltip-")) {
@@ -142838,7 +142838,7 @@ var M = React163__default.forwardRef(({ id: t4, anchorId: l2, anchorSelect: n2,
142838
142838
  $e = t5 ? React163__default.createElement("div", { ref: Ie, className: "react-tooltip-content-wrapper" }, t5) : null;
142839
142839
  } else ee && ($e = ee);
142840
142840
  oe && ($e = React163__default.createElement(H, { content: oe }));
142841
- const ze = { forwardRef: Q, id: t4, anchorId: l2, anchorSelect: n2, className: (0, import_classnames.default)(u2, _e), classNameArrow: d, content: $e, contentWrapperRef: Ie, place: re3, variant: ie3, offset: se, wrapper: we, events: Se, openOnClick: b2, positionStrategy: Ee, middlewares: g, delayShow: ue, delayHide: pe, float: me, hidden: ye, noArrow: T3, clickable: L3, closeOnEsc: C3, closeOnScroll: R3, closeOnResize: x3, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j, style: B2, position: D3, isOpen: M2, defaultIsOpen: W, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X3, afterShow: Y, afterHide: G, disableTooltip: Z2, activeAnchor: ke, setActiveAnchor: (e3) => Te(e3), role: J };
142841
+ const ze = { forwardRef: Q, id: t4, anchorId: l2, anchorSelect: n2, className: (0, import_classnames.default)(u2, _e), classNameArrow: d, content: $e, contentWrapperRef: Ie, place: re3, variant: ie3, offset: se, wrapper: we, events: Se, openOnClick: b2, positionStrategy: Ee, middlewares: g, delayShow: ue, delayHide: pe, float: me, hidden: ye, noArrow: T3, clickable: L3, closeOnEsc: C3, closeOnScroll: R3, closeOnResize: x3, openEvents: N2, closeEvents: $3, globalCloseEvents: I, imperativeModeOnly: j, style: B2, position: D3, isOpen: M2, defaultIsOpen: W, border: V, opacity: F, arrowColor: K, arrowSize: U2, setIsOpen: X2, afterShow: Y, afterHide: G, disableTooltip: Z2, activeAnchor: ke, setActiveAnchor: (e3) => Te(e3), role: J };
142842
142842
  return React163__default.createElement(q, { ...ze });
142843
142843
  });
142844
142844
  "undefined" != typeof window && window.addEventListener("react-tooltip-inject-styles", (e3) => {
@@ -167404,6 +167404,18 @@ var PersonalPracticeDashboard = ({ settingsPath }) => {
167404
167404
  return newLayout;
167405
167405
  });
167406
167406
  };
167407
+ const handleSaveLayout = () => {
167408
+ DashboardLayoutService.saveLayout(dashboardLayout);
167409
+ setIsEditMode(false);
167410
+ toast2({
167411
+ title: "Layout \u0111\xE3 \u0111\u01B0\u1EE3c l\u01B0u",
167412
+ description: "Dashboard c\u1EE7a b\u1EA1n \u0111\xE3 \u0111\u01B0\u1EE3c c\u1EADp nh\u1EADt."
167413
+ });
167414
+ };
167415
+ const handleCancelEdit = () => {
167416
+ setDashboardLayout(DashboardLayoutService.getLayout());
167417
+ setIsEditMode(false);
167418
+ };
167407
167419
  const cardComponents = {
167408
167420
  roadmap: /* @__PURE__ */ React163__default.createElement(RoadmapChecklist, null),
167409
167421
  activity: /* @__PURE__ */ React163__default.createElement(ActivityCalendar, { stats }),
@@ -167426,33 +167438,72 @@ var PersonalPracticeDashboard = ({ settingsPath }) => {
167426
167438
  collisionDetection: closestCenter,
167427
167439
  onDragEnd: handleDragEnd
167428
167440
  },
167429
- /* @__PURE__ */ React163__default.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React163__default.createElement(Card, { className: "text-center shadow-xl bg-gradient-to-br from-primary to-primary/80 text-primary-foreground border-none" }, /* @__PURE__ */ React163__default.createElement(CardHeader, { className: "p-8 relative" }, /* @__PURE__ */ React163__default.createElement("div", { className: "absolute top-4 right-4" }, settingsPath ? (
167430
- // If settingsPath is provided, always render a Link regardless of edit mode
167431
- /* @__PURE__ */ React163__default.createElement(Button, { asChild: true, variant: "secondary", size: "sm" }, /* @__PURE__ */ React163__default.createElement(Link3, { href: settingsPath }, /* @__PURE__ */ React163__default.createElement(Settings, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ React163__default.createElement(
167441
+ /* @__PURE__ */ React163__default.createElement("div", { className: "space-y-8" }, /* @__PURE__ */ React163__default.createElement(Card, { className: "text-center shadow-xl bg-gradient-to-br from-primary to-primary/80 text-primary-foreground border-none" }, /* @__PURE__ */ React163__default.createElement(CardHeader, { className: "p-8 relative" }, /* @__PURE__ */ React163__default.createElement("div", { className: "absolute top-4 right-4 flex items-center gap-2" }, !isEditMode ? /* @__PURE__ */ React163__default.createElement(
167442
+ Button,
167443
+ {
167444
+ variant: "secondary",
167445
+ size: "sm",
167446
+ onClick: () => setIsEditMode(true)
167447
+ },
167448
+ /* @__PURE__ */ React163__default.createElement(LayoutDashboard, { className: "mr-2 h-4 w-4" }),
167449
+ /* @__PURE__ */ React163__default.createElement(
167432
167450
  ClientTranslation,
167433
167451
  {
167434
- tKey: "common.customize",
167435
- fallback: "Customize"
167452
+ tKey: "common.customizeLayout",
167453
+ fallback: "Customize Layout"
167436
167454
  }
167437
- )))
167438
- ) : (
167439
- // If no settingsPath, always open the modal regardless of edit mode
167455
+ )
167456
+ ) : /* @__PURE__ */ React163__default.createElement("div", { className: "flex gap-2" }, /* @__PURE__ */ React163__default.createElement(
167457
+ Button,
167458
+ {
167459
+ variant: "ghost",
167460
+ size: "sm",
167461
+ onClick: handleCancelEdit,
167462
+ className: "bg-background/20 hover:bg-background/40 text-white"
167463
+ },
167464
+ /* @__PURE__ */ React163__default.createElement(X, { className: "mr-2 h-4 w-4" }),
167440
167465
  /* @__PURE__ */ React163__default.createElement(
167441
- Button,
167466
+ ClientTranslation,
167442
167467
  {
167443
- variant: "secondary",
167444
- size: "sm",
167445
- onClick: () => setIsSettingsModalOpen(true)
167446
- },
167447
- /* @__PURE__ */ React163__default.createElement(Settings, { className: "mr-2 h-4 w-4" }),
167448
- /* @__PURE__ */ React163__default.createElement(
167449
- ClientTranslation,
167450
- {
167451
- tKey: "common.customize",
167452
- fallback: "Customize"
167453
- }
167454
- )
167468
+ tKey: "common.cancel",
167469
+ fallback: "Cancel"
167470
+ }
167471
+ )
167472
+ ), /* @__PURE__ */ React163__default.createElement(
167473
+ Button,
167474
+ {
167475
+ variant: "secondary",
167476
+ size: "sm",
167477
+ onClick: handleSaveLayout
167478
+ },
167479
+ /* @__PURE__ */ React163__default.createElement(Save, { className: "mr-2 h-4 w-4" }),
167480
+ /* @__PURE__ */ React163__default.createElement(
167481
+ ClientTranslation,
167482
+ {
167483
+ tKey: "common.saveLayout",
167484
+ fallback: "Save Layout"
167485
+ }
167455
167486
  )
167487
+ )), settingsPath ? /* @__PURE__ */ React163__default.createElement(
167488
+ Button,
167489
+ {
167490
+ asChild: true,
167491
+ variant: "ghost",
167492
+ size: "icon",
167493
+ className: "text-white hover:bg-background/20",
167494
+ title: "Settings"
167495
+ },
167496
+ /* @__PURE__ */ React163__default.createElement(Link3, { href: settingsPath }, /* @__PURE__ */ React163__default.createElement(Settings, { className: "h-5 w-5" }))
167497
+ ) : /* @__PURE__ */ React163__default.createElement(
167498
+ Button,
167499
+ {
167500
+ variant: "ghost",
167501
+ size: "icon",
167502
+ className: "text-white hover:bg-background/20",
167503
+ title: "Settings",
167504
+ onClick: () => setIsSettingsModalOpen(true)
167505
+ },
167506
+ /* @__PURE__ */ React163__default.createElement(Settings, { className: "h-5 w-5" })
167456
167507
  )), /* @__PURE__ */ React163__default.createElement(CardTitle, { className: "text-3xl md:text-4xl font-bold tracking-tight" }, welcomeMessage), /* @__PURE__ */ React163__default.createElement(CardDescription, { className: "text-lg md:text-xl text-primary-foreground/80 max-w-3xl mx-auto mt-2 h-14 flex items-center justify-center" }, quoteText)), /* @__PURE__ */ React163__default.createElement(CardContent, { className: "pb-8 flex flex-wrap justify-center items-center gap-4" }, /* @__PURE__ */ React163__default.createElement(
167457
167508
  Button,
167458
167509
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thanh01.pmt/interactive-quiz-kit",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
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",