@fluid-app/portal-sdk 0.1.248 → 0.1.250

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.
Files changed (340) hide show
  1. package/dist/{fluid-pay-api-adapter-CJ7-I8k-.mjs → AddressAutocompleteInput-Bdsv2iFU.mjs} +153 -3
  2. package/dist/AddressAutocompleteInput-Bdsv2iFU.mjs.map +1 -0
  3. package/dist/{fluid-pay-api-adapter-D63KLi5c.cjs → AddressAutocompleteInput-CbpNjpwB.cjs} +157 -1
  4. package/dist/AddressAutocompleteInput-CbpNjpwB.cjs.map +1 -0
  5. package/dist/{AlertWidget-CbhrQa9Z.mjs → AlertWidget-CcIBGBik.mjs} +3 -3
  6. package/dist/{AlertWidget-CbhrQa9Z.mjs.map → AlertWidget-CcIBGBik.mjs.map} +1 -1
  7. package/dist/{AppDownloadScreen-DPnbWP5G.mjs → AppDownloadScreen-ZxlnSAZ6.mjs} +3 -3
  8. package/dist/{AppDownloadScreen-DPnbWP5G.mjs.map → AppDownloadScreen-ZxlnSAZ6.mjs.map} +1 -1
  9. package/dist/{AppNavigationContext-DNod9mf6.mjs → AppNavigationContext-BcZZMtV6.mjs} +1 -1
  10. package/dist/{AppNavigationContext-DNod9mf6.mjs.map → AppNavigationContext-BcZZMtV6.mjs.map} +1 -1
  11. package/dist/{BulletListWidget-qvZIZ_B-.mjs → BulletListWidget-mRwUgtzN.mjs} +3 -3
  12. package/dist/{BulletListWidget-qvZIZ_B-.mjs.map → BulletListWidget-mRwUgtzN.mjs.map} +1 -1
  13. package/dist/{CalendarWidget-C03VcDLQ.mjs → CalendarWidget-Cn3Ngl8_.mjs} +5 -5
  14. package/dist/{CalendarWidget-C03VcDLQ.mjs.map → CalendarWidget-Cn3Ngl8_.mjs.map} +1 -1
  15. package/dist/{CardWidget-2wcjCf2M.mjs → CardWidget-DHTqvQPa.mjs} +4 -4
  16. package/dist/{CardWidget-2wcjCf2M.mjs.map → CardWidget-DHTqvQPa.mjs.map} +1 -1
  17. package/dist/{CarouselWidget-Cn5P4FVN.mjs → CarouselWidget-C0X-nFyW.mjs} +5 -5
  18. package/dist/{CarouselWidget-Cn5P4FVN.mjs.map → CarouselWidget-C0X-nFyW.mjs.map} +1 -1
  19. package/dist/{CatchUpWidget-B9CI7lq0.mjs → CatchUpWidget-BkeZR91e.mjs} +5 -5
  20. package/dist/{CatchUpWidget-B9CI7lq0.mjs.map → CatchUpWidget-BkeZR91e.mjs.map} +1 -1
  21. package/dist/{ChartWidget-obje-Xj9.mjs → ChartWidget-aFsH9gwD.mjs} +4 -4
  22. package/dist/{ChartWidget-obje-Xj9.mjs.map → ChartWidget-aFsH9gwD.mjs.map} +1 -1
  23. package/dist/{ContactsScreen-DuhDzRtI.mjs → ContactsScreen-DlxwuLwy.mjs} +11 -11
  24. package/dist/{ContactsScreen-DuhDzRtI.mjs.map → ContactsScreen-DlxwuLwy.mjs.map} +1 -1
  25. package/dist/{ContainerWidget-DNenbORS.mjs → ContainerWidget-cbX_KEOQ.mjs} +4 -4
  26. package/dist/{ContainerWidget-DNenbORS.mjs.map → ContainerWidget-cbX_KEOQ.mjs.map} +1 -1
  27. package/dist/{CustomersScreen-BJOBG5f5.mjs → CustomersScreen-0uI1R9lm.mjs} +2 -2
  28. package/dist/{CustomersScreen-BJOBG5f5.mjs.map → CustomersScreen-0uI1R9lm.mjs.map} +1 -1
  29. package/dist/{EmbedWidget-LYnd3TZD.mjs → EmbedWidget-BwR9mICd.mjs} +3 -3
  30. package/dist/{EmbedWidget-LYnd3TZD.mjs.map → EmbedWidget-BwR9mICd.mjs.map} +1 -1
  31. package/dist/FluidProvider-CvS807e4.mjs +6371 -0
  32. package/dist/FluidProvider-CvS807e4.mjs.map +1 -0
  33. package/dist/FluidProvider-DGxCCmVB.cjs +17240 -0
  34. package/dist/FluidProvider-DGxCCmVB.cjs.map +1 -0
  35. package/dist/{ImageWidget-vNWT_O1E.mjs → ImageWidget-DmaAQZBK.mjs} +4 -4
  36. package/dist/{ImageWidget-vNWT_O1E.mjs.map → ImageWidget-DmaAQZBK.mjs.map} +1 -1
  37. package/dist/{InfiniteScrollSentinel-D0XRJi51.mjs → InfiniteScrollSentinel-Dq--_LMC.mjs} +2 -2
  38. package/dist/{InfiniteScrollSentinel-D0XRJi51.mjs.map → InfiniteScrollSentinel-Dq--_LMC.mjs.map} +1 -1
  39. package/dist/{LayoutWidget-UI5fbsx4.mjs → LayoutWidget-CxaMx1nd.mjs} +4 -4
  40. package/dist/{LayoutWidget-UI5fbsx4.mjs.map → LayoutWidget-CxaMx1nd.mjs.map} +1 -1
  41. package/dist/{LinkWidget-CO-Cxf7Z.mjs → LinkWidget-CcEATaYa.mjs} +5 -5
  42. package/dist/{LinkWidget-CO-Cxf7Z.mjs.map → LinkWidget-CcEATaYa.mjs.map} +1 -1
  43. package/dist/{ListWidget-f88QhcGI.mjs → ListWidget-CNAxW_3c.mjs} +6 -6
  44. package/dist/{ListWidget-f88QhcGI.mjs.map → ListWidget-CNAxW_3c.mjs.map} +1 -1
  45. package/dist/{MediaRenderer-DMdb_5xw.mjs → MediaRenderer-13Jlf38P.mjs} +1 -1
  46. package/dist/{MediaRenderer-DMdb_5xw.mjs.map → MediaRenderer-13Jlf38P.mjs.map} +1 -1
  47. package/dist/{MessagingScreen-DGhqsVXi.mjs → MessagingScreen-D7crRUnX.mjs} +9 -12
  48. package/dist/{MessagingScreen-DGhqsVXi.mjs.map → MessagingScreen-D7crRUnX.mjs.map} +1 -1
  49. package/dist/MessagingScreen-DZfFOdFI.mjs +47 -0
  50. package/dist/{MessagingScreen-CDiLGmMi.cjs → MessagingScreen-GLb5id9n.cjs} +64 -131
  51. package/dist/MessagingScreen-GLb5id9n.cjs.map +1 -0
  52. package/dist/{MessagingScreen-BKb4mWGa.cjs → MessagingScreen-jOf-MSk1.cjs} +3 -3
  53. package/dist/{MySiteScreen-CK84vXa9.mjs → MySiteScreen-CZFM4MQO.mjs} +7 -7
  54. package/dist/{MySiteScreen-CK84vXa9.mjs.map → MySiteScreen-CZFM4MQO.mjs.map} +1 -1
  55. package/dist/{MySiteWidget-CQNASVaF.mjs → MySiteWidget-C0n9cSw7.mjs} +5 -5
  56. package/dist/{MySiteWidget-CQNASVaF.mjs.map → MySiteWidget-C0n9cSw7.mjs.map} +1 -1
  57. package/dist/{NestedWidget-RuyrOrFn.mjs → NestedWidget-BMKtDP_4.mjs} +6 -6
  58. package/dist/{NestedWidget-RuyrOrFn.mjs.map → NestedWidget-BMKtDP_4.mjs.map} +1 -1
  59. package/dist/{OrdersScreen-b-ZC4_NI.mjs → OrdersScreen-BDTtvnBR.mjs} +7 -7
  60. package/dist/{OrdersScreen-b-ZC4_NI.mjs.map → OrdersScreen-BDTtvnBR.mjs.map} +1 -1
  61. package/dist/{PointsWidget-BwA6aGVZ.mjs → PointsWidget-CaWklfIH.mjs} +5 -5
  62. package/dist/{PointsWidget-BwA6aGVZ.mjs.map → PointsWidget-CaWklfIH.mjs.map} +1 -1
  63. package/dist/{PortalProductsApiProvider-BFdHFvog.mjs → PortalProductsApiProvider-CNAu2pAb.mjs} +2 -2
  64. package/dist/{PortalProductsApiProvider-BFdHFvog.mjs.map → PortalProductsApiProvider-CNAu2pAb.mjs.map} +1 -1
  65. package/dist/{PortalTenantClientProvider-CjJzBCTL.mjs → PortalTenantClientProvider-Bni6J3KS.mjs} +1 -1
  66. package/dist/{PortalTenantClientProvider-CjJzBCTL.mjs.map → PortalTenantClientProvider-Bni6J3KS.mjs.map} +1 -1
  67. package/dist/{ProfileScreen-CmQDKNaP.mjs → ProfileScreen--6ETap-j.mjs} +33 -18
  68. package/dist/ProfileScreen--6ETap-j.mjs.map +1 -0
  69. package/dist/{ProfileScreen-DHv2Cjpz.cjs → ProfileScreen-BJzW-gC_.cjs} +4 -4
  70. package/dist/ProfileScreen-BXzIR1xc.mjs +48 -0
  71. package/dist/{ProfileScreen-BDLJgcXg.cjs → ProfileScreen-DucZeLWI.cjs} +40 -20
  72. package/dist/ProfileScreen-DucZeLWI.cjs.map +1 -0
  73. package/dist/{QuickLinksWidget-CJqwiBJ7.mjs → QuickLinksWidget-D0b33oyn.mjs} +3 -3
  74. package/dist/{QuickLinksWidget-CJqwiBJ7.mjs.map → QuickLinksWidget-D0b33oyn.mjs.map} +1 -1
  75. package/dist/{QuickShareWidget-DKE7Tba2.mjs → QuickShareWidget-DJ0Y71om.mjs} +3 -3
  76. package/dist/{QuickShareWidget-DKE7Tba2.mjs.map → QuickShareWidget-DJ0Y71om.mjs.map} +1 -1
  77. package/dist/{RecentActivityWidget-D1AlZgfV.mjs → RecentActivityWidget-Rpj33TiN.mjs} +5 -5
  78. package/dist/{RecentActivityWidget-D1AlZgfV.mjs.map → RecentActivityWidget-Rpj33TiN.mjs.map} +1 -1
  79. package/dist/{ScreenHeaderContext-Cemdo7bM.mjs → ScreenHeaderContext-4WYXIqQ5.mjs} +1 -1
  80. package/dist/{ScreenHeaderContext-Cemdo7bM.mjs.map → ScreenHeaderContext-4WYXIqQ5.mjs.map} +1 -1
  81. package/dist/{ScreenRenderer-Cl2aAJ7D.mjs → ScreenRenderer-BQal-fnZ.mjs} +2 -2
  82. package/dist/{ScreenRenderer-Cl2aAJ7D.mjs.map → ScreenRenderer-BQal-fnZ.mjs.map} +1 -1
  83. package/dist/{SearchSort-CokMCrhy.mjs → SearchSort-CnUiCGu2.mjs} +2 -2
  84. package/dist/{SearchSort-CokMCrhy.mjs.map → SearchSort-CnUiCGu2.mjs.map} +1 -1
  85. package/dist/{SeparatorWidget-gVlyr1MV.mjs → SeparatorWidget-Bgzsloji.mjs} +3 -3
  86. package/dist/{SeparatorWidget-gVlyr1MV.mjs.map → SeparatorWidget-Bgzsloji.mjs.map} +1 -1
  87. package/dist/{ShareablesScreen-BZZ-RT71.mjs → ShareablesScreen-BY47-Q_G.mjs} +14 -18
  88. package/dist/{ShareablesScreen-BZZ-RT71.mjs.map → ShareablesScreen-BY47-Q_G.mjs.map} +1 -1
  89. package/dist/ShareablesScreen-D0z03RD0.mjs +13 -0
  90. package/dist/{ShopScreen-kiVwC38W.mjs → ShopScreen-BLU3IQ5B.mjs} +29 -34
  91. package/dist/{ShopScreen-kiVwC38W.mjs.map → ShopScreen-BLU3IQ5B.mjs.map} +1 -1
  92. package/dist/{ShopScreen---dB03HI.cjs → ShopScreen-BsfMjIPn.cjs} +22 -22
  93. package/dist/{ShopScreen---dB03HI.cjs.map → ShopScreen-BsfMjIPn.cjs.map} +1 -1
  94. package/dist/ShopScreen-CKRSy_uk.mjs +47 -0
  95. package/dist/{ShopScreen-B6ygTHDB.cjs → ShopScreen-P7EazKlQ.cjs} +3 -3
  96. package/dist/{SpacerWidget-BY7ywGP4.mjs → SpacerWidget-C1byII28.mjs} +2 -2
  97. package/dist/{SpacerWidget-BY7ywGP4.mjs.map → SpacerWidget-C1byII28.mjs.map} +1 -1
  98. package/dist/{SubscriptionsScreen-B88_dLfE.cjs → SubscriptionsScreen-Bglm_cfM.cjs} +682 -283
  99. package/dist/SubscriptionsScreen-Bglm_cfM.cjs.map +1 -0
  100. package/dist/{SubscriptionsScreen-DK9-h3Cz.mjs → SubscriptionsScreen-Dh03oU0H.mjs} +582 -243
  101. package/dist/SubscriptionsScreen-Dh03oU0H.mjs.map +1 -0
  102. package/dist/{SubscriptionsScreen-dhnfYn4L.cjs → SubscriptionsScreen-Dx1cZCdY.cjs} +3 -3
  103. package/dist/{TableWidget-dfUvhH0S.mjs → TableWidget-BtAfTNH_.mjs} +6 -6
  104. package/dist/{TableWidget-dfUvhH0S.mjs.map → TableWidget-BtAfTNH_.mjs.map} +1 -1
  105. package/dist/{TextWidget-BteaMIsX.mjs → TextWidget-CfLUQr6V.mjs} +3 -3
  106. package/dist/{TextWidget-BteaMIsX.mjs.map → TextWidget-CfLUQr6V.mjs.map} +1 -1
  107. package/dist/{ToDoWidget-BciI_D70.mjs → ToDoWidget-bn9bc_MO.mjs} +7 -7
  108. package/dist/{ToDoWidget-BciI_D70.mjs.map → ToDoWidget-bn9bc_MO.mjs.map} +1 -1
  109. package/dist/{UpgradeScreen-X6j0_625.mjs → UpgradeScreen-B-5QKZ_X.mjs} +3 -3
  110. package/dist/{UpgradeScreen-X6j0_625.mjs.map → UpgradeScreen-B-5QKZ_X.mjs.map} +1 -1
  111. package/dist/{VideoWidget-Dj9wue7j.mjs → VideoWidget-DKhqN_Rx.mjs} +4 -4
  112. package/dist/{VideoWidget-Dj9wue7j.mjs.map → VideoWidget-DKhqN_Rx.mjs.map} +1 -1
  113. package/dist/{WidgetInteractionContext-B1mELhQ_.mjs → WidgetInteractionContext-pLGNr8_2.mjs} +1 -1
  114. package/dist/{WidgetInteractionContext-B1mELhQ_.mjs.map → WidgetInteractionContext-pLGNr8_2.mjs.map} +1 -1
  115. package/dist/api-context-3GmfqvIB.mjs +22 -0
  116. package/dist/api-context-3GmfqvIB.mjs.map +1 -0
  117. package/dist/api-context-BkBvyFVK.cjs +46 -0
  118. package/dist/api-context-BkBvyFVK.cjs.map +1 -0
  119. package/dist/{components-CjgEvBYG.mjs → components-hloC7Tbu.mjs} +3 -3
  120. package/dist/{components-CjgEvBYG.mjs.map → components-hloC7Tbu.mjs.map} +1 -1
  121. package/dist/de-DGEv3Wj7.cjs +43 -0
  122. package/dist/de-DGEv3Wj7.cjs.map +1 -0
  123. package/dist/de-f_0MEvly.mjs +37 -0
  124. package/dist/de-f_0MEvly.mjs.map +1 -0
  125. package/dist/{dist-CTLDCXCc.mjs → dist-Di1hciu4.mjs} +1 -1
  126. package/dist/{dist-CTLDCXCc.mjs.map → dist-Di1hciu4.mjs.map} +1 -1
  127. package/dist/el-DBeHybzu.mjs +37 -0
  128. package/dist/el-DBeHybzu.mjs.map +1 -0
  129. package/dist/el-a-BUUyaN.cjs +43 -0
  130. package/dist/el-a-BUUyaN.cjs.map +1 -0
  131. package/dist/{error-state-DYzHx8tt.mjs → error-state--Z2OlDFr.mjs} +1 -1
  132. package/dist/{error-state-DYzHx8tt.mjs.map → error-state--Z2OlDFr.mjs.map} +1 -1
  133. package/dist/{es-BXxGlAp6.mjs → es-B1tdcIoq.mjs} +4 -39
  134. package/dist/{es-BXxGlAp6.mjs.map → es-B1tdcIoq.mjs.map} +1 -1
  135. package/dist/es-N-LjvJCS.cjs +43 -0
  136. package/dist/es-N-LjvJCS.cjs.map +1 -0
  137. package/dist/es-zRvcomm1.mjs +37 -0
  138. package/dist/es-zRvcomm1.mjs.map +1 -0
  139. package/dist/fr-CFggon_j.cjs +43 -0
  140. package/dist/fr-CFggon_j.cjs.map +1 -0
  141. package/dist/fr-DZ8hb7Li.mjs +37 -0
  142. package/dist/fr-DZ8hb7Li.mjs.map +1 -0
  143. package/dist/he-BXo3e9k9.mjs +37 -0
  144. package/dist/he-BXo3e9k9.mjs.map +1 -0
  145. package/dist/he-T4b_SIEg.cjs +43 -0
  146. package/dist/he-T4b_SIEg.cjs.map +1 -0
  147. package/dist/hu-C5uVO1Gi.cjs +43 -0
  148. package/dist/hu-C5uVO1Gi.cjs.map +1 -0
  149. package/dist/hu-DUbmD_v7.mjs +37 -0
  150. package/dist/hu-DUbmD_v7.mjs.map +1 -0
  151. package/dist/id-I8bH5NN_.mjs +37 -0
  152. package/dist/id-I8bH5NN_.mjs.map +1 -0
  153. package/dist/id-_R_sj2Zl.cjs +43 -0
  154. package/dist/id-_R_sj2Zl.cjs.map +1 -0
  155. package/dist/index.cjs +16 -15
  156. package/dist/index.cjs.map +1 -1
  157. package/dist/index.d.cts +7 -0
  158. package/dist/index.d.cts.map +1 -1
  159. package/dist/index.d.mts +7 -0
  160. package/dist/index.d.mts.map +1 -1
  161. package/dist/index.mjs +86 -85
  162. package/dist/index.mjs.map +1 -1
  163. package/dist/{format-CLUjV1oR.cjs → isAfter-DXdeICis.cjs} +80 -1
  164. package/dist/isAfter-DXdeICis.cjs.map +1 -0
  165. package/dist/it-BMvqaIb9.cjs +43 -0
  166. package/dist/it-BMvqaIb9.cjs.map +1 -0
  167. package/dist/it-D3Jf5QRi.mjs +37 -0
  168. package/dist/it-D3Jf5QRi.mjs.map +1 -0
  169. package/dist/ja-9CIQCExk.mjs +37 -0
  170. package/dist/ja-9CIQCExk.mjs.map +1 -0
  171. package/dist/ja-DBbelgna.cjs +43 -0
  172. package/dist/ja-DBbelgna.cjs.map +1 -0
  173. package/dist/ko-Bw-gMUu6.mjs +37 -0
  174. package/dist/ko-Bw-gMUu6.mjs.map +1 -0
  175. package/dist/ko-C0Tajaz1.cjs +43 -0
  176. package/dist/ko-C0Tajaz1.cjs.map +1 -0
  177. package/dist/nl-B89YTYeT.cjs +43 -0
  178. package/dist/nl-B89YTYeT.cjs.map +1 -0
  179. package/dist/nl-DDGMf5eH.mjs +37 -0
  180. package/dist/nl-DDGMf5eH.mjs.map +1 -0
  181. package/dist/{order-status-badge-xuJ732eH.mjs → order-status-badge-CKLegNhv.mjs} +4 -4
  182. package/dist/{order-status-badge-xuJ732eH.mjs.map → order-status-badge-CKLegNhv.mjs.map} +1 -1
  183. package/dist/{parse-task-body-DEmYvdNM.mjs → parse-task-body-BK1v2806.mjs} +1 -1
  184. package/dist/{parse-task-body-DEmYvdNM.mjs.map → parse-task-body-BK1v2806.mjs.map} +1 -1
  185. package/dist/pl--xhIwSlw.cjs +43 -0
  186. package/dist/pl--xhIwSlw.cjs.map +1 -0
  187. package/dist/pl-CdZlOTsS.mjs +37 -0
  188. package/dist/pl-CdZlOTsS.mjs.map +1 -0
  189. package/dist/{portal_tenant_content-CQQfNOTc.mjs → portal_tenant_content-DPLnrtOG.mjs} +38 -2
  190. package/dist/{portal_tenant_content-CQQfNOTc.mjs.map → portal_tenant_content-DPLnrtOG.mjs.map} +1 -1
  191. package/dist/pt-BdKQZfRo.mjs +37 -0
  192. package/dist/pt-BdKQZfRo.mjs.map +1 -0
  193. package/dist/pt-Cfp_A3CX.cjs +43 -0
  194. package/dist/pt-Cfp_A3CX.cjs.map +1 -0
  195. package/dist/{purify.es-DzInNL5X.mjs → purify.es-Ba5Ug4-y.mjs} +1 -1
  196. package/dist/{purify.es-DzInNL5X.mjs.map → purify.es-Ba5Ug4-y.mjs.map} +1 -1
  197. package/dist/{query-keys-8SVs82aF.mjs → query-keys-DXle2tm8.mjs} +1 -1
  198. package/dist/{query-keys-8SVs82aF.mjs.map → query-keys-DXle2tm8.mjs.map} +1 -1
  199. package/dist/{registries-Ct8o2YRe.mjs → registries-kvRRUHcO.mjs} +1 -1
  200. package/dist/{registries-Ct8o2YRe.mjs.map → registries-kvRRUHcO.mjs.map} +1 -1
  201. package/dist/{registry-context-CTHUCfEc.mjs → registry-context-Bc-2fQnr.mjs} +1 -1
  202. package/dist/{registry-context-CTHUCfEc.mjs.map → registry-context-Bc-2fQnr.mjs.map} +1 -1
  203. package/dist/ro-DnAztrxY.mjs +37 -0
  204. package/dist/ro-DnAztrxY.mjs.map +1 -0
  205. package/dist/ro-Qp0OJAI0.cjs +43 -0
  206. package/dist/ro-Qp0OJAI0.cjs.map +1 -0
  207. package/dist/ru-BkBpELbx.mjs +37 -0
  208. package/dist/ru-BkBpELbx.mjs.map +1 -0
  209. package/dist/ru-CY41Fh7R.cjs +43 -0
  210. package/dist/ru-CY41Fh7R.cjs.map +1 -0
  211. package/dist/{scroll-arrows-CqDxJ0Pe.mjs → scroll-arrows-D90Miaz_.mjs} +1 -1
  212. package/dist/{scroll-arrows-CqDxJ0Pe.mjs.map → scroll-arrows-D90Miaz_.mjs.map} +1 -1
  213. package/dist/{sortable.esm-C8riJ_zv.mjs → sortable.esm-NmKxJoc7.mjs} +1 -1
  214. package/dist/{sortable.esm-C8riJ_zv.mjs.map → sortable.esm-NmKxJoc7.mjs.map} +1 -1
  215. package/dist/{src-C9vtVoJs.mjs → src-CSFJnkfN.mjs} +1 -1
  216. package/dist/{src-C9vtVoJs.mjs.map → src-CSFJnkfN.mjs.map} +1 -1
  217. package/dist/{src-pgBBOcJa.mjs → src-jSFuc4IV.mjs} +2 -2
  218. package/dist/{src-pgBBOcJa.mjs.map → src-jSFuc4IV.mjs.map} +1 -1
  219. package/dist/th--13cvzk3.cjs +43 -0
  220. package/dist/th--13cvzk3.cjs.map +1 -0
  221. package/dist/th-B4QOqrXn.mjs +37 -0
  222. package/dist/th-B4QOqrXn.mjs.map +1 -0
  223. package/dist/tl-CEypklNf.mjs +37 -0
  224. package/dist/tl-CEypklNf.mjs.map +1 -0
  225. package/dist/tl-CaqI-eLl.cjs +43 -0
  226. package/dist/tl-CaqI-eLl.cjs.map +1 -0
  227. package/dist/tr-BzJ5aLBX.cjs +43 -0
  228. package/dist/tr-BzJ5aLBX.cjs.map +1 -0
  229. package/dist/tr-DUrLeX63.mjs +37 -0
  230. package/dist/tr-DUrLeX63.mjs.map +1 -0
  231. package/dist/{use-account-DsTz5BlS.mjs → use-account-CGaDP8xd.mjs} +2 -2
  232. package/dist/{use-account-DsTz5BlS.mjs.map → use-account-CGaDP8xd.mjs.map} +1 -1
  233. package/dist/{use-store-C2KBIS41.mjs → use-store-BVCCB9kx.mjs} +1 -1
  234. package/dist/{use-store-C2KBIS41.mjs.map → use-store-BVCCB9kx.mjs.map} +1 -1
  235. package/dist/zh_CN-2xAokYb4.cjs +43 -0
  236. package/dist/zh_CN-2xAokYb4.cjs.map +1 -0
  237. package/dist/zh_CN-Bhfuxe7w.mjs +37 -0
  238. package/dist/zh_CN-Bhfuxe7w.mjs.map +1 -0
  239. package/dist/zh_TW-B9XT91CL.cjs +43 -0
  240. package/dist/zh_TW-B9XT91CL.cjs.map +1 -0
  241. package/dist/zh_TW-DR3xhpLa.mjs +37 -0
  242. package/dist/zh_TW-DR3xhpLa.mjs.map +1 -0
  243. package/package.json +14 -13
  244. package/dist/FluidProvider-Bwg1cGSY.mjs +0 -2409
  245. package/dist/FluidProvider-Bwg1cGSY.mjs.map +0 -1
  246. package/dist/FluidProvider-DprqXNu4.cjs +0 -2520
  247. package/dist/FluidProvider-DprqXNu4.cjs.map +0 -1
  248. package/dist/MessagingScreen-CDiLGmMi.cjs.map +0 -1
  249. package/dist/ProfileScreen-BDLJgcXg.cjs.map +0 -1
  250. package/dist/ProfileScreen-CmQDKNaP.mjs.map +0 -1
  251. package/dist/SubscriptionsScreen-B88_dLfE.cjs.map +0 -1
  252. package/dist/SubscriptionsScreen-DK9-h3Cz.mjs.map +0 -1
  253. package/dist/de-CqKH8kwp.cjs +0 -12
  254. package/dist/de-CqKH8kwp.cjs.map +0 -1
  255. package/dist/de-DWONEOZS.mjs +0 -6
  256. package/dist/de-DWONEOZS.mjs.map +0 -1
  257. package/dist/el-CIrAhB-W.cjs +0 -12
  258. package/dist/el-CIrAhB-W.cjs.map +0 -1
  259. package/dist/el-De7Ne7it.mjs +0 -6
  260. package/dist/el-De7Ne7it.mjs.map +0 -1
  261. package/dist/es-4Wsa13tV.cjs +0 -12
  262. package/dist/es-4Wsa13tV.cjs.map +0 -1
  263. package/dist/es-B5_ItPIn.mjs +0 -6
  264. package/dist/es-B5_ItPIn.mjs.map +0 -1
  265. package/dist/fluid-pay-api-adapter-CJ7-I8k-.mjs.map +0 -1
  266. package/dist/fluid-pay-api-adapter-D63KLi5c.cjs.map +0 -1
  267. package/dist/format-CLUjV1oR.cjs.map +0 -1
  268. package/dist/fr-BDKPrKKW.cjs +0 -12
  269. package/dist/fr-BDKPrKKW.cjs.map +0 -1
  270. package/dist/fr-jgEDP2og.mjs +0 -6
  271. package/dist/fr-jgEDP2og.mjs.map +0 -1
  272. package/dist/he-5dq6lV2h.cjs +0 -12
  273. package/dist/he-5dq6lV2h.cjs.map +0 -1
  274. package/dist/he-DLQdVr_g.mjs +0 -6
  275. package/dist/he-DLQdVr_g.mjs.map +0 -1
  276. package/dist/hu-CC4QdkPb.mjs +0 -6
  277. package/dist/hu-CC4QdkPb.mjs.map +0 -1
  278. package/dist/hu-Dpgriy5N.cjs +0 -12
  279. package/dist/hu-Dpgriy5N.cjs.map +0 -1
  280. package/dist/id-Ba-0RT7y.cjs +0 -12
  281. package/dist/id-Ba-0RT7y.cjs.map +0 -1
  282. package/dist/id-CwGC2v1d.mjs +0 -6
  283. package/dist/id-CwGC2v1d.mjs.map +0 -1
  284. package/dist/it-CaxIV-R4.cjs +0 -12
  285. package/dist/it-CaxIV-R4.cjs.map +0 -1
  286. package/dist/it-jUZZ5sjO.mjs +0 -6
  287. package/dist/it-jUZZ5sjO.mjs.map +0 -1
  288. package/dist/ja-Lcg_Qqtj.cjs +0 -12
  289. package/dist/ja-Lcg_Qqtj.cjs.map +0 -1
  290. package/dist/ja-QVQymwAE.mjs +0 -6
  291. package/dist/ja-QVQymwAE.mjs.map +0 -1
  292. package/dist/ko-CFu0TjJO.cjs +0 -12
  293. package/dist/ko-CFu0TjJO.cjs.map +0 -1
  294. package/dist/ko-DfzzTwZI.mjs +0 -6
  295. package/dist/ko-DfzzTwZI.mjs.map +0 -1
  296. package/dist/nl-DR9IRXGT.cjs +0 -12
  297. package/dist/nl-DR9IRXGT.cjs.map +0 -1
  298. package/dist/nl-Dys3mUo2.mjs +0 -6
  299. package/dist/nl-Dys3mUo2.mjs.map +0 -1
  300. package/dist/pay-api-context-CqKGSXnP.mjs +0 -13
  301. package/dist/pay-api-context-CqKGSXnP.mjs.map +0 -1
  302. package/dist/pay-api-context-_o5ZEXYt.cjs +0 -25
  303. package/dist/pay-api-context-_o5ZEXYt.cjs.map +0 -1
  304. package/dist/pl-CBwEisEK.mjs +0 -6
  305. package/dist/pl-CBwEisEK.mjs.map +0 -1
  306. package/dist/pl-DSGSRDM2.cjs +0 -12
  307. package/dist/pl-DSGSRDM2.cjs.map +0 -1
  308. package/dist/pt-D5al7xw3.mjs +0 -6
  309. package/dist/pt-D5al7xw3.mjs.map +0 -1
  310. package/dist/pt-Pz_D1HUz.cjs +0 -12
  311. package/dist/pt-Pz_D1HUz.cjs.map +0 -1
  312. package/dist/ro-B43SoGdE.mjs +0 -6
  313. package/dist/ro-B43SoGdE.mjs.map +0 -1
  314. package/dist/ro-BoGeZTac.cjs +0 -12
  315. package/dist/ro-BoGeZTac.cjs.map +0 -1
  316. package/dist/ru-Cd7LUmcu.cjs +0 -12
  317. package/dist/ru-Cd7LUmcu.cjs.map +0 -1
  318. package/dist/ru-ChwnncDc.mjs +0 -6
  319. package/dist/ru-ChwnncDc.mjs.map +0 -1
  320. package/dist/th-C9S_8Tv6.mjs +0 -6
  321. package/dist/th-C9S_8Tv6.mjs.map +0 -1
  322. package/dist/th-DwLAQd0u.cjs +0 -12
  323. package/dist/th-DwLAQd0u.cjs.map +0 -1
  324. package/dist/tl-CiPbx_5F.mjs +0 -6
  325. package/dist/tl-CiPbx_5F.mjs.map +0 -1
  326. package/dist/tl-DwAVpDyB.cjs +0 -12
  327. package/dist/tl-DwAVpDyB.cjs.map +0 -1
  328. package/dist/tr-BFbCmHQZ.cjs +0 -12
  329. package/dist/tr-BFbCmHQZ.cjs.map +0 -1
  330. package/dist/tr-CUd4dp2u.mjs +0 -6
  331. package/dist/tr-CUd4dp2u.mjs.map +0 -1
  332. package/dist/zh_CN-Cn-k18Y5.cjs +0 -12
  333. package/dist/zh_CN-Cn-k18Y5.cjs.map +0 -1
  334. package/dist/zh_CN-D46-GUTP.mjs +0 -6
  335. package/dist/zh_CN-D46-GUTP.mjs.map +0 -1
  336. package/dist/zh_TW-CIUhIeJP.cjs +0 -12
  337. package/dist/zh_TW-CIUhIeJP.cjs.map +0 -1
  338. package/dist/zh_TW-XqA7UKxt.mjs +0 -6
  339. package/dist/zh_TW-XqA7UKxt.mjs.map +0 -1
  340. /package/dist/{fields-B_iAnFXl.mjs → fields-FTgjMOdh.mjs} +0 -0
