@fluid-app/portal-sdk 0.1.82 → 0.1.83
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/{ContactsScreen-BF2txIn2.cjs → ContactsScreen-6gXKTN61.cjs} +2 -2
- package/dist/{ContactsScreen-BF2txIn2.cjs.map → ContactsScreen-6gXKTN61.cjs.map} +1 -1
- package/dist/{ContactsScreen-w2w-l_0b.mjs → ContactsScreen-FJUtn2_G.mjs} +2 -2
- package/dist/{ContactsScreen-w2w-l_0b.mjs.map → ContactsScreen-FJUtn2_G.mjs.map} +1 -1
- package/dist/{ContactsScreen-Cphil7Lf.cjs → ContactsScreen-aPH9Xaim.cjs} +3 -3
- 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-B3_sZuUW.mjs → MessagingScreen-7_YhiLVY.mjs} +3 -3
- package/dist/{MessagingScreen-B3_sZuUW.mjs.map → MessagingScreen-7_YhiLVY.mjs.map} +1 -1
- package/dist/{MessagingScreen-DzwIbgUU.cjs → MessagingScreen-B_5Ci5s-.cjs} +3 -3
- package/dist/{MessagingScreen-DzwIbgUU.cjs.map → MessagingScreen-B_5Ci5s-.cjs.map} +1 -1
- package/dist/{MessagingScreen-yHZm0vFM.cjs → MessagingScreen-CWJA4usG.cjs} +3 -3
- package/dist/{MessagingScreen-CnBpPXBm.mjs → MessagingScreen-DWNe8VFM.mjs} +3 -3
- package/dist/{MySiteScreen-DJ-rkDlD.mjs → MySiteScreen-Cspeq0cy.mjs} +2 -2
- package/dist/{MySiteScreen-DJ-rkDlD.mjs.map → MySiteScreen-Cspeq0cy.mjs.map} +1 -1
- package/dist/{MySiteScreen-DkHGVOlx.cjs → MySiteScreen-CtVL7wfc.cjs} +2 -2
- package/dist/{MySiteScreen-DkHGVOlx.cjs.map → MySiteScreen-CtVL7wfc.cjs.map} +1 -1
- package/dist/{MySiteScreen-BwdayTZT.cjs → MySiteScreen-D5tr7TdT.cjs} +3 -3
- package/dist/{OrdersScreen-C_fTfG0m.cjs → OrdersScreen-Bu82RCok.cjs} +3 -3
- package/dist/{OrdersScreen-C_fTfG0m.cjs.map → OrdersScreen-Bu82RCok.cjs.map} +1 -1
- package/dist/{OrdersScreen-DipdGDcy.cjs → OrdersScreen-DiKPQvwJ.cjs} +3 -3
- package/dist/{OrdersScreen-C0dg1NEJ.mjs → OrdersScreen-DrCPl7uv.mjs} +3 -3
- package/dist/{OrdersScreen-C0dg1NEJ.mjs.map → OrdersScreen-DrCPl7uv.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-BHHo6Wen.mjs} +3 -3
- package/dist/{ProductsScreen-B2_8nFMd.mjs.map → ProductsScreen-BHHo6Wen.mjs.map} +1 -1
- package/dist/{ProductsScreen-DHgkH0rd.cjs → ProductsScreen-CCNyLHqR.cjs} +3 -3
- package/dist/{ProductsScreen-BjCjYPiq.mjs → ProductsScreen-CoyGeILD.mjs} +3 -3
- package/dist/{ProductsScreen-D7ag_21-.cjs → ProductsScreen-Doc9tmAQ.cjs} +3 -3
- package/dist/{ProductsScreen-D7ag_21-.cjs.map → ProductsScreen-Doc9tmAQ.cjs.map} +1 -1
- package/dist/{ProfileScreen-DhS4QlAJ.cjs → ProfileScreen-BKKIMZiD.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-3a7V8ZEB.mjs → ShareablesScreen-BRxLz3zn.mjs} +3 -3
- package/dist/{ShareablesScreen-BtZfpC1v.cjs → ShareablesScreen-C5GJg1EP.cjs} +3 -3
- package/dist/{ShareablesScreen-DBSG5bbX.mjs → ShareablesScreen-CNMWSoKY.mjs} +3 -3
- package/dist/{ShareablesScreen-DBSG5bbX.mjs.map → ShareablesScreen-CNMWSoKY.mjs.map} +1 -1
- package/dist/{ShareablesScreen-DDcnZnRA.cjs → ShareablesScreen-Dp3BcjuA.cjs} +3 -3
- package/dist/{ShareablesScreen-DDcnZnRA.cjs.map → ShareablesScreen-Dp3BcjuA.cjs.map} +1 -1
- package/dist/{ShopScreen-BiFPqcSn.cjs → ShopScreen-CPWZhKgE.cjs} +4 -4
- package/dist/{ShopScreen-BiFPqcSn.cjs.map → ShopScreen-CPWZhKgE.cjs.map} +1 -1
- package/dist/{ShopScreen-5DkzkCmK.mjs → ShopScreen-CVxmqfmN.mjs} +4 -4
- package/dist/{ShopScreen-5DkzkCmK.mjs.map → ShopScreen-CVxmqfmN.mjs.map} +1 -1
- package/dist/{ShopScreen-CK5hcRSz.cjs → ShopScreen-nJhut901.cjs} +3 -3
- package/dist/{SubscriptionsScreen-iSqfV2RZ.cjs → SubscriptionsScreen-C1UWxvQk.cjs} +3 -3
- package/dist/{SubscriptionsScreen-CRJjvX47.mjs → SubscriptionsScreen-CJdcyH-e.mjs} +3 -3
- package/dist/{SubscriptionsScreen-CRJjvX47.mjs.map → SubscriptionsScreen-CJdcyH-e.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-BM4Tk_vo.cjs → SubscriptionsScreen-CSKVsakI.cjs} +3 -3
- package/dist/{SubscriptionsScreen-BM4Tk_vo.cjs.map → SubscriptionsScreen-CSKVsakI.cjs.map} +1 -1
- package/dist/index.cjs +311 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +311 -37
- package/dist/index.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-Bh4RXGq-.mjs → use-customer-account-B0DeL6m0.mjs} +3 -3
- package/dist/{use-customer-account-Bh4RXGq-.mjs.map → use-customer-account-B0DeL6m0.mjs.map} +1 -1
- package/dist/{use-customer-account-D3WQH1de.cjs → use-customer-account-Dysq4hpT.cjs} +3 -3
- package/dist/{use-customer-account-D3WQH1de.cjs.map → use-customer-account-Dysq4hpT.cjs.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 +14 -14
- package/dist/PointsWidget-Cc88UHqD.mjs.map +0 -1
- package/dist/PointsWidget-DISBtuAm.cjs.map +0 -1
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-7_YhiLVY.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-
|
|
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
41
|
import { i as CoreScreenPlaceholder, r as customersScreenPropertySchema, t as CustomersScreen } from "./CustomersScreen-xAauAB-B.mjs";
|
|
42
42
|
import { n as useAppNavigation, t as AppNavigationProvider } from "./AppNavigationContext-Du3Qq0yc.mjs";
|
|
43
43
|
import "./order-detail-B-4hsupW.mjs";
|
|
44
|
-
import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-
|
|
44
|
+
import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-CJdcyH-e.mjs";
|
|
45
45
|
import "./dist-CMGXkSgZ.mjs";
|
|
46
46
|
import "./es-1KItbbYg.mjs";
|
|
47
|
-
import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-
|
|
47
|
+
import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-FJUtn2_G.mjs";
|
|
48
48
|
import "./src-BakNjVTk.mjs";
|
|
49
49
|
import "./dist-Cl4FsM3V.mjs";
|
|
50
|
-
import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-
|
|
50
|
+
import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-DrCPl7uv.mjs";
|
|
51
51
|
import "./src-nhqydD53.mjs";
|
|
52
|
-
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-
|
|
53
|
-
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-
|
|
52
|
+
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-CVxmqfmN.mjs";
|
|
53
|
+
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-CNMWSoKY.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-BHHo6Wen.mjs";
|
|
56
|
+
import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-Cspeq0cy.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";
|
|
@@ -2353,6 +2353,280 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2353
2353
|
label: SYSTEM_NAVIGATION_ITEMS[slug].label,
|
|
2354
2354
|
slug
|
|
2355
2355
|
}));
|
|
2356
|
+
/** Lookup map for O(1) preset resolution */
|
|
2357
|
+
const PRESET_MAP = new Map([
|
|
2358
|
+
{
|
|
2359
|
+
id: "rep-most-shared",
|
|
2360
|
+
name: "Most Shared",
|
|
2361
|
+
description: "Most shared content",
|
|
2362
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_shared?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2363
|
+
resultPath: "resources",
|
|
2364
|
+
compatibleWidgets: [
|
|
2365
|
+
"CarouselWidget",
|
|
2366
|
+
"ListWidget",
|
|
2367
|
+
"NestedWidget",
|
|
2368
|
+
"TableWidget"
|
|
2369
|
+
],
|
|
2370
|
+
menuField: {
|
|
2371
|
+
key: "shareable_type",
|
|
2372
|
+
label: "Content Type",
|
|
2373
|
+
type: "select",
|
|
2374
|
+
options: [
|
|
2375
|
+
{
|
|
2376
|
+
label: "Products",
|
|
2377
|
+
value: "products"
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
label: "Media",
|
|
2381
|
+
value: "media"
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
label: "Pages",
|
|
2385
|
+
value: "pages"
|
|
2386
|
+
},
|
|
2387
|
+
{
|
|
2388
|
+
label: "Libraries",
|
|
2389
|
+
value: "libraries"
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
label: "Enrollment Packs",
|
|
2393
|
+
value: "enrollment_packs"
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
label: "Promotions",
|
|
2397
|
+
value: "promotions"
|
|
2398
|
+
}
|
|
2399
|
+
],
|
|
2400
|
+
defaultValue: "products"
|
|
2401
|
+
},
|
|
2402
|
+
configFields: [{
|
|
2403
|
+
key: "limit",
|
|
2404
|
+
label: "Limit",
|
|
2405
|
+
type: "number",
|
|
2406
|
+
defaultValue: 10,
|
|
2407
|
+
min: 1,
|
|
2408
|
+
max: 20,
|
|
2409
|
+
description: "Maximum number of items to show"
|
|
2410
|
+
}, {
|
|
2411
|
+
key: "period",
|
|
2412
|
+
label: "Time Range",
|
|
2413
|
+
type: "select",
|
|
2414
|
+
options: [
|
|
2415
|
+
{
|
|
2416
|
+
label: "7 days",
|
|
2417
|
+
value: "7d"
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
label: "30 days",
|
|
2421
|
+
value: "30d"
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
label: "90 days",
|
|
2425
|
+
value: "90d"
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
label: "1 year",
|
|
2429
|
+
value: "1y"
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
label: "All time",
|
|
2433
|
+
value: "all"
|
|
2434
|
+
}
|
|
2435
|
+
],
|
|
2436
|
+
defaultValue: "all"
|
|
2437
|
+
}]
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
id: "rep-most-viewed",
|
|
2441
|
+
name: "Most Viewed",
|
|
2442
|
+
description: "Most viewed content",
|
|
2443
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_viewed?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2444
|
+
resultPath: "resources",
|
|
2445
|
+
compatibleWidgets: [
|
|
2446
|
+
"CarouselWidget",
|
|
2447
|
+
"ListWidget",
|
|
2448
|
+
"NestedWidget",
|
|
2449
|
+
"TableWidget"
|
|
2450
|
+
],
|
|
2451
|
+
menuField: {
|
|
2452
|
+
key: "shareable_type",
|
|
2453
|
+
label: "Content Type",
|
|
2454
|
+
type: "select",
|
|
2455
|
+
options: [
|
|
2456
|
+
{
|
|
2457
|
+
label: "Products",
|
|
2458
|
+
value: "products"
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
label: "Media",
|
|
2462
|
+
value: "media"
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
label: "Pages",
|
|
2466
|
+
value: "pages"
|
|
2467
|
+
},
|
|
2468
|
+
{
|
|
2469
|
+
label: "Libraries",
|
|
2470
|
+
value: "libraries"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
label: "Enrollment Packs",
|
|
2474
|
+
value: "enrollment_packs"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
label: "Promotions",
|
|
2478
|
+
value: "promotions"
|
|
2479
|
+
}
|
|
2480
|
+
],
|
|
2481
|
+
defaultValue: "products"
|
|
2482
|
+
},
|
|
2483
|
+
configFields: [{
|
|
2484
|
+
key: "limit",
|
|
2485
|
+
label: "Limit",
|
|
2486
|
+
type: "number",
|
|
2487
|
+
defaultValue: 10,
|
|
2488
|
+
min: 1,
|
|
2489
|
+
max: 20,
|
|
2490
|
+
description: "Maximum number of items to show"
|
|
2491
|
+
}, {
|
|
2492
|
+
key: "period",
|
|
2493
|
+
label: "Time Range",
|
|
2494
|
+
type: "select",
|
|
2495
|
+
options: [
|
|
2496
|
+
{
|
|
2497
|
+
label: "7 days",
|
|
2498
|
+
value: "7d"
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
label: "30 days",
|
|
2502
|
+
value: "30d"
|
|
2503
|
+
},
|
|
2504
|
+
{
|
|
2505
|
+
label: "90 days",
|
|
2506
|
+
value: "90d"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
label: "1 year",
|
|
2510
|
+
value: "1y"
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
label: "All time",
|
|
2514
|
+
value: "all"
|
|
2515
|
+
}
|
|
2516
|
+
],
|
|
2517
|
+
defaultValue: "all"
|
|
2518
|
+
}]
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
id: "customer-orders",
|
|
2522
|
+
name: "Orders",
|
|
2523
|
+
description: "Customer order history",
|
|
2524
|
+
endpoint: "/v202506/orders?customer_id={customer_id}&page[limit]={limit}&status={status}",
|
|
2525
|
+
resultPath: "orders",
|
|
2526
|
+
transform: "toOrderTableProps",
|
|
2527
|
+
compatibleWidgets: ["TableWidget"],
|
|
2528
|
+
configFields: [{
|
|
2529
|
+
key: "limit",
|
|
2530
|
+
label: "Limit",
|
|
2531
|
+
type: "number",
|
|
2532
|
+
defaultValue: 10,
|
|
2533
|
+
min: 1,
|
|
2534
|
+
max: 50,
|
|
2535
|
+
description: "Maximum number of orders to show"
|
|
2536
|
+
}, {
|
|
2537
|
+
key: "status",
|
|
2538
|
+
label: "Status",
|
|
2539
|
+
type: "select",
|
|
2540
|
+
options: [
|
|
2541
|
+
{
|
|
2542
|
+
label: "All",
|
|
2543
|
+
value: "all"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
label: "Paid",
|
|
2547
|
+
value: "paid"
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
label: "Unpaid",
|
|
2551
|
+
value: "unpaid"
|
|
2552
|
+
},
|
|
2553
|
+
{
|
|
2554
|
+
label: "Refunded",
|
|
2555
|
+
value: "refunded"
|
|
2556
|
+
}
|
|
2557
|
+
],
|
|
2558
|
+
defaultValue: "all"
|
|
2559
|
+
}]
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
id: "customer-subscriptions",
|
|
2563
|
+
name: "Subscriptions",
|
|
2564
|
+
description: "Customer subscriptions",
|
|
2565
|
+
endpoint: "/subscriptions?customer_id={customer_id}&per_page={limit}&status={status}",
|
|
2566
|
+
resultPath: "subscriptions",
|
|
2567
|
+
transform: "toSubscriptionTableProps",
|
|
2568
|
+
compatibleWidgets: ["TableWidget"],
|
|
2569
|
+
configFields: [{
|
|
2570
|
+
key: "limit",
|
|
2571
|
+
label: "Limit",
|
|
2572
|
+
type: "number",
|
|
2573
|
+
defaultValue: 10,
|
|
2574
|
+
min: 1,
|
|
2575
|
+
max: 50,
|
|
2576
|
+
description: "Maximum number of subscriptions to show"
|
|
2577
|
+
}, {
|
|
2578
|
+
key: "status",
|
|
2579
|
+
label: "Status",
|
|
2580
|
+
type: "select",
|
|
2581
|
+
options: [
|
|
2582
|
+
{
|
|
2583
|
+
label: "All",
|
|
2584
|
+
value: "all"
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
label: "Active",
|
|
2588
|
+
value: "active"
|
|
2589
|
+
},
|
|
2590
|
+
{
|
|
2591
|
+
label: "Paused",
|
|
2592
|
+
value: "paused"
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
label: "Cancelled",
|
|
2596
|
+
value: "cancelled"
|
|
2597
|
+
}
|
|
2598
|
+
],
|
|
2599
|
+
defaultValue: "all"
|
|
2600
|
+
}]
|
|
2601
|
+
}
|
|
2602
|
+
].map((p) => [p.id, p]));
|
|
2603
|
+
/**
|
|
2604
|
+
* Resolves a preset by ID, returning the current preset definition.
|
|
2605
|
+
* Returns undefined if the preset ID is not recognized.
|
|
2606
|
+
*/
|
|
2607
|
+
function resolvePreset(presetId) {
|
|
2608
|
+
return PRESET_MAP.get(presetId);
|
|
2609
|
+
}
|
|
2610
|
+
/**
|
|
2611
|
+
* If the source is an API source with a presetId, returns a copy with
|
|
2612
|
+
* endpoint, resultPath, and transform resolved from the current preset.
|
|
2613
|
+
* Falls back to stored values if the preset is unknown.
|
|
2614
|
+
* Non-API sources are returned as-is.
|
|
2615
|
+
*/
|
|
2616
|
+
function resolveSource(source) {
|
|
2617
|
+
if (source.type !== "api" || !source.presetId) return source;
|
|
2618
|
+
const preset = resolvePreset(source.presetId);
|
|
2619
|
+
if (!preset) {
|
|
2620
|
+
console.warn(`[DataSource] Unknown preset "${source.presetId}", falling back to stored values`);
|
|
2621
|
+
return source;
|
|
2622
|
+
}
|
|
2623
|
+
return {
|
|
2624
|
+
...source,
|
|
2625
|
+
endpoint: preset.endpoint,
|
|
2626
|
+
resultPath: preset.resultPath,
|
|
2627
|
+
transform: preset.transform ?? source.transform
|
|
2628
|
+
};
|
|
2629
|
+
}
|
|
2356
2630
|
//#endregion
|
|
2357
2631
|
//#region ../react/src/data-sources/use-widget-data.ts
|
|
2358
2632
|
/**
|
|
@@ -2363,7 +2637,7 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2363
2637
|
function getSourceKey(source) {
|
|
2364
2638
|
if (source.type === "api") {
|
|
2365
2639
|
const varsKey = source.variables ? `:${JSON.stringify(source.variables)}` : "";
|
|
2366
|
-
return `${source.endpoint}${varsKey}`;
|
|
2640
|
+
return `${source.presetId ?? source.endpoint}${varsKey}`;
|
|
2367
2641
|
}
|
|
2368
2642
|
if (source.type === "custom") return `custom:${(source.selectedItems?.map((item) => {
|
|
2369
2643
|
return `${item.shareableType}:${item.id}`;
|
|
@@ -2413,7 +2687,7 @@ function useWidgetData(widget, options) {
|
|
|
2413
2687
|
const baseUrl = options?.baseUrl ?? config.baseUrl;
|
|
2414
2688
|
const getApiHeaders = config.getApiHeaders;
|
|
2415
2689
|
const variables = config.variables;
|
|
2416
|
-
const sources = widget.dataSource?.sources ?? [];
|
|
2690
|
+
const sources = useMemo(() => (widget.dataSource?.sources ?? []).map(resolveSource), [widget.dataSource?.sources]);
|
|
2417
2691
|
const errorConfig = widget.dataSource?.error;
|
|
2418
2692
|
const widgetId = widget.id ?? "unknown";
|
|
2419
2693
|
const widgetType = widget.type;
|
|
@@ -2631,18 +2905,18 @@ function AccountManageLayout({ children }) {
|
|
|
2631
2905
|
}
|
|
2632
2906
|
//#endregion
|
|
2633
2907
|
//#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-
|
|
2908
|
+
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-C4g7ZGPo.mjs").then((n) => n.n).then((m) => ({ default: m.ProfileScreen })));
|
|
2909
|
+
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-DrCPl7uv.mjs").then((n) => n.n).then((m) => ({ default: m.OrdersScreen })));
|
|
2910
|
+
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-CJdcyH-e.mjs").then((n) => n.n).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2911
|
+
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-DWNe8VFM.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
2912
|
+
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-FJUtn2_G.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
2913
|
+
const ShopScreen$1 = lazy(() => import("./ShopScreen-CVxmqfmN.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
|
|
2640
2914
|
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-xAauAB-B.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
2641
|
-
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-
|
|
2642
|
-
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-
|
|
2643
|
-
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-
|
|
2915
|
+
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-CoyGeILD.mjs").then((m) => ({ default: m.ProductsScreen })));
|
|
2916
|
+
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-BRxLz3zn.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
2917
|
+
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-Cspeq0cy.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
|
|
2644
2918
|
const UpgradeScreen = lazy(() => import("./UpgradeScreen-CaTBqSyO.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
|
|
2645
|
-
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-
|
|
2919
|
+
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-BE6M8WxN.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
|
|
2646
2920
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
2647
2921
|
profile: ProfileScreen$1,
|
|
2648
2922
|
orders: OrdersScreen$1,
|
|
@@ -4095,18 +4369,18 @@ function useContact(_contactId) {
|
|
|
4095
4369
|
//#endregion
|
|
4096
4370
|
//#region src/screens/index.ts
|
|
4097
4371
|
const screenPropertySchemas = {
|
|
4098
|
-
ProfileScreen: () => import("./ProfileScreen-
|
|
4099
|
-
MessagingScreen: () => import("./MessagingScreen-
|
|
4100
|
-
ContactsScreen: () => import("./ContactsScreen-
|
|
4101
|
-
OrdersScreen: () => import("./OrdersScreen-
|
|
4102
|
-
SubscriptionsScreen: () => import("./SubscriptionsScreen-
|
|
4372
|
+
ProfileScreen: () => import("./ProfileScreen-C4g7ZGPo.mjs").then((n) => n.n).then((m) => m.profileScreenPropertySchema),
|
|
4373
|
+
MessagingScreen: () => import("./MessagingScreen-DWNe8VFM.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
4374
|
+
ContactsScreen: () => import("./ContactsScreen-FJUtn2_G.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
|
|
4375
|
+
OrdersScreen: () => import("./OrdersScreen-DrCPl7uv.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
|
|
4376
|
+
SubscriptionsScreen: () => import("./SubscriptionsScreen-CJdcyH-e.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4103
4377
|
CustomersScreen: () => import("./CustomersScreen-xAauAB-B.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
4104
|
-
ProductsScreen: () => import("./ProductsScreen-
|
|
4105
|
-
MySiteScreen: () => import("./MySiteScreen-
|
|
4106
|
-
ShareablesScreen: () => import("./ShareablesScreen-
|
|
4107
|
-
ShopScreen: () => import("./ShopScreen-
|
|
4378
|
+
ProductsScreen: () => import("./ProductsScreen-CoyGeILD.mjs").then((m) => m.productsScreenPropertySchema),
|
|
4379
|
+
MySiteScreen: () => import("./MySiteScreen-Cspeq0cy.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
|
|
4380
|
+
ShareablesScreen: () => import("./ShareablesScreen-BRxLz3zn.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
4381
|
+
ShopScreen: () => import("./ShopScreen-CVxmqfmN.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
|
|
4108
4382
|
UpgradeScreen: () => import("./UpgradeScreen-CaTBqSyO.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
|
|
4109
|
-
AppDownloadScreen: () => import("./AppDownloadScreen-
|
|
4383
|
+
AppDownloadScreen: () => import("./AppDownloadScreen-BE6M8WxN.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
|
|
4110
4384
|
};
|
|
4111
4385
|
/**
|
|
4112
4386
|
* Core page template IDs
|