@eclass/ui-kit 1.46.6 → 1.47.0

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.
@@ -29964,6 +29964,36 @@ function UserWay() {
29964
29964
  children: /* @__PURE__ */ jsx(Accessibility, {})
29965
29965
  });
29966
29966
  }
29967
+ function UserWayCookie() {
29968
+ var _a;
29969
+ const cookieName = "userwayData";
29970
+ const userwayDataCookie = (_a = document.cookie.split("; ").find((row) => row.startsWith(`${cookieName}=`))) == null ? void 0 : _a.split("=")[1];
29971
+ if (userwayDataCookie) {
29972
+ try {
29973
+ const userwayData = JSON.parse(decodeURIComponent(userwayDataCookie));
29974
+ for (const [key, value] of Object.entries(userwayData)) {
29975
+ localStorage.setItem(key, value);
29976
+ }
29977
+ console.log("UserWay data restored to localStorage:", userwayData);
29978
+ } catch (error) {
29979
+ console.error("Error parsing UserWay data from cookie:", error);
29980
+ }
29981
+ }
29982
+ window.addEventListener("beforeunload", () => {
29983
+ const userwayData = {};
29984
+ for (const key in localStorage) {
29985
+ if (key.startsWith("userway-")) {
29986
+ userwayData[key] = localStorage.getItem(key);
29987
+ }
29988
+ }
29989
+ const serializedData = JSON.stringify(userwayData);
29990
+ const expiryDate = new Date();
29991
+ expiryDate.setTime(expiryDate.getTime() + 24 * 60 * 60 * 1e3);
29992
+ document.cookie = `${cookieName}=${encodeURIComponent(
29993
+ serializedData
29994
+ )};expires=${expiryDate.toUTCString()};path=/`;
29995
+ });
29996
+ }
29967
29997
  const STUDENT = 4;
29968
29998
  function Header() {
29969
29999
  const {
@@ -33344,5 +33374,5 @@ const Resources = ({
33344
33374
  })
33345
33375
  });
33346
33376
  };
33347
- export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, CourseStatus, Eventos, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
33377
+ export { Alert, Btn, BtnLink, BtnPrimary, BtnSecondary, BtnTertiary, CourseList, CourseStatus, Eventos, FlashNotification, index as Icons, Label, ModalAlert, NewTooltip, Progress, Resources, Ripples, TinyAlert, UserWay, UserWayCookie, dataFake, maxWidthCoursesList, theme, useFlashNotification, vars };
33348
33378
  //# sourceMappingURL=eclass-ui-kit.es.js.map