@fluid-app/portal-sdk 0.1.83 → 0.1.84

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 (99) hide show
  1. package/dist/{AppNavigationContext-Du3Qq0yc.mjs → AppNavigationContext-BSnbFILQ.mjs} +1 -1
  2. package/dist/{AppNavigationContext-Du3Qq0yc.mjs.map → AppNavigationContext-BSnbFILQ.mjs.map} +1 -1
  3. package/dist/{AppNavigationContext-Agp0UkCQ.cjs → AppNavigationContext-DnwdUAjn.cjs} +1 -1
  4. package/dist/{AppNavigationContext-Agp0UkCQ.cjs.map → AppNavigationContext-DnwdUAjn.cjs.map} +1 -1
  5. package/dist/{ContactsScreen-FJUtn2_G.mjs → ContactsScreen-DrkHWPMm.mjs} +4 -4
  6. package/dist/{ContactsScreen-FJUtn2_G.mjs.map → ContactsScreen-DrkHWPMm.mjs.map} +1 -1
  7. package/dist/{ContactsScreen-aPH9Xaim.cjs → ContactsScreen-Du9M90zi.cjs} +5 -5
  8. package/dist/{ContactsScreen-6gXKTN61.cjs → ContactsScreen-DvmqkXOu.cjs} +4 -4
  9. package/dist/{ContactsScreen-6gXKTN61.cjs.map → ContactsScreen-DvmqkXOu.cjs.map} +1 -1
  10. package/dist/{CustomersScreen-9f10-_AZ.cjs → CustomersScreen-Bd9eK18y.cjs} +1 -1
  11. package/dist/{CustomersScreen-9f10-_AZ.cjs.map → CustomersScreen-Bd9eK18y.cjs.map} +1 -1
  12. package/dist/{CustomersScreen-xAauAB-B.mjs → CustomersScreen-DEFY3mRL.mjs} +1 -1
  13. package/dist/{CustomersScreen-xAauAB-B.mjs.map → CustomersScreen-DEFY3mRL.mjs.map} +1 -1
  14. package/dist/{MessagingScreen-CWJA4usG.cjs → MessagingScreen-BlN6KjV-.cjs} +3 -3
  15. package/dist/{MessagingScreen-DWNe8VFM.mjs → MessagingScreen-C4-8_bvB.mjs} +3 -3
  16. package/dist/{MessagingScreen-7_YhiLVY.mjs → MessagingScreen-Cg2XvQZF.mjs} +3 -3
  17. package/dist/{MessagingScreen-7_YhiLVY.mjs.map → MessagingScreen-Cg2XvQZF.mjs.map} +1 -1
  18. package/dist/{MessagingScreen-B_5Ci5s-.cjs → MessagingScreen-Lc81OXIN.cjs} +3 -3
  19. package/dist/{MessagingScreen-B_5Ci5s-.cjs.map → MessagingScreen-Lc81OXIN.cjs.map} +1 -1
  20. package/dist/{MySiteScreen-CtVL7wfc.cjs → MySiteScreen-B-I4V3Cc.cjs} +2 -2
  21. package/dist/{MySiteScreen-CtVL7wfc.cjs.map → MySiteScreen-B-I4V3Cc.cjs.map} +1 -1
  22. package/dist/{MySiteScreen-Cspeq0cy.mjs → MySiteScreen-BedF13nt.mjs} +2 -2
  23. package/dist/{MySiteScreen-Cspeq0cy.mjs.map → MySiteScreen-BedF13nt.mjs.map} +1 -1
  24. package/dist/{MySiteScreen-D5tr7TdT.cjs → MySiteScreen-DEOKI32H.cjs} +1 -1
  25. package/dist/{OrdersScreen-DiKPQvwJ.cjs → OrdersScreen-BE_E1QGL.cjs} +2 -2
  26. package/dist/{OrdersScreen-Bu82RCok.cjs → OrdersScreen-C-rU9cx6.cjs} +4 -4
  27. package/dist/{OrdersScreen-Bu82RCok.cjs.map → OrdersScreen-C-rU9cx6.cjs.map} +1 -1
  28. package/dist/{OrdersScreen-DrCPl7uv.mjs → OrdersScreen-CfAmUUN3.mjs} +4 -4
  29. package/dist/{OrdersScreen-DrCPl7uv.mjs.map → OrdersScreen-CfAmUUN3.mjs.map} +1 -1
  30. package/dist/{ProductsScreen-BHHo6Wen.mjs → ProductsScreen-CGo9KQ9L.mjs} +3 -3
  31. package/dist/{ProductsScreen-BHHo6Wen.mjs.map → ProductsScreen-CGo9KQ9L.mjs.map} +1 -1
  32. package/dist/{ProductsScreen-CoyGeILD.mjs → ProductsScreen-CgG79XW9.mjs} +5 -5
  33. package/dist/{ProductsScreen-Doc9tmAQ.cjs → ProductsScreen-Csw96ete.cjs} +3 -3
  34. package/dist/{ProductsScreen-Doc9tmAQ.cjs.map → ProductsScreen-Csw96ete.cjs.map} +1 -1
  35. package/dist/{ProductsScreen-CCNyLHqR.cjs → ProductsScreen-DUPhUJ7p.cjs} +5 -5
  36. package/dist/{ShareablesScreen-CNMWSoKY.mjs → ShareablesScreen-BK0H5fb2.mjs} +30 -9
  37. package/dist/ShareablesScreen-BK0H5fb2.mjs.map +1 -0
  38. package/dist/{ShareablesScreen-BRxLz3zn.mjs → ShareablesScreen-BmKYYRZq.mjs} +5 -5
  39. package/dist/{ShareablesScreen-Dp3BcjuA.cjs → ShareablesScreen-D0kIiW8S.cjs} +34 -7
  40. package/dist/ShareablesScreen-D0kIiW8S.cjs.map +1 -0
  41. package/dist/{ShareablesScreen-C5GJg1EP.cjs → ShareablesScreen-loETsu9v.cjs} +5 -5
  42. package/dist/{ShopScreen-CVxmqfmN.mjs → ShopScreen-B0Pr0CTu.mjs} +3 -3
  43. package/dist/{ShopScreen-CVxmqfmN.mjs.map → ShopScreen-B0Pr0CTu.mjs.map} +1 -1
  44. package/dist/{ShopScreen-CPWZhKgE.cjs → ShopScreen-CDwCW5Go.cjs} +3 -3
  45. package/dist/{ShopScreen-CPWZhKgE.cjs.map → ShopScreen-CDwCW5Go.cjs.map} +1 -1
  46. package/dist/{ShopScreen-nJhut901.cjs → ShopScreen-CaTpU5go.cjs} +1 -1
  47. package/dist/{SubscriptionsScreen-CSKVsakI.cjs → SubscriptionsScreen-CfvaEuTS.cjs} +4 -4
  48. package/dist/{SubscriptionsScreen-CSKVsakI.cjs.map → SubscriptionsScreen-CfvaEuTS.cjs.map} +1 -1
  49. package/dist/{SubscriptionsScreen-CJdcyH-e.mjs → SubscriptionsScreen-D3LAx25s.mjs} +4 -4
  50. package/dist/{SubscriptionsScreen-CJdcyH-e.mjs.map → SubscriptionsScreen-D3LAx25s.mjs.map} +1 -1
  51. package/dist/{SubscriptionsScreen-C1UWxvQk.cjs → SubscriptionsScreen-Dpn0YuDb.cjs} +3 -3
  52. package/dist/{dist-B4Ke7bHH.cjs → dist-BK4mvUPm.cjs} +2 -2
  53. package/dist/{dist-B4Ke7bHH.cjs.map → dist-BK4mvUPm.cjs.map} +1 -1
  54. package/dist/{dist-Cl4FsM3V.mjs → dist-C9vpl_rR.mjs} +2 -2
  55. package/dist/{dist-Cl4FsM3V.mjs.map → dist-C9vpl_rR.mjs.map} +1 -1
  56. package/dist/{dist-CMGXkSgZ.mjs → dist-CkIGP8my.mjs} +1 -1
  57. package/dist/{dist-CMGXkSgZ.mjs.map → dist-CkIGP8my.mjs.map} +1 -1
  58. package/dist/{dist-BbS_7TvS.cjs → dist-thaj08s5.cjs} +1 -1
  59. package/dist/{dist-BbS_7TvS.cjs.map → dist-thaj08s5.cjs.map} +1 -1
  60. package/dist/{es-1KItbbYg.mjs → es-Dlib2eNY.mjs} +1 -1
  61. package/dist/{es-1KItbbYg.mjs.map → es-Dlib2eNY.mjs.map} +1 -1
  62. package/dist/{es-BSkb3AZk.cjs → es-xQF-WIMq.cjs} +1 -1
  63. package/dist/{es-BSkb3AZk.cjs.map → es-xQF-WIMq.cjs.map} +1 -1
  64. package/dist/index.cjs +140 -45
  65. package/dist/index.cjs.map +1 -1
  66. package/dist/index.d.cts +21 -1
  67. package/dist/index.d.cts.map +1 -1
  68. package/dist/index.d.mts +21 -1
  69. package/dist/index.d.mts.map +1 -1
  70. package/dist/index.mjs +137 -44
  71. package/dist/index.mjs.map +1 -1
  72. package/dist/{order-detail-Cj68hbgK.cjs → order-detail-06VbWJjw.cjs} +1 -1
  73. package/dist/{order-detail-Cj68hbgK.cjs.map → order-detail-06VbWJjw.cjs.map} +1 -1
  74. package/dist/{order-detail-B-4hsupW.mjs → order-detail-B5X_QRpi.mjs} +1 -1
  75. package/dist/{order-detail-B-4hsupW.mjs.map → order-detail-B5X_QRpi.mjs.map} +1 -1
  76. package/dist/{products-BKZ1siXg.cjs → products-CjZof7c2.cjs} +1 -1
  77. package/dist/{products-BKZ1siXg.cjs.map → products-CjZof7c2.cjs.map} +1 -1
  78. package/dist/{products-DOO1TBcm.mjs → products-Dkwd_Bh0.mjs} +1 -1
  79. package/dist/{products-DOO1TBcm.mjs.map → products-Dkwd_Bh0.mjs.map} +1 -1
  80. package/dist/{src-nhqydD53.mjs → src-BjmyVJoe.mjs} +21 -20
  81. package/dist/src-BjmyVJoe.mjs.map +1 -0
  82. package/dist/{src-Dzexc0vw.cjs → src-Dt66UB0B.cjs} +1 -1
  83. package/dist/{src-Dzexc0vw.cjs.map → src-Dt66UB0B.cjs.map} +1 -1
  84. package/dist/{src-fXyI4AWk.cjs → src-bzRRiTN4.cjs} +21 -20
  85. package/dist/src-bzRRiTN4.cjs.map +1 -0
  86. package/dist/{src-DfVbSKm5.mjs → src-p8DA1dH0.mjs} +1 -1
  87. package/dist/{src-DfVbSKm5.mjs.map → src-p8DA1dH0.mjs.map} +1 -1
  88. package/dist/{use-customer-account-Dysq4hpT.cjs → use-customer-account-BoobPvSQ.cjs} +1 -1
  89. package/dist/{use-customer-account-Dysq4hpT.cjs.map → use-customer-account-BoobPvSQ.cjs.map} +1 -1
  90. package/dist/{use-customer-account-B0DeL6m0.mjs → use-customer-account-Dt3kO7ti.mjs} +1 -1
  91. package/dist/{use-customer-account-B0DeL6m0.mjs.map → use-customer-account-Dt3kO7ti.mjs.map} +1 -1
  92. package/package.json +9 -9
  93. package/dist/ShareablesScreen-CNMWSoKY.mjs.map +0 -1
  94. package/dist/ShareablesScreen-Dp3BcjuA.cjs.map +0 -1
  95. package/dist/src-fXyI4AWk.cjs.map +0 -1
  96. package/dist/src-nhqydD53.mjs.map +0 -1
  97. /package/dist/{ProfileScreen-BKKIMZiD.cjs → ProfileScreen-BSZLS9hY.cjs} +0 -0
  98. /package/dist/{src-BakNjVTk.mjs → src-B7j_mfeS.mjs} +0 -0
  99. /package/dist/{src-C_kOrGdZ.cjs → src-Bp-dRR29.cjs} +0 -0
