@fluid-app/portal-sdk 0.1.82 → 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.
- package/dist/{AppDownloadScreen-3DHcVSP9.cjs → AppDownloadScreen-B-JdFulZ.cjs} +3 -3
- package/dist/{AppDownloadScreen-BZ8IA_i0.mjs → AppDownloadScreen-BE6M8WxN.mjs} +2 -2
- package/dist/{AppDownloadScreen-BZ8IA_i0.mjs.map → AppDownloadScreen-BE6M8WxN.mjs.map} +1 -1
- package/dist/{AppDownloadScreen-BDnZv0Ve.cjs → AppDownloadScreen-CaTNCtzb.cjs} +2 -2
- package/dist/{AppDownloadScreen-BDnZv0Ve.cjs.map → AppDownloadScreen-CaTNCtzb.cjs.map} +1 -1
- package/dist/{AppNavigationContext-Du3Qq0yc.mjs → AppNavigationContext-BSnbFILQ.mjs} +1 -1
- package/dist/{AppNavigationContext-Du3Qq0yc.mjs.map → AppNavigationContext-BSnbFILQ.mjs.map} +1 -1
- package/dist/{AppNavigationContext-Agp0UkCQ.cjs → AppNavigationContext-DnwdUAjn.cjs} +1 -1
- package/dist/{AppNavigationContext-Agp0UkCQ.cjs.map → AppNavigationContext-DnwdUAjn.cjs.map} +1 -1
- package/dist/{ContactsScreen-w2w-l_0b.mjs → ContactsScreen-DrkHWPMm.mjs} +5 -5
- package/dist/{ContactsScreen-w2w-l_0b.mjs.map → ContactsScreen-DrkHWPMm.mjs.map} +1 -1
- package/dist/{ContactsScreen-Cphil7Lf.cjs → ContactsScreen-Du9M90zi.cjs} +7 -7
- package/dist/{ContactsScreen-BF2txIn2.cjs → ContactsScreen-DvmqkXOu.cjs} +5 -5
- package/dist/{ContactsScreen-BF2txIn2.cjs.map → ContactsScreen-DvmqkXOu.cjs.map} +1 -1
- package/dist/{CustomersScreen-9f10-_AZ.cjs → CustomersScreen-Bd9eK18y.cjs} +1 -1
- package/dist/{CustomersScreen-9f10-_AZ.cjs.map → CustomersScreen-Bd9eK18y.cjs.map} +1 -1
- package/dist/{CustomersScreen-xAauAB-B.mjs → CustomersScreen-DEFY3mRL.mjs} +1 -1
- package/dist/{CustomersScreen-xAauAB-B.mjs.map → CustomersScreen-DEFY3mRL.mjs.map} +1 -1
- package/dist/{FluidProvider-BeQDNd2R.cjs → FluidProvider-BSBLJp15.cjs} +3 -3
- package/dist/{FluidProvider-BeQDNd2R.cjs.map → FluidProvider-BSBLJp15.cjs.map} +1 -1
- package/dist/{FluidProvider-aDOk1vw3.mjs → FluidProvider-CwkMUOoy.mjs} +3 -3
- package/dist/{FluidProvider-aDOk1vw3.mjs.map → FluidProvider-CwkMUOoy.mjs.map} +1 -1
- package/dist/{MessagingScreen-yHZm0vFM.cjs → MessagingScreen-BlN6KjV-.cjs} +5 -5
- package/dist/{MessagingScreen-CnBpPXBm.mjs → MessagingScreen-C4-8_bvB.mjs} +5 -5
- package/dist/{MessagingScreen-B3_sZuUW.mjs → MessagingScreen-Cg2XvQZF.mjs} +5 -5
- package/dist/{MessagingScreen-B3_sZuUW.mjs.map → MessagingScreen-Cg2XvQZF.mjs.map} +1 -1
- package/dist/{MessagingScreen-DzwIbgUU.cjs → MessagingScreen-Lc81OXIN.cjs} +5 -5
- package/dist/{MessagingScreen-DzwIbgUU.cjs.map → MessagingScreen-Lc81OXIN.cjs.map} +1 -1
- package/dist/{MySiteScreen-DkHGVOlx.cjs → MySiteScreen-B-I4V3Cc.cjs} +3 -3
- package/dist/{MySiteScreen-DkHGVOlx.cjs.map → MySiteScreen-B-I4V3Cc.cjs.map} +1 -1
- package/dist/{MySiteScreen-DJ-rkDlD.mjs → MySiteScreen-BedF13nt.mjs} +3 -3
- package/dist/{MySiteScreen-DJ-rkDlD.mjs.map → MySiteScreen-BedF13nt.mjs.map} +1 -1
- package/dist/{MySiteScreen-BwdayTZT.cjs → MySiteScreen-DEOKI32H.cjs} +3 -3
- package/dist/{OrdersScreen-DipdGDcy.cjs → OrdersScreen-BE_E1QGL.cjs} +4 -4
- package/dist/{OrdersScreen-C_fTfG0m.cjs → OrdersScreen-C-rU9cx6.cjs} +5 -5
- package/dist/{OrdersScreen-C_fTfG0m.cjs.map → OrdersScreen-C-rU9cx6.cjs.map} +1 -1
- package/dist/{OrdersScreen-C0dg1NEJ.mjs → OrdersScreen-CfAmUUN3.mjs} +5 -5
- package/dist/{OrdersScreen-C0dg1NEJ.mjs.map → OrdersScreen-CfAmUUN3.mjs.map} +1 -1
- package/dist/{PointsWidget-Cc88UHqD.mjs → PointsWidget-CYesuDDG.mjs} +3 -3
- package/dist/PointsWidget-CYesuDDG.mjs.map +1 -0
- package/dist/{PointsWidget-DISBtuAm.cjs → PointsWidget-D8U2k-_A.cjs} +3 -3
- package/dist/PointsWidget-D8U2k-_A.cjs.map +1 -0
- package/dist/{ProductsScreen-B2_8nFMd.mjs → ProductsScreen-CGo9KQ9L.mjs} +5 -5
- package/dist/{ProductsScreen-B2_8nFMd.mjs.map → ProductsScreen-CGo9KQ9L.mjs.map} +1 -1
- package/dist/{ProductsScreen-BjCjYPiq.mjs → ProductsScreen-CgG79XW9.mjs} +7 -7
- package/dist/{ProductsScreen-D7ag_21-.cjs → ProductsScreen-Csw96ete.cjs} +5 -5
- package/dist/{ProductsScreen-D7ag_21-.cjs.map → ProductsScreen-Csw96ete.cjs.map} +1 -1
- package/dist/{ProductsScreen-DHgkH0rd.cjs → ProductsScreen-DUPhUJ7p.cjs} +7 -7
- package/dist/{ProfileScreen-DhS4QlAJ.cjs → ProfileScreen-BSZLS9hY.cjs} +3 -3
- package/dist/{ProfileScreen-DHZDYTid.mjs → ProfileScreen-C4g7ZGPo.mjs} +3 -3
- package/dist/{ProfileScreen-DHZDYTid.mjs.map → ProfileScreen-C4g7ZGPo.mjs.map} +1 -1
- package/dist/{ProfileScreen-B8XYP1GA.cjs → ProfileScreen-CANmoFsP.cjs} +3 -3
- package/dist/{ProfileScreen-B8XYP1GA.cjs.map → ProfileScreen-CANmoFsP.cjs.map} +1 -1
- package/dist/{ShareablesScreen-DBSG5bbX.mjs → ShareablesScreen-BK0H5fb2.mjs} +31 -10
- package/dist/ShareablesScreen-BK0H5fb2.mjs.map +1 -0
- package/dist/{ShareablesScreen-3a7V8ZEB.mjs → ShareablesScreen-BmKYYRZq.mjs} +7 -7
- package/dist/{ShareablesScreen-DDcnZnRA.cjs → ShareablesScreen-D0kIiW8S.cjs} +36 -9
- package/dist/ShareablesScreen-D0kIiW8S.cjs.map +1 -0
- package/dist/{ShareablesScreen-BtZfpC1v.cjs → ShareablesScreen-loETsu9v.cjs} +7 -7
- package/dist/{ShopScreen-5DkzkCmK.mjs → ShopScreen-B0Pr0CTu.mjs} +6 -6
- package/dist/{ShopScreen-5DkzkCmK.mjs.map → ShopScreen-B0Pr0CTu.mjs.map} +1 -1
- package/dist/{ShopScreen-BiFPqcSn.cjs → ShopScreen-CDwCW5Go.cjs} +6 -6
- package/dist/{ShopScreen-BiFPqcSn.cjs.map → ShopScreen-CDwCW5Go.cjs.map} +1 -1
- package/dist/{ShopScreen-CK5hcRSz.cjs → ShopScreen-CaTpU5go.cjs} +3 -3
- package/dist/{SubscriptionsScreen-BM4Tk_vo.cjs → SubscriptionsScreen-CfvaEuTS.cjs} +5 -5
- package/dist/{SubscriptionsScreen-BM4Tk_vo.cjs.map → SubscriptionsScreen-CfvaEuTS.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-CRJjvX47.mjs → SubscriptionsScreen-D3LAx25s.mjs} +5 -5
- package/dist/{SubscriptionsScreen-CRJjvX47.mjs.map → SubscriptionsScreen-D3LAx25s.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-iSqfV2RZ.cjs → SubscriptionsScreen-Dpn0YuDb.cjs} +5 -5
- package/dist/{dist-B4Ke7bHH.cjs → dist-BK4mvUPm.cjs} +2 -2
- package/dist/{dist-B4Ke7bHH.cjs.map → dist-BK4mvUPm.cjs.map} +1 -1
- package/dist/{dist-Cl4FsM3V.mjs → dist-C9vpl_rR.mjs} +2 -2
- package/dist/{dist-Cl4FsM3V.mjs.map → dist-C9vpl_rR.mjs.map} +1 -1
- package/dist/{dist-CMGXkSgZ.mjs → dist-CkIGP8my.mjs} +1 -1
- package/dist/{dist-CMGXkSgZ.mjs.map → dist-CkIGP8my.mjs.map} +1 -1
- package/dist/{dist-BbS_7TvS.cjs → dist-thaj08s5.cjs} +1 -1
- package/dist/{dist-BbS_7TvS.cjs.map → dist-thaj08s5.cjs.map} +1 -1
- package/dist/{es-1KItbbYg.mjs → es-Dlib2eNY.mjs} +1 -1
- package/dist/{es-1KItbbYg.mjs.map → es-Dlib2eNY.mjs.map} +1 -1
- package/dist/{es-BSkb3AZk.cjs → es-xQF-WIMq.cjs} +1 -1
- package/dist/{es-BSkb3AZk.cjs.map → es-xQF-WIMq.cjs.map} +1 -1
- package/dist/index.cjs +425 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +23 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +424 -57
- package/dist/index.mjs.map +1 -1
- package/dist/{order-detail-Cj68hbgK.cjs → order-detail-06VbWJjw.cjs} +1 -1
- package/dist/{order-detail-Cj68hbgK.cjs.map → order-detail-06VbWJjw.cjs.map} +1 -1
- package/dist/{order-detail-B-4hsupW.mjs → order-detail-B5X_QRpi.mjs} +1 -1
- package/dist/{order-detail-B-4hsupW.mjs.map → order-detail-B5X_QRpi.mjs.map} +1 -1
- package/dist/{products-BKZ1siXg.cjs → products-CjZof7c2.cjs} +1 -1
- package/dist/{products-BKZ1siXg.cjs.map → products-CjZof7c2.cjs.map} +1 -1
- package/dist/{products-DOO1TBcm.mjs → products-Dkwd_Bh0.mjs} +1 -1
- package/dist/{products-DOO1TBcm.mjs.map → products-Dkwd_Bh0.mjs.map} +1 -1
- package/dist/{src-nhqydD53.mjs → src-BjmyVJoe.mjs} +21 -20
- package/dist/src-BjmyVJoe.mjs.map +1 -0
- package/dist/{src-Dzexc0vw.cjs → src-Dt66UB0B.cjs} +1 -1
- package/dist/{src-Dzexc0vw.cjs.map → src-Dt66UB0B.cjs.map} +1 -1
- package/dist/{src-fXyI4AWk.cjs → src-bzRRiTN4.cjs} +21 -20
- package/dist/src-bzRRiTN4.cjs.map +1 -0
- package/dist/{src-DfVbSKm5.mjs → src-p8DA1dH0.mjs} +1 -1
- package/dist/{src-DfVbSKm5.mjs.map → src-p8DA1dH0.mjs.map} +1 -1
- package/dist/{use-account-clients-DJVDMbzf.cjs → use-account-clients-62dZrh9E.cjs} +2 -2
- package/dist/{use-account-clients-DJVDMbzf.cjs.map → use-account-clients-62dZrh9E.cjs.map} +1 -1
- package/dist/{use-account-clients-D3YbXh9Y.mjs → use-account-clients-Cf_6sxeC.mjs} +2 -2
- package/dist/{use-account-clients-D3YbXh9Y.mjs.map → use-account-clients-Cf_6sxeC.mjs.map} +1 -1
- package/dist/{use-current-user-DIkhY-Or.mjs → use-current-user-Bl9nPNFt.mjs} +3 -3
- package/dist/{use-current-user-DIkhY-Or.mjs.map → use-current-user-Bl9nPNFt.mjs.map} +1 -1
- package/dist/{use-current-user-B_BV-XL3.cjs → use-current-user-SFCzJt0q.cjs} +3 -3
- package/dist/{use-current-user-B_BV-XL3.cjs.map → use-current-user-SFCzJt0q.cjs.map} +1 -1
- package/dist/{use-customer-account-D3WQH1de.cjs → use-customer-account-BoobPvSQ.cjs} +3 -3
- package/dist/{use-customer-account-D3WQH1de.cjs.map → use-customer-account-BoobPvSQ.cjs.map} +1 -1
- package/dist/{use-customer-account-Bh4RXGq-.mjs → use-customer-account-Dt3kO7ti.mjs} +3 -3
- package/dist/{use-customer-account-Bh4RXGq-.mjs.map → use-customer-account-Dt3kO7ti.mjs.map} +1 -1
- package/dist/{use-fluid-api-DDS0EZdY.mjs → use-fluid-api-DPhr-9Jv.mjs} +2 -2
- package/dist/{use-fluid-api-DDS0EZdY.mjs.map → use-fluid-api-DPhr-9Jv.mjs.map} +1 -1
- package/dist/{use-fluid-api-BL1IJowk.cjs → use-fluid-api-DwRQk00z.cjs} +2 -2
- package/dist/{use-fluid-api-BL1IJowk.cjs.map → use-fluid-api-DwRQk00z.cjs.map} +1 -1
- package/package.json +17 -17
- package/dist/PointsWidget-Cc88UHqD.mjs.map +0 -1
- package/dist/PointsWidget-DISBtuAm.cjs.map +0 -1
- package/dist/ShareablesScreen-DBSG5bbX.mjs.map +0 -1
- package/dist/ShareablesScreen-DDcnZnRA.cjs.map +0 -1
- package/dist/src-fXyI4AWk.cjs.map +0 -1
- package/dist/src-nhqydD53.mjs.map +0 -1
- /package/dist/{src-BakNjVTk.mjs → src-B7j_mfeS.mjs} +0 -0
- /package/dist/{src-C_kOrGdZ.cjs → src-Bp-dRR29.cjs} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-9hOWP6kD.cjs");
|
|
3
|
-
const require_FluidProvider = require("./FluidProvider-
|
|
4
|
-
const require_ProfileScreen = require("./ProfileScreen-
|
|
5
|
-
const require_PointsWidget = require("./PointsWidget-
|
|
3
|
+
const require_FluidProvider = require("./FluidProvider-BSBLJp15.cjs");
|
|
4
|
+
const require_ProfileScreen = require("./ProfileScreen-CANmoFsP.cjs");
|
|
5
|
+
const require_PointsWidget = require("./PointsWidget-D8U2k-_A.cjs");
|
|
6
6
|
require("./error-state-BDBF2JrB.cjs");
|
|
7
7
|
const require_ScreenRenderer = require("./ScreenRenderer-D65AsKjr.cjs");
|
|
8
8
|
require("./WidgetInteractionContext-GLPlhAfT.cjs");
|
|
@@ -35,29 +35,29 @@ const require_SpacerWidget = require("./SpacerWidget-BDsHZD_8.cjs");
|
|
|
35
35
|
const require_TableWidget = require("./TableWidget-Duw_7iyh.cjs");
|
|
36
36
|
const require_ToDoWidget = require("./ToDoWidget-eGB9cfou.cjs");
|
|
37
37
|
const require_VideoWidget = require("./VideoWidget-CNHJrY7I.cjs");
|
|
38
|
-
const require_use_account_clients = require("./use-account-clients-
|
|
38
|
+
const require_use_account_clients = require("./use-account-clients-62dZrh9E.cjs");
|
|
39
39
|
const require_ScreenHeaderContext = require("./ScreenHeaderContext-wrJlkhgN.cjs");
|
|
40
|
-
const require_use_fluid_api = require("./use-fluid-api-
|
|
41
|
-
const require_use_current_user = require("./use-current-user-
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
require("./
|
|
46
|
-
|
|
47
|
-
require("./
|
|
48
|
-
require("./
|
|
49
|
-
|
|
50
|
-
require("./
|
|
51
|
-
require("./
|
|
52
|
-
|
|
53
|
-
require("./
|
|
54
|
-
|
|
55
|
-
const
|
|
40
|
+
const require_use_fluid_api = require("./use-fluid-api-DwRQk00z.cjs");
|
|
41
|
+
const require_use_current_user = require("./use-current-user-SFCzJt0q.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-
|
|
58
|
-
const require_MySiteScreen = require("./MySiteScreen-
|
|
57
|
+
const require_ProductsScreen = require("./ProductsScreen-Csw96ete.cjs");
|
|
58
|
+
const require_MySiteScreen = require("./MySiteScreen-B-I4V3Cc.cjs");
|
|
59
59
|
require("./UpgradeScreen-C93rBNY2.cjs");
|
|
60
|
-
require("./AppDownloadScreen-
|
|
60
|
+
require("./AppDownloadScreen-CaTNCtzb.cjs");
|
|
61
61
|
let react = require("react");
|
|
62
62
|
react = require_chunk.__toESM(react);
|
|
63
63
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
@@ -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
|
|
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
|
|
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", {
|
|
@@ -2356,6 +2417,307 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2356
2417
|
slug
|
|
2357
2418
|
}));
|
|
2358
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
|
+
}
|
|
2446
|
+
/** Lookup map for O(1) preset resolution */
|
|
2447
|
+
const PRESET_MAP = new Map([
|
|
2448
|
+
{
|
|
2449
|
+
id: "rep-most-shared",
|
|
2450
|
+
name: "Most Shared",
|
|
2451
|
+
description: "Most shared content",
|
|
2452
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_shared?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2453
|
+
resultPath: "resources",
|
|
2454
|
+
compatibleWidgets: [
|
|
2455
|
+
"CarouselWidget",
|
|
2456
|
+
"ListWidget",
|
|
2457
|
+
"NestedWidget",
|
|
2458
|
+
"TableWidget"
|
|
2459
|
+
],
|
|
2460
|
+
menuField: {
|
|
2461
|
+
key: "shareable_type",
|
|
2462
|
+
label: "Content Type",
|
|
2463
|
+
type: "select",
|
|
2464
|
+
options: [
|
|
2465
|
+
{
|
|
2466
|
+
label: "Products",
|
|
2467
|
+
value: "products"
|
|
2468
|
+
},
|
|
2469
|
+
{
|
|
2470
|
+
label: "Media",
|
|
2471
|
+
value: "media"
|
|
2472
|
+
},
|
|
2473
|
+
{
|
|
2474
|
+
label: "Pages",
|
|
2475
|
+
value: "pages"
|
|
2476
|
+
},
|
|
2477
|
+
{
|
|
2478
|
+
label: "Libraries",
|
|
2479
|
+
value: "libraries"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
label: "Enrollment Packs",
|
|
2483
|
+
value: "enrollment_packs"
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
label: "Promotions",
|
|
2487
|
+
value: "promotions"
|
|
2488
|
+
}
|
|
2489
|
+
],
|
|
2490
|
+
defaultValue: "products"
|
|
2491
|
+
},
|
|
2492
|
+
configFields: [{
|
|
2493
|
+
key: "limit",
|
|
2494
|
+
label: "Limit",
|
|
2495
|
+
type: "number",
|
|
2496
|
+
defaultValue: 10,
|
|
2497
|
+
min: 1,
|
|
2498
|
+
max: 20,
|
|
2499
|
+
description: "Maximum number of items to show"
|
|
2500
|
+
}, {
|
|
2501
|
+
key: "period",
|
|
2502
|
+
label: "Time Range",
|
|
2503
|
+
type: "select",
|
|
2504
|
+
options: [
|
|
2505
|
+
{
|
|
2506
|
+
label: "7 days",
|
|
2507
|
+
value: "7d"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
label: "30 days",
|
|
2511
|
+
value: "30d"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
label: "90 days",
|
|
2515
|
+
value: "90d"
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
label: "1 year",
|
|
2519
|
+
value: "1y"
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
label: "All time",
|
|
2523
|
+
value: "all"
|
|
2524
|
+
}
|
|
2525
|
+
],
|
|
2526
|
+
defaultValue: "all"
|
|
2527
|
+
}]
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
id: "rep-most-viewed",
|
|
2531
|
+
name: "Most Viewed",
|
|
2532
|
+
description: "Most viewed content",
|
|
2533
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_viewed?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2534
|
+
resultPath: "resources",
|
|
2535
|
+
compatibleWidgets: [
|
|
2536
|
+
"CarouselWidget",
|
|
2537
|
+
"ListWidget",
|
|
2538
|
+
"NestedWidget",
|
|
2539
|
+
"TableWidget"
|
|
2540
|
+
],
|
|
2541
|
+
menuField: {
|
|
2542
|
+
key: "shareable_type",
|
|
2543
|
+
label: "Content Type",
|
|
2544
|
+
type: "select",
|
|
2545
|
+
options: [
|
|
2546
|
+
{
|
|
2547
|
+
label: "Products",
|
|
2548
|
+
value: "products"
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
label: "Media",
|
|
2552
|
+
value: "media"
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
label: "Pages",
|
|
2556
|
+
value: "pages"
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
label: "Libraries",
|
|
2560
|
+
value: "libraries"
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
label: "Enrollment Packs",
|
|
2564
|
+
value: "enrollment_packs"
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
label: "Promotions",
|
|
2568
|
+
value: "promotions"
|
|
2569
|
+
}
|
|
2570
|
+
],
|
|
2571
|
+
defaultValue: "products"
|
|
2572
|
+
},
|
|
2573
|
+
configFields: [{
|
|
2574
|
+
key: "limit",
|
|
2575
|
+
label: "Limit",
|
|
2576
|
+
type: "number",
|
|
2577
|
+
defaultValue: 10,
|
|
2578
|
+
min: 1,
|
|
2579
|
+
max: 20,
|
|
2580
|
+
description: "Maximum number of items to show"
|
|
2581
|
+
}, {
|
|
2582
|
+
key: "period",
|
|
2583
|
+
label: "Time Range",
|
|
2584
|
+
type: "select",
|
|
2585
|
+
options: [
|
|
2586
|
+
{
|
|
2587
|
+
label: "7 days",
|
|
2588
|
+
value: "7d"
|
|
2589
|
+
},
|
|
2590
|
+
{
|
|
2591
|
+
label: "30 days",
|
|
2592
|
+
value: "30d"
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
label: "90 days",
|
|
2596
|
+
value: "90d"
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
label: "1 year",
|
|
2600
|
+
value: "1y"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
label: "All time",
|
|
2604
|
+
value: "all"
|
|
2605
|
+
}
|
|
2606
|
+
],
|
|
2607
|
+
defaultValue: "all"
|
|
2608
|
+
}]
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
id: "customer-orders",
|
|
2612
|
+
name: "Orders",
|
|
2613
|
+
description: "Customer order history",
|
|
2614
|
+
endpoint: "/v202506/orders?customer_id={customer_id}&page[limit]={limit}&status={status}",
|
|
2615
|
+
resultPath: "orders",
|
|
2616
|
+
transform: "toOrderTableProps",
|
|
2617
|
+
compatibleWidgets: ["TableWidget"],
|
|
2618
|
+
configFields: [{
|
|
2619
|
+
key: "limit",
|
|
2620
|
+
label: "Limit",
|
|
2621
|
+
type: "number",
|
|
2622
|
+
defaultValue: 10,
|
|
2623
|
+
min: 1,
|
|
2624
|
+
max: 50,
|
|
2625
|
+
description: "Maximum number of orders to show"
|
|
2626
|
+
}, {
|
|
2627
|
+
key: "status",
|
|
2628
|
+
label: "Status",
|
|
2629
|
+
type: "select",
|
|
2630
|
+
options: [
|
|
2631
|
+
{
|
|
2632
|
+
label: "All",
|
|
2633
|
+
value: "all"
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
label: "Paid",
|
|
2637
|
+
value: "paid"
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
label: "Unpaid",
|
|
2641
|
+
value: "unpaid"
|
|
2642
|
+
},
|
|
2643
|
+
{
|
|
2644
|
+
label: "Refunded",
|
|
2645
|
+
value: "refunded"
|
|
2646
|
+
}
|
|
2647
|
+
],
|
|
2648
|
+
defaultValue: "all"
|
|
2649
|
+
}]
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
id: "customer-subscriptions",
|
|
2653
|
+
name: "Subscriptions",
|
|
2654
|
+
description: "Customer subscriptions",
|
|
2655
|
+
endpoint: "/subscriptions?customer_id={customer_id}&per_page={limit}&status={status}",
|
|
2656
|
+
resultPath: "subscriptions",
|
|
2657
|
+
transform: "toSubscriptionTableProps",
|
|
2658
|
+
compatibleWidgets: ["TableWidget"],
|
|
2659
|
+
configFields: [{
|
|
2660
|
+
key: "limit",
|
|
2661
|
+
label: "Limit",
|
|
2662
|
+
type: "number",
|
|
2663
|
+
defaultValue: 10,
|
|
2664
|
+
min: 1,
|
|
2665
|
+
max: 50,
|
|
2666
|
+
description: "Maximum number of subscriptions to show"
|
|
2667
|
+
}, {
|
|
2668
|
+
key: "status",
|
|
2669
|
+
label: "Status",
|
|
2670
|
+
type: "select",
|
|
2671
|
+
options: [
|
|
2672
|
+
{
|
|
2673
|
+
label: "All",
|
|
2674
|
+
value: "all"
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
label: "Active",
|
|
2678
|
+
value: "active"
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
label: "Paused",
|
|
2682
|
+
value: "paused"
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
label: "Cancelled",
|
|
2686
|
+
value: "cancelled"
|
|
2687
|
+
}
|
|
2688
|
+
],
|
|
2689
|
+
defaultValue: "all"
|
|
2690
|
+
}]
|
|
2691
|
+
}
|
|
2692
|
+
].map((p) => [p.id, p]));
|
|
2693
|
+
/**
|
|
2694
|
+
* Resolves a preset by ID, returning the current preset definition.
|
|
2695
|
+
* Returns undefined if the preset ID is not recognized.
|
|
2696
|
+
*/
|
|
2697
|
+
function resolvePreset(presetId) {
|
|
2698
|
+
return PRESET_MAP.get(presetId);
|
|
2699
|
+
}
|
|
2700
|
+
/**
|
|
2701
|
+
* If the source is an API source with a presetId, returns a copy with
|
|
2702
|
+
* endpoint, resultPath, and transform resolved from the current preset.
|
|
2703
|
+
* Falls back to stored values if the preset is unknown.
|
|
2704
|
+
* Non-API sources are returned as-is.
|
|
2705
|
+
*/
|
|
2706
|
+
function resolveSource(source) {
|
|
2707
|
+
if (source.type !== "api" || !source.presetId) return source;
|
|
2708
|
+
const preset = resolvePreset(source.presetId);
|
|
2709
|
+
if (!preset) {
|
|
2710
|
+
console.warn(`[DataSource] Unknown preset "${source.presetId}", falling back to stored values`);
|
|
2711
|
+
return source;
|
|
2712
|
+
}
|
|
2713
|
+
return {
|
|
2714
|
+
...source,
|
|
2715
|
+
endpoint: preset.endpoint,
|
|
2716
|
+
resultPath: preset.resultPath,
|
|
2717
|
+
transform: preset.transform ?? source.transform
|
|
2718
|
+
};
|
|
2719
|
+
}
|
|
2720
|
+
//#endregion
|
|
2359
2721
|
//#region ../react/src/data-sources/use-widget-data.ts
|
|
2360
2722
|
/**
|
|
2361
2723
|
* Generates a cache key for the raw data fetch (endpoint/items identity only).
|
|
@@ -2365,7 +2727,7 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2365
2727
|
function getSourceKey(source) {
|
|
2366
2728
|
if (source.type === "api") {
|
|
2367
2729
|
const varsKey = source.variables ? `:${JSON.stringify(source.variables)}` : "";
|
|
2368
|
-
return `${source.endpoint}${varsKey}`;
|
|
2730
|
+
return `${source.presetId ?? source.endpoint}${varsKey}`;
|
|
2369
2731
|
}
|
|
2370
2732
|
if (source.type === "custom") return `custom:${(source.selectedItems?.map((item) => {
|
|
2371
2733
|
return `${item.shareableType}:${item.id}`;
|
|
@@ -2415,7 +2777,7 @@ function useWidgetData(widget, options) {
|
|
|
2415
2777
|
const baseUrl = options?.baseUrl ?? config.baseUrl;
|
|
2416
2778
|
const getApiHeaders = config.getApiHeaders;
|
|
2417
2779
|
const variables = config.variables;
|
|
2418
|
-
const sources = widget.dataSource?.sources ?? [];
|
|
2780
|
+
const sources = (0, react.useMemo)(() => (widget.dataSource?.sources ?? []).map(resolveSource), [widget.dataSource?.sources]);
|
|
2419
2781
|
const errorConfig = widget.dataSource?.error;
|
|
2420
2782
|
const widgetId = widget.id ?? "unknown";
|
|
2421
2783
|
const widgetType = widget.type;
|
|
@@ -2633,18 +2995,18 @@ function AccountManageLayout({ children }) {
|
|
|
2633
2995
|
}
|
|
2634
2996
|
//#endregion
|
|
2635
2997
|
//#region src/shell/system-screen-map.ts
|
|
2636
|
-
const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-
|
|
2637
|
-
const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-
|
|
2638
|
-
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-
|
|
2639
|
-
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-
|
|
2640
|
-
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-
|
|
2641
|
-
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-
|
|
2642
|
-
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-
|
|
2643
|
-
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-
|
|
2644
|
-
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
2645
|
-
const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./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 })));
|
|
2646
3008
|
const UpgradeScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => ({ default: m.UpgradeScreen })));
|
|
2647
|
-
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-
|
|
3009
|
+
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-B-JdFulZ.cjs")).then((m) => ({ default: m.AppDownloadScreen })));
|
|
2648
3010
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
2649
3011
|
profile: ProfileScreen$1,
|
|
2650
3012
|
orders: OrdersScreen$1,
|
|
@@ -2674,6 +3036,7 @@ function findScreenByPrefix(slug) {
|
|
|
2674
3036
|
//#region src/shell/PageRouter.tsx
|
|
2675
3037
|
const ACCOUNT_SLUGS = new Set(ACCOUNT_MANAGE_SLUGS);
|
|
2676
3038
|
function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlug, restParams }) {
|
|
3039
|
+
const { isCustomer } = require_ShareablesScreen.useUserType();
|
|
2677
3040
|
const screenById = (0, react.useMemo)(() => {
|
|
2678
3041
|
if (!screens || screens.length === 0) return void 0;
|
|
2679
3042
|
return new Map(screens.map((s) => [s.id, s]));
|
|
@@ -2695,6 +3058,7 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
|
|
|
2695
3058
|
currentSlug,
|
|
2696
3059
|
baseSlug
|
|
2697
3060
|
]);
|
|
3061
|
+
if (isCustomer && isRepOnlySlug(currentSlug)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccessDeniedScreen, {});
|
|
2698
3062
|
const ExactCustomPage = customPages?.[currentSlug];
|
|
2699
3063
|
if (ExactCustomPage) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ExactCustomPage, {
|
|
2700
3064
|
slug: currentSlug,
|
|
@@ -2942,8 +3306,11 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2942
3306
|
if (mobileNav && mobileNav.length > 0) return mobileNav;
|
|
2943
3307
|
return navItems;
|
|
2944
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]);
|
|
2945
3312
|
const screens = appData?.screens;
|
|
2946
|
-
const navSlugs = (0, react.useMemo)(() => collectNavSlugs(
|
|
3313
|
+
const navSlugs = (0, react.useMemo)(() => collectNavSlugs(filteredNavItems), [filteredNavItems]);
|
|
2947
3314
|
const [themeMode, setThemeMode] = (0, react.useState)(getInitialThemeMode);
|
|
2948
3315
|
const handleThemeModeChange = (0, react.useCallback)((mode) => {
|
|
2949
3316
|
setThemeMode(mode);
|
|
@@ -2997,7 +3364,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2997
3364
|
if (controlledSlug !== void 0) return;
|
|
2998
3365
|
if (typeof window === "undefined") return;
|
|
2999
3366
|
if (!extractSlugFromPathname(window.location.pathname, normalizedBasePath)) {
|
|
3000
|
-
const firstSlug = findFirstNavigableSlug(
|
|
3367
|
+
const firstSlug = findFirstNavigableSlug(filteredNavItems);
|
|
3001
3368
|
if (firstSlug) {
|
|
3002
3369
|
const targetPath = normalizedBasePath === "/" ? `/${firstSlug}` : `${normalizedBasePath}/${firstSlug}`;
|
|
3003
3370
|
history.replaceState(null, "", targetPath);
|
|
@@ -3005,7 +3372,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3005
3372
|
}
|
|
3006
3373
|
}
|
|
3007
3374
|
}, [
|
|
3008
|
-
|
|
3375
|
+
filteredNavItems,
|
|
3009
3376
|
controlledSlug,
|
|
3010
3377
|
normalizedBasePath
|
|
3011
3378
|
]);
|
|
@@ -3035,8 +3402,8 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3035
3402
|
const slugMatch = (0, react.useMemo)(() => matchSlugPrefix(activeSlug, navSlugs), [activeSlug, navSlugs]);
|
|
3036
3403
|
const baseSlug = slugMatch?.matchedSlug ?? normalizeSlug(activeSlug);
|
|
3037
3404
|
const restParams = slugMatch?.rest ?? "";
|
|
3038
|
-
const mobileSecondLevelTabs = findCurrentSection(
|
|
3039
|
-
const currentNavItem = findNavItem(
|
|
3405
|
+
const mobileSecondLevelTabs = findCurrentSection(filteredMobileNavItems, baseSlug)?.children ?? [];
|
|
3406
|
+
const currentNavItem = findNavItem(filteredNavItems, baseSlug);
|
|
3040
3407
|
const screenTitle = currentNavItem?.label || screens?.find((s) => s.id === currentNavItem?.screen_id)?.name || void 0;
|
|
3041
3408
|
const content = typeof children === "function" ? children({
|
|
3042
3409
|
currentSlug: activeSlug,
|
|
@@ -3066,7 +3433,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3066
3433
|
navigate: handleNavigate,
|
|
3067
3434
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AppShellLayout, {
|
|
3068
3435
|
sidebarContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SdkNavigation, {
|
|
3069
|
-
navItems,
|
|
3436
|
+
navItems: filteredNavItems,
|
|
3070
3437
|
currentSlug: activeSlug,
|
|
3071
3438
|
onNavigate: handleNavigate
|
|
3072
3439
|
}),
|
|
@@ -3080,7 +3447,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3080
3447
|
sidebarFooter: resolvedSidebarFooter,
|
|
3081
3448
|
useBottomNav: true,
|
|
3082
3449
|
afterContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SdkBottomNav, {
|
|
3083
|
-
navItems:
|
|
3450
|
+
navItems: filteredMobileNavItems,
|
|
3084
3451
|
currentSlug: activeSlug,
|
|
3085
3452
|
onNavigate: handleNavigate,
|
|
3086
3453
|
appDefinitionId: appData?.definition_id ?? 0
|
|
@@ -4097,18 +4464,18 @@ function useContact(_contactId) {
|
|
|
4097
4464
|
//#endregion
|
|
4098
4465
|
//#region src/screens/index.ts
|
|
4099
4466
|
const screenPropertySchemas = {
|
|
4100
|
-
ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-
|
|
4101
|
-
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-
|
|
4102
|
-
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-
|
|
4103
|
-
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-
|
|
4104
|
-
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-
|
|
4105
|
-
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-
|
|
4106
|
-
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-
|
|
4107
|
-
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-
|
|
4108
|
-
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
4109
|
-
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-
|
|
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),
|
|
4110
4477
|
UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => m.upgradeScreenPropertySchema),
|
|
4111
|
-
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-
|
|
4478
|
+
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-B-JdFulZ.cjs")).then((m) => m.appDownloadScreenPropertySchema)
|
|
4112
4479
|
};
|
|
4113
4480
|
/**
|
|
4114
4481
|
* Core page template IDs
|
|
@@ -4563,6 +4930,7 @@ exports.extractAllTokensFromUrl = require_FluidProvider.extractAllTokensFromUrl;
|
|
|
4563
4930
|
exports.extractCompanyTokenFromUrl = require_FluidProvider.extractCompanyTokenFromUrl;
|
|
4564
4931
|
exports.extractSlugFromPathname = extractSlugFromPathname;
|
|
4565
4932
|
exports.extractTokenFromUrl = require_FluidProvider.extractTokenFromUrl;
|
|
4933
|
+
exports.filterRepOnlyNavItems = filterRepOnlyNavItems;
|
|
4566
4934
|
exports.gapValues = require_registries.gapValues;
|
|
4567
4935
|
exports.generateShades = require_FluidProvider.generateShades;
|
|
4568
4936
|
exports.generateThemeCSS = require_FluidProvider.generateThemeCSS;
|
|
@@ -4662,6 +5030,7 @@ exports.useResolvedPages = useResolvedPages;
|
|
|
4662
5030
|
exports.useThemeContext = require_FluidProvider.useThemeContext;
|
|
4663
5031
|
exports.useThemeMode = useThemeMode;
|
|
4664
5032
|
exports.useTodos = useTodos;
|
|
5033
|
+
exports.useUserType = require_ShareablesScreen.useUserType;
|
|
4665
5034
|
exports.validateNavigationPages = validateNavigationPages;
|
|
4666
5035
|
exports.validateToken = require_FluidProvider.validateToken;
|
|
4667
5036
|
exports.videoWidgetPropertySchema = require_VideoWidget.videoWidgetPropertySchema;
|