@@ -1,24 +1,23 @@
1
- import { r as __exportAll } from "./es-BXxGlAp6.mjs";
2
- import { n as usePayApi } from "./pay-api-context-CqKGSXnP.mjs";
1
+ import { I as __exportAll } from "./portal_tenant_content-DPLnrtOG.mjs";
2
+ import { i as usePayApi } from "./api-context-3GmfqvIB.mjs";
3
3
  import { n as useCountriesApi } from "./countries-api-context-CMh13cfX.mjs";
4
4
  import { C as subscriptions_reactivate, D as subscriptions_update, E as subscriptions_skip, S as subscriptions_pause, T as subscriptions_show, b as subscriptions_cancel, w as subscriptions_resume, x as subscriptions_list } from "./portal_tenant-Q3x7ALaZ.mjs";
5
- import { n as usePortalTenantClient } from "./PortalTenantClientProvider-CjJzBCTL.mjs";
6
- import { $t as startOfISOWeek, An as Accordion, Bt as warnOrThrowProtectedError, C as Skeleton, Cn as AlertDialogDescription, Dn as Button, En as AlertDialogTitle, Fn as cn$1, Gt as enUS, Ht as getWeek, K as Label, L as Input, Lt as format, Mn as AccordionItem, Mt as Calendar$1, Nn as AccordionTrigger, Qt as getTimezoneOffsetInMilliseconds, Rt as isProtectedDayOfYearToken, Sn as AlertDialogContent, Tn as AlertDialogHeader, Ut as getWeekYear, Vt as longFormatters, Wt as getISOWeek, a as ToggleGroup, an as constructFrom, b as fluidToast, bn as AlertDialogAction, cn as millisecondsInSecond, ct as DialogFooter, d as Table$1, dn as BreadcrumbLink, en as startOfWeek, f as TableBody, fn as BreadcrumbList, ft as DialogTitle, g as TableRow, h as TableHeader, ht as PopoverTrigger, in as toDate, it as Dialog, jn as AccordionContent, ln as Breadcrumb, lt as DialogHeader, mn as BreadcrumbSeparator, mt as PopoverContent, o as ToggleGroupItem, on as millisecondsInHour, ot as DialogContent, p as TableCell, pn as BreadcrumbPage, pt as Popover, rn as addDays, sn as millisecondsInMinute, tn as getDefaultOptions$1, un as BreadcrumbItem, wn as AlertDialogFooter, xn as AlertDialogCancel, yn as AlertDialog, zt as isProtectedWeekYearToken } from "./src-pgBBOcJa.mjs";
7
- import { r as useScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-Cemdo7bM.mjs";
8
- import { n as payKeys, r as storeKeys } from "./query-keys-8SVs82aF.mjs";
9
- import { t as useAccount } from "./use-account-DsTz5BlS.mjs";
10
- import { n as useAppNavigation } from "./AppNavigationContext-DNod9mf6.mjs";
11
- import { d as PaymentIcon, f as getCardDisplayName, m as FluidPayCoreProvider, n as mapToFluidPayPaymentMethod, p as getCardExpiry, r as CreditCardFormDialog, t as createFluidPayApiAdapter } from "./fluid-pay-api-adapter-CJ7-I8k-.mjs";
12
- import { t as SearchSort } from "./SearchSort-CokMCrhy.mjs";
13
- import { t as InfiniteScrollSentinel } from "./InfiniteScrollSentinel-D0XRJi51.mjs";
14
- import { r as TableColumn } from "./order-status-badge-xuJ732eH.mjs";
5
+ import { n as usePortalTenantClient } from "./PortalTenantClientProvider-Bni6J3KS.mjs";
6
+ import { A as Select, Bt as warnOrThrowProtectedError, C as Skeleton, Cn as AlertDialogCancel, Dn as AlertDialogHeader, En as AlertDialogFooter, Fn as AccordionTrigger, Gt as enUS, Ht as getWeek, It as isAfter, K as Label, L as Input, Ln as cn$1, Lt as format, M as SelectItem, Mn as Accordion, Mt as Calendar$1, N as SelectTrigger, Nn as AccordionContent, On as AlertDialogTitle, P as SelectValue, Pn as AccordionItem, Rt as isProtectedDayOfYearToken, Tn as AlertDialogDescription, Ut as getWeekYear, Vt as longFormatters, Wt as getISOWeek, Xt as addWeeks, Yt as addYears, a as ToggleGroup, an as addDays, b as fluidToast, cn as millisecondsInHour, ct as DialogFooter, d as Table$1, dn as Breadcrumb, en as getTimezoneOffsetInMilliseconds, f as TableBody, fn as BreadcrumbItem, ft as DialogTitle, g as TableRow, gn as BreadcrumbSeparator, h as TableHeader, hn as BreadcrumbPage, ht as PopoverTrigger, in as addMonths, it as Dialog, j as SelectContent, kn as Button, ln as millisecondsInMinute, lt as DialogHeader, mn as BreadcrumbList, mt as PopoverContent, nn as startOfWeek, o as ToggleGroupItem, on as toDate, ot as DialogContent, p as TableCell, pn as BreadcrumbLink, pt as Popover, rn as getDefaultOptions$1, sn as constructFrom, tn as startOfISOWeek, un as millisecondsInSecond, wn as AlertDialogContent, xn as AlertDialog, zt as isProtectedWeekYearToken } from "./src-jSFuc4IV.mjs";
7
+ import { r as useScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-4WYXIqQ5.mjs";
8
+ import { n as payKeys, r as storeKeys } from "./query-keys-DXle2tm8.mjs";
9
+ import { t as useAccount } from "./use-account-CGaDP8xd.mjs";
10
+ import { n as useAppNavigation } from "./AppNavigationContext-BcZZMtV6.mjs";
11
+ import { f as PaymentIcon, h as FluidPayCoreProvider, i as CreditCardFormDialog, m as getCardExpiry, n as createFluidPayApiAdapter, p as getCardDisplayName, r as mapToFluidPayPaymentMethod, t as AddressAutocompleteInput } from "./AddressAutocompleteInput-Bdsv2iFU.mjs";
12
+ import { t as SearchSort } from "./SearchSort-CnUiCGu2.mjs";
13
+ import { t as InfiniteScrollSentinel } from "./InfiniteScrollSentinel-Dq--_LMC.mjs";
14
+ import { r as TableColumn } from "./order-status-badge-CKLegNhv.mjs";
15
15
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
16
16
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
17
17
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
18
- import { CalendarIcon, Pause, Play, RotateCcw, SkipForward, XCircle } from "lucide-react";
18
+ import { CalendarDays, CalendarIcon, ChevronLeft, ChevronRight, Pause, Play, RotateCcw, SkipForward, XCircle } from "lucide-react";
19
19
  import { clsx } from "clsx";
20
20
  import { twMerge } from "tailwind-merge";
21
- import { useController } from "react-hook-form";
22
21
  //#region ../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDefaultOptions.js
23
22
  /**
24
23
  * @name getDefaultOptions
@@ -2110,6 +2109,16 @@ const subscriptionsKeys = {
2110
2109
  ]
2111
2110
  };
2112
2111
  //#endregion
2112
+ //#region ../../subscriptions/core/src/hooks/use-subscriptions.ts
2113
+ function useSubscriptions(params, options) {
2114
+ const api = useSubscriptionsApi();
2115
+ return useQuery({
2116
+ queryKey: subscriptionsKeys.list(params),
2117
+ queryFn: () => api.fetchCustomerSubscriptions(params),
2118
+ enabled: options?.enabled ?? !!params.customerId
2119
+ });
2120
+ }
2121
+ //#endregion
2113
2122
  //#region ../../subscriptions/core/src/hooks/use-infinite-subscriptions.ts
2114
2123
  function useInfiniteSubscriptions(params, options) {
2115
2124
  const api = useSubscriptionsApi();
@@ -2637,6 +2646,7 @@ function createPortalSubscriptionsAdapter(client) {
2637
2646
  const subscription = {};
2638
2647
  if (body.payment_method_id != null) subscription.payment_method_id = body.payment_method_id;
2639
2648
  if (body.quantity != null) subscription.quantity = body.quantity;
2649
+ if (body.next_bill_date != null) subscription.next_bill_date = body.next_bill_date;
2640
2650
  return mapSubscriptionDetail(await subscriptions_update(client, subscriptionToken, { subscription }));
2641
2651
  }
2642
2652
  };
@@ -3002,92 +3012,127 @@ function SubscriptionsListScreen({ customerId, isLoadingCustomer }) {
3002
3012
  });
3003
3013
  }
3004
3014
  //#endregion
3005
- //#region ../../subscriptions/ui/src/components/confirm-dialog.tsx
3006
- function ConfirmDialog({ title, description, actionButtonText = "Delete", cancelButtonText = "Cancel", open, setOpen, onConfirm }) {
3015
+ //#region ../../subscriptions/ui/src/components/cancel-subscription-dialog.tsx
3016
+ const PAUSE_MONTH_OPTIONS = [
3017
+ 1,
3018
+ 2,
3019
+ 3
3020
+ ];
3021
+ function CancelSubscriptionDialog({ open, onOpenChange, onConfirm, onPauseInstead, errorMessage, title = "Cancel Subscription", description = "Are you sure you want to cancel this subscription? You can reactivate it later.", pauseQuestion = "Would you like to pause your subscription instead?", pauseButtonText = "Pause Subscription", cancelButtonText = "Cancel", actionButtonText = "Cancel Subscription" }) {
3007
3022
  const [isPending, setIsPending] = useState(false);
3023
+ const [selectedMonths, setSelectedMonths] = useState(null);
3024
+ useEffect(() => {
3025
+ if (!open) setSelectedMonths(null);
3026
+ }, [open]);
3008
3027
  const handleConfirm = async () => {
3028
+ const result = onConfirm();
3029
+ if (!(result instanceof Promise)) {
3030
+ onOpenChange(false);
3031
+ return;
3032
+ }
3033
+ setIsPending(true);
3009
3034
  try {
3010
- const result = onConfirm();
3011
- if (result instanceof Promise) {
3012
- setIsPending(true);
3013
- await result;
3014
- }
3035
+ await result;
3036
+ onOpenChange(false);
3015
3037
  } catch (error) {
3016
- console.error("ConfirmDialog: action rejected", error);
3038
+ console.error("CancelSubscriptionDialog: action rejected", error);
3017
3039
  } finally {
3018
3040
  setIsPending(false);
3019
- setOpen(false);
3020
3041
  }
3021
3042
  };
3043
+ const handlePause = () => {
3044
+ if (!selectedMonths) return;
3045
+ onPauseInstead(selectedMonths);
3046
+ };
3022
3047
  return /* @__PURE__ */ jsx(AlertDialog, {
3023
3048
  open,
3024
- onOpenChange: (v) => !isPending && setOpen(v),
3025
- children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: title }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: description })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
3026
- disabled: isPending,
3027
- children: cancelButtonText
3028
- }), /* @__PURE__ */ jsx(AlertDialogAction, {
3029
- onClick: handleConfirm,
3030
- disabled: isPending,
3031
- className: "bg-red-600 text-white hover:bg-red-500",
3032
- children: isPending ? "..." : actionButtonText
3033
- })] })] })
3049
+ onOpenChange: (v) => !isPending && onOpenChange(v),
3050
+ children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [
3051
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: title }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: description })] }),
3052
+ /* @__PURE__ */ jsxs("div", {
3053
+ className: "border-border space-y-2 rounded-md border p-3",
3054
+ children: [
3055
+ /* @__PURE__ */ jsx("p", {
3056
+ className: "text-foreground text-sm font-medium",
3057
+ children: pauseQuestion
3058
+ }),
3059
+ /* @__PURE__ */ jsx(Label, {
3060
+ htmlFor: "cancel-pause-months",
3061
+ className: "text-foreground text-sm font-semibold",
3062
+ children: "Pause for"
3063
+ }),
3064
+ /* @__PURE__ */ jsxs(Select, {
3065
+ value: selectedMonths ? String(selectedMonths) : void 0,
3066
+ onValueChange: (value) => setSelectedMonths(value ? Number(value) : null),
3067
+ disabled: isPending,
3068
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
3069
+ id: "cancel-pause-months",
3070
+ className: "w-full",
3071
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select duration" })
3072
+ }), /* @__PURE__ */ jsx(SelectContent, { children: PAUSE_MONTH_OPTIONS.map((months) => /* @__PURE__ */ jsxs(SelectItem, {
3073
+ value: String(months),
3074
+ children: [
3075
+ months,
3076
+ " ",
3077
+ months === 1 ? "month" : "months"
3078
+ ]
3079
+ }, months)) })]
3080
+ }),
3081
+ /* @__PURE__ */ jsx(Button, {
3082
+ variant: "outline",
3083
+ onClick: handlePause,
3084
+ disabled: isPending || !selectedMonths,
3085
+ className: "w-full",
3086
+ children: pauseButtonText
3087
+ })
3088
+ ]
3089
+ }),
3090
+ errorMessage && /* @__PURE__ */ jsx("p", {
3091
+ className: "text-destructive text-left text-sm",
3092
+ children: errorMessage
3093
+ }),
3094
+ /* @__PURE__ */ jsxs(AlertDialogFooter, {
3095
+ className: "flex-col gap-2 sm:flex-row sm:justify-end",
3096
+ children: [/* @__PURE__ */ jsx(AlertDialogCancel, {
3097
+ disabled: isPending,
3098
+ children: cancelButtonText
3099
+ }), /* @__PURE__ */ jsx(Button, {
3100
+ variant: "destructive",
3101
+ onClick: handleConfirm,
3102
+ disabled: isPending,
3103
+ autoFocus: true,
3104
+ children: isPending ? "..." : actionButtonText
3105
+ })]
3106
+ })
3107
+ ] })
3034
3108
  });