package/dist/index.cjs CHANGED
@@ -39,23 +39,23 @@ const require_use_account_clients = require("./use-account-clients-62dZrh9E.cjs"
39
39
  const require_ScreenHeaderContext = require("./ScreenHeaderContext-wrJlkhgN.cjs");
40
40
  const require_use_fluid_api = require("./use-fluid-api-DwRQk00z.cjs");
41
41
  const require_use_current_user = require("./use-current-user-SFCzJt0q.cjs");
42
- const require_CustomersScreen = require("./CustomersScreen-9f10-_AZ.cjs");
43
- const require_AppNavigationContext = require("./AppNavigationContext-Agp0UkCQ.cjs");
44
- const require_MessagingScreen = require("./MessagingScreen-B_5Ci5s-.cjs");
45
- require("./order-detail-Cj68hbgK.cjs");
46
- const require_SubscriptionsScreen = require("./SubscriptionsScreen-CSKVsakI.cjs");
47
- require("./dist-BbS_7TvS.cjs");
48
- require("./es-BSkb3AZk.cjs");
49
- const require_ContactsScreen = require("./ContactsScreen-6gXKTN61.cjs");
50
- require("./src-C_kOrGdZ.cjs");
51
- require("./dist-B4Ke7bHH.cjs");
52
- const require_OrdersScreen = require("./OrdersScreen-Bu82RCok.cjs");
53
- require("./src-fXyI4AWk.cjs");
54
- const require_ShopScreen = require("./ShopScreen-CPWZhKgE.cjs");
55
- const require_ShareablesScreen = require("./ShareablesScreen-Dp3BcjuA.cjs");
42
+ const require_ShareablesScreen = require("./ShareablesScreen-D0kIiW8S.cjs");
43
+ const require_CustomersScreen = require("./CustomersScreen-Bd9eK18y.cjs");
44
+ const require_AppNavigationContext = require("./AppNavigationContext-DnwdUAjn.cjs");
45
+ const require_MessagingScreen = require("./MessagingScreen-Lc81OXIN.cjs");
46
+ require("./order-detail-06VbWJjw.cjs");
47
+ const require_SubscriptionsScreen = require("./SubscriptionsScreen-CfvaEuTS.cjs");
48
+ require("./dist-thaj08s5.cjs");
49
+ require("./es-xQF-WIMq.cjs");
50
+ const require_ContactsScreen = require("./ContactsScreen-DvmqkXOu.cjs");
51
+ require("./src-Bp-dRR29.cjs");
52
+ require("./dist-BK4mvUPm.cjs");
53
+ const require_OrdersScreen = require("./OrdersScreen-C-rU9cx6.cjs");
54
+ require("./src-bzRRiTN4.cjs");
55
+ const require_ShopScreen = require("./ShopScreen-CDwCW5Go.cjs");
56
56
  require("./dist-lO2OG0T5.cjs");
57
- const require_ProductsScreen = require("./ProductsScreen-Doc9tmAQ.cjs");
58
- const require_MySiteScreen = require("./MySiteScreen-CtVL7wfc.cjs");
57
+ const require_ProductsScreen = require("./ProductsScreen-Csw96ete.cjs");
58
+ const require_MySiteScreen = require("./MySiteScreen-B-I4V3Cc.cjs");
59
59
  require("./UpgradeScreen-C93rBNY2.cjs");
60
60
  require("./AppDownloadScreen-CaTNCtzb.cjs");
61
61
  let react = require("react");
@@ -1158,6 +1158,22 @@ const SYSTEM_NAVIGATION_SLUGS = [
1158
1158
  "shop",
1159
1159
  "upgrade"
1160
1160
  ];
1161
+ /**
1162
+ * Slugs restricted to rep (non-customer) users.
1163
+ * Customers will not see these in navigation and cannot access these routes.
1164
+ */
1165
+ const REP_ONLY_SLUGS = new Set(["messages", "my-site"]);
1166
+ /**
1167
+ * Check if a slug is restricted to rep users only.
1168
+ * Handles both exact matches and prefix matches (e.g. "contacts/123").
1169
+ */
1170
+ function isRepOnlySlug(slug) {
1171
+ if (!slug) return false;
1172
+ const normalized = slug.startsWith("/") ? slug.slice(1) : slug;
1173
+ if (REP_ONLY_SLUGS.has(normalized)) return true;
1174
+ for (const repSlug of REP_ONLY_SLUGS) if (normalized.startsWith(repSlug + "/")) return true;
1175
+ return false;
1176
+ }
1161
1177
  const SYSTEM_NAVIGATION_ITEMS = {
1162
1178
  "app-download": {
1163
1179
  slug: "app-download",
@@ -1674,6 +1690,43 @@ function SdkNavigation({ navItems, currentSlug, onNavigate }) {
1674
1690
  }) });
