wcz-layout 9.6.2 → 9.6.4

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.
Files changed (53) hide show
  1. package/dist/{Employee-iepWeWhO.d.mts → Employee-DbdStvU0.d.mts} +3 -3
  2. package/dist/auth.d.mts +1 -6
  3. package/dist/auth.mjs +6 -6
  4. package/dist/{authMiddleware-CKD6lG9v.mjs → authMiddleware-CjKA7C0W.mjs} +2 -3
  5. package/dist/{authMiddleware-CKD6lG9v.mjs.map → authMiddleware-CjKA7C0W.mjs.map} +1 -1
  6. package/dist/components.mjs +1 -1
  7. package/dist/data/client.d.mts +57 -57
  8. package/dist/data/client.mjs +2 -2
  9. package/dist/data/server.d.mts +1 -1
  10. package/dist/data/server.mjs +2 -2
  11. package/dist/data/server.mjs.map +1 -1
  12. package/dist/{entra-47nBhMK-.mjs → entra-DFhYO6Sj.mjs} +3 -3
  13. package/dist/entra-DFhYO6Sj.mjs.map +1 -0
  14. package/dist/{file-DczAUT9u.mjs → file--l_efzg-.mjs} +5 -6
  15. package/dist/{file-DczAUT9u.mjs.map → file--l_efzg-.mjs.map} +1 -1
  16. package/dist/{file-D1MfHsnw.mjs → file-BDeY2atB.mjs} +6 -11
  17. package/dist/file-BDeY2atB.mjs.map +1 -0
  18. package/dist/hooks.d.mts +3 -0
  19. package/dist/hooks.mjs +6 -3
  20. package/dist/hooks.mjs.map +1 -1
  21. package/dist/index.d.mts +3 -0
  22. package/dist/index.mjs +73 -49
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/middleware.mjs +1 -1
  25. package/dist/middleware.mjs.map +1 -1
  26. package/dist/models.d.mts +1 -1
  27. package/dist/models.mjs +1 -1
  28. package/dist/models.mjs.map +1 -1
  29. package/dist/{msalServer-B3iBsafS.mjs → msalServer-CqLXgWpO.mjs} +3 -17
  30. package/dist/msalServer-CqLXgWpO.mjs.map +1 -0
  31. package/dist/{peoplesoft-4pOmhLn5.d.mts → peoplesoft-D4w8d4s1.d.mts} +2 -2
  32. package/dist/{peoplesoft-BPRwAaaM.mjs → peoplesoft-DqO-9g-4.mjs} +2 -2
  33. package/dist/peoplesoft-DqO-9g-4.mjs.map +1 -0
  34. package/dist/{utils-CqVAK5F8.mjs → utils-A_Lzklis.mjs} +27 -4
  35. package/dist/utils-A_Lzklis.mjs.map +1 -0
  36. package/dist/utils.mjs +4 -2
  37. package/dist/vite.mjs +13 -0
  38. package/dist/vite.mjs.map +1 -1
  39. package/package.json +127 -126
  40. package/skills/client-db/SKILL.md +1 -1
  41. package/skills/dialogs/SKILL.md +0 -1
  42. package/skills/general/SKILL.md +8 -9
  43. package/skills/start/SKILL.md +1 -1
  44. package/skills/start/steps/06-entra-setup.md +11 -14
  45. package/dist/entra-47nBhMK-.mjs.map +0 -1
  46. package/dist/env-CoveIivr.mjs +0 -30
  47. package/dist/env-CoveIivr.mjs.map +0 -1
  48. package/dist/file-D1MfHsnw.mjs.map +0 -1
  49. package/dist/msalServer-B3iBsafS.mjs.map +0 -1
  50. package/dist/peoplesoft-BPRwAaaM.mjs.map +0 -1
  51. package/dist/utils-CqVAK5F8.mjs.map +0 -1
  52. package/dist/utils-D39-w_ij.mjs +0 -4
  53. package/skills/notifications/SKILL.md +0 -43
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as rootRouteHead, d as getUser, f as userQueryOptions, g as withOfflineFallback, h as clearSessionSnapshot, l as getAccessToken, m as OFFLINE_PHOTO_KEY, n as WISTRON_PRIMARY_COLOR, r as WISTRON_SECONDARY_COLOR, t as Platform } from "./utils-CqVAK5F8.mjs";
1
+ import { _ as withOfflineFallback, c as rootRouteHead, d as getUser, f as userQueryOptions, g as clearSessionSnapshot, h as OFFLINE_PHOTO_KEY, l as getAccessToken, n as WISTRON_PRIMARY_COLOR, r as WISTRON_SECONDARY_COLOR, t as Platform } from "./utils-A_Lzklis.mjs";
2
2
  import { n as RouterIconButton, t as RouterListItemButton } from "./RouterListItemButton-owZVvuC_.mjs";