3035
3109
  }
3036
3110
  //#endregion
3037
- //#region ../../subscriptions/ui/src/lib/parse-iso-date.ts
3038
- const ISO_DATE = "yyyy-MM-dd";
3039
- /**
3040
- * Parse an ISO date string as local midnight. Accepts either a bare
3041
- * "yyyy-MM-dd" or a full ISO timestamp — both are sliced to the date
3042
- * portion first so the result lands on the intended calendar day
3043
- * regardless of the viewer's timezone.
3044
- */
3045
- function parseIsoDate(value) {
3046
- return parse(value.slice(0, 10), ISO_DATE, /* @__PURE__ */ new Date());
3047
- }
3048
- //#endregion
3049
3111
  //#region ../../subscriptions/ui/src/components/pause-subscription-dialog.tsx
3050
3112
  function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, errorMessage, currentNextBillDate, billingInterval = 1, billingIntervalUnit = "month", title = "Pause subscription", description = "Are you sure you want to pause subscription?", actionText = "Pause" }) {
3051
- const [pauseType, setPauseType] = useState("specific");
3052
- const [selectedDate, setSelectedDate] = useState(void 0);
3053
- const [calendarOpen, setCalendarOpen] = useState(false);
3113
+ const [pauseType, setPauseType] = useState("indefinite");
3054
3114
  const [selectedOrderCount, setSelectedOrderCount] = useState(null);
3055
- const today = /* @__PURE__ */ new Date();
3056
- today.setHours(0, 0, 0, 0);
3057
- const minDate = addDays(today, 1);
3058
3115
  const orderCountOptions = Array.from({ length: 99 }, (_, i) => i + 1);
3059
3116
  const calculatedResumeDate = selectedOrderCount && currentNextBillDate ? calculateResumeDate(billingInterval, billingIntervalUnit, selectedOrderCount, currentNextBillDate) : null;
3060
3117
  useEffect(() => {
3061
3118
  if (!open) return;
3062
- setPauseType("specific");
3119
+ setPauseType("indefinite");
3063
3120
  setSelectedOrderCount(null);
3064
- if (currentNextBillDate) {
3065
- const initial = parseIsoDate(currentNextBillDate);
3066
- setSelectedDate(initial < minDate ? minDate : initial);
3067
- } else setSelectedDate(void 0);
3068
- }, [open, currentNextBillDate]);
3121
+ }, [open]);
3069
3122
  const handleConfirm = () => {
3070
3123
  if (pauseType === "indefinite") {
3071
3124
  onConfirm({ type: "indefinite" });
3072
3125
  return;
3073
3126
  }
3074
- if (pauseType === "order_count" && selectedOrderCount) {
3075
- onConfirm({
3076
- type: "order_count",
3077
- numberOfOrders: selectedOrderCount
3078
- });
3079
- return;
3080
- }
3081
- if (pauseType === "specific" && selectedDate) onConfirm({
3082
- type: "specific",
3083
- nextBillDate: format(selectedDate, "yyyy-MM-dd")
3127
+ if (pauseType === "order_count" && selectedOrderCount) onConfirm({
3128
+ type: "order_count",
3129
+ numberOfOrders: selectedOrderCount
3084
3130
  });
3085
3131
  };
3086
3132
  const handleDismiss = (next) => {
3087
3133
  if (!next) {
3088
- setPauseType("specific");
3134
+ setPauseType("indefinite");
3089
3135
  setSelectedOrderCount(null);
3090
- setSelectedDate(void 0);
3091
3136
  }
3092
3137
  onOpenChange(next);
3093
3138
  };
@@ -3097,29 +3142,24 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3097
3142
  /* @__PURE__ */ jsx("strong", { children: "Resume" }),
3098
3143
  " from your account."
3099
3144
  ] });
