@fluid-app/portal-sdk 0.1.349 → 0.1.351

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 (281) hide show
  1. package/dist/{AddressAutocompleteInput-BVG7EOyI.cjs → AddressAutocompleteInput-C2Wx9yrV.cjs} +9 -9
  2. package/dist/AddressAutocompleteInput-C2Wx9yrV.cjs.map +1 -0
  3. package/dist/{AddressAutocompleteInput-Bre6nbGH.mjs → AddressAutocompleteInput-CgOFJKwF.mjs} +9 -9
  4. package/dist/AddressAutocompleteInput-CgOFJKwF.mjs.map +1 -0
  5. package/dist/{AlertWidget-BmOGoxTA.mjs → AlertWidget-DMwOt9u8.mjs} +3 -3
  6. package/dist/{AlertWidget-BmOGoxTA.mjs.map → AlertWidget-DMwOt9u8.mjs.map} +1 -1
  7. package/dist/{AppDownloadScreen-C78ggXk3.mjs → AppDownloadScreen-CBg2shvo.mjs} +5 -5
  8. package/dist/{AppDownloadScreen-C78ggXk3.mjs.map → AppDownloadScreen-CBg2shvo.mjs.map} +1 -1
  9. package/dist/{AppDownloadScreen-DIcwvAZ4.cjs → AppDownloadScreen-CMR1y4kP.cjs} +4 -4
  10. package/dist/{AppDownloadScreen-DIcwvAZ4.cjs.map → AppDownloadScreen-CMR1y4kP.cjs.map} +1 -1
  11. package/dist/{AppNavigationContext-BCj6iFxr.mjs → AppNavigationContext-B-wToUBG.mjs} +3 -3
  12. package/dist/AppNavigationContext-B-wToUBG.mjs.map +1 -0
  13. package/dist/{AppNavigationContext-CoNtdUrr.cjs → AppNavigationContext-CLOwdlpx.cjs} +2 -2
  14. package/dist/AppNavigationContext-CLOwdlpx.cjs.map +1 -0
  15. package/dist/{BulletListWidget-AIIf29RP.mjs → BulletListWidget-D--Mmasw.mjs} +2 -2
  16. package/dist/{BulletListWidget-AIIf29RP.mjs.map → BulletListWidget-D--Mmasw.mjs.map} +1 -1
  17. package/dist/{CalendarWidget-DW5wz5ke.cjs → CalendarWidget-Aa7H9M7f.cjs} +4 -4
  18. package/dist/{CalendarWidget-DW5wz5ke.cjs.map → CalendarWidget-Aa7H9M7f.cjs.map} +1 -1
  19. package/dist/{CalendarWidget-Dn55musX.mjs → CalendarWidget-Cx6KvkaG.mjs} +5 -5
  20. package/dist/{CalendarWidget-Dn55musX.mjs.map → CalendarWidget-Cx6KvkaG.mjs.map} +1 -1
  21. package/dist/{CardWidget-DsfLoyup.cjs → CardWidget-Caytu8qs.cjs} +3 -3
  22. package/dist/{CardWidget--S5FBquC.cjs → CardWidget-CqewqU5a.cjs} +2 -2
  23. package/dist/{CardWidget--S5FBquC.cjs.map → CardWidget-CqewqU5a.cjs.map} +1 -1
  24. package/dist/{CardWidget-ChfurL_z.mjs → CardWidget-DARqLSwy.mjs} +3 -3
  25. package/dist/{CardWidget-ChfurL_z.mjs.map → CardWidget-DARqLSwy.mjs.map} +1 -1
  26. package/dist/{CarouselWidget-SrCl4cSn.mjs → CarouselWidget-Bnl_iggA.mjs} +2 -2
  27. package/dist/{CarouselWidget-SrCl4cSn.mjs.map → CarouselWidget-Bnl_iggA.mjs.map} +1 -1
  28. package/dist/{CatchUpWidget-B_in7Bjq.mjs → CatchUpWidget-Bplozt8D.mjs} +5 -5
  29. package/dist/{CatchUpWidget-B_in7Bjq.mjs.map → CatchUpWidget-Bplozt8D.mjs.map} +1 -1
  30. package/dist/{CatchUpWidget-_ErrC-e8.cjs → CatchUpWidget-DEyXTEFj.cjs} +4 -4
  31. package/dist/{CatchUpWidget-_ErrC-e8.cjs.map → CatchUpWidget-DEyXTEFj.cjs.map} +1 -1
  32. package/dist/{ChartWidget-CIr3v8x6.mjs → ChartWidget-BPOZNKI_.mjs} +2 -2
  33. package/dist/{ChartWidget-CIr3v8x6.mjs.map → ChartWidget-BPOZNKI_.mjs.map} +1 -1
  34. package/dist/{ContactsScreen-f3dXV198.cjs → ContactsScreen-BFbWTMu9.cjs} +4 -4
  35. package/dist/{ContactsScreen-f3dXV198.cjs.map → ContactsScreen-BFbWTMu9.cjs.map} +1 -1
  36. package/dist/{ContactsScreen-DJ8O35Pl.mjs → ContactsScreen-CnLSICv5.mjs} +5 -5
  37. package/dist/{ContactsScreen-DJ8O35Pl.mjs.map → ContactsScreen-CnLSICv5.mjs.map} +1 -1
  38. package/dist/{ContactsScreen-CVmYvRZi.cjs → ContactsScreen-DQjdfcAV.cjs} +5 -5
  39. package/dist/{ContainerWidget-BHWPtBmF.mjs → ContainerWidget-Bv0f8-TC.mjs} +3 -3
  40. package/dist/{ContainerWidget-BHWPtBmF.mjs.map → ContainerWidget-Bv0f8-TC.mjs.map} +1 -1
  41. package/dist/{ContainerWidget-Cf_D4TAi.cjs → ContainerWidget-CF6VDxd8.cjs} +2 -2
  42. package/dist/{ContainerWidget-Cf_D4TAi.cjs.map → ContainerWidget-CF6VDxd8.cjs.map} +1 -1
  43. package/dist/ContainerWidget-D3JoA0IP.cjs +8 -0
  44. package/dist/{CustomersScreen-DGBwaZrt.mjs → CustomersScreen-BHqlHdHZ.mjs} +3 -3
  45. package/dist/{CustomersScreen-DGBwaZrt.mjs.map → CustomersScreen-BHqlHdHZ.mjs.map} +1 -1
  46. package/dist/{CustomersScreen-BXvWK7Y1.cjs → CustomersScreen-C8b3P79M.cjs} +2 -2
  47. package/dist/{CustomersScreen-BXvWK7Y1.cjs.map → CustomersScreen-C8b3P79M.cjs.map} +1 -1
  48. package/dist/{EmbedWidget-B1gWxgsn.cjs → EmbedWidget-B-bkknog.cjs} +3 -3
  49. package/dist/EmbedWidget-B-bkknog.cjs.map +1 -0
  50. package/dist/{EmbedWidget-JVbp9wAL.mjs → EmbedWidget-DRfjHvRs.mjs} +4 -4
  51. package/dist/EmbedWidget-DRfjHvRs.mjs.map +1 -0
  52. package/dist/{FluidProvider-mimp_bb9.mjs → FluidProvider-B4Za_Bnw.mjs} +69 -69
  53. package/dist/FluidProvider-B4Za_Bnw.mjs.map +1 -0
  54. package/dist/{FluidProvider-B9YdRuHR.cjs → FluidProvider-DvHJZkGi.cjs} +38 -38
  55. package/dist/FluidProvider-DvHJZkGi.cjs.map +1 -0
  56. package/dist/{ImageWidget-B3ZTuy4v.mjs → ImageWidget-C7nfRJ6p.mjs} +2 -2
  57. package/dist/{ImageWidget-B3ZTuy4v.mjs.map → ImageWidget-C7nfRJ6p.mjs.map} +1 -1
  58. package/dist/{LayoutWidget-3G-w-YLz.cjs → LayoutWidget-6_Huueb4.cjs} +3 -3
  59. package/dist/{LayoutWidget-CrZG6Ipw.mjs → LayoutWidget-CSFWeXYY.mjs} +3 -3
  60. package/dist/{LayoutWidget-CrZG6Ipw.mjs.map → LayoutWidget-CSFWeXYY.mjs.map} +1 -1
  61. package/dist/{LayoutWidget-CG-dWz_c.cjs → LayoutWidget-DD1ZqWXg.cjs} +2 -2
  62. package/dist/{LayoutWidget-CG-dWz_c.cjs.map → LayoutWidget-DD1ZqWXg.cjs.map} +1 -1
  63. package/dist/{LinkWidget-fPowKN73.mjs → LinkWidget-DI2Uod5O.mjs} +2 -2
  64. package/dist/{LinkWidget-fPowKN73.mjs.map → LinkWidget-DI2Uod5O.mjs.map} +1 -1
  65. package/dist/{ListWidget-CQuNRg_g.mjs → ListWidget-BdUhs2fo.mjs} +2 -2
  66. package/dist/{ListWidget-CQuNRg_g.mjs.map → ListWidget-BdUhs2fo.mjs.map} +1 -1
  67. package/dist/MessagingScreen-B3LmRgr4.mjs +50 -0
  68. package/dist/MessagingScreen-B6kMcx8v.cjs +52 -0
  69. package/dist/{MessagingScreen-Bh9jlM1C.mjs → MessagingScreen-CCVF9paI.mjs} +10 -10
  70. package/dist/MessagingScreen-CCVF9paI.mjs.map +1 -0
  71. package/dist/{MessagingScreen-Cjyz_2T8.cjs → MessagingScreen-DQYJZhz6.cjs} +8 -8
  72. package/dist/MessagingScreen-DQYJZhz6.cjs.map +1 -0
  73. package/dist/{MySiteScreen-D3rkI2UJ.cjs → MySiteScreen-BZnLxHAq.cjs} +6 -6
  74. package/dist/{MySiteScreen-D3rkI2UJ.cjs.map → MySiteScreen-BZnLxHAq.cjs.map} +1 -1
  75. package/dist/MySiteScreen-CYGVxzCE.cjs +11 -0
  76. package/dist/{MySiteScreen-BC_K8gIq.mjs → MySiteScreen-tKgO4G0B.mjs} +7 -7
  77. package/dist/{MySiteScreen-BC_K8gIq.mjs.map → MySiteScreen-tKgO4G0B.mjs.map} +1 -1
  78. package/dist/{MySiteWidget-D6QyWuzN.cjs → MySiteWidget-CabBtq5C.cjs} +4 -4
  79. package/dist/{MySiteWidget-D6QyWuzN.cjs.map → MySiteWidget-CabBtq5C.cjs.map} +1 -1
  80. package/dist/{MySiteWidget-BLALS8Ve.mjs → MySiteWidget-ivytLi6H.mjs} +5 -5
  81. package/dist/{MySiteWidget-BLALS8Ve.mjs.map → MySiteWidget-ivytLi6H.mjs.map} +1 -1
  82. package/dist/{NestedWidget-DuNuNaeT.mjs → NestedWidget-gqdWZS9Q.mjs} +2 -2
  83. package/dist/{NestedWidget-DuNuNaeT.mjs.map → NestedWidget-gqdWZS9Q.mjs.map} +1 -1
  84. package/dist/{OrdersScreen-ByeTkK9T.cjs → OrdersScreen-BY3EQX7P.cjs} +11 -11
  85. package/dist/OrdersScreen-BY3EQX7P.cjs.map +1 -0
  86. package/dist/{OrdersScreen-2ObhVMae.mjs → OrdersScreen-D9ztzvIZ.mjs} +12 -12
  87. package/dist/OrdersScreen-D9ztzvIZ.mjs.map +1 -0
  88. package/dist/OrdersScreen-DCbX1m9M.cjs +50 -0
  89. package/dist/OrdersScreen-ze31P1y2.mjs +48 -0
  90. package/dist/{PointsWidget-BvGANrJq.mjs → PointsWidget-BJlOIK6o.mjs} +5 -5
  91. package/dist/{PointsWidget-BvGANrJq.mjs.map → PointsWidget-BJlOIK6o.mjs.map} +1 -1
  92. package/dist/{PointsWidget-Byd2-eEi.cjs → PointsWidget-Him7U2k2.cjs} +4 -4
  93. package/dist/{PointsWidget-Byd2-eEi.cjs.map → PointsWidget-Him7U2k2.cjs.map} +1 -1
  94. package/dist/{PortalTenantClientProvider-Bpm-CZq1.cjs → PortalTenantClientProvider-C0eJp8MN.cjs} +3 -3
  95. package/dist/PortalTenantClientProvider-C0eJp8MN.cjs.map +1 -0
  96. package/dist/{PortalTenantClientProvider-BmRtQAbi.mjs → PortalTenantClientProvider-DVClpfbi.mjs} +4 -4
  97. package/dist/PortalTenantClientProvider-DVClpfbi.mjs.map +1 -0
  98. package/dist/ProfileScreen-BDVGVcuz.cjs +53 -0
  99. package/dist/{ProfileScreen-CcniZNXj.mjs → ProfileScreen-BKAjNpTa.mjs} +8 -8
  100. package/dist/{ProfileScreen-CcniZNXj.mjs.map → ProfileScreen-BKAjNpTa.mjs.map} +1 -1
  101. package/dist/{ProfileScreen-ivI8NlTu.cjs → ProfileScreen-C8oqPt_i.cjs} +8 -8
  102. package/dist/{ProfileScreen-ivI8NlTu.cjs.map → ProfileScreen-C8oqPt_i.cjs.map} +1 -1
  103. package/dist/ProfileScreen-DYQklavp.mjs +51 -0
  104. package/dist/{QuickLinksWidget-D8LqZkUS.mjs → QuickLinksWidget-DJUI7r5_.mjs} +2 -2
  105. package/dist/{QuickLinksWidget-D8LqZkUS.mjs.map → QuickLinksWidget-DJUI7r5_.mjs.map} +1 -1
  106. package/dist/{QuickShareWidget-BJpqzZp0.mjs → QuickShareWidget-B7DhQOyt.mjs} +2 -2
  107. package/dist/{QuickShareWidget-BJpqzZp0.mjs.map → QuickShareWidget-B7DhQOyt.mjs.map} +1 -1
  108. package/dist/{RecentActivityWidget-ClgOlTXl.mjs → RecentActivityWidget-BMGeLSUa.mjs} +5 -5
  109. package/dist/{RecentActivityWidget-ClgOlTXl.mjs.map → RecentActivityWidget-BMGeLSUa.mjs.map} +1 -1
  110. package/dist/{RecentActivityWidget-BYzAzBI-.cjs → RecentActivityWidget-DvrmBGsD.cjs} +4 -4
  111. package/dist/{RecentActivityWidget-BYzAzBI-.cjs.map → RecentActivityWidget-DvrmBGsD.cjs.map} +1 -1
  112. package/dist/{ScreenHeaderContext-BiGgRqjY.cjs → ScreenHeaderContext-VOp8pVHr.cjs} +4 -4
  113. package/dist/ScreenHeaderContext-VOp8pVHr.cjs.map +1 -0
  114. package/dist/{ScreenHeaderContext-BjpQOCck.mjs → ScreenHeaderContext-cuVMk00X.mjs} +5 -5
  115. package/dist/ScreenHeaderContext-cuVMk00X.mjs.map +1 -0
  116. package/dist/{ScreenRenderer-TobkTBMC.mjs → ScreenRenderer-D3zNFSr3.mjs} +4 -4
  117. package/dist/ScreenRenderer-D3zNFSr3.mjs.map +1 -0
  118. package/dist/{ScreenRenderer-CLDJUinO.cjs → ScreenRenderer-IMkMMnUJ.cjs} +3 -3
  119. package/dist/ScreenRenderer-IMkMMnUJ.cjs.map +1 -0
  120. package/dist/{SearchSort-B5hq2j-l.cjs → SearchSort-BjjBpuEi.cjs} +2 -2
  121. package/dist/SearchSort-BjjBpuEi.cjs.map +1 -0
  122. package/dist/{SearchSort-CMUL0qt3.mjs → SearchSort-C6RV6d9g.mjs} +3 -3
  123. package/dist/SearchSort-C6RV6d9g.mjs.map +1 -0
  124. package/dist/{SeparatorWidget-CDvDjL-k.mjs → SeparatorWidget-CGFzy35l.mjs} +2 -2
  125. package/dist/{SeparatorWidget-CDvDjL-k.mjs.map → SeparatorWidget-CGFzy35l.mjs.map} +1 -1
  126. package/dist/{ShareablesScreen-COg_WpdP.cjs → ShareablesScreen-B0vxU7i6.cjs} +20 -20
  127. package/dist/ShareablesScreen-B0vxU7i6.cjs.map +1 -0
  128. package/dist/{ShareablesScreen-C9EmRZJW.mjs → ShareablesScreen-CefIC5H8.mjs} +22 -22
  129. package/dist/ShareablesScreen-CefIC5H8.mjs.map +1 -0
  130. package/dist/ShareablesScreen-Cs8iC1qk.mjs +15 -0
  131. package/dist/ShareablesScreen-igzq70Xz.cjs +17 -0
  132. package/dist/{ShopScreen-83zufos8.cjs → ShopScreen-BO1eOqyu.cjs} +10 -10
  133. package/dist/ShopScreen-BO1eOqyu.cjs.map +1 -0
  134. package/dist/ShopScreen-DY10zu6I.mjs +48 -0
  135. package/dist/{ShopScreen-DCEMk8Rw.mjs → ShopScreen-IJalLKdV.mjs} +10 -10
  136. package/dist/ShopScreen-IJalLKdV.mjs.map +1 -0
  137. package/dist/ShopScreen-PMwvVuff.cjs +50 -0
  138. package/dist/{ShopWidget-Cmx4Pb6Q.cjs → ShopWidget-BWURiWyx.cjs} +4 -4
  139. package/dist/{ShopWidget-Cmx4Pb6Q.cjs.map → ShopWidget-BWURiWyx.cjs.map} +1 -1
  140. package/dist/{ShopWidget-C76SSZwW.cjs → ShopWidget-C4jeRRut.cjs} +4 -4
  141. package/dist/{ShopWidget-BzAuvfyC.mjs → ShopWidget-Cqnwq0AG.mjs} +5 -5
  142. package/dist/{ShopWidget-BzAuvfyC.mjs.map → ShopWidget-Cqnwq0AG.mjs.map} +1 -1
  143. package/dist/{SpacerWidget-B0l19UqF.mjs → SpacerWidget-BhxIaqYF.mjs} +2 -2
  144. package/dist/{SpacerWidget-B0l19UqF.mjs.map → SpacerWidget-BhxIaqYF.mjs.map} +1 -1
  145. package/dist/SubscriptionsScreen-BbUhL-zf.mjs +50 -0
  146. package/dist/{SubscriptionsScreen-3LGH99fz.cjs → SubscriptionsScreen-CihWk-dF.cjs} +26 -26
  147. package/dist/SubscriptionsScreen-CihWk-dF.cjs.map +1 -0
  148. package/dist/{SubscriptionsScreen-Dm26Ia-8.cjs → SubscriptionsScreen-DBbYVWWt.cjs} +27 -27
  149. package/dist/{SubscriptionsScreen-DKyciF92.mjs → SubscriptionsScreen-d527tZfc.mjs} +27 -27
  150. package/dist/SubscriptionsScreen-d527tZfc.mjs.map +1 -0
  151. package/dist/{TableWidget-CpHI9CGQ.mjs → TableWidget-Dwud4Fif.mjs} +2 -2
  152. package/dist/{TableWidget-CpHI9CGQ.mjs.map → TableWidget-Dwud4Fif.mjs.map} +1 -1
  153. package/dist/{TextWidget-Jy-Ktqje.mjs → TextWidget-B5ZtQMX-.mjs} +2 -2
  154. package/dist/{TextWidget-Jy-Ktqje.mjs.map → TextWidget-B5ZtQMX-.mjs.map} +1 -1
  155. package/dist/ToDoWidget-BJ2Ip97m.cjs +11 -0
  156. package/dist/{ToDoWidget-BaWksZpJ.mjs → ToDoWidget-Bnml3xLS.mjs} +6 -6
  157. package/dist/{ToDoWidget-BaWksZpJ.mjs.map → ToDoWidget-Bnml3xLS.mjs.map} +1 -1
  158. package/dist/{ToDoWidget-CZh5a5-z.cjs → ToDoWidget-C3Ob2TP2.cjs} +5 -5
  159. package/dist/{ToDoWidget-CZh5a5-z.cjs.map → ToDoWidget-C3Ob2TP2.cjs.map} +1 -1
  160. package/dist/{UpgradeScreen-VpfRqKdO.cjs → UpgradeScreen-B40dCeub.cjs} +3 -3
  161. package/dist/{UpgradeScreen-VpfRqKdO.cjs.map → UpgradeScreen-B40dCeub.cjs.map} +1 -1
  162. package/dist/{UpgradeScreen-C55rEuCN.cjs → UpgradeScreen-CbdTRnIj.cjs} +3 -3
  163. package/dist/{UpgradeScreen-x9TdC5aR.mjs → UpgradeScreen-GzkZOOR4.mjs} +4 -4
  164. package/dist/{UpgradeScreen-x9TdC5aR.mjs.map → UpgradeScreen-GzkZOOR4.mjs.map} +1 -1
  165. package/dist/{VideoWidget-DP-VHt2s.mjs → VideoWidget-Cm3UQ3-Z.mjs} +2 -2
  166. package/dist/{VideoWidget-DP-VHt2s.mjs.map → VideoWidget-Cm3UQ3-Z.mjs.map} +1 -1
  167. package/dist/{countries-api-context-G-NW4BoH.cjs → countries-api-context-16PZpF7O.cjs} +2 -2
  168. package/dist/countries-api-context-16PZpF7O.cjs.map +1 -0
  169. package/dist/{countries-api-context-DScC_39w.mjs → countries-api-context-Donus2X5.mjs} +3 -3
  170. package/dist/countries-api-context-Donus2X5.mjs.map +1 -0
  171. package/dist/{error-state-DvzIn9Tz.mjs → error-state-BUe589mD.mjs} +3 -3
  172. package/dist/error-state-BUe589mD.mjs.map +1 -0
  173. package/dist/{error-state-DJq7C-23.cjs → error-state-CU87JUpz.cjs} +2 -2
  174. package/dist/error-state-CU87JUpz.cjs.map +1 -0
  175. package/dist/{es-jA6aVeLD.mjs → es-C19weaa-.mjs} +2 -2
  176. package/dist/{es-jA6aVeLD.mjs.map → es-C19weaa-.mjs.map} +1 -1
  177. package/dist/index.cjs +66 -66
  178. package/dist/index.cjs.map +1 -1
  179. package/dist/index.mjs +83 -83
  180. package/dist/index.mjs.map +1 -1
  181. package/dist/{mysite-api-context-kUTM3GNG.mjs → mysite-api-context-CoLr9vIf.mjs} +3 -3
  182. package/dist/mysite-api-context-CoLr9vIf.mjs.map +1 -0
  183. package/dist/{mysite-api-context-CilZcDS4.cjs → mysite-api-context-DtEXblIV.cjs} +2 -2
  184. package/dist/mysite-api-context-DtEXblIV.cjs.map +1 -0
  185. package/dist/{preview-context-D9ZzEfWh.mjs → preview-context-BXEGWx9T.mjs} +3 -3
  186. package/dist/preview-context-BXEGWx9T.mjs.map +1 -0
  187. package/dist/{preview-context-BWCl-xyj.cjs → preview-context-DrXkIImI.cjs} +2 -2
  188. package/dist/preview-context-DrXkIImI.cjs.map +1 -0
  189. package/dist/{registry-context-BKvTiuXB.mjs → registry-context-CcoVxCii.mjs} +3 -3
  190. package/dist/{registry-context-BKvTiuXB.mjs.map → registry-context-CcoVxCii.mjs.map} +1 -1
  191. package/dist/{registry-context-DJ5xiVnt.cjs → registry-context-Q_1Iq2Ea.cjs} +2 -2
  192. package/dist/{registry-context-DJ5xiVnt.cjs.map → registry-context-Q_1Iq2Ea.cjs.map} +1 -1
  193. package/dist/{static-dict-adapter-JAau5LHb.cjs → static-dict-adapter-BLq4QzCI.cjs} +2 -2
  194. package/dist/static-dict-adapter-BLq4QzCI.cjs.map +1 -0
  195. package/dist/{static-dict-adapter-DjCpubZc.mjs → static-dict-adapter-DRBq3ndO.mjs} +3 -3
  196. package/dist/static-dict-adapter-DRBq3ndO.mjs.map +1 -0
  197. package/dist/{store-api-context-DViwxyG4.mjs → store-api-context-B_vtKkXO.mjs} +3 -3
  198. package/dist/store-api-context-B_vtKkXO.mjs.map +1 -0
  199. package/dist/{store-api-context-D1gZn22Z.cjs → store-api-context-CGH3YsZB.cjs} +2 -2
  200. package/dist/store-api-context-CGH3YsZB.cjs.map +1 -0
  201. package/dist/{task-composer-form-D_Pbl6qk.mjs → task-composer-form-CZgRqbIc.mjs} +4 -4
  202. package/dist/task-composer-form-CZgRqbIc.mjs.map +1 -0
  203. package/dist/{task-composer-form-BEZGTBBZ.cjs → task-composer-form-Cz8hpMTT.cjs} +3 -3
  204. package/dist/task-composer-form-Cz8hpMTT.cjs.map +1 -0
  205. package/dist/{translation-api-context-factory-BSRK6Z50.cjs → translation-api-context-factory-CjRDqIhF.cjs} +2 -2
  206. package/dist/translation-api-context-factory-CjRDqIhF.cjs.map +1 -0
  207. package/dist/{translation-api-context-factory-CJrVq_EB.mjs → translation-api-context-factory-DFr9yJ6Q.mjs} +3 -3
  208. package/dist/translation-api-context-factory-DFr9yJ6Q.mjs.map +1 -0
  209. package/dist/{use-account-CQ-mhA3W.cjs → use-account-DltRHEwC.cjs} +2 -2
  210. package/dist/{use-account-CQ-mhA3W.cjs.map → use-account-DltRHEwC.cjs.map} +1 -1
  211. package/dist/{use-account-CwGoFpwg.mjs → use-account-Dm6Svko1.mjs} +2 -2
  212. package/dist/{use-account-CwGoFpwg.mjs.map → use-account-Dm6Svko1.mjs.map} +1 -1
  213. package/dist/{use-mysite-portal-ChDJ4z34.mjs → use-mysite-portal-3Tn3bFoE.mjs} +2 -2
  214. package/dist/{use-mysite-portal-ChDJ4z34.mjs.map → use-mysite-portal-3Tn3bFoE.mjs.map} +1 -1
  215. package/dist/{use-mysite-portal-CH9ZQROw.cjs → use-mysite-portal-D3X51_Ax.cjs} +2 -2
  216. package/dist/{use-mysite-portal-CH9ZQROw.cjs.map → use-mysite-portal-D3X51_Ax.cjs.map} +1 -1
  217. package/dist/{use-navigation-parent-DvHbbMB0.mjs → use-navigation-parent-GjQMvU4i.mjs} +2 -2
  218. package/dist/{use-navigation-parent-DvHbbMB0.mjs.map → use-navigation-parent-GjQMvU4i.mjs.map} +1 -1
  219. package/dist/{use-navigation-parent-DQ8CiN9L.cjs → use-navigation-parent-q-la1wD2.cjs} +2 -2
  220. package/dist/{use-navigation-parent-DQ8CiN9L.cjs.map → use-navigation-parent-q-la1wD2.cjs.map} +1 -1
  221. package/dist/{use-store-cwcCLxl_.mjs → use-store-C6KYHvRw.mjs} +2 -2
  222. package/dist/{use-store-cwcCLxl_.mjs.map → use-store-C6KYHvRw.mjs.map} +1 -1
  223. package/dist/{use-store-lOOUcpRT.cjs → use-store-j_6I4DU4.cjs} +2 -2
  224. package/dist/{use-store-lOOUcpRT.cjs.map → use-store-j_6I4DU4.cjs.map} +1 -1
  225. package/package.json +14 -14
  226. package/dist/AddressAutocompleteInput-BVG7EOyI.cjs.map +0 -1
  227. package/dist/AddressAutocompleteInput-Bre6nbGH.mjs.map +0 -1
  228. package/dist/AppNavigationContext-BCj6iFxr.mjs.map +0 -1
  229. package/dist/AppNavigationContext-CoNtdUrr.cjs.map +0 -1
  230. package/dist/ContainerWidget-CyDVJu83.cjs +0 -8
  231. package/dist/EmbedWidget-B1gWxgsn.cjs.map +0 -1
  232. package/dist/EmbedWidget-JVbp9wAL.mjs.map +0 -1
  233. package/dist/FluidProvider-B9YdRuHR.cjs.map +0 -1
  234. package/dist/FluidProvider-mimp_bb9.mjs.map +0 -1
  235. package/dist/MessagingScreen-Bh9jlM1C.mjs.map +0 -1
  236. package/dist/MessagingScreen-CGC0pGpk.cjs +0 -52
  237. package/dist/MessagingScreen-Cjyz_2T8.cjs.map +0 -1
  238. package/dist/MessagingScreen-DokUVEGh.mjs +0 -50
  239. package/dist/MySiteScreen-DiCU6P9d.cjs +0 -11
  240. package/dist/OrdersScreen-2ObhVMae.mjs.map +0 -1
  241. package/dist/OrdersScreen-ByeTkK9T.cjs.map +0 -1
  242. package/dist/OrdersScreen-C9tzay1G.mjs +0 -49
  243. package/dist/OrdersScreen-D_NloZz5.cjs +0 -50
  244. package/dist/PortalTenantClientProvider-BmRtQAbi.mjs.map +0 -1
  245. package/dist/PortalTenantClientProvider-Bpm-CZq1.cjs.map +0 -1
  246. package/dist/ProfileScreen-ChzYkXqY.cjs +0 -53
  247. package/dist/ProfileScreen-Dy3dR_6P.mjs +0 -51
  248. package/dist/ScreenHeaderContext-BiGgRqjY.cjs.map +0 -1
  249. package/dist/ScreenHeaderContext-BjpQOCck.mjs.map +0 -1
  250. package/dist/ScreenRenderer-CLDJUinO.cjs.map +0 -1
  251. package/dist/ScreenRenderer-TobkTBMC.mjs.map +0 -1
  252. package/dist/SearchSort-B5hq2j-l.cjs.map +0 -1
  253. package/dist/SearchSort-CMUL0qt3.mjs.map +0 -1
  254. package/dist/ShareablesScreen-C9EmRZJW.mjs.map +0 -1
  255. package/dist/ShareablesScreen-COg_WpdP.cjs.map +0 -1
  256. package/dist/ShareablesScreen-CoFM63kh.cjs +0 -17
  257. package/dist/ShareablesScreen-OSxAcWln.mjs +0 -16
  258. package/dist/ShopScreen-5lvMRPz5.cjs +0 -50
  259. package/dist/ShopScreen-83zufos8.cjs.map +0 -1
  260. package/dist/ShopScreen-DCEMk8Rw.mjs.map +0 -1
  261. package/dist/ShopScreen-De7NdOqh.mjs +0 -49
  262. package/dist/SubscriptionsScreen-3LGH99fz.cjs.map +0 -1
  263. package/dist/SubscriptionsScreen-D2krJ5ne.mjs +0 -51
  264. package/dist/SubscriptionsScreen-DKyciF92.mjs.map +0 -1
  265. package/dist/ToDoWidget-1wI1ntdD.cjs +0 -11
  266. package/dist/countries-api-context-DScC_39w.mjs.map +0 -1
  267. package/dist/countries-api-context-G-NW4BoH.cjs.map +0 -1
  268. package/dist/error-state-DJq7C-23.cjs.map +0 -1
  269. package/dist/error-state-DvzIn9Tz.mjs.map +0 -1
  270. package/dist/mysite-api-context-CilZcDS4.cjs.map +0 -1
  271. package/dist/mysite-api-context-kUTM3GNG.mjs.map +0 -1
  272. package/dist/preview-context-BWCl-xyj.cjs.map +0 -1
  273. package/dist/preview-context-D9ZzEfWh.mjs.map +0 -1
  274. package/dist/static-dict-adapter-DjCpubZc.mjs.map +0 -1
  275. package/dist/static-dict-adapter-JAau5LHb.cjs.map +0 -1
  276. package/dist/store-api-context-D1gZn22Z.cjs.map +0 -1
  277. package/dist/store-api-context-DViwxyG4.mjs.map +0 -1
  278. package/dist/task-composer-form-BEZGTBBZ.cjs.map +0 -1
  279. package/dist/task-composer-form-D_Pbl6qk.mjs.map +0 -1
  280. package/dist/translation-api-context-factory-BSRK6Z50.cjs.map +0 -1
  281. package/dist/translation-api-context-factory-CJrVq_EB.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ShopWidget-BzAuvfyC.mjs","names":[],"sources":["../../../shop/core/src/translation-api-context.ts","../../../shop/ui/src/utils/media-helpers.ts","../../../shop/ui/src/components/product-card.tsx","../../widgets/src/widgets/ShopWidget.tsx"],"sourcesContent":["import { createTranslationContext } from \"@fluid-app/i18n/translation-api-context-factory\";\nimport type { ShopDict } from \"./translation-dictionary\";\n\nconst { Provider, useTranslation } = createTranslationContext<ShopDict>(\"Shop\");\n\nexport const ShopTranslationProvider = Provider;\nexport const useShopTranslation = useTranslation;\n","const VIDEO_EXTENSIONS = [\n \".mp4\",\n \".webm\",\n \".mov\",\n \".avi\",\n \".m4v\",\n \".mkv\",\n \".ogv\",\n \".ogg\",\n \".wmv\",\n \".flv\",\n \".3gp\",\n];\n\nconst IMAGE_EXTENSIONS = [\n \".jpg\",\n \".jpeg\",\n \".png\",\n \".gif\",\n \".webp\",\n \".svg\",\n \".bmp\",\n \".ico\",\n \".tiff\",\n \".tif\",\n];\n\nexport function isVideoUrl(url: string | undefined | null): boolean {\n if (!url) return false;\n const lowerUrl = url.toLowerCase();\n return VIDEO_EXTENSIONS.some((ext) => lowerUrl.includes(ext));\n}\n\nexport function isImageUrl(url: string | undefined | null): boolean {\n if (!url) return false;\n const lowerUrl = url.toLowerCase();\n return IMAGE_EXTENSIONS.some((ext) => lowerUrl.includes(ext));\n}\n\nexport function getMediaTypeFromUrl(\n url: string | undefined | null,\n): \"video\" | \"image\" | \"unknown\" {\n if (isVideoUrl(url)) return \"video\";\n if (isImageUrl(url)) return \"image\";\n return \"unknown\";\n}\n\nexport function getVideoThumbnailUrl(videoUrl: string): string {\n if (videoUrl.includes(\"ik.imagekit.io\")) {\n return `${videoUrl}/ik-thumbnail.jpg`;\n }\n return videoUrl;\n}\n\nexport function ensureImageIsFeatured<\n T extends { image_url: string; position?: number },\n>(items: T[]): T[] {\n if (items.length === 0) return items;\n\n const firstItem = items[0];\n if (!firstItem || !isVideoUrl(firstItem.image_url)) {\n return items;\n }\n\n const firstImageIndex = items.findIndex(\n (item) => !isVideoUrl(item.image_url),\n );\n\n if (firstImageIndex === -1) {\n return items;\n }\n\n const reordered = [...items];\n const [imageToMove] = reordered.splice(firstImageIndex, 1);\n if (imageToMove) {\n reordered.unshift(imageToMove);\n }\n\n return reordered;\n}\n","import type React from \"react\";\nimport { useState, type ReactNode } from \"react\";\nimport type { products, portalProducts } from \"@fluid-app/products-core\";\nimport {\n determineProductPrice,\n getProductImageUrl,\n} from \"@fluid-app/products-core\";\nimport { Card } from \"@fluid-app/ui-primitives\";\nimport { useShopTranslation } from \"@fluid-app/shop-core/translation-api-context\";\nimport { CirclePlay } from \"lucide-react\";\nimport { getVideoThumbnailUrl, isVideoUrl } from \"../utils/media-helpers\";\n\ntype LegacyProduct = (products.Product | products.ShopProduct) & {\n kind?: string;\n video_url?: string;\n};\n\nexport interface RenderImageProps {\n src: string;\n alt: string;\n fill?: boolean;\n className?: string;\n onError?: (e: React.SyntheticEvent<HTMLImageElement>) => void;\n unoptimized?: boolean;\n}\n\ntype TaggedPortalProduct = portalProducts.Product & {\n readonly __portalProduct: true;\n};\n\nexport type ProductCardProduct = LegacyProduct | TaggedPortalProduct;\n\ninterface ProductCardProps {\n product: ProductCardProduct;\n countryIso?: string;\n companyLogoUrl?: string | null;\n showShareModal?: boolean;\n setShareModalOpen?: (open: boolean) => void;\n setSelectedProduct?: (product: LegacyProduct) => void;\n renderLink?: (props: { href: string; children: ReactNode }) => ReactNode;\n renderImage?: (props: RenderImageProps) => ReactNode;\n onClick?: () => void;\n}\n\nexport function tagPortalProduct(\n product: portalProducts.Product,\n): TaggedPortalProduct {\n return { ...product, __portalProduct: true as const };\n}\n\nfunction isPortalProduct(\n product: ProductCardProduct,\n): product is TaggedPortalProduct {\n return \"__portalProduct\" in product && product.__portalProduct === true;\n}\n\nfunction getPortalProductCoverImage(\n product: portalProducts.Product,\n): string | null {\n if (product.images && product.images.length > 0) {\n return product.images[0]?.url ?? null;\n }\n return null;\n}\n\nfunction defaultRenderImage({\n src,\n alt,\n fill,\n className,\n onError,\n}: RenderImageProps): ReactNode {\n return (\n <img\n src={src}\n alt={alt}\n className={`${fill ? \"absolute inset-0 h-full w-full\" : \"\"} ${className ?? \"\"}`}\n onError={onError}\n />\n );\n}\n\nfunction formatPortalPrice(\n price: string | undefined,\n currency: string | undefined,\n): string | null {\n if (!price) return null;\n const numericPrice = Number(price);\n if (Number.isNaN(numericPrice)) return `${currency ?? \"\"}${price}`;\n try {\n return new Intl.NumberFormat(undefined, {\n style: \"currency\",\n currency: currency || \"USD\",\n }).format(numericPrice);\n } catch {\n return `$${price}`;\n }\n}\n\nfunction ProductCardContent({\n product,\n countryIso,\n companyLogoUrl,\n renderImage = defaultRenderImage,\n}: {\n product: ProductCardProduct;\n countryIso?: string;\n companyLogoUrl?: string | null;\n renderImage?: (props: RenderImageProps) => ReactNode;\n}) {\n const [isHovered, setIsHovered] = useState(false);\n const { t } = useShopTranslation();\n\n const isPortal = isPortalProduct(product);\n const coverImage = isPortal\n ? getPortalProductCoverImage(product)\n : getProductImageUrl(product as Parameters<typeof getProductImageUrl>[0]);\n const isVideo = isVideoUrl(coverImage);\n const productName = isPortal\n ? product.name || t(\"no_title\")\n : (product as LegacyProduct).title || t(\"no_title\");\n\n let repPrice: string | null | undefined = null;\n let price: string | null | undefined = null;\n if (isPortal) {\n // wholesale_price is non-null for reps, null for customers\n if (product.wholesale_price) {\n repPrice = formatPortalPrice(product.wholesale_price, product.currency);\n // Show retail as strikethrough if different from wholesale\n const retailFormatted = formatPortalPrice(\n product.price,\n product.currency,\n );\n if (retailFormatted !== repPrice) {\n price = retailFormatted;\n }\n } else {\n repPrice = formatPortalPrice(product.price, product.currency);\n }\n } else if (countryIso) {\n const prices = determineProductPrice(product, countryIso);\n repPrice = prices.repPrice;\n price = prices.price;\n }\n\n return (\n <>\n {/* Image/Video container */}\n <div\n className=\"bg-muted relative aspect-square overflow-hidden\"\n onMouseEnter={() => isVideo && setIsHovered(true)}\n onMouseLeave={() => isVideo && setIsHovered(false)}\n >\n {isVideo && isHovered ? (\n <video\n src={coverImage || \"\"}\n className=\"absolute inset-0 h-full w-full object-cover\"\n autoPlay\n muted\n loop\n playsInline\n />\n ) : (\n renderImage({\n src:\n isVideo && coverImage\n ? getVideoThumbnailUrl(coverImage)\n : coverImage ||\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\",\n alt: productName,\n fill: true,\n className:\n \"object-cover transition-transform group-hover:scale-105\",\n onError: (e) => {\n e.currentTarget.src =\n companyLogoUrl ||\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\";\n },\n unoptimized: true,\n })\n )}\n\n {/* Video play indicator */}\n {isVideo && !isHovered && (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"flex size-16 items-center justify-center rounded-full bg-black/50 backdrop-blur-sm\">\n <CirclePlay className=\"size-12 text-white\" />\n </div>\n </div>\n )}\n </div>\n\n {/* Product info */}\n <div className=\"px-3 pt-2 pb-4\">\n <h3 className=\"text-foreground line-clamp-1 text-sm font-bold\">\n {productName}\n </h3>\n\n <div className=\"flex items-center gap-2\">\n {repPrice && (\n <span className=\"text-foreground text-sm font-bold\">\n {repPrice}\n </span>\n )}\n {price && (\n <span className=\"text-muted-foreground text-sm line-through\">\n {price}\n </span>\n )}\n </div>\n\n {!isPortal && countryIso && (\n <div className=\"text-muted-foreground text-sm\">\n CV{\" \"}\n {getVariantCountryValue(\n getSelectedVariant(product as LegacyProduct),\n countryIso,\n \"cv\",\n ) || \"-\"}{\" \"}\n | QV{\" \"}\n {getVariantCountryValue(\n getSelectedVariant(product as LegacyProduct),\n countryIso,\n \"qv\",\n ) || \"-\"}\n </div>\n )}\n\n {isPortal && product.wholesale_price != null && (\n <div className=\"text-muted-foreground text-sm\">\n CV {product.cv ?? \"-\"} | QV {product.qv ?? \"-\"}\n </div>\n )}\n </div>\n </>\n );\n}\n\nfunction getSelectedVariant(\n product: LegacyProduct,\n): products.Variant | products.ShopVariant | null {\n if (!product.variants || product.variants.length === 0) return null;\n\n const masterVariant = product.variants.find(\n (v: products.Variant | products.ShopVariant) => {\n return \"is_master\" in v && v.is_master;\n },\n );\n if (masterVariant) return masterVariant;\n\n return product.variants[0] || null;\n}\n\nfunction getVariantCountryValue(\n variant: products.Variant | products.ShopVariant | null,\n countryIso: string,\n field: \"cv\" | \"qv\",\n): number | null {\n if (!variant || !variant.variant_countries) return null;\n\n if (\n typeof variant.variant_countries === \"object\" &&\n !Array.isArray(variant.variant_countries)\n ) {\n const countryData = variant.variant_countries[countryIso] as\n | products.VariantCountry\n | undefined;\n return countryData?.[field] ?? null;\n }\n\n if (Array.isArray(variant.variant_countries)) {\n const countryData = variant.variant_countries.find(\n (vc: products.ShopVariantCountry) => vc.country_iso === countryIso,\n );\n return countryData?.[field] ?? null;\n }\n\n return null;\n}\n\nexport default function ProductCard({\n product,\n countryIso,\n companyLogoUrl,\n showShareModal = false,\n setShareModalOpen,\n setSelectedProduct,\n renderLink,\n renderImage,\n onClick,\n}: ProductCardProps): React.JSX.Element {\n const cardContent = (\n <ProductCardContent\n product={product}\n {...(countryIso !== undefined && { countryIso })}\n {...(companyLogoUrl !== undefined && { companyLogoUrl })}\n {...(renderImage !== undefined && { renderImage })}\n />\n );\n\n const cardClassName = \"overflow-hidden border-0 shadow-none pt-0 gap-0\";\n\n if (showShareModal && !isPortalProduct(product)) {\n const handleShareClick = () => {\n if (setSelectedProduct && setShareModalOpen) {\n setSelectedProduct(product);\n setShareModalOpen(true);\n }\n };\n return (\n <Card className={cardClassName}>\n <button\n onClick={handleShareClick}\n className=\"group block w-full cursor-pointer text-left\"\n >\n {cardContent}\n </button>\n </Card>\n );\n }\n\n if (onClick) {\n return (\n <Card className={cardClassName}>\n <button\n onClick={onClick}\n className=\"group block w-full cursor-pointer text-left\"\n >\n {cardContent}\n </button>\n </Card>\n );\n }\n\n const href = `/portal/shop/${product.id}`;\n\n if (renderLink) {\n return (\n <Card className={cardClassName}>\n {renderLink({ href, children: cardContent })}\n </Card>\n );\n }\n\n return (\n <Card className={cardClassName}>\n <a href={href} className=\"group block cursor-pointer\">\n {cardContent}\n </a>\n </Card>\n );\n}\n","import {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n type ComponentProps,\n} from \"react\";\nimport type React from \"react\";\nimport {\n usePortalProductCatalog,\n type PortalProductPageParam,\n type portalProducts,\n} from \"@fluid-app/products-core\";\nimport { useInfiniteQuery } from \"@tanstack/react-query\";\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Skeleton,\n} from \"@fluid-app/ui-primitives\";\nimport { SearchSort } from \"@fluid-app/ui-components/components/SearchSort\";\nimport ProductCard, {\n tagPortalProduct,\n} from \"@fluid-app/shop-ui/components/product-card\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-react/data-sources/preview-context\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport { ArrowUpDown, ImageIcon } from \"lucide-react\";\nimport {\n getBorderRadiusField,\n getColorField,\n getPaddingField,\n} from \"../core/fields\";\nimport { useWidgetInteraction } from \"../contexts/WidgetInteractionContext\";\n\ntype ColumnsKey = 2 | 3 | 4 | 5 | 6;\n\ntype ShopWidgetProps = ComponentProps<\"div\"> & {\n titleEnabled?: boolean;\n title?: string;\n titleColor?: ColorOptions;\n showSearch?: boolean;\n showSort?: boolean;\n columns?: ColumnsKey;\n pageSize?: number;\n useDataSource?: boolean;\n products?: portalProducts.Product[];\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n cardBackground?: ColorOptions;\n cardTextColor?: ColorOptions;\n};\n\nconst GRID_BY_COLUMNS: Record<ColumnsKey, string> = {\n 2: \"grid grid-cols-2 gap-3 sm:gap-6\",\n 3: \"grid grid-cols-2 gap-3 sm:gap-6 md:grid-cols-3\",\n 4: \"grid grid-cols-2 gap-3 sm:gap-6 sm:grid-cols-3 md:grid-cols-4\",\n 5: \"grid grid-cols-2 gap-3 sm:gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5\",\n 6: \"grid grid-cols-2 gap-3 sm:gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6\",\n};\n\nconst SORT_OPTIONS = [\n { id: \"title_asc\", label: \"Title (A–Z)\" },\n { id: \"title_desc\", label: \"Title (Z–A)\" },\n { id: \"price_asc\", label: \"Price (Low to High)\" },\n { id: \"price_desc\", label: \"Price (High to Low)\" },\n { id: \"created_at_desc\", label: \"Recently added\" },\n { id: \"created_at_asc\", label: \"Oldest\" },\n] as const;\n\nconst PREVIEW_PRODUCTS: ReadonlyArray<{\n id: string;\n name: string;\n price: string;\n}> = [\n { id: \"preview-1\", name: \"Premium Wireless Headphones\", price: \"$249\" },\n { id: \"preview-2\", name: \"Smart Watch Series X\", price: \"$199\" },\n { id: \"preview-3\", name: \"Sunglasses\", price: \"$79\" },\n { id: \"preview-4\", name: \"Trail Running Shoes\", price: \"$129\" },\n { id: \"preview-5\", name: \"Daypack Backpack\", price: \"$89\" },\n { id: \"preview-6\", name: \"Stainless Bottle\", price: \"$32\" },\n { id: \"preview-7\", name: \"Linen Throw\", price: \"$59\" },\n { id: \"preview-8\", name: \"Ceramic Mug\", price: \"$24\" },\n { id: \"preview-9\", name: \"Wool Blanket\", price: \"$148\" },\n { id: \"preview-10\", name: \"Leather Wallet\", price: \"$45\" },\n { id: \"preview-11\", name: \"Pour-Over Kettle\", price: \"$78\" },\n { id: \"preview-12\", name: \"Linen Shirt\", price: \"$95\" },\n];\n\nfunction clampColumns(value: number | undefined): ColumnsKey {\n const n = Math.round(value ?? 4);\n if (n <= 2) return 2;\n if (n >= 6) return 6;\n return n as ColumnsKey;\n}\n\nfunction clampPageSize(value: number | undefined): number {\n const n = Math.round(value ?? 25);\n return Math.min(100, Math.max(5, n));\n}\n\n// Data sources can deliver products in legacy/shareable shape (`title`,\n// `image_url`/`imageUrl`/`thumbnail_url`) or portal shape (`name`, `images`).\n// Modeled as a typed superset so the probe doesn't lose type-safety.\ntype LegacyProductFields = {\n title?: string;\n image_url?: string;\n imageUrl?: string;\n thumbnail_url?: string;\n};\n\ntype LegacyImageFields = {\n url?: string;\n image_url?: string;\n alt?: string | null;\n};\n\nfunction normalizeDataSourceProduct(\n input: portalProducts.Product,\n): portalProducts.Product {\n const r = input as portalProducts.Product & LegacyProductFields;\n const name = r.name ?? r.title ?? \"\";\n\n let images: portalProducts.ProductImage[];\n if (Array.isArray(r.images) && r.images.length > 0) {\n images = r.images.flatMap<portalProducts.ProductImage>((img) => {\n const i = img as LegacyImageFields;\n const url = i.url ?? i.image_url;\n if (!url) return [];\n return [{ url, alt: i.alt ?? null }];\n });\n } else {\n const url = r.image_url ?? r.imageUrl ?? r.thumbnail_url;\n images = url ? [{ url, alt: null }] : [];\n }\n\n // Strip undefined props from the spread so EOPT accepts the result.\n const cleaned: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(r)) {\n if (v !== undefined) cleaned[k] = v;\n }\n return { ...(cleaned as portalProducts.Product), name, images };\n}\n\n// Tailwind v4 @theme inline aliases --color-*; remap the underlying --card / --foreground tokens.\nfunction cardScopedStyle(\n cardBackground: ColorOptions | undefined,\n cardTextColor: ColorOptions | undefined,\n): React.CSSProperties {\n const style: Record<string, string> = {};\n if (cardBackground) style[\"--card\"] = `var(--${cardBackground})`;\n if (cardTextColor) style[\"--foreground\"] = `var(--${cardTextColor})`;\n return style as React.CSSProperties;\n}\n\nexport function ShopWidget({\n titleEnabled = true,\n title = \"\",\n titleColor = \"foreground\",\n showSearch = true,\n showSort = true,\n columns = 4,\n pageSize = 25,\n useDataSource = false,\n products,\n\n background = { type: \"solid\", color: \"background\" },\n padding = 6,\n borderRadius = \"lg\",\n\n cardBackground,\n cardTextColor,\n\n className,\n ...props\n}: ShopWidgetProps): React.JSX.Element {\n const { isPreview } = useWidgetPreviewContext();\n const safeColumns = clampColumns(columns);\n const safePageSize = clampPageSize(pageSize);\n\n const backgroundColor = background.color ?? \"background\";\n const backgroundImage =\n background.type === \"image\" &&\n (background.resource?.image_url || background.resource?.imageUrl)\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} @container ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {isPreview ? (\n <PreviewBody\n columns={safeColumns}\n titleEnabled={titleEnabled}\n title={title}\n titleColor={titleColor}\n showSearch={showSearch}\n showSort={showSort}\n cardBackground={cardBackground}\n cardTextColor={cardTextColor}\n />\n ) : (\n <LiveBody\n columns={safeColumns}\n pageSize={safePageSize}\n titleEnabled={titleEnabled}\n title={title}\n titleColor={titleColor}\n showSearch={showSearch}\n showSort={showSort}\n useDataSource={useDataSource}\n products={products}\n cardBackground={cardBackground}\n cardTextColor={cardTextColor}\n />\n )}\n </div>\n );\n}\n\nfunction PreviewBody({\n columns,\n titleEnabled,\n title,\n titleColor,\n showSearch,\n showSort,\n cardBackground,\n cardTextColor,\n}: {\n columns: ColumnsKey;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n showSearch: boolean;\n showSort: boolean;\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n const hasTitle = titleEnabled && !!title;\n const hasHeader = hasTitle || showSearch || showSort;\n return (\n <div>\n {hasHeader && (\n <div className=\"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2\">\n {hasTitle && (\n <h2\n className={`text-${titleColor} text-2xl font-semibold tracking-tight`}\n >\n {title}\n </h2>\n )}\n {(showSearch || showSort) && (\n <div className=\"flex items-center gap-2 sm:ml-auto\">\n {showSearch && (\n <div\n aria-hidden\n className=\"bg-muted h-9 w-full max-w-sm rounded-md sm:w-64\"\n />\n )}\n {showSort && (\n <div aria-hidden className=\"bg-muted size-9 rounded-md\" />\n )}\n </div>\n )}\n </div>\n )}\n <div\n className={GRID_BY_COLUMNS[columns]}\n style={cardScopedStyle(cardBackground, cardTextColor)}\n >\n {PREVIEW_PRODUCTS.slice(0, columns * 2).map((p) => (\n <ProductCardCompact\n key={p.id}\n name={p.name}\n imageUrl={null}\n price={p.price}\n />\n ))}\n </div>\n </div>\n );\n}\n\nfunction LiveBody({\n useDataSource,\n products,\n ...rest\n}: {\n columns: ColumnsKey;\n pageSize: number;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n showSearch: boolean;\n showSort: boolean;\n useDataSource: boolean;\n products: portalProducts.Product[] | undefined;\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n // Branch at the component level so the catalog hook (which throws when\n // PortalProductsCoreProvider is missing) is only called in catalog mode.\n if (useDataSource) {\n return (\n <DataSourceBody\n columns={rest.columns}\n titleEnabled={rest.titleEnabled}\n title={rest.title}\n titleColor={rest.titleColor}\n products={products ?? []}\n cardBackground={rest.cardBackground}\n cardTextColor={rest.cardTextColor}\n />\n );\n }\n return <CatalogBody {...rest} />;\n}\n\nfunction DataSourceBody({\n columns,\n titleEnabled,\n title,\n titleColor,\n products,\n cardBackground,\n cardTextColor,\n}: {\n columns: ColumnsKey;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n products: portalProducts.Product[];\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n const { onNavigate } = useWidgetInteraction();\n const handleSelect = useCallback(\n (id: string | number) => {\n onNavigate?.(`shop/${id}`);\n },\n [onNavigate],\n );\n\n const hasTitle = titleEnabled && !!title;\n\n return (\n <div>\n {hasTitle && (\n <h2\n className={`text-${titleColor} mb-6 text-2xl font-semibold tracking-tight`}\n >\n {title}\n </h2>\n )}\n {products.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <p className=\"text-muted-foreground text-sm\">No products yet.</p>\n </div>\n ) : (\n <div\n className={GRID_BY_COLUMNS[columns]}\n style={cardScopedStyle(cardBackground, cardTextColor)}\n >\n {products.map((product) => {\n if (product.id == null) return null;\n // Defensive: older widgets may have a data source that returns\n // non-product shareables (Medium, EnrollmentPack, Page, Library).\n // The shop widget only knows how to navigate to product detail,\n // so skip anything that isn't a Product. Items without\n // `shareable_type` (static products / untagged feeds) fall through.\n const shareableType = (product as { shareable_type?: string })\n .shareable_type;\n if (shareableType != null && shareableType !== \"Product\")\n return null;\n const productId = product.id;\n return (\n <ProductCard\n key={productId}\n product={tagPortalProduct(normalizeDataSourceProduct(product))}\n onClick={() => handleSelect(productId)}\n />\n );\n })}\n </div>\n )}\n </div>\n );\n}\n\nfunction CatalogBody({\n columns,\n pageSize,\n titleEnabled,\n title,\n titleColor,\n showSearch,\n showSort,\n cardBackground,\n cardTextColor,\n}: {\n columns: ColumnsKey;\n pageSize: number;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n showSearch: boolean;\n showSort: boolean;\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n const observerTarget = useRef<HTMLDivElement>(null);\n const { onNavigate } = useWidgetInteraction();\n\n const catalog = usePortalProductCatalog({ perPage: pageSize });\n const {\n data,\n isLoading,\n isFetchingNextPage,\n hasNextPage,\n fetchNextPage,\n error,\n isFetched,\n } = useInfiniteQuery({\n queryKey: catalog.queryKey,\n queryFn: ({ pageParam, signal }) =>\n catalog.fetchProducts(pageParam, signal),\n getNextPageParam: catalog.getNextPageParam,\n initialPageParam: undefined as PortalProductPageParam,\n });\n\n const allProducts = useMemo(\n () => data?.pages.flatMap((page) => page.products) ?? [],\n [data?.pages],\n );\n\n // Hard cap so pageSize doubles as a \"show at most N\" limit.\n const visibleProducts = useMemo(\n () => allProducts.slice(0, pageSize),\n [allProducts, pageSize],\n );\n const reachedLimit = visibleProducts.length >= pageSize;\n\n const handleIntersect = useCallback(\n (entries: IntersectionObserverEntry[]) => {\n if (\n entries[0]?.isIntersecting &&\n hasNextPage &&\n !isFetchingNextPage &&\n !reachedLimit\n ) {\n fetchNextPage();\n }\n },\n [hasNextPage, isFetchingNextPage, fetchNextPage, reachedLimit],\n );\n\n useEffect(() => {\n const target = observerTarget.current;\n if (!target) return;\n const observer = new IntersectionObserver(handleIntersect, {\n threshold: 0.1,\n rootMargin: \"200px\",\n });\n observer.observe(target);\n return () => observer.disconnect();\n }, [handleIntersect]);\n\n const handleSelect = useCallback(\n (id: string | number) => {\n onNavigate?.(`shop/${id}`);\n },\n [onNavigate],\n );\n\n const hasTitle = titleEnabled && !!title;\n const hasHeader = hasTitle || showSearch || showSort;\n\n return (\n <div>\n {hasHeader && (\n <div className=\"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2\">\n {hasTitle && (\n <h2\n className={`text-${titleColor} text-2xl font-semibold tracking-tight`}\n >\n {title}\n </h2>\n )}\n {(showSearch || showSort) && (\n <div className=\"flex items-center gap-2 sm:ml-auto\">\n {showSearch && (\n <div className=\"w-full max-w-sm sm:w-64\">\n <SearchSort\n searchValue={catalog.searchTerm}\n onSearchChange={catalog.setSearchTerm}\n placeholder=\"Search products\"\n />\n </div>\n )}\n {showSort && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"border-foreground/10 size-9 shrink-0\"\n >\n <ArrowUpDown className=\"size-3\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-60\">\n <DropdownMenuLabel>Sort by</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuRadioGroup\n value={catalog.currentSort}\n onValueChange={catalog.setCurrentSort}\n >\n {SORT_OPTIONS.map((opt) => (\n <DropdownMenuRadioItem key={opt.id} value={opt.id}>\n {opt.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n )}\n </div>\n )}\n\n {isLoading ? (\n <SkeletonGrid columns={columns} count={columns * 2} />\n ) : error && visibleProducts.length === 0 ? (\n <div className=\"bg-destructive/10 text-destructive my-6 rounded-lg px-4 py-3 text-sm\">\n Couldn&rsquo;t load products. Try again later.\n </div>\n ) : isFetched && visibleProducts.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <p className=\"text-muted-foreground text-sm\">\n {catalog.searchTerm\n ? `No products match “${catalog.searchTerm}”.`\n : \"No products yet.\"}\n </p>\n </div>\n ) : (\n <>\n <div\n className={GRID_BY_COLUMNS[columns]}\n style={cardScopedStyle(cardBackground, cardTextColor)}\n >\n {visibleProducts.map((product) => {\n if (product.id == null) return null;\n const productId = product.id;\n return (\n <ProductCard\n key={productId}\n product={tagPortalProduct(product)}\n onClick={() => handleSelect(productId)}\n />\n );\n })}\n </div>\n {!reachedLimit && <div ref={observerTarget} />}\n {isFetchingNextPage && !reachedLimit && (\n <div className=\"mt-6\">\n <SkeletonGrid columns={columns} count={columns} />\n </div>\n )}\n {error && (\n <div className=\"bg-destructive/10 text-destructive mt-6 rounded-lg px-4 py-3 text-sm\">\n Couldn&rsquo;t load more products. Try again later.\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n\nfunction ProductCardCompact({\n name,\n imageUrl,\n price,\n onClick,\n}: {\n name: string;\n imageUrl: string | null;\n price: string | null;\n onClick?: () => void;\n}) {\n const interactive = !!onClick;\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={!interactive}\n className={`bg-card text-card-foreground group flex flex-col overflow-hidden rounded-lg border border-transparent text-left ${interactive ? \"hover:border-border cursor-pointer transition-shadow hover:shadow-md\" : \"cursor-default\"} focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none`}\n >\n <div className=\"bg-muted relative aspect-square w-full overflow-hidden\">\n {imageUrl ? (\n <img\n src={imageUrl}\n alt={name}\n className=\"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.03]\"\n loading=\"lazy\"\n />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center\">\n <ImageIcon className=\"text-muted-foreground/40 size-10\" />\n </div>\n )}\n </div>\n <div className=\"p-3\">\n <h3 className=\"text-foreground line-clamp-2 text-sm font-medium\">\n {name}\n </h3>\n {price && (\n <p className=\"text-foreground mt-1 text-sm font-semibold\">{price}</p>\n )}\n </div>\n </button>\n );\n}\n\nfunction SkeletonGrid({\n columns,\n count,\n}: {\n columns: ColumnsKey;\n count: number;\n}) {\n return (\n <div className={GRID_BY_COLUMNS[columns]}>\n {Array.from({ length: count }, (_, i) => (\n <div key={i} className=\"space-y-3\">\n <Skeleton className=\"aspect-square w-full rounded-lg\" />\n <Skeleton className=\"h-4 w-3/4\" />\n <Skeleton className=\"h-4 w-1/3\" />\n </div>\n ))}\n </div>\n );\n}\n\nexport const shopWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShopWidget\",\n displayName: \"Shop\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"products\"],\n fields: [\n // Title group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the heading shown above the grid\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Heading text shown above the grid\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color of the heading text\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Display group\n {\n key: \"showSearch\",\n label: \"Show Search\",\n type: \"boolean\",\n description: \"Display the search input above the grid\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Display\",\n requiresKeyValue: { key: \"useDataSource\", value: false },\n },\n {\n key: \"showSort\",\n label: \"Show Sort\",\n type: \"boolean\",\n description: \"Display the sort menu above the grid\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Display\",\n requiresKeyValue: { key: \"useDataSource\", value: false },\n },\n {\n key: \"columns\",\n label: \"Columns (desktop)\",\n type: \"select\",\n description:\n \"Max columns at the largest breakpoint. Mobile is always 2 columns; intermediate sizes scale smoothly between.\",\n options: [\n { label: \"2\", value: 2 },\n { label: \"3\", value: 3 },\n { label: \"4\", value: 4 },\n { label: \"5\", value: 5 },\n { label: \"6\", value: 6 },\n ],\n defaultValue: 4,\n tab: \"styling\",\n group: \"Display\",\n },\n\n // Design group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Container background\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Inner spacing around the grid\",\n defaultValue: 6,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Container corner radius\",\n defaultValue: \"lg\",\n tab: \"styling\",\n group: \"Design\",\n }),\n\n // Card group — optional theme overrides; unset means \"inherit from theme\".\n getColorField({\n key: \"cardBackground\",\n label: \"Card Background\",\n description:\n \"Override the card background color. Leave unset to use the theme's card color.\",\n tab: \"styling\",\n group: \"Card\",\n }),\n getColorField({\n key: \"cardTextColor\",\n label: \"Card Text\",\n description:\n \"Override title + price color inside each card. Leave unset to use the theme's foreground color.\",\n tab: \"styling\",\n group: \"Card\",\n }),\n\n // Data tab\n {\n key: \"useDataSource\",\n label: \"Use Data Source\",\n type: \"boolean\",\n description:\n \"Off shows all products from the catalog. On replaces the catalog with a data source — disables search and sort.\",\n defaultValue: false,\n tab: \"data\",\n group: \"Data Configuration\",\n },\n {\n key: \"pageSize\",\n label: \"Products to show\",\n type: \"number\",\n description: \"Maximum number of products rendered in the grid\",\n defaultValue: 25,\n min: 5,\n max: 100,\n step: 5,\n tab: \"data\",\n group: \"Data Configuration\",\n requiresKeyValue: { key: \"useDataSource\", value: false },\n },\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n requiresKeyToBeTrue: \"useDataSource\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;;;;AAGA,MAAM,EAAE,UAAU,mBAAmB,yBAAmC,OAAO;AAE/E,MAAa,0BAA0B;AACvC,MAAa,qBAAqB;;;ACNlC,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAeD,SAAgB,WAAW,KAAyC;AAClE,KAAI,CAAC,IAAK,QAAO;CACjB,MAAM,WAAW,IAAI,aAAa;AAClC,QAAO,iBAAiB,MAAM,QAAQ,SAAS,SAAS,IAAI,CAAC;;AAiB/D,SAAgB,qBAAqB,UAA0B;AAC7D,KAAI,SAAS,SAAS,iBAAiB,CACrC,QAAO,GAAG,SAAS;AAErB,QAAO;;;;ACPT,SAAgB,iBACd,SACqB;AACrB,QAAO;EAAE,GAAG;EAAS,iBAAiB;EAAe;;AAGvD,SAAS,gBACP,SACgC;AAChC,QAAO,qBAAqB,WAAW,QAAQ,oBAAoB;;AAGrE,SAAS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ACP,MAAM;GACN,aACE;GACF,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,KAAK;GACL,MAAM;GACN,KAAK;GACL,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAiB,OAAO;IAAO;GACzD;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACF;CACF"}