1675
1691
  }
1676
1692
  //#endregion
1693
+ //#region src/navigation/filter-nav-items.ts
1694
+ /**
1695
+ * Filter navigation items by removing rep-only slugs.
1696
+ * Handles nested children: rep-only children are removed, and parents
1697
+ * with no remaining children are also removed.
1698
+ */
1699
+ function filterRepOnlyNavItems(items) {
1700
+ const result = [];
1701
+ for (const item of items) {
1702
+ if (!item.children?.length) {
1703
+ if (isRepOnlySlug(item.slug)) continue;
1704
+ result.push(item);
1705
+ continue;
1706
+ }
1707
+ if (isRepOnlySlug(item.slug)) continue;
1708
+ const filteredChildren = filterRepOnlyNavItems(item.children);
1709
+ if (filteredChildren.length === 0) continue;
1710
+ result.push({
1711
+ ...item,
1712
+ children: filteredChildren
1713
+ });
1714
+ }
1715
+ return result;
1716
+ }
1717
+ /**
1718
+ * Filter system navigation sections by removing rep-only items.
1719
+ * Sections with no remaining items are dropped entirely.
1720
+ */
1721
+ function filterRepOnlySections(sections) {
1722
+ const filtered = {};
1723
+ for (const [section, items] of Object.entries(sections)) {
1724
+ const allowed = items.filter((item) => !isRepOnlySlug(item.slug));
1725
+ if (allowed.length > 0) filtered[section] = allowed;
1726
+ }
1727
+ return filtered;
1728
+ }
1729
+ //#endregion
1677
1730
  //#region src/shell/QuickLinksDropdown.tsx