3100
- if (pauseType === "order_count" && !selectedOrderCount) return null;
3101
- let displayDate;
3102
- if (pauseType === "order_count" && calculatedResumeDate) displayDate = format(calculatedResumeDate, "MMMM d, yyyy");
3103
- else if (pauseType === "specific" && selectedDate) displayDate = format(selectedDate, "MMMM d, yyyy");
3104
- else if (currentNextBillDate) displayDate = format(parseIsoDate(currentNextBillDate), "MMMM d, yyyy");
3105
- else displayDate = "a future date";
3145
+ if (!selectedOrderCount) return null;
3106
3146
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
3107
3147
  "You won't be charged until your subscription resumes on",
3108
3148
  " ",
3109
3149
  /* @__PURE__ */ jsx("span", {
3110
3150
  className: "font-semibold",
3111
- children: displayDate
3151
+ children: calculatedResumeDate ? format(calculatedResumeDate, "MMMM d, yyyy") : "a future date"
3112
3152
  }),
3113
3153
  "."
3114
3154
  ] });
3115
3155
  })();
3116
- const isActionDisabled = pauseType === "specific" && !selectedDate || pauseType === "order_count" && !selectedOrderCount;
3156
+ const isActionDisabled = pauseType === "order_count" && !selectedOrderCount;
3117
3157
  return /* @__PURE__ */ jsx(Dialog, {
3118
3158
  open,
3119
3159
  onOpenChange: handleDismiss,
3120
3160
  children: /* @__PURE__ */ jsxs(DialogContent, {
3121
3161
  "aria-describedby": "pause-subscription-dialog-description",
3122
- className: "max-w-sm rounded md:w-90",
3162
+ className: "rounded",
3123
3163
  children: [
3124
3164
  /* @__PURE__ */ jsx(DialogHeader, {
3125
3165
  className: "flex flex-row justify-between",
@@ -3186,57 +3226,6 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3186
3226
  })]
3187
3227
  })]
3188
3228
  }),