1
+ {"version":3,"file":"ShopWidget-Cqnwq0AG.mjs","names":[],"sources":["../../../shop/core/src/translation-api-context.ts","../../../shop/ui/src/utils/media-helpers.ts","../../../shop/ui/src/components/product-card.tsx","../../widgets/src/widgets/ShopWidget.tsx"],"sourcesContent":["import { createTranslationContext } from \"@fluid-app/i18n/translation-api-context-factory\";\nimport type { ShopDict } from \"./translation-dictionary\";\n\nconst { Provider, useTranslation } = createTranslationContext<ShopDict>(\"Shop\");\n\nexport const ShopTranslationProvider = Provider;\nexport const useShopTranslation = useTranslation;\n","const VIDEO_EXTENSIONS = [\n \".mp4\",\n \".webm\",\n \".mov\",\n \".avi\",\n \".m4v\",\n \".mkv\",\n \".ogv\",\n \".ogg\",\n \".wmv\",\n \".flv\",\n \".3gp\",\n];\n\nconst IMAGE_EXTENSIONS = [\n \".jpg\",\n \".jpeg\",\n \".png\",\n \".gif\",\n \".webp\",\n \".svg\",\n \".bmp\",\n \".ico\",\n \".tiff\",\n \".tif\",\n];\n\nexport function isVideoUrl(url: string | undefined | null): boolean {\n if (!url) return false;\n const lowerUrl = url.toLowerCase();\n return VIDEO_EXTENSIONS.some((ext) => lowerUrl.includes(ext));\n}\n\nexport function isImageUrl(url: string | undefined | null): boolean {\n if (!url) return false;\n const lowerUrl = url.toLowerCase();\n return IMAGE_EXTENSIONS.some((ext) => lowerUrl.includes(ext));\n}\n\nexport function getMediaTypeFromUrl(\n url: string | undefined | null,\n): \"video\" | \"image\" | \"unknown\" {\n if (isVideoUrl(url)) return \"video\";\n if (isImageUrl(url)) return \"image\";\n return \"unknown\";\n}\n\nexport function getVideoThumbnailUrl(videoUrl: string): string {\n if (videoUrl.includes(\"ik.imagekit.io\")) {\n return `${videoUrl}/ik-thumbnail.jpg`;\n }\n return videoUrl;\n}\n\nexport function ensureImageIsFeatured<\n T extends { image_url: string; position?: number },\n>(items: T[]): T[] {\n if (items.length === 0) return items;\n\n const firstItem = items[0];\n if (!firstItem || !isVideoUrl(firstItem.image_url)) {\n return items;\n }\n\n const firstImageIndex = items.findIndex(\n (item) => !isVideoUrl(item.image_url),\n );\n\n if (firstImageIndex === -1) {\n return items;\n }\n\n const reordered = [...items];\n const [imageToMove] = reordered.splice(firstImageIndex, 1);\n if (imageToMove) {\n reordered.unshift(imageToMove);\n }\n\n return reordered;\n}\n","import type React from \"react\";\nimport { useState, type ReactNode } from \"react\";\nimport type { products, portalProducts } from \"@fluid-app/products-core\";\nimport {\n determineProductPrice,\n getProductImageUrl,\n} from \"@fluid-app/products-core\";\nimport { Card } from \"@fluid-app/ui-primitives\";\nimport { useShopTranslation } from \"@fluid-app/shop-core/translation-api-context\";\nimport { CirclePlay } from \"lucide-react\";\nimport { getVideoThumbnailUrl, isVideoUrl } from \"../utils/media-helpers\";\n\ntype LegacyProduct = (products.Product | products.ShopProduct) & {\n kind?: string;\n video_url?: string;\n};\n\nexport interface RenderImageProps {\n src: string;\n alt: string;\n fill?: boolean;\n className?: string;\n onError?: (e: React.SyntheticEvent<HTMLImageElement>) => void;\n unoptimized?: boolean;\n}\n\ntype TaggedPortalProduct = portalProducts.Product & {\n readonly __portalProduct: true;\n};\n\nexport type ProductCardProduct = LegacyProduct | TaggedPortalProduct;\n\ninterface ProductCardProps {\n product: ProductCardProduct;\n countryIso?: string;\n companyLogoUrl?: string | null;\n showShareModal?: boolean;\n setShareModalOpen?: (open: boolean) => void;\n setSelectedProduct?: (product: LegacyProduct) => void;\n renderLink?: (props: { href: string; children: ReactNode }) => ReactNode;\n renderImage?: (props: RenderImageProps) => ReactNode;\n onClick?: () => void;\n}\n\nexport function tagPortalProduct(\n product: portalProducts.Product,\n): TaggedPortalProduct {\n return { ...product, __portalProduct: true as const };\n}\n\nfunction isPortalProduct(\n product: ProductCardProduct,\n): product is TaggedPortalProduct {\n return \"__portalProduct\" in product && product.__portalProduct === true;\n}\n\nfunction getPortalProductCoverImage(\n product: portalProducts.Product,\n): string | null {\n if (product.images && product.images.length > 0) {\n return product.images[0]?.url ?? null;\n }\n return null;\n}\n\nfunction defaultRenderImage({\n src,\n alt,\n fill,\n className,\n onError,\n}: RenderImageProps): ReactNode {\n return (\n <img\n src={src}\n alt={alt}\n className={`${fill ? \"absolute inset-0 h-full w-full\" : \"\"} ${className ?? \"\"}`}\n onError={onError}\n />\n );\n}\n\nfunction formatPortalPrice(\n price: string | undefined,\n currency: string | undefined,\n): string | null {\n if (!price) return null;\n const numericPrice = Number(price);\n if (Number.isNaN(numericPrice)) return `${currency ?? \"\"}${price}`;\n try {\n return new Intl.NumberFormat(undefined, {\n style: \"currency\",\n currency: currency || \"USD\",\n }).format(numericPrice);\n } catch {\n return `$${price}`;\n }\n}\n\nfunction ProductCardContent({\n product,\n countryIso,\n companyLogoUrl,\n renderImage = defaultRenderImage,\n}: {\n product: ProductCardProduct;\n countryIso?: string;\n companyLogoUrl?: string | null;\n renderImage?: (props: RenderImageProps) => ReactNode;\n}) {\n const [isHovered, setIsHovered] = useState(false);\n const { t } = useShopTranslation();\n\n const isPortal = isPortalProduct(product);\n const coverImage = isPortal\n ? getPortalProductCoverImage(product)\n : getProductImageUrl(product as Parameters<typeof getProductImageUrl>[0]);\n const isVideo = isVideoUrl(coverImage);\n const productName = isPortal\n ? product.name || t(\"no_title\")\n : (product as LegacyProduct).title || t(\"no_title\");\n\n let repPrice: string | null | undefined = null;\n let price: string | null | undefined = null;\n if (isPortal) {\n // wholesale_price is non-null for reps, null for customers\n if (product.wholesale_price) {\n repPrice = formatPortalPrice(product.wholesale_price, product.currency);\n // Show retail as strikethrough if different from wholesale\n const retailFormatted = formatPortalPrice(\n product.price,\n product.currency,\n );\n if (retailFormatted !== repPrice) {\n price = retailFormatted;\n }\n } else {\n repPrice = formatPortalPrice(product.price, product.currency);\n }\n } else if (countryIso) {\n const prices = determineProductPrice(product, countryIso);\n repPrice = prices.repPrice;\n price = prices.price;\n }\n\n return (\n <>\n {/* Image/Video container */}\n <div\n className=\"bg-muted relative aspect-square overflow-hidden\"\n onMouseEnter={() => isVideo && setIsHovered(true)}\n onMouseLeave={() => isVideo && setIsHovered(false)}\n >\n {isVideo && isHovered ? (\n <video\n src={coverImage || \"\"}\n className=\"absolute inset-0 h-full w-full object-cover\"\n autoPlay\n muted\n loop\n playsInline\n />\n ) : (\n renderImage({\n src:\n isVideo && coverImage\n ? getVideoThumbnailUrl(coverImage)\n : coverImage ||\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\",\n alt: productName,\n fill: true,\n className:\n \"object-cover transition-transform group-hover:scale-105\",\n onError: (e) => {\n e.currentTarget.src =\n companyLogoUrl ||\n \"https://assets.fluid.app/fluid-admin/images/we-commerce/we-commerce.png\";\n },\n unoptimized: true,\n })\n )}\n\n {/* Video play indicator */}\n {isVideo && !isHovered && (\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <div className=\"flex size-16 items-center justify-center rounded-full bg-black/50 backdrop-blur-sm\">\n <CirclePlay className=\"size-12 text-white\" />\n </div>\n </div>\n )}\n </div>\n\n {/* Product info */}\n <div className=\"px-3 pt-2 pb-4\">\n <h3 className=\"text-foreground line-clamp-1 text-sm font-bold\">\n {productName}\n </h3>\n\n <div className=\"flex items-center gap-2\">\n {repPrice && (\n <span className=\"text-foreground text-sm font-bold\">\n {repPrice}\n </span>\n )}\n {price && (\n <span className=\"text-muted-foreground text-sm line-through\">\n {price}\n </span>\n )}\n </div>\n\n {!isPortal && countryIso && (\n <div className=\"text-muted-foreground text-sm\">\n CV{\" \"}\n {getVariantCountryValue(\n getSelectedVariant(product as LegacyProduct),\n countryIso,\n \"cv\",\n ) || \"-\"}{\" \"}\n | QV{\" \"}\n {getVariantCountryValue(\n getSelectedVariant(product as LegacyProduct),\n countryIso,\n \"qv\",\n ) || \"-\"}\n </div>\n )}\n\n {isPortal && product.wholesale_price != null && (\n <div className=\"text-muted-foreground text-sm\">\n CV {product.cv ?? \"-\"} | QV {product.qv ?? \"-\"}\n </div>\n )}\n </div>\n </>\n );\n}\n\nfunction getSelectedVariant(\n product: LegacyProduct,\n): products.Variant | products.ShopVariant | null {\n if (!product.variants || product.variants.length === 0) return null;\n\n const masterVariant = product.variants.find(\n (v: products.Variant | products.ShopVariant) => {\n return \"is_master\" in v && v.is_master;\n },\n );\n if (masterVariant) return masterVariant;\n\n return product.variants[0] || null;\n}\n\nfunction getVariantCountryValue(\n variant: products.Variant | products.ShopVariant | null,\n countryIso: string,\n field: \"cv\" | \"qv\",\n): number | null {\n if (!variant || !variant.variant_countries) return null;\n\n if (\n typeof variant.variant_countries === \"object\" &&\n !Array.isArray(variant.variant_countries)\n ) {\n const countryData = variant.variant_countries[countryIso] as\n | products.VariantCountry\n | undefined;\n return countryData?.[field] ?? null;\n }\n\n if (Array.isArray(variant.variant_countries)) {\n const countryData = variant.variant_countries.find(\n (vc: products.ShopVariantCountry) => vc.country_iso === countryIso,\n );\n return countryData?.[field] ?? null;\n }\n\n return null;\n}\n\nexport default function ProductCard({\n product,\n countryIso,\n companyLogoUrl,\n showShareModal = false,\n setShareModalOpen,\n setSelectedProduct,\n renderLink,\n renderImage,\n onClick,\n}: ProductCardProps): React.JSX.Element {\n const cardContent = (\n <ProductCardContent\n product={product}\n {...(countryIso !== undefined && { countryIso })}\n {...(companyLogoUrl !== undefined && { companyLogoUrl })}\n {...(renderImage !== undefined && { renderImage })}\n />\n );\n\n const cardClassName = \"overflow-hidden border-0 shadow-none pt-0 gap-0\";\n\n if (showShareModal && !isPortalProduct(product)) {\n const handleShareClick = () => {\n if (setSelectedProduct && setShareModalOpen) {\n setSelectedProduct(product);\n setShareModalOpen(true);\n }\n };\n return (\n <Card className={cardClassName}>\n <button\n onClick={handleShareClick}\n className=\"group block w-full cursor-pointer text-left\"\n >\n {cardContent}\n </button>\n </Card>\n );\n }\n\n if (onClick) {\n return (\n <Card className={cardClassName}>\n <button\n onClick={onClick}\n className=\"group block w-full cursor-pointer text-left\"\n >\n {cardContent}\n </button>\n </Card>\n );\n }\n\n const href = `/portal/shop/${product.id}`;\n\n if (renderLink) {\n return (\n <Card className={cardClassName}>\n {renderLink({ href, children: cardContent })}\n </Card>\n );\n }\n\n return (\n <Card className={cardClassName}>\n <a href={href} className=\"group block cursor-pointer\">\n {cardContent}\n </a>\n </Card>\n );\n}\n","import {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n type ComponentProps,\n} from \"react\";\nimport type React from \"react\";\nimport {\n usePortalProductCatalog,\n type PortalProductPageParam,\n type portalProducts,\n} from \"@fluid-app/products-core\";\nimport { useInfiniteQuery } from \"@tanstack/react-query\";\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Skeleton,\n} from \"@fluid-app/ui-primitives\";\nimport { SearchSort } from \"@fluid-app/ui-components/components/SearchSort\";\nimport ProductCard, {\n tagPortalProduct,\n} from \"@fluid-app/shop-ui/components/product-card\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-react/data-sources/preview-context\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport { ArrowUpDown, ImageIcon } from \"lucide-react\";\nimport {\n getBorderRadiusField,\n getColorField,\n getPaddingField,\n} from \"../core/fields\";\nimport { useWidgetInteraction } from \"../contexts/WidgetInteractionContext\";\n\ntype ColumnsKey = 2 | 3 | 4 | 5 | 6;\n\ntype ShopWidgetProps = ComponentProps<\"div\"> & {\n titleEnabled?: boolean;\n title?: string;\n titleColor?: ColorOptions;\n showSearch?: boolean;\n showSort?: boolean;\n columns?: ColumnsKey;\n pageSize?: number;\n useDataSource?: boolean;\n products?: portalProducts.Product[];\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n cardBackground?: ColorOptions;\n cardTextColor?: ColorOptions;\n};\n\nconst GRID_BY_COLUMNS: Record<ColumnsKey, string> = {\n 2: \"grid grid-cols-2 gap-3 sm:gap-6\",\n 3: \"grid grid-cols-2 gap-3 sm:gap-6 md:grid-cols-3\",\n 4: \"grid grid-cols-2 gap-3 sm:gap-6 sm:grid-cols-3 md:grid-cols-4\",\n 5: \"grid grid-cols-2 gap-3 sm:gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5\",\n 6: \"grid grid-cols-2 gap-3 sm:gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6\",\n};\n\nconst SORT_OPTIONS = [\n { id: \"title_asc\", label: \"Title (A–Z)\" },\n { id: \"title_desc\", label: \"Title (Z–A)\" },\n { id: \"price_asc\", label: \"Price (Low to High)\" },\n { id: \"price_desc\", label: \"Price (High to Low)\" },\n { id: \"created_at_desc\", label: \"Recently added\" },\n { id: \"created_at_asc\", label: \"Oldest\" },\n] as const;\n\nconst PREVIEW_PRODUCTS: ReadonlyArray<{\n id: string;\n name: string;\n price: string;\n}> = [\n { id: \"preview-1\", name: \"Premium Wireless Headphones\", price: \"$249\" },\n { id: \"preview-2\", name: \"Smart Watch Series X\", price: \"$199\" },\n { id: \"preview-3\", name: \"Sunglasses\", price: \"$79\" },\n { id: \"preview-4\", name: \"Trail Running Shoes\", price: \"$129\" },\n { id: \"preview-5\", name: \"Daypack Backpack\", price: \"$89\" },\n { id: \"preview-6\", name: \"Stainless Bottle\", price: \"$32\" },\n { id: \"preview-7\", name: \"Linen Throw\", price: \"$59\" },\n { id: \"preview-8\", name: \"Ceramic Mug\", price: \"$24\" },\n { id: \"preview-9\", name: \"Wool Blanket\", price: \"$148\" },\n { id: \"preview-10\", name: \"Leather Wallet\", price: \"$45\" },\n { id: \"preview-11\", name: \"Pour-Over Kettle\", price: \"$78\" },\n { id: \"preview-12\", name: \"Linen Shirt\", price: \"$95\" },\n];\n\nfunction clampColumns(value: number | undefined): ColumnsKey {\n const n = Math.round(value ?? 4);\n if (n <= 2) return 2;\n if (n >= 6) return 6;\n return n as ColumnsKey;\n}\n\nfunction clampPageSize(value: number | undefined): number {\n const n = Math.round(value ?? 25);\n return Math.min(100, Math.max(5, n));\n}\n\n// Data sources can deliver products in legacy/shareable shape (`title`,\n// `image_url`/`imageUrl`/`thumbnail_url`) or portal shape (`name`, `images`).\n// Modeled as a typed superset so the probe doesn't lose type-safety.\ntype LegacyProductFields = {\n title?: string;\n image_url?: string;\n imageUrl?: string;\n thumbnail_url?: string;\n};\n\ntype LegacyImageFields = {\n url?: string;\n image_url?: string;\n alt?: string | null;\n};\n\nfunction normalizeDataSourceProduct(\n input: portalProducts.Product,\n): portalProducts.Product {\n const r = input as portalProducts.Product & LegacyProductFields;\n const name = r.name ?? r.title ?? \"\";\n\n let images: portalProducts.ProductImage[];\n if (Array.isArray(r.images) && r.images.length > 0) {\n images = r.images.flatMap<portalProducts.ProductImage>((img) => {\n const i = img as LegacyImageFields;\n const url = i.url ?? i.image_url;\n if (!url) return [];\n return [{ url, alt: i.alt ?? null }];\n });\n } else {\n const url = r.image_url ?? r.imageUrl ?? r.thumbnail_url;\n images = url ? [{ url, alt: null }] : [];\n }\n\n // Strip undefined props from the spread so EOPT accepts the result.\n const cleaned: Record<string, unknown> = {};\n for (const [k, v] of Object.entries(r)) {\n if (v !== undefined) cleaned[k] = v;\n }\n return { ...(cleaned as portalProducts.Product), name, images };\n}\n\n// Tailwind v4 @theme inline aliases --color-*; remap the underlying --card / --foreground tokens.\nfunction cardScopedStyle(\n cardBackground: ColorOptions | undefined,\n cardTextColor: ColorOptions | undefined,\n): React.CSSProperties {\n const style: Record<string, string> = {};\n if (cardBackground) style[\"--card\"] = `var(--${cardBackground})`;\n if (cardTextColor) style[\"--foreground\"] = `var(--${cardTextColor})`;\n return style as React.CSSProperties;\n}\n\nexport function ShopWidget({\n titleEnabled = true,\n title = \"\",\n titleColor = \"foreground\",\n showSearch = true,\n showSort = true,\n columns = 4,\n pageSize = 25,\n useDataSource = false,\n products,\n\n background = { type: \"solid\", color: \"background\" },\n padding = 6,\n borderRadius = \"lg\",\n\n cardBackground,\n cardTextColor,\n\n className,\n ...props\n}: ShopWidgetProps): React.JSX.Element {\n const { isPreview } = useWidgetPreviewContext();\n const safeColumns = clampColumns(columns);\n const safePageSize = clampPageSize(pageSize);\n\n const backgroundColor = background.color ?? \"background\";\n const backgroundImage =\n background.type === \"image\" &&\n (background.resource?.image_url || background.resource?.imageUrl)\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} @container ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {isPreview ? (\n <PreviewBody\n columns={safeColumns}\n titleEnabled={titleEnabled}\n title={title}\n titleColor={titleColor}\n showSearch={showSearch}\n showSort={showSort}\n cardBackground={cardBackground}\n cardTextColor={cardTextColor}\n />\n ) : (\n <LiveBody\n columns={safeColumns}\n pageSize={safePageSize}\n titleEnabled={titleEnabled}\n title={title}\n titleColor={titleColor}\n showSearch={showSearch}\n showSort={showSort}\n useDataSource={useDataSource}\n products={products}\n cardBackground={cardBackground}\n cardTextColor={cardTextColor}\n />\n )}\n </div>\n );\n}\n\nfunction PreviewBody({\n columns,\n titleEnabled,\n title,\n titleColor,\n showSearch,\n showSort,\n cardBackground,\n cardTextColor,\n}: {\n columns: ColumnsKey;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n showSearch: boolean;\n showSort: boolean;\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n const hasTitle = titleEnabled && !!title;\n const hasHeader = hasTitle || showSearch || showSort;\n return (\n <div>\n {hasHeader && (\n <div className=\"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2\">\n {hasTitle && (\n <h2\n className={`text-${titleColor} text-2xl font-semibold tracking-tight`}\n >\n {title}\n </h2>\n )}\n {(showSearch || showSort) && (\n <div className=\"flex items-center gap-2 sm:ml-auto\">\n {showSearch && (\n <div\n aria-hidden\n className=\"bg-muted h-9 w-full max-w-sm rounded-md sm:w-64\"\n />\n )}\n {showSort && (\n <div aria-hidden className=\"bg-muted size-9 rounded-md\" />\n )}\n </div>\n )}\n </div>\n )}\n <div\n className={GRID_BY_COLUMNS[columns]}\n style={cardScopedStyle(cardBackground, cardTextColor)}\n >\n {PREVIEW_PRODUCTS.slice(0, columns * 2).map((p) => (\n <ProductCardCompact\n key={p.id}\n name={p.name}\n imageUrl={null}\n price={p.price}\n />\n ))}\n </div>\n </div>\n );\n}\n\nfunction LiveBody({\n useDataSource,\n products,\n ...rest\n}: {\n columns: ColumnsKey;\n pageSize: number;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n showSearch: boolean;\n showSort: boolean;\n useDataSource: boolean;\n products: portalProducts.Product[] | undefined;\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n // Branch at the component level so the catalog hook (which throws when\n // PortalProductsCoreProvider is missing) is only called in catalog mode.\n if (useDataSource) {\n return (\n <DataSourceBody\n columns={rest.columns}\n titleEnabled={rest.titleEnabled}\n title={rest.title}\n titleColor={rest.titleColor}\n products={products ?? []}\n cardBackground={rest.cardBackground}\n cardTextColor={rest.cardTextColor}\n />\n );\n }\n return <CatalogBody {...rest} />;\n}\n\nfunction DataSourceBody({\n columns,\n titleEnabled,\n title,\n titleColor,\n products,\n cardBackground,\n cardTextColor,\n}: {\n columns: ColumnsKey;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n products: portalProducts.Product[];\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n const { onNavigate } = useWidgetInteraction();\n const handleSelect = useCallback(\n (id: string | number) => {\n onNavigate?.(`shop/${id}`);\n },\n [onNavigate],\n );\n\n const hasTitle = titleEnabled && !!title;\n\n return (\n <div>\n {hasTitle && (\n <h2\n className={`text-${titleColor} mb-6 text-2xl font-semibold tracking-tight`}\n >\n {title}\n </h2>\n )}\n {products.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <p className=\"text-muted-foreground text-sm\">No products yet.</p>\n </div>\n ) : (\n <div\n className={GRID_BY_COLUMNS[columns]}\n style={cardScopedStyle(cardBackground, cardTextColor)}\n >\n {products.map((product) => {\n if (product.id == null) return null;\n // Defensive: older widgets may have a data source that returns\n // non-product shareables (Medium, EnrollmentPack, Page, Library).\n // The shop widget only knows how to navigate to product detail,\n // so skip anything that isn't a Product. Items without\n // `shareable_type` (static products / untagged feeds) fall through.\n const shareableType = (product as { shareable_type?: string })\n .shareable_type;\n if (shareableType != null && shareableType !== \"Product\")\n return null;\n const productId = product.id;\n return (\n <ProductCard\n key={productId}\n product={tagPortalProduct(normalizeDataSourceProduct(product))}\n onClick={() => handleSelect(productId)}\n />\n );\n })}\n </div>\n )}\n </div>\n );\n}\n\nfunction CatalogBody({\n columns,\n pageSize,\n titleEnabled,\n title,\n titleColor,\n showSearch,\n showSort,\n cardBackground,\n cardTextColor,\n}: {\n columns: ColumnsKey;\n pageSize: number;\n titleEnabled: boolean;\n title: string | undefined;\n titleColor: ColorOptions;\n showSearch: boolean;\n showSort: boolean;\n cardBackground: ColorOptions | undefined;\n cardTextColor: ColorOptions | undefined;\n}) {\n const observerTarget = useRef<HTMLDivElement>(null);\n const { onNavigate } = useWidgetInteraction();\n\n const catalog = usePortalProductCatalog({ perPage: pageSize });\n const {\n data,\n isLoading,\n isFetchingNextPage,\n hasNextPage,\n fetchNextPage,\n error,\n isFetched,\n } = useInfiniteQuery({\n queryKey: catalog.queryKey,\n queryFn: ({ pageParam, signal }) =>\n catalog.fetchProducts(pageParam, signal),\n getNextPageParam: catalog.getNextPageParam,\n initialPageParam: undefined as PortalProductPageParam,\n });\n\n const allProducts = useMemo(\n () => data?.pages.flatMap((page) => page.products) ?? [],\n [data?.pages],\n );\n\n // Hard cap so pageSize doubles as a \"show at most N\" limit.\n const visibleProducts = useMemo(\n () => allProducts.slice(0, pageSize),\n [allProducts, pageSize],\n );\n const reachedLimit = visibleProducts.length >= pageSize;\n\n const handleIntersect = useCallback(\n (entries: IntersectionObserverEntry[]) => {\n if (\n entries[0]?.isIntersecting &&\n hasNextPage &&\n !isFetchingNextPage &&\n !reachedLimit\n ) {\n fetchNextPage();\n }\n },\n [hasNextPage, isFetchingNextPage, fetchNextPage, reachedLimit],\n );\n\n useEffect(() => {\n const target = observerTarget.current;\n if (!target) return;\n const observer = new IntersectionObserver(handleIntersect, {\n threshold: 0.1,\n rootMargin: \"200px\",\n });\n observer.observe(target);\n return () => observer.disconnect();\n }, [handleIntersect]);\n\n const handleSelect = useCallback(\n (id: string | number) => {\n onNavigate?.(`shop/${id}`);\n },\n [onNavigate],\n );\n\n const hasTitle = titleEnabled && !!title;\n const hasHeader = hasTitle || showSearch || showSort;\n\n return (\n <div>\n {hasHeader && (\n <div className=\"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2\">\n {hasTitle && (\n <h2\n className={`text-${titleColor} text-2xl font-semibold tracking-tight`}\n >\n {title}\n </h2>\n )}\n {(showSearch || showSort) && (\n <div className=\"flex items-center gap-2 sm:ml-auto\">\n {showSearch && (\n <div className=\"w-full max-w-sm sm:w-64\">\n <SearchSort\n searchValue={catalog.searchTerm}\n onSearchChange={catalog.setSearchTerm}\n placeholder=\"Search products\"\n />\n </div>\n )}\n {showSort && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"border-foreground/10 size-9 shrink-0\"\n >\n <ArrowUpDown className=\"size-3\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-60\">\n <DropdownMenuLabel>Sort by</DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuRadioGroup\n value={catalog.currentSort}\n onValueChange={catalog.setCurrentSort}\n >\n {SORT_OPTIONS.map((opt) => (\n <DropdownMenuRadioItem key={opt.id} value={opt.id}>\n {opt.label}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n )}\n </div>\n )}\n\n {isLoading ? (\n <SkeletonGrid columns={columns} count={columns * 2} />\n ) : error && visibleProducts.length === 0 ? (\n <div className=\"bg-destructive/10 text-destructive my-6 rounded-lg px-4 py-3 text-sm\">\n Couldn&rsquo;t load products. Try again later.\n </div>\n ) : isFetched && visibleProducts.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <p className=\"text-muted-foreground text-sm\">\n {catalog.searchTerm\n ? `No products match “${catalog.searchTerm}”.`\n : \"No products yet.\"}\n </p>\n </div>\n ) : (\n <>\n <div\n className={GRID_BY_COLUMNS[columns]}\n style={cardScopedStyle(cardBackground, cardTextColor)}\n >\n {visibleProducts.map((product) => {\n if (product.id == null) return null;\n const productId = product.id;\n return (\n <ProductCard\n key={productId}\n product={tagPortalProduct(product)}\n onClick={() => handleSelect(productId)}\n />\n );\n })}\n </div>\n {!reachedLimit && <div ref={observerTarget} />}\n {isFetchingNextPage && !reachedLimit && (\n <div className=\"mt-6\">\n <SkeletonGrid columns={columns} count={columns} />\n </div>\n )}\n {error && (\n <div className=\"bg-destructive/10 text-destructive mt-6 rounded-lg px-4 py-3 text-sm\">\n Couldn&rsquo;t load more products. Try again later.\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n\nfunction ProductCardCompact({\n name,\n imageUrl,\n price,\n onClick,\n}: {\n name: string;\n imageUrl: string | null;\n price: string | null;\n onClick?: () => void;\n}) {\n const interactive = !!onClick;\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={!interactive}\n className={`bg-card text-card-foreground group flex flex-col overflow-hidden rounded-lg border border-transparent text-left ${interactive ? \"hover:border-border cursor-pointer transition-shadow hover:shadow-md\" : \"cursor-default\"} focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none`}\n >\n <div className=\"bg-muted relative aspect-square w-full overflow-hidden\">\n {imageUrl ? (\n <img\n src={imageUrl}\n alt={name}\n className=\"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.03]\"\n loading=\"lazy\"\n />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center\">\n <ImageIcon className=\"text-muted-foreground/40 size-10\" />\n </div>\n )}\n </div>\n <div className=\"p-3\">\n <h3 className=\"text-foreground line-clamp-2 text-sm font-medium\">\n {name}\n </h3>\n {price && (\n <p className=\"text-foreground mt-1 text-sm font-semibold\">{price}</p>\n )}\n </div>\n </button>\n );\n}\n\nfunction SkeletonGrid({\n columns,\n count,\n}: {\n columns: ColumnsKey;\n count: number;\n}) {\n return (\n <div className={GRID_BY_COLUMNS[columns]}>\n {Array.from({ length: count }, (_, i) => (\n <div key={i} className=\"space-y-3\">\n <Skeleton className=\"aspect-square w-full rounded-lg\" />\n <Skeleton className=\"h-4 w-3/4\" />\n <Skeleton className=\"h-4 w-1/3\" />\n </div>\n ))}\n </div>\n );\n}\n\nexport const shopWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShopWidget\",\n displayName: \"Shop\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"data\", label: \"Data\" },\n ],\n dataSourceTargetProps: [\"products\"],\n fields: [\n // Title group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the heading shown above the grid\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Heading text shown above the grid\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color of the heading text\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Display group\n {\n key: \"showSearch\",\n label: \"Show Search\",\n type: \"boolean\",\n description: \"Display the search input above the grid\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Display\",\n requiresKeyValue: { key: \"useDataSource\", value: false },\n },\n {\n key: \"showSort\",\n label: \"Show Sort\",\n type: \"boolean\",\n description: \"Display the sort menu above the grid\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Display\",\n requiresKeyValue: { key: \"useDataSource\", value: false },\n },\n {\n key: \"columns\",\n label: \"Columns (desktop)\",\n type: \"select\",\n description:\n \"Max columns at the largest breakpoint. Mobile is always 2 columns; intermediate sizes scale smoothly between.\",\n options: [\n { label: \"2\", value: 2 },\n { label: \"3\", value: 3 },\n { label: \"4\", value: 4 },\n { label: \"5\", value: 5 },\n { label: \"6\", value: 6 },\n ],\n defaultValue: 4,\n tab: \"styling\",\n group: \"Display\",\n },\n\n // Design group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Container background\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Inner spacing around the grid\",\n defaultValue: 6,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Container corner radius\",\n defaultValue: \"lg\",\n tab: \"styling\",\n group: \"Design\",\n }),\n\n // Card group — optional theme overrides; unset means \"inherit from theme\".\n getColorField({\n key: \"cardBackground\",\n label: \"Card Background\",\n description:\n \"Override the card background color. Leave unset to use the theme's card color.\",\n tab: \"styling\",\n group: \"Card\",\n }),\n getColorField({\n key: \"cardTextColor\",\n label: \"Card Text\",\n description:\n \"Override title + price color inside each card. Leave unset to use the theme's foreground color.\",\n tab: \"styling\",\n group: \"Card\",\n }),\n\n // Data tab\n {\n key: \"useDataSource\",\n label: \"Use Data Source\",\n type: \"boolean\",\n description:\n \"Off shows all products from the catalog. On replaces the catalog with a data source — disables search and sort.\",\n defaultValue: false,\n tab: \"data\",\n group: \"Data Configuration\",\n },\n {\n key: \"pageSize\",\n label: \"Products to show\",\n type: \"number\",\n description: \"Maximum number of products rendered in the grid\",\n defaultValue: 25,\n min: 5,\n max: 100,\n step: 5,\n tab: \"data\",\n group: \"Data Configuration\",\n requiresKeyValue: { key: \"useDataSource\", value: false },\n },\n {\n key: \"dataSource\",\n label: \"Data Source\",\n type: \"dataSource\",\n description: \"\",\n tab: \"data\",\n group: \"Data Configuration\",\n requiresKeyToBeTrue: \"useDataSource\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;;;;AAGA,MAAM,EAAE,UAAU,mBAAmB,yBAAmC,OAAO;AAE/E,MAAa,0BAA0B;AACvC,MAAa,qBAAqB;;;ACNlC,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAeD,SAAgB,WAAW,KAAyC;AAClE,KAAI,CAAC,IAAK,QAAO;CACjB,MAAM,WAAW,IAAI,aAAa;AAClC,QAAO,iBAAiB,MAAM,QAAQ,SAAS,SAAS,IAAI,CAAC;;AAiB/D,SAAgB,qBAAqB,UAA0B;AAC7D,KAAI,SAAS,SAAS,iBAAiB,CACrC,QAAO,GAAG,SAAS;AAErB,QAAO;;;;ACPT,SAAgB,iBACd,SACqB;AACrB,QAAO;EAAE,GAAG;EAAS,iBAAiB;EAAe;;AAGvD,SAAS,gBACP,SACgC;AAChC,QAAO,qBAAqB,WAAW,QAAQ,oBAAoB;;AAGrE,SAAS,2BACP,SACe;AACf,KAAI,QAAQ,UAAU,QAAQ,OAAO,SAAS,EAC5C,QAAO,QAAQ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L,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,KAAK;GACL,MAAM;GACN,KAAK;GACL,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAiB,OAAO;IAAO;GACzD;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACF;CACF"}
@@ -1,4 +1,4 @@
1
- import { vt as __exportAll } from "./PortalTenantClientProvider-BmRtQAbi.mjs";
1
+ import { vt as __exportAll } from "./PortalTenantClientProvider-DVClpfbi.mjs";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { ArrowUpDown } from "lucide-react";
4
4
  //#region ../widgets/src/widgets/SpacerWidget.tsx
@@ -56,4 +56,4 @@ const spacerWidgetPropertySchema = {
56
56
  //#endregion
57
57
  export { SpacerWidget_exports as n, spacerWidgetPropertySchema as r, SpacerWidget as t };
58
58
 
59
- //# sourceMappingURL=SpacerWidget-B0l19UqF.mjs.map
59
+ //# sourceMappingURL=SpacerWidget-BhxIaqYF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpacerWidget-B0l19UqF.mjs","names":[],"sources":["../../widgets/src/widgets/SpacerWidget.tsx"],"sourcesContent":["import { type WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport { ArrowUpDown } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\ntype SpacerWidgetProps = ComponentProps<\"div\"> & {\n /**\n * Custom height as a CSS value (e.g., \"128px\", \"8rem\", \"20vh\")\n */\n customHeight?: string;\n /**\n * Not customizable, determines if we should show a preview image in the container\n */\n previewMode?: boolean;\n};\n\nexport function SpacerWidget({\n customHeight = \"128px\",\n previewMode = false,\n className,\n style,\n ...props\n}: SpacerWidgetProps): React.JSX.Element {\n return (\n <div\n className={`w-full ${className ?? \"\"}`}\n style={{ height: customHeight, ...style }}\n aria-hidden=\"true\"\n {...props}\n >\n {previewMode && (\n <div className=\"border-muted/40 bg-muted text-muted-foreground flex h-full w-full items-center justify-center gap-1 border border-dashed\">\n <ArrowUpDown />\n <span>SPACER</span>\n </div>\n )}\n </div>\n );\n}\n\nexport const spacerWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SpacerWidget\",\n displayName: \"Spacer\",\n fields: [\n {\n key: \"customHeight\",\n label: \"Height\",\n type: \"cssUnit\",\n description: \"Height of the spacer\",\n defaultValue: \"128px\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 1, vh: 1, rem: 0.25 },\n maxByUnit: { px: 2000, vh: 100, rem: 125 },\n stepByUnit: { px: 1, vh: 1, rem: 0.25 },\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;AAgBA,SAAgB,aAAa,EAC3B,eAAe,SACf,cAAc,OACd,WACA,OACA,GAAG,SACoC;AACvC,QACE,oBAAC,OAAD;EACE,WAAW,UAAU,aAAa;EAClC,OAAO;GAAE,QAAQ;GAAc,GAAG;GAAO;EACzC,eAAY;EACZ,GAAI;YAEH,eACC,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,aAAD,EAAe,CAAA,EACf,oBAAC,QAAD,EAAA,UAAM,UAAa,CAAA,CACf;;EAEJ,CAAA;;AAIV,MAAa,6BAAmD;CAC9D,YAAY;CACZ,aAAa;CACb,QAAQ,CACN;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,cAAc;EACd,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACtC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAK;EAC1C,YAAY;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACvC,OAAO;EACR,CACF;CACF"}
1
+ {"version":3,"file":"SpacerWidget-BhxIaqYF.mjs","names":[],"sources":["../../widgets/src/widgets/SpacerWidget.tsx"],"sourcesContent":["import { type WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport { ArrowUpDown } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\ntype SpacerWidgetProps = ComponentProps<\"div\"> & {\n /**\n * Custom height as a CSS value (e.g., \"128px\", \"8rem\", \"20vh\")\n */\n customHeight?: string;\n /**\n * Not customizable, determines if we should show a preview image in the container\n */\n previewMode?: boolean;\n};\n\nexport function SpacerWidget({\n customHeight = \"128px\",\n previewMode = false,\n className,\n style,\n ...props\n}: SpacerWidgetProps): React.JSX.Element {\n return (\n <div\n className={`w-full ${className ?? \"\"}`}\n style={{ height: customHeight, ...style }}\n aria-hidden=\"true\"\n {...props}\n >\n {previewMode && (\n <div className=\"border-muted/40 bg-muted text-muted-foreground flex h-full w-full items-center justify-center gap-1 border border-dashed\">\n <ArrowUpDown />\n <span>SPACER</span>\n </div>\n )}\n </div>\n );\n}\n\nexport const spacerWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SpacerWidget\",\n displayName: \"Spacer\",\n fields: [\n {\n key: \"customHeight\",\n label: \"Height\",\n type: \"cssUnit\",\n description: \"Height of the spacer\",\n defaultValue: \"128px\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 1, vh: 1, rem: 0.25 },\n maxByUnit: { px: 2000, vh: 100, rem: 125 },\n stepByUnit: { px: 1, vh: 1, rem: 0.25 },\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;AAgBA,SAAgB,aAAa,EAC3B,eAAe,SACf,cAAc,OACd,WACA,OACA,GAAG,SACoC;AACvC,QACE,oBAAC,OAAD;EACE,WAAW,UAAU,aAAa;EAClC,OAAO;GAAE,QAAQ;GAAc,GAAG;GAAO;EACzC,eAAY;EACZ,GAAI;YAEH,eACC,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,aAAD,EAAe,CAAA,EACf,oBAAC,QAAD,EAAA,UAAM,UAAa,CAAA,CACf;;EAEJ,CAAA;;AAIV,MAAa,6BAAmD;CAC9D,YAAY;CACZ,aAAa;CACb,QAAQ,CACN;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,cAAc;EACd,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACtC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAK;EAC1C,YAAY;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACvC,OAAO;EACR,CACF;CACF"}
@@ -0,0 +1,50 @@
1
+ import "./PortalTenantClientProvider-DVClpfbi.mjs";
2
+ import "./FluidProvider-B4Za_Bnw.mjs";
3
+ import "./ScreenRenderer-D3zNFSr3.mjs";
4
+ import "./store-api-context-B_vtKkXO.mjs";
5
+ import "./mysite-api-context-CoLr9vIf.mjs";
6
+ import "./countries-api-context-Donus2X5.mjs";
7
+ import "./task-composer-form-CZgRqbIc.mjs";
8
+ import "./registry-context-CcoVxCii.mjs";
9
+ import "./WidgetInteractionContext-BWH7njU7.mjs";
10
+ import "./EmbedWidget-DRfjHvRs.mjs";
11
+ import "./QuickLinksWidget-DJUI7r5_.mjs";
12
+ import "./static-dict-adapter-DRBq3ndO.mjs";
13
+ import "./error-state-BUe589mD.mjs";
14
+ import "./translation-api-context-factory-DFr9yJ6Q.mjs";
15
+ import "./LayoutWidget-CSFWeXYY.mjs";
16
+ import "./registries-59Barbhg.mjs";
17
+ import "./fields-Dm8-nLc_.mjs";
18
+ import "./TextWidget-B5ZtQMX-.mjs";
19
+ import "./AlertWidget-DMwOt9u8.mjs";
20
+ import "./BulletListWidget-D--Mmasw.mjs";
21
+ import "./preview-context-BXEGWx9T.mjs";
22
+ import "./CalendarWidget-Cx6KvkaG.mjs";
23
+ import "./CardWidget-DARqLSwy.mjs";
24
+ import "./purify.es-Bl6SBkmi.mjs";
25
+ import "./MediaRenderer-Db1KsIza.mjs";
26
+ import "./CarouselWidget-Bnl_iggA.mjs";
27
+ import "./CatchUpWidget-Bplozt8D.mjs";
28
+ import "./src-CJw6JbdS.mjs";
29
+ import { n as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-d527tZfc.mjs";
30
+ import "./ChartWidget-BPOZNKI_.mjs";
31
+ import "./ContainerWidget-Bv0f8-TC.mjs";
32
+ import "./ImageWidget-C7nfRJ6p.mjs";
33
+ import "./LinkWidget-DI2Uod5O.mjs";
34
+ import "./ListWidget-BdUhs2fo.mjs";
35
+ import "./MySiteWidget-ivytLi6H.mjs";
36
+ import "./NestedWidget-gqdWZS9Q.mjs";
37
+ import "./PointsWidget-BJlOIK6o.mjs";
38
+ import "./QuickShareWidget-B7DhQOyt.mjs";
39
+ import "./RecentActivityWidget-BMGeLSUa.mjs";
40
+ import "./SeparatorWidget-CGFzy35l.mjs";
41
+ import "./SpacerWidget-BhxIaqYF.mjs";
42
+ import "./TableWidget-Dwud4Fif.mjs";
43
+ import "./ToDoWidget-Bnml3xLS.mjs";
44
+ import "./VideoWidget-Cm3UQ3-Z.mjs";
45
+ import "./SearchSort-C6RV6d9g.mjs";
46
+ import "./ShopWidget-Cqnwq0AG.mjs";
47
+ import "./ScreenHeaderContext-cuVMk00X.mjs";
48
+ import "./AddressAutocompleteInput-CgOFJKwF.mjs";
49
+ import "./Combobox-D8LKqQ19.mjs";
50
+ export { SubscriptionsScreen, subscriptionsScreenPropertySchema };
@@ -1,16 +1,16 @@
1
1
  require("./chunk-9hOWP6kD.cjs");
2
- const require_FluidProvider = require("./FluidProvider-B9YdRuHR.cjs");
3
- const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-Bpm-CZq1.cjs");
4
- const require_countries_api_context = require("./countries-api-context-G-NW4BoH.cjs");
5
- const require_static_dict_adapter = require("./static-dict-adapter-JAau5LHb.cjs");
6
- const require_translation_api_context_factory = require("./translation-api-context-factory-BSRK6Z50.cjs");
2
+ const require_FluidProvider = require("./FluidProvider-DvHJZkGi.cjs");
3
+ const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-C0eJp8MN.cjs");
4
+ const require_countries_api_context = require("./countries-api-context-16PZpF7O.cjs");
5
+ const require_static_dict_adapter = require("./static-dict-adapter-BLq4QzCI.cjs");
6
+ const require_translation_api_context_factory = require("./translation-api-context-factory-CjRDqIhF.cjs");
7
7
  const require_src = require("./src-Cx7UyT_c.cjs");
8
- const require_ScreenHeaderContext = require("./ScreenHeaderContext-BiGgRqjY.cjs");
9
- const require_use_store = require("./use-store-lOOUcpRT.cjs");
8
+ const require_ScreenHeaderContext = require("./ScreenHeaderContext-VOp8pVHr.cjs");
9
+ const require_use_store = require("./use-store-j_6I4DU4.cjs");
10
10
  const require_query_keys = require("./query-keys-elu0svUd.cjs");
11
- const require_use_account = require("./use-account-CQ-mhA3W.cjs");
12
- const require_AppNavigationContext = require("./AppNavigationContext-CoNtdUrr.cjs");
13
- const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-BVG7EOyI.cjs");
11
+ const require_use_account = require("./use-account-DltRHEwC.cjs");
12
+ const require_AppNavigationContext = require("./AppNavigationContext-CLOwdlpx.cjs");
13
+ const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-C2Wx9yrV.cjs");
14
14
  const require_isAfter = require("./isAfter-BCyWSyQs.cjs");
15
15
  let react = require("react");
16
16
  let _tanstack_react_query = require("@tanstack/react-query");
@@ -2141,7 +2141,7 @@ function cleanEscapedString(input) {
2141
2141
  const SubscriptionsApiContext = (0, react.createContext)(null);
2142
2142
  const SubscriptionsApiProvider = SubscriptionsApiContext.Provider;
2143
2143
  function useSubscriptionsApi() {
2144
- const api = (0, react.useContext)(SubscriptionsApiContext);
2144
+ const api = (0, react.use)(SubscriptionsApiContext);
2145
2145
  if (!api) throw new Error("useSubscriptionsApi must be used within a SubscriptionsCoreProvider");
2146
2146
  return api;
2147
2147
  }
@@ -2177,7 +2177,7 @@ const bundlesKeys = {
2177
2177
  const BundlesApiContext = (0, react.createContext)(null);
2178
2178
  const BundlesApiProvider = BundlesApiContext.Provider;
2179
2179
  function useBundlesApi() {
2180
- const api = (0, react.useContext)(BundlesApiContext);
2180
+ const api = (0, react.use)(BundlesApiContext);
2181
2181
  if (!api) throw new Error("useBundlesApi must be used within a BundlesCoreProvider");
2182
2182
  return api;
2183
2183
  }
@@ -5033,7 +5033,7 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
5033
5033
  className: "space-y-4",
5034
5034
  children: [
5035
5035
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5036
- className: "flex items-center space-x-2",
5036
+ className: "flex items-center gap-x-2",
5037
5037
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
5038
5038
  id: "pause-indefinitely",
5039
5039
  type: "radio",
@@ -5049,7 +5049,7 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
5049
5049
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5050
5050
  className: "space-y-2",
5051
5051
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5052
- className: "flex items-center space-x-2",
5052
+ className: "flex items-center gap-x-2",
5053
5053
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
5054
5054
  id: "pause-order-count",
5055
5055
  type: "radio",
@@ -5093,7 +5093,7 @@ function PauseSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, err
5093
5093
  children: errorMessage
5094
5094
  }),
5095
5095
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogFooter, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5096
- className: "flex w-full flex-row justify-between space-x-2",
5096
+ className: "flex w-full flex-row justify-between gap-x-2",
5097
5097
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
5098
5098
  variant: "outline",
5099
5099
  className: "h-10 min-w-[70px] rounded p-3",
@@ -5226,7 +5226,7 @@ function ResumeSubscriptionDialog({ open, onOpenChange, onConfirm, isLoading, er
5226
5226
  children: errorMessage
5227
5227
  }),
5228
5228
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogFooter, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5229
- className: "flex w-full flex-row justify-between space-x-2",
5229
+ className: "flex w-full flex-row justify-between gap-x-2",
5230
5230
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
5231
5231
  className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
5232
5232
  onClick: () => handleDismiss(false),
@@ -5484,7 +5484,7 @@ function EditBillDateDialog({ open, onOpenChange, onConfirm, isLoading, errorMes
5484
5484
  children: errorMessage
5485
5485
  }),
5486
5486
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.DialogFooter, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5487
- className: "flex w-full flex-row justify-between space-x-2",
5487
+ className: "flex w-full flex-row justify-between gap-x-2",
5488
5488
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Button, {
5489
5489
  variant: "outline",
5490
5490
  className: "h-10 min-w-[70px] rounded p-3",
@@ -5686,7 +5686,7 @@ function SubscriptionDetailSkeleton() {
5686
5686
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-16 w-full rounded" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-16 w-full rounded" })]
5687
5687
  }),
5688
5688
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5689
- className: "mt-6 flex items-center space-x-4",
5689
+ className: "mt-6 flex items-center gap-x-4",
5690
5690
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "size-24 rounded" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5691
5691
  className: "flex-1 space-y-2",
5692
5692
  children: [
@@ -5898,9 +5898,9 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
5898
5898
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5899
5899
  className: "py-6",
5900
5900
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5901
- className: "flex flex-row items-center space-x-4",
5901
+ className: "flex flex-row items-center gap-x-4",
5902
5902
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5903
- className: "flex min-w-0 flex-1 flex-row space-x-4",
5903
+ className: "flex min-w-0 flex-1 flex-row gap-x-4",
5904
5904
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5905
5905
  className: "relative shrink-0",
5906
5906
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -5920,7 +5920,7 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
5920
5920
  })]
