@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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as hasTokenInUrl, A as DEFAULT_RADII, B as parseColor, C as getActiveThemeId, D as DEFAULT_COLORS, E as serialiseTheme, F as generateThemeCSS, G as SEMANTIC_COLOR_NAMES, H as FONT_FAMILY_KEYS, I as deriveDarkVariant, J as createDefaultAuthRedirect, K as SHADE_STEPS, L as generateShades, M as DEFAULT_THEME_ID, N as DEFAULT_THEME_NAME, O as DEFAULT_FONT_FAMILIES, P as getDefaultThemeDefinition, Q as extractTokenFromUrl, R as getForegroundColor, S as buildThemeDefinition, T as deserialiseTheme, U as FONT_SIZE_KEYS, V as resolveTheme, W as RADIUS_KEYS, X as extractAllTokensFromUrl, Y as cleanTokenFromUrl, Z as extractCompanyTokenFromUrl, _ as normalizeComponentTree, a as createScreen, at as getTokenExpiration, b as removeAllThemes, c as FluidAuthProvider, ct as isValidToken, d as useThemeContext, dt as STORAGE_KEYS, et as clearTokens, f as ApiError, ft as URL_PARAMS, g as toNavigationItem, gt as deleteDatabase, h as transformManifestToRepAppData, ht as createPersister, i as widgetPropertySchemas, it as decodeToken, j as DEFAULT_SPACING, k as DEFAULT_FONT_SIZES, l as useFluidAuthContext, lt as validateToken, m as isApiError, mt as isUserType, n as useFluidContext, nt as hasStoredToken, o as createWidgetFromShareable, ot as getTokenTimeRemaining, p as createFluidClient, pt as USER_TYPES, q as DEFAULT_AUTH_URL, r as DEFAULT_SDK_WIDGET_REGISTRY, rt as storeToken, s as createWidgetRegistry, st as isTokenExpired, t as FluidProvider, tt as getStoredToken, u as FluidThemeProvider, ut as AUTH_CONSTANTS, v as toScreenDefinition, w as transformThemes, x as removeTheme, y as applyTheme, z as mergeDarkOverrides } from "./FluidProvider-
|
|
2
|
-
import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-
|
|
3
|
-
import { a as useDataSourceRegistryConfig, r as pointsWidgetPropertySchema, t as PointsWidget } from "./PointsWidget-
|
|
1
|
+
import { $ as hasTokenInUrl, A as DEFAULT_RADII, B as parseColor, C as getActiveThemeId, D as DEFAULT_COLORS, E as serialiseTheme, F as generateThemeCSS, G as SEMANTIC_COLOR_NAMES, H as FONT_FAMILY_KEYS, I as deriveDarkVariant, J as createDefaultAuthRedirect, K as SHADE_STEPS, L as generateShades, M as DEFAULT_THEME_ID, N as DEFAULT_THEME_NAME, O as DEFAULT_FONT_FAMILIES, P as getDefaultThemeDefinition, Q as extractTokenFromUrl, R as getForegroundColor, S as buildThemeDefinition, T as deserialiseTheme, U as FONT_SIZE_KEYS, V as resolveTheme, W as RADIUS_KEYS, X as extractAllTokensFromUrl, Y as cleanTokenFromUrl, Z as extractCompanyTokenFromUrl, _ as normalizeComponentTree, a as createScreen, at as getTokenExpiration, b as removeAllThemes, c as FluidAuthProvider, ct as isValidToken, d as useThemeContext, dt as STORAGE_KEYS, et as clearTokens, f as ApiError, ft as URL_PARAMS, g as toNavigationItem, gt as deleteDatabase, h as transformManifestToRepAppData, ht as createPersister, i as widgetPropertySchemas, it as decodeToken, j as DEFAULT_SPACING, k as DEFAULT_FONT_SIZES, l as useFluidAuthContext, lt as validateToken, m as isApiError, mt as isUserType, n as useFluidContext, nt as hasStoredToken, o as createWidgetFromShareable, ot as getTokenTimeRemaining, p as createFluidClient, pt as USER_TYPES, q as DEFAULT_AUTH_URL, r as DEFAULT_SDK_WIDGET_REGISTRY, rt as storeToken, s as createWidgetRegistry, st as isTokenExpired, t as FluidProvider, tt as getStoredToken, u as FluidThemeProvider, ut as AUTH_CONSTANTS, v as toScreenDefinition, w as transformThemes, x as removeTheme, y as applyTheme, z as mergeDarkOverrides } from "./FluidProvider-CwkMUOoy.mjs";
|
|
2
|
+
import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-C4g7ZGPo.mjs";
|
|
3
|
+
import { a as useDataSourceRegistryConfig, r as pointsWidgetPropertySchema, t as PointsWidget } from "./PointsWidget-CYesuDDG.mjs";
|
|
4
4
|
import "./error-state-C9MqwdW7.mjs";
|
|
5
5
|
import { a as isWidgetType, i as assertNever, l as useRegistry, n as WIDGET_TYPE_NAMES, o as isWidgetTypeName, r as assertDefined } from "./ScreenRenderer-DoVfmxCl.mjs";
|
|
6
6
|
import "./WidgetInteractionContext-1AMQFvCN.mjs";
|
|
@@ -15,7 +15,7 @@ import { r as calendarWidgetPropertySchema, t as CalendarWidget } from "./Calend
|
|
|
15
15
|
import { r as cardWidgetPropertySchema, t as CardWidget } from "./CardWidget-zZAhy3oQ.mjs";
|
|
16
16
|
import "./purify.es-D4F6PAAZ.mjs";
|
|
17
17
|
import { C as SheetContent, D as SheetTrigger, I as Input, K as DropdownMenu, R as IconButton, S as Sheet, Y as DropdownMenuLabel, an as AlertDialogContent, cn as AlertDialogHeader, et as DropdownMenuTrigger, ht as CollapsibleTrigger, in as AlertDialogCancel, ln as AlertDialogMedia, mt as CollapsibleContent, nn as AlertDialog, on as AlertDialogDescription, pt as Collapsible, q as DropdownMenuContent, rn as AlertDialogAction, sn as AlertDialogFooter, un as AlertDialogTitle, x as Skeleton$1, yn as cn$1 } from "./src-77nf0QPD.mjs";
|
|
18
|
-
import { a as useMessagingAuth, i as useMessagingConfig, n as messagingScreenPropertySchema, r as createFluidFileUploader, t as MessagingScreen } from "./MessagingScreen-
|
|
18
|
+
import { a as useMessagingAuth, i as useMessagingConfig, n as messagingScreenPropertySchema, r as createFluidFileUploader, t as MessagingScreen } from "./MessagingScreen-Cg2XvQZF.mjs";
|
|
19
19
|
import "./scroll-arrows-CjjaRceq.mjs";
|
|
20
20
|
import "./MediaRenderer-BKgR0Nd5.mjs";
|
|
21
21
|
import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "./CarouselWidget-v1NWYsQe.mjs";
|
|
@@ -34,28 +34,28 @@ import { r as spacerWidgetPropertySchema, t as SpacerWidget } from "./SpacerWidg
|
|
|
34
34
|
import { r as tableWidgetPropertySchema, t as TableWidget } from "./TableWidget-Nkzz38xS.mjs";
|
|
35
35
|
import { r as toDoWidgetPropertySchema, t as ToDoWidget } from "./ToDoWidget-D52-GT7f.mjs";
|
|
36
36
|
import { r as videoWidgetPropertySchema, t as VideoWidget } from "./VideoWidget-4DRASBWA.mjs";
|
|
37
|
-
import { o as useFluidAuth } from "./use-account-clients-
|
|
37
|
+
import { o as useFluidAuth } from "./use-account-clients-Cf_6sxeC.mjs";
|
|
38
38
|
import { i as useScreenHeaderContext, t as ScreenHeaderProvider } from "./ScreenHeaderContext-NdrJ58Mg.mjs";
|
|
39
|
-
import { t as useFluidApi } from "./use-fluid-api-
|
|
40
|
-
import { i as useCompanyScopedQueryKey, n as useCurrentUser, r as createCompanyQueryKey, t as CURRENT_USER_QUERY_KEY } from "./use-current-user-
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import "./
|
|
44
|
-
import
|
|
45
|
-
import "./
|
|
46
|
-
import "./
|
|
47
|
-
import
|
|
48
|
-
import "./
|
|
49
|
-
import "./
|
|
50
|
-
import
|
|
51
|
-
import "./
|
|
52
|
-
import
|
|
53
|
-
import {
|
|
39
|
+
import { t as useFluidApi } from "./use-fluid-api-DPhr-9Jv.mjs";
|
|
40
|
+
import { i as useCompanyScopedQueryKey, n as useCurrentUser, r as createCompanyQueryKey, t as CURRENT_USER_QUERY_KEY } from "./use-current-user-Bl9nPNFt.mjs";
|
|
41
|
+
import { n as shareablesScreenPropertySchema, r as useUserType, t as ShareablesScreen } from "./ShareablesScreen-BK0H5fb2.mjs";
|
|
42
|
+
import { i as CoreScreenPlaceholder, r as customersScreenPropertySchema, t as CustomersScreen } from "./CustomersScreen-DEFY3mRL.mjs";
|
|
43
|
+
import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigationContext-BSnbFILQ.mjs";
|
|
44
|
+
import "./order-detail-B5X_QRpi.mjs";
|
|
45
|
+
import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-D3LAx25s.mjs";
|
|
46
|
+
import "./dist-CkIGP8my.mjs";
|
|
47
|
+
import "./es-Dlib2eNY.mjs";
|
|
48
|
+
import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-DrkHWPMm.mjs";
|
|
49
|
+
import "./src-B7j_mfeS.mjs";
|
|
50
|
+
import "./dist-C9vpl_rR.mjs";
|
|
51
|
+
import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-CfAmUUN3.mjs";
|
|
52
|
+
import "./src-BjmyVJoe.mjs";
|
|
53
|
+
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-B0Pr0CTu.mjs";
|
|
54
54
|
import "./sortable.esm-CzzU6kIR.mjs";
|
|
55
|
-
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-
|
|
56
|
-
import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-
|
|
55
|
+
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-CGo9KQ9L.mjs";
|
|
56
|
+
import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-BedF13nt.mjs";
|
|
57
57
|
import "./UpgradeScreen-CaTBqSyO.mjs";
|
|
58
|
-
import "./AppDownloadScreen-
|
|
58
|
+
import "./AppDownloadScreen-BE6M8WxN.mjs";
|
|
59
59
|
import * as React$1 from "react";
|
|
60
60
|
import { StrictMode, Suspense, createContext, forwardRef, lazy, memo, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
61
61
|
import { useMutation, useQueries, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
@@ -1156,6 +1156,22 @@ const SYSTEM_NAVIGATION_SLUGS = [
|
|
|
1156
1156
|
"shop",
|
|
1157
1157
|
"upgrade"
|
|
1158
1158
|
];
|
|
1159
|
+
/**
|
|
1160
|
+
* Slugs restricted to rep (non-customer) users.
|
|
1161
|
+
* Customers will not see these in navigation and cannot access these routes.
|
|
1162
|
+
*/
|
|
1163
|
+
const REP_ONLY_SLUGS = new Set(["messages", "my-site"]);
|
|
1164
|
+
/**
|
|
1165
|
+
* Check if a slug is restricted to rep users only.
|
|
1166
|
+
* Handles both exact matches and prefix matches (e.g. "contacts/123").
|
|
1167
|
+
*/
|
|
1168
|
+
function isRepOnlySlug(slug) {
|
|
1169
|
+
if (!slug) return false;
|
|
1170
|
+
const normalized = slug.startsWith("/") ? slug.slice(1) : slug;
|
|
1171
|
+
if (REP_ONLY_SLUGS.has(normalized)) return true;
|
|
1172
|
+
for (const repSlug of REP_ONLY_SLUGS) if (normalized.startsWith(repSlug + "/")) return true;
|
|
1173
|
+
return false;
|
|
1174
|
+
}
|
|
1159
1175
|
const SYSTEM_NAVIGATION_ITEMS = {
|
|
1160
1176
|
"app-download": {
|
|
1161
1177
|
slug: "app-download",
|
|
@@ -1672,6 +1688,43 @@ function SdkNavigation({ navItems, currentSlug, onNavigate }) {
|
|
|
1672
1688
|
}) });
|
|
1673
1689
|
}
|
|
1674
1690
|
//#endregion
|
|
1691
|
+
//#region src/navigation/filter-nav-items.ts
|
|
1692
|
+
/**
|
|
1693
|
+
* Filter navigation items by removing rep-only slugs.
|
|
1694
|
+
* Handles nested children: rep-only children are removed, and parents
|
|
1695
|
+
* with no remaining children are also removed.
|
|
1696
|
+
*/
|
|
1697
|
+
function filterRepOnlyNavItems(items) {
|
|
1698
|
+
const result = [];
|
|
1699
|
+
for (const item of items) {
|
|
1700
|
+
if (!item.children?.length) {
|
|
1701
|
+
if (isRepOnlySlug(item.slug)) continue;
|
|
1702
|
+
result.push(item);
|
|
1703
|
+
continue;
|
|
1704
|
+
}
|
|
1705
|
+
if (isRepOnlySlug(item.slug)) continue;
|
|
1706
|
+
const filteredChildren = filterRepOnlyNavItems(item.children);
|
|
1707
|
+
if (filteredChildren.length === 0) continue;
|
|
1708
|
+
result.push({
|
|
1709
|
+
...item,
|
|
1710
|
+
children: filteredChildren
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
return result;
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Filter system navigation sections by removing rep-only items.
|
|
1717
|
+
* Sections with no remaining items are dropped entirely.
|
|
1718
|
+
*/
|
|
1719
|
+
function filterRepOnlySections(sections) {
|
|
1720
|
+
const filtered = {};
|
|
1721
|
+
for (const [section, items] of Object.entries(sections)) {
|
|
1722
|
+
const allowed = items.filter((item) => !isRepOnlySlug(item.slug));
|
|
1723
|
+
if (allowed.length > 0) filtered[section] = allowed;
|
|
1724
|
+
}
|
|
1725
|
+
return filtered;
|
|
1726
|
+
}
|
|
1727
|
+
//#endregion
|
|
1675
1728
|
//#region src/shell/QuickLinksDropdown.tsx
|
|
1676
1729
|
function QuickLinksDropdown({ onNavigate }) {
|
|
1677
1730
|
const [open, setOpen] = useState(false);
|
|
@@ -1693,7 +1746,11 @@ function QuickLinksDropdown({ onNavigate }) {
|
|
|
1693
1746
|
document.removeEventListener("keydown", handleKeyDown);
|
|
1694
1747
|
};
|
|
1695
1748
|
}, [open, close]);
|
|
1696
|
-
const
|
|
1749
|
+
const { isCustomer } = useUserType();
|
|
1750
|
+
const sections = useMemo(() => {
|
|
1751
|
+
const all = getSystemNavigationBySection();
|
|
1752
|
+
return isCustomer ? filterRepOnlySections(all) : all;
|
|
1753
|
+
}, [isCustomer]);
|
|
1697
1754
|
const handleItemClick = (slug) => {
|
|
1698
1755
|
onNavigate(slug);
|
|
1699
1756
|
close();
|
|
@@ -1750,7 +1807,11 @@ function QuickLinksDropdown({ onNavigate }) {
|
|
|
1750
1807
|
//#endregion
|
|
1751
1808
|
//#region src/shell/SdkMobileQuickLinksGrid.tsx
|
|
1752
1809
|
function SdkMobileQuickLinksGrid({ onNavigate }) {
|
|
1753
|
-
const
|
|
1810
|
+
const { isCustomer } = useUserType();
|
|
1811
|
+
const sections = useMemo(() => {
|
|
1812
|
+
const all = getSystemNavigationBySection();
|
|
1813
|
+
return isCustomer ? filterRepOnlySections(all) : all;
|
|
1814
|
+
}, [isCustomer]);
|
|
1754
1815
|
return /* @__PURE__ */ jsx("div", {
|
|
1755
1816
|
className: "space-y-4",
|
|
1756
1817
|
children: Object.entries(sections).map(([sectionName, items]) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h4", {
|
|
@@ -2354,6 +2415,307 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2354
2415
|
slug
|
|
2355
2416
|
}));
|
|
2356
2417
|
//#endregion
|
|
2418
|
+
//#region src/screens/AccessDeniedScreen.tsx
|
|
2419
|
+
/**
|
|
2420
|
+
* Shown when a customer attempts to access a rep-only page via direct URL.
|
|
2421
|
+
*/
|
|
2422
|
+
function AccessDeniedScreen() {
|
|
2423
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2424
|
+
className: "flex min-h-[400px] items-center justify-center",
|
|
2425
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2426
|
+
className: "border-border max-w-sm rounded-lg border border-dashed p-8 text-center",
|
|
2427
|
+
children: [
|
|
2428
|
+
/* @__PURE__ */ jsx("h2", {
|
|
2429
|
+
className: "text-foreground text-xl font-semibold",
|
|
2430
|
+
children: "Access Denied"
|
|
2431
|
+
}),
|
|
2432
|
+
/* @__PURE__ */ jsx("p", {
|
|
2433
|
+
className: "text-muted-foreground mt-2",
|
|
2434
|
+
children: "You don't have permission to view this page."
|
|
2435
|
+
}),
|
|
2436
|
+
/* @__PURE__ */ jsx("p", {
|
|
2437
|
+
className: "text-muted-foreground mt-1 text-sm",
|
|
2438
|
+
children: "This feature is not available for your account type."
|
|
2439
|
+
})
|
|
2440
|
+
]
|
|
2441
|
+
})
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
/** Lookup map for O(1) preset resolution */
|
|
2445
|
+
const PRESET_MAP = new Map([
|
|
2446
|
+
{
|
|
2447
|
+
id: "rep-most-shared",
|
|
2448
|
+
name: "Most Shared",
|
|
2449
|
+
description: "Most shared content",
|
|
2450
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_shared?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2451
|
+
resultPath: "resources",
|
|
2452
|
+
compatibleWidgets: [
|
|
2453
|
+
"CarouselWidget",
|
|
2454
|
+
"ListWidget",
|
|
2455
|
+
"NestedWidget",
|
|
2456
|
+
"TableWidget"
|
|
2457
|
+
],
|
|
2458
|
+
menuField: {
|
|
2459
|
+
key: "shareable_type",
|
|
2460
|
+
label: "Content Type",
|
|
2461
|
+
type: "select",
|
|
2462
|
+
options: [
|
|
2463
|
+
{
|
|
2464
|
+
label: "Products",
|
|
2465
|
+
value: "products"
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
label: "Media",
|
|
2469
|
+
value: "media"
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
label: "Pages",
|
|
2473
|
+
value: "pages"
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
label: "Libraries",
|
|
2477
|
+
value: "libraries"
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
label: "Enrollment Packs",
|
|
2481
|
+
value: "enrollment_packs"
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
label: "Promotions",
|
|
2485
|
+
value: "promotions"
|
|
2486
|
+
}
|
|
2487
|
+
],
|
|
2488
|
+
defaultValue: "products"
|
|
2489
|
+
},
|
|
2490
|
+
configFields: [{
|
|
2491
|
+
key: "limit",
|
|
2492
|
+
label: "Limit",
|
|
2493
|
+
type: "number",
|
|
2494
|
+
defaultValue: 10,
|
|
2495
|
+
min: 1,
|
|
2496
|
+
max: 20,
|
|
2497
|
+
description: "Maximum number of items to show"
|
|
2498
|
+
}, {
|
|
2499
|
+
key: "period",
|
|
2500
|
+
label: "Time Range",
|
|
2501
|
+
type: "select",
|
|
2502
|
+
options: [
|
|
2503
|
+
{
|
|
2504
|
+
label: "7 days",
|
|
2505
|
+
value: "7d"
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
label: "30 days",
|
|
2509
|
+
value: "30d"
|
|
2510
|
+
},
|
|
2511
|
+
{
|
|
2512
|
+
label: "90 days",
|
|
2513
|
+
value: "90d"
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
label: "1 year",
|
|
2517
|
+
value: "1y"
|
|
2518
|
+
},
|
|
2519
|
+
{
|
|
2520
|
+
label: "All time",
|
|
2521
|
+
value: "all"
|
|
2522
|
+
}
|
|
2523
|
+
],
|
|
2524
|
+
defaultValue: "all"
|
|
2525
|
+
}]
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
id: "rep-most-viewed",
|
|
2529
|
+
name: "Most Viewed",
|
|
2530
|
+
description: "Most viewed content",
|
|
2531
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_viewed?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2532
|
+
resultPath: "resources",
|
|
2533
|
+
compatibleWidgets: [
|
|
2534
|
+
"CarouselWidget",
|
|
2535
|
+
"ListWidget",
|
|
2536
|
+
"NestedWidget",
|
|
2537
|
+
"TableWidget"
|
|
2538
|
+
],
|
|
2539
|
+
menuField: {
|
|
2540
|
+
key: "shareable_type",
|
|
2541
|
+
label: "Content Type",
|
|
2542
|
+
type: "select",
|
|
2543
|
+
options: [
|
|
2544
|
+
{
|
|
2545
|
+
label: "Products",
|
|
2546
|
+
value: "products"
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
label: "Media",
|
|
2550
|
+
value: "media"
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
label: "Pages",
|
|
2554
|
+
value: "pages"
|
|
2555
|
+
},
|
|
2556
|
+
{
|
|
2557
|
+
label: "Libraries",
|
|
2558
|
+
value: "libraries"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
label: "Enrollment Packs",
|
|
2562
|
+
value: "enrollment_packs"
|
|
2563
|
+
},
|
|
2564
|
+
{
|
|
2565
|
+
label: "Promotions",
|
|
2566
|
+
value: "promotions"
|
|
2567
|
+
}
|
|
2568
|
+
],
|
|
2569
|
+
defaultValue: "products"
|
|
2570
|
+
},
|
|
2571
|
+
configFields: [{
|
|
2572
|
+
key: "limit",
|
|
2573
|
+
label: "Limit",
|
|
2574
|
+
type: "number",
|
|
2575
|
+
defaultValue: 10,
|
|
2576
|
+
min: 1,
|
|
2577
|
+
max: 20,
|
|
2578
|
+
description: "Maximum number of items to show"
|
|
2579
|
+
}, {
|
|
2580
|
+
key: "period",
|
|
2581
|
+
label: "Time Range",
|
|
2582
|
+
type: "select",
|
|
2583
|
+
options: [
|
|
2584
|
+
{
|
|
2585
|
+
label: "7 days",
|
|
2586
|
+
value: "7d"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
label: "30 days",
|
|
2590
|
+
value: "30d"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
label: "90 days",
|
|
2594
|
+
value: "90d"
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
label: "1 year",
|
|
2598
|
+
value: "1y"
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
label: "All time",
|
|
2602
|
+
value: "all"
|
|
2603
|
+
}
|
|
2604
|
+
],
|
|
2605
|
+
defaultValue: "all"
|
|
2606
|
+
}]
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
id: "customer-orders",
|
|
2610
|
+
name: "Orders",
|
|
2611
|
+
description: "Customer order history",
|
|
2612
|
+
endpoint: "/v202506/orders?customer_id={customer_id}&page[limit]={limit}&status={status}",
|
|
2613
|
+
resultPath: "orders",
|
|
2614
|
+
transform: "toOrderTableProps",
|
|
2615
|
+
compatibleWidgets: ["TableWidget"],
|
|
2616
|
+
configFields: [{
|
|
2617
|
+
key: "limit",
|
|
2618
|
+
label: "Limit",
|
|
2619
|
+
type: "number",
|
|
2620
|
+
defaultValue: 10,
|
|
2621
|
+
min: 1,
|
|
2622
|
+
max: 50,
|
|
2623
|
+
description: "Maximum number of orders to show"
|
|
2624
|
+
}, {
|
|
2625
|
+
key: "status",
|
|
2626
|
+
label: "Status",
|
|
2627
|
+
type: "select",
|
|
2628
|
+
options: [
|
|
2629
|
+
{
|
|
2630
|
+
label: "All",
|
|
2631
|
+
value: "all"
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
label: "Paid",
|
|
2635
|
+
value: "paid"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
label: "Unpaid",
|
|
2639
|
+
value: "unpaid"
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
label: "Refunded",
|
|
2643
|
+
value: "refunded"
|
|
2644
|
+
}
|
|
2645
|
+
],
|
|
2646
|
+
defaultValue: "all"
|
|
2647
|
+
}]
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
id: "customer-subscriptions",
|
|
2651
|
+
name: "Subscriptions",
|
|
2652
|
+
description: "Customer subscriptions",
|
|
2653
|
+
endpoint: "/subscriptions?customer_id={customer_id}&per_page={limit}&status={status}",
|
|
2654
|
+
resultPath: "subscriptions",
|
|
2655
|
+
transform: "toSubscriptionTableProps",
|
|
2656
|
+
compatibleWidgets: ["TableWidget"],
|
|
2657
|
+
configFields: [{
|
|
2658
|
+
key: "limit",
|
|
2659
|
+
label: "Limit",
|
|
2660
|
+
type: "number",
|
|
2661
|
+
defaultValue: 10,
|
|
2662
|
+
min: 1,
|
|
2663
|
+
max: 50,
|
|
2664
|
+
description: "Maximum number of subscriptions to show"
|
|
2665
|
+
}, {
|
|
2666
|
+
key: "status",
|
|
2667
|
+
label: "Status",
|
|
2668
|
+
type: "select",
|
|
2669
|
+
options: [
|
|
2670
|
+
{
|
|
2671
|
+
label: "All",
|
|
2672
|
+
value: "all"
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
label: "Active",
|
|
2676
|
+
value: "active"
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
label: "Paused",
|
|
2680
|
+
value: "paused"
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
label: "Cancelled",
|
|
2684
|
+
value: "cancelled"
|
|
2685
|
+
}
|
|
2686
|
+
],
|
|
2687
|
+
defaultValue: "all"
|
|
2688
|
+
}]
|
|
2689
|
+
}
|
|
2690
|
+
].map((p) => [p.id, p]));
|
|
2691
|
+
/**
|
|
2692
|
+
* Resolves a preset by ID, returning the current preset definition.
|
|
2693
|
+
* Returns undefined if the preset ID is not recognized.
|
|
2694
|
+
*/
|
|
2695
|
+
function resolvePreset(presetId) {
|
|
2696
|
+
return PRESET_MAP.get(presetId);
|
|
2697
|
+
}
|
|
2698
|
+
/**
|
|
2699
|
+
* If the source is an API source with a presetId, returns a copy with
|
|
2700
|
+
* endpoint, resultPath, and transform resolved from the current preset.
|
|
2701
|
+
* Falls back to stored values if the preset is unknown.
|
|
2702
|
+
* Non-API sources are returned as-is.
|
|
2703
|
+
*/
|
|
2704
|
+
function resolveSource(source) {
|
|
2705
|
+
if (source.type !== "api" || !source.presetId) return source;
|
|
2706
|
+
const preset = resolvePreset(source.presetId);
|
|
2707
|
+
if (!preset) {
|
|
2708
|
+
console.warn(`[DataSource] Unknown preset "${source.presetId}", falling back to stored values`);
|
|
2709
|
+
return source;
|
|
2710
|
+
}
|
|
2711
|
+
return {
|
|
2712
|
+
...source,
|
|
2713
|
+
endpoint: preset.endpoint,
|
|
2714
|
+
resultPath: preset.resultPath,
|
|
2715
|
+
transform: preset.transform ?? source.transform
|
|
2716
|
+
};
|
|
2717
|
+
}
|
|
2718
|
+
//#endregion
|
|
2357
2719
|
//#region ../react/src/data-sources/use-widget-data.ts
|
|
2358
2720
|
/**
|
|
2359
2721
|
* Generates a cache key for the raw data fetch (endpoint/items identity only).
|
|
@@ -2363,7 +2725,7 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2363
2725
|
function getSourceKey(source) {
|
|
2364
2726
|
if (source.type === "api") {
|
|
2365
2727
|
const varsKey = source.variables ? `:${JSON.stringify(source.variables)}` : "";
|
|
2366
|
-
return `${source.endpoint}${varsKey}`;
|
|
2728
|
+
return `${source.presetId ?? source.endpoint}${varsKey}`;
|
|
2367
2729
|
}
|
|
2368
2730
|
if (source.type === "custom") return `custom:${(source.selectedItems?.map((item) => {
|
|
2369
2731
|
return `${item.shareableType}:${item.id}`;
|
|
@@ -2413,7 +2775,7 @@ function useWidgetData(widget, options) {
|
|
|
2413
2775
|
const baseUrl = options?.baseUrl ?? config.baseUrl;
|
|
2414
2776
|
const getApiHeaders = config.getApiHeaders;
|
|
2415
2777
|
const variables = config.variables;
|
|
2416
|
-
const sources = widget.dataSource?.sources ?? [];
|
|
2778
|
+
const sources = useMemo(() => (widget.dataSource?.sources ?? []).map(resolveSource), [widget.dataSource?.sources]);
|
|
2417
2779
|
const errorConfig = widget.dataSource?.error;
|
|
2418
2780
|
const widgetId = widget.id ?? "unknown";
|
|
2419
2781
|
const widgetType = widget.type;
|
|
@@ -2631,18 +2993,18 @@ function AccountManageLayout({ children }) {
|
|
|
2631
2993
|
}
|
|
2632
2994
|
//#endregion
|
|
2633
2995
|
//#region src/shell/system-screen-map.ts
|
|
2634
|
-
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-
|
|
2635
|
-
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-
|
|
2636
|
-
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-
|
|
2637
|
-
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-
|
|
2638
|
-
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-
|
|
2639
|
-
const ShopScreen$1 = lazy(() => import("./ShopScreen-
|
|
2640
|
-
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-
|
|
2641
|
-
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-
|
|
2642
|
-
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-
|
|
2643
|
-
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-
|
|
2996
|
+
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-C4g7ZGPo.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
|
|
2997
|
+
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-CfAmUUN3.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
|
|
2998
|
+
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-D3LAx25s.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2999
|
+
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-C4-8_bvB.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
3000
|
+
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-DrkHWPMm.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
3001
|
+
const ShopScreen$1 = lazy(() => import("./ShopScreen-B0Pr0CTu.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
|
|
3002
|
+
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-DEFY3mRL.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
3003
|
+
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-CgG79XW9.mjs").then((m) => ({ default: m.ProductsScreen })));
|
|
3004
|
+
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-BmKYYRZq.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
3005
|
+
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-BedF13nt.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
|
|
2644
3006
|
const UpgradeScreen = lazy(() => import("./UpgradeScreen-CaTBqSyO.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
|
|
2645
|
-
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-
|
|
3007
|
+
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-BE6M8WxN.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
|
|
2646
3008
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
2647
3009
|
profile: ProfileScreen$1,
|
|
2648
3010
|
orders: OrdersScreen$1,
|
|
@@ -2672,6 +3034,7 @@ function findScreenByPrefix(slug) {
|
|
|
2672
3034
|
//#region src/shell/PageRouter.tsx
|
|
2673
3035
|
const ACCOUNT_SLUGS = new Set(ACCOUNT_MANAGE_SLUGS);
|
|
2674
3036
|
function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlug, restParams }) {
|
|
3037
|
+
const { isCustomer } = useUserType();
|
|
2675
3038
|
const screenById = useMemo(() => {
|
|
2676
3039
|
if (!screens || screens.length === 0) return void 0;
|
|
2677
3040
|
return new Map(screens.map((s) => [s.id, s]));
|
|
@@ -2693,6 +3056,7 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
|
|
|
2693
3056
|
currentSlug,
|
|
2694
3057
|
baseSlug
|
|
2695
3058
|
]);
|
|
3059
|
+
if (isCustomer && isRepOnlySlug(currentSlug)) return /* @__PURE__ */ jsx(AccessDeniedScreen, {});
|
|
2696
3060
|
const ExactCustomPage = customPages?.[currentSlug];
|
|
2697
3061
|
if (ExactCustomPage) return /* @__PURE__ */ jsx(ExactCustomPage, {
|
|
2698
3062
|
slug: currentSlug,
|
|
@@ -2940,8 +3304,11 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2940
3304
|
if (mobileNav && mobileNav.length > 0) return mobileNav;
|
|
2941
3305
|
return navItems;
|
|
2942
3306
|
}, [appData?.profile?.mobile_navigation?.navigation_items, navItems]);
|
|
3307
|
+
const { isCustomer } = useUserType();
|
|
3308
|
+
const filteredNavItems = useMemo(() => isCustomer ? filterRepOnlyNavItems(navItems) : navItems, [navItems, isCustomer]);
|
|
3309
|
+
const filteredMobileNavItems = useMemo(() => isCustomer ? filterRepOnlyNavItems(mobileNavItems) : mobileNavItems, [mobileNavItems, isCustomer]);
|
|
2943
3310
|
const screens = appData?.screens;
|
|
2944
|
-
const navSlugs = useMemo(() => collectNavSlugs(
|
|
3311
|
+
const navSlugs = useMemo(() => collectNavSlugs(filteredNavItems), [filteredNavItems]);
|
|
2945
3312
|
const [themeMode, setThemeMode] = useState(getInitialThemeMode);
|
|
2946
3313
|
const handleThemeModeChange = useCallback((mode) => {
|
|
2947
3314
|
setThemeMode(mode);
|
|
@@ -2995,7 +3362,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2995
3362
|
if (controlledSlug !== void 0) return;
|
|
2996
3363
|
if (typeof window === "undefined") return;
|
|
2997
3364
|
if (!extractSlugFromPathname(window.location.pathname, normalizedBasePath)) {
|
|
2998
|
-
const firstSlug = findFirstNavigableSlug(
|
|
3365
|
+
const firstSlug = findFirstNavigableSlug(filteredNavItems);
|
|
2999
3366
|
if (firstSlug) {
|
|
3000
3367
|
const targetPath = normalizedBasePath === "/" ? `/${firstSlug}` : `${normalizedBasePath}/${firstSlug}`;
|
|
3001
3368
|
history.replaceState(null, "", targetPath);
|
|
@@ -3003,7 +3370,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3003
3370
|
}
|
|
3004
3371
|
}
|
|
3005
3372
|
}, [
|
|
3006
|
-
|
|
3373
|
+
filteredNavItems,
|
|
3007
3374
|
controlledSlug,
|
|
3008
3375
|
normalizedBasePath
|
|
3009
3376
|
]);
|
|
@@ -3033,8 +3400,8 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3033
3400
|
const slugMatch = useMemo(() => matchSlugPrefix(activeSlug, navSlugs), [activeSlug, navSlugs]);
|
|
3034
3401
|
const baseSlug = slugMatch?.matchedSlug ?? normalizeSlug(activeSlug);
|
|
3035
3402
|
const restParams = slugMatch?.rest ?? "";
|
|
3036
|
-
const mobileSecondLevelTabs = findCurrentSection(
|
|
3037
|
-
const currentNavItem = findNavItem(
|
|
3403
|
+
const mobileSecondLevelTabs = findCurrentSection(filteredMobileNavItems, baseSlug)?.children ?? [];
|
|
3404
|
+
const currentNavItem = findNavItem(filteredNavItems, baseSlug);
|
|
3038
3405
|
const screenTitle = currentNavItem?.label || screens?.find((s) => s.id === currentNavItem?.screen_id)?.name || void 0;
|
|
3039
3406
|
const content = typeof children === "function" ? children({
|
|
3040
3407
|
currentSlug: activeSlug,
|
|
@@ -3064,7 +3431,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3064
3431
|
navigate: handleNavigate,
|
|
3065
3432
|
children: /* @__PURE__ */ jsx(AppShellLayout, {
|
|
3066
3433
|
sidebarContent: /* @__PURE__ */ jsx(SdkNavigation, {
|
|
3067
|
-
navItems,
|
|
3434
|
+
navItems: filteredNavItems,
|
|
3068
3435
|
currentSlug: activeSlug,
|
|
3069
3436
|
onNavigate: handleNavigate
|
|
3070
3437
|
}),
|
|
@@ -3078,7 +3445,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
3078
3445
|
sidebarFooter: resolvedSidebarFooter,
|
|
3079
3446
|
useBottomNav: true,
|
|
3080
3447
|
afterContent: /* @__PURE__ */ jsx(SdkBottomNav, {
|
|
3081
|
-
navItems:
|
|
3448
|
+
navItems: filteredMobileNavItems,
|
|
3082
3449
|
currentSlug: activeSlug,
|
|
3083
3450
|
onNavigate: handleNavigate,
|
|
3084
3451
|
appDefinitionId: appData?.definition_id ?? 0
|
|
@@ -4095,18 +4462,18 @@ function useContact(_contactId) {
|
|
|
4095
4462
|
//#endregion
|
|
4096
4463
|
//#region src/screens/index.ts
|
|
4097
4464
|
const screenPropertySchemas = {
|
|
4098
|
-
ProfileScreen: () => import("./ProfileScreen-
|
|
4099
|
-
MessagingScreen: () => import("./MessagingScreen-
|
|
4100
|
-
ContactsScreen: () => import("./ContactsScreen-
|
|
4101
|
-
OrdersScreen: () => import("./OrdersScreen-
|
|
4102
|
-
SubscriptionsScreen: () => import("./SubscriptionsScreen-
|
|
4103
|
-
CustomersScreen: () => import("./CustomersScreen-
|
|
4104
|
-
ProductsScreen: () => import("./ProductsScreen-
|
|
4105
|
-
MySiteScreen: () => import("./MySiteScreen-
|
|
4106
|
-
ShareablesScreen: () => import("./ShareablesScreen-
|
|
4107
|
-
ShopScreen: () => import("./ShopScreen-
|
|
4465
|
+
ProfileScreen: () => import("./ProfileScreen-C4g7ZGPo.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
|
|
4466
|
+
MessagingScreen: () => import("./MessagingScreen-C4-8_bvB.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
4467
|
+
ContactsScreen: () => import("./ContactsScreen-DrkHWPMm.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
|
|
4468
|
+
OrdersScreen: () => import("./OrdersScreen-CfAmUUN3.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
|
|
4469
|
+
SubscriptionsScreen: () => import("./SubscriptionsScreen-D3LAx25s.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4470
|
+
CustomersScreen: () => import("./CustomersScreen-DEFY3mRL.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
4471
|
+
ProductsScreen: () => import("./ProductsScreen-CgG79XW9.mjs").then((m) => m.productsScreenPropertySchema),
|
|
4472
|
+
MySiteScreen: () => import("./MySiteScreen-BedF13nt.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
|
|
4473
|
+
ShareablesScreen: () => import("./ShareablesScreen-BmKYYRZq.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
4474
|
+
ShopScreen: () => import("./ShopScreen-B0Pr0CTu.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
|
|
4108
4475
|
UpgradeScreen: () => import("./UpgradeScreen-CaTBqSyO.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
|
|
4109
|
-
AppDownloadScreen: () => import("./AppDownloadScreen-
|
|
4476
|
+
AppDownloadScreen: () => import("./AppDownloadScreen-BE6M8WxN.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
|
|
4110
4477
|
};
|
|
4111
4478
|
/**
|
|
4112
4479
|
* Core page template IDs
|
|
@@ -4443,6 +4810,6 @@ const SCAFFOLD_MANIFEST = {
|
|
|
4443
4810
|
]
|
|
4444
4811
|
};
|
|
4445
4812
|
//#endregion
|
|
4446
|
-
export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, AUTH_CONSTANTS, AlertWidget, ApiError, AppLink, AppNavigationProvider, AppShell, AuthError, AuthLoading, BuilderScreenView, BulletListWidget, CORE_PAGE_IDS, CURRENT_REP_QUERY_KEY, CURRENT_USER_QUERY_KEY, CalendarWidget, CardWidget, CarouselWidget, CatchUpWidget, ChartWidget, ContactsScreen, ContainerWidget, CustomersScreen, DEFAULT_AUTH_URL, DEFAULT_COLORS, DEFAULT_FONT_FAMILIES, DEFAULT_FONT_SIZES, DEFAULT_RADII, DEFAULT_SDK_WIDGET_REGISTRY, DEFAULT_SPACING, DEFAULT_THEME_ID, DEFAULT_THEME_NAME, EmbedWidget, FONT_FAMILY_KEYS, FONT_SIZE_KEYS, FluidAuthProvider, FluidProvider, FluidThemeProvider, ImageWidget, LayoutWidget, LinkWidget, ListWidget, MessagingScreen, MySiteScreen, MySiteWidget, NestedWidget, OrdersScreen, PAGE_CATEGORIES, PERMISSIONS_QUERY_KEY, PROFILE_QUERY_KEY, PROPERTY_FIELD_TYPES, PageRouter, PageTemplateProvider, PageTemplateRegistry, PointsWidget, ProductsScreen, ProfileScreen, QuickLinksDropdown, QuickShareWidget, RADIUS_KEYS, RecentActivityWidget, RequireAuth, SCAFFOLD_MANIFEST, SEMANTIC_COLOR_NAMES, SHADE_STEPS, STORAGE_KEYS, SdkCompanySwitcher, SdkHeader, SdkNavigation, SeparatorWidget, ShareablesScreen, ShopScreen, SpacerWidget, SubscriptionsScreen, TableWidget, TextWidget, ThemeModeProvider, ToDoWidget, URL_PARAMS, USER_TYPES, VideoWidget, WIDGET_TYPE_NAMES, alertWidgetPropertySchema, applyTheme, assertDefined, assertNever, buildThemeDefinition, buildWidgetRegistry, bulletListWidgetPropertySchema, calendarWidgetPropertySchema, cardWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, cleanTokenFromUrl, clearTokens, collectNavSlugs, contactsScreenPropertySchema, containerWidgetPropertySchema, createCompanyQueryKey, createDefaultAuthConfig, createDefaultAuthRedirect, createDefaultFluidConfig, createFluidClient, createFluidFileUploader, createPortal, createScreen, createWidgetFromShareable, createWidgetRegistry, customersScreenPropertySchema, decodeToken, deriveDarkVariant, deserialiseTheme, embedWidgetPropertySchema, extractAllTokensFromUrl, extractCompanyTokenFromUrl, extractSlugFromPathname, extractTokenFromUrl, gapValues, generateShades, generateThemeCSS, getActiveThemeId, getAvailablePageTemplates, getCorePageTemplates, getDefaultThemeDefinition, getForegroundColor, getOptionalPageTemplates, getProperty, getStoredToken, getThemeModeAttribute, getTokenExpiration, getTokenTimeRemaining, groupChildrenByColumn, hasData, hasStoredToken, hasTokenInUrl, imageWidgetPropertySchema, isActivitySlug, isApiError, isContactStatus, isErrorResult, isIdle, isLoading, isPropertyFieldType, isSlugInSection, isTokenExpired, isUserType, isValidToken, isWidgetType, isWidgetTypeName, layoutWidgetPropertySchema, linkWidgetPropertySchema, listWidgetPropertySchema, matchSlugPrefix, mergeDarkOverrides, messagingScreenPropertySchema, mySiteScreenPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, normalizeComponentTree, ordersScreenPropertySchema, parseColor, pointsWidgetPropertySchema, productsScreenPropertySchema, profileScreenPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, removeAllThemes, removeTheme, resolveNavigationPages, resolveTheme, screenPropertySchemas, sectionLayoutConfig, selectProperty, separatorWidgetPropertySchema, serialiseTheme, shareablesScreenPropertySchema, shopScreenPropertySchema, spacerWidgetPropertySchema, storeToken, subscriptionsScreenPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, toNavigationItem, toScreenDefinition, transformManifestToRepAppData, transformThemes, useActivities, useAppNavigation, useCalendarEvents, useCatchUps, useCompanyScopedQueryKey, useCompanySwitch, useContact, useContacts, useConversationMessages, useConversations, useCurrentRep, useCurrentUser, useFluidApi, useFluidApp, useFluidAuth, useFluidAuthContext, useFluidContext, useFluidPermissions, useFluidProfile, useFluidTheme, useLogout, useMessagingAuth, useMessagingConfig, useMySite, usePageTemplates, useResolvedPages, useThemeContext, useThemeMode, useTodos, validateNavigationPages, validateToken, videoWidgetPropertySchema, widgetPropertySchemas };
|
|
4813
|
+
export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, AUTH_CONSTANTS, AlertWidget, ApiError, AppLink, AppNavigationProvider, AppShell, AuthError, AuthLoading, BuilderScreenView, BulletListWidget, CORE_PAGE_IDS, CURRENT_REP_QUERY_KEY, CURRENT_USER_QUERY_KEY, CalendarWidget, CardWidget, CarouselWidget, CatchUpWidget, ChartWidget, ContactsScreen, ContainerWidget, CustomersScreen, DEFAULT_AUTH_URL, DEFAULT_COLORS, DEFAULT_FONT_FAMILIES, DEFAULT_FONT_SIZES, DEFAULT_RADII, DEFAULT_SDK_WIDGET_REGISTRY, DEFAULT_SPACING, DEFAULT_THEME_ID, DEFAULT_THEME_NAME, EmbedWidget, FONT_FAMILY_KEYS, FONT_SIZE_KEYS, FluidAuthProvider, FluidProvider, FluidThemeProvider, ImageWidget, LayoutWidget, LinkWidget, ListWidget, MessagingScreen, MySiteScreen, MySiteWidget, NestedWidget, OrdersScreen, PAGE_CATEGORIES, PERMISSIONS_QUERY_KEY, PROFILE_QUERY_KEY, PROPERTY_FIELD_TYPES, PageRouter, PageTemplateProvider, PageTemplateRegistry, PointsWidget, ProductsScreen, ProfileScreen, QuickLinksDropdown, QuickShareWidget, RADIUS_KEYS, RecentActivityWidget, RequireAuth, SCAFFOLD_MANIFEST, SEMANTIC_COLOR_NAMES, SHADE_STEPS, STORAGE_KEYS, SdkCompanySwitcher, SdkHeader, SdkNavigation, SeparatorWidget, ShareablesScreen, ShopScreen, SpacerWidget, SubscriptionsScreen, TableWidget, TextWidget, ThemeModeProvider, ToDoWidget, URL_PARAMS, USER_TYPES, VideoWidget, WIDGET_TYPE_NAMES, alertWidgetPropertySchema, applyTheme, assertDefined, assertNever, buildThemeDefinition, buildWidgetRegistry, bulletListWidgetPropertySchema, calendarWidgetPropertySchema, cardWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, cleanTokenFromUrl, clearTokens, collectNavSlugs, contactsScreenPropertySchema, containerWidgetPropertySchema, createCompanyQueryKey, createDefaultAuthConfig, createDefaultAuthRedirect, createDefaultFluidConfig, createFluidClient, createFluidFileUploader, createPortal, createScreen, createWidgetFromShareable, createWidgetRegistry, customersScreenPropertySchema, decodeToken, deriveDarkVariant, deserialiseTheme, embedWidgetPropertySchema, extractAllTokensFromUrl, extractCompanyTokenFromUrl, extractSlugFromPathname, extractTokenFromUrl, filterRepOnlyNavItems, gapValues, generateShades, generateThemeCSS, getActiveThemeId, getAvailablePageTemplates, getCorePageTemplates, getDefaultThemeDefinition, getForegroundColor, getOptionalPageTemplates, getProperty, getStoredToken, getThemeModeAttribute, getTokenExpiration, getTokenTimeRemaining, groupChildrenByColumn, hasData, hasStoredToken, hasTokenInUrl, imageWidgetPropertySchema, isActivitySlug, isApiError, isContactStatus, isErrorResult, isIdle, isLoading, isPropertyFieldType, isSlugInSection, isTokenExpired, isUserType, isValidToken, isWidgetType, isWidgetTypeName, layoutWidgetPropertySchema, linkWidgetPropertySchema, listWidgetPropertySchema, matchSlugPrefix, mergeDarkOverrides, messagingScreenPropertySchema, mySiteScreenPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, normalizeComponentTree, ordersScreenPropertySchema, parseColor, pointsWidgetPropertySchema, productsScreenPropertySchema, profileScreenPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, removeAllThemes, removeTheme, resolveNavigationPages, resolveTheme, screenPropertySchemas, sectionLayoutConfig, selectProperty, separatorWidgetPropertySchema, serialiseTheme, shareablesScreenPropertySchema, shopScreenPropertySchema, spacerWidgetPropertySchema, storeToken, subscriptionsScreenPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, toNavigationItem, toScreenDefinition, transformManifestToRepAppData, transformThemes, useActivities, useAppNavigation, useCalendarEvents, useCatchUps, useCompanyScopedQueryKey, useCompanySwitch, useContact, useContacts, useConversationMessages, useConversations, useCurrentRep, useCurrentUser, useFluidApi, useFluidApp, useFluidAuth, useFluidAuthContext, useFluidContext, useFluidPermissions, useFluidProfile, useFluidTheme, useLogout, useMessagingAuth, useMessagingConfig, useMySite, usePageTemplates, useResolvedPages, useThemeContext, useThemeMode, useTodos, useUserType, validateNavigationPages, validateToken, videoWidgetPropertySchema, widgetPropertySchemas };
|
|
4447
4814
|
|
|
4448
4815
|
//# sourceMappingURL=index.mjs.map
|