@fluid-app/portal-sdk 0.1.28 → 0.1.30
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/{AppNavigationContext-DrayF_RG.cjs → AppNavigationContext-DAcrNgXZ.cjs} +1 -1
- package/dist/{AppNavigationContext-DrayF_RG.cjs.map → AppNavigationContext-DAcrNgXZ.cjs.map} +1 -1
- package/dist/{AppNavigationContext-2nkMoO8F.mjs → AppNavigationContext-v_y8OYHo.mjs} +1 -1
- package/dist/{AppNavigationContext-2nkMoO8F.mjs.map → AppNavigationContext-v_y8OYHo.mjs.map} +1 -1
- package/dist/{ContactsScreen-GPOgZ-Wi.cjs → ContactsScreen-BL5Jlaz5.cjs} +2 -2
- package/dist/{ContactsScreen-GPOgZ-Wi.cjs.map → ContactsScreen-BL5Jlaz5.cjs.map} +1 -1
- package/dist/{ContactsScreen-BicHZ37M.mjs → ContactsScreen-CcNUC8xu.mjs} +2 -2
- package/dist/{ContactsScreen-BicHZ37M.mjs.map → ContactsScreen-CcNUC8xu.mjs.map} +1 -1
- package/dist/{CoreScreenPlaceholder-Cl_zuOBC.cjs → CoreScreenPlaceholder-B64M78iR.cjs} +1 -1
- package/dist/{CoreScreenPlaceholder-Cl_zuOBC.cjs.map → CoreScreenPlaceholder-B64M78iR.cjs.map} +1 -1
- package/dist/{CoreScreenPlaceholder-Cdyl97Wo.mjs → CoreScreenPlaceholder-DVVLc-OM.mjs} +1 -1
- package/dist/{CoreScreenPlaceholder-Cdyl97Wo.mjs.map → CoreScreenPlaceholder-DVVLc-OM.mjs.map} +1 -1
- package/dist/{CustomersScreen-Brz5zLkq.mjs → CustomersScreen-SuHGSUdb.mjs} +2 -2
- package/dist/{CustomersScreen-Brz5zLkq.mjs.map → CustomersScreen-SuHGSUdb.mjs.map} +1 -1
- package/dist/{CustomersScreen-CK1jJhvM.cjs → CustomersScreen-zl_vRzcJ.cjs} +2 -2
- package/dist/{CustomersScreen-CK1jJhvM.cjs.map → CustomersScreen-zl_vRzcJ.cjs.map} +1 -1
- package/dist/{MessagingScreen-DVU3c8fX.mjs → MessagingScreen-BGzfLD8k.mjs} +2 -2
- package/dist/{MessagingScreen-sAWF7pjl.cjs → MessagingScreen-CRLd91tP.cjs} +2 -2
- package/dist/{MessagingScreen-sAWF7pjl.cjs.map → MessagingScreen-CRLd91tP.cjs.map} +1 -1
- package/dist/{MessagingScreen-C33eDdna.cjs → MessagingScreen-DIZ72Tg0.cjs} +2 -2
- package/dist/{MessagingScreen-II_iNqLk.mjs → MessagingScreen-We1B2pka.mjs} +2 -2
- package/dist/{MessagingScreen-II_iNqLk.mjs.map → MessagingScreen-We1B2pka.mjs.map} +1 -1
- package/dist/OrdersScreen-Bu-ENmH6.cjs +133 -0
- package/dist/OrdersScreen-Bu-ENmH6.cjs.map +1 -0
- package/dist/OrdersScreen-TSXDDHZe.cjs +33 -0
- package/dist/OrdersScreen-afRAHf07.mjs +126 -0
- package/dist/OrdersScreen-afRAHf07.mjs.map +1 -0
- package/dist/{ProductsScreen-DrrBYFl0.mjs → ProductsScreen-B-oWUzvD.mjs} +3 -3
- package/dist/{ProductsScreen-BOngRxSO.mjs → ProductsScreen-ChvK61hX.mjs} +3 -3
- package/dist/{ProductsScreen-BOngRxSO.mjs.map → ProductsScreen-ChvK61hX.mjs.map} +1 -1
- package/dist/{ProductsScreen-DzD-TPh5.cjs → ProductsScreen-CkE2nyuw.cjs} +3 -3
- package/dist/{ProductsScreen-DzD-TPh5.cjs.map → ProductsScreen-CkE2nyuw.cjs.map} +1 -1
- package/dist/{ProductsScreen-CdP_m_Ok.cjs → ProductsScreen-PCg91SbX.cjs} +3 -3
- package/dist/ProfileScreen-B6Dp7RLa.cjs +2856 -0
- package/dist/ProfileScreen-B6Dp7RLa.cjs.map +1 -0
- package/dist/ProfileScreen-B83tzedh.mjs +2849 -0
- package/dist/ProfileScreen-B83tzedh.mjs.map +1 -0
- package/dist/{AccountScreen-Vzz8W4Iq.cjs → ProfileScreen-CH3B-IQz.cjs} +3 -3
- package/dist/{ShareablesScreen-DYPJgZ3z.cjs → ShareablesScreen-Bqj6dtOM.cjs} +3 -3
- package/dist/{ShareablesScreen-DYPJgZ3z.cjs.map → ShareablesScreen-Bqj6dtOM.cjs.map} +1 -1
- package/dist/{ShareablesScreen-jHqLmOC6.cjs → ShareablesScreen-BvJIBZvI.cjs} +3 -3
- package/dist/{ShareablesScreen-CQy39TAK.mjs → ShareablesScreen-ChS517hq.mjs} +3 -3
- package/dist/{ShareablesScreen-CQy39TAK.mjs.map → ShareablesScreen-ChS517hq.mjs.map} +1 -1
- package/dist/{ShareablesScreen-BsqZvRSK.mjs → ShareablesScreen-CqVj81Ol.mjs} +3 -3
- package/dist/{ShopScreen-BPCwix1m.cjs → ShopScreen-CjoTGnCJ.cjs} +2 -2
- package/dist/{ShopScreen-BPCwix1m.cjs.map → ShopScreen-CjoTGnCJ.cjs.map} +1 -1
- package/dist/{ShopScreen--pUsiUNt.cjs → ShopScreen-DS4p47Ry.cjs} +1 -1
- package/dist/{ShopScreen-BKBzgkr7.mjs → ShopScreen-KeU6x3PT.mjs} +2 -2
- package/dist/{ShopScreen-BKBzgkr7.mjs.map → ShopScreen-KeU6x3PT.mjs.map} +1 -1
- package/dist/SubscriptionsScreen-CHn_Q0zf.cjs +1288 -0
- package/dist/SubscriptionsScreen-CHn_Q0zf.cjs.map +1 -0
- package/dist/SubscriptionsScreen-D5_eJwBP.mjs +1281 -0
- package/dist/SubscriptionsScreen-D5_eJwBP.mjs.map +1 -0
- package/dist/SubscriptionsScreen-DGJ_YeX3.cjs +33 -0
- package/dist/{es-kNOrmozy.cjs → es-BtechuHV.cjs} +1 -1
- package/dist/{es-kNOrmozy.cjs.map → es-BtechuHV.cjs.map} +1 -1
- package/dist/{es-BL8VBBDa.mjs → es-DxWiENwN.mjs} +1 -1
- package/dist/{es-BL8VBBDa.mjs.map → es-DxWiENwN.mjs.map} +1 -1
- package/dist/index.cjs +166 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -8
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +38 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +162 -92
- package/dist/index.mjs.map +1 -1
- package/dist/src-BZEkCfd4.mjs +973 -0
- package/dist/src-BZEkCfd4.mjs.map +1 -0
- package/dist/src-DXC-Jw6i.cjs +1009 -0
- package/dist/src-DXC-Jw6i.cjs.map +1 -0
- package/dist/{src-DMjlIMO9.cjs → src-vxm9rMYT.cjs} +2 -2
- package/dist/{src-DMjlIMO9.cjs.map → src-vxm9rMYT.cjs.map} +1 -1
- package/dist/{src-9pW9wS5O.mjs → src-wpQFW94i.mjs} +2 -2
- package/dist/{src-9pW9wS5O.mjs.map → src-wpQFW94i.mjs.map} +1 -1
- package/dist/use-account-clients-DYTyFvdN.mjs +134 -0
- package/dist/use-account-clients-DYTyFvdN.mjs.map +1 -0
- package/dist/use-account-clients-n2a8bdSP.cjs +182 -0
- package/dist/use-account-clients-n2a8bdSP.cjs.map +1 -0
- package/package.json +10 -10
- package/dist/AccountScreen-Dp6QFyEr.cjs +0 -5322
- package/dist/AccountScreen-Dp6QFyEr.cjs.map +0 -1
- package/dist/AccountScreen-E4ZBgOUS.mjs +0 -5309
- package/dist/AccountScreen-E4ZBgOUS.mjs.map +0 -1
- package/dist/OrdersScreen-DGt-CTBS.mjs +0 -24
- package/dist/OrdersScreen-DGt-CTBS.mjs.map +0 -1
- package/dist/OrdersScreen-Dy-JChVQ.cjs +0 -41
- package/dist/OrdersScreen-Dy-JChVQ.cjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as extractTokenFromUrl, A as DEFAULT_FONT_SIZES, B as mergeDarkOverrides, C as buildThemeDefinition, D as serialiseTheme, E as deserialiseTheme, F as getDefaultThemeDefinition, G as RADIUS_KEYS, H as resolveTheme, I as generateThemeCSS, J as DEFAULT_AUTH_URL, K as SEMANTIC_COLOR_NAMES, L as deriveDarkVariant, M as DEFAULT_SPACING, N as DEFAULT_THEME_ID, O as DEFAULT_COLORS, P as DEFAULT_THEME_NAME, Q as extractCompanyTokenFromUrl, R as generateShades, S as removeTheme, T as transformThemes, U as FONT_FAMILY_KEYS, V as parseColor, W as FONT_SIZE_KEYS, X as cleanTokenFromUrl, Y as createDefaultAuthRedirect, Z as extractAllTokensFromUrl, _ as toNavigationItem, a as createScreen, at as decodeToken, b as applyTheme, c as useDataSourceRegistryConfig, ct as isTokenExpired, d as FluidThemeProvider, dt as AUTH_CONSTANTS, et as hasTokenInUrl, f as useThemeContext, ft as STORAGE_KEYS, g as transformManifestToRepAppData, h as isApiError, ht as isUserType, i as widgetPropertySchemas, it as storeToken, j as DEFAULT_RADII, k as DEFAULT_FONT_FAMILIES, l as FluidAuthProvider, lt as isValidToken, m as createFluidClient, mt as USER_TYPES, n as useFluidContext, nt as getStoredToken, o as createWidgetFromShareable, ot as getTokenExpiration, p as ApiError, pt as URL_PARAMS, q as SHADE_STEPS, r as DEFAULT_SDK_WIDGET_REGISTRY, rt as hasStoredToken, s as createWidgetRegistry, st as getTokenTimeRemaining, t as FluidProvider, tt as clearTokens, u as useFluidAuthContext, ut as validateToken, v as normalizeComponentTree, w as getActiveThemeId, x as removeAllThemes, y as toScreenDefinition, z as getForegroundColor } from "./FluidProvider-x96kqsgN.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { r as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-B83tzedh.mjs";
|
|
3
3
|
import "./error-state-ChXg5_p-.mjs";
|
|
4
4
|
import { a as sectionLayoutConfig, c as assertNever, f as useRegistry, i as groupChildrenByColumn, l as isWidgetType, o as WIDGET_TYPE_NAMES, r as layoutWidgetPropertySchema, s as assertDefined, t as LayoutWidget, u as isWidgetTypeName } from "./LayoutWidget-Dc_wvaLg.mjs";
|
|
5
5
|
import "./WidgetInteractionContext-MZuUseep.mjs";
|
|
@@ -10,7 +10,7 @@ import { r as alertWidgetPropertySchema, t as AlertWidget } from "./AlertWidget-
|
|
|
10
10
|
import { r as calendarWidgetPropertySchema, t as CalendarWidget } from "./CalendarWidget-7ZL9lHKT.mjs";
|
|
11
11
|
import "./purify.es-CS-U7fYi.mjs";
|
|
12
12
|
import "./src-PSNQSAUF.mjs";
|
|
13
|
-
import { a as useMessagingAuth, i as useMessagingConfig, n as messagingScreenPropertySchema, r as createFluidFileUploader, t as MessagingScreen } from "./MessagingScreen-
|
|
13
|
+
import { a as useMessagingAuth, i as useMessagingConfig, n as messagingScreenPropertySchema, r as createFluidFileUploader, t as MessagingScreen } from "./MessagingScreen-We1B2pka.mjs";
|
|
14
14
|
import "./scroll-arrows-DqQW_zzf.mjs";
|
|
15
15
|
import "./MediaRenderer-DIlOQCjD.mjs";
|
|
16
16
|
import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "./CarouselWidget-jFV94CEm.mjs";
|
|
@@ -30,21 +30,24 @@ import { r as toDoWidgetPropertySchema, t as ToDoWidget } from "./ToDoWidget-CmJ
|
|
|
30
30
|
import { r as videoWidgetPropertySchema, t as VideoWidget } from "./VideoWidget-D6aWKmRN.mjs";
|
|
31
31
|
import { t as useFluidApi } from "./use-fluid-api-Zq9sZ5vk.mjs";
|
|
32
32
|
import { i as useCurrentUser, r as CURRENT_USER_QUERY_KEY } from "./products-BAFSvGSa.mjs";
|
|
33
|
-
import {
|
|
34
|
-
import "./
|
|
35
|
-
import { t as
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import { r as
|
|
39
|
-
import "./
|
|
40
|
-
import { r as
|
|
41
|
-
import {
|
|
42
|
-
import
|
|
33
|
+
import { c as useFluidAuth } from "./use-account-clients-DYTyFvdN.mjs";
|
|
34
|
+
import "./src-BZEkCfd4.mjs";
|
|
35
|
+
import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-D5_eJwBP.mjs";
|
|
36
|
+
import "./es-DxWiENwN.mjs";
|
|
37
|
+
import { t as CoreScreenPlaceholder } from "./CoreScreenPlaceholder-DVVLc-OM.mjs";
|
|
38
|
+
import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-CcNUC8xu.mjs";
|
|
39
|
+
import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigationContext-v_y8OYHo.mjs";
|
|
40
|
+
import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-afRAHf07.mjs";
|
|
41
|
+
import { r as customersScreenPropertySchema, t as CustomersScreen } from "./CustomersScreen-SuHGSUdb.mjs";
|
|
42
|
+
import "./src-wpQFW94i.mjs";
|
|
43
|
+
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-KeU6x3PT.mjs";
|
|
44
|
+
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-ChS517hq.mjs";
|
|
45
|
+
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-ChvK61hX.mjs";
|
|
43
46
|
import * as React$1 from "react";
|
|
44
47
|
import { Suspense, createContext, forwardRef, lazy, memo, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
45
48
|
import { useQueries, useQuery } from "@tanstack/react-query";
|
|
46
49
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
47
|
-
import { Bell, Box, Boxes, Briefcase, Calendar, CircleUser, Compass, ContactRound, Ellipsis, File, FileText, FileVideo, Folder, FolderOpen, Globe, GraduationCap, Heart, House, Image, LayoutGrid, ListMusic, Mail, Menu, MessageCircle, MessageSquare, Moon, PanelLeft, Repeat, Search, Settings, ShoppingCart, Star, Store, Sun, User, UserCog, Users, X } from "lucide-react";
|
|
50
|
+
import { Bell, Box, Boxes, Briefcase, Calendar, CircleUser, Compass, ContactRound, Ellipsis, File, FileText, FileVideo, Folder, FolderOpen, Globe, GraduationCap, Heart, House, Image, LayoutGrid, ListMusic, Mail, Menu, MessageCircle, MessageSquare, Moon, PackageOpen, PanelLeft, Repeat, Search, Settings, ShoppingCart, Star, Store, Sun, User, UserCog, Users, X } from "lucide-react";
|
|
48
51
|
import { clsx } from "clsx";
|
|
49
52
|
import { twMerge } from "tailwind-merge";
|
|
50
53
|
import { Slot } from "@radix-ui/react-slot";
|
|
@@ -2028,23 +2031,25 @@ function RequireAuth({ children, fallback = /* @__PURE__ */ jsx(AuthLoading, {})
|
|
|
2028
2031
|
//#endregion
|
|
2029
2032
|
//#region src/screens/index.ts
|
|
2030
2033
|
const screenPropertySchemas = {
|
|
2031
|
-
|
|
2032
|
-
MessagingScreen: () => import("./MessagingScreen-
|
|
2033
|
-
ContactsScreen: () => import("./ContactsScreen-
|
|
2034
|
-
OrdersScreen: () => import("./OrdersScreen-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2034
|
+
ProfileScreen: () => import("./ProfileScreen-B83tzedh.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
|
|
2035
|
+
MessagingScreen: () => import("./MessagingScreen-BGzfLD8k.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
2036
|
+
ContactsScreen: () => import("./ContactsScreen-CcNUC8xu.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
|
|
2037
|
+
OrdersScreen: () => import("./OrdersScreen-afRAHf07.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
|
|
2038
|
+
SubscriptionsScreen: () => import("./SubscriptionsScreen-D5_eJwBP.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
|
|
2039
|
+
CustomersScreen: () => import("./CustomersScreen-SuHGSUdb.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
2040
|
+
ProductsScreen: () => import("./ProductsScreen-B-oWUzvD.mjs").then((m) => m.productsScreenPropertySchema),
|
|
2041
|
+
ShareablesScreen: () => import("./ShareablesScreen-CqVj81Ol.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
2042
|
+
ShopScreen: () => import("./ShopScreen-KeU6x3PT.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema)
|
|
2039
2043
|
};
|
|
2040
2044
|
/**
|
|
2041
2045
|
* Core page template IDs
|
|
2042
2046
|
*/
|
|
2043
2047
|
const CORE_PAGE_IDS = {
|
|
2044
|
-
|
|
2048
|
+
PROFILE: "core-profile",
|
|
2045
2049
|
MESSAGING: "core-messaging",
|
|
2046
2050
|
CONTACTS: "core-contacts",
|
|
2047
2051
|
ORDERS: "core-orders",
|
|
2052
|
+
SUBSCRIPTIONS: "core-subscriptions",
|
|
2048
2053
|
CUSTOMERS: "core-customers",
|
|
2049
2054
|
PRODUCTS: "core-products",
|
|
2050
2055
|
SHAREABLES: "core-shareables",
|
|
@@ -2056,22 +2061,21 @@ const CORE_PAGE_IDS = {
|
|
|
2056
2061
|
*/
|
|
2057
2062
|
function registerCorePageTemplates() {
|
|
2058
2063
|
PageTemplateRegistry.register({
|
|
2059
|
-
id: CORE_PAGE_IDS.
|
|
2060
|
-
slug: "
|
|
2061
|
-
name: "
|
|
2062
|
-
description: "
|
|
2064
|
+
id: CORE_PAGE_IDS.PROFILE,
|
|
2065
|
+
slug: "profile",
|
|
2066
|
+
name: "Profile",
|
|
2067
|
+
description: "User profile management",
|
|
2063
2068
|
category: PAGE_CATEGORIES.CORE,
|
|
2064
2069
|
tags: [
|
|
2065
|
-
"account",
|
|
2066
2070
|
"profile",
|
|
2067
|
-
"
|
|
2068
|
-
"
|
|
2071
|
+
"account",
|
|
2072
|
+
"user"
|
|
2069
2073
|
],
|
|
2070
2074
|
version: "1.0.0",
|
|
2071
2075
|
isCore: true,
|
|
2072
2076
|
component_tree: [{
|
|
2073
|
-
type: "
|
|
2074
|
-
id: "
|
|
2077
|
+
type: "ProfileScreen",
|
|
2078
|
+
id: "profile-screen-root",
|
|
2075
2079
|
props: {}
|
|
2076
2080
|
}],
|
|
2077
2081
|
defaultProps: {}
|
|
@@ -2137,6 +2141,26 @@ function registerCorePageTemplates() {
|
|
|
2137
2141
|
}],
|
|
2138
2142
|
defaultProps: {}
|
|
2139
2143
|
});
|
|
2144
|
+
PageTemplateRegistry.register({
|
|
2145
|
+
id: CORE_PAGE_IDS.SUBSCRIPTIONS,
|
|
2146
|
+
slug: "subscriptions",
|
|
2147
|
+
name: "Subscriptions",
|
|
2148
|
+
description: "Subscription management provided by Fluid Commerce",
|
|
2149
|
+
category: PAGE_CATEGORIES.CORE,
|
|
2150
|
+
tags: [
|
|
2151
|
+
"subscriptions",
|
|
2152
|
+
"recurring",
|
|
2153
|
+
"commerce"
|
|
2154
|
+
],
|
|
2155
|
+
version: "1.0.0",
|
|
2156
|
+
isCore: true,
|
|
2157
|
+
component_tree: [{
|
|
2158
|
+
type: "SubscriptionsScreen",
|
|
2159
|
+
id: "subscriptions-screen-root",
|
|
2160
|
+
props: {}
|
|
2161
|
+
}],
|
|
2162
|
+
defaultProps: {}
|
|
2163
|
+
});
|
|
2140
2164
|
PageTemplateRegistry.register({
|
|
2141
2165
|
id: CORE_PAGE_IDS.CUSTOMERS,
|
|
2142
2166
|
slug: "customers",
|
|
@@ -2693,14 +2717,12 @@ function getThemeModeAttribute(mode) {
|
|
|
2693
2717
|
//#endregion
|
|
2694
2718
|
//#region ../core/src/navigation/system-navigation-items.ts
|
|
2695
2719
|
const SYSTEM_NAVIGATION_SLUGS = [
|
|
2696
|
-
"account",
|
|
2697
|
-
"account/profile",
|
|
2698
|
-
"account/orders",
|
|
2699
|
-
"account/subscriptions",
|
|
2700
2720
|
"contacts",
|
|
2721
|
+
"account",
|
|
2701
2722
|
"messages",
|
|
2702
2723
|
"my-site",
|
|
2703
2724
|
"orders",
|
|
2725
|
+
"profile",
|
|
2704
2726
|
"subscriptions",
|
|
2705
2727
|
"share/media",
|
|
2706
2728
|
"share/playlists",
|
|
@@ -2709,30 +2731,6 @@ const SYSTEM_NAVIGATION_SLUGS = [
|
|
|
2709
2731
|
"upgrade"
|
|
2710
2732
|
];
|
|
2711
2733
|
const SYSTEM_NAVIGATION_ITEMS = {
|
|
2712
|
-
account: {
|
|
2713
|
-
slug: "account",
|
|
2714
|
-
label: "Account",
|
|
2715
|
-
icon: "address-card",
|
|
2716
|
-
section: "User"
|
|
2717
|
-
},
|
|
2718
|
-
"account/profile": {
|
|
2719
|
-
slug: "account/profile",
|
|
2720
|
-
label: "Profile",
|
|
2721
|
-
icon: "user",
|
|
2722
|
-
section: "User"
|
|
2723
|
-
},
|
|
2724
|
-
"account/orders": {
|
|
2725
|
-
slug: "account/orders",
|
|
2726
|
-
label: "Orders",
|
|
2727
|
-
icon: "shopping-cart",
|
|
2728
|
-
section: "User"
|
|
2729
|
-
},
|
|
2730
|
-
"account/subscriptions": {
|
|
2731
|
-
slug: "account/subscriptions",
|
|
2732
|
-
label: "Subscriptions",
|
|
2733
|
-
icon: "arrows-repeat",
|
|
2734
|
-
section: "User"
|
|
2735
|
-
},
|
|
2736
2734
|
contacts: {
|
|
2737
2735
|
slug: "contacts",
|
|
2738
2736
|
label: "Contacts",
|
|
@@ -2757,6 +2755,18 @@ const SYSTEM_NAVIGATION_ITEMS = {
|
|
|
2757
2755
|
icon: "shopping-cart",
|
|
2758
2756
|
section: "User"
|
|
2759
2757
|
},
|
|
2758
|
+
profile: {
|
|
2759
|
+
slug: "profile",
|
|
2760
|
+
label: "Profile",
|
|
2761
|
+
icon: "user",
|
|
2762
|
+
section: "User"
|
|
2763
|
+
},
|
|
2764
|
+
account: {
|
|
2765
|
+
slug: "profile",
|
|
2766
|
+
label: "Account",
|
|
2767
|
+
icon: "user",
|
|
2768
|
+
section: "User"
|
|
2769
|
+
},
|
|
2760
2770
|
"share/media": {
|
|
2761
2771
|
slug: "share/media",
|
|
2762
2772
|
label: "Media",
|
|
@@ -2803,23 +2813,14 @@ function isSystemNavigationItem(slug) {
|
|
|
2803
2813
|
return SYSTEM_NAVIGATION_SLUGS.includes(slug) || slug === "app-download";
|
|
2804
2814
|
}
|
|
2805
2815
|
/**
|
|
2806
|
-
* Slugs that are sub-routes of a parent system page and should not appear
|
|
2807
|
-
* as standalone items in quick-links dropdowns or the builder page picker.
|
|
2808
|
-
*/
|
|
2809
|
-
const CHILD_SLUGS = new Set([
|
|
2810
|
-
"account/profile",
|
|
2811
|
-
"account/orders",
|
|
2812
|
-
"account/subscriptions"
|
|
2813
|
-
]);
|
|
2814
|
-
/**
|
|
2815
2816
|
* Get system navigation items grouped by section.
|
|
2816
|
-
* Child slugs (e.g. account/profile) are excluded because they are handled
|
|
2817
|
-
* by their parent screen's internal routing.
|
|
2818
2817
|
*/
|
|
2819
2818
|
function getSystemNavigationBySection() {
|
|
2820
2819
|
const sections = {};
|
|
2820
|
+
const seenSlugs = /* @__PURE__ */ new Set();
|
|
2821
2821
|
for (const item of Object.values(SYSTEM_NAVIGATION_ITEMS)) {
|
|
2822
|
-
if (item.slug &&
|
|
2822
|
+
if (item.slug && seenSlugs.has(item.slug)) continue;
|
|
2823
|
+
if (item.slug) seenSlugs.add(item.slug);
|
|
2823
2824
|
const section = item.section || "Other";
|
|
2824
2825
|
if (!sections[section]) sections[section] = [];
|
|
2825
2826
|
sections[section].push(item);
|
|
@@ -3494,19 +3495,79 @@ function BuilderScreenViewImpl({ screen, className }) {
|
|
|
3494
3495
|
}
|
|
3495
3496
|
const BuilderScreenView = memo(BuilderScreenViewImpl);
|
|
3496
3497
|
//#endregion
|
|
3498
|
+
//#region src/account/account-management-layout.tsx
|
|
3499
|
+
const NAV_ITEMS = [
|
|
3500
|
+
{
|
|
3501
|
+
key: "profile",
|
|
3502
|
+
label: "Profile",
|
|
3503
|
+
slug: "profile",
|
|
3504
|
+
icon: User
|
|
3505
|
+
},
|
|
3506
|
+
{
|
|
3507
|
+
key: "orders",
|
|
3508
|
+
label: "Orders",
|
|
3509
|
+
slug: "orders",
|
|
3510
|
+
icon: PackageOpen
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
key: "subscriptions",
|
|
3514
|
+
label: "Subscriptions",
|
|
3515
|
+
slug: "subscriptions",
|
|
3516
|
+
icon: Repeat
|
|
3517
|
+
}
|
|
3518
|
+
];
|
|
3519
|
+
function getActiveTab(slug) {
|
|
3520
|
+
const root = slug.split("/")[0];
|
|
3521
|
+
if (root === "orders") return "orders";
|
|
3522
|
+
if (root === "subscriptions") return "subscriptions";
|
|
3523
|
+
return "profile";
|
|
3524
|
+
}
|
|
3525
|
+
function AccountManageLayout({ children }) {
|
|
3526
|
+
const { currentSlug, navigate } = useAppNavigation();
|
|
3527
|
+
const activeTab = getActiveTab(currentSlug);
|
|
3528
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
3529
|
+
className: "flex flex-col md:flex-row",
|
|
3530
|
+
children: [
|
|
3531
|
+
/* @__PURE__ */ jsx("nav", {
|
|
3532
|
+
className: "flex gap-1 overflow-x-auto border-b px-4 py-2 md:hidden",
|
|
3533
|
+
children: NAV_ITEMS.map(({ key, slug, label, icon: Icon }) => /* @__PURE__ */ jsxs("button", {
|
|
3534
|
+
type: "button",
|
|
3535
|
+
onClick: () => navigate(slug),
|
|
3536
|
+
className: `flex items-center gap-2 rounded-md px-3 py-2 text-sm font-medium whitespace-nowrap ${activeTab === key ? "bg-sidebar-primary text-sidebar-primary-foreground" : "hover:bg-sidebar-primary hover:text-sidebar-primary-foreground"}`,
|
|
3537
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }), label]
|
|
3538
|
+
}, key))
|
|
3539
|
+
}),
|
|
3540
|
+
/* @__PURE__ */ jsx("nav", {
|
|
3541
|
+
className: "hidden w-48 shrink-0 flex-col gap-1 p-4 md:flex",
|
|
3542
|
+
children: NAV_ITEMS.map(({ key, slug, label, icon: Icon }) => /* @__PURE__ */ jsxs("button", {
|
|
3543
|
+
type: "button",
|
|
3544
|
+
onClick: () => navigate(slug),
|
|
3545
|
+
className: `flex items-center gap-2 rounded-md px-3 py-2 text-left text-sm font-medium ${activeTab === key ? "bg-sidebar-primary text-sidebar-primary-foreground" : "hover:bg-sidebar-primary hover:text-sidebar-primary-foreground"}`,
|
|
3546
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }), label]
|
|
3547
|
+
}, key))
|
|
3548
|
+
}),
|
|
3549
|
+
/* @__PURE__ */ jsx("div", {
|
|
3550
|
+
className: "min-w-0 flex-1",
|
|
3551
|
+
children
|
|
3552
|
+
})
|
|
3553
|
+
]
|
|
3554
|
+
});
|
|
3555
|
+
}
|
|
3556
|
+
//#endregion
|
|
3497
3557
|
//#region src/shell/PageRouter.tsx
|
|
3498
|
-
const
|
|
3499
|
-
const
|
|
3500
|
-
const
|
|
3501
|
-
const
|
|
3502
|
-
const
|
|
3503
|
-
const
|
|
3504
|
-
const
|
|
3558
|
+
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-B83tzedh.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
|
|
3559
|
+
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-afRAHf07.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
|
|
3560
|
+
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-D5_eJwBP.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
3561
|
+
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-BGzfLD8k.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
3562
|
+
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-CcNUC8xu.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
3563
|
+
const ShopScreen$1 = lazy(() => import("./ShopScreen-KeU6x3PT.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
|
|
3564
|
+
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-SuHGSUdb.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
3565
|
+
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-B-oWUzvD.mjs").then((m) => ({ default: m.ProductsScreen })));
|
|
3566
|
+
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-CqVj81Ol.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
3505
3567
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
"account/subscriptions": AccountScreen$1,
|
|
3568
|
+
profile: ProfileScreen$1,
|
|
3569
|
+
orders: OrdersScreen$1,
|
|
3570
|
+
subscriptions: SubscriptionsScreen$1,
|
|
3510
3571
|
messages: MessagingScreen$1,
|
|
3511
3572
|
contacts: ContactsScreen$1,
|
|
3512
3573
|
shop: ShopScreen$1,
|
|
@@ -3519,6 +3580,11 @@ const SYSTEM_SLUG_SCREEN_MAP = {
|
|
|
3519
3580
|
"share/playlist": ShareablesScreen$1,
|
|
3520
3581
|
"share/files": ShareablesScreen$1
|
|
3521
3582
|
};
|
|
3583
|
+
const ACCOUNT_SLUGS = new Set([
|
|
3584
|
+
"profile",
|
|
3585
|
+
"orders",
|
|
3586
|
+
"subscriptions"
|
|
3587
|
+
]);
|
|
3522
3588
|
/** Pre-sorted keys for greedy prefix matching (longest first). */
|
|
3523
3589
|
const SORTED_SCREEN_KEYS = Object.keys(SYSTEM_SLUG_SCREEN_MAP).sort((a, b) => b.length - a.length);
|
|
3524
3590
|
/** Prefix-match a slug against screen map keys, longest match first. */
|
|
@@ -3560,13 +3626,17 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
|
|
|
3560
3626
|
});
|
|
3561
3627
|
}
|
|
3562
3628
|
const SystemScreen = SYSTEM_SLUG_SCREEN_MAP[baseSlug] ?? findScreenByPrefix(currentSlug, SYSTEM_SLUG_SCREEN_MAP);
|
|
3563
|
-
if (SystemScreen)
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3629
|
+
if (SystemScreen) {
|
|
3630
|
+
const content = /* @__PURE__ */ jsx(Suspense, {
|
|
3631
|
+
fallback: /* @__PURE__ */ jsx("div", {
|
|
3632
|
+
className: "flex h-full items-center justify-center",
|
|
3633
|
+
children: /* @__PURE__ */ jsx("div", { className: "border-primary h-8 w-8 animate-spin rounded-full border-2 border-t-transparent" })
|
|
3634
|
+
}),
|
|
3635
|
+
children: /* @__PURE__ */ jsx(SystemScreen, {})
|
|
3636
|
+
});
|
|
3637
|
+
if (ACCOUNT_SLUGS.has(baseSlug)) return /* @__PURE__ */ jsx(AccountManageLayout, { children: content });
|
|
3638
|
+
return content;
|
|
3639
|
+
}
|
|
3570
3640
|
if (isSystemNavigationItem(baseSlug)) return /* @__PURE__ */ jsx(CoreScreenPlaceholder, { name: currentNavItem?.label ?? baseSlug });
|
|
3571
3641
|
if (builderScreen) return /* @__PURE__ */ jsx(BuilderScreenView, { screen: builderScreen });
|
|
3572
3642
|
return /* @__PURE__ */ jsx(CoreScreenPlaceholder, { name: currentNavItem?.label ?? currentSlug });
|
|
@@ -3586,8 +3656,8 @@ const DEFAULT_NAVIGATION = [
|
|
|
3586
3656
|
children: []
|
|
3587
3657
|
},
|
|
3588
3658
|
{
|
|
3589
|
-
slug: "
|
|
3590
|
-
label: "
|
|
3659
|
+
slug: "profile",
|
|
3660
|
+
label: "Profile",
|
|
3591
3661
|
icon: "user-gear",
|
|
3592
3662
|
children: []
|
|
3593
3663
|
},
|
|
@@ -3796,6 +3866,6 @@ const AppLink = forwardRef(function AppLink({ to, onClick, children, ...rest },
|
|
|
3796
3866
|
});
|
|
3797
3867
|
});
|
|
3798
3868
|
//#endregion
|
|
3799
|
-
export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, AUTH_CONSTANTS,
|
|
3869
|
+
export { ACTIVITY_SLUGS, APP_DATA_QUERY_KEY, AUTH_CONSTANTS, AlertWidget, ApiError, AppLink, AppNavigationProvider, AppShell, AuthError, AuthLoading, BuilderScreenView, CORE_PAGE_IDS, CURRENT_REP_QUERY_KEY, CURRENT_USER_QUERY_KEY, CalendarWidget, 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, ListWidget, MessagingScreen, MySiteWidget, NestedWidget, OrdersScreen, PAGE_CATEGORIES, PERMISSIONS_QUERY_KEY, PROFILE_QUERY_KEY, PROPERTY_FIELD_TYPES, PageRouter, PageTemplateProvider, PageTemplateRegistry, ProductsScreen, ProfileScreen, QuickLinksDropdown, QuickShareWidget, RADIUS_KEYS, RecentActivityWidget, RequireAuth, SEMANTIC_COLOR_NAMES, SHADE_STEPS, STORAGE_KEYS, SdkHeader, SdkNavigation, ShareablesScreen, ShopScreen, SpacerWidget, SubscriptionsScreen, TableWidget, TextWidget, ThemeModeProvider, ToDoWidget, URL_PARAMS, USER_TYPES, VideoWidget, WIDGET_TYPE_NAMES, alertWidgetPropertySchema, applyTheme, assertDefined, assertNever, buildThemeDefinition, calendarWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, cleanTokenFromUrl, clearTokens, collectNavSlugs, contactsScreenPropertySchema, containerWidgetPropertySchema, createDefaultAuthRedirect, createFluidClient, createFluidFileUploader, 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, listWidgetPropertySchema, matchSlugPrefix, mergeDarkOverrides, messagingScreenPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, normalizeComponentTree, ordersScreenPropertySchema, parseColor, productsScreenPropertySchema, profileScreenPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, removeAllThemes, removeTheme, resolveNavigationPages, resolveTheme, screenPropertySchemas, sectionLayoutConfig, selectProperty, serialiseTheme, shareablesScreenPropertySchema, shopScreenPropertySchema, spacerWidgetPropertySchema, storeToken, subscriptionsScreenPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, toNavigationItem, toScreenDefinition, transformManifestToRepAppData, transformThemes, useActivities, useAppNavigation, useCalendarEvents, useCatchUps, useContact, useContacts, useConversationMessages, useConversations, useCurrentRep, useCurrentUser, useFluidApi, useFluidApp, useFluidAuth, useFluidAuthContext, useFluidContext, useFluidPermissions, useFluidProfile, useFluidTheme, useMessagingAuth, useMessagingConfig, useMySite, usePageTemplates, useResolvedPages, useThemeContext, useThemeMode, useTodos, validateNavigationPages, validateToken, videoWidgetPropertySchema, widgetPropertySchemas };
|
|
3800
3870
|
|
|
3801
3871
|
//# sourceMappingURL=index.mjs.map
|