3
3
  import { t as DialogsContext } from "./DialogsContext-DLqA8RJ_.mjs";
4
4
  import { t as NotificationContext } from "./NotificationContext-CgwUOeW0.mjs";
@@ -78,7 +78,7 @@ const UserAvatar = () => {
78
78
  "me",
79
79
  "photo"
80
80
  ],
81
- queryFn: _temp2$2,
81
+ queryFn: _temp2$3,
82
82
  staleTime: Infinity,
83
83
  gcTime: Infinity,
84
84
  networkMode: "offlineFirst"
@@ -116,7 +116,7 @@ const UserAvatar = () => {
116
116
  function _temp$5() {
117
117
  return getProfilePhoto();
118
118
  }
119
- function _temp2$2() {
119
+ function _temp2$3() {
120
120
  return withOfflineFallback(OFFLINE_PHOTO_KEY, _temp$5);
121
121
  }
122
122
  //#endregion
@@ -577,7 +577,7 @@ const ToolbarAccount = () => {
577
577
  user.department && /* @__PURE__ */ jsx("span", { children: user.department })
578
578
  ] })
579
579
  }) }), /* @__PURE__ */ jsxs(ListItemButton, {
580
- onClick: _temp2$1,
580
+ onClick: _temp2$2,
581
581
  children: [/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Logout, { color: "error" }) }), /* @__PURE__ */ jsx(ListItemText, { primary: t("Layout.Logout") })]
