@fluid-app/portal-sdk 0.1.235 → 0.1.236
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/{AppDownloadScreen-B0YwMqYM.cjs → AppDownloadScreen-BXnl23_d.cjs} +2 -2
- package/dist/{AppDownloadScreen-B0YwMqYM.cjs.map → AppDownloadScreen-BXnl23_d.cjs.map} +1 -1
- package/dist/{AppDownloadScreen-CT_TvZfy.mjs → AppDownloadScreen-DQR40F0y.mjs} +2 -2
- package/dist/{AppDownloadScreen-CT_TvZfy.mjs.map → AppDownloadScreen-DQR40F0y.mjs.map} +1 -1
- package/dist/{AppNavigationContext-BDs1cOuG.cjs → AppNavigationContext-C1-hd9Rw.cjs} +1 -1
- package/dist/{AppNavigationContext-BDs1cOuG.cjs.map → AppNavigationContext-C1-hd9Rw.cjs.map} +1 -1
- package/dist/{AppNavigationContext-DNod9mf6.mjs → AppNavigationContext-Dvc0yoZF.mjs} +1 -1
- package/dist/{AppNavigationContext-DNod9mf6.mjs.map → AppNavigationContext-Dvc0yoZF.mjs.map} +1 -1
- package/dist/{ContactsScreen-BaILrn_J.cjs → ContactsScreen-CH_P8WxC.cjs} +1 -1
- package/dist/{ContactsScreen-C0TixAga.mjs → ContactsScreen-CMBERzKU.mjs} +2 -2
- package/dist/{ContactsScreen-C0TixAga.mjs.map → ContactsScreen-CMBERzKU.mjs.map} +1 -1
- package/dist/{ContactsScreen-Cgpeq_3G.cjs → ContactsScreen-Cj0_VI0d.cjs} +2 -2
- package/dist/{ContactsScreen-Cgpeq_3G.cjs.map → ContactsScreen-Cj0_VI0d.cjs.map} +1 -1
- package/dist/{CustomersScreen-DJzgMofN.mjs → CustomersScreen-BJOBG5f5.mjs} +1 -1
- package/dist/{CustomersScreen-DJzgMofN.mjs.map → CustomersScreen-BJOBG5f5.mjs.map} +1 -1
- package/dist/{CustomersScreen-GROLIynQ.cjs → CustomersScreen-DW3BuhBs.cjs} +1 -1
- package/dist/{CustomersScreen-GROLIynQ.cjs.map → CustomersScreen-DW3BuhBs.cjs.map} +1 -1
- package/dist/{MessagingScreen-CAqiCGjA.cjs → MessagingScreen-40YCQbX9.cjs} +3 -3
- package/dist/{MessagingScreen-CAqiCGjA.cjs.map → MessagingScreen-40YCQbX9.cjs.map} +1 -1
- package/dist/{MessagingScreen-DNxIsd2Q.cjs → MessagingScreen-CrdiB4M3.cjs} +1 -1
- package/dist/{MessagingScreen-BzTN_FU8.mjs → MessagingScreen-RItZgONw.mjs} +3 -3
- package/dist/{MessagingScreen-BzTN_FU8.mjs.map → MessagingScreen-RItZgONw.mjs.map} +1 -1
- package/dist/{OrdersScreen-BlZgI0XT.mjs → OrdersScreen-BV3vJ7xy.mjs} +2 -2
- package/dist/{OrdersScreen-BlZgI0XT.mjs.map → OrdersScreen-BV3vJ7xy.mjs.map} +1 -1
- package/dist/{OrdersScreen-Cr_2QuUc.cjs → OrdersScreen-Cuch7aki.cjs} +1 -1
- package/dist/{OrdersScreen-BrqNjvTY.cjs → OrdersScreen-DPcp2dLW.cjs} +2 -2
- package/dist/{OrdersScreen-BrqNjvTY.cjs.map → OrdersScreen-DPcp2dLW.cjs.map} +1 -1
- package/dist/{ProfileScreen-ZN-A1RDl.cjs → ProfileScreen-CEKbhSRz.cjs} +3 -3
- package/dist/{ProfileScreen-ZN-A1RDl.cjs.map → ProfileScreen-CEKbhSRz.cjs.map} +1 -1
- package/dist/{ProfileScreen-DFkgLmNL.mjs → ProfileScreen-CeD1jq89.mjs} +3 -3
- package/dist/{ProfileScreen-DFkgLmNL.mjs.map → ProfileScreen-CeD1jq89.mjs.map} +1 -1
- package/dist/{ProfileScreen-Urnx0LDK.cjs → ProfileScreen-Dex8VHSB.cjs} +1 -1
- package/dist/{ShareablesScreen-DlrTvvXe.cjs → ShareablesScreen-Bt0E1aya.cjs} +4 -4
- package/dist/{ShareablesScreen-DlrTvvXe.cjs.map → ShareablesScreen-Bt0E1aya.cjs.map} +1 -1
- package/dist/{ShareablesScreen-CvIi80jN.mjs → ShareablesScreen-D3Hfqg9-.mjs} +4 -4
- package/dist/{ShareablesScreen-CvIi80jN.mjs.map → ShareablesScreen-D3Hfqg9-.mjs.map} +1 -1
- package/dist/{ShareablesScreen-Boi-_GvN.cjs → ShareablesScreen-LSyiDa6q.cjs} +1 -1
- package/dist/{ShopScreen-2FSVxXiE.cjs → ShopScreen-BiqZPyiB.cjs} +3 -3
- package/dist/{ShopScreen-2FSVxXiE.cjs.map → ShopScreen-BiqZPyiB.cjs.map} +1 -1
- package/dist/{ShopScreen-BxjZQ0SG.cjs → ShopScreen-Cgro0M1d.cjs} +1 -1
- package/dist/{ShopScreen-Bkuiya9D.mjs → ShopScreen-dAe71cdL.mjs} +3 -3
- package/dist/{ShopScreen-Bkuiya9D.mjs.map → ShopScreen-dAe71cdL.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-B7pAMsaf.mjs → SubscriptionsScreen-CXM2zmF7.mjs} +4 -4
- package/dist/{SubscriptionsScreen-B7pAMsaf.mjs.map → SubscriptionsScreen-CXM2zmF7.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-Cv3C3SVW.cjs → SubscriptionsScreen-DrDSwMXS.cjs} +4 -4
- package/dist/{SubscriptionsScreen-Cv3C3SVW.cjs.map → SubscriptionsScreen-DrDSwMXS.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-BbokDXZD.cjs → SubscriptionsScreen-t5wtDGfB.cjs} +1 -1
- package/dist/index.cjs +149 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +149 -172
- package/dist/index.mjs.map +1 -1
- package/dist/{query-keys-D3lK70Ea.cjs → query-keys-elu0svUd.cjs} +1 -1
- package/dist/{query-keys-D3lK70Ea.cjs.map → query-keys-elu0svUd.cjs.map} +1 -1
- package/dist/{query-keys-xJy_fapN.mjs → query-keys-oQKvV4jp.mjs} +1 -1
- package/dist/{query-keys-xJy_fapN.mjs.map → query-keys-oQKvV4jp.mjs.map} +1 -1
- package/dist/{use-account-DcBCP06c.cjs → use-account-C1X-VLY-.cjs} +2 -2
- package/dist/{use-account-DcBCP06c.cjs.map → use-account-C1X-VLY-.cjs.map} +1 -1
- package/dist/{use-account-CBMPhhs7.mjs → use-account-C76sphlu.mjs} +2 -2
- package/dist/{use-account-CBMPhhs7.mjs.map → use-account-C76sphlu.mjs.map} +1 -1
- package/dist/{use-store-By_7tzrN.mjs → use-store-C2KBIS41.mjs} +1 -1
- package/dist/{use-store-By_7tzrN.mjs.map → use-store-C2KBIS41.mjs.map} +1 -1
- package/dist/{use-store-lOOUcpRT.cjs → use-store-D2S1FywW.cjs} +1 -1
- package/dist/{use-store-lOOUcpRT.cjs.map → use-store-D2S1FywW.cjs.map} +1 -1
- package/package.json +13 -13
|
@@ -5,7 +5,7 @@ require("./countries-api-context-C0C0K9gJ.cjs");
|
|
|
5
5
|
require("./src-uhf6Szlw.cjs");
|
|
6
6
|
require("./ScreenHeaderContext-oIu5Bvhs.cjs");
|
|
7
7
|
require("./fluid-pay-api-adapter-BszgrFL6.cjs");
|
|
8
|
-
const require_SubscriptionsScreen = require("./SubscriptionsScreen-
|
|
8
|
+
const require_SubscriptionsScreen = require("./SubscriptionsScreen-DrDSwMXS.cjs");
|
|
9
9
|
require("./SearchSort-CeJqRK2c.cjs");
|
|
10
10
|
require("./InfiniteScrollSentinel-DeIL8UkW.cjs");
|
|
11
11
|
require("./order-status-badge-DHyaK6mU.cjs");
|
package/dist/index.cjs
CHANGED
|
@@ -44,29 +44,29 @@ const require_TableWidget = require("./TableWidget-D4jQN-to.cjs");
|
|
|
44
44
|
const require_ToDoWidget = require("./ToDoWidget-BbeXt99H.cjs");
|
|
45
45
|
const require_VideoWidget = require("./VideoWidget-Bc6ZAAaA.cjs");
|
|
46
46
|
const require_ScreenHeaderContext = require("./ScreenHeaderContext-oIu5Bvhs.cjs");
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const require_MessagingScreen = require("./MessagingScreen-
|
|
47
|
+
const require_use_store = require("./use-store-D2S1FywW.cjs");
|
|
48
|
+
const require_CustomersScreen = require("./CustomersScreen-DW3BuhBs.cjs");
|
|
49
|
+
const require_AppNavigationContext = require("./AppNavigationContext-C1-hd9Rw.cjs");
|
|
50
|
+
const require_use_account = require("./use-account-C1X-VLY-.cjs");
|
|
51
|
+
const require_MessagingScreen = require("./MessagingScreen-40YCQbX9.cjs");
|
|
52
52
|
require("./fluid-pay-api-adapter-BszgrFL6.cjs");
|
|
53
|
-
const require_ProfileScreen = require("./ProfileScreen-
|
|
54
|
-
const require_SubscriptionsScreen = require("./SubscriptionsScreen-
|
|
53
|
+
const require_ProfileScreen = require("./ProfileScreen-CEKbhSRz.cjs");
|
|
54
|
+
const require_SubscriptionsScreen = require("./SubscriptionsScreen-DrDSwMXS.cjs");
|
|
55
55
|
require("./dist-DbRTQ2QF.cjs");
|
|
56
56
|
require("./es-UfEBhcZD.cjs");
|
|
57
|
-
const require_ContactsScreen = require("./ContactsScreen-
|
|
57
|
+
const require_ContactsScreen = require("./ContactsScreen-Cj0_VI0d.cjs");
|
|
58
58
|
require("./SearchSort-CeJqRK2c.cjs");
|
|
59
59
|
require("./InfiniteScrollSentinel-DeIL8UkW.cjs");
|
|
60
60
|
require("./dist-myuZC8sf.cjs");
|
|
61
61
|
require("./order-status-badge-DHyaK6mU.cjs");
|
|
62
|
-
const require_OrdersScreen = require("./OrdersScreen-
|
|
62
|
+
const require_OrdersScreen = require("./OrdersScreen-DPcp2dLW.cjs");
|
|
63
63
|
require("./dist-BQZkLGL6.cjs");
|
|
64
64
|
const require_MySiteScreen = require("./MySiteScreen-CUyJteDm.cjs");
|
|
65
|
-
const require_ShareablesScreen = require("./ShareablesScreen-
|
|
65
|
+
const require_ShareablesScreen = require("./ShareablesScreen-Bt0E1aya.cjs");
|
|
66
66
|
require("./PortalProductsApiProvider-DL8nl7To.cjs");
|
|
67
|
-
const require_ShopScreen = require("./ShopScreen-
|
|
67
|
+
const require_ShopScreen = require("./ShopScreen-BiqZPyiB.cjs");
|
|
68
68
|
require("./UpgradeScreen-DAKe_hiv.cjs");
|
|
69
|
-
require("./AppDownloadScreen-
|
|
69
|
+
require("./AppDownloadScreen-BXnl23_d.cjs");
|
|
70
70
|
let react = require("react");
|
|
71
71
|
react = require_chunk.__toESM(react);
|
|
72
72
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
@@ -1652,140 +1652,6 @@ function SdkNavigation({ navItems, currentSlug, onNavigate }) {
|
|
|
1652
1652
|
}) });
|
|
1653
1653
|
}
|
|
1654
1654
|
//#endregion
|
|
1655
|
-
//#region src/navigation/filter-nav-items.ts
|
|
1656
|
-
/**
|
|
1657
|
-
* Filter navigation items by removing rep-only slugs.
|
|
1658
|
-
* Handles nested children: rep-only children are removed, and parents
|
|
1659
|
-
* with no remaining children are also removed.
|
|
1660
|
-
*/
|
|
1661
|
-
function filterRepOnlyNavItems(items) {
|
|
1662
|
-
const result = [];
|
|
1663
|
-
for (const item of items) {
|
|
1664
|
-
if (!item.children?.length) {
|
|
1665
|
-
if (isRepOnlySlug(item.slug)) continue;
|
|
1666
|
-
result.push(item);
|
|
1667
|
-
continue;
|
|
1668
|
-
}
|
|
1669
|
-
if (isRepOnlySlug(item.slug)) continue;
|
|
1670
|
-
const filteredChildren = filterRepOnlyNavItems(item.children);
|
|
1671
|
-
if (filteredChildren.length === 0) continue;
|
|
1672
|
-
result.push({
|
|
1673
|
-
...item,
|
|
1674
|
-
children: filteredChildren
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1677
|
-
return result;
|
|
1678
|
-
}
|
|
1679
|
-
/**
|
|
1680
|
-
* Filter system navigation sections by removing rep-only items.
|
|
1681
|
-
* Sections with no remaining items are dropped entirely.
|
|
1682
|
-
*/
|
|
1683
|
-
function filterRepOnlySections(sections) {
|
|
1684
|
-
const filtered = {};
|
|
1685
|
-
for (const [section, items] of Object.entries(sections)) {
|
|
1686
|
-
const allowed = items.filter((item) => !isRepOnlySlug(item.slug));
|
|
1687
|
-
if (allowed.length > 0) filtered[section] = allowed;
|
|
1688
|
-
}
|
|
1689
|
-
return filtered;
|
|
1690
|
-
}
|
|
1691
|
-
//#endregion
|
|
1692
|
-
//#region src/shell/QuickLinksDropdown.tsx
|
|
1693
|
-
function QuickLinksDropdown({ onNavigate }) {
|
|
1694
|
-
const [open, setOpen] = (0, react.useState)(false);
|
|
1695
|
-
const { data: account } = require_use_account.useAccount();
|
|
1696
|
-
const isCustomer = account?.member_type === "customer";
|
|
1697
|
-
const sections = (0, react.useMemo)(() => {
|
|
1698
|
-
const all = getSystemNavigationBySection();
|
|
1699
|
-
return isCustomer ? filterRepOnlySections(all) : all;
|
|
1700
|
-
}, [isCustomer]);
|
|
1701
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src$1.Popover, {
|
|
1702
|
-
open,
|
|
1703
|
-
onOpenChange: setOpen,
|
|
1704
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src$1.PopoverTrigger, {
|
|
1705
|
-
asChild: true,
|
|
1706
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src$1.Button, {
|
|
1707
|
-
variant: "ghost",
|
|
1708
|
-
size: "sm",
|
|
1709
|
-
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0",
|
|
1710
|
-
"aria-label": "Quick links",
|
|
1711
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LayoutGrid, { className: "h-4 w-4" })
|
|
1712
|
-
})
|
|
1713
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src$1.PopoverContent, {
|
|
1714
|
-
align: "end",
|
|
1715
|
-
className: "w-175 max-w-[90vw] overflow-hidden rounded-lg p-0 shadow-lg",
|
|
1716
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1717
|
-
className: "flex flex-col",
|
|
1718
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1719
|
-
className: "bg-background flex items-center gap-2 border-b p-4",
|
|
1720
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LayoutGrid, { className: "text-muted-foreground h-5 w-5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
1721
|
-
className: "text-foreground text-sm font-semibold",
|
|
1722
|
-
children: "Shortcuts"
|
|
1723
|
-
})]
|
|
1724
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1725
|
-
className: "bg-muted space-y-6 p-6",
|
|
1726
|
-
children: Object.entries(sections).map(([sectionName, items]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1727
|
-
className: "space-y-3",
|
|
1728
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
1729
|
-
className: "text-foreground text-sm font-semibold",
|
|
1730
|
-
children: sectionName
|
|
1731
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1732
|
-
className: "grid grid-cols-4 gap-2",
|
|
1733
|
-
children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src$1.Button, {
|
|
1734
|
-
variant: "ghost",
|
|
1735
|
-
className: "text-sidebar-foreground hover:bg-sidebar-primary hover:text-sidebar-primary-foreground h-auto justify-start gap-2 rounded-lg px-3 py-2 text-sm",
|
|
1736
|
-
onClick: () => {
|
|
1737
|
-
if (item.slug) onNavigate(item.slug);
|
|
1738
|
-
setOpen(false);
|
|
1739
|
-
},
|
|
1740
|
-
children: [item.icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepIcon, {
|
|
1741
|
-
name: item.icon,
|
|
1742
|
-
className: "h-4 w-4 shrink-0"
|
|
1743
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1744
|
-
className: "truncate",
|
|
1745
|
-
children: item.label
|
|
1746
|
-
})]
|
|
1747
|
-
}, item.slug))
|
|
1748
|
-
})]
|
|
1749
|
-
}, sectionName))
|
|
1750
|
-
})]
|
|
1751
|
-
})
|
|
1752
|
-
})]
|
|
1753
|
-
});
|
|
1754
|
-
}
|
|
1755
|
-
//#endregion
|
|
1756
|
-
//#region src/shell/SdkMobileQuickLinksGrid.tsx
|
|
1757
|
-
function SdkMobileQuickLinksGrid({ onNavigate }) {
|
|
1758
|
-
const { data: account } = require_use_account.useAccount();
|
|
1759
|
-
const isCustomer = account?.member_type === "customer";
|
|
1760
|
-
const sections = (0, react.useMemo)(() => {
|
|
1761
|
-
const all = getSystemNavigationBySection();
|
|
1762
|
-
return isCustomer ? filterRepOnlySections(all) : all;
|
|
1763
|
-
}, [isCustomer]);
|
|
1764
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1765
|
-
className: "space-y-4",
|
|
1766
|
-
children: Object.entries(sections).map(([sectionName, items]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
|
|
1767
|
-
className: "text-muted-foreground mb-2 text-xs font-semibold uppercase",
|
|
1768
|
-
children: sectionName
|
|
1769
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1770
|
-
className: "grid grid-cols-3 gap-2",
|
|
1771
|
-
children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src$1.Button, {
|
|
1772
|
-
variant: "ghost",
|
|
1773
|
-
className: "text-sidebar-foreground hover:bg-sidebar-primary hover:text-sidebar-primary-foreground h-auto flex-col gap-1 rounded-lg p-2",
|
|
1774
|
-
onClick: () => {
|
|
1775
|
-
if (item.slug) onNavigate(item.slug);
|
|
1776
|
-
},
|
|
1777
|
-
children: [item.icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepIcon, {
|
|
1778
|
-
name: item.icon,
|
|
1779
|
-
className: "size-5"
|
|
1780
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1781
|
-
className: "text-xs",
|
|
1782
|
-
children: item.label
|
|
1783
|
-
})]
|
|
1784
|
-
}, item.slug))
|
|
1785
|
-
})] }, sectionName))
|
|
1786
|
-
});
|
|
1787
|
-
}
|
|
1788
|
-
//#endregion
|
|
1789
1655
|
//#region src/shell/SdkMobileProfileMenu.tsx
|
|
1790
1656
|
function getInitials(name) {
|
|
1791
1657
|
if (!name) return "U";
|
|
@@ -1863,10 +1729,6 @@ function SdkMobileProfileMenu({ onNavigate, onLogout }) {
|
|
|
1863
1729
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Smartphone, { className: "size-5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "App Download" })]
|
|
1864
1730
|
})
|
|
1865
1731
|
}),
|
|
1866
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1867
|
-
className: "border-border border-b py-4",
|
|
1868
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SdkMobileQuickLinksGrid, { onNavigate: handleNavigate })
|
|
1869
|
-
}),
|
|
1870
1732
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1871
1733
|
className: "space-y-4 py-4",
|
|
1872
1734
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -1914,7 +1776,6 @@ function SdkHeader({ mobileTabs, currentSlug, onNavigate, onLogout }) {
|
|
|
1914
1776
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Menu, { className: "size-5" })
|
|
1915
1777
|
}),
|
|
1916
1778
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "flex-1" }),
|
|
1917
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(QuickLinksDropdown, { onNavigate }),
|
|
1918
1779
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1919
1780
|
type: "button",
|
|
1920
1781
|
onClick: themeMode.cycleMode,
|
|
@@ -2213,17 +2074,17 @@ function AccountManageLayout({ children }) {
|
|
|
2213
2074
|
}
|
|
2214
2075
|
//#endregion
|
|
2215
2076
|
//#region src/shell/system-screen-map.ts
|
|
2216
|
-
const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-
|
|
2217
|
-
const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-
|
|
2218
|
-
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-
|
|
2219
|
-
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-
|
|
2220
|
-
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-
|
|
2221
|
-
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-
|
|
2222
|
-
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-
|
|
2223
|
-
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
2077
|
+
const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-Dex8VHSB.cjs")).then((m) => ({ default: m.ProfileScreen })));
|
|
2078
|
+
const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-Cuch7aki.cjs")).then((m) => ({ default: m.OrdersScreen })));
|
|
2079
|
+
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-t5wtDGfB.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2080
|
+
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-CrdiB4M3.cjs")).then((m) => ({ default: m.MessagingScreen })));
|
|
2081
|
+
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-CH_P8WxC.cjs")).then((m) => ({ default: m.ContactsScreen })));
|
|
2082
|
+
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-Cgro0M1d.cjs")).then((m) => ({ default: m.ShopScreen })));
|
|
2083
|
+
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-DW3BuhBs.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
|
|
2084
|
+
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-LSyiDa6q.cjs")).then((m) => ({ default: m.ShareablesScreen })));
|
|
2224
2085
|
const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-B_16cPgD.cjs")).then((m) => ({ default: m.MySiteScreen })));
|
|
2225
2086
|
const UpgradeScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./UpgradeScreen-DUvg-WZv.cjs")).then((m) => ({ default: m.UpgradeScreen })));
|
|
2226
|
-
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-
|
|
2087
|
+
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-BXnl23_d.cjs")).then((n) => n.AppDownloadScreen_exports).then((m) => ({ default: m.AppDownloadScreen })));
|
|
2227
2088
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
2228
2089
|
profile: ProfileScreen$1,
|
|
2229
2090
|
orders: OrdersScreen$1,
|
|
@@ -2253,7 +2114,16 @@ function findScreenByPrefix(slug) {
|
|
|
2253
2114
|
//#endregion
|
|
2254
2115
|
//#region src/shell/PageRouter.tsx
|
|
2255
2116
|
const ACCOUNT_SLUGS = new Set(ACCOUNT_MANAGE_SLUGS);
|
|
2256
|
-
|
|
2117
|
+
/**
|
|
2118
|
+
* Returns true if any nav slug resolves to the given system screen component.
|
|
2119
|
+
* Lets detail routes (e.g. `share/product/:id`) render when their listing
|
|
2120
|
+
* slug (`share/products`) is in the nav, since both map to the same screen.
|
|
2121
|
+
*/
|
|
2122
|
+
function isSystemScreenCoveredByNav(target, navSlugs) {
|
|
2123
|
+
for (const slug of navSlugs) if ((SYSTEM_SLUG_SCREEN_MAP[slug] ?? findScreenByPrefix(slug)) === target) return true;
|
|
2124
|
+
return false;
|
|
2125
|
+
}
|
|
2126
|
+
function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlug, restParams, navSlugs }) {
|
|
2257
2127
|
const { data: account } = require_use_account.useAccount();
|
|
2258
2128
|
const isCustomer = account?.member_type === "customer";
|
|
2259
2129
|
const screenById = (0, react.useMemo)(() => {
|
|
@@ -2291,7 +2161,8 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
|
|
|
2291
2161
|
});
|
|
2292
2162
|
}
|
|
2293
2163
|
const SystemScreen = SYSTEM_SLUG_SCREEN_MAP[baseSlug] ?? findScreenByPrefix(currentSlug);
|
|
2294
|
-
|
|
2164
|
+
const systemScreenInNav = navSlugs === void 0 || SystemScreen !== void 0 && isSystemScreenCoveredByNav(SystemScreen, navSlugs);
|
|
2165
|
+
if (SystemScreen && systemScreenInNav) {
|
|
2295
2166
|
const content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
|
|
2296
2167
|
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2297
2168
|
className: "flex h-full items-center justify-center",
|
|
@@ -2476,6 +2347,43 @@ function SdkLogoutButton({ onLogout }) {
|
|
|
2476
2347
|
}) }) });
|
|
2477
2348
|
}
|
|
2478
2349
|
//#endregion
|
|
2350
|
+
//#region src/navigation/filter-nav-items.ts
|
|
2351
|
+
/**
|
|
2352
|
+
* Filter navigation items by removing rep-only slugs.
|
|
2353
|
+
* Handles nested children: rep-only children are removed, and parents
|
|
2354
|
+
* with no remaining children are also removed.
|
|
2355
|
+
*/
|
|
2356
|
+
function filterRepOnlyNavItems(items) {
|
|
2357
|
+
const result = [];
|
|
2358
|
+
for (const item of items) {
|
|
2359
|
+
if (!item.children?.length) {
|
|
2360
|
+
if (isRepOnlySlug(item.slug)) continue;
|
|
2361
|
+
result.push(item);
|
|
2362
|
+
continue;
|
|
2363
|
+
}
|
|
2364
|
+
if (isRepOnlySlug(item.slug)) continue;
|
|
2365
|
+
const filteredChildren = filterRepOnlyNavItems(item.children);
|
|
2366
|
+
if (filteredChildren.length === 0) continue;
|
|
2367
|
+
result.push({
|
|
2368
|
+
...item,
|
|
2369
|
+
children: filteredChildren
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
return result;
|
|
2373
|
+
}
|
|
2374
|
+
/**
|
|
2375
|
+
* Filter system navigation sections by removing rep-only items.
|
|
2376
|
+
* Sections with no remaining items are dropped entirely.
|
|
2377
|
+
*/
|
|
2378
|
+
function filterRepOnlySections(sections) {
|
|
2379
|
+
const filtered = {};
|
|
2380
|
+
for (const [section, items] of Object.entries(sections)) {
|
|
2381
|
+
const allowed = items.filter((item) => !isRepOnlySlug(item.slug));
|
|
2382
|
+
if (allowed.length > 0) filtered[section] = allowed;
|
|
2383
|
+
}
|
|
2384
|
+
return filtered;
|
|
2385
|
+
}
|
|
2386
|
+
//#endregion
|
|
2479
2387
|
//#region src/shell/AppShell.tsx
|
|
2480
2388
|
const THEME_STORAGE_KEY = "portal-theme-mode";
|
|
2481
2389
|
function getInitialThemeMode() {
|
|
@@ -2566,6 +2474,10 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2566
2474
|
const filteredMobileNavItems = (0, react.useMemo)(() => isCustomer ? filterRepOnlyNavItems(mobileNavItems) : mobileNavItems, [mobileNavItems, isCustomer]);
|
|
2567
2475
|
const screens = appData?.screens;
|
|
2568
2476
|
const navSlugs = (0, react.useMemo)(() => collectNavSlugs(filteredNavItems), [filteredNavItems]);
|
|
2477
|
+
const allNavSlugs = (0, react.useMemo)(() => {
|
|
2478
|
+
const mobileSlugs = collectNavSlugs(filteredMobileNavItems);
|
|
2479
|
+
return Array.from(new Set([...navSlugs, ...mobileSlugs]));
|
|
2480
|
+
}, [navSlugs, filteredMobileNavItems]);
|
|
2569
2481
|
const [themeMode, setThemeMode] = (0, react.useState)(getInitialThemeMode);
|
|
2570
2482
|
const handleThemeModeChange = (0, react.useCallback)((mode) => {
|
|
2571
2483
|
setThemeMode(mode);
|
|
@@ -2672,7 +2584,8 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2672
2584
|
customPages,
|
|
2673
2585
|
screens,
|
|
2674
2586
|
baseSlug,
|
|
2675
|
-
restParams
|
|
2587
|
+
restParams,
|
|
2588
|
+
navSlugs: allNavSlugs
|
|
2676
2589
|
})
|
|
2677
2590
|
})]
|
|
2678
2591
|
}) }) }, activeSlug ?? "");
|
|
@@ -3824,17 +3737,17 @@ zod.z.object({
|
|
|
3824
3737
|
//#endregion
|
|
3825
3738
|
//#region src/screens/index.ts
|
|
3826
3739
|
const screenPropertySchemas = {
|
|
3827
|
-
ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-
|
|
3828
|
-
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-
|
|
3829
|
-
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-
|
|
3830
|
-
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-
|
|
3831
|
-
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-
|
|
3832
|
-
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-
|
|
3740
|
+
ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-Dex8VHSB.cjs")).then((m) => m.profileScreenPropertySchema),
|
|
3741
|
+
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-CrdiB4M3.cjs")).then((m) => m.messagingScreenPropertySchema),
|
|
3742
|
+
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-CH_P8WxC.cjs")).then((m) => m.contactsScreenPropertySchema),
|
|
3743
|
+
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-Cuch7aki.cjs")).then((m) => m.ordersScreenPropertySchema),
|
|
3744
|
+
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-t5wtDGfB.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
|
|
3745
|
+
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-DW3BuhBs.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
|
|
3833
3746
|
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-B_16cPgD.cjs")).then((m) => m.mySiteScreenPropertySchema),
|
|
3834
|
-
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
3835
|
-
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-
|
|
3747
|
+
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-LSyiDa6q.cjs")).then((m) => m.shareablesScreenPropertySchema),
|
|
3748
|
+
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-Cgro0M1d.cjs")).then((m) => m.shopScreenPropertySchema),
|
|
3836
3749
|
UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-DUvg-WZv.cjs")).then((m) => m.upgradeScreenPropertySchema),
|
|
3837
|
-
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-
|
|
3750
|
+
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-BXnl23_d.cjs")).then((n) => n.AppDownloadScreen_exports).then((m) => m.appDownloadScreenPropertySchema)
|
|
3838
3751
|
};
|
|
3839
3752
|
/**
|
|
3840
3753
|
* Core page template IDs
|
|
@@ -4085,6 +3998,70 @@ function registerCorePageTemplates() {
|
|
|
4085
3998
|
}
|
|
4086
3999
|
registerCorePageTemplates();
|
|
4087
4000
|
//#endregion
|
|
4001
|
+
//#region src/shell/QuickLinksDropdown.tsx
|
|
4002
|
+
function QuickLinksDropdown({ onNavigate }) {
|
|
4003
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
4004
|
+
const { data: account } = require_use_account.useAccount();
|
|
4005
|
+
const isCustomer = account?.member_type === "customer";
|
|
4006
|
+
const sections = (0, react.useMemo)(() => {
|
|
4007
|
+
const all = getSystemNavigationBySection();
|
|
4008
|
+
return isCustomer ? filterRepOnlySections(all) : all;
|
|
4009
|
+
}, [isCustomer]);
|
|
4010
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src$1.Popover, {
|
|
4011
|
+
open,
|
|
4012
|
+
onOpenChange: setOpen,
|
|
4013
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src$1.PopoverTrigger, {
|
|
4014
|
+
asChild: true,
|
|
4015
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src$1.Button, {
|
|
4016
|
+
variant: "ghost",
|
|
4017
|
+
size: "sm",
|
|
4018
|
+
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0",
|
|
4019
|
+
"aria-label": "Quick links",
|
|
4020
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LayoutGrid, { className: "h-4 w-4" })
|
|
4021
|
+
})
|
|
4022
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src$1.PopoverContent, {
|
|
4023
|
+
align: "end",
|
|
4024
|
+
className: "w-175 max-w-[90vw] overflow-hidden rounded-lg p-0 shadow-lg",
|
|
4025
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4026
|
+
className: "flex flex-col",
|
|
4027
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4028
|
+
className: "bg-background flex items-center gap-2 border-b p-4",
|
|
4029
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LayoutGrid, { className: "text-muted-foreground h-5 w-5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
4030
|
+
className: "text-foreground text-sm font-semibold",
|
|
4031
|
+
children: "Shortcuts"
|
|
4032
|
+
})]
|
|
4033
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4034
|
+
className: "bg-muted space-y-6 p-6",
|
|
4035
|
+
children: Object.entries(sections).map(([sectionName, items]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4036
|
+
className: "space-y-3",
|
|
4037
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
4038
|
+
className: "text-foreground text-sm font-semibold",
|
|
4039
|
+
children: sectionName
|
|
4040
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4041
|
+
className: "grid grid-cols-4 gap-2",
|
|
4042
|
+
children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src$1.Button, {
|
|
4043
|
+
variant: "ghost",
|
|
4044
|
+
className: "text-sidebar-foreground hover:bg-sidebar-primary hover:text-sidebar-primary-foreground h-auto justify-start gap-2 rounded-lg px-3 py-2 text-sm",
|
|
4045
|
+
onClick: () => {
|
|
4046
|
+
if (item.slug) onNavigate(item.slug);
|
|
4047
|
+
setOpen(false);
|
|
4048
|
+
},
|
|
4049
|
+
children: [item.icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepIcon, {
|
|
4050
|
+
name: item.icon,
|
|
4051
|
+
className: "h-4 w-4 shrink-0"
|
|
4052
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4053
|
+
className: "truncate",
|
|
4054
|
+
children: item.label
|
|
4055
|
+
})]
|
|
4056
|
+
}, item.slug))
|
|
4057
|
+
})]
|
|
4058
|
+
}, sectionName))
|
|
4059
|
+
})]
|
|
4060
|
+
})
|
|
4061
|
+
})]
|
|
4062
|
+
});
|
|
4063
|
+
}
|
|
4064
|
+
//#endregion
|
|
4088
4065
|
//#region src/shell/AppLink.tsx
|
|
4089
4066
|
/**
|
|
4090
4067
|
* SPA-aware link that renders a real `<a href>` for accessibility
|