3189
- /* @__PURE__ */ jsxs("div", {
3190
- className: "space-y-2",
3191
- children: [/* @__PURE__ */ jsxs("div", {
3192
- className: "flex items-center space-x-2",
3193
- children: [/* @__PURE__ */ jsx("input", {
3194
- id: "pause-until-date",
3195
- type: "radio",
3196
- checked: pauseType === "specific",
3197
- onChange: () => setPauseType("specific"),
3198
- className: "border-border accent-primary h-4 w-4 focus:ring-0"
3199
- }), /* @__PURE__ */ jsx(Label, {
3200
- htmlFor: "pause-until-date",
3201
- className: "text-foreground cursor-pointer text-sm font-medium",
3202
- children: "Pause until a specific date"
3203
- })]
3204
- }), pauseType === "specific" && /* @__PURE__ */ jsx("div", {
3205
- className: "ml-6",
3206
- children: /* @__PURE__ */ jsxs(Popover, {
3207
- open: calendarOpen,
3208
- onOpenChange: setCalendarOpen,
3209
- children: [/* @__PURE__ */ jsx(PopoverTrigger, {
3210
- asChild: true,
3211
- children: /* @__PURE__ */ jsxs(Button, {
3212
- variant: "outline",
3213
- 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"),
3214
- children: [selectedDate ? format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "mm/dd/yyyy" }), /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground ml-auto h-4 w-4" })]
3215
- })
3216
- }), /* @__PURE__ */ jsx(PopoverContent, {
3217
- className: "bg-popover w-auto rounded-md border p-0 shadow-lg",
3218
- align: "start",
3219
- sideOffset: 4,
3220
- style: { zIndex: 9999 },
3221
- children: /* @__PURE__ */ jsx(Calendar$1, {
3222
- mode: "single",
3223
- selected: selectedDate,
3224
- onSelect: (date) => {
3225
- setSelectedDate(date);
3226
- setCalendarOpen(false);
3227
- },
3228
- disabled: (date) => date < minDate,
3229
- defaultMonth: selectedDate ?? (currentNextBillDate ? parseIsoDate(currentNextBillDate) : void 0),
3230
- modifiersStyles: { selected: {
3231
- backgroundColor: "var(--primary)",
3232
- color: "var(--primary-foreground)"
3233
- } },
3234
- initialFocus: true
3235
- })
3236
- })]
3237
- })
3238
- })]
3239
- }),
3240
3229
  statusMessage && /* @__PURE__ */ jsx("div", {
3241
3230
  className: "text-muted-foreground text-xs",
3242
3231
  children: statusMessage
@@ -3251,12 +3240,13 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3251
3240
  /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsxs("div", {
3252
3241
  className: "flex w-full flex-row justify-between space-x-2",
3253
3242
  children: [/* @__PURE__ */ jsx(Button, {
3254
- className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
3243
+ variant: "outline",
3244
+ className: "h-10 min-w-[70px] rounded p-3",
3255
3245
  onClick: () => handleDismiss(false),
3256
3246
  children: "Cancel"
3257
3247
  }), /* @__PURE__ */ jsx(Button, {
3258
3248
  type: "button",
3259
- className: "bg-primary text-primary-foreground h-10 min-w-[70px] rounded p-3 hover:opacity-90 disabled:opacity-50",
3249
+ className: "h-10 min-w-[70px] rounded p-3",
3260
3250
  onClick: handleConfirm,
3261
3251
  disabled: isActionDisabled || isLoading,
3262
3252
  children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground h-5 w-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : actionText
@@ -3267,6 +3257,18 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
3267
3257
  });
3268
3258
  }
3269
3259
  //#endregion
3260
+ //#region ../../subscriptions/ui/src/lib/parse-iso-date.ts
3261
+ const ISO_DATE = "yyyy-MM-dd";
3262
+ /**
3263
+ * Parse an ISO date string as local midnight. Accepts either a bare
3264
+ * "yyyy-MM-dd" or a full ISO timestamp — both are sliced to the date
3265
+ * portion first so the result lands on the intended calendar day
3266
+ * regardless of the viewer's timezone.
3267
+ */
3268
+ function parseIsoDate(value) {
3269
+ return parse(value.slice(0, 10), ISO_DATE, /* @__PURE__ */ new Date());
3270
+ }
3271
+ //#endregion
3270
3272
  //#region ../../subscriptions/ui/src/components/resume-subscription-dialog.tsx
3271
3273
  function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, errorMessage, defaultNextBillDate, title = "Resume subscription", description = "Choose the date your subscription should resume.", actionText = "Resume" }) {
3272
3274
  const [selectedDate, setSelectedDate] = useState(void 0);
@@ -3294,7 +3296,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3294
3296
  onOpenChange: handleDismiss,
3295
3297
  children: /* @__PURE__ */ jsxs(DialogContent, {
3296
3298
  "aria-describedby": "resume-subscription-dialog-description",
3297
- className: "max-w-sm rounded md:w-90",
3299
+ className: "rounded",
3298
3300
  children: [
3299
3301
  /* @__PURE__ */ jsx(DialogHeader, {
3300
3302
  className: "flex flex-row justify-between",
@@ -3386,6 +3388,255 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
3386
3388
  });
3387
3389
  }
3388
3390
  //#endregion
3391
+ //#region ../../subscriptions/ui/src/components/edit-bill-date-dialog.tsx
3392
+ function advanceByInterval(date, interval, unit) {
3393
+ const step = Math.max(1, interval);
3394
+ switch (unit.toLowerCase()) {
3395
+ case "day": return addDays(date, step);
3396
+ case "week": return addWeeks(date, step);
3397
+ case "year": return addYears(date, step);
3398
+ default: return addMonths(date, step);
3399
+ }
3400
+ }
3401
+ const SUBSCRIPTION_COLORS = [
3402
+ "#3b82f6",
3403
+ "#f97316",
3404
+ "#10b981",
3405
+ "#a855f7",
3406
+ "#ec4899",
3407
+ "#eab308",
3408
+ "#14b8a6",
3409
+ "#ef4444",
3410
+ "#0ea5e9",
3411
+ "#84cc16"
3412
+ ];
3413
+ const MAX_PROJECTIONS_PER_SUB = 104;
3414
+ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMessage, currentNextBillDate, otherSubscriptions, onNavigateToSubscription, title = "Edit bill date", description = "Select a new date for your next bill.", actionText = "Save" }) {
3415
+ const [selectedDate, setSelectedDate] = useState(void 0);
3416
+ const [calendarOpen, setCalendarOpen] = useState(false);
3417
+ const today = /* @__PURE__ */ new Date();
3418
+ today.setHours(0, 0, 0, 0);
3419
+ const minDate = addDays(today, 1);
3420
+ const subscriptionsWithColor = useMemo(() => (otherSubscriptions ?? []).map((sub, idx) => ({
3421
+ ...sub,
3422
+ color: SUBSCRIPTION_COLORS[idx % SUBSCRIPTION_COLORS.length]
3423
+ })), [otherSubscriptions]);
3424
+ const billingColorsByDate = useMemo(() => {
3425
+ const m = /* @__PURE__ */ new Map();
3426
+ const horizon = addYears(/* @__PURE__ */ new Date(), 2);
3427
+ for (const sub of subscriptionsWithColor) {
3428
+ if (!sub.nextBillDate) continue;
3429
+ let d = parseIsoDate(sub.nextBillDate);
3430
+ let count = 0;
3431
+ while (!isAfter(d, horizon) && count < MAX_PROJECTIONS_PER_SUB) {
3432
+ const key = format(d, "yyyy-MM-dd");
3433
+ const arr = m.get(key) ?? [];
3434
+ arr.push(sub.color);
3435
+ m.set(key, arr);
3436
+ d = advanceByInterval(d, sub.billingInterval, sub.billingIntervalUnit);
3437
+ count++;
3438
+ }
3439
+ }
3440
+ return m;
3441
+ }, [subscriptionsWithColor]);
3442
+ const calendarComponents = useMemo(() => ({
3443
+ DayContent: ({ date }) => {
3444
+ const key = format(date, "yyyy-MM-dd");
3445
+ const colors = billingColorsByDate.get(key) ?? [];
3446
+ return /* @__PURE__ */ jsxs("div", {
3447
+ className: "flex h-full w-full flex-col items-center justify-center",
3448
+ children: [/* @__PURE__ */ jsx("span", {
3449
+ className: "leading-none",
3450
+ children: date.getDate()
3451
+ }), colors.length > 0 && /* @__PURE__ */ jsx("div", {
3452
+ className: "mt-0.5 flex items-center justify-center gap-0.5",
3453
+ children: colors.map((c, i) => /* @__PURE__ */ jsx("span", {
3454
+ className: "h-1 w-1 rounded-[1px]",
3455
+ style: { backgroundColor: c }
3456
+ }, `${key}-${i}`))
3457
+ })]
3458
+ });
3459
+ },
3460
+ IconLeft: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ jsx(ChevronLeft, {
3461
+ className: cn$1("h-4 w-4", iconClassName),
3462
+ ...iconProps
3463
+ }),
3464
+ IconRight: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ jsx(ChevronRight, {
3465
+ className: cn$1("h-4 w-4", iconClassName),
3466
+ ...iconProps
3467
+ })
3468
+ }), [billingColorsByDate]);
3469
+ useEffect(() => {
3470
+ if (!open) return;
3471
+ if (currentNextBillDate) {
3472
+ const initial = parseIsoDate(currentNextBillDate);
3473
+ setSelectedDate(initial < minDate ? minDate : initial);
3474
+ } else setSelectedDate(void 0);
3475
+ }, [open, currentNextBillDate]);
3476
+ const handleConfirm = () => {
3477
+ if (!selectedDate) return;
3478
+ onConfirm(format(selectedDate, "yyyy-MM-dd"));
3479
+ };
3480
+ const handleDismiss = (next) => {
3481
+ if (!next) setSelectedDate(void 0);
3482
+ onOpenChange(next);
3483
+ };
3484
+ const previewDate = selectedDate ? format(selectedDate, "MMMM d, yyyy") : currentNextBillDate ? format(parseIsoDate(currentNextBillDate), "MMMM d, yyyy") : "a future date";
3485
+ return /* @__PURE__ */ jsx(Dialog, {
3486
+ open,
3487
+ onOpenChange: handleDismiss,
3488
+ children: /* @__PURE__ */ jsxs(DialogContent, {
3489
+ "aria-describedby": "edit-bill-date-dialog-description",
3490
+ className: "rounded",
3491
+ children: [
3492
+ /* @__PURE__ */ jsx(DialogHeader, {
3493
+ className: "flex flex-row justify-between",
3494
+ children: /* @__PURE__ */ jsx(DialogTitle, {
3495
+ className: "text-md w-full text-left font-medium",
3496
+ children: title
3497
+ })
3498
+ }),
3499
+ /* @__PURE__ */ jsxs("div", {
3500
+ className: "space-y-4",
3501
+ children: [
3502
+ /* @__PURE__ */ jsx("p", {
3503
+ id: "edit-bill-date-dialog-description",
3504
+ className: "text-muted-foreground text-sm",
3505
+ children: description
3506
+ }),
3507
+ /* @__PURE__ */ jsxs("div", {
3508
+ className: "space-y-2",
3509
+ children: [/* @__PURE__ */ jsx(Label, {
3510
+ className: "text-foreground text-sm font-semibold",
3511
+ children: "Next bill date"
3512
+ }), /* @__PURE__ */ jsxs(Popover, {
3513
+ open: calendarOpen,
3514
+ onOpenChange: setCalendarOpen,
3515
+ children: [/* @__PURE__ */ jsx(PopoverTrigger, {
3516
+ asChild: true,
3517
+ children: /* @__PURE__ */ jsxs(Button, {
3518
+ variant: "outline",
3519
+ 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"),
3520
+ children: [selectedDate ? format(selectedDate, "MM/dd/yyyy") : /* @__PURE__ */ jsx("span", { children: "mm/dd/yyyy" }), /* @__PURE__ */ jsx(CalendarIcon, { className: "text-muted-foreground ml-auto h-4 w-4" })]
3521
+ })
3522
+ }), /* @__PURE__ */ jsx(PopoverContent, {
3523
+ className: "bg-popover z-[9999] w-auto rounded-md border p-0 shadow-lg",
3524
+ align: "start",
3525
+ sideOffset: 4,
3526
+ children: /* @__PURE__ */ jsx(Calendar$1, {
3527
+ mode: "single",
3528
+ selected: selectedDate,
3529
+ onSelect: (date) => {
3530
+ setSelectedDate(date);
3531
+ setCalendarOpen(false);
3532
+ },
3533
+ disabled: (date) => date < minDate,
3534
+ defaultMonth: selectedDate ?? (currentNextBillDate ? parseIsoDate(currentNextBillDate) : void 0),
3535
+ components: calendarComponents,
3536
+ initialFocus: true
3537
+ })
3538
+ })]
3539
+ })]
3540
+ }),
3541
+ selectedDate && /* @__PURE__ */ jsxs("div", {
3542
+ className: "text-muted-foreground text-xs",
3543
+ children: [
3544
+ "Your next bill will be on",
3545
+ " ",
3546
+ /* @__PURE__ */ jsx("span", {
3547
+ className: "font-semibold",
3548
+ children: previewDate
3549
+ }),
3550
+ "."
3551
+ ]
3552
+ }),
3553
+ subscriptionsWithColor.length > 0 && /* @__PURE__ */ jsxs("div", {
3554
+ className: "space-y-2",
3555
+ children: [/* @__PURE__ */ jsx(Label, {
3556
+ className: "text-foreground text-sm font-semibold",
3557
+ children: "Your other subscriptions"
3558
+ }), /* @__PURE__ */ jsx("div", {
3559
+ className: "border-border max-h-40 overflow-auto rounded-md border",
3560
+ children: /* @__PURE__ */ jsxs("table", {
3561
+ className: "w-full text-sm",
3562
+ children: [/* @__PURE__ */ jsx("thead", {
3563
+ className: "bg-muted text-muted-foreground sticky top-0",
3564
+ children: /* @__PURE__ */ jsxs("tr", { children: [
3565
+ /* @__PURE__ */ jsx("th", {
3566
+ className: "w-6 px-2 py-2",
3567
+ "aria-label": "Color"
3568
+ }),
3569
+ /* @__PURE__ */ jsx("th", {
3570
+ className: "px-3 py-2 text-left font-medium",
3571
+ children: "Product"
3572
+ }),
3573
+ /* @__PURE__ */ jsx("th", {
3574
+ className: "px-3 py-2 text-left font-medium",
3575
+ children: "Bill Date"
3576
+ })
3577
+ ] })
3578
+ }), /* @__PURE__ */ jsx("tbody", {
3579
+ className: "divide-border divide-y",
3580
+ children: subscriptionsWithColor.map((sub) => /* @__PURE__ */ jsxs("tr", { children: [
3581
+ /* @__PURE__ */ jsx("td", {
3582
+ className: "px-2 py-2",
3583
+ children: /* @__PURE__ */ jsx("span", {
3584
+ "aria-hidden": true,
3585
+ className: "inline-block h-2.5 w-2.5 rounded-full",
3586
+ style: { backgroundColor: sub.color }
3587
+ })
3588
+ }),
3589
+ /* @__PURE__ */ jsx("td", {
3590
+ className: "truncate px-3 py-2",
3591
+ title: sub.productTitle,
3592
+ children: onNavigateToSubscription ? /* @__PURE__ */ jsx("button", {
3593
+ type: "button",
3594
+ onClick: () => {
3595
+ onNavigateToSubscription(sub.token);
3596
+ handleDismiss(false);
3597
+ },
3598
+ className: "text-primary truncate text-left hover:underline",
3599
+ children: sub.productTitle
3600
+ }) : /* @__PURE__ */ jsx("span", {
3601
+ className: "text-foreground",
3602
+ children: sub.productTitle
3603
+ })
3604
+ }),
3605
+ /* @__PURE__ */ jsx("td", {
3606
+ className: "text-muted-foreground px-3 py-2",
3607
+ children: sub.nextBillDate ? format(parseIsoDate(sub.nextBillDate), "MMM d, yyyy") : "—"
3608
+ })
3609
+ ] }, sub.token))
3610
+ })]
3611
+ })
3612
+ })]
3613
+ })
3614
+ ]
3615
+ }),
3616
+ errorMessage && /* @__PURE__ */ jsx("p", {
3617
+ className: "text-destructive text-left text-sm",
3618
+ children: errorMessage
3619
+ }),
3620
+ /* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsxs("div", {
3621
+ className: "flex w-full flex-row justify-between space-x-2",
3622
+ children: [/* @__PURE__ */ jsx(Button, {
3623
+ variant: "outline",
3624
+ className: "h-10 min-w-[70px] rounded p-3",
3625
+ onClick: () => handleDismiss(false),
3626
+ children: "Cancel"
3627
+ }), /* @__PURE__ */ jsx(Button, {
3628
+ type: "button",
3629
+ className: "h-10 min-w-[70px] rounded p-3",
3630
+ onClick: handleConfirm,
3631
+ disabled: !selectedDate || isLoading,
3632
+ children: isLoading ? /* @__PURE__ */ jsx("div", { className: "border-primary-foreground h-5 w-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : actionText
3633
+ })]
3634
+ }) })
3635
+ ]
3636
+ })
3637
+ });
3638
+ }
3639
+ //#endregion
3389
3640
  //#region ../../subscriptions/ui/src/components/subscription-detail.tsx
