@fluid-app/portal-sdk 0.1.447 → 0.1.448
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/{ContactsScreen-CbWOdrpK.cjs → ContactsScreen-C1kfIxoL.cjs} +1 -1
- package/dist/{ContactsScreen-BMnHQQQj.cjs → ContactsScreen-CBXOEkvz.cjs} +78 -17
- package/dist/ContactsScreen-CBXOEkvz.cjs.map +1 -0
- package/dist/{ContactsScreen-Ds-J6GFM.mjs → ContactsScreen-DjMBu144.mjs} +73 -18
- package/dist/ContactsScreen-DjMBu144.mjs.map +1 -0
- package/dist/index.cjs +165 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +165 -119
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/dist/ContactsScreen-BMnHQQQj.cjs.map +0 -1
- package/dist/ContactsScreen-Ds-J6GFM.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "./use-optional-store-DpB_jK4Q.mjs";
|
|
|
6
6
|
import { b as useLanguagesApi, h as useThemeContext, m as FluidThemeProvider, n as useFluidContext, p as shellEn, r as SUPPORTED_LANGUAGES, t as FluidProvider } from "./FluidProvider-DTLXqi_x.mjs";
|
|
7
7
|
import "./mysite-api-context-BbxSfNft.mjs";
|
|
8
8
|
import "./ContactsTranslationBridge-DCSWCdyq.mjs";
|
|
9
|
-
import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-
|
|
9
|
+
import { i as useIsMobile, r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-DjMBu144.mjs";
|
|
10
10
|
import { n as usePortalTenantClient } from "./PortalTenantClientProvider-lBrYQEsw.mjs";
|
|
11
11
|
import "./registry-context-l1jip-6W.mjs";
|
|
12
12
|
import { t as WidgetInteractionProvider } from "./WidgetInteractionContext-D8HZx_Gf.mjs";
|
|
@@ -82,7 +82,7 @@ import { Component, StrictMode, Suspense, createContext, forwardRef, lazy, memo,
|
|
|
82
82
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
83
83
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
84
84
|
import { z } from "zod";
|
|
85
|
-
import { Bell, Box, Boxes, Briefcase, Building2, Calendar, Check, ChevronLeft, ChevronRight, CircleUser, Compass, ContactRound, Ellipsis, File, FileText, FileVideo, Folder, FolderOpen, Globe, GraduationCap, Heart, House, Image, LayoutGrid, ListMusic, LogOut, Mail, Menu, MessageCircle, MessageSquare, Moon, PackageOpen, PanelLeft, Repeat, Search, Settings, ShoppingCart, Smartphone, Star, Store, Sun, TriangleAlert, User, UserCog, Users
|
|
85
|
+
import { Bell, Box, Boxes, Briefcase, Building2, Calendar, Check, ChevronLeft, ChevronRight, CircleUser, Compass, ContactRound, Ellipsis, File, FileText, FileVideo, Folder, FolderOpen, Globe, GraduationCap, Heart, House, Image, LayoutGrid, ListMusic, LogOut, Mail, Menu, MessageCircle, MessageSquare, Moon, PackageOpen, PanelLeft, Repeat, Search, Settings, ShoppingCart, Smartphone, Star, Store, Sun, TriangleAlert, User, UserCog, Users } from "lucide-react";
|
|
86
86
|
import { clsx } from "clsx";
|
|
87
87
|
import { twMerge } from "tailwind-merge";
|
|
88
88
|
import { Slot } from "@radix-ui/react-slot";
|
|
@@ -495,22 +495,6 @@ function useResolvedPages(navigation) {
|
|
|
495
495
|
return useMemo(() => resolvePages(navigation), [resolvePages, navigation]);
|
|
496
496
|
}
|
|
497
497
|
//#endregion
|
|
498
|
-
//#region ../react/src/shell/use-mobile.ts
|
|
499
|
-
const MOBILE_BREAKPOINT = 768;
|
|
500
|
-
function useIsMobile() {
|
|
501
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
502
|
-
useEffect(() => {
|
|
503
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
504
|
-
const onChange = () => {
|
|
505
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
506
|
-
};
|
|
507
|
-
mql.addEventListener("change", onChange);
|
|
508
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
509
|
-
return () => mql.removeEventListener("change", onChange);
|
|
510
|
-
}, []);
|
|
511
|
-
return isMobile;
|
|
512
|
-
}
|
|
513
|
-
//#endregion
|
|
514
498
|
//#region ../react/src/shell/sidebar.tsx
|
|
515
499
|
function cn(...inputs) {
|
|
516
500
|
return twMerge(clsx(inputs));
|
|
@@ -1402,6 +1386,32 @@ function SdkNavigation({ navItems, currentSlug, onNavigate }) {
|
|
|
1402
1386
|
}) });
|
|
1403
1387
|
}
|
|
1404
1388
|
//#endregion
|
|
1389
|
+
//#region src/shell/use-mobile-languages.ts
|
|
1390
|
+
/**
|
|
1391
|
+
* Resolve the language options to offer in the mobile switcher: the company's
|
|
1392
|
+
* enabled languages, falling back to the full supported set if that request
|
|
1393
|
+
* hasn't returned, failed, or came back empty (better to over-offer than to
|
|
1394
|
+
* strand the user with no way to switch).
|
|
1395
|
+
*/
|
|
1396
|
+
function useMobileLanguages() {
|
|
1397
|
+
const { locale, setLocale } = useActiveLocale();
|
|
1398
|
+
const languagesApi = useLanguagesApi();
|
|
1399
|
+
const { data } = useQuery({
|
|
1400
|
+
queryKey: storeKeys.languages(),
|
|
1401
|
+
queryFn: () => languagesApi.listLanguages({ limit: 100 }),
|
|
1402
|
+
staleTime: 300 * 1e3
|
|
1403
|
+
});
|
|
1404
|
+
const enabledCodes = new Set((data?.languages ?? []).map((l) => l.code));
|
|
1405
|
+
const filtered = SUPPORTED_LANGUAGES.filter((l) => enabledCodes.has(l.iso));
|
|
1406
|
+
const languages = filtered.length > 0 ? filtered : SUPPORTED_LANGUAGES;
|
|
1407
|
+
return {
|
|
1408
|
+
languages,
|
|
1409
|
+
locale,
|
|
1410
|
+
setLocale,
|
|
1411
|
+
currentName: languages.find((l) => l.iso === locale)?.name ?? locale
|
|
1412
|
+
};
|
|
1413
|
+
}
|
|
1414
|
+
//#endregion
|
|
1405
1415
|
//#region src/shell/SdkMobileProfileMenu.tsx
|
|
1406
1416
|
function getInitials(name) {
|
|
1407
1417
|
if (!name) return "U";
|
|
@@ -1412,13 +1422,19 @@ function getInitials(name) {
|
|
|
1412
1422
|
function SdkMobileProfileMenu({ onNavigate, onLogout }) {
|
|
1413
1423
|
const { isMobile, useBottomNav } = useSidebar();
|
|
1414
1424
|
const [isOpen, setIsOpen] = useState(false);
|
|
1425
|
+
const [view, setView] = useState("main");
|
|
1415
1426
|
const user = useRepUser();
|
|
1416
1427
|
const themeMode = useThemeMode();
|
|
1428
|
+
const languages = useMobileLanguages();
|
|
1417
1429
|
const { t } = useShellTranslation();
|
|
1418
1430
|
const handleNavigate = useCallback((slug) => {
|
|
1419
1431
|
setIsOpen(false);
|
|
1420
1432
|
onNavigate(slug);
|
|
1421
1433
|
}, [onNavigate]);
|
|
1434
|
+
const handleOpenChange = useCallback((open) => {
|
|
1435
|
+
setIsOpen(open);
|
|
1436
|
+
if (!open) setView("main");
|
|
1437
|
+
}, []);
|
|
1422
1438
|
if (!isMobile || !useBottomNav) return null;
|
|
1423
1439
|
const initials = getInitials(user?.name);
|
|
1424
1440
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("button", {
|
|
@@ -1434,114 +1450,99 @@ function SdkMobileProfileMenu({ onNavigate, onLogout }) {
|
|
|
1434
1450
|
className: "flex size-8 items-center justify-center text-xs font-medium",
|
|
1435
1451
|
children: initials
|
|
1436
1452
|
})
|
|
1437
|
-
}),
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1453
|
+
}), /* @__PURE__ */ jsx(MobileBottomSheet, {
|
|
1454
|
+
open: isOpen,
|
|
1455
|
+
onOpenChange: handleOpenChange,
|
|
1456
|
+
surface: "sidebar",
|
|
1457
|
+
title: view === "language" ? /* @__PURE__ */ jsxs("button", {
|
|
1458
|
+
type: "button",
|
|
1459
|
+
onClick: () => setView("main"),
|
|
1460
|
+
className: "text-foreground -ml-1 flex items-center gap-1",
|
|
1461
|
+
"aria-label": t("nav_back"),
|
|
1462
|
+
children: [/* @__PURE__ */ jsx(ChevronLeft, { className: "size-5" }), /* @__PURE__ */ jsx("span", { children: t("language_select") })]
|
|
1463
|
+
}) : t("profile_title"),
|
|
1464
|
+
children: view === "language" ? /* @__PURE__ */ jsx("div", {
|
|
1465
|
+
className: "flex flex-col pb-2",
|
|
1466
|
+
children: languages.languages.map((lang) => {
|
|
1467
|
+
const isActive = lang.iso === languages.locale;
|
|
1468
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
1469
|
+
type: "button",
|
|
1470
|
+
onClick: () => {
|
|
1471
|
+
languages.setLocale(lang.iso);
|
|
1472
|
+
setView("main");
|
|
1473
|
+
},
|
|
1474
|
+
className: "hover:bg-sidebar-accent flex w-full items-center justify-between gap-3 rounded-lg px-3 py-3.5 text-left",
|
|
1475
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1476
|
+
className: isActive ? "text-foreground text-base font-semibold" : "text-foreground text-base",
|
|
1477
|
+
children: lang.name
|
|
1478
|
+
}), isActive && /* @__PURE__ */ jsx(Check, { className: "text-primary size-5 shrink-0" })]
|
|
1479
|
+
}, lang.iso);
|
|
1480
|
+
})
|
|
1481
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1482
|
+
user && /* @__PURE__ */ jsxs("div", {
|
|
1483
|
+
className: "border-border flex items-center gap-3 border-b px-3 py-4",
|
|
1484
|
+
children: [user.imageUrl ? /* @__PURE__ */ jsx("img", {
|
|
1485
|
+
src: user.imageUrl,
|
|
1486
|
+
alt: user.name ?? t("profile_user_fallback"),
|
|
1487
|
+
className: "size-10 rounded-full object-cover"
|
|
1488
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
1489
|
+
className: "bg-muted flex size-10 items-center justify-center rounded-full text-sm font-medium",
|
|
1490
|
+
children: initials
|
|
1491
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1492
|
+
className: "min-w-0 flex-1",
|
|
1493
|
+
children: [user.name && /* @__PURE__ */ jsx("p", {
|
|
1494
|
+
className: "text-foreground truncate text-sm font-semibold",
|
|
1495
|
+
children: user.name
|
|
1496
|
+
}), user.email && /* @__PURE__ */ jsx("p", {
|
|
1497
|
+
className: "text-muted-foreground truncate text-xs",
|
|
1498
|
+
children: user.email
|
|
1472
1499
|
})]
|
|
1473
|
-
})
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1500
|
+
})]
|
|
1501
|
+
}),
|
|
1502
|
+
/* @__PURE__ */ jsx("div", {
|
|
1503
|
+
className: "border-border border-b py-2",
|
|
1504
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
1505
|
+
type: "button",
|
|
1506
|
+
onClick: () => handleNavigate("app-download"),
|
|
1507
|
+
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium",
|
|
1508
|
+
children: [/* @__PURE__ */ jsx(Smartphone, { className: "size-5" }), /* @__PURE__ */ jsx("span", { children: t("profile_app_download") })]
|
|
1509
|
+
})
|
|
1510
|
+
}),
|
|
1511
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1512
|
+
className: "space-y-1 py-2",
|
|
1513
|
+
children: [
|
|
1514
|
+
/* @__PURE__ */ jsxs("button", {
|
|
1477
1515
|
type: "button",
|
|
1478
|
-
onClick: () =>
|
|
1516
|
+
onClick: () => setView("language"),
|
|
1479
1517
|
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium",
|
|
1480
|
-
children: [
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1518
|
+
children: [
|
|
1519
|
+
/* @__PURE__ */ jsx(Globe, { className: "size-5 shrink-0" }),
|
|
1520
|
+
/* @__PURE__ */ jsx("span", { children: t("language_select") }),
|
|
1521
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1522
|
+
className: "text-muted-foreground ml-auto flex min-w-0 items-center gap-1",
|
|
1523
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1524
|
+
className: "truncate",
|
|
1525
|
+
children: languages.currentName
|
|
1526
|
+
}), /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 shrink-0" })]
|
|
1527
|
+
})
|
|
1528
|
+
]
|
|
1529
|
+
}),
|
|
1530
|
+
/* @__PURE__ */ jsxs("button", {
|
|
1486
1531
|
type: "button",
|
|
1487
1532
|
onClick: themeMode.cycleMode,
|
|
1488
1533
|
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium",
|
|
1489
1534
|
children: [themeMode.mode === "dark" ? /* @__PURE__ */ jsx(Moon, { className: "size-5" }) : /* @__PURE__ */ jsx(Sun, { className: "size-5" }), /* @__PURE__ */ jsx("span", { children: themeMode.mode === "light" ? t("theme_light") : t("theme_dark") })]
|
|
1490
|
-
}),
|
|
1535
|
+
}),
|
|
1536
|
+
onLogout && /* @__PURE__ */ jsxs("button", {
|
|
1491
1537
|
type: "button",
|
|
1492
1538
|
onClick: onLogout,
|
|
1493
1539
|
className: "text-destructive hover:bg-sidebar-accent flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium",
|
|
1494
1540
|
children: [/* @__PURE__ */ jsx(LogOut, { className: "size-5" }), /* @__PURE__ */ jsx("span", { children: t("logout") })]
|
|
1495
|
-
})
|
|
1496
|
-
|
|
1497
|
-
]
|
|
1498
|
-
})]
|
|
1499
|
-
})] });
|
|
1500
|
-
}
|
|
1501
|
-
//#endregion
|
|
1502
|
-
//#region src/shell/LanguageSelector.tsx
|
|
1503
|
-
function LanguageSelector() {
|
|
1504
|
-
const [open, setOpen] = useState(false);
|
|
1505
|
-
const { locale, setLocale } = useActiveLocale();
|
|
1506
|
-
const { t } = useShellTranslation();
|
|
1507
|
-
const languagesApi = useLanguagesApi();
|
|
1508
|
-
const { data: languagesData } = useQuery({
|
|
1509
|
-
queryKey: storeKeys.languages(),
|
|
1510
|
-
queryFn: () => languagesApi.listLanguages({ limit: 100 }),
|
|
1511
|
-
staleTime: 300 * 1e3
|
|
1512
|
-
});
|
|
1513
|
-
const enabledCodes = new Set((languagesData?.languages ?? []).map((l) => l.code));
|
|
1514
|
-
const filtered = SUPPORTED_LANGUAGES.filter((l) => enabledCodes.has(l.iso));
|
|
1515
|
-
const languagesToRender = filtered.length > 0 ? filtered : SUPPORTED_LANGUAGES;
|
|
1516
|
-
return /* @__PURE__ */ jsxs(Popover, {
|
|
1517
|
-
open,
|
|
1518
|
-
onOpenChange: setOpen,
|
|
1519
|
-
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
1520
|
-
asChild: true,
|
|
1521
|
-
children: /* @__PURE__ */ jsxs(Button, {
|
|
1522
|
-
variant: "ghost",
|
|
1523
|
-
size: "sm",
|
|
1524
|
-
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0 gap-1.5",
|
|
1525
|
-
"aria-label": t("language_select"),
|
|
1526
|
-
children: [/* @__PURE__ */ jsx(Globe, { className: "size-3" }), /* @__PURE__ */ jsx("span", {
|
|
1527
|
-
className: "text-xs uppercase",
|
|
1528
|
-
children: locale.split("_")[0]
|
|
1529
|
-
})]
|
|
1541
|
+
})
|
|
1542
|
+
]
|
|
1530
1543
|
})
|
|
1531
|
-
})
|
|
1532
|
-
|
|
1533
|
-
className: "bg-popover z-50 w-56 rounded-lg p-1 shadow-lg",
|
|
1534
|
-
children: languagesToRender.map((lang) => /* @__PURE__ */ jsxs(Button, {
|
|
1535
|
-
variant: "ghost",
|
|
1536
|
-
className: "h-auto w-full justify-between px-3 py-2 text-left text-sm whitespace-normal",
|
|
1537
|
-
onClick: () => {
|
|
1538
|
-
setLocale(lang.iso);
|
|
1539
|
-
setOpen(false);
|
|
1540
|
-
},
|
|
1541
|
-
children: [/* @__PURE__ */ jsx("span", { children: lang.name }), lang.iso === locale && /* @__PURE__ */ jsx(Check, { className: "size-4" })]
|
|
1542
|
-
}, lang.iso))
|
|
1543
|
-
})]
|
|
1544
|
-
});
|
|
1544
|
+
] })
|
|
1545
|
+
})] });
|
|
1545
1546
|
}
|
|
1546
1547
|
//#endregion
|
|
1547
1548
|
//#region src/shell/SdkHeader.tsx
|
|
@@ -1568,12 +1569,12 @@ function SdkHeader({ mobileTabs, currentSlug, title, onBack, onNavigate, onLogou
|
|
|
1568
1569
|
className: "text-sidebar-foreground min-w-0 flex-1 truncate text-[17px] leading-tight font-semibold tracking-[-0.01em]",
|
|
1569
1570
|
children: resolvedTitle
|
|
1570
1571
|
}) : null,
|
|
1571
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ jsx("div", {
|
|
1572
1573
|
className: "text-muted-foreground ml-auto flex flex-none items-center justify-end gap-2",
|
|
1573
|
-
children:
|
|
1574
|
+
children: /* @__PURE__ */ jsx(SdkMobileProfileMenu, {
|
|
1574
1575
|
onNavigate,
|
|
1575
1576
|
onLogout
|
|
1576
|
-
})
|
|
1577
|
+
})
|
|
1577
1578
|
})
|
|
1578
1579
|
]
|
|
1579
1580
|
}) : /* @__PURE__ */ jsx("div", {
|
|
@@ -1601,6 +1602,51 @@ function SdkHeader({ mobileTabs, currentSlug, title, onBack, onNavigate, onLogou
|
|
|
1601
1602
|
});
|
|
1602
1603
|
}
|
|
1603
1604
|
//#endregion
|
|
1605
|
+
//#region src/shell/LanguageSelector.tsx
|
|
1606
|
+
function LanguageSelector() {
|
|
1607
|
+
const [open, setOpen] = useState(false);
|
|
1608
|
+
const { locale, setLocale } = useActiveLocale();
|
|
1609
|
+
const { t } = useShellTranslation();
|
|
1610
|
+
const languagesApi = useLanguagesApi();
|
|
1611
|
+
const { data: languagesData } = useQuery({
|
|
1612
|
+
queryKey: storeKeys.languages(),
|
|
1613
|
+
queryFn: () => languagesApi.listLanguages({ limit: 100 }),
|
|
1614
|
+
staleTime: 300 * 1e3
|
|
1615
|
+
});
|
|
1616
|
+
const enabledCodes = new Set((languagesData?.languages ?? []).map((l) => l.code));
|
|
1617
|
+
const filtered = SUPPORTED_LANGUAGES.filter((l) => enabledCodes.has(l.iso));
|
|
1618
|
+
const languagesToRender = filtered.length > 0 ? filtered : SUPPORTED_LANGUAGES;
|
|
1619
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
1620
|
+
open,
|
|
1621
|
+
onOpenChange: setOpen,
|
|
1622
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
1623
|
+
asChild: true,
|
|
1624
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
1625
|
+
variant: "ghost",
|
|
1626
|
+
size: "sm",
|
|
1627
|
+
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0 gap-1.5",
|
|
1628
|
+
"aria-label": t("language_select"),
|
|
1629
|
+
children: [/* @__PURE__ */ jsx(Globe, { className: "size-3" }), /* @__PURE__ */ jsx("span", {
|
|
1630
|
+
className: "text-xs uppercase",
|
|
1631
|
+
children: locale.split("_")[0]
|
|
1632
|
+
})]
|
|
1633
|
+
})
|
|
1634
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
1635
|
+
align: "end",
|
|
1636
|
+
className: "bg-popover z-50 w-56 rounded-lg p-1 shadow-lg",
|
|
1637
|
+
children: languagesToRender.map((lang) => /* @__PURE__ */ jsxs(Button, {
|
|
1638
|
+
variant: "ghost",
|
|
1639
|
+
className: "h-auto w-full justify-between px-3 py-2 text-left text-sm whitespace-normal",
|
|
1640
|
+
onClick: () => {
|
|
1641
|
+
setLocale(lang.iso);
|
|
1642
|
+
setOpen(false);
|
|
1643
|
+
},
|
|
1644
|
+
children: [/* @__PURE__ */ jsx("span", { children: lang.name }), lang.iso === locale && /* @__PURE__ */ jsx(Check, { className: "size-4" })]
|
|
1645
|
+
}, lang.iso))
|
|
1646
|
+
})]
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
//#endregion
|
|
1604
1650
|
//#region ../../company-switcher/ui/src/components/CompanyImage.tsx
|
|
1605
1651
|
function CompanyImage({ src, alt, size }) {
|
|
1606
1652
|
const [error, setError] = useState(false);
|
|
@@ -1810,7 +1856,7 @@ const ProfileScreen$1 = lazy(() => import("./ProfileScreen-2-dGMH-O.mjs").then((
|
|
|
1810
1856
|
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-_JbOhHSb.mjs").then((m) => ({ default: m.OrdersScreen })));
|
|
1811
1857
|
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-Cz9JzpFs.mjs").then((m) => ({ default: m.SubscriptionsScreen })));
|
|
1812
1858
|
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-CyG6ng9Q.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
1813
|
-
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-
|
|
1859
|
+
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-DjMBu144.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
1814
1860
|
const ShopScreen$1 = lazy(() => import("./ShopScreen-CBu3-hoU.mjs").then((m) => ({ default: m.ShopScreen })));
|
|
1815
1861
|
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-95_LKw0d.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
1816
1862
|
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-CJU8G50V.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
@@ -3721,7 +3767,7 @@ const CORE_PAGE_IDS = {
|
|
|
3721
3767
|
const screenPropertySchemas = {
|
|
3722
3768
|
ProfileScreen: () => import("./ProfileScreen-2-dGMH-O.mjs").then((m) => m.profileScreenPropertySchema),
|
|
3723
3769
|
MessagingScreen: () => import("./MessagingScreen-CyG6ng9Q.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
3724
|
-
ContactsScreen: () => import("./ContactsScreen-
|
|
3770
|
+
ContactsScreen: () => import("./ContactsScreen-DjMBu144.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
|
|
3725
3771
|
OrdersScreen: () => import("./OrdersScreen-_JbOhHSb.mjs").then((m) => m.ordersScreenPropertySchema),
|
|
3726
3772
|
SubscriptionsScreen: () => import("./SubscriptionsScreen-Cz9JzpFs.mjs").then((m) => m.subscriptionsScreenPropertySchema),
|
|
3727
3773
|
CustomersScreen: () => import("./CustomersScreen-95_LKw0d.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|