1678
1731
  function QuickLinksDropdown({ onNavigate }) {
1679
1732
  const [open, setOpen] = (0, react.useState)(false);
@@ -1695,7 +1748,11 @@ function QuickLinksDropdown({ onNavigate }) {
1695
1748
  document.removeEventListener("keydown", handleKeyDown);
1696
1749
  };
1697
1750
  }, [open, close]);
1698
- const sections = getSystemNavigationBySection();
1751
+ const { isCustomer } = require_ShareablesScreen.useUserType();
1752
+ const sections = (0, react.useMemo)(() => {
1753
+ const all = getSystemNavigationBySection();
1754
+ return isCustomer ? filterRepOnlySections(all) : all;
1755
+ }, [isCustomer]);
1699
1756
  const handleItemClick = (slug) => {
1700
1757
  onNavigate(slug);
1701
1758
  close();
@@ -1752,7 +1809,11 @@ function QuickLinksDropdown({ onNavigate }) {
1752
1809
  //#endregion
1753
1810
  //#region src/shell/SdkMobileQuickLinksGrid.tsx
1754
1811
  function SdkMobileQuickLinksGrid({ onNavigate }) {
1755
- const sections = getSystemNavigationBySection();
1812
+ const { isCustomer } = require_ShareablesScreen.useUserType();
1813
+ const sections = (0, react.useMemo)(() => {
1814
+ const all = getSystemNavigationBySection();
1815
+ return isCustomer ? filterRepOnlySections(all) : all;
1816
+ }, [isCustomer]);
1756
1817
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1757
1818
  className: "space-y-4",
1758
1819
  children: Object.entries(sections).map(([sectionName, items]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
@@ -2355,6 +2416,33 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
2355
2416
  label: SYSTEM_NAVIGATION_ITEMS[slug].label,
2356
2417
  slug
2357
2418
  }));
2419
+ //#endregion
2420
+ //#region src/screens/AccessDeniedScreen.tsx
2421
+ /**
2422
+ * Shown when a customer attempts to access a rep-only page via direct URL.
2423
+ */
2424
+ function AccessDeniedScreen() {
2425
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2426
+ className: "flex min-h-[400px] items-center justify-center",
2427
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2428
+ className: "border-border max-w-sm rounded-lg border border-dashed p-8 text-center",
2429
+ children: [
2430
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
2431
+ className: "text-foreground text-xl font-semibold",
2432
+ children: "Access Denied"
2433
+ }),
2434
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2435
+ className: "text-muted-foreground mt-2",
2436
+ children: "You don't have permission to view this page."
2437
+ }),
2438
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2439
+ className: "text-muted-foreground mt-1 text-sm",
2440
+ children: "This feature is not available for your account type."
2441
+ })
2442
+ ]
2443
+ })
2444
+ });
2445
+ }
2358
2446
  /** Lookup map for O(1) preset resolution */
