@fluid-app/portal-sdk 0.1.314 → 0.1.316
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-CmieGMsF.cjs → AddressAutocompleteInput-GBK1tcQ7.cjs} +2 -2
- package/dist/{AddressAutocompleteInput-CmieGMsF.cjs.map → AddressAutocompleteInput-GBK1tcQ7.cjs.map} +1 -1
- package/dist/{AddressAutocompleteInput-BmNxLzmA.mjs → AddressAutocompleteInput-QMNGouHg.mjs} +2 -2
- package/dist/{AddressAutocompleteInput-BmNxLzmA.mjs.map → AddressAutocompleteInput-QMNGouHg.mjs.map} +1 -1
- package/dist/{AlertWidget-DB8l5sMN.mjs → AlertWidget-BF_ORULS.mjs} +3 -3
- package/dist/{AlertWidget-DB8l5sMN.mjs.map → AlertWidget-BF_ORULS.mjs.map} +1 -1
- package/dist/{AppDownloadScreen-Dl1yK9d_.mjs → AppDownloadScreen-dfHFK-i6.mjs} +2 -2
- package/dist/{AppDownloadScreen-Dl1yK9d_.mjs.map → AppDownloadScreen-dfHFK-i6.mjs.map} +1 -1
- package/dist/{BulletListWidget-CGb9c7Oo.mjs → BulletListWidget-Bi1pdsJl.mjs} +2 -2
- package/dist/{BulletListWidget-CGb9c7Oo.mjs.map → BulletListWidget-Bi1pdsJl.mjs.map} +1 -1
- package/dist/{CalendarWidget-ByRhEEhr.mjs → CalendarWidget-LnJmsGpv.mjs} +2 -2
- package/dist/{CalendarWidget-ByRhEEhr.mjs.map → CalendarWidget-LnJmsGpv.mjs.map} +1 -1
- package/dist/{CardWidget-CCfS9Jt8.mjs → CardWidget-DLeadzfN.mjs} +2 -2
- package/dist/{CardWidget-CCfS9Jt8.mjs.map → CardWidget-DLeadzfN.mjs.map} +1 -1
- package/dist/{CarouselWidget-DCO2RF7I.mjs → CarouselWidget-C0TQw3h3.mjs} +2 -2
- package/dist/{CarouselWidget-DCO2RF7I.mjs.map → CarouselWidget-C0TQw3h3.mjs.map} +1 -1
- package/dist/{CatchUpWidget-DrQ9M9sw.mjs → CatchUpWidget-C9jZSlF8.mjs} +2 -2
- package/dist/{CatchUpWidget-DrQ9M9sw.mjs.map → CatchUpWidget-C9jZSlF8.mjs.map} +1 -1
- package/dist/{ChartWidget-BzJzDoOH.mjs → ChartWidget-Ba935aP9.mjs} +2 -2
- package/dist/{ChartWidget-BzJzDoOH.mjs.map → ChartWidget-Ba935aP9.mjs.map} +1 -1
- package/dist/{ContactsScreen-mq9oF6UF.mjs → ContactsScreen-BLVMBxiK.mjs} +2 -2
- package/dist/{ContactsScreen-mq9oF6UF.mjs.map → ContactsScreen-BLVMBxiK.mjs.map} +1 -1
- package/dist/{ContainerWidget-DRhQRcEe.mjs → ContainerWidget-Ci3McBxD.mjs} +3 -3
- package/dist/{ContainerWidget-DRhQRcEe.mjs.map → ContainerWidget-Ci3McBxD.mjs.map} +1 -1
- package/dist/{CustomersScreen-0X_7v_YC.mjs → CustomersScreen-N7FMBCv_.mjs} +2 -2
- package/dist/{CustomersScreen-0X_7v_YC.mjs.map → CustomersScreen-N7FMBCv_.mjs.map} +1 -1
- package/dist/{EmbedWidget-Cl41N8Cb.mjs → EmbedWidget-CATRSHDk.mjs} +2 -2
- package/dist/{EmbedWidget-Cl41N8Cb.mjs.map → EmbedWidget-CATRSHDk.mjs.map} +1 -1
- package/dist/{FluidProvider-DXvgVTmO.cjs → FluidProvider-DTdECylI.cjs} +2 -2
- package/dist/{FluidProvider-DXvgVTmO.cjs.map → FluidProvider-DTdECylI.cjs.map} +1 -1
- package/dist/{FluidProvider-DyMRpPnC.mjs → FluidProvider-DcnRMRD4.mjs} +52 -52
- package/dist/{FluidProvider-DyMRpPnC.mjs.map → FluidProvider-DcnRMRD4.mjs.map} +1 -1
- package/dist/{ImageWidget-DLH_uCj7.mjs → ImageWidget-CyTa5HXr.mjs} +2 -2
- package/dist/{ImageWidget-DLH_uCj7.mjs.map → ImageWidget-CyTa5HXr.mjs.map} +1 -1
- package/dist/{LayoutWidget-_Uonr1Cw.mjs → LayoutWidget-D_0t7pau.mjs} +2 -2
- package/dist/{LayoutWidget-_Uonr1Cw.mjs.map → LayoutWidget-D_0t7pau.mjs.map} +1 -1
- package/dist/{LinkWidget-Ch_tN45F.mjs → LinkWidget-C0zTcGH9.mjs} +2 -2
- package/dist/{LinkWidget-Ch_tN45F.mjs.map → LinkWidget-C0zTcGH9.mjs.map} +1 -1
- package/dist/{ListWidget-Cfo53nE-.mjs → ListWidget-ClotDOth.mjs} +2 -2
- package/dist/{ListWidget-Cfo53nE-.mjs.map → ListWidget-ClotDOth.mjs.map} +1 -1
- package/dist/{MessagingScreen-BOTFXwur.mjs → MessagingScreen-BAv7w_a-.mjs} +5 -5
- package/dist/{MessagingScreen-BOTFXwur.mjs.map → MessagingScreen-BAv7w_a-.mjs.map} +1 -1
- package/dist/{MessagingScreen-BfuT9CBj.cjs → MessagingScreen-BqE51MSA.cjs} +3 -3
- package/dist/{MessagingScreen-D5hYQdxm.cjs → MessagingScreen-CkZOYvYf.cjs} +3 -3
- package/dist/{MessagingScreen-D5hYQdxm.cjs.map → MessagingScreen-CkZOYvYf.cjs.map} +1 -1
- package/dist/MessagingScreen-D44VhiKa.mjs +48 -0
- package/dist/{MySiteScreen-CusL1xHg.mjs → MySiteScreen-BpGt2r_e.mjs} +2 -2
- package/dist/{MySiteScreen-CusL1xHg.mjs.map → MySiteScreen-BpGt2r_e.mjs.map} +1 -1
- package/dist/{MySiteWidget-QDIHLxAz.mjs → MySiteWidget-M1WPkOzw.mjs} +2 -2
- package/dist/{MySiteWidget-QDIHLxAz.mjs.map → MySiteWidget-M1WPkOzw.mjs.map} +1 -1
- package/dist/{NestedWidget-By8SJ-ci.mjs → NestedWidget-Muw0upB1.mjs} +2 -2
- package/dist/{NestedWidget-By8SJ-ci.mjs.map → NestedWidget-Muw0upB1.mjs.map} +1 -1
- package/dist/{OrdersScreen-Dp-m303q.mjs → OrdersScreen-ChC-rMWk.mjs} +3 -3
- package/dist/{OrdersScreen-Dp-m303q.mjs.map → OrdersScreen-ChC-rMWk.mjs.map} +1 -1
- package/dist/{OrdersScreen-gzC4EQtO.cjs → OrdersScreen-D8Qu5jXD.cjs} +3 -3
- package/dist/{OrdersScreen-gzC4EQtO.cjs.map → OrdersScreen-D8Qu5jXD.cjs.map} +1 -1
- package/dist/{OrdersScreen-CuNHXmtg.cjs → OrdersScreen-DIckC7xc.cjs} +3 -3
- package/dist/OrdersScreen-Duhvi7tM.mjs +46 -0
- package/dist/{PointsWidget-C1QIWoTR.mjs → PointsWidget-DwPusoNj.mjs} +2 -2
- package/dist/{PointsWidget-C1QIWoTR.mjs.map → PointsWidget-DwPusoNj.mjs.map} +1 -1
- package/dist/{ProfileScreen-1eUj1pwW.mjs → ProfileScreen-BCqvjCKT.mjs} +9 -7
- package/dist/ProfileScreen-BCqvjCKT.mjs.map +1 -0
- package/dist/{ProfileScreen-CQhgY8xm.cjs → ProfileScreen-C6h4c_y3.cjs} +4 -4
- package/dist/ProfileScreen-CRfV9eaL.mjs +49 -0
- package/dist/{ProfileScreen-CCpujV84.cjs → ProfileScreen-SlF6UJg6.cjs} +9 -7
- package/dist/ProfileScreen-SlF6UJg6.cjs.map +1 -0
- package/dist/{QuickLinksWidget-DO-u6AwT.mjs → QuickLinksWidget-CvTQIsle.mjs} +2 -2
- package/dist/{QuickLinksWidget-DO-u6AwT.mjs.map → QuickLinksWidget-CvTQIsle.mjs.map} +1 -1
- package/dist/{QuickShareWidget-CRHs0Ciz.mjs → QuickShareWidget-Vl5yoJvh.mjs} +2 -2
- package/dist/{QuickShareWidget-CRHs0Ciz.mjs.map → QuickShareWidget-Vl5yoJvh.mjs.map} +1 -1
- package/dist/{RecentActivityWidget-DE9ylj-v.mjs → RecentActivityWidget-60GnZ7Dl.mjs} +2 -2
- package/dist/{RecentActivityWidget-DE9ylj-v.mjs.map → RecentActivityWidget-60GnZ7Dl.mjs.map} +1 -1
- package/dist/{SeparatorWidget-CIoLMluh.mjs → SeparatorWidget-euh5w7vj.mjs} +2 -2
- package/dist/{SeparatorWidget-CIoLMluh.mjs.map → SeparatorWidget-euh5w7vj.mjs.map} +1 -1
- package/dist/{ShareablesScreen-PL7O47Gv.cjs → ShareablesScreen--416M3bG.cjs} +2 -2
- package/dist/{ShareablesScreen-yXCq_akC.mjs → ShareablesScreen-BB4X4MDb.mjs} +92 -9
- package/dist/ShareablesScreen-BB4X4MDb.mjs.map +1 -0
- package/dist/{ShareablesScreen-7umiVWD0.mjs → ShareablesScreen-C82JbCTs.mjs} +3 -5
- package/dist/{ShareablesScreen-QclWhq3D.cjs → ShareablesScreen-MeEPViOc.cjs} +90 -7
- package/dist/ShareablesScreen-MeEPViOc.cjs.map +1 -0
- package/dist/{ShopScreen-WInhfklJ.mjs → ShopScreen-BWU2GXtd.mjs} +2 -2
- package/dist/{ShopScreen-WInhfklJ.mjs.map → ShopScreen-BWU2GXtd.mjs.map} +1 -1
- package/dist/{ShopScreen-Bg4zf_JJ.cjs → ShopScreen-BbuAMA4f.cjs} +3 -3
- package/dist/{ShopScreen-CcZC-9I-.cjs → ShopScreen-CfDJpaeD.cjs} +2 -2
- package/dist/{ShopScreen-CcZC-9I-.cjs.map → ShopScreen-CfDJpaeD.cjs.map} +1 -1
- package/dist/ShopScreen-Dixl-47_.mjs +47 -0
- package/dist/{SpacerWidget-CYG_OOlN.mjs → SpacerWidget-BSK1d3yz.mjs} +2 -2
- package/dist/{SpacerWidget-CYG_OOlN.mjs.map → SpacerWidget-BSK1d3yz.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-CxXfngW6.mjs → SubscriptionsScreen-0_u-2cUx.mjs} +235 -35
- package/dist/SubscriptionsScreen-0_u-2cUx.mjs.map +1 -0
- package/dist/SubscriptionsScreen-8STRsoh2.mjs +48 -0
- package/dist/{SubscriptionsScreen-CUvV5IzE.cjs → SubscriptionsScreen-BNwDrJ2f.cjs} +4 -4
- package/dist/{SubscriptionsScreen-DhIabp7l.cjs → SubscriptionsScreen-nMZi49Kq.cjs} +234 -34
- package/dist/SubscriptionsScreen-nMZi49Kq.cjs.map +1 -0
- package/dist/{TableWidget-B3iZYt3e.mjs → TableWidget-D9o_Wf3P.mjs} +2 -2
- package/dist/{TableWidget-B3iZYt3e.mjs.map → TableWidget-D9o_Wf3P.mjs.map} +1 -1
- package/dist/{TextWidget-TkRUJ2s_.mjs → TextWidget-B8U3U6MT.mjs} +2 -2
- package/dist/{TextWidget-TkRUJ2s_.mjs.map → TextWidget-B8U3U6MT.mjs.map} +1 -1
- package/dist/{ToDoWidget-sPYwjaiM.mjs → ToDoWidget-G5jYFoWJ.mjs} +2 -2
- package/dist/{ToDoWidget-sPYwjaiM.mjs.map → ToDoWidget-G5jYFoWJ.mjs.map} +1 -1
- package/dist/{UpgradeScreen-Bk26KpcT.mjs → UpgradeScreen-C6l3mpnf.mjs} +2 -2
- package/dist/{UpgradeScreen-Bk26KpcT.mjs.map → UpgradeScreen-C6l3mpnf.mjs.map} +1 -1
- package/dist/{VideoWidget-Cg-MAH4X.mjs → VideoWidget-BBq_SW6C.mjs} +2 -2
- package/dist/{VideoWidget-Cg-MAH4X.mjs.map → VideoWidget-BBq_SW6C.mjs.map} +1 -1
- package/dist/{es-CaDFGDKY.mjs → es-8SY1mBcI.mjs} +2 -2
- package/dist/{es-CaDFGDKY.mjs.map → es-8SY1mBcI.mjs.map} +1 -1
- package/dist/index.cjs +22 -22
- package/dist/index.mjs +63 -63
- package/dist/{portal_tenant_content-CrltRlMW.cjs → portal_tenant_content-Cufl7LSv.cjs} +24 -1
- package/dist/portal_tenant_content-Cufl7LSv.cjs.map +1 -0
- package/dist/{portal_tenant_content-CRrn7i-P.mjs → portal_tenant_content-DKIMptZz.mjs} +19 -2
- package/dist/portal_tenant_content-DKIMptZz.mjs.map +1 -0
- package/dist/{use-account-GjZt_eis.mjs → use-account-Du7Mi_Pi.mjs} +2 -2
- package/dist/{use-account-GjZt_eis.mjs.map → use-account-Du7Mi_Pi.mjs.map} +1 -1
- package/dist/{use-account-CEjH1hp5.cjs → use-account-KSCVzEeP.cjs} +2 -2
- package/dist/{use-account-CEjH1hp5.cjs.map → use-account-KSCVzEeP.cjs.map} +1 -1
- package/package.json +14 -14
- package/dist/MessagingScreen-BAWob9Xh.mjs +0 -49
- package/dist/OrdersScreen-BvC2vAPI.mjs +0 -48
- package/dist/ProfileScreen-1eUj1pwW.mjs.map +0 -1
- package/dist/ProfileScreen-B4nb_OZG.mjs +0 -50
- package/dist/ProfileScreen-CCpujV84.cjs.map +0 -1
- package/dist/ShareablesScreen-QclWhq3D.cjs.map +0 -1
- package/dist/ShareablesScreen-yXCq_akC.mjs.map +0 -1
- package/dist/ShopScreen-D_XPdJVC.mjs +0 -49
- package/dist/SubscriptionsScreen-CaVTy07E.mjs +0 -50
- package/dist/SubscriptionsScreen-CxXfngW6.mjs.map +0 -1
- package/dist/SubscriptionsScreen-DhIabp7l.cjs.map +0 -1
- package/dist/portal_tenant_content-CRrn7i-P.mjs.map +0 -1
- package/dist/portal_tenant_content-CrltRlMW.cjs.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "./portal_tenant_content-DKIMptZz.mjs";
|
|
2
|
+
import "./FluidProvider-DcnRMRD4.mjs";
|
|
3
|
+
import "./ScreenRenderer-cttxJ-W9.mjs";
|
|
4
|
+
import "./store-api-context-DViwxyG4.mjs";
|
|
5
|
+
import "./mysite-api-context-kUTM3GNG.mjs";
|
|
6
|
+
import "./countries-api-context-DScC_39w.mjs";
|
|
7
|
+
import "./registry-context-DIdav3MJ.mjs";
|
|
8
|
+
import "./WidgetInteractionContext-CDHSzzws.mjs";
|
|
9
|
+
import "./EmbedWidget-CATRSHDk.mjs";
|
|
10
|
+
import "./locale-context-DGCebJhw.mjs";
|
|
11
|
+
import "./error-state-DvzIn9Tz.mjs";
|
|
12
|
+
import "./LayoutWidget-D_0t7pau.mjs";
|
|
13
|
+
import "./registries-BtCYIu-b.mjs";
|
|
14
|
+
import "./fields-B2DTFWQl.mjs";
|
|
15
|
+
import "./TextWidget-B8U3U6MT.mjs";
|
|
16
|
+
import "./AlertWidget-BF_ORULS.mjs";
|
|
17
|
+
import "./BulletListWidget-Bi1pdsJl.mjs";
|
|
18
|
+
import "./preview-context-CDnhakni.mjs";
|
|
19
|
+
import "./CalendarWidget-LnJmsGpv.mjs";
|
|
20
|
+
import "./CardWidget-DLeadzfN.mjs";
|
|
21
|
+
import "./purify.es-Cjc3iy5J.mjs";
|
|
22
|
+
import "./MediaRenderer-CLmBOrvK.mjs";
|
|
23
|
+
import "./CarouselWidget-C0TQw3h3.mjs";
|
|
24
|
+
import "./CatchUpWidget-C9jZSlF8.mjs";
|
|
25
|
+
import "./src-DC5QoBhR.mjs";
|
|
26
|
+
import { n as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-0_u-2cUx.mjs";
|
|
27
|
+
import "./ChartWidget-Ba935aP9.mjs";
|
|
28
|
+
import "./ContainerWidget-Ci3McBxD.mjs";
|
|
29
|
+
import "./ImageWidget-CyTa5HXr.mjs";
|
|
30
|
+
import "./LinkWidget-C0zTcGH9.mjs";
|
|
31
|
+
import "./ListWidget-ClotDOth.mjs";
|
|
32
|
+
import "./MySiteWidget-M1WPkOzw.mjs";
|
|
33
|
+
import "./NestedWidget-Muw0upB1.mjs";
|
|
34
|
+
import "./PointsWidget-DwPusoNj.mjs";
|
|
35
|
+
import "./QuickLinksWidget-CvTQIsle.mjs";
|
|
36
|
+
import "./QuickShareWidget-Vl5yoJvh.mjs";
|
|
37
|
+
import "./RecentActivityWidget-60GnZ7Dl.mjs";
|
|
38
|
+
import "./SeparatorWidget-euh5w7vj.mjs";
|
|
39
|
+
import "./SpacerWidget-BSK1d3yz.mjs";
|
|
40
|
+
import "./TableWidget-D9o_Wf3P.mjs";
|
|
41
|
+
import "./ToDoWidget-G5jYFoWJ.mjs";
|
|
42
|
+
import "./VideoWidget-BBq_SW6C.mjs";
|
|
43
|
+
import "./ScreenHeaderContext-C22wBIsP.mjs";
|
|
44
|
+
import "./translation-api-context-factory-BYNOdpnp.mjs";
|
|
45
|
+
import "./static-dict-adapter-CGDunURa.mjs";
|
|
46
|
+
import "./AddressAutocompleteInput-QMNGouHg.mjs";
|
|
47
|
+
import "./Combobox-B2o0YsiQ.mjs";
|
|
48
|
+
export { SubscriptionsScreen, subscriptionsScreenPropertySchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
require("./FluidProvider-
|
|
2
|
+
require("./FluidProvider-DTdECylI.cjs");
|
|
3
3
|
require("./ScreenRenderer-D-l4cMI3.cjs");
|
|
4
|
-
require("./portal_tenant_content-
|
|
4
|
+
require("./portal_tenant_content-Cufl7LSv.cjs");
|
|
5
5
|
require("./store-api-context-D1gZn22Z.cjs");
|
|
6
6
|
require("./mysite-api-context-CilZcDS4.cjs");
|
|
7
7
|
require("./countries-api-context-G-NW4BoH.cjs");
|
|
@@ -43,8 +43,8 @@ require("./VideoWidget-CWEZqpnZ.cjs");
|
|
|
43
43
|
require("./ScreenHeaderContext-B7-GM5qJ.cjs");
|
|
44
44
|
require("./translation-api-context-factory-BSuSh5Zg.cjs");
|
|
45
45
|
require("./static-dict-adapter-DUeLZtek.cjs");
|
|
46
|
-
require("./AddressAutocompleteInput-
|
|
46
|
+
require("./AddressAutocompleteInput-GBK1tcQ7.cjs");
|
|
47
47
|
require("./Combobox-DUkuwgCW.cjs");
|
|
48
|
-
const require_SubscriptionsScreen = require("./SubscriptionsScreen-
|
|
48
|
+
const require_SubscriptionsScreen = require("./SubscriptionsScreen-nMZi49Kq.cjs");
|
|
49
49
|
exports.SubscriptionsScreen = require_SubscriptionsScreen.SubscriptionsScreen;
|
|
50
50
|
exports.subscriptionsScreenPropertySchema = require_SubscriptionsScreen.subscriptionsScreenPropertySchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
const require_FluidProvider = require("./FluidProvider-
|
|
3
|
-
const require_portal_tenant_content = require("./portal_tenant_content-
|
|
2
|
+
const require_FluidProvider = require("./FluidProvider-DTdECylI.cjs");
|
|
3
|
+
const require_portal_tenant_content = require("./portal_tenant_content-Cufl7LSv.cjs");
|
|
4
4
|
const require_countries_api_context = require("./countries-api-context-G-NW4BoH.cjs");
|
|
5
5
|
const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-OhJylQjc.cjs");
|
|
6
6
|
const require_locale_context = require("./locale-context-8CiNKIho.cjs");
|
|
@@ -8,10 +8,10 @@ const require_src = require("./src-DoVMGOoV.cjs");
|
|
|
8
8
|
const require_ScreenHeaderContext = require("./ScreenHeaderContext-B7-GM5qJ.cjs");
|
|
9
9
|
const require_translation_api_context_factory = require("./translation-api-context-factory-BSuSh5Zg.cjs");
|
|
10
10
|
const require_query_keys = require("./query-keys-D3lK70Ea.cjs");
|
|
11
|
-
const require_use_account = require("./use-account-
|
|
11
|
+
const require_use_account = require("./use-account-KSCVzEeP.cjs");
|
|
12
12
|
const require_AppNavigationContext = require("./AppNavigationContext-C1-hd9Rw.cjs");
|
|
13
13
|
const require_static_dict_adapter = require("./static-dict-adapter-DUeLZtek.cjs");
|
|
14
|
-
const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-
|
|
14
|
+
const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-GBK1tcQ7.cjs");
|
|
15
15
|
const require_isAfter = require("./isAfter-BCyWSyQs.cjs");
|
|
16
16
|
let react = require("react");
|
|
17
17
|
let _tanstack_react_query = require("@tanstack/react-query");
|
|
@@ -2301,6 +2301,20 @@ function useReactivateSubscription(options) {
|
|
|
2301
2301
|
});
|
|
2302
2302
|
}
|
|
2303
2303
|
//#endregion
|
|
2304
|
+
//#region ../../subscriptions/core/src/hooks/use-retry-subscription.ts
|
|
2305
|
+
function useRetrySubscription(options) {
|
|
2306
|
+
const api = useSubscriptionsApi();
|
|
2307
|
+
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
2308
|
+
return (0, _tanstack_react_query.useMutation)({
|
|
2309
|
+
mutationFn: (params) => api.retrySubscription(params.subscriptionToken),
|
|
2310
|
+
onSuccess: () => {
|
|
2311
|
+
queryClient.invalidateQueries({ queryKey: subscriptionsKeys.all });
|
|
2312
|
+
options?.onSuccess?.();
|
|
2313
|
+
},
|
|
2314
|
+
onError: options?.onError
|
|
2315
|
+
});
|
|
2316
|
+
}
|
|
2317
|
+
//#endregion
|
|
2304
2318
|
//#region ../../subscriptions/core/src/hooks/use-update-subscription-info.ts
|
|
2305
2319
|
function useUpdateSubscriptionInfo(options) {
|
|
2306
2320
|
const api = useSubscriptionsApi();
|
|
@@ -2308,7 +2322,7 @@ function useUpdateSubscriptionInfo(options) {
|
|
|
2308
2322
|
return (0, _tanstack_react_query.useMutation)({
|
|
2309
2323
|
mutationFn: (params) => api.updateSubscriptionInfo(params.subscriptionToken, params.body),
|
|
2310
2324
|
onSuccess: () => {
|
|
2311
|
-
queryClient.invalidateQueries({ queryKey: subscriptionsKeys.all });
|
|
2325
|
+
if (!options?.skipAutoInvalidate) queryClient.invalidateQueries({ queryKey: subscriptionsKeys.all });
|
|
2312
2326
|
options?.onSuccess?.();
|
|
2313
2327
|
},
|
|
2314
2328
|
onError: options?.onError
|
|
@@ -2505,8 +2519,8 @@ function mapDetailSubscription(bff) {
|
|
|
2505
2519
|
last_ship_date: null,
|
|
2506
2520
|
disabled: false,
|
|
2507
2521
|
attempts: 0,
|
|
2508
|
-
last_failed_at: null,
|
|
2509
|
-
next_retry_at: null,
|
|
2522
|
+
last_failed_at: bff.last_failed_at ?? null,
|
|
2523
|
+
next_retry_at: bff.next_retry_at ?? null,
|
|
2510
2524
|
skipped_count: 0,
|
|
2511
2525
|
max_skips: null,
|
|
2512
2526
|
cancelled_at: null,
|
|
@@ -2788,6 +2802,9 @@ function createPortalSubscriptionsAdapter(client) {
|
|
|
2788
2802
|
reactivateSubscription: async (subscriptionToken, _params) => {
|
|
2789
2803
|
return mapSubscriptionDetail(await require_portal_tenant_content.subscriptions_reactivate(client, subscriptionToken));
|
|
2790
2804
|
},
|
|
2805
|
+
retrySubscription: async (subscriptionToken) => {
|
|
2806
|
+
return mapSubscriptionDetail(await require_portal_tenant_content.subscriptions_retry(client, subscriptionToken));
|
|
2807
|
+
},
|
|
2791
2808
|
updateSubscriptionInfo: async (subscriptionToken, body) => {
|
|
2792
2809
|
const subscription = {};
|
|
2793
2810
|
if (body.payment_method_id != null) subscription.payment_method_id = body.payment_method_id;
|
|
@@ -2898,6 +2915,7 @@ const subscriptionsDomain = require_static_dict_adapter.createDomainTranslations
|
|
|
2898
2915
|
your_upcoming_order: "Your Upcoming Order",
|
|
2899
2916
|
next_order_date: "Next Order Date",
|
|
2900
2917
|
next_bill_amount: "Next Bill Amount",
|
|
2918
|
+
payment_failed_on: "Payment failed on",
|
|
2901
2919
|
product_image_alt: "Product image",
|
|
2902
2920
|
no_image: "No image",
|
|
2903
2921
|
quantity_label: "Quantity",
|
|
@@ -2916,6 +2934,7 @@ const subscriptionsDomain = require_static_dict_adapter.createDomainTranslations
|
|
|
2916
2934
|
cancelled_subscription: "Cancelled Subscription",
|
|
2917
2935
|
resume_subscription: "Resume Subscription",
|
|
2918
2936
|
reactivate_subscription: "Reactivate Subscription",
|
|
2937
|
+
update_payment_method_action: "Update Payment Method",
|
|
2919
2938
|
skip_next: "Skip Next",
|
|
2920
2939
|
pause: "Pause",
|
|
2921
2940
|
cancel: "Cancel",
|
|
@@ -3081,7 +3100,19 @@ const subscriptionsDomain = require_static_dict_adapter.createDomainTranslations
|
|
|
3081
3100
|
bundle_step4_message: "💳 Last step — choose payment method",
|
|
3082
3101
|
bundle_succeeded: "Subscriptions bundled successfully.",
|
|
3083
3102
|
bundle_partial_payment_failure: "Bundle created but payment method failed for {{n}} subscription(s).",
|
|
3084
|
-
bundle_failed: "Couldn't bundle subscriptions. Please try again."
|
|
3103
|
+
bundle_failed: "Couldn't bundle subscriptions. Please try again.",
|
|
3104
|
+
past_due_banner_heading: "We couldn't process your payment",
|
|
3105
|
+
past_due_banner_heading_for_product: "We couldn't process your payment for {{product}}",
|
|
3106
|
+
past_due_banner_body: "Your payment method may have expired or been declined. Update your card to continue your subscription and avoid interruptions.",
|
|
3107
|
+
past_due_banner_heading_retry_scheduled: "Payment retry scheduled",
|
|
3108
|
+
past_due_banner_heading_retry_scheduled_for_product: "Payment retry scheduled for {{product}}",
|
|
3109
|
+
past_due_banner_body_retry_scheduled: "We're trying your payment again now. We'll update once it's processed.",
|
|
3110
|
+
past_due_banner_body_retry_failed: "The last retry didn't go through. We'll try again automatically {{when}}. You can also update your card to use a different one.",
|
|
3111
|
+
update_your_card: "Update your card",
|
|
3112
|
+
dismiss: "Dismiss",
|
|
3113
|
+
past_due_retry_when_shortly: "shortly",
|
|
3114
|
+
past_due_retry_when_few_hours: "in the next few hours",
|
|
3115
|
+
past_due_retry_when_within_day: "within a day"
|
|
3085
3116
|
},
|
|
3086
3117
|
loaders: {
|
|
3087
3118
|
de: () => Promise.resolve().then(() => require("./de-BP0u3L-K.cjs")).then((m) => m.default),
|
|
@@ -5480,6 +5511,121 @@ function StatusPill({ status, children }) {
|
|
|
5480
5511
|
});
|
|
5481
5512
|
}
|
|
5482
5513
|
//#endregion
|
|
5514
|
+
//#region ../../subscriptions/ui/src/components/past-due-banner.tsx
|
|
5515
|
+
const ICON_STROKE = 1.5;
|
|
5516
|
+
const ICON_SCALE = 26;
|
|
5517
|
+
const ICON_RIGHT_OFFSET = 23;
|
|
5518
|
+
const ICON_OPACITY = .35;
|
|
5519
|
+
const ICON_VERTICAL_SPACING = 26;
|
|
5520
|
+
const COL_SPACING = 18;
|
|
5521
|
+
const ICONS_BY_COLUMN = [
|
|
5522
|
+
{
|
|
5523
|
+
icons: [
|
|
5524
|
+
lucide_react.CreditCard,
|
|
5525
|
+
lucide_react.CircleDollarSign,
|
|
5526
|
+
lucide_react.BadgeAlert,
|
|
5527
|
+
lucide_react.CalendarClock,
|
|
5528
|
+
lucide_react.Sparkles,
|
|
5529
|
+
lucide_react.Wallet
|
|
5530
|
+
],
|
|
5531
|
+
offset: false
|
|
5532
|
+
},
|
|
5533
|
+
{
|
|
5534
|
+
icons: [
|
|
5535
|
+
lucide_react.DollarSign,
|
|
5536
|
+
lucide_react.Receipt,
|
|
5537
|
+
lucide_react.PiggyBank,
|
|
5538
|
+
lucide_react.ShieldCheck,
|
|
5539
|
+
lucide_react.CreditCard
|
|
5540
|
+
],
|
|
5541
|
+
offset: true
|
|
5542
|
+
},
|
|
5543
|
+
{
|
|
5544
|
+
icons: [
|
|
5545
|
+
lucide_react.Calendar,
|
|
5546
|
+
lucide_react.Banknote,
|
|
5547
|
+
lucide_react.RefreshCw,
|
|
5548
|
+
lucide_react.DollarSign,
|
|
5549
|
+
lucide_react.CircleDollarSign,
|
|
5550
|
+
lucide_react.Calendar
|
|
5551
|
+
],
|
|
5552
|
+
offset: false
|
|
5553
|
+
}
|
|
5554
|
+
];
|
|
5555
|
+
function PastDueBanner({ productTitle, nextRetryAt, lastFailedAt, onUpdatePaymentClick, onDismiss, className }) {
|
|
5556
|
+
const { t } = useSubscriptionsTranslation();
|
|
5557
|
+
const [internalDismissed, setInternalDismissed] = (0, react.useState)(false);
|
|
5558
|
+
const retryScheduled = nextRetryAt != null;
|
|
5559
|
+
const previousAttemptFailed = retryScheduled && lastFailedAt != null;
|
|
5560
|
+
if (!onDismiss && internalDismissed) return null;
|
|
5561
|
+
const heading = retryScheduled ? productTitle ? t("past_due_banner_heading_retry_scheduled_for_product", { product: productTitle }) : t("past_due_banner_heading_retry_scheduled") : productTitle ? t("past_due_banner_heading_for_product", { product: productTitle }) : t("past_due_banner_heading");
|
|
5562
|
+
const whenLabel = (() => {
|
|
5563
|
+
if (!nextRetryAt) return t("past_due_retry_when_shortly");
|
|
5564
|
+
const ms = new Date(nextRetryAt).getTime() - Date.now();
|
|
5565
|
+
if (ms < 6e4) return t("past_due_retry_when_shortly");
|
|
5566
|
+
if (ms < 720 * 60 * 1e3) return t("past_due_retry_when_few_hours");
|
|
5567
|
+
return t("past_due_retry_when_within_day");
|
|
5568
|
+
})();
|
|
5569
|
+
const body = previousAttemptFailed ? t("past_due_banner_body_retry_failed", { when: whenLabel }) : retryScheduled ? t("past_due_banner_body_retry_scheduled") : t("past_due_banner_body");
|
|
5570
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5571
|
+
role: "status",
|
|
5572
|
+
className: cn("border-border bg-background relative overflow-hidden rounded-2xl border p-5 sm:p-6", className),
|
|
5573
|
+
children: [
|
|
5574
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5575
|
+
type: "button",
|
|
5576
|
+
onClick: () => onDismiss ? onDismiss() : setInternalDismissed(true),
|
|
5577
|
+
"aria-label": t("dismiss"),
|
|
5578
|
+
className: "text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-ring absolute top-3 right-3 z-10 flex size-6 items-center justify-center rounded-md transition-colors focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
5579
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, {
|
|
5580
|
+
className: "size-4",
|
|
5581
|
+
strokeWidth: 2
|
|
5582
|
+
})
|
|
5583
|
+
}),
|
|
5584
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5585
|
+
"aria-hidden": true,
|
|
5586
|
+
className: "pointer-events-none absolute inset-y-0 right-0 hidden w-1/2 max-w-md sm:block",
|
|
5587
|
+
children: ICONS_BY_COLUMN.flatMap((col, colIdx) => {
|
|
5588
|
+
const right = `${ICON_RIGHT_OFFSET + colIdx * COL_SPACING}%`;
|
|
5589
|
+
const baseTop = -ICON_VERTICAL_SPACING * .4 + (col.offset ? ICON_VERTICAL_SPACING / 2 : 0);
|
|
5590
|
+
return col.icons.map((Icon, rowIdx) => {
|
|
5591
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
5592
|
+
strokeWidth: ICON_STROKE,
|
|
5593
|
+
className: "text-muted-foreground absolute",
|
|
5594
|
+
style: {
|
|
5595
|
+
top: `${baseTop + rowIdx * ICON_VERTICAL_SPACING}%`,
|
|
5596
|
+
right,
|
|
5597
|
+
width: ICON_SCALE,
|
|
5598
|
+
height: ICON_SCALE,
|
|
5599
|
+
opacity: ICON_OPACITY
|
|
5600
|
+
}
|
|
5601
|
+
}, `${colIdx.toString()}-${rowIdx.toString()}`);
|
|
5602
|
+
});
|
|
5603
|
+
})
|
|
5604
|
+
}),
|
|
5605
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5606
|
+
className: "relative flex max-w-xl flex-col gap-3.5",
|
|
5607
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5608
|
+
className: "flex flex-col gap-1.5",
|
|
5609
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
5610
|
+
className: "text-foreground text-base font-bold tracking-tight sm:text-lg",
|
|
5611
|
+
children: heading
|
|
5612
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5613
|
+
className: "text-muted-foreground text-sm leading-relaxed",
|
|
5614
|
+
children: body
|
|
5615
|
+
})]
|
|
5616
|
+
}), onUpdatePaymentClick && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
|
|
5617
|
+
type: "button",
|
|
5618
|
+
variant: "destructive",
|
|
5619
|
+
size: "default",
|
|
5620
|
+
onClick: onUpdatePaymentClick,
|
|
5621
|
+
className: "self-start px-5 active:scale-[0.99]",
|
|
5622
|
+
children: t("update_your_card")
|
|
5623
|
+
})]
|
|
5624
|
+
})
|
|
5625
|
+
]
|
|
5626
|
+
});
|
|
5627
|
+
}
|
|
5628
|
+
//#endregion
|
|
5483
5629
|
//#region ../../subscriptions/ui/src/lib/format.ts
|
|
5484
5630
|
/**
|
|
5485
5631
|
* Format a number as currency (USD).
|
|
@@ -5691,11 +5837,11 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
|
|
|
5691
5837
|
children: [
|
|
5692
5838
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5693
5839
|
className: "text-muted-foreground mb-1 text-sm",
|
|
5694
|
-
children: t("next_order_date")
|
|
5840
|
+
children: subscription.status === "past_due" ? t("payment_failed_on") : t("next_order_date")
|
|
5695
5841
|
}),
|
|
5696
5842
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5697
5843
|
className: "text-foreground text-2xl font-bold",
|
|
5698
|
-
children: getNextBillDisplay(displayNextBillDate ? {
|
|
5844
|
+
children: subscription.status === "past_due" ? subscription.last_failed_at ? formatDate(subscription.last_failed_at) : "—" : getNextBillDisplay(displayNextBillDate ? {
|
|
5699
5845
|
...subscription,
|
|
5700
5846
|
next_bill_date: displayNextBillDate
|
|
5701
5847
|
} : subscription)
|
|
@@ -5712,13 +5858,20 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
|
|
|
5712
5858
|
]
|
|
5713
5859
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5714
5860
|
className: "pl-4",
|
|
5715
|
-
children: [
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5861
|
+
children: [
|
|
5862
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5863
|
+
className: "text-muted-foreground mb-1 text-sm",
|
|
5864
|
+
children: t("next_bill_amount")
|
|
5865
|
+
}),
|
|
5866
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5867
|
+
className: "text-foreground text-2xl font-bold",
|
|
5868
|
+
children: formatCurrency(subscription.price * quantity)
|
|
5869
|
+
}),
|
|
5870
|
+
subscription.status !== "past_due" && (displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5871
|
+
className: "text-muted-foreground mt-1 text-xs",
|
|
5872
|
+
children: formatDate(displayNextBillDate ?? subscription.next_bill_date ?? "")
|
|
5873
|
+
})
|
|
5874
|
+
]
|
|
5722
5875
|
})]
|
|
5723
5876
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className: "border-border mt-4" })]
|
|
5724
5877
|
})]
|
|
@@ -5826,7 +5979,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
|
|
|
5826
5979
|
})
|
|
5827
5980
|
});
|
|
5828
5981
|
}
|
|
5829
|
-
function SubscriptionManagementSection({ subscription, isActive, isPaused, isCancelled, isMutating, onSkip, onPause, onResume, onCancel, onReactivate, onEditBillDate, displayNextBillDate, renderPaymentMethod, renderShippingAddress }) {
|
|
5982
|
+
function SubscriptionManagementSection({ subscription, isActive, isPaused, isCancelled, isMutating, onSkip, onPause, onResume, onCancel, onReactivate, onEditBillDate, onUpdatePaymentClick, displayNextBillDate, renderPaymentMethod, renderShippingAddress }) {
|
|
5830
5983
|
const { t } = useSubscriptionsTranslation();
|
|
5831
5984
|
const plan = subscription.subscription_plan;
|
|
5832
5985
|
const quantity = subscription.quantity;
|
|
@@ -5887,6 +6040,16 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
5887
6040
|
children: isCancelled ? t("cancelled_subscription") : t("cancel_subscription")
|
|
5888
6041
|
})]
|
|
5889
6042
|
}),
|
|
6043
|
+
subscription.status === "past_due" && onUpdatePaymentClick && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
|
|
6044
|
+
variant: "outline",
|
|
6045
|
+
onClick: onUpdatePaymentClick,
|
|
6046
|
+
disabled: isMutating,
|
|
6047
|
+
className: actionButtonClass,
|
|
6048
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CreditCard, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6049
|
+
className: "truncate",
|
|
6050
|
+
children: t("update_payment_method_action")
|
|
6051
|
+
})]
|
|
6052
|
+
}),
|
|
5890
6053
|
isPaused && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.Button, {
|
|
5891
6054
|
variant: "outline",
|
|
5892
6055
|
onClick: onResume,
|
|
@@ -5945,7 +6108,7 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
5945
6108
|
className: "text-foreground font-medium",
|
|
5946
6109
|
children: totalPrice
|
|
5947
6110
|
}),
|
|
5948
|
-
(displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6111
|
+
subscription.status !== "past_due" && (displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5949
6112
|
className: "text-muted-foreground text-xs",
|
|
5950
6113
|
children: formatDate(displayNextBillDate ?? subscription.next_bill_date ?? "")
|
|
5951
6114
|
})
|
|
@@ -5998,13 +6161,18 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
|
|
|
5998
6161
|
subscription.address.country_code && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: subscription.address.country_code })
|
|
5999
6162
|
]
|
|
6000
6163
|
})]
|
|
6001
|
-
}), paymentMethod && (renderPaymentMethod ?
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6164
|
+
}), paymentMethod && (renderPaymentMethod ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6165
|
+
id: "subscription-payment-method-section",
|
|
6166
|
+
className: "scroll-mt-24",
|
|
6167
|
+
children: renderPaymentMethod({
|
|
6168
|
+
paymentMethod,
|
|
6169
|
+
subscriptionToken: subscription.subscription_token,
|
|
6170
|
+
customerId: subscription.customer?.id ?? 0,
|
|
6171
|
+
countryCode: subscription.address?.country_code ?? "US"
|
|
6172
|
+
})
|
|
6006
6173
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6007
|
-
|
|
6174
|
+
id: "subscription-payment-method-section",
|
|
6175
|
+
className: "border-border mb-6 scroll-mt-24 border-b pb-4",
|
|
6008
6176
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6009
6177
|
className: "text-muted-foreground mb-1 text-sm",
|
|
6010
6178
|
children: t("payment_method")
|
|
@@ -6086,13 +6254,14 @@ function OrderHistorySection({ subscription }) {
|
|
|
6086
6254
|
})]
|
|
6087
6255
|
});
|
|
6088
6256
|
}
|
|
6089
|
-
function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationError, onNavigateToSubscription, renderPaymentMethod, renderShippingAddress }) {
|
|
6257
|
+
function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationError, onNavigateToSubscription, renderPaymentMethod, renderShippingAddress, onUpdatePaymentClick }) {
|
|
6090
6258
|
const { t } = useSubscriptionsTranslation();
|
|
6091
6259
|
const [showCancelModal, setShowCancelModal] = (0, react.useState)(false);
|
|
6092
6260
|
const [showPauseModal, setShowPauseModal] = (0, react.useState)(false);
|
|
6093
6261
|
const [showResumeModal, setShowResumeModal] = (0, react.useState)(false);
|
|
6094
6262
|
const [showEditBillDateModal, setShowEditBillDateModal] = (0, react.useState)(false);
|
|
6095
6263
|
const [pendingNextBillDate, setPendingNextBillDate] = (0, react.useState)(null);
|
|
6264
|
+
const [dismissedForFailedAt, setDismissedForFailedAt] = (0, react.useState)(void 0);
|
|
6096
6265
|
const { data, isLoading, error } = useSubscription(token);
|
|
6097
6266
|
const subscription = data?.subscription;
|
|
6098
6267
|
const customerId = subscription?.customer?.id ?? 0;
|
|
@@ -6243,7 +6412,24 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
|
|
|
6243
6412
|
reactivateParams: {}
|
|
6244
6413
|
});
|
|
6245
6414
|
};
|
|
6415
|
+
const bannerDismissed = dismissedForFailedAt !== void 0 && dismissedForFailedAt === subscription.last_failed_at;
|
|
6246
6416
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
6417
|
+
subscription.status === "past_due" && !bannerDismissed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6418
|
+
className: "mb-4 px-2 sm:px-0 lg:mb-6",
|
|
6419
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PastDueBanner, {
|
|
6420
|
+
productTitle: subscription.variant?.product?.title ?? null,
|
|
6421
|
+
nextRetryAt: subscription.next_retry_at ?? null,
|
|
6422
|
+
lastFailedAt: subscription.last_failed_at ?? null,
|
|
6423
|
+
onUpdatePaymentClick: onUpdatePaymentClick ?? (() => {
|
|
6424
|
+
const el = document.getElementById("subscription-payment-method-section");
|
|
6425
|
+
if (el) el.scrollIntoView({
|
|
6426
|
+
behavior: "smooth",
|
|
6427
|
+
block: "start"
|
|
6428
|
+
});
|
|
6429
|
+
}),
|
|
6430
|
+
onDismiss: () => setDismissedForFailedAt(subscription.last_failed_at ?? null)
|
|
6431
|
+
})
|
|
6432
|
+
}),
|
|
6247
6433
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6248
6434
|
className: "flex flex-col lg:grid lg:grid-cols-8",
|
|
6249
6435
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SubscriptionItemsSection, {
|
|
@@ -6265,6 +6451,7 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
|
|
|
6265
6451
|
onCancel: () => setShowCancelModal(true),
|
|
6266
6452
|
onReactivate: handleReactivate,
|
|
6267
6453
|
onEditBillDate: () => setShowEditBillDateModal(true),
|
|
6454
|
+
onUpdatePaymentClick,
|
|
6268
6455
|
displayNextBillDate: pendingNextBillDate ?? void 0,
|
|
6269
6456
|
renderPaymentMethod,
|
|
6270
6457
|
renderShippingAddress
|
|
@@ -6333,7 +6520,7 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
|
|
|
6333
6520
|
}
|
|
6334
6521
|
//#endregion
|
|
6335
6522
|
//#region ../../subscriptions/ui/src/screens/SubscriptionDetailScreen.tsx
|
|
6336
|
-
function SubscriptionDetailScreen$1({ token, onNavigateToList, onNavigateToSubscription, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod, renderShippingAddress }) {
|
|
6523
|
+
function SubscriptionDetailScreen$1({ token, onNavigateToList, onNavigateToSubscription, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod, renderShippingAddress, onUpdatePaymentClick }) {
|
|
6337
6524
|
const { t } = useSubscriptionsTranslation();
|
|
6338
6525
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ScreenHeaderContext.ScreenHeaderBreadcrumbs, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Breadcrumb, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_src.BreadcrumbList, {
|
|
6339
6526
|
className: "text-lg",
|
|
@@ -6362,7 +6549,8 @@ function SubscriptionDetailScreen$1({ token, onNavigateToList, onNavigateToSubsc
|
|
|
6362
6549
|
onMutationError,
|
|
6363
6550
|
onNavigateToSubscription,
|
|
6364
6551
|
renderPaymentMethod,
|
|
6365
|
-
renderShippingAddress
|
|
6552
|
+
renderShippingAddress,
|
|
6553
|
+
onUpdatePaymentClick
|
|
6366
6554
|
})
|
|
6367
6555
|
})] });
|
|
6368
6556
|
}
|
|
@@ -6532,14 +6720,19 @@ function subscriptionPaymentMethodToFluidPay(raw) {
|
|
|
6532
6720
|
function PortalSubscriptionPaymentMethodSection(props) {
|
|
6533
6721
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AddressAutocompleteInput.ProfileTranslationBridge, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PortalSubscriptionPaymentMethodSectionInner, { ...props }) });
|
|
6534
6722
|
}
|
|
6535
|
-
function PortalSubscriptionPaymentMethodSectionInner({ paymentMethod: currentPaymentMethod, subscriptionToken, onSuccess, onError }) {
|
|
6723
|
+
function PortalSubscriptionPaymentMethodSectionInner({ paymentMethod: currentPaymentMethod, subscriptionToken, onSuccess, onError, addDialogOpen, onAddDialogOpenChange }) {
|
|
6536
6724
|
const { t: profileT } = require_AddressAutocompleteInput.useProfileTranslation();
|
|
6537
6725
|
const { t: subsT } = useSubscriptionsTranslation();
|
|
6538
6726
|
const tFn = (0, react.useCallback)((key) => profileT(key), [profileT]);
|
|
6539
6727
|
const payApi = require_FluidProvider.usePayApi();
|
|
6540
6728
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
6541
6729
|
const fluidPayShim = (0, react.useMemo)(() => require_AddressAutocompleteInput.createFluidPayApiAdapter(payApi), [payApi]);
|
|
6542
|
-
const [
|
|
6730
|
+
const [internalAddDialogOpen, setInternalAddDialogOpen] = (0, react.useState)(false);
|
|
6731
|
+
const isAddDialogOpen = addDialogOpen ?? internalAddDialogOpen;
|
|
6732
|
+
const setIsAddDialogOpen = (next) => {
|
|
6733
|
+
if (onAddDialogOpenChange) onAddDialogOpenChange(next);
|
|
6734
|
+
else setInternalAddDialogOpen(next);
|
|
6735
|
+
};
|
|
6543
6736
|
const [editingPaymentMethod, setEditingPaymentMethod] = (0, react.useState)(null);
|
|
6544
6737
|
const [deletingPaymentMethod, setDeletingPaymentMethod] = (0, react.useState)(null);
|
|
6545
6738
|
const [deleteError, setDeleteError] = (0, react.useState)(void 0);
|
|
@@ -6566,10 +6759,13 @@ function PortalSubscriptionPaymentMethodSectionInner({ paymentMethod: currentPay
|
|
|
6566
6759
|
iso: c.code,
|
|
6567
6760
|
name: c.name
|
|
6568
6761
|
})).sort((a, b) => a.name.localeCompare(b.name)), [countriesData]);
|
|
6762
|
+
const retrySubscription = useRetrySubscription({ onError: (err) => onError?.("Failed to queue retry", err) });
|
|
6569
6763
|
const updateSubscription = useUpdateSubscriptionInfo({
|
|
6764
|
+
skipAutoInvalidate: true,
|
|
6570
6765
|
onSuccess: () => {
|
|
6571
6766
|
onSuccess?.(profileT("default_payment_method_updated"));
|
|
6572
|
-
queryClient.
|
|
6767
|
+
if (queryClient.getQueryData(subscriptionsKeys.detail(subscriptionToken))?.subscription?.status === "past_due") retrySubscription.mutate({ subscriptionToken });
|
|
6768
|
+
else queryClient.invalidateQueries({ queryKey: subscriptionsKeys.detail(subscriptionToken) });
|
|
6573
6769
|
},
|
|
6574
6770
|
onError: (err) => onError?.(profileT("failed_to_update_payment_method"), err)
|
|
6575
6771
|
});
|
|
@@ -6674,7 +6870,7 @@ function PortalSubscriptionPaymentMethodSectionInner({ paymentMethod: currentPay
|
|
|
6674
6870
|
addPaymentMethodLabel: profileT("add_payment_method_action"),
|
|
6675
6871
|
showAddButton: true,
|
|
6676
6872
|
isLoading: isLoadingMethods,
|
|
6677
|
-
isPending: updateSubscription.isPending || addCardMutation.isPending || updatePaymentMethodMutation.isPending || makeDefaultPaymentMethodMutation.isPending,
|
|
6873
|
+
isPending: updateSubscription.isPending || retrySubscription.isPending || addCardMutation.isPending || updatePaymentMethodMutation.isPending || makeDefaultPaymentMethodMutation.isPending,
|
|
6678
6874
|
selectedPaymentMethodId: currentPaymentMethod.id,
|
|
6679
6875
|
onSelectPaymentMethod: (pm) => {
|
|
6680
6876
|
if (pm.id === currentPaymentMethod.id) return;
|
|
@@ -7129,6 +7325,7 @@ function PortalSubscriptionShippingAddressSectionInner({ address: currentAddress
|
|
|
7129
7325
|
function SubscriptionDetailScreen({ token, onToast }) {
|
|
7130
7326
|
const { navigate } = require_AppNavigationContext.useAppNavigation();
|
|
7131
7327
|
const { t } = useSubscriptionsTranslation();
|
|
7328
|
+
const [addPaymentDialogOpen, setAddPaymentDialogOpen] = (0, react.useState)(false);
|
|
7132
7329
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SubscriptionDetailScreen$1, {
|
|
7133
7330
|
token,
|
|
7134
7331
|
onNavigateToList: (0, react.useCallback)(() => navigate("subscriptions"), [navigate]),
|
|
@@ -7150,12 +7347,15 @@ function SubscriptionDetailScreen({ token, onToast }) {
|
|
|
7150
7347
|
onMutationError: (0, react.useCallback)((message, err) => {
|
|
7151
7348
|
onToast(`${message}: ${err instanceof Error ? err.message : t("error_occurred")}`, "error");
|
|
7152
7349
|
}, [onToast, t]),
|
|
7350
|
+
onUpdatePaymentClick: () => setAddPaymentDialogOpen(true),
|
|
7153
7351
|
renderPaymentMethod: (ctx) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PortalSubscriptionPaymentMethodSection, {
|
|
7154
7352
|
...ctx,
|
|
7155
7353
|
onSuccess: (msg) => onToast(msg, "success"),
|
|
7156
7354
|
onError: (msg, err) => {
|
|
7157
7355
|
onToast(`${msg}: ${err instanceof Error ? err.message : t("error_occurred")}`, "error");
|
|
7158
|
-
}
|
|
7356
|
+
},
|
|
7357
|
+
addDialogOpen: addPaymentDialogOpen,
|
|
7358
|
+
onAddDialogOpenChange: setAddPaymentDialogOpen
|
|
7159
7359
|
}),
|
|
7160
7360
|
renderShippingAddress: (ctx) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PortalSubscriptionShippingAddressSection, {
|
|
7161
7361
|
...ctx,
|
|
@@ -7217,4 +7417,4 @@ Object.defineProperty(exports, "subscriptionsScreenPropertySchema", {
|
|
|
7217
7417
|
}
|
|
7218
7418
|
});
|
|
7219
7419
|
|
|
7220
|
-
//# sourceMappingURL=SubscriptionsScreen-
|
|
7420
|
+
//# sourceMappingURL=SubscriptionsScreen-nMZi49Kq.cjs.map
|