@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.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-9hOWP6kD.cjs");
|
|
3
|
-
const require_FluidProvider = require("./FluidProvider-
|
|
4
|
-
const require_ProfileScreen = require("./ProfileScreen-
|
|
5
|
-
const require_PointsWidget = require("./PointsWidget-
|
|
3
|
+
const require_FluidProvider = require("./FluidProvider-BSBLJp15.cjs");
|
|
4
|
+
const require_ProfileScreen = require("./ProfileScreen-CANmoFsP.cjs");
|
|
5
|
+
const require_PointsWidget = require("./PointsWidget-D8U2k-_A.cjs");
|
|
6
6
|
require("./error-state-BDBF2JrB.cjs");
|
|
7
7
|
const require_ScreenRenderer = require("./ScreenRenderer-D65AsKjr.cjs");
|
|
8
8
|
require("./WidgetInteractionContext-GLPlhAfT.cjs");
|
|
@@ -35,29 +35,29 @@ const require_SpacerWidget = require("./SpacerWidget-BDsHZD_8.cjs");
|
|
|
35
35
|
const require_TableWidget = require("./TableWidget-Duw_7iyh.cjs");
|
|
36
36
|
const require_ToDoWidget = require("./ToDoWidget-eGB9cfou.cjs");
|
|
37
37
|
const require_VideoWidget = require("./VideoWidget-CNHJrY7I.cjs");
|
|
38
|
-
const require_use_account_clients = require("./use-account-clients-
|
|
38
|
+
const require_use_account_clients = require("./use-account-clients-62dZrh9E.cjs");
|
|
39
39
|
const require_ScreenHeaderContext = require("./ScreenHeaderContext-wrJlkhgN.cjs");
|
|
40
|
-
const require_use_fluid_api = require("./use-fluid-api-
|
|
41
|
-
const require_use_current_user = require("./use-current-user-
|
|
40
|
+
const require_use_fluid_api = require("./use-fluid-api-DwRQk00z.cjs");
|
|
41
|
+
const require_use_current_user = require("./use-current-user-SFCzJt0q.cjs");
|
|
42
42
|
const require_CustomersScreen = require("./CustomersScreen-9f10-_AZ.cjs");
|
|
43
43
|
const require_AppNavigationContext = require("./AppNavigationContext-Agp0UkCQ.cjs");
|
|
44
|
-
const require_MessagingScreen = require("./MessagingScreen-
|
|
44
|
+
const require_MessagingScreen = require("./MessagingScreen-B_5Ci5s-.cjs");
|
|
45
45
|
require("./order-detail-Cj68hbgK.cjs");
|
|
46
|
-
const require_SubscriptionsScreen = require("./SubscriptionsScreen-
|
|
46
|
+
const require_SubscriptionsScreen = require("./SubscriptionsScreen-CSKVsakI.cjs");
|
|
47
47
|
require("./dist-BbS_7TvS.cjs");
|
|
48
48
|
require("./es-BSkb3AZk.cjs");
|
|
49
|
-
const require_ContactsScreen = require("./ContactsScreen-
|
|
49
|
+
const require_ContactsScreen = require("./ContactsScreen-6gXKTN61.cjs");
|
|
50
50
|
require("./src-C_kOrGdZ.cjs");
|
|
51
51
|
require("./dist-B4Ke7bHH.cjs");
|
|
52
|
-
const require_OrdersScreen = require("./OrdersScreen-
|
|
52
|
+
const require_OrdersScreen = require("./OrdersScreen-Bu82RCok.cjs");
|
|
53
53
|
require("./src-fXyI4AWk.cjs");
|
|
54
|
-
const require_ShopScreen = require("./ShopScreen-
|
|
55
|
-
const require_ShareablesScreen = require("./ShareablesScreen-
|
|
54
|
+
const require_ShopScreen = require("./ShopScreen-CPWZhKgE.cjs");
|
|
55
|
+
const require_ShareablesScreen = require("./ShareablesScreen-Dp3BcjuA.cjs");
|
|
56
56
|
require("./dist-lO2OG0T5.cjs");
|
|
57
|
-
const require_ProductsScreen = require("./ProductsScreen-
|
|
58
|
-
const require_MySiteScreen = require("./MySiteScreen-
|
|
57
|
+
const require_ProductsScreen = require("./ProductsScreen-Doc9tmAQ.cjs");
|
|
58
|
+
const require_MySiteScreen = require("./MySiteScreen-CtVL7wfc.cjs");
|
|
59
59
|
require("./UpgradeScreen-C93rBNY2.cjs");
|
|
60
|
-
require("./AppDownloadScreen-
|
|
60
|
+
require("./AppDownloadScreen-CaTNCtzb.cjs");
|
|
61
61
|
let react = require("react");
|
|
62
62
|
react = require_chunk.__toESM(react);
|
|
63
63
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
@@ -2355,6 +2355,280 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2355
2355
|
label: SYSTEM_NAVIGATION_ITEMS[slug].label,
|
|
2356
2356
|
slug
|
|
2357
2357
|
}));
|
|
2358
|
+
/** Lookup map for O(1) preset resolution */
|
|
2359
|
+
const PRESET_MAP = new Map([
|
|
2360
|
+
{
|
|
2361
|
+
id: "rep-most-shared",
|
|
2362
|
+
name: "Most Shared",
|
|
2363
|
+
description: "Most shared content",
|
|
2364
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_shared?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2365
|
+
resultPath: "resources",
|
|
2366
|
+
compatibleWidgets: [
|
|
2367
|
+
"CarouselWidget",
|
|
2368
|
+
"ListWidget",
|
|
2369
|
+
"NestedWidget",
|
|
2370
|
+
"TableWidget"
|
|
2371
|
+
],
|
|
2372
|
+
menuField: {
|
|
2373
|
+
key: "shareable_type",
|
|
2374
|
+
label: "Content Type",
|
|
2375
|
+
type: "select",
|
|
2376
|
+
options: [
|
|
2377
|
+
{
|
|
2378
|
+
label: "Products",
|
|
2379
|
+
value: "products"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
label: "Media",
|
|
2383
|
+
value: "media"
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
label: "Pages",
|
|
2387
|
+
value: "pages"
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
label: "Libraries",
|
|
2391
|
+
value: "libraries"
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
label: "Enrollment Packs",
|
|
2395
|
+
value: "enrollment_packs"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
label: "Promotions",
|
|
2399
|
+
value: "promotions"
|
|
2400
|
+
}
|
|
2401
|
+
],
|
|
2402
|
+
defaultValue: "products"
|
|
2403
|
+
},
|
|
2404
|
+
configFields: [{
|
|
2405
|
+
key: "limit",
|
|
2406
|
+
label: "Limit",
|
|
2407
|
+
type: "number",
|
|
2408
|
+
defaultValue: 10,
|
|
2409
|
+
min: 1,
|
|
2410
|
+
max: 20,
|
|
2411
|
+
description: "Maximum number of items to show"
|
|
2412
|
+
}, {
|
|
2413
|
+
key: "period",
|
|
2414
|
+
label: "Time Range",
|
|
2415
|
+
type: "select",
|
|
2416
|
+
options: [
|
|
2417
|
+
{
|
|
2418
|
+
label: "7 days",
|
|
2419
|
+
value: "7d"
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
label: "30 days",
|
|
2423
|
+
value: "30d"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
label: "90 days",
|
|
2427
|
+
value: "90d"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
label: "1 year",
|
|
2431
|
+
value: "1y"
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
label: "All time",
|
|
2435
|
+
value: "all"
|
|
2436
|
+
}
|
|
2437
|
+
],
|
|
2438
|
+
defaultValue: "all"
|
|
2439
|
+
}]
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
id: "rep-most-viewed",
|
|
2443
|
+
name: "Most Viewed",
|
|
2444
|
+
description: "Most viewed content",
|
|
2445
|
+
endpoint: "/v2025-06/reps/{rep_id}/most_viewed?shareable_type={shareable_type}&limit={limit}&period={period}&language_iso={language_iso}",
|
|
2446
|
+
resultPath: "resources",
|
|
2447
|
+
compatibleWidgets: [
|
|
2448
|
+
"CarouselWidget",
|
|
2449
|
+
"ListWidget",
|
|
2450
|
+
"NestedWidget",
|
|
2451
|
+
"TableWidget"
|
|
2452
|
+
],
|
|
2453
|
+
menuField: {
|
|
2454
|
+
key: "shareable_type",
|
|
2455
|
+
label: "Content Type",
|
|
2456
|
+
type: "select",
|
|
2457
|
+
options: [
|
|
2458
|
+
{
|
|
2459
|
+
label: "Products",
|
|
2460
|
+
value: "products"
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
label: "Media",
|
|
2464
|
+
value: "media"
|
|
2465
|
+
},
|
|
2466
|
+
{
|
|
2467
|
+
label: "Pages",
|
|
2468
|
+
value: "pages"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
label: "Libraries",
|
|
2472
|
+
value: "libraries"
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
label: "Enrollment Packs",
|
|
2476
|
+
value: "enrollment_packs"
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
label: "Promotions",
|
|
2480
|
+
value: "promotions"
|
|
2481
|
+
}
|
|
2482
|
+
],
|
|
2483
|
+
defaultValue: "products"
|
|
2484
|
+
},
|
|
2485
|
+
configFields: [{
|
|
2486
|
+
key: "limit",
|
|
2487
|
+
label: "Limit",
|
|
2488
|
+
type: "number",
|
|
2489
|
+
defaultValue: 10,
|
|
2490
|
+
min: 1,
|
|
2491
|
+
max: 20,
|
|
2492
|
+
description: "Maximum number of items to show"
|
|
2493
|
+
}, {
|
|
2494
|
+
key: "period",
|
|
2495
|
+
label: "Time Range",
|
|
2496
|
+
type: "select",
|
|
2497
|
+
options: [
|
|
2498
|
+
{
|
|
2499
|
+
label: "7 days",
|
|
2500
|
+
value: "7d"
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
label: "30 days",
|
|
2504
|
+
value: "30d"
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
label: "90 days",
|
|
2508
|
+
value: "90d"
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
label: "1 year",
|
|
2512
|
+
value: "1y"
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
label: "All time",
|
|
2516
|
+
value: "all"
|
|
2517
|
+
}
|
|
2518
|
+
],
|
|
2519
|
+
defaultValue: "all"
|
|
2520
|
+
}]
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
id: "customer-orders",
|
|
2524
|
+
name: "Orders",
|
|
2525
|
+
description: "Customer order history",
|
|
2526
|
+
endpoint: "/v202506/orders?customer_id={customer_id}&page[limit]={limit}&status={status}",
|
|
2527
|
+
resultPath: "orders",
|
|
2528
|
+
transform: "toOrderTableProps",
|
|
2529
|
+
compatibleWidgets: ["TableWidget"],
|
|
2530
|
+
configFields: [{
|
|
2531
|
+
key: "limit",
|
|
2532
|
+
label: "Limit",
|
|
2533
|
+
type: "number",
|
|
2534
|
+
defaultValue: 10,
|
|
2535
|
+
min: 1,
|
|
2536
|
+
max: 50,
|
|
2537
|
+
description: "Maximum number of orders to show"
|
|
2538
|
+
}, {
|
|
2539
|
+
key: "status",
|
|
2540
|
+
label: "Status",
|
|
2541
|
+
type: "select",
|
|
2542
|
+
options: [
|
|
2543
|
+
{
|
|
2544
|
+
label: "All",
|
|
2545
|
+
value: "all"
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
label: "Paid",
|
|
2549
|
+
value: "paid"
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
label: "Unpaid",
|
|
2553
|
+
value: "unpaid"
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
label: "Refunded",
|
|
2557
|
+
value: "refunded"
|
|
2558
|
+
}
|
|
2559
|
+
],
|
|
2560
|
+
defaultValue: "all"
|
|
2561
|
+
}]
|
|
2562
|
+
},
|
|
2563
|
+
{
|
|
2564
|
+
id: "customer-subscriptions",
|
|
2565
|
+
name: "Subscriptions",
|
|
2566
|
+
description: "Customer subscriptions",
|
|
2567
|
+
endpoint: "/subscriptions?customer_id={customer_id}&per_page={limit}&status={status}",
|
|
2568
|
+
resultPath: "subscriptions",
|
|
2569
|
+
transform: "toSubscriptionTableProps",
|
|
2570
|
+
compatibleWidgets: ["TableWidget"],
|
|
2571
|
+
configFields: [{
|
|
2572
|
+
key: "limit",
|
|
2573
|
+
label: "Limit",
|
|
2574
|
+
type: "number",
|
|
2575
|
+
defaultValue: 10,
|
|
2576
|
+
min: 1,
|
|
2577
|
+
max: 50,
|
|
2578
|
+
description: "Maximum number of subscriptions to show"
|
|
2579
|
+
}, {
|
|
2580
|
+
key: "status",
|
|
2581
|
+
label: "Status",
|
|
2582
|
+
type: "select",
|
|
2583
|
+
options: [
|
|
2584
|
+
{
|
|
2585
|
+
label: "All",
|
|
2586
|
+
value: "all"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
label: "Active",
|
|
2590
|
+
value: "active"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
label: "Paused",
|
|
2594
|
+
value: "paused"
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
label: "Cancelled",
|
|
2598
|
+
value: "cancelled"
|
|
2599
|
+
}
|
|
2600
|
+
],
|
|
2601
|
+
defaultValue: "all"
|
|
2602
|
+
}]
|
|
2603
|
+
}
|
|
2604
|
+
].map((p) => [p.id, p]));
|
|
2605
|
+
/**
|
|
2606
|
+
* Resolves a preset by ID, returning the current preset definition.
|
|
2607
|
+
* Returns undefined if the preset ID is not recognized.
|
|
2608
|
+
*/
|
|
2609
|
+
function resolvePreset(presetId) {
|
|
2610
|
+
return PRESET_MAP.get(presetId);
|
|
2611
|
+
}
|
|
2612
|
+
/**
|
|
2613
|
+
* If the source is an API source with a presetId, returns a copy with
|
|
2614
|
+
* endpoint, resultPath, and transform resolved from the current preset.
|
|
2615
|
+
* Falls back to stored values if the preset is unknown.
|
|
2616
|
+
* Non-API sources are returned as-is.
|
|
2617
|
+
*/
|
|
2618
|
+
function resolveSource(source) {
|
|
2619
|
+
if (source.type !== "api" || !source.presetId) return source;
|
|
2620
|
+
const preset = resolvePreset(source.presetId);
|
|
2621
|
+
if (!preset) {
|
|
2622
|
+
console.warn(`[DataSource] Unknown preset "${source.presetId}", falling back to stored values`);
|
|
2623
|
+
return source;
|
|
2624
|
+
}
|
|
2625
|
+
return {
|
|
2626
|
+
...source,
|
|
2627
|
+
endpoint: preset.endpoint,
|
|
2628
|
+
resultPath: preset.resultPath,
|
|
2629
|
+
transform: preset.transform ?? source.transform
|
|
2630
|
+
};
|
|
2631
|
+
}
|
|
2358
2632
|
//#endregion
|
|
2359
2633
|
//#region ../react/src/data-sources/use-widget-data.ts
|
|
2360
2634
|
/**
|
|
@@ -2365,7 +2639,7 @@ const ACCOUNT_MANAGE_TABS = ACCOUNT_MANAGE_SLUGS.map((slug) => ({
|
|
|
2365
2639
|
function getSourceKey(source) {
|
|
2366
2640
|
if (source.type === "api") {
|
|
2367
2641
|
const varsKey = source.variables ? `:${JSON.stringify(source.variables)}` : "";
|
|
2368
|
-
return `${source.endpoint}${varsKey}`;
|
|
2642
|
+
return `${source.presetId ?? source.endpoint}${varsKey}`;
|
|
2369
2643
|
}
|
|
2370
2644
|
if (source.type === "custom") return `custom:${(source.selectedItems?.map((item) => {
|
|
2371
2645
|
return `${item.shareableType}:${item.id}`;
|
|
@@ -2415,7 +2689,7 @@ function useWidgetData(widget, options) {
|
|
|
2415
2689
|
const baseUrl = options?.baseUrl ?? config.baseUrl;
|
|
2416
2690
|
const getApiHeaders = config.getApiHeaders;
|
|
2417
2691
|
const variables = config.variables;
|
|
2418
|
-
const sources = widget.dataSource?.sources ?? [];
|
|
2692
|
+
const sources = (0, react.useMemo)(() => (widget.dataSource?.sources ?? []).map(resolveSource), [widget.dataSource?.sources]);
|
|
2419
2693
|
const errorConfig = widget.dataSource?.error;
|
|
2420
2694
|
const widgetId = widget.id ?? "unknown";
|
|
2421
2695
|
const widgetType = widget.type;
|
|
@@ -2633,18 +2907,18 @@ function AccountManageLayout({ children }) {
|
|
|
2633
2907
|
}
|
|
2634
2908
|
//#endregion
|
|
2635
2909
|
//#region src/shell/system-screen-map.ts
|
|
2636
|
-
const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-
|
|
2637
|
-
const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-
|
|
2638
|
-
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-
|
|
2639
|
-
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-
|
|
2640
|
-
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-
|
|
2641
|
-
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-
|
|
2910
|
+
const ProfileScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProfileScreen-BKKIMZiD.cjs")).then((m) => ({ default: m.ProfileScreen })));
|
|
2911
|
+
const OrdersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./OrdersScreen-DiKPQvwJ.cjs")).then((m) => ({ default: m.OrdersScreen })));
|
|
2912
|
+
const SubscriptionsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./SubscriptionsScreen-C1UWxvQk.cjs")).then((m) => ({ default: m.SubscriptionsScreen })));
|
|
2913
|
+
const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MessagingScreen-CWJA4usG.cjs")).then((m) => ({ default: m.MessagingScreen })));
|
|
2914
|
+
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-aPH9Xaim.cjs")).then((m) => ({ default: m.ContactsScreen })));
|
|
2915
|
+
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-nJhut901.cjs")).then((m) => ({ default: m.ShopScreen })));
|
|
2642
2916
|
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-9f10-_AZ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
|
|
2643
|
-
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-
|
|
2644
|
-
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
2645
|
-
const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-
|
|
2917
|
+
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-CCNyLHqR.cjs")).then((m) => ({ default: m.ProductsScreen })));
|
|
2918
|
+
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-C5GJg1EP.cjs")).then((m) => ({ default: m.ShareablesScreen })));
|
|
2919
|
+
const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-D5tr7TdT.cjs")).then((m) => ({ default: m.MySiteScreen })));
|
|
2646
2920
|
const UpgradeScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => ({ default: m.UpgradeScreen })));
|
|
2647
|
-
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-
|
|
2921
|
+
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-B-JdFulZ.cjs")).then((m) => ({ default: m.AppDownloadScreen })));
|
|
2648
2922
|
const SYSTEM_SLUG_SCREEN_MAP = {
|
|
2649
2923
|
profile: ProfileScreen$1,
|
|
2650
2924
|
orders: OrdersScreen$1,
|
|
@@ -4097,18 +4371,18 @@ function useContact(_contactId) {
|
|
|
4097
4371
|
//#endregion
|
|
4098
4372
|
//#region src/screens/index.ts
|
|
4099
4373
|
const screenPropertySchemas = {
|
|
4100
|
-
ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-
|
|
4101
|
-
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-
|
|
4102
|
-
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-
|
|
4103
|
-
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-
|
|
4104
|
-
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-
|
|
4374
|
+
ProfileScreen: () => Promise.resolve().then(() => require("./ProfileScreen-BKKIMZiD.cjs")).then((m) => m.profileScreenPropertySchema),
|
|
4375
|
+
MessagingScreen: () => Promise.resolve().then(() => require("./MessagingScreen-CWJA4usG.cjs")).then((m) => m.messagingScreenPropertySchema),
|
|
4376
|
+
ContactsScreen: () => Promise.resolve().then(() => require("./ContactsScreen-aPH9Xaim.cjs")).then((m) => m.contactsScreenPropertySchema),
|
|
4377
|
+
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-DiKPQvwJ.cjs")).then((m) => m.ordersScreenPropertySchema),
|
|
4378
|
+
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-C1UWxvQk.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4105
4379
|
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-9f10-_AZ.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
|
|
4106
|
-
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-
|
|
4107
|
-
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-
|
|
4108
|
-
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
4109
|
-
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-
|
|
4380
|
+
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-CCNyLHqR.cjs")).then((m) => m.productsScreenPropertySchema),
|
|
4381
|
+
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-D5tr7TdT.cjs")).then((m) => m.mySiteScreenPropertySchema),
|
|
4382
|
+
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-C5GJg1EP.cjs")).then((m) => m.shareablesScreenPropertySchema),
|
|
4383
|
+
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-nJhut901.cjs")).then((m) => m.shopScreenPropertySchema),
|
|
4110
4384
|
UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-DTNlUcYa.cjs")).then((m) => m.upgradeScreenPropertySchema),
|
|
4111
|
-
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-
|
|
4385
|
+
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-B-JdFulZ.cjs")).then((m) => m.appDownloadScreenPropertySchema)
|
|
4112
4386
|
};
|
|
4113
4387
|
/**
|
|
4114
4388
|
* Core page template IDs
|