582
582
  })] }) : /* @__PURE__ */ jsxs(ListItemButton, {
583
583
  onClick: _temp3,
@@ -634,7 +634,7 @@ const ToolbarAccount = () => {
634
634
  function _temp$4(lng) {
635
635
  return lng !== "cimode";
636
636
  }
637
- function _temp2$1() {
637
+ function _temp2$2() {
638
638
  clearSessionSnapshot();
639
639
  location.href = "/auth/logout";
640
640
  }
@@ -1558,7 +1558,7 @@ const Layout = (t0) => {
1558
1558
  showNavigation && /* @__PURE__ */ jsx(IconButton, {
1559
1559
  "aria-label": "Toggle navigation",
1560
1560
  onClick: () => {
1561
- setNavigationOpen(_temp2);
1561
+ setNavigationOpen(_temp2$1);
1562
1562
  },
1563
1563
  sx: { marginRight: 2 },
1564
1564
  children: navigationOpen ? /* @__PURE__ */ jsx(MenuOpen, {}) : /* @__PURE__ */ jsx(Menu$1, {})
@@ -1659,7 +1659,7 @@ const Layout = (t0) => {
1659
1659
  function _temp$1(item) {
1660
1660
  return item.hidden !== true;
1661
1661
  }
1662
- function _temp2(previous) {
1662
+ function _temp2$1(previous) {
1663
1663
  const newValue = !previous;
1664
1664
  saveNavigationState(newValue);
1665
1665
  return newValue;
@@ -1854,34 +1854,34 @@ const NotificationProvider = (t0) => {
1854
1854
  };
1855
1855
  //#endregion
1856
1856
  //#region src/providers/LayoutProvider.tsx
1857
- const YEAR_IN_MINUTES = 1440 * 365;
1857
+ const YEAR_IN_SECONDS = 3600 * 24 * 365;
1858
+ const LANGUAGE_COOKIE = "i18next";
1858
1859
  const normalizeLocale = (locale) => locale.replace(/[^a-z]/gi, "").toLowerCase();
1859
1860
  const zodLocales = new Map(Object.entries(z.core.locales).map(([locale, createLocale]) => [normalizeLocale(locale), createLocale]));
1860
1861
  const setLocale = (language) => {
1861
1862
  const baseLanguage = language.split(/[-_]/)[0];
1862
1863
  const createLocale = zodLocales.get(normalizeLocale(language)) ?? zodLocales.get(normalizeLocale(baseLanguage)) ?? z.core.locales.en;
1863
1864
  z.config(createLocale());
1864
- dayjs.locale(language);
1865
+ if (!dayjs.locale(language).startsWith(baseLanguage)) dayjs.locale("en");
1865
1866
  };
1866
- await i18n.use(LanguageDetector).use(initReactI18next).init({
1867
+ i18n.use(LanguageDetector).use(initReactI18next).init({
1867
1868
  resources,
1869
+ lng: "en",
1868
1870
  fallbackLng: "en",
1869
1871
  supportedLngs: Object.keys(resources),
1870
- detection: {
1871
- caches: ["cookie"],
1872
- cookieMinutes: YEAR_IN_MINUTES
1873
- },
1872
+ detection: { caches: [] },
1874
1873
  interpolation: { escapeValue: false }
1875
1874
  });
1876
1875
  setLocale(i18n.resolvedLanguage ?? i18n.language);
1877
1876
  i18n.on("languageChanged", (language) => {
1878
1877
  setLocale(language);
1878
+ if (typeof document !== "undefined") document.cookie = `${LANGUAGE_COOKIE}=${language};path=/;max-age=${YEAR_IN_SECONDS};SameSite=Lax`;
1879
1879
  });
1880
1880
  const LayoutProvider = (t0) => {
1881
- const $ = c(13);
1882
- if ($[0] !== "54f8414f1ee530b778445635e680a0d8a4706da6ac1499187cfc40a8d3ef7266") {
1883
- for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1884
- $[0] = "54f8414f1ee530b778445635e680a0d8a4706da6ac1499187cfc40a8d3ef7266";
1881
+ const $ = c(20);
1882
+ if ($[0] !== "1332c1eb84013f92da63e4d739ca695eb17019130569cc16cd1fbf68f94e6883") {
1883
+ for (let $i = 0; $i < 20; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1884
+ $[0] = "1332c1eb84013f92da63e4d739ca695eb17019130569cc16cd1fbf68f94e6883";
1885
1885
  }
1886
1886
  const { options, navigation, theme, children } = t0;
1887
1887
  let t1;
@@ -1890,6 +1890,7 @@ const LayoutProvider = (t0) => {
1890
1890
  $[1] = t1;
1891
1891
  } else t1 = $[1];
1892
1892
  const emotionCache = t1;
1893
+ const { i18n: activeI18n } = useTranslation();
1893
1894
  useQuery(userQueryOptions);
1894
1895
  let t2;
1895
1896
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
@@ -1897,52 +1898,75 @@ const LayoutProvider = (t0) => {
1897
1898
  $[2] = t2;
1898
1899
  } else t2 = $[2];
1899
1900
  useEffect(_temp, t2);
1900
- const t3 = options?.snackbarOrigin;
1901
- let t4;
1902
- if ($[3] !== children || $[4] !== navigation || $[5] !== options) {
1903
- t4 = /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(Layout, {
1901
+ let t3;
1902
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1903
+ t3 = [];
1904
+ $[3] = t3;
1905
+ } else t3 = $[3];
1906
+ useEffect(_temp2, t3);
1907
+ const t4 = options?.snackbarOrigin;
1908
+ let t5;
1909
+ if ($[4] !== activeI18n.language || $[5] !== children) {
1910
+ t5 = /* @__PURE__ */ jsx(Fragment, { children }, activeI18n.language);
1911
+ $[4] = activeI18n.language;
1912
+ $[5] = children;
1913
+ $[6] = t5;
1914
+ } else t5 = $[6];
1915
+ let t6;
1916
+ if ($[7] !== navigation || $[8] !== options || $[9] !== t5) {
1917
+ t6 = /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(Layout, {
1904
1918
  navigation,
1905
1919
  options,
1906
- children
1920
+ children: t5
1907
1921
  }) });
1908
- $[3] = children;
1909
- $[4] = navigation;
1910
- $[5] = options;
1911
- $[6] = t4;
1912
- } else t4 = $[6];
1913
- let t5;
1914
- if ($[7] !== t3 || $[8] !== t4) {
1915
- t5 = /* @__PURE__ */ jsx(LocalizationProvider, {
1922
+ $[7] = navigation;
1923
+ $[8] = options;
1924
+ $[9] = t5;
1925
+ $[10] = t6;
1926
+ } else t6 = $[10];
1927
+ let t7;
1928
+ if ($[11] !== t4 || $[12] !== t6) {
1929
+ t7 = /* @__PURE__ */ jsx(NotificationProvider, {
1930
+ snackbarOrigin: t4,
1931
+ children: t6
1932
+ });
1933
+ $[11] = t4;
1934
+ $[12] = t6;
1935
+ $[13] = t7;
1936
+ } else t7 = $[13];
1937
+ let t8;
1938
+ if ($[14] !== activeI18n.language || $[15] !== t7) {
1939
+ t8 = /* @__PURE__ */ jsx(LocalizationProvider, {
1916
1940
  dateAdapter: AdapterDayjs,
1917
- adapterLocale: i18n.language,
1918
- children: /* @__PURE__ */ jsx(NotificationProvider, {
1919
- snackbarOrigin: t3,
1920
- children: t4
1921
- })
1941
+ adapterLocale: activeI18n.language,
1942
+ children: t7
1922
1943
  });
1923
- $[7] = t3;
1924
- $[8] = t4;
1925
- $[9] = t5;
1926
- } else t5 = $[9];
1927
- let t6;
1928
- if ($[10] !== t5 || $[11] !== theme) {
1929
- t6 = /* @__PURE__ */ jsx(CacheProvider, {
1944
+ $[14] = activeI18n.language;
1945
+ $[15] = t7;
1946
+ $[16] = t8;
1947
+ } else t8 = $[16];
1948
+ let t9;
1949
+ if ($[17] !== t8 || $[18] !== theme) {
1950
+ t9 = /* @__PURE__ */ jsx(CacheProvider, {
1930
1951
  value: emotionCache,
1931
1952
  children: /* @__PURE__ */ jsx(I18nextProvider, {
1932
1953
  i18n,
1933
1954
  children: /* @__PURE__ */ jsx(ThemeProvider, {
1934
1955
  theme,
1935
- children: t5
1956
+ children: t8
1936
1957
  })
1937
1958
  })
1938
1959
  });
1939
- $[10] = t5;
1940
- $[11] = theme;
1941
- $[12] = t6;
1942
- } else t6 = $[12];
1943
- return t6;
1960
+ $[17] = t8;
1961
+ $[18] = theme;
1962
+ $[19] = t9;
1963
+ } else t9 = $[19];
1964
+ return t9;
1944
1965
  };
1945
1966
  function _temp() {
1967
+ i18n.changeLanguage();
1968
+ }
1969
+ function _temp2() {
1946
1970
  if ("serviceWorker" in navigator) navigator.serviceWorker.register("/sw.js");
1947
1971
  }
1948
1972
  //#endregion