5921
5921
  })
5922
5922
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5923
- className: "flex min-w-0 flex-col space-y-0.5",
5923
+ className: "flex min-w-0 flex-col gap-y-0.5",
5924
5924
  children: [
5925
5925
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
5926
5926
  className: "text-foreground truncate text-sm font-medium",
@@ -6625,11 +6625,11 @@ function SelectablePaymentMethodDropdown({ title, displayPaymentMethod, paymentM
6625
6625
  id: sectionId,
6626
6626
  role: "listbox",
6627
6627
  "aria-label": title,
6628
- className: "mt-5 flex max-h-[400px] flex-col space-y-4 overflow-y-auto pr-0.5",
6628
+ className: "mt-5 flex max-h-[400px] flex-col gap-y-4 overflow-y-auto pr-0.5",
6629
6629
  children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: [1, 2].map((i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6630
- className: "bg-muted flex flex-row items-center space-x-2 rounded-sm p-3",
6630
+ className: "bg-muted flex flex-row items-center gap-x-2 rounded-sm p-3",
6631
6631
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-6 w-10" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6632
- className: "flex flex-col space-y-1",
6632
+ className: "flex flex-col gap-y-1",
6633
6633
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-4 w-32" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_src.Skeleton, { className: "h-4 w-24" })]
6634
6634
  })]
6635
6635
  }, `skeleton-${i}`)) }) : paymentMethodList.map((paymentMethod) => {
@@ -7036,7 +7036,7 @@ function SelectableAddressDropdown({ title, displayAddress, addressList, selecte
7036
7036
  id: sectionId,
7037
7037
  role: "listbox",
7038
7038
  "aria-label": title,
7039
- className: "mt-5 flex max-h-[400px] flex-col space-y-4 overflow-y-auto pr-0.5",
7039
+ className: "mt-5 flex max-h-[400px] flex-col gap-y-4 overflow-y-auto pr-0.5",
7040
7040
  children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: [1, 2].map((i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
7041
7041
  className: "bg-muted rounded-sm p-3",
7042
7042
  children: [
@@ -7448,4 +7448,4 @@ Object.defineProperty(exports, "subscriptionsScreenPropertySchema", {
7448
7448
  }
7449
7449
  });
7450
7450
 
7451
- //# sourceMappingURL=SubscriptionsScreen-3LGH99fz.cjs.map
7451
+ //# sourceMappingURL=SubscriptionsScreen-CihWk-dF.cjs.map