wcz-layout 8.0.0 → 8.0.2

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { d as getUser, f as pca, l as TanStackNavigationClient, m as clientEnv, n as WISTRON_PRIMARY_COLOR, p as subscribeToTokenInteractionRequired, r as WISTRON_SECONDARY_COLOR, s as rootRouteHead, t as Platform, u as getAccessToken } from "./utils-Dz7akq1k.js";
1
+ import { d as getUser, f as pca, l as TanStackNavigationClient, n as WISTRON_PRIMARY_COLOR, p as clientEnv, r as WISTRON_SECONDARY_COLOR, s as rootRouteHead, t as Platform, u as getAccessToken } from "./utils-CqQKSaSs.js";
2
2
  import { t as queryClient } from "./queryClient-CAJR3qjE.js";
3
3
  import { n as RouterIconButton, t as RouterListItemButton } from "./RouterListItemButton-rcdkgOXQ.js";
4
4
  import { t as DialogsContext } from "./DialogsContext-D5A8xncJ.js";
@@ -91,7 +91,7 @@ const UserAvatar = () => {
91
91
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
92
92
  $[0] = "fe87d0a8f8e6330656e92b7b39ef1fd103fc722be844f8e953943b9b908d05c3";
93
93
  }
94
- const { data } = useLiveSuspenseQuery(_temp$6);
94
+ const { data } = useLiveSuspenseQuery(_temp$5);
95
95
  const t0 = data?.photoUrl;
96
96
  let t1;
97
97
  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
@@ -118,7 +118,7 @@ const UserAvatar = () => {
118
118
  } else t2 = $[3];
119
119
  return t2;
120
120
  };