3390
3641
  function SubscriptionDetailSkeleton() {
3391
3642
  return /* @__PURE__ */ jsxs("div", {
@@ -3451,7 +3702,7 @@ function SubscriptionDetailSkeleton() {
3451
3702
  })]
3452
3703
  });
3453
3704
  }
3454
- function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuantity = false, onQuantityChange, isUpdatingQuantity = false }) {
3705
+ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBillDate, canEditQuantity = false, onQuantityChange, isUpdatingQuantity = false }) {
3455
3706
  const variant = subscription.variant;
3456
3707
  const product = variant?.product;
3457
3708
  const quantity = displayQuantity ?? subscription.quantity;
@@ -3460,7 +3711,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuanti
3460
3711
  const discount = subscription.original_price != null ? subscription.original_price - subscription.price : 0;
3461
3712
  const subtotal = discount > 0 ? formatCurrency(subscription.original_price * quantity) : totalPrice;
3462
3713
  return /* @__PURE__ */ jsx("section", {
3463
- className: "bg-muted flex w-full flex-col items-center px-8 lg:col-span-4",
3714
+ className: "bg-muted flex w-full flex-col items-center rounded-lg px-8 lg:col-span-4 lg:self-start",
3464
3715
  children: /* @__PURE__ */ jsxs("div", {
3465
3716
  className: "flex w-full max-w-lg flex-col",
3466
3717
  children: [
@@ -3480,17 +3731,27 @@ function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuanti
3480
3731
  children: "Next Order Date"
3481
3732
  }), /* @__PURE__ */ jsx("div", {
3482
3733
  className: "text-foreground text-2xl font-bold",
3483
- children: getNextBillDisplay(subscription)
3734
+ children: getNextBillDisplay(displayNextBillDate ? {
3735
+ ...subscription,
3736
+ next_bill_date: displayNextBillDate
3737
+ } : subscription)
3484
3738
  })]
3485
3739
  }), /* @__PURE__ */ jsxs("div", {
3486
3740
  className: "pl-4",
3487
- children: [/* @__PURE__ */ jsx("div", {
3488
- className: "text-muted-foreground mb-1 text-sm",
3489
- children: "Next Bill Amount"
3490
- }), /* @__PURE__ */ jsx("div", {
3491
- className: "text-foreground text-2xl font-bold",
3492
- children: formatCurrency(subscription.price * quantity)
3493
- })]
3741
+ children: [
3742
+ /* @__PURE__ */ jsx("div", {
3743
+ className: "text-muted-foreground mb-1 text-sm",
3744
+ children: "Next Bill Amount"
3745
+ }),
3746
+ /* @__PURE__ */ jsx("div", {
3747
+ className: "text-foreground text-2xl font-bold",
3748
+ children: formatCurrency(subscription.price * quantity)
3749
+ }),
3750
+ (displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ jsx("div", {
3751
+ className: "text-muted-foreground mt-1 text-xs",
3752
+ children: formatDate(displayNextBillDate ?? subscription.next_bill_date ?? "")
3753
+ })
3754
+ ]
3494
3755
  })]
3495
3756
  }), /* @__PURE__ */ jsx("hr", { className: "border-border mt-4" })]
