@fluid-app/portal-sdk 0.1.91 → 0.1.93
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-BtvcE4pE.cjs → AppDownloadScreen-D-lPD090.cjs} +2 -2
- package/dist/{AppDownloadScreen-BtvcE4pE.cjs.map → AppDownloadScreen-D-lPD090.cjs.map} +1 -1
- package/dist/{AppDownloadScreen-Dx2nilnX.cjs → AppDownloadScreen-D4CtPMfZ.cjs} +2 -2
- package/dist/{AppDownloadScreen-RX8GSAyq.mjs → AppDownloadScreen-RGClSpeA.mjs} +2 -2
- package/dist/{AppDownloadScreen-RX8GSAyq.mjs.map → AppDownloadScreen-RGClSpeA.mjs.map} +1 -1
- package/dist/{ContactsScreen-DttcI388.cjs → ContactsScreen-0h6EW-5L.cjs} +2 -2
- package/dist/{ContactsScreen-DttcI388.cjs.map → ContactsScreen-0h6EW-5L.cjs.map} +1 -1
- package/dist/{ContactsScreen-DOz11uQ_.mjs → ContactsScreen-B5mf_3YF.mjs} +2 -2
- package/dist/{ContactsScreen-DOz11uQ_.mjs.map → ContactsScreen-B5mf_3YF.mjs.map} +1 -1
- package/dist/{ContactsScreen-CKMZIQlF.cjs → ContactsScreen-CCvizFdr.cjs} +2 -2
- package/dist/{FluidProvider-Sc51VlLw.cjs → FluidProvider-C27-ijsq.cjs} +58 -12
- package/dist/FluidProvider-C27-ijsq.cjs.map +1 -0
- package/dist/{FluidProvider-Eohedipr.mjs → FluidProvider-Nd7xkDWq.mjs} +47 -13
- package/dist/FluidProvider-Nd7xkDWq.mjs.map +1 -0
- package/dist/{MessagingScreen-CdHBUykK.cjs → MessagingScreen-8myurYB8.cjs} +2 -2
- package/dist/{MessagingScreen-r67FUDf1.cjs → MessagingScreen-B8u8kkH-.cjs} +3 -3
- package/dist/{MessagingScreen-r67FUDf1.cjs.map → MessagingScreen-B8u8kkH-.cjs.map} +1 -1
- package/dist/{MessagingScreen-CMxjIURw.mjs → MessagingScreen-CJO9b5Do.mjs} +3 -3
- package/dist/{MessagingScreen-CMxjIURw.mjs.map → MessagingScreen-CJO9b5Do.mjs.map} +1 -1
- package/dist/{MessagingScreen-Cx0bbvfs.mjs → MessagingScreen-oGxMJtNT.mjs} +2 -2
- package/dist/{MySiteScreen-BhdmPFar.mjs → MySiteScreen-Cz-KTIDH.mjs} +3 -3
- package/dist/{MySiteScreen-BhdmPFar.mjs.map → MySiteScreen-Cz-KTIDH.mjs.map} +1 -1
- package/dist/{MySiteScreen-Cy7HpS3z.cjs → MySiteScreen-DHtQ-nrj.cjs} +3 -3
- package/dist/{MySiteScreen-Cy7HpS3z.cjs.map → MySiteScreen-DHtQ-nrj.cjs.map} +1 -1
- package/dist/{MySiteScreen-8lZTZzo0.cjs → MySiteScreen-DxKXda65.cjs} +3 -3
- package/dist/{OrdersScreen-D0TnBQc5.mjs → OrdersScreen-CRhvTsZX.mjs} +3 -3
- package/dist/{OrdersScreen-D0TnBQc5.mjs.map → OrdersScreen-CRhvTsZX.mjs.map} +1 -1
- package/dist/{OrdersScreen-DCOzHNIy.cjs → OrdersScreen-DDqDubNG.cjs} +2 -2
- package/dist/{OrdersScreen-BaqQzT1F.cjs → OrdersScreen-DGWU9MKQ.cjs} +3 -3
- package/dist/{OrdersScreen-BaqQzT1F.cjs.map → OrdersScreen-DGWU9MKQ.cjs.map} +1 -1
- package/dist/{ProductsScreen-2tlHXemg.mjs → ProductsScreen-28vbEj_q.mjs} +4 -4
- package/dist/{ProductsScreen-Ch6f5P2w.cjs → ProductsScreen-BCKYCxLP.cjs} +4 -4
- package/dist/{ProductsScreen-2pUHZJop.mjs → ProductsScreen-CUQi-Rj5.mjs} +7 -6
- package/dist/ProductsScreen-CUQi-Rj5.mjs.map +1 -0
- package/dist/{ProductsScreen-ueEJP0MJ.cjs → ProductsScreen-TQGuItSe.cjs} +7 -6
- package/dist/ProductsScreen-TQGuItSe.cjs.map +1 -0
- package/dist/{ProfileScreen-C8fpr9c3.cjs → ProfileScreen-C-WEgl6I.cjs} +3 -3
- package/dist/{ProfileScreen-C8fpr9c3.cjs.map → ProfileScreen-C-WEgl6I.cjs.map} +1 -1
- package/dist/{ProfileScreen-Age0TtEY.mjs → ProfileScreen-CSyji2kX.mjs} +3 -3
- package/dist/{ProfileScreen-Age0TtEY.mjs.map → ProfileScreen-CSyji2kX.mjs.map} +1 -1
- package/dist/{ProfileScreen-DEtgeBnE.cjs → ProfileScreen-mbsYsvbX.cjs} +2 -2
- package/dist/{ShareablesScreen-vFbWhVGF.mjs → ShareablesScreen-B3LWG6Vd.mjs} +7 -7
- package/dist/{ShareablesScreen-vFbWhVGF.mjs.map → ShareablesScreen-B3LWG6Vd.mjs.map} +1 -1
- package/dist/{ShareablesScreen-B6uPSvvK.cjs → ShareablesScreen-DDDnyfpn.cjs} +7 -7
- package/dist/{ShareablesScreen-B6uPSvvK.cjs.map → ShareablesScreen-DDDnyfpn.cjs.map} +1 -1
- package/dist/{ShareablesScreen-DBdNgtV1.mjs → ShareablesScreen-DWlRD2yD.mjs} +4 -4
- package/dist/{ShareablesScreen-CoPFz5ZB.cjs → ShareablesScreen-Du70lYZA.cjs} +4 -4
- package/dist/{ShopScreen-BKBaNPsG.cjs → ShopScreen-CWuSRymK.cjs} +67 -51
- package/dist/ShopScreen-CWuSRymK.cjs.map +1 -0
- package/dist/{ShopScreen-D-TXRWZR.mjs → ShopScreen-CzY8rJg9.mjs} +67 -51
- package/dist/ShopScreen-CzY8rJg9.mjs.map +1 -0
- package/dist/{ShopScreen-DPZSXS99.cjs → ShopScreen-DQzt93BK.cjs} +2 -2
- package/dist/{SubscriptionsScreen-CBqgpat5.mjs → SubscriptionsScreen-CViYObw9.mjs} +3 -3
- package/dist/{SubscriptionsScreen-CBqgpat5.mjs.map → SubscriptionsScreen-CViYObw9.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-BvS7o_XP.cjs → SubscriptionsScreen-CjxanPLb.cjs} +3 -3
- package/dist/{SubscriptionsScreen-BvS7o_XP.cjs.map → SubscriptionsScreen-CjxanPLb.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-IbsNz0Ki.cjs → SubscriptionsScreen-Dc4JwfWg.cjs} +2 -2
- package/dist/{dist-BF_4vk1z.cjs → dist-BSbac3uh.cjs} +1 -1
- package/dist/{dist-BF_4vk1z.cjs.map → dist-BSbac3uh.cjs.map} +1 -1
- package/dist/index.cjs +43 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -352
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +38 -352
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +43 -39
- package/dist/index.mjs.map +1 -1
- package/dist/products-BAtIML76.cjs +114 -0
- package/dist/{products-BKZ1siXg.cjs.map → products-BAtIML76.cjs.map} +1 -1
- package/dist/products-StJIeia3.mjs +61 -0
- package/dist/{products-DOO1TBcm.mjs.map → products-StJIeia3.mjs.map} +1 -1
- package/dist/{sortable.esm-Cz-CP2N8.mjs → sortable.esm-DSrWP4x9.mjs} +1 -1
- package/dist/{sortable.esm-Cz-CP2N8.mjs.map → sortable.esm-DSrWP4x9.mjs.map} +1 -1
- package/dist/{src-Zv3-NSUf.cjs → src-CMByt6YP.cjs} +1 -1
- package/dist/{src-CN7diUEw.mjs.map → src-CMByt6YP.cjs.map} +1 -1
- package/dist/{src-Ih5vEO6p.mjs → src-CyrJPIY1.mjs} +3 -3
- package/dist/{src-Ih5vEO6p.mjs.map → src-CyrJPIY1.mjs.map} +1 -1
- package/dist/{src-CN7diUEw.mjs → src-DryOJTBW.mjs} +1 -1
- package/dist/{src-Zv3-NSUf.cjs.map → src-DryOJTBW.mjs.map} +1 -1
- package/dist/{src-BbJs882O.cjs → src-t3t8YW1J.cjs} +3 -3
- package/dist/{src-BbJs882O.cjs.map → src-t3t8YW1J.cjs.map} +1 -1
- package/dist/{use-account-clients-DaliJYMa.cjs → use-account-clients-CF79cijO.cjs} +2 -2
- package/dist/{use-account-clients-DaliJYMa.cjs.map → use-account-clients-CF79cijO.cjs.map} +1 -1
- package/dist/{use-account-clients-CSWgrCKK.mjs → use-account-clients-CaLsedpw.mjs} +2 -2
- package/dist/{use-account-clients-CSWgrCKK.mjs.map → use-account-clients-CaLsedpw.mjs.map} +1 -1
- package/dist/{use-current-user-5erIFUd6.cjs → use-current-user-CNyndpb0.cjs} +3 -3
- package/dist/{use-current-user-5erIFUd6.cjs.map → use-current-user-CNyndpb0.cjs.map} +1 -1
- package/dist/{use-current-user-BBQg1iYf.mjs → use-current-user-Cv4FHFqm.mjs} +3 -3
- package/dist/{use-current-user-BBQg1iYf.mjs.map → use-current-user-Cv4FHFqm.mjs.map} +1 -1
- package/dist/{use-customer-account-Dzdps4By.cjs → use-customer-account-9HqKnQx5.cjs} +3 -3
- package/dist/{use-customer-account-Dzdps4By.cjs.map → use-customer-account-9HqKnQx5.cjs.map} +1 -1
- package/dist/{use-customer-account-CRYpHpFM.mjs → use-customer-account-CewcODTd.mjs} +3 -3
- package/dist/{use-customer-account-CRYpHpFM.mjs.map → use-customer-account-CewcODTd.mjs.map} +1 -1
- package/dist/{use-fluid-api-C5ZLs2TP.mjs → use-fluid-api-D1QuzLw0.mjs} +2 -2
- package/dist/{use-fluid-api-C5ZLs2TP.mjs.map → use-fluid-api-D1QuzLw0.mjs.map} +1 -1
- package/dist/{use-fluid-api-BUitsoDu.cjs → use-fluid-api-zeOS14jg.cjs} +2 -2
- package/dist/{use-fluid-api-BUitsoDu.cjs.map → use-fluid-api-zeOS14jg.cjs.map} +1 -1
- package/package.json +12 -12
- package/dist/FluidProvider-Eohedipr.mjs.map +0 -1
- package/dist/FluidProvider-Sc51VlLw.cjs.map +0 -1
- package/dist/ProductsScreen-2pUHZJop.mjs.map +0 -1
- package/dist/ProductsScreen-ueEJP0MJ.cjs.map +0 -1
- package/dist/ShopScreen-BKBaNPsG.cjs.map +0 -1
- package/dist/ShopScreen-D-TXRWZR.mjs.map +0 -1
- package/dist/products-BKZ1siXg.cjs +0 -29
- package/dist/products-DOO1TBcm.mjs +0 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
require("./FluidProvider-
|
|
2
|
+
require("./FluidProvider-C27-ijsq.cjs");
|
|
3
3
|
require("./PointsWidget-Bgl95R-6.cjs");
|
|
4
4
|
require("./error-state-BDBF2JrB.cjs");
|
|
5
5
|
require("./ScreenRenderer-D65AsKjr.cjs");
|
|
@@ -36,7 +36,7 @@ require("./VideoWidget-CNHJrY7I.cjs");
|
|
|
36
36
|
require("./ScreenHeaderContext-wrJlkhgN.cjs");
|
|
37
37
|
require("./order-detail-06VbWJjw.cjs");
|
|
38
38
|
require("./dist-thaj08s5.cjs");
|
|
39
|
-
const require_ContactsScreen = require("./ContactsScreen-
|
|
39
|
+
const require_ContactsScreen = require("./ContactsScreen-0h6EW-5L.cjs");
|
|
40
40
|
require("./src-Bp-dRR29.cjs");
|
|
41
41
|
require("./dist-BK4mvUPm.cjs");
|
|
42
42
|
exports.ContactsScreen = require_ContactsScreen.ContactsScreen;
|
|
@@ -688,6 +688,19 @@ function createPersister() {
|
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
//#endregion
|
|
691
|
+
//#region ../core/src/types/fluidos-api-context.ts
|
|
692
|
+
const FluidOsReadApiContext = (0, react.createContext)(null);
|
|
693
|
+
const FluidOsBuilderApiContext = (0, react.createContext)(null);
|
|
694
|
+
/** Provider for read-only manifest fetching (used by SDK). */
|
|
695
|
+
const FluidOsApiProvider = FluidOsReadApiContext.Provider;
|
|
696
|
+
FluidOsBuilderApiContext.Provider;
|
|
697
|
+
/** Optional variant that returns null when no provider is present. */
|
|
698
|
+
function useFluidOsApiOptional() {
|
|
699
|
+
const builderApi = (0, react.useContext)(FluidOsBuilderApiContext);
|
|
700
|
+
const readApi = (0, react.useContext)(FluidOsReadApiContext);
|
|
701
|
+
return builderApi ?? readApi;
|
|
702
|
+
}
|
|
703
|
+
//#endregion
|
|
691
704
|
//#region ../../api-clients/fluidos/src/namespaces/fluid_os.ts
|
|
692
705
|
/**
|
|
693
706
|
* Get active Fluid OS definition
|
|
@@ -3210,6 +3223,17 @@ function toNavigationItem(item) {
|
|
|
3210
3223
|
//#endregion
|
|
3211
3224
|
//#region src/transforms/index.ts
|
|
3212
3225
|
/**
|
|
3226
|
+
* Convert a raw FluidOS API response to RawManifestResponse.
|
|
3227
|
+
*
|
|
3228
|
+
* The wire format includes `navigation_items` and full theme objects,
|
|
3229
|
+
* but the generated OpenAPI types differ (e.g. `navigation_tree`, `themes: number[]`).
|
|
3230
|
+
* This function bridges that gap so callers avoid `as unknown as` casts.
|
|
3231
|
+
*/
|
|
3232
|
+
function toRawManifest(raw) {
|
|
3233
|
+
if (!raw.manifest) throw new Error("FluidOS API returned empty manifest");
|
|
3234
|
+
return raw;
|
|
3235
|
+
}
|
|
3236
|
+
/**
|
|
3213
3237
|
* Transform a raw FluidOS manifest API response into RepAppData.
|
|
3214
3238
|
*
|
|
3215
3239
|
* This is the top-level transform used by `FluidClient.app.get()`.
|
|
@@ -3493,14 +3517,14 @@ function createFluidClient(config) {
|
|
|
3493
3517
|
updateProfile: (data) => patch("/api/reps/me", data)
|
|
3494
3518
|
},
|
|
3495
3519
|
profile: { get: async () => {
|
|
3496
|
-
return transformManifestToRepAppData(await getFluidOSManifest(fetchClient, { platform: "browser" })).profile;
|
|
3520
|
+
return transformManifestToRepAppData(toRawManifest(await getFluidOSManifest(fetchClient, { platform: "browser" }))).profile;
|
|
3497
3521
|
} },
|
|
3498
3522
|
app: {
|
|
3499
3523
|
getRaw: async () => {
|
|
3500
|
-
return await getFluidOSManifest(fetchClient, { platform: "browser" });
|
|
3524
|
+
return toRawManifest(await getFluidOSManifest(fetchClient, { platform: "browser" }));
|
|
3501
3525
|
},
|
|
3502
3526
|
get: async () => {
|
|
3503
|
-
return transformManifestToRepAppData(await getFluidOSManifest(fetchClient, { platform: "browser" }));
|
|
3527
|
+
return transformManifestToRepAppData(toRawManifest(await getFluidOSManifest(fetchClient, { platform: "browser" })));
|
|
3504
3528
|
}
|
|
3505
3529
|
},
|
|
3506
3530
|
permissions: { get: () => get("/api/company/roles/my_permissions") },
|
|
@@ -3511,6 +3535,12 @@ function createFluidClient(config) {
|
|
|
3511
3535
|
};
|
|
3512
3536
|
}
|
|
3513
3537
|
//#endregion
|
|
3538
|
+
//#region src/adapters/fluidos-api-adapter.ts
|
|
3539
|
+
/** Create a FluidOsReadApi adapter backed by a FetchClient. */
|
|
3540
|
+
function createFluidOsReadAdapter(client) {
|
|
3541
|
+
return { getManifest: (params) => getFluidOSManifest(client, params) };
|
|
3542
|
+
}
|
|
3543
|
+
//#endregion
|
|
3514
3544
|
//#region src/providers/FluidThemeProvider.tsx
|
|
3515
3545
|
/**
|
|
3516
3546
|
* Theme Provider for Fluid SDK
|
|
@@ -3926,6 +3956,7 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
|
|
|
3926
3956
|
getAuthToken: () => configRef.current.getAuthToken?.() ?? null,
|
|
3927
3957
|
onAuthError: () => configRef.current.onAuthError?.()
|
|
3928
3958
|
}), [config.baseUrl]);
|
|
3959
|
+
const fluidOsApi = (0, react.useMemo)(() => createFluidOsReadAdapter(client.fetchClient), [client.fetchClient]);
|
|
3929
3960
|
const contextValue = (0, react.useMemo)(() => ({
|
|
3930
3961
|
client,
|
|
3931
3962
|
config: configRef.current
|
|
@@ -3960,14 +3991,17 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
|
|
|
3960
3991
|
client: queryClient ?? defaultQueryClient,
|
|
3961
3992
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FluidContext.Provider, {
|
|
3962
3993
|
value: contextValue,
|
|
3963
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3994
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FluidOsApiProvider, {
|
|
3995
|
+
value: fluidOsApi,
|
|
3996
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CustomerIdEnricher, {
|
|
3997
|
+
baseUrl: dataSourceBaseUrl,
|
|
3998
|
+
getApiHeaders,
|
|
3999
|
+
variables: effectiveVariables,
|
|
4000
|
+
registry,
|
|
4001
|
+
themeProviderProps,
|
|
4002
|
+
onAuthError: config.onAuthError,
|
|
4003
|
+
children
|
|
4004
|
+
})
|
|
3971
4005
|
})
|
|
3972
4006
|
})
|
|
3973
4007
|
});
|
|
@@ -4419,6 +4453,12 @@ Object.defineProperty(exports, "toNavigationItem", {
|
|
|
4419
4453
|
return toNavigationItem;
|
|
4420
4454
|
}
|
|
4421
4455
|
});
|
|
4456
|
+
Object.defineProperty(exports, "toRawManifest", {
|
|
4457
|
+
enumerable: true,
|
|
4458
|
+
get: function() {
|
|
4459
|
+
return toRawManifest;
|
|
4460
|
+
}
|
|
4461
|
+
});
|
|
4422
4462
|
Object.defineProperty(exports, "toScreenDefinition", {
|
|
4423
4463
|
enumerable: true,
|
|
4424
4464
|
get: function() {
|
|
@@ -4455,6 +4495,12 @@ Object.defineProperty(exports, "useFluidContext", {
|
|
|
4455
4495
|
return useFluidContext;
|
|
4456
4496
|
}
|
|
4457
4497
|
});
|
|
4498
|
+
Object.defineProperty(exports, "useFluidOsApiOptional", {
|
|
4499
|
+
enumerable: true,
|
|
4500
|
+
get: function() {
|
|
4501
|
+
return useFluidOsApiOptional;
|
|
4502
|
+
}
|
|
4503
|
+
});
|
|
4458
4504
|
Object.defineProperty(exports, "useThemeContext", {
|
|
4459
4505
|
enumerable: true,
|
|
4460
4506
|
get: function() {
|
|
@@ -4474,4 +4520,4 @@ Object.defineProperty(exports, "widgetPropertySchemas", {
|
|
|
4474
4520
|
}
|
|
4475
4521
|
});
|
|
4476
4522
|
|
|
4477
|
-
//# sourceMappingURL=FluidProvider-
|
|
4523
|
+
//# sourceMappingURL=FluidProvider-C27-ijsq.cjs.map
|