@fluid-app/portal-sdk 0.1.142 → 0.1.143
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-CO-wctCB.cjs → AppDownloadScreen-BgG2WT8g.cjs} +2 -2
- package/dist/{AppDownloadScreen-CO-wctCB.cjs.map → AppDownloadScreen-BgG2WT8g.cjs.map} +1 -1
- package/dist/{AppDownloadScreen-Df1OPjkx.mjs → AppDownloadScreen-CFBcywVF.mjs} +2 -2
- package/dist/{AppDownloadScreen-Df1OPjkx.mjs.map → AppDownloadScreen-CFBcywVF.mjs.map} +1 -1
- package/dist/{AppDownloadScreen-nz3fgOVF.cjs → AppDownloadScreen-CfyCY70_.cjs} +2 -2
- package/dist/{ContactsScreen-cWDFP8e-.mjs → ContactsScreen-B0CcTg4i.mjs} +2 -2
- package/dist/{ContactsScreen-cWDFP8e-.mjs.map → ContactsScreen-B0CcTg4i.mjs.map} +1 -1
- package/dist/{ContactsScreen-BPeQemgG.cjs → ContactsScreen-C2SykfSe.cjs} +2 -2
- package/dist/{ContactsScreen-BPeQemgG.cjs.map → ContactsScreen-C2SykfSe.cjs.map} +1 -1
- package/dist/{ContactsScreen-gJB99SIY.cjs → ContactsScreen-cq-zMYwU.cjs} +2 -2
- package/dist/{FluidProvider-DAe8xcAD.cjs → FluidProvider-9laphShJ.cjs} +67 -20
- package/dist/FluidProvider-9laphShJ.cjs.map +1 -0
- package/dist/{FluidProvider-BIoYteOA.mjs → FluidProvider-D8lmeIsK.mjs} +62 -9
- package/dist/FluidProvider-D8lmeIsK.mjs.map +1 -0
- package/dist/{MessagingScreen-BsABB4tn.cjs → MessagingScreen-CQGyTGz7.cjs} +2 -2
- package/dist/{MessagingScreen-BgY-m0Pm.cjs → MessagingScreen-DY8FhtNu.cjs} +3 -3
- package/dist/{MessagingScreen-BgY-m0Pm.cjs.map → MessagingScreen-DY8FhtNu.cjs.map} +1 -1
- package/dist/{MessagingScreen-DKXOCrBj.mjs → MessagingScreen-DmwSYXYa.mjs} +3 -3
- package/dist/{MessagingScreen-DKXOCrBj.mjs.map → MessagingScreen-DmwSYXYa.mjs.map} +1 -1
- package/dist/{MySiteScreen-BTF8MZCU.cjs → MySiteScreen-3uoP4Nro.cjs} +2 -2
- package/dist/{MySiteScreen-D8lFT21T.mjs → MySiteScreen-CP4ePv25.mjs} +2 -2
- package/dist/{MySiteScreen-D8lFT21T.mjs.map → MySiteScreen-CP4ePv25.mjs.map} +1 -1
- package/dist/{MySiteScreen-DVjRy-nI.cjs → MySiteScreen-CZf06WvK.cjs} +2 -2
- package/dist/{MySiteScreen-DVjRy-nI.cjs.map → MySiteScreen-CZf06WvK.cjs.map} +1 -1
- package/dist/{OrdersScreen-CbCus7pT.cjs → OrdersScreen-B4s3yqWO.cjs} +2 -2
- package/dist/{OrdersScreen-CbCus7pT.cjs.map → OrdersScreen-B4s3yqWO.cjs.map} +1 -1
- package/dist/{OrdersScreen-BHtq-tvn.mjs → OrdersScreen-DE1lIZKm.mjs} +2 -2
- package/dist/{OrdersScreen-BHtq-tvn.mjs.map → OrdersScreen-DE1lIZKm.mjs.map} +1 -1
- package/dist/{OrdersScreen-BB_n4hgl.cjs → OrdersScreen-qnOfswUT.cjs} +2 -2
- package/dist/{ProductsScreen-CP29k8Z3.cjs → ProductsScreen-Bq1Q_T06.cjs} +2 -2
- package/dist/{ProductsScreen-CuMgdka9.cjs → ProductsScreen-CC1BM7Ye.cjs} +5 -5
- package/dist/{ProductsScreen-CuMgdka9.cjs.map → ProductsScreen-CC1BM7Ye.cjs.map} +1 -1
- package/dist/{ProductsScreen-DSgwSnVj.mjs → ProductsScreen-DA0yNpXn.mjs} +3 -2
- package/dist/{ProductsScreen-CU8nGFN5.mjs → ProductsScreen-chLWiA1J.mjs} +5 -5
- package/dist/{ProductsScreen-CU8nGFN5.mjs.map → ProductsScreen-chLWiA1J.mjs.map} +1 -1
- package/dist/{ProfileScreen-CjrhOuY3.cjs → ProfileScreen-CxvAKgdU.cjs} +2 -2
- package/dist/{ProfileScreen-CDZ632ue.cjs → ProfileScreen-Dm8EcLVL.cjs} +5 -5
- package/dist/{ProfileScreen-CDZ632ue.cjs.map → ProfileScreen-Dm8EcLVL.cjs.map} +1 -1
- package/dist/{ProfileScreen-BajH0_kR.mjs → ProfileScreen-DmV9jRth.mjs} +4 -4
- package/dist/{ProfileScreen-BajH0_kR.mjs.map → ProfileScreen-DmV9jRth.mjs.map} +1 -1
- package/dist/{ShareablesScreen-F3ockfKE.mjs → ShareablesScreen-B9iGTVVk.mjs} +6 -6
- package/dist/{ShareablesScreen-F3ockfKE.mjs.map → ShareablesScreen-B9iGTVVk.mjs.map} +1 -1
- package/dist/{ShareablesScreen-acj-gCLe.cjs → ShareablesScreen-CNmjazDa.cjs} +2 -2
- package/dist/{ShareablesScreen-ITLkfDHV.cjs → ShareablesScreen-CVkk0Lpn.cjs} +6 -6
- package/dist/{ShareablesScreen-ITLkfDHV.cjs.map → ShareablesScreen-CVkk0Lpn.cjs.map} +1 -1
- package/dist/{ShareablesScreen-B63fbgRJ.mjs → ShareablesScreen-D7cFD7Sn.mjs} +3 -2
- package/dist/{ShopScreen-3Z-9TKeI.cjs → ShopScreen-B5GJr-kG.cjs} +4 -4
- package/dist/{ShopScreen-3Z-9TKeI.cjs.map → ShopScreen-B5GJr-kG.cjs.map} +1 -1
- package/dist/{ShopScreen-DdIlnLcB.mjs → ShopScreen-BdyMXm0s.mjs} +4 -4
- package/dist/{ShopScreen-DdIlnLcB.mjs.map → ShopScreen-BdyMXm0s.mjs.map} +1 -1
- package/dist/{ShopScreen-Bit0Fdgr.cjs → ShopScreen-Che0Axn9.cjs} +2 -2
- package/dist/{SubscriptionsScreen-B2-iZojm.mjs → SubscriptionsScreen-BqiGuMsz.mjs} +3 -3
- package/dist/{SubscriptionsScreen-B2-iZojm.mjs.map → SubscriptionsScreen-BqiGuMsz.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-01RuJl73.cjs → SubscriptionsScreen-DHYHBWVD.cjs} +2 -2
- package/dist/{SubscriptionsScreen-DV5RUV66.cjs → SubscriptionsScreen-xNd35SPG.cjs} +3 -3
- package/dist/{SubscriptionsScreen-DV5RUV66.cjs.map → SubscriptionsScreen-xNd35SPG.cjs.map} +1 -1
- package/dist/index.cjs +34 -34
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +34 -34
- package/dist/{use-account-clients-CNDyBxm7.mjs → use-account-clients-B6QsWPOL.mjs} +3 -47
- package/dist/use-account-clients-B6QsWPOL.mjs.map +1 -0
- package/dist/{use-account-clients-nmrVvm98.cjs → use-account-clients-CrfXjWkZ.cjs} +2 -52
- package/dist/use-account-clients-CrfXjWkZ.cjs.map +1 -0
- package/dist/{use-current-user-5Kr_1nZZ.cjs → use-current-user-BcmQRCRx.cjs} +3 -3
- package/dist/{use-current-user-5Kr_1nZZ.cjs.map → use-current-user-BcmQRCRx.cjs.map} +1 -1
- package/dist/{use-current-user-DAxsYRk-.mjs → use-current-user-tKZEo3eh.mjs} +3 -3
- package/dist/{use-current-user-DAxsYRk-.mjs.map → use-current-user-tKZEo3eh.mjs.map} +1 -1
- package/dist/{use-fluid-api-BJ-PZ0Zx.mjs → use-fluid-api-9llkapbM.mjs} +2 -2
- package/dist/{use-fluid-api-BJ-PZ0Zx.mjs.map → use-fluid-api-9llkapbM.mjs.map} +1 -1
- package/dist/{use-fluid-api-uEqwymly.cjs → use-fluid-api-Cj5Bow8S.cjs} +2 -2
- package/dist/{use-fluid-api-uEqwymly.cjs.map → use-fluid-api-Cj5Bow8S.cjs.map} +1 -1
- package/dist/{use-fluid-auth-DXDtI7Ep.cjs → use-fluid-auth-D4NGGBW0.cjs} +2 -2
- package/dist/{use-fluid-auth-DXDtI7Ep.cjs.map → use-fluid-auth-D4NGGBW0.cjs.map} +1 -1
- package/dist/{use-fluid-auth-DrtkGGwT.mjs → use-fluid-auth-vb2QMUi4.mjs} +2 -2
- package/dist/{use-fluid-auth-DrtkGGwT.mjs.map → use-fluid-auth-vb2QMUi4.mjs.map} +1 -1
- package/dist/{use-portal-products-client-CXZj-fKI.cjs → use-portal-products-client-3JPetPQU.cjs} +2 -2
- package/dist/{use-portal-products-client-CXZj-fKI.cjs.map → use-portal-products-client-3JPetPQU.cjs.map} +1 -1
- package/dist/{use-portal-products-client-zvmWMf8p.mjs → use-portal-products-client-CJjec9vb.mjs} +2 -2
- package/dist/{use-portal-products-client-zvmWMf8p.mjs.map → use-portal-products-client-CJjec9vb.mjs.map} +1 -1
- package/package.json +15 -15
- package/dist/FluidProvider-BIoYteOA.mjs.map +0 -1
- package/dist/FluidProvider-DAe8xcAD.cjs.map +0 -1
- package/dist/use-account-clients-CNDyBxm7.mjs.map +0 -1
- package/dist/use-account-clients-nmrVvm98.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
require("./FluidProvider-
|
|
2
|
+
require("./FluidProvider-9laphShJ.cjs");
|
|
3
3
|
require("./PointsWidget-DG0QQHqL.cjs");
|
|
4
4
|
require("./error-state-Bpq2CYvz.cjs");
|
|
5
5
|
require("./ScreenRenderer-DFcTR685.cjs");
|
|
@@ -35,7 +35,7 @@ require("./ToDoWidget-DZUvDwnJ.cjs");
|
|
|
35
35
|
require("./VideoWidget-BmVIIfvM.cjs");
|
|
36
36
|
require("./ScreenHeaderContext-DpVOhFzT.cjs");
|
|
37
37
|
require("./dist-BbS_7TvS.cjs");
|
|
38
|
-
const require_ContactsScreen = require("./ContactsScreen-
|
|
38
|
+
const require_ContactsScreen = require("./ContactsScreen-C2SykfSe.cjs");
|
|
39
39
|
require("./SearchSort-CyeeUmwC.cjs");
|
|
40
40
|
require("./order-status-badge-DsbuULAc.cjs");
|
|
41
41
|
require("./src-CzwiFO_J.cjs");
|
|
@@ -507,6 +507,15 @@ function useAppDefinitionApi() {
|
|
|
507
507
|
return api;
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
|
+
//#region ../core/src/account-api-context.ts
|
|
511
|
+
const AccountApiContext = (0, react.createContext)(null);
|
|
512
|
+
const AccountApiProvider = AccountApiContext.Provider;
|
|
513
|
+
function useAccountApi() {
|
|
514
|
+
const api = (0, react.useContext)(AccountApiContext);
|
|
515
|
+
if (!api) throw new Error("useAccountApi must be used within an AccountApiProvider");
|
|
516
|
+
return api;
|
|
517
|
+
}
|
|
518
|
+
//#endregion
|
|
510
519
|
//#region ../../platform/api-client-core/src/fetch-client.ts
|
|
511
520
|
/**
|
|
512
521
|
* API Error class compatible with fluid-admin's ApiError
|
|
@@ -2300,6 +2309,46 @@ function createAppDefinitionApiAdapter(client) {
|
|
|
2300
2309
|
} };
|
|
2301
2310
|
}
|
|
2302
2311
|
//#endregion
|
|
2312
|
+
//#region src/adapters/account-api-adapter.ts
|
|
2313
|
+
function mapAccount(raw) {
|
|
2314
|
+
return {
|
|
2315
|
+
id: raw.id ?? 0,
|
|
2316
|
+
member_type: raw.member_type ?? "rep",
|
|
2317
|
+
first_name: raw.first_name ?? "",
|
|
2318
|
+
last_name: raw.last_name ?? "",
|
|
2319
|
+
email: raw.email ?? "",
|
|
2320
|
+
phone: raw.phone ?? null,
|
|
2321
|
+
bio: raw.bio ?? null,
|
|
2322
|
+
avatar_url: raw.avatar_url ?? null,
|
|
2323
|
+
slug: raw.slug ?? "",
|
|
2324
|
+
social_links: raw.social_links ?? null
|
|
2325
|
+
};
|
|
2326
|
+
}
|
|
2327
|
+
function createAccountApiAdapter(client) {
|
|
2328
|
+
return {
|
|
2329
|
+
fetchAccount: async () => {
|
|
2330
|
+
const response = await account_show(client);
|
|
2331
|
+
return {
|
|
2332
|
+
account: mapAccount(response.account ?? {}),
|
|
2333
|
+
meta: {
|
|
2334
|
+
request_id: response.meta?.request_id ?? "",
|
|
2335
|
+
timestamp: response.meta?.timestamp ?? ""
|
|
2336
|
+
}
|
|
2337
|
+
};
|
|
2338
|
+
},
|
|
2339
|
+
updateAccount: async (body) => {
|
|
2340
|
+
const response = await account_update(client, body);
|
|
2341
|
+
return {
|
|
2342
|
+
account: mapAccount(response.account ?? {}),
|
|
2343
|
+
meta: {
|
|
2344
|
+
request_id: response.meta?.request_id ?? "",
|
|
2345
|
+
timestamp: response.meta?.timestamp ?? ""
|
|
2346
|
+
}
|
|
2347
|
+
};
|
|
2348
|
+
}
|
|
2349
|
+
};
|
|
2350
|
+
}
|
|
2351
|
+
//#endregion
|
|
2303
2352
|
//#region src/providers/FluidThemeProvider.tsx
|
|
2304
2353
|
/**
|
|
2305
2354
|
* Theme Provider for Fluid SDK
|
|
@@ -2661,6 +2710,7 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
|
|
|
2661
2710
|
defaultHeaders: { ...csrfToken ? { "X-CSRF-Token": csrfToken } : {} }
|
|
2662
2711
|
}), [config.baseUrl, csrfToken]);
|
|
2663
2712
|
const appDefinitionApi = (0, react.useMemo)(() => createAppDefinitionApiAdapter(portalTenantClient), [portalTenantClient]);
|
|
2713
|
+
const accountApi = (0, react.useMemo)(() => createAccountApiAdapter(portalTenantClient), [portalTenantClient]);
|
|
2664
2714
|
const contextValue = (0, react.useMemo)(() => ({
|
|
2665
2715
|
client,
|
|
2666
2716
|
config: configRef.current
|
|
@@ -2695,13 +2745,16 @@ function FluidProvider({ config, children, queryClient, initialTheme, themeConta
|
|
|
2695
2745
|
value: fluidOsApi,
|
|
2696
2746
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AppDefinitionApiProvider, {
|
|
2697
2747
|
value: appDefinitionApi,
|
|
2698
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2748
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccountApiProvider, {
|
|
2749
|
+
value: accountApi,
|
|
2750
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderStack, {
|
|
2751
|
+
baseUrl: dataSourceBaseUrl,
|
|
2752
|
+
getApiHeaders,
|
|
2753
|
+
variables: effectiveVariables,
|
|
2754
|
+
registry,
|
|
2755
|
+
themeProviderProps,
|
|
2756
|
+
children
|
|
2757
|
+
})
|
|
2705
2758
|
})
|
|
2706
2759
|
})
|
|
2707
2760
|
})
|
|
@@ -2863,18 +2916,6 @@ Object.defineProperty(exports, "USER_TYPES", {
|
|
|
2863
2916
|
return USER_TYPES;
|
|
2864
2917
|
}
|
|
2865
2918
|
});
|
|
2866
|
-
Object.defineProperty(exports, "account_show", {
|
|
2867
|
-
enumerable: true,
|
|
2868
|
-
get: function() {
|
|
2869
|
-
return account_show;
|
|
2870
|
-
}
|
|
2871
|
-
});
|
|
2872
|
-
Object.defineProperty(exports, "account_update", {
|
|
2873
|
-
enumerable: true,
|
|
2874
|
-
get: function() {
|
|
2875
|
-
return account_update;
|
|
2876
|
-
}
|
|
2877
|
-
});
|
|
2878
2919
|
Object.defineProperty(exports, "applyTheme", {
|
|
2879
2920
|
enumerable: true,
|
|
2880
2921
|
get: function() {
|
|
@@ -3157,6 +3198,12 @@ Object.defineProperty(exports, "transformThemes", {
|
|
|
3157
3198
|
return transformThemes;
|
|
3158
3199
|
}
|
|
3159
3200
|
});
|
|
3201
|
+
Object.defineProperty(exports, "useAccountApi", {
|
|
3202
|
+
enumerable: true,
|
|
3203
|
+
get: function() {
|
|
3204
|
+
return useAccountApi;
|
|
3205
|
+
}
|
|
3206
|
+
});
|
|
3160
3207
|
Object.defineProperty(exports, "useAppDefinitionApi", {
|
|
3161
3208
|
enumerable: true,
|
|
3162
3209
|
get: function() {
|
|
@@ -3200,4 +3247,4 @@ Object.defineProperty(exports, "widgetPropertySchemas", {
|
|
|
3200
3247
|
}
|
|
3201
3248
|
});
|
|
3202
3249
|
|
|
3203
|
-
//# sourceMappingURL=FluidProvider-
|
|
3250
|
+
//# sourceMappingURL=FluidProvider-9laphShJ.cjs.map
|