3496
3757
  })]
@@ -3603,7 +3864,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, canEditQuanti
3603
3864
  })
3604
3865
  });
3605
3866
  }
3606
- function SubscriptionManagementSection({ subscription, isActive, isPaused, isCancelled, isMutating, onSkip, onPause, onResume, onCancel, onReactivate, renderPaymentMethod }) {
3867
+ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCancelled, isMutating, onSkip, onPause, onResume, onCancel, onReactivate, onEditBillDate, displayNextBillDate, renderPaymentMethod, renderShippingAddress }) {
3607
3868
  const plan = subscription.subscription_plan;
3608
3869
  const quantity = subscription.quantity;
3609
3870
  const totalPrice = formatCurrency(subscription.price * quantity);
@@ -3635,22 +3896,22 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3635
3896
  }),
3636
3897
  isActive && /* @__PURE__ */ jsxs(Button, {
3637
3898
  variant: "outline",
3638
- onClick: onPause,
3899
+ onClick: onEditBillDate,
3639
3900
  disabled: isMutating,
3640
3901
  className: actionButtonClass,
3641
- children: [/* @__PURE__ */ jsx(Pause, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
3902
+ children: [/* @__PURE__ */ jsx(CalendarDays, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
3642
3903
  className: "truncate",
3643
- children: "Pause Subscription"
3904
+ children: "Edit Bill Date"
3644
3905
  })]
3645
3906
  }),
3646
- isPaused && /* @__PURE__ */ jsxs(Button, {
3907
+ isActive && /* @__PURE__ */ jsxs(Button, {
3647
3908
  variant: "outline",
3648
- onClick: onResume,
3909
+ onClick: onPause,
3649
3910
  disabled: isMutating,
3650
3911
  className: actionButtonClass,
3651
- children: [/* @__PURE__ */ jsx(Play, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
3912
+ children: [/* @__PURE__ */ jsx(Pause, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
3652
3913
  className: "truncate",
3653
- children: "Resume Subscription"
3914
+ children: "Pause Subscription"
3654
3915
  })]
3655
3916
  }),
3656
3917
  /* @__PURE__ */ jsxs(Button, {
@@ -3660,7 +3921,17 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3660
3921
  className: actionButtonClass,
3661
3922
  children: [/* @__PURE__ */ jsx(XCircle, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
3662
3923
  className: "truncate",
3663
- children: isCancelled ? "Cancelled" : "Cancel Subscription"
3924
+ children: isCancelled ? "Cancelled Subscription" : "Cancel Subscription"
3925
+ })]
3926
+ }),
3927
+ isPaused && /* @__PURE__ */ jsxs(Button, {
3928
+ variant: "outline",
3929
+ onClick: onResume,
3930
+ disabled: isMutating,
3931
+ className: actionButtonClass,
3932
+ children: [/* @__PURE__ */ jsx(Play, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ jsx("span", {
3933
+ className: "truncate",
3934
+ children: "Resume Subscription"
3664
3935
  })]
3665
3936
  }),
3666
3937
  isCancelled && /* @__PURE__ */ jsxs(Button, {
@@ -3702,13 +3973,20 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3702
3973
  }),
3703
3974
  /* @__PURE__ */ jsxs("div", {
3704
3975
  className: "flex-1 px-4",
3705
- children: [/* @__PURE__ */ jsx("div", {
3706
- className: "text-muted-foreground text-sm",
3707
- children: "Next Payment"
3708
- }), /* @__PURE__ */ jsx("div", {
3709
- className: "text-foreground font-medium",
3710
- children: totalPrice
3711
- })]
3976
+ children: [
3977
+ /* @__PURE__ */ jsx("div", {
3978
+ className: "text-muted-foreground text-sm",
3979
+ children: "Next Payment"
3980
+ }),
3981
+ /* @__PURE__ */ jsx("div", {
3982
+ className: "text-foreground font-medium",
3983
+ children: totalPrice
3984
+ }),
3985
+ (displayNextBillDate ?? subscription.next_bill_date) && /* @__PURE__ */ jsx("div", {
3986
+ className: "text-muted-foreground text-xs",
3987
+ children: formatDate(displayNextBillDate ?? subscription.next_bill_date ?? "")
3988
+ })
3989
+ ]
3712
3990
  }),
3713
3991
  subscription.last_bill_date && /* @__PURE__ */ jsxs("div", {
3714
3992
  className: "flex-1 pl-4 text-right",
@@ -3730,7 +4008,12 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3730
4008
  children: "Payment & Shipping"
3731
4009
  }), /* @__PURE__ */ jsxs("div", {
3732
4010
  className: "flex flex-col",
3733
- children: [subscription.address && /* @__PURE__ */ jsxs("div", {
4011
+ children: [renderShippingAddress ? renderShippingAddress({
4012
+ address: subscription.address ?? null,
4013
+ subscriptionToken: subscription.subscription_token,
4014
+ customerId: subscription.customer?.id ?? 0,
4015
+ countryCode: subscription.address?.country_code ?? "US"
4016
+ }) : subscription.address && /* @__PURE__ */ jsxs("div", {
3734
4017
  className: "border-border mb-6 border-b pb-4",
3735
4018
  children: [/* @__PURE__ */ jsx("div", {
3736
4019
  className: "text-muted-foreground mt-3 mb-1 text-sm",
@@ -3754,7 +4037,9 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3754
4037
  })]
3755
4038
  }), paymentMethod && (renderPaymentMethod ? renderPaymentMethod({
3756
4039
  paymentMethod,
3757
- subscriptionToken: subscription.subscription_token
4040
+ subscriptionToken: subscription.subscription_token,
4041
+ customerId: subscription.customer?.id ?? 0,
4042
+ countryCode: subscription.address?.country_code ?? "US"
3758
4043
  }) : /* @__PURE__ */ jsxs("div", {
3759
4044
  className: "border-border mb-6 border-b pb-4",
3760
4045
  children: [/* @__PURE__ */ jsx("div", {
@@ -3773,71 +4058,87 @@ function SubscriptionManagementSection({ subscription, isActive, isPaused, isCan
3773
4058
  })]
3774
4059
  }))]
3775
4060
  })]
3776
- }),
3777
- subscription.orders.length > 0 && /* @__PURE__ */ jsxs("div", {
3778
- className: "border-border mb-4 border-b pb-4",
3779
- children: [/* @__PURE__ */ jsx("h3", {
3780
- className: "text-foreground mb-3 text-sm/6 font-semibold",
3781
- children: "Order History"
3782
- }), /* @__PURE__ */ jsx("div", {
3783
- className: "overflow-x-auto",
3784
- children: /* @__PURE__ */ jsxs("table", {
3785
- className: "divide-border min-w-full divide-y text-sm",
3786
- children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
3787
- /* @__PURE__ */ jsx("th", {
3788
- className: "text-muted-foreground py-2 pr-3 text-left font-medium",
3789
- children: "Order"
3790
- }),
3791
- /* @__PURE__ */ jsx("th", {
3792
- className: "text-muted-foreground px-3 py-2 text-left font-medium",
3793
- children: "Date"
3794
- }),
3795
- /* @__PURE__ */ jsx("th", {
3796
- className: "text-muted-foreground px-3 py-2 text-left font-medium",
3797
- children: "Status"
3798
- }),
3799
- /* @__PURE__ */ jsx("th", {
3800
- className: "text-muted-foreground py-2 pl-3 text-right font-medium",
3801
- children: "Amount"
3802
- })
3803
- ] }) }), /* @__PURE__ */ jsx("tbody", {
3804
- className: "divide-border divide-y",
3805
- children: subscription.orders.map((order) => /* @__PURE__ */ jsxs("tr", { children: [
3806
- /* @__PURE__ */ jsx("td", {
3807
- className: "text-foreground py-2 pr-3 font-medium",
3808
- children: order.order_number ?? `#${order.id}`
3809
- }),
3810
- /* @__PURE__ */ jsx("td", {
3811
- className: "text-muted-foreground px-3 py-2",
3812
- children: formatDate(order.created_at.split("T")[0] ?? "")
3813
- }),
3814
- /* @__PURE__ */ jsx("td", {
3815
- className: "px-3 py-2",
3816
- children: /* @__PURE__ */ jsx(StatusPill, {
3817
- status: order.status,
3818
- children: startCase(order.status)
3819
- })
3820
- }),
3821
- /* @__PURE__ */ jsx("td", {
3822
- className: "text-foreground py-2 pl-3 text-right",
3823
- children: order.amount != null ? formatCurrency(Number(order.amount)) : "N/A"
3824
- })
3825
- ] }, order.id))
3826
- })]
3827
- })
3828
- })]
3829
4061
  })
3830
4062
  ]
3831
4063
  })
3832
4064
  });
3833
4065
  }
