@fluid-app/portal-sdk 0.1.340 → 0.1.342
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/{AddressAutocompleteInput-4OS-oYis.mjs → AddressAutocompleteInput-B9qlTAJB.mjs} +18 -17
- package/dist/AddressAutocompleteInput-B9qlTAJB.mjs.map +1 -0
- package/dist/{AddressAutocompleteInput-CZITNL-n.cjs → AddressAutocompleteInput-D-kCqSV0.cjs} +18 -17
- package/dist/AddressAutocompleteInput-D-kCqSV0.cjs.map +1 -0
- package/dist/{AppDownloadScreen-BYjlFEVq.cjs → AppDownloadScreen-DqqUBpS-.cjs} +5 -5
- package/dist/AppDownloadScreen-DqqUBpS-.cjs.map +1 -0
- package/dist/{AppDownloadScreen-BkPXQ6HD.mjs → AppDownloadScreen-ZUoc8X2D.mjs} +5 -5
- package/dist/AppDownloadScreen-ZUoc8X2D.mjs.map +1 -0
- package/dist/{CardWidget-Jv6HiiK-.cjs → CardWidget--S5FBquC.cjs} +2 -2
- package/dist/{CardWidget-Jv6HiiK-.cjs.map → CardWidget--S5FBquC.cjs.map} +1 -1
- package/dist/{CardWidget-C9UbLrzZ.mjs → CardWidget-ChfurL_z.mjs} +2 -2
- package/dist/{CardWidget-C9UbLrzZ.mjs.map → CardWidget-ChfurL_z.mjs.map} +1 -1
- package/dist/{CardWidget-Wj7aNAAe.cjs → CardWidget-DsfLoyup.cjs} +2 -2
- package/dist/{ContactsScreen-BDOyYGyR.cjs → ContactsScreen-B3Ena0O7.cjs} +2 -2
- package/dist/{ContactsScreen-6x_Y2HBg.cjs → ContactsScreen-CiegGc50.cjs} +18 -18
- package/dist/ContactsScreen-CiegGc50.cjs.map +1 -0
- package/dist/{ContactsScreen-CU5_SYVK.mjs → ContactsScreen-Cwyt5qIf.mjs} +18 -18
- package/dist/ContactsScreen-Cwyt5qIf.mjs.map +1 -0
- package/dist/{ContainerWidget-B0WqVKej.mjs → ContainerWidget-BHWPtBmF.mjs} +2 -2
- package/dist/{ContainerWidget-B0WqVKej.mjs.map → ContainerWidget-BHWPtBmF.mjs.map} +1 -1
- package/dist/{ContainerWidget-BJys0vji.cjs → ContainerWidget-Cf_D4TAi.cjs} +2 -2
- package/dist/{ContainerWidget-BJys0vji.cjs.map → ContainerWidget-Cf_D4TAi.cjs.map} +1 -1
- package/dist/{ContainerWidget-BPoDy9wl.cjs → ContainerWidget-CyDVJu83.cjs} +3 -3
- package/dist/{EmbedWidget-BjLKHqCD.cjs → EmbedWidget-B1gWxgsn.cjs} +2 -2
- package/dist/EmbedWidget-B1gWxgsn.cjs.map +1 -0
- package/dist/{EmbedWidget-DwYcDOSr.mjs → EmbedWidget-JVbp9wAL.mjs} +2 -2
- package/dist/EmbedWidget-JVbp9wAL.mjs.map +1 -0
- package/dist/{FluidProvider-CYgSHMUd.cjs → FluidProvider-BFU7ermL.cjs} +23 -23
- package/dist/{FluidProvider-CYgSHMUd.cjs.map → FluidProvider-BFU7ermL.cjs.map} +1 -1
- package/dist/{FluidProvider-rLNjrHI9.mjs → FluidProvider-BqJ-t2bW.mjs} +23 -23
- package/dist/{FluidProvider-rLNjrHI9.mjs.map → FluidProvider-BqJ-t2bW.mjs.map} +1 -1
- package/dist/{LayoutWidget-COFyne-B.cjs → LayoutWidget-3G-w-YLz.cjs} +2 -2
- package/dist/{LayoutWidget-_f70Meea.cjs → LayoutWidget-CG-dWz_c.cjs} +2 -2
- package/dist/{LayoutWidget-_f70Meea.cjs.map → LayoutWidget-CG-dWz_c.cjs.map} +1 -1
- package/dist/{LayoutWidget-CUG5HXPH.mjs → LayoutWidget-CrZG6Ipw.mjs} +2 -2
- package/dist/{LayoutWidget-CUG5HXPH.mjs.map → LayoutWidget-CrZG6Ipw.mjs.map} +1 -1
- package/dist/{MessagingScreen-CKPKnmdA.cjs → MessagingScreen-7BBNidBx.cjs} +15 -15
- package/dist/{MessagingScreen-DEKQhSxk.mjs → MessagingScreen-BIWRCS3T.mjs} +15 -15
- package/dist/{MessagingScreen-C_VnN2yj.cjs → MessagingScreen-D_wVko-i.cjs} +2 -2
- package/dist/{MessagingScreen-C_VnN2yj.cjs.map → MessagingScreen-D_wVko-i.cjs.map} +1 -1
- package/dist/{MessagingScreen-Bn1jNjdF.mjs → MessagingScreen-ZwSPp6zu.mjs} +2 -2
- package/dist/{MessagingScreen-Bn1jNjdF.mjs.map → MessagingScreen-ZwSPp6zu.mjs.map} +1 -1
- package/dist/{MySiteScreen-BLI39L5d.cjs → MySiteScreen-17KRkcj7.cjs} +29 -29
- package/dist/MySiteScreen-17KRkcj7.cjs.map +1 -0
- package/dist/{MySiteScreen-h7lBk3gC.cjs → MySiteScreen-BdBnDI6s.cjs} +1 -1
- package/dist/{MySiteScreen-B5jblKuW.mjs → MySiteScreen-BlTSt7a0.mjs} +29 -29
- package/dist/MySiteScreen-BlTSt7a0.mjs.map +1 -0
- package/dist/{MySiteWidget-CAj-6hXM.cjs → MySiteWidget-23lGcDO1.cjs} +3 -3
- package/dist/MySiteWidget-23lGcDO1.cjs.map +1 -0
- package/dist/{MySiteWidget-D0ZQpY-e.mjs → MySiteWidget-BXO8rmnf.mjs} +3 -3
- package/dist/{MySiteWidget-D0ZQpY-e.mjs.map → MySiteWidget-BXO8rmnf.mjs.map} +1 -1
- package/dist/{NestedWidget-D1iDgWh8.cjs → NestedWidget-CZGOZbpZ.cjs} +5 -5
- package/dist/NestedWidget-CZGOZbpZ.cjs.map +1 -0
- package/dist/{NestedWidget-BISpn0HM.cjs → NestedWidget-Cv8h-u5K.cjs} +1 -1
- package/dist/{NestedWidget-DPC6Y52o.mjs → NestedWidget-DuNuNaeT.mjs} +5 -5
- package/dist/NestedWidget-DuNuNaeT.mjs.map +1 -0
- package/dist/{OrdersScreen-BOu-b93J.mjs → OrdersScreen-BkUvISL0.mjs} +15 -15
- package/dist/{OrdersScreen-BX3Tp0W6.mjs → OrdersScreen-DgriwQBo.mjs} +4 -4
- package/dist/OrdersScreen-DgriwQBo.mjs.map +1 -0
- package/dist/{OrdersScreen-C0-X_pGG.cjs → OrdersScreen-TGNvFpjj.cjs} +4 -4
- package/dist/OrdersScreen-TGNvFpjj.cjs.map +1 -0
- package/dist/{OrdersScreen-CyT1TpjL.cjs → OrdersScreen-t1EwXPZx.cjs} +15 -15
- package/dist/{ProfileScreen-DEYfahoM.mjs → ProfileScreen-ChfAPeR8.mjs} +16 -16
- package/dist/{ProfileScreen-B1OMNJrQ.mjs → ProfileScreen-D1g_H9b7.mjs} +26 -17
- package/dist/ProfileScreen-D1g_H9b7.mjs.map +1 -0
- package/dist/{ProfileScreen-Dshb7RM2.cjs → ProfileScreen-D4mDCPKi.cjs} +26 -17
- package/dist/ProfileScreen-D4mDCPKi.cjs.map +1 -0
- package/dist/{ProfileScreen-BRbz69S3.cjs → ProfileScreen-DgcUeLkp.cjs} +16 -16
- package/dist/{RecentActivityWidget-CVQpo1jC.mjs → RecentActivityWidget-ClgOlTXl.mjs} +3 -3
- package/dist/RecentActivityWidget-ClgOlTXl.mjs.map +1 -0
- package/dist/{RecentActivityWidget-DnGybdc3.cjs → RecentActivityWidget-DZGKRR5x.cjs} +3 -3
- package/dist/RecentActivityWidget-DZGKRR5x.cjs.map +1 -0
- package/dist/{ScreenRenderer-BYiZunHL.cjs → ScreenRenderer-CLDJUinO.cjs} +2 -2
- package/dist/{ScreenRenderer-BYiZunHL.cjs.map → ScreenRenderer-CLDJUinO.cjs.map} +1 -1
- package/dist/{ScreenRenderer-1ZCNOyIb.mjs → ScreenRenderer-TobkTBMC.mjs} +2 -2
- package/dist/{ScreenRenderer-1ZCNOyIb.mjs.map → ScreenRenderer-TobkTBMC.mjs.map} +1 -1
- package/dist/{SearchSort-K0-ffUoD.cjs → SearchSort-CDuQPacI.cjs} +2 -2
- package/dist/{SearchSort-K0-ffUoD.cjs.map → SearchSort-CDuQPacI.cjs.map} +1 -1
- package/dist/{SearchSort-CObUt78n.mjs → SearchSort-CMUL0qt3.mjs} +2 -2
- package/dist/{SearchSort-CObUt78n.mjs.map → SearchSort-CMUL0qt3.mjs.map} +1 -1
- package/dist/{ShareablesScreen-aafzr3Vs.mjs → ShareablesScreen-B6Qs0xXn.mjs} +116 -116
- package/dist/ShareablesScreen-B6Qs0xXn.mjs.map +1 -0
- package/dist/{ShareablesScreen-COVW0ikb.cjs → ShareablesScreen-BAOW6RIK.cjs} +116 -116
- package/dist/ShareablesScreen-BAOW6RIK.cjs.map +1 -0
- package/dist/{ShareablesScreen-CNAem5rt.mjs → ShareablesScreen-C3K5ed-X.mjs} +2 -2
- package/dist/{ShareablesScreen-BZv1NXJV.cjs → ShareablesScreen-C3juoUMG.cjs} +2 -2
- package/dist/{ShopScreen-fcy9uJ3Z.cjs → ShopScreen-BjuLPVrk.cjs} +13 -13
- package/dist/ShopScreen-BjuLPVrk.cjs.map +1 -0
- package/dist/{ShopScreen-Bhn_bZ8O.mjs → ShopScreen-CtqHSaUW.mjs} +15 -15
- package/dist/{ShopScreen-CaEKFEGZ.cjs → ShopScreen-CwGh-q7J.cjs} +15 -15
- package/dist/{ShopScreen-dvruZcuz.mjs → ShopScreen-DNJ4Geoq.mjs} +13 -13
- package/dist/ShopScreen-DNJ4Geoq.mjs.map +1 -0
- package/dist/{ShopWidget-BZ48BUxp.cjs → ShopWidget-BAi2p8DP.cjs} +8 -8
- package/dist/ShopWidget-BAi2p8DP.cjs.map +1 -0
- package/dist/{ShopWidget-ZmhMoVmK.mjs → ShopWidget-D9-DhKP4.mjs} +8 -8
- package/dist/ShopWidget-D9-DhKP4.mjs.map +1 -0
- package/dist/{ShopWidget-DmlseAqM.cjs → ShopWidget-_T-ycRq1.cjs} +2 -2
- package/dist/{SubscriptionsScreen-CfxeuHVV.mjs → SubscriptionsScreen-Bw2mBSSR.mjs} +69 -51
- package/dist/SubscriptionsScreen-Bw2mBSSR.mjs.map +1 -0
- package/dist/{SubscriptionsScreen-BYQrZ2aR.mjs → SubscriptionsScreen-C4pGAW9l.mjs} +16 -16
- package/dist/{SubscriptionsScreen-BoSpOiOm.cjs → SubscriptionsScreen-CVoJNU7w.cjs} +16 -16
- package/dist/{SubscriptionsScreen-Bupuf-0D.cjs → SubscriptionsScreen-ClCmeCmY.cjs} +69 -51
- package/dist/SubscriptionsScreen-ClCmeCmY.cjs.map +1 -0
- package/dist/{TableWidget-Dyq8JXbd.cjs → TableWidget-C4F1IEKt.cjs} +1 -1
- package/dist/{TableWidget-fbsVsyqZ.mjs → TableWidget-CpHI9CGQ.mjs} +3 -3
- package/dist/TableWidget-CpHI9CGQ.mjs.map +1 -0
- package/dist/{TableWidget-wQkzw7Jg.cjs → TableWidget-RK0B52qT.cjs} +3 -3
- package/dist/TableWidget-RK0B52qT.cjs.map +1 -0
- package/dist/{ToDoWidget-BPh5ZLCT.cjs → ToDoWidget-B1uzfuI5.cjs} +2 -2
- package/dist/{ToDoWidget-1_JCx9X7.mjs → ToDoWidget-BaWksZpJ.mjs} +5 -5
- package/dist/{ToDoWidget-1_JCx9X7.mjs.map → ToDoWidget-BaWksZpJ.mjs.map} +1 -1
- package/dist/{ToDoWidget-1ZaXZTi4.cjs → ToDoWidget-C03kvBE-.cjs} +5 -5
- package/dist/{ToDoWidget-1ZaXZTi4.cjs.map → ToDoWidget-C03kvBE-.cjs.map} +1 -1
- package/dist/index.cjs +50 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +50 -50
- package/dist/index.mjs.map +1 -1
- package/dist/{task-composer-form-2z5Qk6US.cjs → task-composer-form-BEZGTBBZ.cjs} +2 -2
- package/dist/{task-composer-form-2z5Qk6US.cjs.map → task-composer-form-BEZGTBBZ.cjs.map} +1 -1
- package/dist/{task-composer-form-B3eR9kfb.mjs → task-composer-form-D_Pbl6qk.mjs} +2 -2
- package/dist/{task-composer-form-B3eR9kfb.mjs.map → task-composer-form-D_Pbl6qk.mjs.map} +1 -1
- package/package.json +11 -11
- package/dist/AddressAutocompleteInput-4OS-oYis.mjs.map +0 -1
- package/dist/AddressAutocompleteInput-CZITNL-n.cjs.map +0 -1
- package/dist/AppDownloadScreen-BYjlFEVq.cjs.map +0 -1
- package/dist/AppDownloadScreen-BkPXQ6HD.mjs.map +0 -1
- package/dist/ContactsScreen-6x_Y2HBg.cjs.map +0 -1
- package/dist/ContactsScreen-CU5_SYVK.mjs.map +0 -1
- package/dist/EmbedWidget-BjLKHqCD.cjs.map +0 -1
- package/dist/EmbedWidget-DwYcDOSr.mjs.map +0 -1
- package/dist/MySiteScreen-B5jblKuW.mjs.map +0 -1
- package/dist/MySiteScreen-BLI39L5d.cjs.map +0 -1
- package/dist/MySiteWidget-CAj-6hXM.cjs.map +0 -1
- package/dist/NestedWidget-D1iDgWh8.cjs.map +0 -1
- package/dist/NestedWidget-DPC6Y52o.mjs.map +0 -1
- package/dist/OrdersScreen-BX3Tp0W6.mjs.map +0 -1
- package/dist/OrdersScreen-C0-X_pGG.cjs.map +0 -1
- package/dist/ProfileScreen-B1OMNJrQ.mjs.map +0 -1
- package/dist/ProfileScreen-Dshb7RM2.cjs.map +0 -1
- package/dist/RecentActivityWidget-CVQpo1jC.mjs.map +0 -1
- package/dist/RecentActivityWidget-DnGybdc3.cjs.map +0 -1
- package/dist/ShareablesScreen-COVW0ikb.cjs.map +0 -1
- package/dist/ShareablesScreen-aafzr3Vs.mjs.map +0 -1
- package/dist/ShopScreen-dvruZcuz.mjs.map +0 -1
- package/dist/ShopScreen-fcy9uJ3Z.cjs.map +0 -1
- package/dist/ShopWidget-BZ48BUxp.cjs.map +0 -1
- package/dist/ShopWidget-ZmhMoVmK.mjs.map +0 -1
- package/dist/SubscriptionsScreen-Bupuf-0D.cjs.map +0 -1
- package/dist/SubscriptionsScreen-CfxeuHVV.mjs.map +0 -1
- package/dist/TableWidget-fbsVsyqZ.mjs.map +0 -1
- package/dist/TableWidget-wQkzw7Jg.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { at as subscriptions_list, ct as subscriptions_resume, dt as subscriptions_skip, ft as subscriptions_update, it as subscriptions_cancel, lt as subscriptions_retry, n as usePortalTenantClient, nt as subscription_bundles_create, ot as subscriptions_pause, rt as subscription_bundles_list, st as subscriptions_reactivate, ut as subscriptions_show } from "./PortalTenantClientProvider-BmRtQAbi.mjs";
|
|
2
|
-
import { R as isApiError, V as usePayApi, n as useFluidContext } from "./FluidProvider-
|
|
2
|
+
import { R as isApiError, V as usePayApi, n as useFluidContext } from "./FluidProvider-BqJ-t2bW.mjs";
|
|
3
3
|
import { n as useCountriesApi } from "./countries-api-context-DScC_39w.mjs";
|
|
4
4
|
import { a as useActiveLocale, n as createDomainTranslations, r as useDomainDict, t as createStaticDictAdapter } from "./static-dict-adapter-DjCpubZc.mjs";
|
|
5
5
|
import { t as createTranslationContext } from "./translation-api-context-factory-CJrVq_EB.mjs";
|
|
@@ -9,7 +9,7 @@ import { t as useStore } from "./use-store-fLSf5hUc.mjs";
|
|
|
9
9
|
import { n as payKeys, r as storeKeys } from "./query-keys-BkMRwfNo.mjs";
|
|
10
10
|
import { t as useAccount } from "./use-account-DtQOpv3N.mjs";
|
|
11
11
|
import { n as useAppNavigation } from "./AppNavigationContext-DNomMUij.mjs";
|
|
12
|
-
import { a as AddressFormDialog, c as PaymentIcon, f as ConfirmActionDialog, h as useProfileTranslation, i as CreditCardFormDialog, l as getCardDisplayName, m as ProfileTranslationBridge, n as createFluidPayApiAdapter, o as EditPaymentMethodDialog, p as EllipsesDropdown, r as mapToFluidPayPaymentMethod, s as FluidPayCoreProvider, t as AddressAutocompleteInput, u as getCardExpiry } from "./AddressAutocompleteInput-
|
|
12
|
+
import { a as AddressFormDialog, c as PaymentIcon, f as ConfirmActionDialog, h as useProfileTranslation, i as CreditCardFormDialog, l as getCardDisplayName, m as ProfileTranslationBridge, n as createFluidPayApiAdapter, o as EditPaymentMethodDialog, p as EllipsesDropdown, r as mapToFluidPayPaymentMethod, s as FluidPayCoreProvider, t as AddressAutocompleteInput, u as getCardExpiry } from "./AddressAutocompleteInput-B9qlTAJB.mjs";
|
|
13
13
|
import { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
14
14
|
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
15
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3518,7 +3518,7 @@ function BundleMemberRow({ sub, onClick, t }) {
|
|
|
3518
3518
|
return /* @__PURE__ */ jsxs("button", {
|
|
3519
3519
|
type: "button",
|
|
3520
3520
|
onClick,
|
|
3521
|
-
className: "hover:bg-muted/60 focus-visible:ring-foreground/30 -mx-2 flex cursor-pointer items-center gap-3 rounded-lg
|
|
3521
|
+
className: "hover:bg-muted/60 focus-visible:ring-foreground/30 -mx-2 flex cursor-pointer items-center gap-3 rounded-lg p-2 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none",
|
|
3522
3522
|
children: [
|
|
3523
3523
|
/* @__PURE__ */ jsx("div", {
|
|
3524
3524
|
className: "relative size-12 shrink-0",
|
|
@@ -4574,6 +4574,7 @@ function SubscriptionsListScreenInner({ customerId, isLoadingCustomer, onToast }
|
|
|
4574
4574
|
const payApi = usePayApi();
|
|
4575
4575
|
const countriesApi = useCountriesApi();
|
|
4576
4576
|
const { t } = useSubscriptionsTranslation();
|
|
4577
|
+
const { t: profileT } = useProfileTranslation();
|
|
4577
4578
|
const { config } = useFluidContext();
|
|
4578
4579
|
const { data: store } = useStore();
|
|
4579
4580
|
const bundlingEnabled = !!store?.bundle_subscriptions_enabled;
|
|
@@ -4625,21 +4626,29 @@ function SubscriptionsListScreenInner({ customerId, isLoadingCustomer, onToast }
|
|
|
4625
4626
|
}, [countriesData]);
|
|
4626
4627
|
const fetchStatesFromCountries = useCallback((countryCode) => Promise.resolve(statesByCountry.get(countryCode) ?? []), [statesByCountry]);
|
|
4627
4628
|
const createAddressMutation = useMutation({
|
|
4628
|
-
mutationFn: (body) =>
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4629
|
+
mutationFn: async (body) => {
|
|
4630
|
+
const existingIds = new Set(addresses.map((a) => a.id));
|
|
4631
|
+
const address = await payApi.createAddress({ address: {
|
|
4632
|
+
name: composeAddressName$1(body.address.first_name, body.address.last_name),
|
|
4633
|
+
street1: body.address.address1,
|
|
4634
|
+
street2: body.address.address2,
|
|
4635
|
+
city: body.address.city,
|
|
4636
|
+
state: body.address.state,
|
|
4637
|
+
zip: body.address.postal_code,
|
|
4638
|
+
country: body.address.country_code,
|
|
4639
|
+
default: body.address.default
|
|
4640
|
+
} });
|
|
4641
|
+
return {
|
|
4642
|
+
address,
|
|
4643
|
+
deduped: existingIds.has(address.id)
|
|
4644
|
+
};
|
|
4645
|
+
},
|
|
4646
|
+
onSuccess: ({ deduped }) => {
|
|
4639
4647
|
queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });
|
|
4640
|
-
onToast?.("
|
|
4648
|
+
if (deduped) onToast?.(profileT("address_already_exists"), "warning");
|
|
4649
|
+
else onToast?.(profileT("address_created"), "success");
|
|
4641
4650
|
},
|
|
4642
|
-
onError: () => onToast?.("
|
|
4651
|
+
onError: () => onToast?.(profileT("failed_to_create_address"), "error")
|
|
4643
4652
|
});
|
|
4644
4653
|
const addCreditCardMutation = useMutation({
|
|
4645
4654
|
mutationFn: (data) => payApi.createPaymentMethod({
|
|
@@ -4771,7 +4780,8 @@ function SubscriptionsListScreenInner({ customerId, isLoadingCustomer, onToast }
|
|
|
4771
4780
|
t: addressDialogT,
|
|
4772
4781
|
onSubmit: async (formData) => {
|
|
4773
4782
|
try {
|
|
4774
|
-
|
|
4783
|
+
const { address } = await createAddressMutation.mutateAsync(formData);
|
|
4784
|
+
onAddressCreated(mapToFluidPayAddress$2(address));
|
|
4775
4785
|
} catch {}
|
|
4776
4786
|
},
|
|
4777
4787
|
isSubmitting: createAddressMutation.isPending,
|
|
@@ -4795,7 +4805,7 @@ function SubscriptionsListScreen(props) {
|
|
|
4795
4805
|
const payApi = usePayApi();
|
|
4796
4806
|
return /* @__PURE__ */ jsx(FluidPayCoreProvider, {
|
|
4797
4807
|
api: useMemo(() => createFluidPayApiAdapter(payApi), [payApi]),
|
|
4798
|
-
children: /* @__PURE__ */ jsx(SubscriptionsListScreenInner, { ...props })
|
|
4808
|
+
children: /* @__PURE__ */ jsx(ProfileTranslationBridge, { children: /* @__PURE__ */ jsx(SubscriptionsListScreenInner, { ...props }) })
|
|
4799
4809
|
});
|
|
4800
4810
|
}
|
|
4801
4811
|
//#endregion
|
|
@@ -4972,7 +4982,7 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
|
|
|
4972
4982
|
type: "radio",
|
|
4973
4983
|
checked: pauseType === "indefinite",
|
|
4974
4984
|
onChange: () => setPauseType("indefinite"),
|
|
4975
|
-
className: "border-border accent-primary
|
|
4985
|
+
className: "border-border accent-primary size-4 focus:ring-0"
|
|
4976
4986
|
}), /* @__PURE__ */ jsx(Label, {
|
|
4977
4987
|
htmlFor: "pause-indefinitely",
|
|
4978
4988
|
className: "text-foreground cursor-pointer text-sm font-medium",
|
|
@@ -4988,7 +4998,7 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
|
|
|
4988
4998
|
type: "radio",
|
|
4989
4999
|
checked: pauseType === "order_count",
|
|
4990
5000
|
onChange: () => setPauseType("order_count"),
|
|
4991
|
-
className: "border-border accent-primary
|
|
5001
|
+
className: "border-border accent-primary size-4 focus:ring-0"
|
|
4992
5002
|
}), /* @__PURE__ */ jsx(Label, {
|
|
4993
5003
|
htmlFor: "pause-order-count",
|
|
4994
5004
|
className: "text-foreground cursor-pointer text-sm font-medium",
|
|
@@ -5037,7 +5047,7 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
|
|
|
5037
5047
|
className: "h-10 min-w-[70px] rounded p-3",
|
|
5038
5048
|
onClick: handleConfirm,
|
|
5039
5049
|
disabled: isActionDisabled || isLoading,
|
|
5040
|
-
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground
|
|
5050
|
+
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground size-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : t("pause_dialog_action")
|
|
5041
5051
|
})]
|
|
5042
5052
|
}) })
|
|
5043
5053
|
]
|
|
@@ -5115,7 +5125,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
|
|
|
5115
5125
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
5116
5126
|
variant: "outline",
|
|
5117
5127
|
className: cn$1("border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground h-9 w-full justify-start border px-3 py-2 text-left font-normal", !selectedDate && "text-muted-foreground hover:text-muted-foreground"),
|
|
5118
|
-
children: [selectedDate ? format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: t("date_placeholder") }), /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground ml-auto
|
|
5128
|
+
children: [selectedDate ? format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: t("date_placeholder") }), /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground ml-auto size-4" })]
|
|
5119
5129
|
})
|
|
5120
5130
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
5121
5131
|
className: "bg-popover w-auto rounded-md border p-0 shadow-lg",
|
|
@@ -5169,7 +5179,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
|
|
|
5169
5179
|
className: "bg-primary text-primary-foreground h-10 min-w-[70px] rounded p-3 hover:opacity-90 disabled:opacity-50",
|
|
5170
5180
|
onClick: handleConfirm,
|
|
5171
5181
|
disabled: !selectedDate || isLoading,
|
|
5172
|
-
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground
|
|
5182
|
+
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground size-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : t("resume_dialog_action")
|
|
5173
5183
|
})]
|
|
5174
5184
|
}) })
|
|
5175
5185
|
]
|
|
@@ -5242,7 +5252,7 @@ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMes
|
|
|
5242
5252
|
}), colors.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
5243
5253
|
className: "mt-0.5 flex items-center justify-center gap-0.5",
|
|
5244
5254
|
children: colors.map((c, i) => /* @__PURE__ */ jsx("span", {
|
|
5245
|
-
className: "
|
|
5255
|
+
className: "size-1 rounded-[1px]",
|
|
5246
5256
|
style: { backgroundColor: c }
|
|
5247
5257
|
}, `${key}-${i}`))
|
|
5248
5258
|
})]
|
|
@@ -5310,7 +5320,7 @@ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMes
|
|
|
5310
5320
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
5311
5321
|
variant: "outline",
|
|
5312
5322
|
className: cn$1("border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground h-9 w-full justify-start border px-3 py-2 text-left font-normal", !selectedDate && "text-muted-foreground hover:text-muted-foreground"),
|
|
5313
|
-
children: [selectedDate ? format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: t("date_placeholder") }), /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground ml-auto
|
|
5323
|
+
children: [selectedDate ? format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: t("date_placeholder") }), /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground ml-auto size-4" })]
|
|
5314
5324
|
})
|
|
5315
5325
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
5316
5326
|
className: "bg-popover pointer-events-auto z-[9999] w-auto rounded-md border p-0 shadow-lg",
|
|
@@ -5362,7 +5372,7 @@ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMes
|
|
|
5362
5372
|
className: "bg-muted text-muted-foreground sticky top-0",
|
|
5363
5373
|
children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
5364
5374
|
/* @__PURE__ */ jsx("th", {
|
|
5365
|
-
className: "w-6
|
|
5375
|
+
className: "w-6 p-2",
|
|
5366
5376
|
"aria-label": "Color"
|
|
5367
5377
|
}),
|
|
5368
5378
|
/* @__PURE__ */ jsx("th", {
|
|
@@ -5378,10 +5388,10 @@ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMes
|
|
|
5378
5388
|
className: "divide-border divide-y",
|
|
5379
5389
|
children: subscriptionsWithColor.map((sub) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
5380
5390
|
/* @__PURE__ */ jsx("td", {
|
|
5381
|
-
className: "
|
|
5391
|
+
className: "p-2",
|
|
5382
5392
|
children: /* @__PURE__ */ jsx("span", {
|
|
5383
5393
|
"aria-hidden": true,
|
|
5384
|
-
className: "inline-block
|
|
5394
|
+
className: "inline-block size-2.5 rounded-full",
|
|
5385
5395
|
style: { backgroundColor: sub.color }
|
|
5386
5396
|
})
|
|
5387
5397
|
}),
|
|
@@ -5428,7 +5438,7 @@ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMes
|
|
|
5428
5438
|
className: "h-10 min-w-[70px] rounded p-3",
|
|
5429
5439
|
onClick: handleConfirm,
|
|
5430
5440
|
disabled: !selectedDate || isLoading,
|
|
5431
|
-
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground
|
|
5441
|
+
children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground size-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : t("edit_bill_date_action")
|
|
5432
5442
|
})]
|
|
5433
5443
|
}) })
|
|
5434
5444
|
]
|
|
@@ -5620,7 +5630,7 @@ function SubscriptionDetailSkeleton() {
|
|
|
5620
5630
|
}),
|
|
5621
5631
|
/* @__PURE__ */ jsxs("div", {
|
|
5622
5632
|
className: "mt-6 flex items-center space-x-4",
|
|
5623
|
-
children: [/* @__PURE__ */ jsx(Skeleton, { className: "
|
|
5633
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-24 rounded" }), /* @__PURE__ */ jsxs("div", {
|
|
5624
5634
|
className: "flex-1 space-y-2",
|
|
5625
5635
|
children: [
|
|
5626
5636
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-3/4" }),
|
|
@@ -5714,7 +5724,7 @@ function QuantityInput({ inputId, quantity, maxQuantity, isUpdatingQuantity, onQ
|
|
|
5714
5724
|
"aria-label": decrementAriaLabel,
|
|
5715
5725
|
"aria-controls": inputId,
|
|
5716
5726
|
className: cn$1(stepperButtonClass, decrementDisabled && "opacity-40"),
|
|
5717
|
-
children: /* @__PURE__ */ jsx(Minus, { className: "
|
|
5727
|
+
children: /* @__PURE__ */ jsx(Minus, { className: "size-3" })
|
|
5718
5728
|
}),
|
|
5719
5729
|
/* @__PURE__ */ jsx(Input, {
|
|
5720
5730
|
ref: inputRef,
|
|
@@ -5762,7 +5772,7 @@ function QuantityInput({ inputId, quantity, maxQuantity, isUpdatingQuantity, onQ
|
|
|
5762
5772
|
"aria-label": incrementAriaLabel,
|
|
5763
5773
|
"aria-controls": inputId,
|
|
5764
5774
|
className: cn$1(stepperButtonClass, incrementDisabled && "opacity-40"),
|
|
5765
|
-
children: /* @__PURE__ */ jsx(Plus, { className: "
|
|
5775
|
+
children: /* @__PURE__ */ jsx(Plus, { className: "size-3" })
|
|
5766
5776
|
})
|
|
5767
5777
|
]
|
|
5768
5778
|
});
|
|
@@ -5845,7 +5855,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
|
|
|
5845
5855
|
height: 96,
|
|
5846
5856
|
className: "h-full w-full object-cover"
|
|
5847
5857
|
}) : /* @__PURE__ */ jsx("div", {
|
|
5848
|
-
className: "text-muted-foreground flex
|
|
5858
|
+
className: "text-muted-foreground flex size-full items-center justify-center",
|
|
5849
5859
|
children: t("no_image")
|
|
5850
5860
|
}), quantity > 1 && /* @__PURE__ */ jsx("span", {
|
|
5851
5861
|
className: "bg-foreground text-background absolute -top-2 -right-2 z-10 flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium",
|
|
@@ -5967,7 +5977,7 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
5967
5977
|
onClick: onEditBillDate,
|
|
5968
5978
|
disabled: isMutating,
|
|
5969
5979
|
className: actionButtonClass,
|
|
5970
|
-
children: [/* @__PURE__ */ jsx(CalendarDays, { className: "
|
|
5980
|
+
children: [/* @__PURE__ */ jsx(CalendarDays, { className: "size-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
5971
5981
|
className: "truncate",
|
|
5972
5982
|
children: t("edit_bill_date")
|
|
5973
5983
|
})]
|
|
@@ -5977,7 +5987,7 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
5977
5987
|
onClick: onPause,
|
|
5978
5988
|
disabled: isMutating,
|
|
5979
5989
|
className: actionButtonClass,
|
|
5980
|
-
children: [/* @__PURE__ */ jsx(Pause, { className: "
|
|
5990
|
+
children: [/* @__PURE__ */ jsx(Pause, { className: "size-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
5981
5991
|
className: "truncate",
|
|
5982
5992
|
children: t("pause_subscription")
|
|
5983
5993
|
})]
|
|
@@ -5987,7 +5997,7 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
5987
5997
|
onClick: onCancel,
|
|
5988
5998
|
disabled: isMutating || isCancelled,
|
|
5989
5999
|
className: actionButtonClass,
|
|
5990
|
-
children: [/* @__PURE__ */ jsx(XCircle, { className: "
|
|
6000
|
+
children: [/* @__PURE__ */ jsx(XCircle, { className: "size-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
5991
6001
|
className: "truncate",
|
|
5992
6002
|
children: isCancelled ? t("cancelled_subscription") : t("cancel_subscription")
|
|
5993
6003
|
})]
|
|
@@ -6017,7 +6027,7 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
6017
6027
|
onClick: onReactivate,
|
|
6018
6028
|
disabled: isMutating,
|
|
6019
6029
|
className: actionButtonClass,
|
|
6020
|
-
children: [/* @__PURE__ */ jsx(RotateCcw, { className: "
|
|
6030
|
+
children: [/* @__PURE__ */ jsx(RotateCcw, { className: "size-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
6021
6031
|
className: "truncate",
|
|
6022
6032
|
children: t("reactivate_subscription")
|
|
6023
6033
|
})]
|
|
@@ -7123,19 +7133,27 @@ function PortalSubscriptionShippingAddressSectionInner({ address: currentAddress
|
|
|
7123
7133
|
onError: (err) => onError?.(profileT("failed_to_update_shipping_address"), err)
|
|
7124
7134
|
});
|
|
7125
7135
|
const createAddressMutation = useMutation({
|
|
7126
|
-
mutationFn: (body) =>
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7136
|
+
mutationFn: async (body) => {
|
|
7137
|
+
const existingIds = new Set(addresses.map((a) => a.id));
|
|
7138
|
+
const address = await payApi.createAddress({ address: {
|
|
7139
|
+
name: composeAddressName(body.address.first_name, body.address.last_name),
|
|
7140
|
+
street1: body.address.address1,
|
|
7141
|
+
street2: body.address.address2,
|
|
7142
|
+
city: body.address.city,
|
|
7143
|
+
state: body.address.state,
|
|
7144
|
+
zip: body.address.postal_code,
|
|
7145
|
+
country: body.address.country_code,
|
|
7146
|
+
default: body.address.default
|
|
7147
|
+
} });
|
|
7148
|
+
return {
|
|
7149
|
+
address,
|
|
7150
|
+
deduped: existingIds.has(address.id)
|
|
7151
|
+
};
|
|
7152
|
+
},
|
|
7153
|
+
onSuccess: ({ deduped }) => {
|
|
7137
7154
|
queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });
|
|
7138
|
-
onSuccess?.(profileT("
|
|
7155
|
+
if (deduped) onSuccess?.(profileT("address_already_exists"), "warning");
|
|
7156
|
+
else onSuccess?.(profileT("address_created"), "success");
|
|
7139
7157
|
},
|
|
7140
7158
|
onError: (err) => onError?.(profileT("failed_to_create_address"), err)
|
|
7141
7159
|
});
|
|
@@ -7315,7 +7333,7 @@ function SubscriptionDetailScreen({ token, onToast }) {
|
|
|
7315
7333
|
}),
|
|
7316
7334
|
renderShippingAddress: (ctx) => /* @__PURE__ */ jsx(PortalSubscriptionShippingAddressSection, {
|
|
7317
7335
|
...ctx,
|
|
7318
|
-
onSuccess: (msg) => onToast(msg, "success"),
|
|
7336
|
+
onSuccess: (msg, severity) => onToast(msg, severity ?? "success"),
|
|
7319
7337
|
onError: (msg, err) => {
|
|
7320
7338
|
onToast(`${msg}: ${err instanceof Error ? err.message : t("error_occurred")}`, "error");
|
|
7321
7339
|
}
|
|
@@ -7362,4 +7380,4 @@ const subscriptionsScreenPropertySchema = {
|
|
|
7362
7380
|
//#endregion
|
|
7363
7381
|
export { subscriptionsScreenPropertySchema as n, SubscriptionsScreen as t };
|
|
7364
7382
|
|
|
7365
|
-
//# sourceMappingURL=SubscriptionsScreen-
|
|
7383
|
+
//# sourceMappingURL=SubscriptionsScreen-Bw2mBSSR.mjs.map
|