2359
2447
  const PRESET_MAP = new Map([
2360
2448
  {
@@ -2907,16 +2995,16 @@ function AccountManageLayout({ children }) {
2907
2995
  }
2908
2996
  //#endregion
2909
2997
  //#region src/shell/system-screen-map.ts
2910
- const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-BKKIMZiD.cjs")).then((m) => ({ default: m.ProfileScreen })));
2911
- const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-DiKPQvwJ.cjs")).then((m) => ({ default: m.OrdersScreen })));
2912
- const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-C1UWxvQk.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
2913
- const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-CWJA4usG.cjs")).then((m) => ({ default: m.MessagingScreen })));
2914
- const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-aPH9Xaim.cjs")).then((m) => ({ default: m.ContactsScreen })));
2915
- const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-nJhut901.cjs")).then((m) => ({ default: m.ShopScreen })));
2916
- const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-9f10-_AZ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
2917
- const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-CCNyLHqR.cjs")).then((m) => ({ default: m.ProductsScreen })));
2918
- const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-C5GJg1EP.cjs")).then((m) => ({ default: m.ShareablesScreen })));
2919
- const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-D5tr7TdT.cjs")).then((m) => ({ default: m.MySiteScreen })));
2998
+ const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-BSZLS9hY.cjs")).then((m) => ({ default: m.ProfileScreen })));
2999
+ const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-BE_E1QGL.cjs")).then((m) => ({ default: m.OrdersScreen })));
3000
+ const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-Dpn0YuDb.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
3001
+ const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-BlN6KjV-.cjs")).then((m) => ({ default: m.MessagingScreen })));
3002
+ const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-Du9M90zi.cjs")).then((m) => ({ default: m.ContactsScreen })));
3003
+ const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-CaTpU5go.cjs")).then((m) => ({ default: m.ShopScreen })));
3004
+ const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-Bd9eK18y.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
3005
+ const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-DUPhUJ7p.cjs")).then((m) => ({ default: m.ProductsScreen })));
3006
+ const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-loETsu9v.cjs")).then((m) => ({ default: m.ShareablesScreen })));
3007
+ const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-DEOKI32H.cjs")).then((m) => ({ default: m.MySiteScreen })));
2920
3008
  const UpgradeScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => ({ default: m.UpgradeScreen })));
2921
3009
  const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-B-JdFulZ.cjs")).then((m) => ({ default: m.AppDownloadScreen })));
2922
3010
  const SYSTEM_SLUG_SCREEN_MAP = {
@@ -2948,6 +3036,7 @@ function findScreenByPrefix(slug) {
2948
3036
  //#region src/shell/PageRouter.tsx
2949
3037
  const ACCOUNT_SLUGS = new Set(ACCOUNT_MANAGE_SLUGS);
2950
3038
  function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlug, restParams }) {
3039
+ const { isCustomer } = require_ShareablesScreen.useUserType();
2951
3040
  const screenById = (0, react.useMemo)(() => {
2952
3041
  if (!screens || screens.length === 0) return void 0;
2953
3042
  return new Map(screens.map((s) => [s.id, s]));
@@ -2969,6 +3058,7 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
2969
3058
  currentSlug,
2970
3059
  baseSlug
2971
3060
  ]);
3061
+ if (isCustomer && isRepOnlySlug(currentSlug)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccessDeniedScreen, {});
2972
3062
  const ExactCustomPage = customPages?.[currentSlug];
2973
3063
  if (ExactCustomPage) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ExactCustomPage, {
2974
3064
  slug: currentSlug,
@@ -3216,8 +3306,11 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
3216
3306
  if (mobileNav && mobileNav.length > 0) return mobileNav;
3217
3307
  return navItems;
3218
3308
  }, [appData?.profile?.mobile_navigation?.navigation_items, navItems]);
3309
+ const { isCustomer } = require_ShareablesScreen.useUserType();
3310
+ const filteredNavItems = (0, react.useMemo)(() => isCustomer ? filterRepOnlyNavItems(navItems) : navItems, [navItems, isCustomer]);
3311
+ const filteredMobileNavItems = (0, react.useMemo)(() => isCustomer ? filterRepOnlyNavItems(mobileNavItems) : mobileNavItems, [mobileNavItems, isCustomer]);
3219
3312
  const screens = appData?.screens;
3220
- const navSlugs = (0, react.useMemo)(() => collectNavSlugs(navItems), [navItems]);
3313
+ const navSlugs = (0, react.useMemo)(() => collectNavSlugs(filteredNavItems), [filteredNavItems]);
3221
3314
  const [themeMode, setThemeMode] = (0, react.useState)(getInitialThemeMode);
3222
3315
  const handleThemeModeChange = (0, react.useCallback)((mode) => {
3223
3316
  setThemeMode(mode);
@@ -3271,7 +3364,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
3271
3364
  if (controlledSlug !== void 0) return;
3272
3365
  if (typeof window === "undefined") return;
3273
3366
  if (!extractSlugFromPathname(window.location.pathname, normalizedBasePath)) {
3274
- const firstSlug = findFirstNavigableSlug(navItems);
3367
+ const firstSlug = findFirstNavigableSlug(filteredNavItems);
3275
3368
  if (firstSlug) {
3276
3369
  const targetPath = normalizedBasePath === "/" ? `/${firstSlug}` : `${normalizedBasePath}/${firstSlug}`;
3277
3370
  history.replaceState(null, "", targetPath);
@@ -3279,7 +3372,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
3279
3372
  }
3280
3373
  }
3281
3374
  }, [
3282
- navItems,
3375
+ filteredNavItems,
3283
3376
  controlledSlug,
3284
3377
  normalizedBasePath
3285
3378
  ]);
@@ -3309,8 +3402,8 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
3309
3402
  const slugMatch = (0, react.useMemo)(() => matchSlugPrefix(activeSlug, navSlugs), [activeSlug, navSlugs]);
3310
3403
  const baseSlug = slugMatch?.matchedSlug ?? normalizeSlug(activeSlug);
3311
3404
  const restParams = slugMatch?.rest ?? "";
3312
- const mobileSecondLevelTabs = findCurrentSection(mobileNavItems, baseSlug)?.children ?? [];
3313
- const currentNavItem = findNavItem(navItems, baseSlug);
3405
+ const mobileSecondLevelTabs = findCurrentSection(filteredMobileNavItems, baseSlug)?.children ?? [];
3406
+ const currentNavItem = findNavItem(filteredNavItems, baseSlug);
3314
3407
  const screenTitle = currentNavItem?.label || screens?.find((s) => s.id === currentNavItem?.screen_id)?.name || void 0;
3315
3408
  const content = typeof children === "function" ? children({
3316
3409
  currentSlug: activeSlug,
@@ -3340,7 +3433,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
3340
3433
  navigate: handleNavigate,
3341
3434
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AppShellLayout, {
3342
3435
  sidebarContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SdkNavigation, {
3343
- navItems,
3436
+ navItems: filteredNavItems,
3344
3437
  currentSlug: activeSlug,
3345
3438
  onNavigate: handleNavigate
3346
3439
  }),
@@ -3354,7 +3447,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
3354
3447
  sidebarFooter: resolvedSidebarFooter,
3355
3448
  useBottomNav: true,
3356
3449
  afterContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SdkBottomNav, {
3357
- navItems: mobileNavItems,
3450
+ navItems: filteredMobileNavItems,
3358
3451
  currentSlug: activeSlug,
3359
3452
  onNavigate: handleNavigate,
3360
3453
  appDefinitionId: appData?.definition_id ?? 0
@@ -4371,16 +4464,16 @@ function useContact(_contactId) {
4371
4464
  //#endregion
4372
4465
  //#region src/screens/index.ts
4373
4466
  const screenPropertySchemas = {
4374
- ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-BKKIMZiD.cjs")).then((m) => m.profileScreenPropertySchema),
4375
- MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-CWJA4usG.cjs")).then((m) => m.messagingScreenPropertySchema),
4376
- ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-aPH9Xaim.cjs")).then((m) => m.contactsScreenPropertySchema),
4377
- OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-DiKPQvwJ.cjs")).then((m) => m.ordersScreenPropertySchema),
4378
- SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-C1UWxvQk.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
4379
- CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-9f10-_AZ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
4380
- ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-CCNyLHqR.cjs")).then((m) => m.productsScreenPropertySchema),
4381
- MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-D5tr7TdT.cjs")).then((m) => m.mySiteScreenPropertySchema),
4382
- ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-C5GJg1EP.cjs")).then((m) => m.shareablesScreenPropertySchema),
4383
- ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-nJhut901.cjs")).then((m) => m.shopScreenPropertySchema),
4467
+ ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-BSZLS9hY.cjs")).then((m) => m.profileScreenPropertySchema),
4468
+ MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-BlN6KjV-.cjs")).then((m) => m.messagingScreenPropertySchema),
4469
+ ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-Du9M90zi.cjs")).then((m) => m.contactsScreenPropertySchema),
4470
+ OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-BE_E1QGL.cjs")).then((m) => m.ordersScreenPropertySchema),
4471
+ SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-Dpn0YuDb.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
4472
+ CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-Bd9eK18y.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
4473
+ ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-DUPhUJ7p.cjs")).then((m) => m.productsScreenPropertySchema),
4474
+ MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-DEOKI32H.cjs")).then((m) => m.mySiteScreenPropertySchema),
4475
+ ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-loETsu9v.cjs")).then((m) => m.shareablesScreenPropertySchema),
4476
+ ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-CaTpU5go.cjs")).then((m) => m.shopScreenPropertySchema),
4384
4477
  UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => m.upgradeScreenPropertySchema),
4385
4478
  AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-B-JdFulZ.cjs")).then((m) => m.appDownloadScreenPropertySchema)
4386
4479
  };
@@ -4837,6 +4930,7 @@ exports.extractAllTokensFromUrl = require_FluidProvider.extractAllTokensFromUrl;
4837
4930
  exports.extractCompanyTokenFromUrl = require_FluidProvider.extractCompanyTokenFromUrl;
4838
4931
  exports.extractSlugFromPathname = extractSlugFromPathname;
4839
4932
  exports.extractTokenFromUrl = require_FluidProvider.extractTokenFromUrl;
4933
+ exports.filterRepOnlyNavItems = filterRepOnlyNavItems;
4840
4934
  exports.gapValues = require_registries.gapValues;
4841
4935
  exports.generateShades = require_FluidProvider.generateShades;
4842
4936
  exports.generateThemeCSS = require_FluidProvider.generateThemeCSS;
@@ -4936,6 +5030,7 @@ exports.useResolvedPages = useResolvedPages;
4936
5030
  exports.useThemeContext = require_FluidProvider.useThemeContext;
4937
5031
  exports.useThemeMode = useThemeMode;
4938
5032
  exports.useTodos = useTodos;
5033
+ exports.useUserType = require_ShareablesScreen.useUserType;
4939
5034
  exports.validateNavigationPages = validateNavigationPages;
4940
5035
  exports.validateToken = require_FluidProvider.validateToken;
4941
5036
  exports.videoWidgetPropertySchema = require_VideoWidget.videoWidgetPropertySchema;