3834
- function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod }) {
4066
+ function OrderHistorySection({ subscription }) {
4067
+ if (subscription.orders.length === 0) return null;
4068
+ return /* @__PURE__ */ jsxs("section", {
4069
+ className: "mt-6 px-8 pt-6 pb-8",
4070
+ children: [/* @__PURE__ */ jsx("h3", {
4071
+ className: "text-foreground mb-3 text-sm/6 font-semibold",
4072
+ children: "Subscription Order History"
4073
+ }), /* @__PURE__ */ jsx("div", {
4074
+ className: "border-border overflow-x-auto rounded-md border",
4075
+ children: /* @__PURE__ */ jsxs("table", {
4076
+ className: "divide-border min-w-full divide-y text-sm",
4077
+ children: [/* @__PURE__ */ jsx("thead", {
4078
+ className: "bg-muted",
4079
+ children: /* @__PURE__ */ jsxs("tr", { children: [
4080
+ /* @__PURE__ */ jsx("th", {
4081
+ className: "text-muted-foreground py-2 pr-3 pl-3 text-left font-medium",
4082
+ children: "Order"
4083
+ }),
4084
+ /* @__PURE__ */ jsx("th", {
4085
+ className: "text-muted-foreground px-3 py-2 text-left font-medium",
4086
+ children: "Date"
4087
+ }),
4088
+ /* @__PURE__ */ jsx("th", {
4089
+ className: "text-muted-foreground px-3 py-2 text-left font-medium",
4090
+ children: "Status"
4091
+ }),
4092
+ /* @__PURE__ */ jsx("th", {
4093
+ className: "text-muted-foreground py-2 pr-3 pl-3 text-right font-medium",
4094
+ children: "Amount"
4095
+ })
4096
+ ] })
4097
+ }), /* @__PURE__ */ jsx("tbody", {
4098
+ className: "divide-border divide-y",
4099
+ children: subscription.orders.map((order) => /* @__PURE__ */ jsxs("tr", { children: [
4100
+ /* @__PURE__ */ jsx("td", {
4101
+ className: "text-foreground py-2 pr-3 pl-3 font-medium",
4102
+ children: order.order_number ?? `#${order.id}`
4103
+ }),
4104
+ /* @__PURE__ */ jsx("td", {
4105
+ className: "text-muted-foreground px-3 py-2",
4106
+ children: formatDate(order.created_at.split("T")[0] ?? "")
4107
+ }),
4108
+ /* @__PURE__ */ jsx("td", {
4109
+ className: "px-3 py-2",
4110
+ children: /* @__PURE__ */ jsx(StatusPill, {
4111
+ status: order.status,
4112
+ children: startCase(order.status)
4113
+ })
4114
+ }),
4115
+ /* @__PURE__ */ jsx("td", {
4116
+ className: "text-foreground py-2 pr-3 pl-3 text-right",
4117
+ children: order.amount != null ? formatCurrency(Number(order.amount)) : "N/A"
4118
+ })
4119
+ ] }, order.id))
4120
+ })]
4121
+ })
4122
+ })]
4123
+ });
4124
+ }
4125
+ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationError, onNavigateToSubscription, renderPaymentMethod, renderShippingAddress }) {
3835
4126
  const [showCancelModal, setShowCancelModal] = useState(false);
3836
4127
  const [showPauseModal, setShowPauseModal] = useState(false);
3837
4128
  const [showResumeModal, setShowResumeModal] = useState(false);
4129
+ const [showEditBillDateModal, setShowEditBillDateModal] = useState(false);
4130
+ const [pendingNextBillDate, setPendingNextBillDate] = useState(null);
3838
4131
  const { data, isLoading, error } = useSubscription(token);
3839
4132
  const subscription = data?.subscription;
3840
4133
  const customerId = subscription?.customer?.id ?? 0;
4134
+ const customerSubscriptionsQuery = useSubscriptions({ perPage: 100 }, { enabled: showEditBillDateModal });
4135
+ const otherSubscriptionsForBillDate = useMemo(() => (customerSubscriptionsQuery.data?.subscriptions ?? []).filter((s) => s.subscription_token !== token).map((s) => ({
4136
+ token: s.subscription_token,
4137
+ productTitle: s.variant?.product?.title ?? "Subscription",
4138
+ nextBillDate: s.next_bill_date,
4139
+ billingInterval: s.subscription_plan?.billing_interval ?? 1,
4140
+ billingIntervalUnit: s.subscription_plan?.billing_interval_unit ?? "month"
4141
+ })), [customerSubscriptionsQuery.data, token]);
3841
4142
  const pauseMutation = usePauseSubscription({
3842
4143
  onSuccess: () => onSuccess?.("Subscription paused"),
3843
4144
  onError: (err) => onMutationError?.("Failed to pause subscription", err)
@@ -3872,6 +4173,20 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3872
4173
  onMutationError?.("Failed to update quantity", err);
3873
4174
  }
3874
4175
  });
4176
+ const editBillDateMutation = useUpdateSubscriptionInfo({
4177
+ onSuccess: () => {
4178
+ onSuccess?.("Bill date updated");
4179
+ setShowEditBillDateModal(false);
4180
+ },
4181
+ onError: (err) => {
4182
+ setPendingNextBillDate(null);
4183
+ onMutationError?.("Failed to update bill date", err);
4184
+ }
4185
+ });
4186
+ const serverNextBillDate = data?.subscription.next_bill_date ?? null;
4187
+ useEffect(() => {
4188
+ if (pendingNextBillDate != null && serverNextBillDate != null && serverNextBillDate.startsWith(pendingNextBillDate)) setPendingNextBillDate(null);
4189
+ }, [pendingNextBillDate, serverNextBillDate]);
3875
4190
  const serverQuantity = data?.subscription.quantity;
3876
4191
  useEffect(() => {
3877
4192
  if (pendingQuantity != null && serverQuantity === pendingQuantity) setPendingQuantity(null);
@@ -3919,11 +4234,10 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3919
4234
  const isActive = subscription.status === "active";
3920
4235
  const isPaused = subscription.status === "paused";
3921
4236
  const isCancelled = subscription.status === "cancelled";
3922
- const isMutating = pauseMutation.isPending || resumeMutation.isPending || skipMutation.isPending || cancelMutation.isPending || reactivateMutation.isPending;
4237
+ const isMutating = pauseMutation.isPending || resumeMutation.isPending || skipMutation.isPending || cancelMutation.isPending || reactivateMutation.isPending || editBillDateMutation.isPending;
3923
4238
  const handlePauseConfirm = (selection) => {
3924
4239
  const pauseParams = { customerId };
3925
4240
  if (selection.type === "order_count") pauseParams.numberOfOrders = selection.numberOfOrders;
3926
- else if (selection.type === "specific") pauseParams.nextBillDate = selection.nextBillDate;
3927
4241
  pauseMutation.mutate({
3928
4242
  subscriptionToken: token,
3929
4243
  pauseParams
@@ -3966,6 +4280,7 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3966
4280
  children: [/* @__PURE__ */ jsx(SubscriptionItemsSection, {
3967
4281
  subscription,
3968
4282
  displayQuantity: pendingQuantity ?? void 0,
4283
+ displayNextBillDate: pendingNextBillDate ?? void 0,
3969
4284
  canEditQuantity: isActive,
3970
4285
  onQuantityChange: handleQuantityChange,
3971
4286
  isUpdatingQuantity: quantityMutation.isPending
@@ -3980,16 +4295,46 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
3980
4295
  onResume: () => setShowResumeModal(true),
3981
4296
  onCancel: () => setShowCancelModal(true),
3982
4297
  onReactivate: handleReactivate,
3983
- renderPaymentMethod
4298
+ onEditBillDate: () => setShowEditBillDateModal(true),
4299
+ displayNextBillDate: pendingNextBillDate ?? void 0,
4300
+ renderPaymentMethod,
4301
+ renderShippingAddress
3984
4302
  })]
3985
4303
  }),
3986
- /* @__PURE__ */ jsx(ConfirmDialog, {
3987
- title: "Cancel Subscription",
3988
- actionButtonText: "Cancel Subscription",
3989
- description: "Are you sure you want to cancel this subscription? You can reactivate it later.",
4304
+ /* @__PURE__ */ jsx(OrderHistorySection, { subscription }),
4305
+ /* @__PURE__ */ jsx(CancelSubscriptionDialog, {
3990
4306
  open: showCancelModal,
3991
- setOpen: setShowCancelModal,
3992
- onConfirm: handleCancel
4307
+ onOpenChange: setShowCancelModal,
4308
+ onConfirm: handleCancel,
4309
+ onPauseInstead: (months) => {
4310
+ setShowCancelModal(false);
4311
+ pauseMutation.mutate({
4312
+ subscriptionToken: token,
4313
+ pauseParams: {
4314
+ customerId,
4315
+ nextBillDate: format(addMonths(/* @__PURE__ */ new Date(), months), "yyyy-MM-dd")
4316
+ }
4317
+ });
4318
+ }
4319
+ }),
4320
+ /* @__PURE__ */ jsx(EditBillDateDialog, {
4321
+ open: showEditBillDateModal,
4322
+ onOpenChange: (next) => {
4323
+ if (!next) editBillDateMutation.reset();
4324
+ setShowEditBillDateModal(next);
4325
+ },
4326
+ onConfirm: (nextBillDate) => {
4327
+ setPendingNextBillDate(nextBillDate);
4328
+ editBillDateMutation.mutate({
4329
+ subscriptionToken: token,
4330
+ body: { next_bill_date: nextBillDate }
4331
+ });
4332
+ },
4333
+ isLoading: editBillDateMutation.isPending,
4334
+ errorMessage: editBillDateMutation.isError ? "Could not update the bill date. Please try a different date." : void 0,
4335
+ currentNextBillDate: subscription.next_bill_date,
4336
+ otherSubscriptions: otherSubscriptionsForBillDate,
4337
+ onNavigateToSubscription
3993
4338
  }),
3994
4339
  /* @__PURE__ */ jsx(PauseSubscriptionDialog, {
3995
4340
  open: showPauseModal,
@@ -4019,7 +4364,7 @@ function SubscriptionDetail({ token, onNotFound, onError, onSuccess, onMutationE
4019
4364
  }
4020
4365
  //#endregion
4021
4366
  //#region ../../subscriptions/ui/src/screens/SubscriptionDetailScreen.tsx
4022
- function SubscriptionDetailScreen$1({ token, onNavigateToList, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod }) {
4367
+ function SubscriptionDetailScreen$1({ token, onNavigateToList, onNavigateToSubscription, onNotFound, onError, onSuccess, onMutationError, renderPaymentMethod, renderShippingAddress }) {
4023
4368
  useScreenHeaderBreadcrumbs(useMemo(() => /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsxs(BreadcrumbList, {
4024
4369
  className: "text-lg",
4025
4370
  children: [
@@ -4046,7 +4391,9 @@ function SubscriptionDetailScreen$1({ token, onNavigateToList, onNotFound, onErr
4046
4391
  onError,
4047
4392
  onSuccess,
4048
4393
  onMutationError,
4049
- renderPaymentMethod
4394
+ onNavigateToSubscription,
4395
+ renderPaymentMethod,
4396
+ renderShippingAddress
4050
4397
  })
4051
4398
  });
4052
4399
  }
@@ -4301,28 +4648,19 @@ function PortalSubscriptionPaymentMethodSection({ paymentMethod: currentPaymentM
4301
4648
  isSubmitting: addCardMutation.isPending,
4302
4649
  countries: countryOptions,
4303
4650
  jwt: "",
4304
- renderAddressAutocomplete: ({ control }) => /* @__PURE__ */ jsx(PlainAddressInput, {
4651
+ renderAddressAutocomplete: ({ control, setValue, countryCode }) => /* @__PURE__ */ jsx(AddressAutocompleteInput, {
4305
4652
  control,
4306
- name: "address1"
4653
+ setValue,
4654
+ countryIso: countryCode,
4655
+ addressLineField: "address1",
4656
+ cityField: "city",
4657
+ stateField: "state",
4658
+ postalCodeField: "zip",
4659
+ placeholder: t("address_line_1")
4307
4660
  })
4308
4661
  })]
4309
4662
  });
4310
4663
  }
4311
- function PlainAddressInput({ control, name }) {
4312
- const { field } = useController({
4313
- control,
4314
- name
4315
- });
4316
- return /* @__PURE__ */ jsx("input", {
4317
- type: "text",
4318
- ref: field.ref,
4319
- value: field.value ?? "",
4320
- placeholder: "Address Line 1",
4321
- className: "border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
4322
- onChange: field.onChange,
4323
- onBlur: field.onBlur
4324
- });
4325
- }
4326
4664
  //#endregion
4327
4665
  //#region src/screens/SubscriptionDetailScreen.tsx
4328
4666
  function SubscriptionDetailScreen({ token, onToast }) {
@@ -4330,6 +4668,7 @@ function SubscriptionDetailScreen({ token, onToast }) {
4330
4668
  return /* @__PURE__ */ jsx(SubscriptionDetailScreen$1, {
4331
4669
  token,
4332
4670
  onNavigateToList: () => navigate("subscriptions"),
4671
+ onNavigateToSubscription: (nextToken) => navigate(`subscriptions/${nextToken}`),
4333
4672
  onNotFound: () => {
4334
4673
  onToast("Subscription not found", "warning");
4335
4674
  navigate("subscriptions");
@@ -4399,4 +4738,4 @@ const subscriptionsScreenPropertySchema = {
4399
4738
  //#endregion
4400
4739
  export { SubscriptionsScreen_exports as n, subscriptionsScreenPropertySchema as r, SubscriptionsScreen as t };
4401
4740
 
4402
- //# sourceMappingURL=SubscriptionsScreen-DK9-h3Cz.mjs.map
4741
+ //# sourceMappingURL=SubscriptionsScreen-Dh03oU0H.mjs.map