@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.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-9hOWP6kD.cjs");
|
|
3
3
|
const require_FluidProvider = require("./FluidProvider-BmkSwcgV.cjs");
|
|
4
|
-
const
|
|
4
|
+
const require_ProfileScreen = require("./ProfileScreen-B6Dp7RLa.cjs");
|
|
5
5
|
require("./error-state-BcEAq2rK.cjs");
|
|
6
6
|
const require_LayoutWidget = require("./LayoutWidget-fOBC-EML.cjs");
|
|
7
7
|
require("./WidgetInteractionContext-BaEGs5dy.cjs");
|
|
@@ -31,17 +31,20 @@ const require_ToDoWidget = require("./ToDoWidget-CrZ9xJV1.cjs");
|
|
|
31
31
|
const require_VideoWidget = require("./VideoWidget-BJrnmHCe.cjs");
|
|
32
32
|
const require_use_fluid_api = require("./use-fluid-api-DvJuEWRf.cjs");
|
|
33
33
|
const require_products = require("./products-CH5kIItT.cjs");
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
require("./
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
require("./
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
34
|
+
const require_use_account_clients = require("./use-account-clients-n2a8bdSP.cjs");
|
|
35
|
+
const require_MessagingScreen = require("./MessagingScreen-CRLd91tP.cjs");
|
|
36
|
+
require("./src-DXC-Jw6i.cjs");
|
|
37
|
+
const require_SubscriptionsScreen = require("./SubscriptionsScreen-CHn_Q0zf.cjs");
|
|
38
|
+
require("./es-BtechuHV.cjs");
|
|
39
|
+
const require_CoreScreenPlaceholder = require("./CoreScreenPlaceholder-B64M78iR.cjs");
|
|
40
|
+
const require_ContactsScreen = require("./ContactsScreen-BL5Jlaz5.cjs");
|
|
41
|
+
const require_AppNavigationContext = require("./AppNavigationContext-DAcrNgXZ.cjs");
|
|
42
|
+
const require_OrdersScreen = require("./OrdersScreen-Bu-ENmH6.cjs");
|
|
43
|
+
const require_CustomersScreen = require("./CustomersScreen-zl_vRzcJ.cjs");
|
|
44
|
+
require("./src-vxm9rMYT.cjs");
|
|
45
|
+
const require_ShopScreen = require("./ShopScreen-CjoTGnCJ.cjs");
|
|
46
|
+
const require_ShareablesScreen = require("./ShareablesScreen-Bqj6dtOM.cjs");
|
|
47
|
+
const require_ProductsScreen = require("./ProductsScreen-CkE2nyuw.cjs");
|
|
45
48
|
let react = require("react");
|
|
46
49
|
react = require_chunk.__toESM(react);
|
|
47
50
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
@@ -2036,7 +2039,7 @@ function AuthLoading() {
|
|
|
2036
2039
|
* ```
|
|
2037
2040
|
*/
|
|
2038
2041
|
function RequireAuth({ children, fallback = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AuthLoading, {}), errorComponent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AuthError, {}) }) {
|
|
2039
|
-
const { isAuthenticated, isLoading, error } =
|
|
2042
|
+
const { isAuthenticated, isLoading, error } = require_use_account_clients.useFluidAuth();
|
|
2040
2043
|
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: fallback });
|
|
2041
2044
|
if (!isAuthenticated || error) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: errorComponent });
|
|
2042
2045
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
@@ -2044,23 +2047,25 @@ function RequireAuth({ children, fallback = /* @__PURE__ */ (0, react_jsx_runtim
|
|
|
2044
2047
|
//#endregion
|
|
2045
2048
|
//#region src/screens/index.ts
|
|
2046
2049
|
const screenPropertySchemas = {
|
|
2047
|
-
|
|
2048
|
-
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-
|
|
2049
|
-
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-
|
|
2050
|
-
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2050
|
+
ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-CH3B-IQz.cjs")).then((m) => m.profileScreenPropertySchema),
|
|
2051
|
+
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-DIZ72Tg0.cjs")).then((m) => m.messagingScreenPropertySchema),
|
|
2052
|
+
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-BL5Jlaz5.cjs")).then((n) => n.ContactsScreen_exports).then((m) => m.contactsScreenPropertySchema),
|
|
2053
|
+
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-TSXDDHZe.cjs")).then((m) => m.ordersScreenPropertySchema),
|
|
2054
|
+
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-DGJ_YeX3.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
|
|
2055
|
+
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-zl_vRzcJ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
|
|
2056
|
+
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-PCg91SbX.cjs")).then((m) => m.productsScreenPropertySchema),
|
|
2057
|
+
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-BvJIBZvI.cjs")).then((m) => m.shareablesScreenPropertySchema),
|
|
2058
|
+
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-DS4p47Ry.cjs")).then((m) => m.shopScreenPropertySchema)
|
|
2055
2059
|
};
|
|
2056
2060
|
/**
|
|
2057
2061
|
* Core page template IDs
|
|
2058
2062
|
*/
|
|
2059
2063
|
const CORE_PAGE_IDS = {
|
|
2060
|
-
|
|
2064
|
+
PROFILE: "core-profile",
|
|
2061
2065
|
MESSAGING: "core-messaging",
|
|
2062
2066
|
CONTACTS: "core-contacts",
|
|
2063
2067
|
ORDERS: "core-orders",
|
|
2068
|
+
SUBSCRIPTIONS: "core-subscriptions",
|
|
2064
2069
|
CUSTOMERS: "core-customers",
|
|
2065
2070
|
PRODUCTS: "core-products",
|
|
2066
2071
|
SHAREABLES: "core-shareables",
|
|
@@ -2072,22 +2077,21 @@ const CORE_PAGE_IDS = {
|
|
|
2072
2077
|
*/
|
|
2073
2078
|
function registerCorePageTemplates() {
|
|
2074
2079
|
PageTemplateRegistry.register({
|
|
2075
|
-
id: CORE_PAGE_IDS.
|
|
2076
|
-
slug: "
|
|
2077
|
-
name: "
|
|
2078
|
-
description: "
|
|
2080
|
+
id: CORE_PAGE_IDS.PROFILE,
|
|
2081
|
+
slug: "profile",
|
|
2082
|
+
name: "Profile",
|
|
2083
|
+
description: "User profile management",
|
|
2079
2084
|
category: PAGE_CATEGORIES.CORE,
|
|
2080
2085
|
tags: [
|
|
2081
|
-
"account",
|
|
2082
2086
|
"profile",
|
|
2083
|
-
"
|
|
2084
|
-
"
|
|
2087
|
+
"account",
|
|
2088
|
+
"user"
|
|
2085
2089
|
],
|
|
2086
2090
|
version: "1.0.0",
|
|
2087
2091
|
isCore: true,
|
|
2088
2092
|
component_tree: [{
|
|
2089
|
-
type: "
|
|
2090
|
-
id: "
|
|
2093
|
+
type: "ProfileScreen",
|
|
2094
|
+
id: "profile-screen-root",
|
|
2091
2095
|
props: {}
|
|
2092
2096
|
}],
|
|
2093
2097
|
defaultProps: {}
|
|
@@ -2153,6 +2157,26 @@ function registerCorePageTemplates() {
|
|
|
2153
2157
|
}],
|
|
2154
2158
|
defaultProps: {}
|
|
2155
2159
|
});
|
|
2160
|
+
PageTemplateRegistry.register({
|
|
2161
|
+
id: CORE_PAGE_IDS.SUBSCRIPTIONS,
|
|
2162
|
+
slug: "subscriptions",
|
|
2163
|
+
name: "Subscriptions",
|
|
2164
|
+
description: "Subscription management provided by Fluid Commerce",
|
|
2165
|
+
category: PAGE_CATEGORIES.CORE,
|
|
2166
|
+
tags: [
|
|
2167
|
+
"subscriptions",
|
|
2168
|
+
"recurring",
|
|
2169
|
+
"commerce"
|
|
2170
|
+
],
|
|
2171
|
+
version: "1.0.0",
|
|
2172
|
+
isCore: true,
|
|
2173
|
+
component_tree: [{
|
|
2174
|
+
type: "SubscriptionsScreen",
|
|
2175
|
+
id: "subscriptions-screen-root",
|
|
2176
|
+
props: {}
|
|
2177
|
+
}],
|
|
2178
|
+
defaultProps: {}
|
|
2179
|
+
});
|
|
2156
2180
|
PageTemplateRegistry.register({
|
|
2157
2181
|
id: CORE_PAGE_IDS.CUSTOMERS,
|
|
2158
2182
|
slug: "customers",
|
|
@@ -2709,14 +2733,12 @@ function getThemeModeAttribute(mode) {
|
|
|
2709
2733
|
//#endregion
|
|
2710
2734
|
//#region ../core/src/navigation/system-navigation-items.ts
|
|
2711
2735
|
const SYSTEM_NAVIGATION_SLUGS = [
|
|
2712
|
-
"account",
|
|
2713
|
-
"account/profile",
|
|
2714
|
-
"account/orders",
|
|
2715
|
-
"account/subscriptions",
|
|
2716
2736
|
"contacts",
|
|
2737
|
+
"account",
|
|
2717
2738
|
"messages",
|
|
2718
2739
|
"my-site",
|
|
2719
2740
|
"orders",
|
|
2741
|
+
"profile",
|
|
2720
2742
|
"subscriptions",
|
|
2721
2743
|
"share/media",
|
|
2722
2744
|
"share/playlists",
|
|
@@ -2725,30 +2747,6 @@ const SYSTEM_NAVIGATION_SLUGS = [
|
|
|
2725
2747
|
"upgrade"
|
|
2726
2748
|
];
|
|
2727
2749
|
const SYSTEM_NAVIGATION_ITEMS = {
|
|
2728
|
-
account: {
|
|
2729
|
-
slug: "account",
|
|
2730
|
-
label: "Account",
|
|
2731
|
-
icon: "address-card",
|
|
2732
|
-
section: "User"
|
|
2733
|
-
},
|
|
2734
|
-
"account/profile": {
|
|
2735
|
-
slug: "account/profile",
|
|
2736
|
-
label: "Profile",
|
|
2737
|
-
icon: "user",
|
|
2738
|
-
section: "User"
|
|
2739
|
-
},
|
|
2740
|
-
"account/orders": {
|
|
2741
|
-
slug: "account/orders",
|
|
2742
|
-
label: "Orders",
|
|
2743
|
-
icon: "shopping-cart",
|
|
2744
|
-
section: "User"
|
|
2745
|
-
},
|
|
2746
|
-
"account/subscriptions": {
|
|
2747
|
-
slug: "account/subscriptions",
|
|
2748
|
-
label: "Subscriptions",
|
|
2749
|
-
icon: "arrows-repeat",
|
|
2750
|
-
section: "User"
|
|
2751
|
-
},
|
|
2752
2750
|
contacts: {
|
|
2753
2751
|
slug: "contacts",
|
|
2754
2752
|
label: "Contacts",
|
|
@@ -2773,6 +2771,18 @@ const SYSTEM_NAVIGATION_ITEMS = {
|
|
|
2773
2771
|
icon: "shopping-cart",
|
|
2774
2772
|
section: "User"
|
|
2775
2773
|
},
|
|
2774
|
+
profile: {
|
|
2775
|
+
slug: "profile",
|
|
2776
|
+
label: "Profile",
|
|
2777
|
+
icon: "user",
|
|
2778
|
+
section: "User"
|
|
2779
|
+
},
|
|
2780
|
+
account: {
|
|
2781
|
+
slug: "profile",
|
|
2782
|
+
label: "Account",
|
|
2783
|
+
icon: "user",
|
|
2784
|
+
section: "User"
|
|
2785
|
+
},
|
|
2776
2786
|
"share/media": {
|
|
2777
2787
|
slug: "share/media",
|
|
2778
2788
|
label: "Media",
|
|
@@ -2819,23 +2829,14 @@ function isSystemNavigationItem(slug) {
|
|
|
2819
2829
|
return SYSTEM_NAVIGATION_SLUGS.includes(slug) || slug === "app-download";
|
|
2820
2830
|
}
|
|
2821
2831
|
/**
|
|
2822
|
-
* Slugs that are sub-routes of a parent system page and should not appear
|
|
2823
|
-
* as standalone items in quick-links dropdowns or the builder page picker.
|
|
2824
|
-
*/
|
|
2825
|
-
const CHILD_SLUGS = new Set([
|
|
2826
|
-
"account/profile",
|
|
2827
|
-
"account/orders",
|
|
2828
|
-
"account/subscriptions"
|
|
2829
|
-
]);
|
|
2830
|
-
/**
|
|
2831
2832
|
* Get system navigation items grouped by section.
|
|
2832
|
-
* Child slugs (e.g. account/profile) are excluded because they are handled
|
|
2833
|
-
* by their parent screen's internal routing.
|
|
2834
2833
|
*/
|
|
2835
2834
|
function getSystemNavigationBySection() {
|
|
2836
2835
|
const sections = {};
|
|
2836
|
+
const seenSlugs = /* @__PURE__ */ new Set();
|
|
2837
2837
|
for (const item of Object.values(SYSTEM_NAVIGATION_ITEMS)) {
|
|
2838
|
-
if (item.slug &&
|
|
2838
|
+
if (item.slug && seenSlugs.has(item.slug)) continue;
|
|
2839
|
+
if (item.slug) seenSlugs.add(item.slug);
|
|
2839
2840
|
const section = item.section || "Other";
|
|
2840
2841
|
if (!sections[section]) sections[section] = [];
|
|
2841
2842
|
sections[section].push(item);
|
|
@@ -3510,19 +3511,79 @@ function BuilderScreenViewImpl({ screen, className }) {
|
|
|
3510
3511
|
}
|
|
3511
3512
|
const BuilderScreenView = (0, react.memo)(BuilderScreenViewImpl);
|
|
3512
3513
|
//#endregion
|
|
3514
|
+
//#region src/account/account-management-layout.tsx
|
|
3515
|
+
const NAV_ITEMS = [
|
|
3516
|
+
{
|
|
3517
|
+
key: "profile",
|
|
3518
|
+
label: "Profile",
|
|
3519
|
+
slug: "profile",
|
|
3520
|
+
icon: lucide_react.User
|
|
3521
|
+
},
|
|
3522
|
+
{
|
|
3523
|
+
key: "orders",
|
|
3524
|
+
label: "Orders",
|
|
3525
|
+
slug: "orders",
|
|
3526
|
+
icon: lucide_react.PackageOpen
|
|
3527
|
+
},
|
|
3528
|
+
{
|
|
3529
|
+
key: "subscriptions",
|
|
3530
|
+
label: "Subscriptions",
|
|
3531
|
+
slug: "subscriptions",
|
|
3532
|
+
icon: lucide_react.Repeat
|
|
3533
|
+
}
|
|
3534
|
+
];
|
|
3535
|
+
function getActiveTab(slug) {
|
|
3536
|
+
const root = slug.split("/")[0];
|
|
3537
|
+
if (root === "orders") return "orders";
|
|
3538
|
+
if (root === "subscriptions") return "subscriptions";
|
|
3539
|
+
return "profile";
|
|
3540
|
+
}
|
|
3541
|
+
function AccountManageLayout({ children }) {
|
|
3542
|
+
const { currentSlug, navigate } = require_AppNavigationContext.useAppNavigation();
|
|
3543
|
+
const activeTab = getActiveTab(currentSlug);
|
|
3544
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3545
|
+
className: "flex flex-col md:flex-row",
|
|
3546
|
+
children: [
|
|
3547
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
3548
|
+
className: "flex gap-1 overflow-x-auto border-b px-4 py-2 md:hidden",
|
|
3549
|
+
children: NAV_ITEMS.map(({ key, slug, label, icon: Icon }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3550
|
+
type: "button",
|
|
3551
|
+
onClick: () => navigate(slug),
|
|
3552
|
+
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"}`,
|
|
3553
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "h-4 w-4" }), label]
|
|
3554
|
+
}, key))
|
|
3555
|
+
}),
|
|
3556
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
3557
|
+
className: "hidden w-48 shrink-0 flex-col gap-1 p-4 md:flex",
|
|
3558
|
+
children: NAV_ITEMS.map(({ key, slug, label, icon: Icon }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3559
|
+
type: "button",
|
|
3560
|
+
onClick: () => navigate(slug),
|
|
3561
|
+
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"}`,
|
|
3562
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "h-4 w-4" }), label]
|
|
3563
|
+
}, key))
|
|
3564
|
+
}),
|
|
3565
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3566
|
+
className: "min-w-0 flex-1",
|
|
3567
|
+
children
|
|
3568
|
+
})
|
|
3569
|
+
]
|
|
3570
|
+
});
|
|
3571
|
+
}
|
|
3572
|
+
//#endregion
|
|
3513
3573
|
//#region src/shell/PageRouter.tsx
|
|
3514
|
-
const
|
|
3515
|
-
const
|
|
3516
|
-
const
|
|
3517
|
-
const
|
|
3518
|
-
const
|
|
3519
|
-
const
|
|
3520
|
-
const
|
|
3574
|
+
const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-CH3B-IQz.cjs")).then((m) => ({ default: m.ProfileScreen })));
|
|
3575
|
+
const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-TSXDDHZe.cjs")).then((m) => ({ default: m.OrdersScreen })));
|
|
3576
|
+
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-DGJ_YeX3.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
3577
|
+
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-DIZ72Tg0.cjs")).then((m) => ({ default: m.MessagingScreen })));
|
|
3578
|
+
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-BL5Jlaz5.cjs")).then((n) => n.ContactsScreen_exports).then((m) => ({ default: m.ContactsScreen })));
|
|
3579
|
+
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-DS4p47Ry.cjs")).then((m) => ({ default: m.ShopScreen })));
|
|
3580
|
+
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-zl_vRzcJ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
|
|
3581
|
+
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-PCg91SbX.cjs")).then((m) => ({ default: m.ProductsScreen })));
|
|
3582
|
+
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-BvJIBZvI.cjs")).then((m) => ({ default: m.ShareablesScreen })));
|
|
3521
3583
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
"account/subscriptions": AccountScreen$1,
|
|
3584
|
+
profile: ProfileScreen$1,
|
|
3585
|
+
orders: OrdersScreen$1,
|
|
3586
|
+
subscriptions: SubscriptionsScreen$1,
|
|
3526
3587
|
messages: MessagingScreen$1,
|
|
3527
3588
|
contacts: ContactsScreen$1,
|
|
3528
3589
|
shop: ShopScreen$1,
|
|
@@ -3535,6 +3596,11 @@ const SYSTEM_SLUG_SCREEN_MAP = {
|
|
|
3535
3596
|
"share/playlist": ShareablesScreen$1,
|
|
3536
3597
|
"share/files": ShareablesScreen$1
|
|
3537
3598
|
};
|
|
3599
|
+
const ACCOUNT_SLUGS = new Set([
|
|
3600
|
+
"profile",
|
|
3601
|
+
"orders",
|
|
3602
|
+
"subscriptions"
|
|
3603
|
+
]);
|
|
3538
3604
|
/** Pre-sorted keys for greedy prefix matching (longest first). */
|
|
3539
3605
|
const SORTED_SCREEN_KEYS = Object.keys(SYSTEM_SLUG_SCREEN_MAP).sort((a, b) => b.length - a.length);
|
|
3540
3606
|
/** Prefix-match a slug against screen map keys, longest match first. */
|
|
@@ -3576,13 +3642,17 @@ function PageRouter({ currentSlug, currentNavItem, customPages, screens, baseSlu
|
|
|
3576
3642
|
});
|
|
3577
3643
|
}
|
|
3578
3644
|
const SystemScreen = SYSTEM_SLUG_SCREEN_MAP[baseSlug] ?? findScreenByPrefix(currentSlug, SYSTEM_SLUG_SCREEN_MAP);
|
|
3579
|
-
if (SystemScreen)
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3645
|
+
if (SystemScreen) {
|
|
3646
|
+
const content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
|
|
3647
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3648
|
+
className: "flex h-full items-center justify-center",
|
|
3649
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "border-primary h-8 w-8 animate-spin rounded-full border-2 border-t-transparent" })
|
|
3650
|
+
}),
|
|
3651
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SystemScreen, {})
|
|
3652
|
+
});
|
|
3653
|
+
if (ACCOUNT_SLUGS.has(baseSlug)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccountManageLayout, { children: content });
|
|
3654
|
+
return content;
|
|
3655
|
+
}
|
|
3586
3656
|
if (isSystemNavigationItem(baseSlug)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CoreScreenPlaceholder.CoreScreenPlaceholder, { name: currentNavItem?.label ?? baseSlug });
|
|
3587
3657
|
if (builderScreen) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BuilderScreenView, { screen: builderScreen });
|
|
3588
3658
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CoreScreenPlaceholder.CoreScreenPlaceholder, { name: currentNavItem?.label ?? currentSlug });
|
|
@@ -3602,8 +3672,8 @@ const DEFAULT_NAVIGATION = [
|
|
|
3602
3672
|
children: []
|
|
3603
3673
|
},
|
|
3604
3674
|
{
|
|
3605
|
-
slug: "
|
|
3606
|
-
label: "
|
|
3675
|
+
slug: "profile",
|
|
3676
|
+
label: "Profile",
|
|
3607
3677
|
icon: "user-gear",
|
|
3608
3678
|
children: []
|
|
3609
3679
|
},
|
|
@@ -3815,7 +3885,6 @@ const AppLink = (0, react.forwardRef)(function AppLink({ to, onClick, children,
|
|
|
3815
3885
|
exports.ACTIVITY_SLUGS = ACTIVITY_SLUGS;
|
|
3816
3886
|
exports.APP_DATA_QUERY_KEY = APP_DATA_QUERY_KEY;
|
|
3817
3887
|
exports.AUTH_CONSTANTS = require_FluidProvider.AUTH_CONSTANTS;
|
|
3818
|
-
exports.AccountScreen = require_AccountScreen.AccountScreen;
|
|
3819
3888
|
exports.AlertWidget = require_AlertWidget.AlertWidget;
|
|
3820
3889
|
exports.ApiError = require_FluidProvider.ApiError;
|
|
3821
3890
|
exports.AppLink = AppLink;
|
|
@@ -3864,6 +3933,7 @@ exports.PageRouter = PageRouter;
|
|
|
3864
3933
|
exports.PageTemplateProvider = PageTemplateProvider;
|
|
3865
3934
|
exports.PageTemplateRegistry = PageTemplateRegistry;
|
|
3866
3935
|
exports.ProductsScreen = require_ProductsScreen.ProductsScreen;
|
|
3936
|
+
exports.ProfileScreen = require_ProfileScreen.ProfileScreen;
|
|
3867
3937
|
exports.QuickLinksDropdown = QuickLinksDropdown;
|
|
3868
3938
|
exports.QuickShareWidget = require_QuickShareWidget.QuickShareWidget;
|
|
3869
3939
|
exports.RADIUS_KEYS = require_FluidProvider.RADIUS_KEYS;
|
|
@@ -3877,6 +3947,7 @@ exports.SdkNavigation = SdkNavigation;
|
|
|
3877
3947
|
exports.ShareablesScreen = require_ShareablesScreen.ShareablesScreen;
|
|
3878
3948
|
exports.ShopScreen = require_ShopScreen.ShopScreen;
|
|
3879
3949
|
exports.SpacerWidget = require_SpacerWidget.SpacerWidget;
|
|
3950
|
+
exports.SubscriptionsScreen = require_SubscriptionsScreen.SubscriptionsScreen;
|
|
3880
3951
|
exports.TableWidget = require_TableWidget.TableWidget;
|
|
3881
3952
|
exports.TextWidget = require_TextWidget.TextWidget;
|
|
3882
3953
|
exports.ThemeModeProvider = ThemeModeProvider;
|
|
@@ -3885,7 +3956,6 @@ exports.URL_PARAMS = require_FluidProvider.URL_PARAMS;
|
|
|
3885
3956
|
exports.USER_TYPES = require_FluidProvider.USER_TYPES;
|
|
3886
3957
|
exports.VideoWidget = require_VideoWidget.VideoWidget;
|
|
3887
3958
|
exports.WIDGET_TYPE_NAMES = require_LayoutWidget.WIDGET_TYPE_NAMES;
|
|
3888
|
-
exports.accountScreenPropertySchema = require_AccountScreen.accountScreenPropertySchema;
|
|
3889
3959
|
exports.alertWidgetPropertySchema = require_AlertWidget.alertWidgetPropertySchema;
|
|
3890
3960
|
exports.applyTheme = require_FluidProvider.applyTheme;
|
|
3891
3961
|
exports.assertDefined = require_LayoutWidget.assertDefined;
|
|
@@ -3958,6 +4028,7 @@ exports.normalizeComponentTree = require_FluidProvider.normalizeComponentTree;
|
|
|
3958
4028
|
exports.ordersScreenPropertySchema = require_OrdersScreen.ordersScreenPropertySchema;
|
|
3959
4029
|
exports.parseColor = require_FluidProvider.parseColor;
|
|
3960
4030
|
exports.productsScreenPropertySchema = require_ProductsScreen.productsScreenPropertySchema;
|
|
4031
|
+
exports.profileScreenPropertySchema = require_ProfileScreen.profileScreenPropertySchema;
|
|
3961
4032
|
exports.quickShareWidgetPropertySchema = require_QuickShareWidget.quickShareWidgetPropertySchema;
|
|
3962
4033
|
exports.recentActivityWidgetPropertySchema = require_RecentActivityWidget.recentActivityWidgetPropertySchema;
|
|
3963
4034
|
exports.removeAllThemes = require_FluidProvider.removeAllThemes;
|
|
@@ -3972,6 +4043,7 @@ exports.shareablesScreenPropertySchema = require_ShareablesScreen.shareablesScre
|
|
|
3972
4043
|
exports.shopScreenPropertySchema = require_ShopScreen.shopScreenPropertySchema;
|
|
3973
4044
|
exports.spacerWidgetPropertySchema = require_SpacerWidget.spacerWidgetPropertySchema;
|
|
3974
4045
|
exports.storeToken = require_FluidProvider.storeToken;
|
|
4046
|
+
exports.subscriptionsScreenPropertySchema = require_SubscriptionsScreen.subscriptionsScreenPropertySchema;
|
|
3975
4047
|
exports.tableWidgetPropertySchema = require_TableWidget.tableWidgetPropertySchema;
|
|
3976
4048
|
exports.textWidgetPropertySchema = require_TextWidget.textWidgetPropertySchema;
|
|
3977
4049
|
exports.toDoWidgetPropertySchema = require_ToDoWidget.toDoWidgetPropertySchema;
|
|
@@ -3991,7 +4063,7 @@ exports.useCurrentRep = useCurrentRep;
|
|
|
3991
4063
|
exports.useCurrentUser = require_products.useCurrentUser;
|
|
3992
4064
|
exports.useFluidApi = require_use_fluid_api.useFluidApi;
|
|
3993
4065
|
exports.useFluidApp = useFluidApp;
|
|
3994
|
-
exports.useFluidAuth =
|
|
4066
|
+
exports.useFluidAuth = require_use_account_clients.useFluidAuth;
|
|
3995
4067
|
exports.useFluidAuthContext = require_FluidProvider.useFluidAuthContext;
|
|
3996
4068
|
exports.useFluidContext = require_FluidProvider.useFluidContext;
|
|
3997
4069
|
exports.useFluidPermissions = useFluidPermissions;
|