121
- function _temp$6(q) {
121
+ function _temp$5(q) {
122
122
  return q.from({ todo: userPhotoCollection }).findOne();
123
123
  }
124
124
  //#endregion
@@ -150,7 +150,7 @@ const ToolbarAccount = () => {
150
150
  let t2;
151
151
  let theme;
152
152
  if ($[2] !== i18n || $[3] !== mode || $[4] !== setMode || $[5] !== t) {
153
- const supportedLanguages = (Array.isArray(i18n.options.supportedLngs) ? i18n.options.supportedLngs : []).filter(_temp$5);
153
+ const supportedLanguages = (Array.isArray(i18n.options.supportedLngs) ? i18n.options.supportedLngs : []).filter(_temp$4);
154
154
  const languageDisplayNames = new Intl.DisplayNames([i18n.language], { type: "language" });
155
155
  let t3;
156
156
  if ($[13] !== t) {
@@ -725,7 +725,7 @@ const ToolbarAccount = () => {
725
725
  } else t31 = $[143];
726
726
  return t31;
727
727
  };
728
- function _temp$5(lng) {
728
+ function _temp$4(lng) {
729
729
  return lng !== "cimode";
730
730
  }
731
731
  //#endregion
@@ -874,7 +874,7 @@ const IconOrAvatar = (t0) => {
874
874
  height: ICON_SIZE - 7,
875
875
  fontSize: 12
876
876
  },
877
- children: item.title.split(" ").slice(0, 2).map(_temp$4).join("")
877
+ children: item.title.split(" ").slice(0, 2).map(_temp$3).join("")
878
878
  }) : null;
879
879
  $[4] = collapsed;
880
880
  $[5] = item.icon;
@@ -1205,7 +1205,7 @@ const NavigationListItem = (t0) => {
1205
1205
  } else t17 = $[61];
1206
1206
  return t17;
1207
1207
  };
1208
- function _temp$4(word) {
1208
+ function _temp$3(word) {
1209
1209
  return word.charAt(0).toUpperCase();
1210
1210
  }
1211
1211
  //#endregion
@@ -1264,7 +1264,7 @@ const NavigationList = (t0) => {
1264
1264
  const renderNested = t7;
1265
1265
  let t8;
1266
1266
  if ($[11] !== activePath || $[12] !== collapsed || $[13] !== depth || $[14] !== isPopover || $[15] !== isSidebarFullyCollapsed || $[16] !== isSidebarFullyExpanded || $[17] !== onClose || $[18] !== openKeys || $[19] !== renderItem || $[20] !== renderNested || $[21] !== subNavigation) {
1267
- const filteredNavigation = subNavigation.filter(_temp$3);
1267
+ const filteredNavigation = subNavigation.filter(_temp$2);
1268
1268
  const t9 = isPopover && depth === 1 ? .5 : 0;
1269
1269
  const t10 = depth === 0 && !isPopover ? 4 : .5;
1270
1270
  const t11 = (isPopover ? 1 : 2) * (isPopover ? depth - 1 : depth);
@@ -1346,7 +1346,7 @@ const NavigationList = (t0) => {
1346
1346
  } else t8 = $[22];
1347
1347
  return t8;
1348
1348
  };
1349
- function _temp$3(nav) {
1349
+ function _temp$2(nav) {
1350
1350
  return !nav.hidden;
1351
1351
  }
1352
1352
  //#endregion
@@ -1609,7 +1609,7 @@ const Layout = (t0) => {
1609
1609
  children: /* @__PURE__ */ jsxs(Toolbar, { children: [
1610
1610
  navigation && /* @__PURE__ */ jsx(IconButton, {
1611
1611
  onClick: () => {
1612
- setNavigationOpen(_temp$2);
1612
+ setNavigationOpen(_temp$1);
1613
1613
  },
1614
1614
  sx: { marginRight: 2 },
1615
1615
  children: navigationOpen ? /* @__PURE__ */ jsx(MenuOpen, {}) : /* @__PURE__ */ jsx(Menu$1, {})
@@ -1716,7 +1716,7 @@ const Layout = (t0) => {
1716
1716
  } else t13 = $[30];
1717
1717
  return t13;
1718
1718
  };
1719
- function _temp$2(previous) {
1719
+ function _temp$1(previous) {
1720
1720
  const newValue = !previous;
1721
1721
  saveNavigationState(newValue);
1722
1722
  return newValue;
@@ -1788,105 +1788,76 @@ function DialogsProvider({ children }) {
1788
1788
  //#endregion
1789
1789
  //#region src/providers/MsalAuthProvider.tsx
1790
1790
  const MsalAuthEffects = () => {
1791
- const $ = c(17);
1792
- if ($[0] !== "ed641e629ae67334685c83f7ac02e2cb2402fa8f3acc56775b90259fb3bb2a60") {
1793
- for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1794
- $[0] = "ed641e629ae67334685c83f7ac02e2cb2402fa8f3acc56775b90259fb3bb2a60";
1791
+ const $ = c(12);
1792
+ if ($[0] !== "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84") {
1793
+ for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1794
+ $[0] = "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84";
1795
1795
  }
1796
- const { accounts, inProgress, instance } = useMsal();
1796
+ const { inProgress, instance } = useMsal();
1797
1797
  const router = useRouter();
1798
- const [pendingScopes, setPendingScopes] = useState(null);
1799
1798
  const previousInProgress = useRef(inProgress);
1800
1799
  const navigate = useNavigate();
1801
- pca.setNavigationClient(new TanStackNavigationClient(navigate));
1802
1800
  let t0;
1803
1801
  let t1;
1804
- if ($[1] !== instance || $[2] !== router) {
1802
+ if ($[1] !== navigate) {
1805
1803
  t0 = () => {
1806
- const callbackId = instance.addEventCallback((event) => {
1807
- if (event.eventType === EventType.LOGIN_SUCCESS || event.eventType === EventType.ACQUIRE_TOKEN_SUCCESS || event.eventType === EventType.LOGOUT_SUCCESS) router.invalidate();
1808
- });
1809
- return () => {
1810
- if (callbackId) instance.removeEventCallback(callbackId);
1811
- };
1804
+ pca.setNavigationClient(new TanStackNavigationClient(navigate));
1812
1805
  };
1813
- t1 = [instance, router];
1814
- $[1] = instance;
1815
- $[2] = router;
1816
- $[3] = t0;
1817
- $[4] = t1;
1806
+ t1 = [navigate];
1807
+ $[1] = navigate;
1808
+ $[2] = t0;
1809
+ $[3] = t1;
1818
1810
  } else {
1819
- t0 = $[3];
1820
- t1 = $[4];
1811
+ t0 = $[2];
1812
+ t1 = $[3];
1821
1813
  }
1822
1814
  useEffect(t0, t1);
1823
1815
  let t2;
1824
1816
  let t3;
1825
- if ($[5] !== inProgress || $[6] !== router) {
1817
+ if ($[4] !== instance || $[5] !== router) {
1826
1818
  t2 = () => {
1827
- const wasInteracting = previousInProgress.current !== InteractionStatus.None;
1828
- previousInProgress.current = inProgress;
1829
- if (wasInteracting && inProgress === InteractionStatus.None) router.invalidate();
1819
+ const callbackId = instance.addEventCallback((event) => {
1820
+ if (event.eventType === EventType.LOGIN_SUCCESS || event.eventType === EventType.ACQUIRE_TOKEN_SUCCESS || event.eventType === EventType.LOGOUT_SUCCESS) router.invalidate();
1821
+ });
1822
+ return () => {
1823
+ if (callbackId) instance.removeEventCallback(callbackId);
1824
+ };
1830
1825
  };
1831
- t3 = [inProgress, router];
1832
- $[5] = inProgress;
1833
- $[6] = router;
1834
- $[7] = t2;
1835
- $[8] = t3;
1826
+ t3 = [instance, router];
1827
+ $[4] = instance;
1828
+ $[5] = router;
1829
+ $[6] = t2;
1830
+ $[7] = t3;
1836
1831
  } else {
1837
- t2 = $[7];
1838
- t3 = $[8];
1832
+ t2 = $[6];
1833
+ t3 = $[7];
1839
1834
  }
1840
1835
  useEffect(t2, t3);
1841
1836
  let t4;
1842
1837
  let t5;
1843
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
1844
- t4 = () => subscribeToTokenInteractionRequired(setPendingScopes);
1845
- t5 = [];
1846
- $[9] = t4;
1847
- $[10] = t5;
1848
- } else {
1849
- t4 = $[9];
1850
- t5 = $[10];
1851
- }
1852
- useEffect(t4, t5);
1853
- let t6;
1854
- let t7;
1855
- if ($[11] !== accounts || $[12] !== inProgress || $[13] !== instance || $[14] !== pendingScopes) {
1856
- t6 = () => {
1857
- if (!pendingScopes || inProgress !== InteractionStatus.None) return;
1858
- const account = instance.getActiveAccount() ?? accounts[0];
1859
- if (!account) return;
1860
- setPendingScopes(null);
1861
- instance.acquireTokenRedirect({
1862
- scopes: pendingScopes,
1863
- account
1864
- }).catch(_temp$1);
1838
+ if ($[8] !== inProgress || $[9] !== router) {
1839
+ t4 = () => {
1840
+ const wasInteracting = previousInProgress.current !== InteractionStatus.None;
1841
+ previousInProgress.current = inProgress;
1842
+ if (wasInteracting && inProgress === InteractionStatus.None) router.invalidate();
1865
1843
  };
1866
- t7 = [
1867
- accounts,
1868
- inProgress,
1869
- instance,
1870
- pendingScopes
1871
- ];
1872
- $[11] = accounts;
1873
- $[12] = inProgress;
1874
- $[13] = instance;
1875
- $[14] = pendingScopes;
1876
- $[15] = t6;
1877
- $[16] = t7;
1844
+ t5 = [inProgress, router];
1845
+ $[8] = inProgress;
1846
+ $[9] = router;
1847
+ $[10] = t4;
1848
+ $[11] = t5;
1878
1849
  } else {
1879
- t6 = $[15];
1880
- t7 = $[16];
1850
+ t4 = $[10];
1851
+ t5 = $[11];
1881
1852
  }
1882
- useEffect(t6, t7);
1853
+ useEffect(t4, t5);
1883
1854
  return null;
1884
1855
  };
1885
1856
  const MsalAuthProvider = (t0) => {
1886
1857
  const $ = c(4);
1887
- if ($[0] !== "ed641e629ae67334685c83f7ac02e2cb2402fa8f3acc56775b90259fb3bb2a60") {
1858
+ if ($[0] !== "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84") {
1888
1859
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
1889
- $[0] = "ed641e629ae67334685c83f7ac02e2cb2402fa8f3acc56775b90259fb3bb2a60";
1860
+ $[0] = "67cb9b81df44ca8f126c014d72bff33c094a5c91732f1ddb4102b3b19a004f84";
1890
1861
  }
1891
1862
  const { children } = t0;
1892
1863
  let t1;
@@ -1905,7 +1876,6 @@ const MsalAuthProvider = (t0) => {
1905
1876
  } else t2 = $[3];
1906
1877
  return t2;
1907
1878
  };
1908
- function _temp$1() {}
1909
1879
  //#endregion
1910
1880
  //#region src/providers/NotificationProvider.tsx
1911
1881
  const STACK_INTERVAL = 1e3;