@fluid-app/portal-sdk 0.1.45 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AlertWidget-CRYuxgyZ.cjs → AlertWidget-CSYWU2c3.cjs} +2 -2
- package/dist/{AlertWidget-CRYuxgyZ.cjs.map → AlertWidget-CSYWU2c3.cjs.map} +1 -1
- package/dist/{AlertWidget-DnygF0ze.mjs → AlertWidget-DTrMt8y7.mjs} +2 -2
- package/dist/{AlertWidget-DnygF0ze.mjs.map → AlertWidget-DTrMt8y7.mjs.map} +1 -1
- package/dist/{BulletListWidget-DfXMbboF.cjs → BulletListWidget-BUMq15V1.cjs} +18 -4
- package/dist/BulletListWidget-BUMq15V1.cjs.map +1 -0
- package/dist/{BulletListWidget-bvVUvGOQ.mjs → BulletListWidget-riFNn47D.mjs} +19 -5
- package/dist/BulletListWidget-riFNn47D.mjs.map +1 -0
- package/dist/{CalendarWidget-YybCIktI.mjs → CalendarWidget-B9I__jsL.mjs} +20 -4
- package/dist/CalendarWidget-B9I__jsL.mjs.map +1 -0
- package/dist/{CalendarWidget-BAHiko62.cjs → CalendarWidget-DLkcnQVx.cjs} +19 -3
- package/dist/CalendarWidget-DLkcnQVx.cjs.map +1 -0
- package/dist/{CardWidget-h-FAxb1X.cjs → CardWidget-B4cJHq6g.cjs} +18 -10
- package/dist/CardWidget-B4cJHq6g.cjs.map +1 -0
- package/dist/{CardWidget-DBv4M9Wx.cjs → CardWidget-BtX2jjQR.cjs} +1 -1
- package/dist/{CardWidget-BOk-hod0.mjs → CardWidget-CzRI-odk.mjs} +19 -11
- package/dist/CardWidget-CzRI-odk.mjs.map +1 -0
- package/dist/{CarouselWidget-tT7qklhM.cjs → CarouselWidget-BcnZwnIh.cjs} +1 -1
- package/dist/{CarouselWidget-D-hBiS_H.cjs → CarouselWidget-Bx5jrthO.cjs} +19 -3
- package/dist/CarouselWidget-Bx5jrthO.cjs.map +1 -0
- package/dist/{CarouselWidget-Cqk2VJzH.mjs → CarouselWidget-C04z7JxO.mjs} +20 -4
- package/dist/CarouselWidget-C04z7JxO.mjs.map +1 -0
- package/dist/{CatchUpWidget-Bq5Z7dnd.cjs → CatchUpWidget-CFL4REYX.cjs} +19 -3
- package/dist/CatchUpWidget-CFL4REYX.cjs.map +1 -0
- package/dist/{CatchUpWidget-ZsrbwaTu.mjs → CatchUpWidget-Cb0B0G90.mjs} +20 -4
- package/dist/CatchUpWidget-Cb0B0G90.mjs.map +1 -0
- package/dist/{ChartWidget-B6_n_Jp8.cjs → ChartWidget-DWWeWN0Q.cjs} +19 -3
- package/dist/ChartWidget-DWWeWN0Q.cjs.map +1 -0
- package/dist/{ChartWidget-CU3_7LIS.mjs → ChartWidget-WaLM-zc-.mjs} +20 -4
- package/dist/ChartWidget-WaLM-zc-.mjs.map +1 -0
- package/dist/{ChartWidget-DVZSBgqe.cjs → ChartWidget-_jzD434L.cjs} +1 -1
- package/dist/ContactsScreen-B4FZ0Qeu.mjs +37 -0
- package/dist/{ContactsScreen-CTCJYpHu.cjs → ContactsScreen-C0I1_D_a.cjs} +2 -2
- package/dist/{ContactsScreen-CTCJYpHu.cjs.map → ContactsScreen-C0I1_D_a.cjs.map} +1 -1
- package/dist/{ContactsScreen-CoXP9Lt3.mjs → ContactsScreen-CoFB7EM3.mjs} +2 -2
- package/dist/{ContactsScreen-CoXP9Lt3.mjs.map → ContactsScreen-CoFB7EM3.mjs.map} +1 -1
- package/dist/ContactsScreen-DO7EwobV.cjs +39 -0
- package/dist/{ContainerWidget-CCqS2O6i.cjs → ContainerWidget-BFdpfJP9.cjs} +2 -2
- package/dist/{ContainerWidget-N8zf088I.cjs → ContainerWidget-DZXzmDZl.cjs} +2 -2
- package/dist/{ContainerWidget-N8zf088I.cjs.map → ContainerWidget-DZXzmDZl.cjs.map} +1 -1
- package/dist/{ContainerWidget-CFvliHMt.mjs → ContainerWidget-PNfcrIfV.mjs} +3 -3
- package/dist/{ContainerWidget-CFvliHMt.mjs.map → ContainerWidget-PNfcrIfV.mjs.map} +1 -1
- package/dist/{EmbedWidget-CRCZwIZl.mjs → EmbedWidget-BgDpu44-.mjs} +18 -3
- package/dist/EmbedWidget-BgDpu44-.mjs.map +1 -0
- package/dist/{EmbedWidget-DQB5SADr.cjs → EmbedWidget-D6eRvOud.cjs} +17 -3
- package/dist/EmbedWidget-D6eRvOud.cjs.map +1 -0
- package/dist/{FluidProvider-CRceQXyP.cjs → FluidProvider-DzrMOFXn.cjs} +43 -43
- package/dist/{FluidProvider-CRceQXyP.cjs.map → FluidProvider-DzrMOFXn.cjs.map} +1 -1
- package/dist/{FluidProvider-wbFFOVLt.mjs → FluidProvider-iYl6DSax.mjs} +45 -45
- package/dist/{FluidProvider-wbFFOVLt.mjs.map → FluidProvider-iYl6DSax.mjs.map} +1 -1
- package/dist/{ImageWidget-m5oDe9uw.mjs → ImageWidget-CvRlDtEa.mjs} +18 -3
- package/dist/ImageWidget-CvRlDtEa.mjs.map +1 -0
- package/dist/{ImageWidget-2ZYY9Ea9.cjs → ImageWidget-DwM4H6SC.cjs} +17 -3
- package/dist/ImageWidget-DwM4H6SC.cjs.map +1 -0
- package/dist/{LayoutWidget-Cfyr6h-3.cjs → LayoutWidget-CJ_OSMpt.cjs} +1 -1
- package/dist/{LayoutWidget-SPn4xt-J.cjs → LayoutWidget-CsdItxHF.cjs} +17 -3
- package/dist/LayoutWidget-CsdItxHF.cjs.map +1 -0
- package/dist/{LayoutWidget-B23HX9yD.mjs → LayoutWidget-pS3AMhD7.mjs} +18 -4
- package/dist/LayoutWidget-pS3AMhD7.mjs.map +1 -0
- package/dist/{LinkWidget-BFBAfz2T.cjs → LinkWidget-CJKveS10.cjs} +18 -4
- package/dist/LinkWidget-CJKveS10.cjs.map +1 -0
- package/dist/{LinkWidget-DVjXtQgl.cjs → LinkWidget-DFApxWIK.cjs} +1 -1
- package/dist/{LinkWidget-DImz_Kgl.mjs → LinkWidget-NR2OqU4Y.mjs} +19 -5
- package/dist/LinkWidget-NR2OqU4Y.mjs.map +1 -0
- package/dist/{ListWidget-B5PMqdCy.cjs → ListWidget-CulUMQ0M.cjs} +1 -1
- package/dist/{ListWidget-4nc_OvSx.cjs → ListWidget-D8yMrpa5.cjs} +19 -3
- package/dist/ListWidget-D8yMrpa5.cjs.map +1 -0
- package/dist/{ListWidget-BiCdEqrT.mjs → ListWidget-Dl2vSYmI.mjs} +20 -4
- package/dist/ListWidget-Dl2vSYmI.mjs.map +1 -0
- package/dist/{MessagingScreen-DXLiIKMX.cjs → MessagingScreen-CUBOR0qo.cjs} +3 -3
- package/dist/{MessagingScreen-DXLiIKMX.cjs.map → MessagingScreen-CUBOR0qo.cjs.map} +1 -1
- package/dist/MessagingScreen-CfbkE7H-.cjs +38 -0
- package/dist/{MessagingScreen-BNw31J4s.mjs → MessagingScreen-DgvqyD7k.mjs} +3 -3
- package/dist/{MessagingScreen-BNw31J4s.mjs.map → MessagingScreen-DgvqyD7k.mjs.map} +1 -1
- package/dist/MessagingScreen-kP-1EJZ5.mjs +36 -0
- package/dist/{MySiteScreen-CCjZRdTu.mjs → MySiteScreen-CvyqpzJd.mjs} +2 -2
- package/dist/{MySiteScreen-CCjZRdTu.mjs.map → MySiteScreen-CvyqpzJd.mjs.map} +1 -1
- package/dist/MySiteScreen-DUMMPU6X.mjs +35 -0
- package/dist/{MySiteScreen-DA9vTjW8.cjs → MySiteScreen-NJSRcmI-.cjs} +2 -2
- package/dist/{MySiteScreen-DA9vTjW8.cjs.map → MySiteScreen-NJSRcmI-.cjs.map} +1 -1
- package/dist/MySiteScreen-jE2m5qP6.cjs +37 -0
- package/dist/{MySiteWidget-Cw7623aF.mjs → MySiteWidget-CD1fK3lT.mjs} +20 -4
- package/dist/MySiteWidget-CD1fK3lT.mjs.map +1 -0
- package/dist/{MySiteWidget-bKaJ4r_k.cjs → MySiteWidget-DeAwyK5y.cjs} +19 -3
- package/dist/MySiteWidget-DeAwyK5y.cjs.map +1 -0
- package/dist/{NestedWidget-DRhUGS_-.cjs → NestedWidget-C-ZEUe-s.cjs} +1 -1
- package/dist/{NestedWidget-Bxf8MJuj.cjs → NestedWidget-CZuN2QY2.cjs} +19 -3
- package/dist/NestedWidget-CZuN2QY2.cjs.map +1 -0
- package/dist/{NestedWidget-DDAcIeej.mjs → NestedWidget-DjZumiak.mjs} +20 -4
- package/dist/NestedWidget-DjZumiak.mjs.map +1 -0
- package/dist/{OrdersScreen-CO3-vKPa.mjs → OrdersScreen-B2ErpU4b.mjs} +3 -3
- package/dist/{OrdersScreen-CO3-vKPa.mjs.map → OrdersScreen-B2ErpU4b.mjs.map} +1 -1
- package/dist/OrdersScreen-BTJAhLgs.mjs +35 -0
- package/dist/OrdersScreen-CE0GMwfC.cjs +37 -0
- package/dist/{OrdersScreen-q1QeUeHP.cjs → OrdersScreen-DvqljQVk.cjs} +3 -3
- package/dist/{OrdersScreen-q1QeUeHP.cjs.map → OrdersScreen-DvqljQVk.cjs.map} +1 -1
- package/dist/ProductsScreen-Bb5icf74.mjs +39 -0
- package/dist/{ProductsScreen-Btv24fan.mjs → ProductsScreen-CBVy5Zyi.mjs} +4 -4
- package/dist/{ProductsScreen-Btv24fan.mjs.map → ProductsScreen-CBVy5Zyi.mjs.map} +1 -1
- package/dist/{ProductsScreen-whYhtGj4.cjs → ProductsScreen-DdX6HMHt.cjs} +4 -4
- package/dist/{ProductsScreen-whYhtGj4.cjs.map → ProductsScreen-DdX6HMHt.cjs.map} +1 -1
- package/dist/ProductsScreen-HIV2lQ9Z.cjs +41 -0
- package/dist/ProfileScreen-BpJ41w20.mjs +34 -0
- package/dist/ProfileScreen-DAFrOHW1.cjs +36 -0
- package/dist/{ProfileScreen-DrmMx9us.cjs → ProfileScreen-LmGvJwTb.cjs} +3 -3
- package/dist/{ProfileScreen-DrmMx9us.cjs.map → ProfileScreen-LmGvJwTb.cjs.map} +1 -1
- package/dist/{ProfileScreen-Dsrj30ts.mjs → ProfileScreen-r8ceJSGs.mjs} +3 -3
- package/dist/{ProfileScreen-Dsrj30ts.mjs.map → ProfileScreen-r8ceJSGs.mjs.map} +1 -1
- package/dist/{QuickShareWidget-DJSBoNdI.cjs → QuickShareWidget-CIfXUWCx.cjs} +19 -3
- package/dist/QuickShareWidget-CIfXUWCx.cjs.map +1 -0
- package/dist/{QuickShareWidget-DzvaOfZL.mjs → QuickShareWidget-CvdvBmEn.mjs} +20 -4
- package/dist/QuickShareWidget-CvdvBmEn.mjs.map +1 -0
- package/dist/{RecentActivityWidget-DxCHufm5.cjs → RecentActivityWidget-kRfjO1IV.cjs} +19 -3
- package/dist/RecentActivityWidget-kRfjO1IV.cjs.map +1 -0
- package/dist/{RecentActivityWidget-Dw6yeZKX.mjs → RecentActivityWidget-uegOsG5c.mjs} +20 -4
- package/dist/RecentActivityWidget-uegOsG5c.mjs.map +1 -0
- package/dist/{SeparatorWidget-DQEGdSLZ.mjs → SeparatorWidget-CkFIxxkI.mjs} +2 -2
- package/dist/{SeparatorWidget-DQEGdSLZ.mjs.map → SeparatorWidget-CkFIxxkI.mjs.map} +1 -1
- package/dist/{ShareablesScreen-DX_Drc1P.mjs → ShareablesScreen-0JcyLc7i.mjs} +4 -4
- package/dist/{ShareablesScreen-DX_Drc1P.mjs.map → ShareablesScreen-0JcyLc7i.mjs.map} +1 -1
- package/dist/ShareablesScreen-CBw3gH0u.cjs +41 -0
- package/dist/{ShareablesScreen-CLjjDaWJ.cjs → ShareablesScreen-Dfa0LM6R.cjs} +4 -4
- package/dist/{ShareablesScreen-CLjjDaWJ.cjs.map → ShareablesScreen-Dfa0LM6R.cjs.map} +1 -1
- package/dist/ShareablesScreen-Riod6fjb.mjs +39 -0
- package/dist/{ShopScreen-DxU3HMSU.cjs → ShopScreen-C73ARj6e.cjs} +4 -4
- package/dist/{ShopScreen-DxU3HMSU.cjs.map → ShopScreen-C73ARj6e.cjs.map} +1 -1
- package/dist/ShopScreen-CET9016G.cjs +36 -0
- package/dist/{ShopScreen-DH3E7AIz.mjs → ShopScreen-DMDSD4gF.mjs} +4 -4
- package/dist/{ShopScreen-DH3E7AIz.mjs.map → ShopScreen-DMDSD4gF.mjs.map} +1 -1
- package/dist/ShopScreen-Ddrw43gs.mjs +34 -0
- package/dist/{SubscriptionsScreen-JVUC37A9.mjs → SubscriptionsScreen-BLrScFQV.mjs} +3 -3
- package/dist/{SubscriptionsScreen-JVUC37A9.mjs.map → SubscriptionsScreen-BLrScFQV.mjs.map} +1 -1
- package/dist/SubscriptionsScreen-BMjdIyWT.mjs +35 -0
- package/dist/SubscriptionsScreen-CPXCoeeu.cjs +37 -0
- package/dist/{SubscriptionsScreen-Bi8ecPZG.cjs → SubscriptionsScreen-CpvMZaU0.cjs} +3 -3
- package/dist/{SubscriptionsScreen-Bi8ecPZG.cjs.map → SubscriptionsScreen-CpvMZaU0.cjs.map} +1 -1
- package/dist/{TableWidget-D2QlWEXk.cjs → TableWidget-DFWfQIWv.cjs} +19 -3
- package/dist/TableWidget-DFWfQIWv.cjs.map +1 -0
- package/dist/{TableWidget-C_3ocWPY.cjs → TableWidget-WB7hx4Hb.cjs} +1 -1
- package/dist/{TableWidget-kq_rQCoV.mjs → TableWidget-aZUcob2U.mjs} +20 -4
- package/dist/TableWidget-aZUcob2U.mjs.map +1 -0
- package/dist/{TextWidget-Cmu4a9QG.mjs → TextWidget-D6qCnspg.mjs} +21 -5
- package/dist/TextWidget-D6qCnspg.mjs.map +1 -0
- package/dist/{TextWidget-Bd8V3uOT.cjs → TextWidget-XBeVX2oM.cjs} +20 -4
- package/dist/TextWidget-XBeVX2oM.cjs.map +1 -0
- package/dist/{ToDoWidget-BTq8QL4U.cjs → ToDoWidget-GmeRwP_0.cjs} +19 -3
- package/dist/ToDoWidget-GmeRwP_0.cjs.map +1 -0
- package/dist/{ToDoWidget-CKC5BocI.mjs → ToDoWidget-iiVItJrO.mjs} +20 -4
- package/dist/ToDoWidget-iiVItJrO.mjs.map +1 -0
- package/dist/{VideoWidget-R5xG2Dt6.mjs → VideoWidget-BAxtPtq5.mjs} +20 -4
- package/dist/VideoWidget-BAxtPtq5.mjs.map +1 -0
- package/dist/{VideoWidget-BK6_XvD0.cjs → VideoWidget-CN8nMeGP.cjs} +19 -3
- package/dist/VideoWidget-CN8nMeGP.cjs.map +1 -0
- package/dist/fields-CjDogNNF.mjs +2 -0
- package/dist/index.cjs +53 -53
- package/dist/index.d.cts +77 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +77 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +55 -55
- package/dist/{products-fvXefwYo.mjs → products-DOCuAQDz.mjs} +3 -3
- package/dist/{products-fvXefwYo.mjs.map → products-DOCuAQDz.mjs.map} +1 -1
- package/dist/{products-CbSNg_2Q.cjs → products-zutaVs48.cjs} +3 -3
- package/dist/{products-CbSNg_2Q.cjs.map → products-zutaVs48.cjs.map} +1 -1
- package/dist/{src-CzKSt-6K.mjs → src-CIhTbou2.mjs} +2 -2
- package/dist/{src-CzKSt-6K.mjs.map → src-CIhTbou2.mjs.map} +1 -1
- package/dist/{src-BxmqgcCj.cjs → src-CXGrnE7x.cjs} +2 -2
- package/dist/{src-BxmqgcCj.cjs.map → src-CXGrnE7x.cjs.map} +1 -1
- package/dist/{use-account-clients-DR-cFoiZ.cjs → use-account-clients-BOwgvZok.cjs} +2 -2
- package/dist/{use-account-clients-DR-cFoiZ.cjs.map → use-account-clients-BOwgvZok.cjs.map} +1 -1
- package/dist/{use-account-clients-DSdeJkp0.mjs → use-account-clients-EEcG-B1B.mjs} +2 -2
- package/dist/{use-account-clients-DSdeJkp0.mjs.map → use-account-clients-EEcG-B1B.mjs.map} +1 -1
- package/dist/{use-customer-account-BFxhulZt.cjs → use-customer-account-BxoVi8ak.cjs} +3 -3
- package/dist/{use-customer-account-BFxhulZt.cjs.map → use-customer-account-BxoVi8ak.cjs.map} +1 -1
- package/dist/{use-customer-account-zbnCNccM.mjs → use-customer-account-TLWo3z05.mjs} +3 -3
- package/dist/{use-customer-account-zbnCNccM.mjs.map → use-customer-account-TLWo3z05.mjs.map} +1 -1
- package/dist/{use-fluid-api-BUOA1P_y.cjs → use-fluid-api-CU_r0Gu9.cjs} +2 -2
- package/dist/{use-fluid-api-BUOA1P_y.cjs.map → use-fluid-api-CU_r0Gu9.cjs.map} +1 -1
- package/dist/{use-fluid-api-BUEolyn-.mjs → use-fluid-api-DH8hTTPQ.mjs} +2 -2
- package/dist/{use-fluid-api-BUEolyn-.mjs.map → use-fluid-api-DH8hTTPQ.mjs.map} +1 -1
- package/package.json +16 -16
- package/styles/globals.css +2 -1
- package/dist/BulletListWidget-DfXMbboF.cjs.map +0 -1
- package/dist/BulletListWidget-bvVUvGOQ.mjs.map +0 -1
- package/dist/CalendarWidget-BAHiko62.cjs.map +0 -1
- package/dist/CalendarWidget-YybCIktI.mjs.map +0 -1
- package/dist/CardWidget-BOk-hod0.mjs.map +0 -1
- package/dist/CardWidget-h-FAxb1X.cjs.map +0 -1
- package/dist/CarouselWidget-Cqk2VJzH.mjs.map +0 -1
- package/dist/CarouselWidget-D-hBiS_H.cjs.map +0 -1
- package/dist/CatchUpWidget-Bq5Z7dnd.cjs.map +0 -1
- package/dist/CatchUpWidget-ZsrbwaTu.mjs.map +0 -1
- package/dist/ChartWidget-B6_n_Jp8.cjs.map +0 -1
- package/dist/ChartWidget-CU3_7LIS.mjs.map +0 -1
- package/dist/ContactsScreen-BGwMvoc6.cjs +0 -39
- package/dist/ContactsScreen-B_W89Txh.mjs +0 -37
- package/dist/EmbedWidget-CRCZwIZl.mjs.map +0 -1
- package/dist/EmbedWidget-DQB5SADr.cjs.map +0 -1
- package/dist/ImageWidget-2ZYY9Ea9.cjs.map +0 -1
- package/dist/ImageWidget-m5oDe9uw.mjs.map +0 -1
- package/dist/LayoutWidget-B23HX9yD.mjs.map +0 -1
- package/dist/LayoutWidget-SPn4xt-J.cjs.map +0 -1
- package/dist/LinkWidget-BFBAfz2T.cjs.map +0 -1
- package/dist/LinkWidget-DImz_Kgl.mjs.map +0 -1
- package/dist/ListWidget-4nc_OvSx.cjs.map +0 -1
- package/dist/ListWidget-BiCdEqrT.mjs.map +0 -1
- package/dist/MessagingScreen-BgaFc4dw.mjs +0 -36
- package/dist/MessagingScreen-r1CuGZTz.cjs +0 -38
- package/dist/MySiteScreen-CejFK1ki.cjs +0 -37
- package/dist/MySiteScreen-DcFcXY7l.mjs +0 -35
- package/dist/MySiteWidget-Cw7623aF.mjs.map +0 -1
- package/dist/MySiteWidget-bKaJ4r_k.cjs.map +0 -1
- package/dist/NestedWidget-Bxf8MJuj.cjs.map +0 -1
- package/dist/NestedWidget-DDAcIeej.mjs.map +0 -1
- package/dist/OrdersScreen-BTgeNO4Z.cjs +0 -37
- package/dist/OrdersScreen-yDvuEsiZ.mjs +0 -35
- package/dist/ProductsScreen-CibQXnfN.mjs +0 -39
- package/dist/ProductsScreen-DygMyNll.cjs +0 -41
- package/dist/ProfileScreen-CbZevC9b.cjs +0 -36
- package/dist/ProfileScreen-H2suBhUK.mjs +0 -34
- package/dist/QuickShareWidget-DJSBoNdI.cjs.map +0 -1
- package/dist/QuickShareWidget-DzvaOfZL.mjs.map +0 -1
- package/dist/RecentActivityWidget-Dw6yeZKX.mjs.map +0 -1
- package/dist/RecentActivityWidget-DxCHufm5.cjs.map +0 -1
- package/dist/ShareablesScreen-CvdwMRKM.cjs +0 -41
- package/dist/ShareablesScreen-VWeb61BX.mjs +0 -39
- package/dist/ShopScreen-CFP3QG21.mjs +0 -34
- package/dist/ShopScreen-CWFKO9Iz.cjs +0 -36
- package/dist/SubscriptionsScreen-CNDRQ4Q5.cjs +0 -37
- package/dist/SubscriptionsScreen-oABvUl1M.mjs +0 -35
- package/dist/TableWidget-D2QlWEXk.cjs.map +0 -1
- package/dist/TableWidget-kq_rQCoV.mjs.map +0 -1
- package/dist/TextWidget-Bd8V3uOT.cjs.map +0 -1
- package/dist/TextWidget-Cmu4a9QG.mjs.map +0 -1
- package/dist/ToDoWidget-BTq8QL4U.cjs.map +0 -1
- package/dist/ToDoWidget-CKC5BocI.mjs.map +0 -1
- package/dist/VideoWidget-BK6_XvD0.cjs.map +0 -1
- package/dist/VideoWidget-R5xG2Dt6.mjs.map +0 -1
- package/dist/fields-DW1nDGRz.mjs +0 -2
|
@@ -8,7 +8,7 @@ var QuickShareWidget_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
|
8
8
|
QuickShareWidget: () => QuickShareWidget,
|
|
9
9
|
quickShareWidgetPropertySchema: () => quickShareWidgetPropertySchema
|
|
10
10
|
});
|
|
11
|
-
function QuickShareWidget({ shareableResource, titleEnabled = true, titleText = "", titleFontSize = "2xl", titleColor = "foreground", textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", overlayEnabled = true, overlayType = "solid", overlayIntensity = 50, showBuyButton = false, className, ...props }) {
|
|
11
|
+
function QuickShareWidget({ shareableResource, titleEnabled = true, titleText = "", titleFontSize = "2xl", titleColor = "foreground", textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", overlayEnabled = true, overlayType = "solid", overlayIntensity = 50, showBuyButton = false, className, ...props }) {
|
|
12
12
|
const backgroundImageUrl = shareableResource?.image_url || shareableResource?.imageUrl;
|
|
13
13
|
const shareLink = shareableResource?.share_link || "";
|
|
14
14
|
const displayUrl = shareLink || "Select a resource to generate link";
|
|
@@ -23,7 +23,7 @@ function QuickShareWidget({ shareableResource, titleEnabled = true, titleText =
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26
|
-
className: `relative overflow-hidden rounded-${borderRadius} bg-muted text-${textColor} ${className ?? ""}`,
|
|
26
|
+
className: `relative overflow-hidden rounded-${borderRadius} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} bg-muted text-${textColor} ${className ?? ""}`,
|
|
27
27
|
...props,
|
|
28
28
|
children: [backgroundImageUrl ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
29
29
|
className: "absolute inset-0",
|
|
@@ -226,6 +226,22 @@ const quickShareWidgetPropertySchema = {
|
|
|
226
226
|
defaultValue: "md",
|
|
227
227
|
tab: "styling",
|
|
228
228
|
group: "Design"
|
|
229
|
+
}),
|
|
230
|
+
(0, _fluid_app_portal_core_registries.getBorderWidthField)({
|
|
231
|
+
key: "borderWidth",
|
|
232
|
+
label: "Border Width",
|
|
233
|
+
description: "Border width for the widget",
|
|
234
|
+
defaultValue: "none",
|
|
235
|
+
tab: "styling",
|
|
236
|
+
group: "Design"
|
|
237
|
+
}),
|
|
238
|
+
(0, _fluid_app_portal_core_registries.getBorderColorField)({
|
|
239
|
+
key: "borderColor",
|
|
240
|
+
label: "Border Color",
|
|
241
|
+
description: "Border color for the widget",
|
|
242
|
+
defaultValue: "muted",
|
|
243
|
+
tab: "styling",
|
|
244
|
+
group: "Design"
|
|
229
245
|
})
|
|
230
246
|
]
|
|
231
247
|
};
|
|
@@ -249,4 +265,4 @@ Object.defineProperty(exports, "quickShareWidgetPropertySchema", {
|
|
|
249
265
|
}
|
|
250
266
|
});
|
|
251
267
|
|
|
252
|
-
//# sourceMappingURL=QuickShareWidget-
|
|
268
|
+
//# sourceMappingURL=QuickShareWidget-CIfXUWCx.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickShareWidget-CIfXUWCx.cjs","names":["borderWidthClasses","borderColorClasses","Image","QRCodeSVG","Copy","ShoppingCart"],"sources":["../../widgets/src/widgets/QuickShareWidget.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ShareableItem } from \"@fluid-app/portal-core/types\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n getColorField,\n getFontSizeField,\n getPaddingField,\n} from \"../core/fields\";\nimport { QRCodeSVG } from \"qrcode.react\";\nimport { Copy, ShoppingCart, Image } from \"lucide-react\";\n\ntype QuickShareWidgetProps = ComponentProps<\"div\"> & {\n // Resource\n shareableResource?: ShareableItem;\n\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n\n // Actions\n showBuyButton?: boolean;\n};\n\nexport function QuickShareWidget({\n // Resource\n shareableResource,\n\n // Title defaults\n titleEnabled = true,\n titleText = \"\",\n titleFontSize = \"2xl\",\n titleColor = \"foreground\",\n\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n\n // Overlay defaults\n overlayEnabled = true,\n overlayType = \"solid\",\n overlayIntensity = 50,\n\n // Actions defaults\n showBuyButton = false,\n\n className,\n ...props\n}: QuickShareWidgetProps): React.JSX.Element {\n // Determine background styling\n const backgroundImageUrl =\n shareableResource?.image_url || shareableResource?.imageUrl;\n\n // Get share link from resource\n const shareLink = shareableResource?.share_link || \"\";\n const displayUrl = shareLink || \"Select a resource to generate link\";\n\n // Determine title - use provided title or fall back to resource title\n const displayTitle =\n titleText || shareableResource?.title || \"Select a resource to display!\";\n\n // Check if resource is a Product for buy button visibility\n const isProduct =\n shareableResource?.type === \"Product\" ||\n shareableResource?.shareableType === \"Product\";\n const shouldShowBuyButton = showBuyButton && isProduct;\n\n // Copy to clipboard handler\n const handleCopyToClipboard = async () => {\n if (shareLink) {\n try {\n await navigator.clipboard.writeText(shareLink);\n } catch (error) {\n console.error(\"Failed to copy to clipboard:\", error);\n }\n }\n };\n\n return (\n <div\n className={`relative overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-muted text-${textColor} ${className ?? \"\"}`}\n {...props}\n >\n {/* Background Image with Overlay */}\n {backgroundImageUrl ? (\n <div className=\"absolute inset-0\">\n <img\n src={backgroundImageUrl}\n alt=\"\"\n className=\"h-full w-full object-cover\"\n />\n {overlayEnabled && (\n <div\n className={`absolute inset-0 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) || 50) /\n 100,\n }}\n />\n )}\n </div>\n ) : (\n <div\n className={`bg-muted absolute inset-0 flex items-center justify-center`}\n >\n <Image className=\"h-16 w-16 opacity-20\" />\n </div>\n )}\n\n {/* Content Container */}\n <div className={`relative flex min-h-[400px] flex-col p-${padding}`}>\n {/* Title Overlay */}\n {titleEnabled && displayTitle && (\n <div className=\"flex flex-1 items-center justify-center\">\n <h2\n className={`text-center text-${titleFontSize} font-header font-semibold text-${titleColor} drop-shadow-lg`}\n >\n {displayTitle}\n </h2>\n </div>\n )}\n\n {/* Bottom Section - QR Code, URL, and Buttons */}\n <div className=\"mt-auto flex flex-col gap-4\">\n <div className=\"flex items-end justify-between gap-4\">\n {/* QR Code */}\n <div className=\"shrink-0 rounded-lg bg-white p-2\">\n <QRCodeSVG\n value={shareLink || \"https://example.com\"}\n size={100}\n level=\"H\"\n />\n </div>\n\n {/* URL Display */}\n <div className=\"min-w-0 flex-1\">\n <p className=\"mb-2 text-sm font-semibold tracking-wide drop-shadow\">\n Your Shareable URL\n </p>\n <div className=\"flex items-center justify-between rounded-md border border-white/20 bg-black/50 p-2 text-sm text-white backdrop-blur\">\n <span className=\"truncate\">{displayUrl}</span>\n <button\n type=\"button\"\n onClick={handleCopyToClipboard}\n className={`ml-2 shrink-0 rounded p-1 transition-colors hover:bg-${accentColor}/20`}\n aria-label=\"Copy link\"\n >\n <Copy className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </div>\n\n {/* Action Buttons */}\n {/* TODO: Needs button link implmented, once it is uncomment the config for showBuyButton */}\n {shouldShowBuyButton && (\n <div className=\"flex\">\n <button\n type=\"button\"\n className={`flex w-full items-center justify-center gap-2 rounded-lg bg-${accentColor} p-3 font-medium text-${accentColor}-foreground transition-all hover:bg-${accentColor}-500`}\n >\n <ShoppingCart className=\"h-4 w-4\" />\n <span>Buy</span>\n </button>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n\nexport const quickShareWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"QuickShareWidget\",\n displayName: \"Quick Share Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Resource\n {\n key: \"shareableResource\",\n label: \"Shareable Content\",\n type: \"resource\",\n description: \"Select the content to generate a share link for\",\n allowedTypes: [\"Product\", \"Page\", \"EnrollmentPack\", \"Medium\", \"Library\"],\n tab: \"styling\",\n group: \"Content\",\n },\n\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Show Title\",\n type: \"boolean\",\n description: \"Display a title overlay on the widget\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Custom title text (defaults to resource title if empty)\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title text\",\n defaultValue: \"2xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the title text\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Actions Group\n // {\n // key: \"showBuyButton\",\n // label: \"Show Buy Button\",\n // type: \"boolean\",\n // description: \"Display the buy button (only visible for Product type)\",\n // defaultValue: false,\n // tab: \"styling\",\n // group: \"Actions\",\n // },\n\n // Styling Tab - Design Group\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for the widget\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color for accent elements and buy button\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay for text readability\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the background\",\n defaultValue: \"solid\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the widget content\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the widget container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;AAmDA,SAAgB,iBAAiB,EAE/B,mBAGA,eAAe,MACf,YAAY,IACZ,gBAAgB,OAChB,aAAa,cAEb,YAAY,cACZ,cAAc,WACd,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SAGd,iBAAiB,MACjB,cAAc,SACd,mBAAmB,IAGnB,gBAAgB,OAEhB,WACA,GAAG,SACwC;CAE3C,MAAM,qBACJ,mBAAmB,aAAa,mBAAmB;CAGrD,MAAM,YAAY,mBAAmB,cAAc;CACnD,MAAM,aAAa,aAAa;CAGhC,MAAM,eACJ,aAAa,mBAAmB,SAAS;CAG3C,MAAM,YACJ,mBAAmB,SAAS,aAC5B,mBAAmB,kBAAkB;CACvC,MAAM,sBAAsB,iBAAiB;CAG7C,MAAM,wBAAwB,YAAY;AACxC,MAAI,UACF,KAAI;AACF,SAAM,UAAU,UAAU,UAAU,UAAU;WACvC,OAAO;AACd,WAAQ,MAAM,gCAAgC,MAAM;;;AAK1D,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,WAAW,oCAAoC,aAAa,GAAGA,kCAAAA,mBAAmB,aAAa,GAAG,gBAAgB,SAASC,kCAAAA,mBAAmB,eAAe,GAAG,iBAAiB,UAAU,GAAG,aAAa;EAC3M,GAAI;YAFN,CAKG,qBACC,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf,CACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;IACE,KAAK;IACL,KAAI;IACJ,WAAU;IACV,CAAA,EACD,kBACC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ACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;yDACe;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;8DACmB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACH;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { i as getBorderColorField, l as getColorField, m as getPaddingField, n as borderWidthClasses, o as getBorderRadiusField, s as getBorderWidthField, t as borderColorClasses, u as getFontSizeField } from "./fields-CjDogNNF.mjs";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Copy, Image, ShoppingCart } from "lucide-react";
|
|
5
5
|
import { QRCodeSVG } from "qrcode.react";
|
|
@@ -8,7 +8,7 @@ var QuickShareWidget_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
8
|
QuickShareWidget: () => QuickShareWidget,
|
|
9
9
|
quickShareWidgetPropertySchema: () => quickShareWidgetPropertySchema
|
|
10
10
|
});
|
|
11
|
-
function QuickShareWidget({ shareableResource, titleEnabled = true, titleText = "", titleFontSize = "2xl", titleColor = "foreground", textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", overlayEnabled = true, overlayType = "solid", overlayIntensity = 50, showBuyButton = false, className, ...props }) {
|
|
11
|
+
function QuickShareWidget({ shareableResource, titleEnabled = true, titleText = "", titleFontSize = "2xl", titleColor = "foreground", textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", overlayEnabled = true, overlayType = "solid", overlayIntensity = 50, showBuyButton = false, className, ...props }) {
|
|
12
12
|
const backgroundImageUrl = shareableResource?.image_url || shareableResource?.imageUrl;
|
|
13
13
|
const shareLink = shareableResource?.share_link || "";
|
|
14
14
|
const displayUrl = shareLink || "Select a resource to generate link";
|
|
@@ -23,7 +23,7 @@ function QuickShareWidget({ shareableResource, titleEnabled = true, titleText =
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
return /* @__PURE__ */ jsxs("div", {
|
|
26
|
-
className: `relative overflow-hidden rounded-${borderRadius} bg-muted text-${textColor} ${className ?? ""}`,
|
|
26
|
+
className: `relative overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? borderColorClasses[borderColor] : ""} bg-muted text-${textColor} ${className ?? ""}`,
|
|
27
27
|
...props,
|
|
28
28
|
children: [backgroundImageUrl ? /* @__PURE__ */ jsxs("div", {
|
|
29
29
|
className: "absolute inset-0",
|
|
@@ -226,10 +226,26 @@ const quickShareWidgetPropertySchema = {
|
|
|
226
226
|
defaultValue: "md",
|
|
227
227
|
tab: "styling",
|
|
228
228
|
group: "Design"
|
|
229
|
+
}),
|
|
230
|
+
getBorderWidthField({
|
|
231
|
+
key: "borderWidth",
|
|
232
|
+
label: "Border Width",
|
|
233
|
+
description: "Border width for the widget",
|
|
234
|
+
defaultValue: "none",
|
|
235
|
+
tab: "styling",
|
|
236
|
+
group: "Design"
|
|
237
|
+
}),
|
|
238
|
+
getBorderColorField({
|
|
239
|
+
key: "borderColor",
|
|
240
|
+
label: "Border Color",
|
|
241
|
+
description: "Border color for the widget",
|
|
242
|
+
defaultValue: "muted",
|
|
243
|
+
tab: "styling",
|
|
244
|
+
group: "Design"
|
|
229
245
|
})
|
|
230
246
|
]
|
|
231
247
|
};
|
|
232
248
|
//#endregion
|
|
233
249
|
export { QuickShareWidget_exports as n, quickShareWidgetPropertySchema as r, QuickShareWidget as t };
|
|
234
250
|
|
|
235
|
-
//# sourceMappingURL=QuickShareWidget-
|
|
251
|
+
//# sourceMappingURL=QuickShareWidget-CvdvBmEn.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickShareWidget-CvdvBmEn.mjs","names":[],"sources":["../../widgets/src/widgets/QuickShareWidget.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ShareableItem } from \"@fluid-app/portal-core/types\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n getColorField,\n getFontSizeField,\n getPaddingField,\n} from \"../core/fields\";\nimport { QRCodeSVG } from \"qrcode.react\";\nimport { Copy, ShoppingCart, Image } from \"lucide-react\";\n\ntype QuickShareWidgetProps = ComponentProps<\"div\"> & {\n // Resource\n shareableResource?: ShareableItem;\n\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n\n // Overlay\n overlayEnabled?: boolean;\n overlayType?: \"solid\" | \"gradient\";\n overlayIntensity?: number;\n\n // Actions\n showBuyButton?: boolean;\n};\n\nexport function QuickShareWidget({\n // Resource\n shareableResource,\n\n // Title defaults\n titleEnabled = true,\n titleText = \"\",\n titleFontSize = \"2xl\",\n titleColor = \"foreground\",\n\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n\n // Overlay defaults\n overlayEnabled = true,\n overlayType = \"solid\",\n overlayIntensity = 50,\n\n // Actions defaults\n showBuyButton = false,\n\n className,\n ...props\n}: QuickShareWidgetProps): React.JSX.Element {\n // Determine background styling\n const backgroundImageUrl =\n shareableResource?.image_url || shareableResource?.imageUrl;\n\n // Get share link from resource\n const shareLink = shareableResource?.share_link || \"\";\n const displayUrl = shareLink || \"Select a resource to generate link\";\n\n // Determine title - use provided title or fall back to resource title\n const displayTitle =\n titleText || shareableResource?.title || \"Select a resource to display!\";\n\n // Check if resource is a Product for buy button visibility\n const isProduct =\n shareableResource?.type === \"Product\" ||\n shareableResource?.shareableType === \"Product\";\n const shouldShowBuyButton = showBuyButton && isProduct;\n\n // Copy to clipboard handler\n const handleCopyToClipboard = async () => {\n if (shareLink) {\n try {\n await navigator.clipboard.writeText(shareLink);\n } catch (error) {\n console.error(\"Failed to copy to clipboard:\", error);\n }\n }\n };\n\n return (\n <div\n className={`relative overflow-hidden rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-muted text-${textColor} ${className ?? \"\"}`}\n {...props}\n >\n {/* Background Image with Overlay */}\n {backgroundImageUrl ? (\n <div className=\"absolute inset-0\">\n <img\n src={backgroundImageUrl}\n alt=\"\"\n className=\"h-full w-full object-cover\"\n />\n {overlayEnabled && (\n <div\n className={`absolute inset-0 ${\n overlayType === \"gradient\"\n ? \"bg-gradient-to-t from-black to-transparent\"\n : \"bg-black\"\n }`}\n style={{\n opacity:\n (Number(String(overlayIntensity).replace(\"%\", \"\")) || 50) /\n 100,\n }}\n />\n )}\n </div>\n ) : (\n <div\n className={`bg-muted absolute inset-0 flex items-center justify-center`}\n >\n <Image className=\"h-16 w-16 opacity-20\" />\n </div>\n )}\n\n {/* Content Container */}\n <div className={`relative flex min-h-[400px] flex-col p-${padding}`}>\n {/* Title Overlay */}\n {titleEnabled && displayTitle && (\n <div className=\"flex flex-1 items-center justify-center\">\n <h2\n className={`text-center text-${titleFontSize} font-header font-semibold text-${titleColor} drop-shadow-lg`}\n >\n {displayTitle}\n </h2>\n </div>\n )}\n\n {/* Bottom Section - QR Code, URL, and Buttons */}\n <div className=\"mt-auto flex flex-col gap-4\">\n <div className=\"flex items-end justify-between gap-4\">\n {/* QR Code */}\n <div className=\"shrink-0 rounded-lg bg-white p-2\">\n <QRCodeSVG\n value={shareLink || \"https://example.com\"}\n size={100}\n level=\"H\"\n />\n </div>\n\n {/* URL Display */}\n <div className=\"min-w-0 flex-1\">\n <p className=\"mb-2 text-sm font-semibold tracking-wide drop-shadow\">\n Your Shareable URL\n </p>\n <div className=\"flex items-center justify-between rounded-md border border-white/20 bg-black/50 p-2 text-sm text-white backdrop-blur\">\n <span className=\"truncate\">{displayUrl}</span>\n <button\n type=\"button\"\n onClick={handleCopyToClipboard}\n className={`ml-2 shrink-0 rounded p-1 transition-colors hover:bg-${accentColor}/20`}\n aria-label=\"Copy link\"\n >\n <Copy className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </div>\n\n {/* Action Buttons */}\n {/* TODO: Needs button link implmented, once it is uncomment the config for showBuyButton */}\n {shouldShowBuyButton && (\n <div className=\"flex\">\n <button\n type=\"button\"\n className={`flex w-full items-center justify-center gap-2 rounded-lg bg-${accentColor} p-3 font-medium text-${accentColor}-foreground transition-all hover:bg-${accentColor}-500`}\n >\n <ShoppingCart className=\"h-4 w-4\" />\n <span>Buy</span>\n </button>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n\nexport const quickShareWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"QuickShareWidget\",\n displayName: \"Quick Share Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Resource\n {\n key: \"shareableResource\",\n label: \"Shareable Content\",\n type: \"resource\",\n description: \"Select the content to generate a share link for\",\n allowedTypes: [\"Product\", \"Page\", \"EnrollmentPack\", \"Medium\", \"Library\"],\n tab: \"styling\",\n group: \"Content\",\n },\n\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Show Title\",\n type: \"boolean\",\n description: \"Display a title overlay on the widget\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Custom title text (defaults to resource title if empty)\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title text\",\n defaultValue: \"2xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the title text\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Actions Group\n // {\n // key: \"showBuyButton\",\n // label: \"Show Buy Button\",\n // type: \"boolean\",\n // description: \"Display the buy button (only visible for Product type)\",\n // defaultValue: false,\n // tab: \"styling\",\n // group: \"Actions\",\n // },\n\n // Styling Tab - Design Group\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for the widget\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color for accent elements and buy button\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"overlayEnabled\",\n label: \"Enable Overlay\",\n type: \"boolean\",\n description: \"Add background overlay for text readability\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"overlayType\",\n label: \"Overlay Type\",\n type: \"buttonGroup\",\n description: \"Type of overlay to add to the background\",\n defaultValue: \"solid\",\n options: [\n { label: \"Solid\", value: \"solid\" },\n { label: \"Gradient\", value: \"gradient\" },\n ],\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"overlayIntensity\",\n label: \"Overlay Intensity\",\n type: \"slider\",\n description: \"Opacity of the overlay background (0-100)\",\n min: 0,\n max: 100,\n step: 5,\n defaultValue: 50,\n unit: \"%\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyToBeTrue: \"overlayEnabled\",\n },\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the widget content\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the widget container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;AAmDA,SAAgB,iBAAiB,EAE/B,mBAGA,eAAe,MACf,YAAY,IACZ,gBAAgB,OAChB,aAAa,cAEb,YAAY,cACZ,cAAc,WACd,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SAGd,iBA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Aa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAcF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,cAAc;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,gBAAgB;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACH;CACF"}
|
|
@@ -208,7 +208,7 @@ function ActivityFeedItem({ activity, accentColor, textColor }) {
|
|
|
208
208
|
function RecentActivityWidget({ titleEnabled = true, titleText = "Recent Activity", titleFontSize = "lg", titleColor = "foreground", background = {
|
|
209
209
|
type: "solid",
|
|
210
210
|
color: "background"
|
|
211
|
-
}, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", maxItemsToShow = 5, className, ...props }) {
|
|
211
|
+
}, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "thin", borderColor = "muted", maxItemsToShow = 5, className, ...props }) {
|
|
212
212
|
const backgroundColor = background.color || "background";
|
|
213
213
|
const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
|
|
214
214
|
const { data: activities = [], isLoading, isError } = useActivities();
|
|
@@ -232,7 +232,7 @@ function RecentActivityWidget({ titleEnabled = true, titleText = "Recent Activit
|
|
|
232
232
|
return result;
|
|
233
233
|
}, [groupedActivities, maxItemsToShow]);
|
|
234
234
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
235
|
-
className: `@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor}
|
|
235
|
+
className: `@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} ${_fluid_app_portal_core_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? _fluid_app_portal_core_registries.borderColorClasses[borderColor] : ""} ${className}`,
|
|
236
236
|
style: { backgroundImage },
|
|
237
237
|
...props,
|
|
238
238
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -375,6 +375,22 @@ const recentActivityWidgetPropertySchema = {
|
|
|
375
375
|
tab: "styling",
|
|
376
376
|
group: "Design"
|
|
377
377
|
}),
|
|
378
|
+
(0, _fluid_app_portal_core_registries.getBorderWidthField)({
|
|
379
|
+
key: "borderWidth",
|
|
380
|
+
label: "Border Width",
|
|
381
|
+
description: "Border width for the widget container",
|
|
382
|
+
defaultValue: "thin",
|
|
383
|
+
tab: "styling",
|
|
384
|
+
group: "Design"
|
|
385
|
+
}),
|
|
386
|
+
(0, _fluid_app_portal_core_registries.getBorderColorField)({
|
|
387
|
+
key: "borderColor",
|
|
388
|
+
label: "Border Color",
|
|
389
|
+
description: "Border color for the widget container",
|
|
390
|
+
defaultValue: "muted",
|
|
391
|
+
tab: "styling",
|
|
392
|
+
group: "Design"
|
|
393
|
+
}),
|
|
378
394
|
{
|
|
379
395
|
key: "maxItemsToShow",
|
|
380
396
|
label: "Max Items",
|
|
@@ -406,4 +422,4 @@ Object.defineProperty(exports, "recentActivityWidgetPropertySchema", {
|
|
|
406
422
|
}
|
|
407
423
|
});
|
|
408
424
|
|
|
409
|
-
//# sourceMappingURL=RecentActivityWidget-
|
|
425
|
+
//# sourceMappingURL=RecentActivityWidget-kRfjO1IV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecentActivityWidget-kRfjO1IV.cjs","names":["useDataSourceConfig","useWidgetPreviewContext","ShoppingCart","MessageSquare","Play","UserPlus","Eye","Calendar","Star","SquareCheck","Bell","Trophy","User","DOMPurify","borderWidthClasses","borderColorClasses","ErrorState"],"sources":["../../widgets/src/hooks/use-activities.preview.ts","../../widgets/src/hooks/use-activities.ts","../../widgets/src/widgets/RecentActivityWidget.tsx"],"sourcesContent":["import type { Activity } from \"./use-activities.types\";\n\nconst now = new Date();\n\nfunction minutesAgo(minutes: number): string {\n return new Date(now.getTime() - minutes * 60_000).toISOString();\n}\n\nexport const PREVIEW_DATA: Activity[] = [\n {\n id: 1,\n userName: \"Sarah Johnson\",\n avatarUrl: null,\n activityType: \"Order Placed\",\n targetName: \"Wellness Starter Kit\",\n timestamp: minutesAgo(12),\n slug: \"order_placed\",\n },\n {\n id: 2,\n userName: \"Mike Chen\",\n avatarUrl: null,\n activityType: \"New Lead\",\n targetName: \"Signed up from Instagram link\",\n timestamp: minutesAgo(45),\n slug: \"new_lead\",\n },\n {\n id: 3,\n userName: \"Visitor from Austin, TX\",\n avatarUrl: null,\n activityType: \"Page Views\",\n targetName: \"Viewed product catalog (3 pages)\",\n timestamp: minutesAgo(90),\n slug: \"page_views\",\n },\n {\n id: 4,\n userName: \"Lisa Park\",\n avatarUrl: null,\n activityType: \"Video Complete\",\n targetName: \"Watched: Getting Started Guide\",\n timestamp: minutesAgo(180),\n slug: \"video_complete\",\n },\n];\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useDataSourceConfig } from \"@fluid-app/portal-react/data-sources/context\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-react/data-sources/preview-context\";\nimport { PREVIEW_DATA } from \"./use-activities.preview\";\nimport type {\n Activity,\n ActivityContact,\n ActivityVisitor,\n ApiActivity,\n} from \"./use-activities.types\";\n\nexport type {\n ActivityContact,\n ActivityVisitor,\n ActivitySlug,\n ApiActivity,\n Activity,\n} from \"./use-activities.types\";\n\ntype PaginationInfo = {\n current: number;\n previous: number | null;\n next: number | null;\n per_page: number;\n pages: number;\n count: number;\n};\n\ntype ApiResponse = [{ pagination: PaginationInfo }, { items: ApiActivity[] }];\n\nexport function useActivities(): UseQueryResult<Activity[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"activities\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<Activity[]> => {\n const url = baseUrl\n ? `${baseUrl}/v1.1/activities.json`\n : \"/v1.1/activities.json\";\n const response = await fetch(url, {\n headers: {\n \"content-type\": \"application/json\",\n ...getApiHeaders?.(),\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch activities: ${response.status}`);\n }\n\n const data: ApiResponse = await response.json();\n return transformActivities(data);\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n\n// Transform and format helpers\nfunction getUserName(\n contact: ActivityContact | null,\n visitor: ActivityVisitor | null,\n): string {\n if (contact?.full_name) {\n return contact.full_name;\n }\n if (contact?.first_name && contact?.last_name) {\n return `${contact.first_name} ${contact.last_name}`;\n }\n if (visitor?.city && visitor?.state) {\n return `Visitor from ${visitor.city}, ${visitor.state}`;\n }\n return \"Unknown Visitor\";\n}\n\nfunction transformActivities(rawData: ApiResponse): Activity[] {\n const itemsObj = rawData[1];\n if (!itemsObj?.items) return [];\n\n return itemsObj.items\n .map((activity) => ({\n id: activity.id,\n userName: getUserName(activity.contact, activity.visitor),\n avatarUrl: activity.contact?.avatar_url ?? null,\n activityType: formatActivityType(activity.slug),\n targetName: activity.description || activity.title,\n timestamp: activity.created_at,\n slug: activity.slug,\n }))\n .sort(\n (a, b) =>\n new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),\n );\n}\n\nfunction formatActivityType(slug: string): string {\n return slug\n .split(\"_\")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n}\n","import DOMPurify from \"dompurify\";\nimport { useMemo, type ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport {\n useActivities,\n type Activity,\n type ActivitySlug,\n} from \"../hooks/use-activities\";\nimport { ErrorState } from \"../components/error-state\";\nimport {\n Bell,\n Calendar,\n SquareCheck,\n Eye,\n MessageSquare,\n Play,\n ShoppingCart,\n Star,\n Trophy,\n User,\n UserPlus,\n type LucideIcon,\n} from \"lucide-react\";\n\n// Format timestamp to time string\nconst formatTimestamp = (timestamp: string): string => {\n const date = new Date(timestamp);\n return date.toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: true,\n });\n};\n\n// Format date for grouping header\nconst formatDateHeader = (timestamp: string): string => {\n const date = new Date(timestamp);\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n });\n};\n\n// Get date string for grouping (without time)\nconst getDateKey = (timestamp: string): string => {\n const date = new Date(timestamp);\n return date.toISOString().split(\"T\")[0] ?? timestamp;\n};\n\n// Group activities by date\nconst groupActivitiesByDate = (\n activities: Activity[],\n): Map<string, Activity[]> => {\n const grouped = new Map<string, Activity[]>();\n\n for (const activity of activities) {\n const dateKey = getDateKey(activity.timestamp);\n const existing = grouped.get(dateKey);\n if (existing) {\n existing.push(activity);\n } else {\n grouped.set(dateKey, [activity]);\n }\n }\n\n return grouped;\n};\n\n// Activity slug to icon mapping\nconst ACTIVITY_ICON_MAP: Record<ActivitySlug, LucideIcon> = {\n // Orders/Cart\n order_placed: ShoppingCart,\n abandoned_cart: ShoppingCart,\n cart_items_added: ShoppingCart,\n new_cart_items_added: ShoppingCart,\n // Messages\n direct_message: MessageSquare,\n comment_reply: MessageSquare,\n message_received: MessageSquare,\n message_sent: MessageSquare,\n // Video\n video: Play,\n video_complete: Play,\n video_contact: Play,\n video_complete_contact: Play,\n // Leads\n new_lead: UserPlus,\n page_views_contact: UserPlus,\n smart_link_clicked: UserPlus,\n // Page Views\n page_views: Eye,\n // Events\n upcoming_event: Calendar,\n // Reviews\n review_left: Star,\n // Tasks\n tasks: SquareCheck,\n // Announcements\n announcements: Bell,\n // Fantasy\n fantasy_point: Trophy,\n};\n\nconst getActivityIcon = (slug: ActivitySlug) => ACTIVITY_ICON_MAP[slug] ?? User;\n\n// Activity feed item component\ntype ActivityFeedItemProps = {\n activity: Activity;\n accentColor: ColorOptions;\n textColor: ColorOptions;\n};\n\nfunction ActivityFeedItem({\n activity,\n accentColor,\n textColor,\n}: ActivityFeedItemProps) {\n const Icon = getActivityIcon(activity.slug);\n\n return (\n <div className=\"flex w-full items-start gap-1.5\">\n {/* Avatar */}\n <div className=\"shrink-0\">\n {activity.avatarUrl ? (\n <div className=\"relative size-8 overflow-hidden rounded-full\">\n <img\n src={activity.avatarUrl}\n alt={activity.userName}\n className=\"size-full object-cover\"\n />\n <div className=\"border-foreground/[0.08] absolute inset-0 rounded-full border\" />\n </div>\n ) : (\n <div\n className={`bg-muted flex size-8 items-center justify-center rounded-full`}\n >\n <Icon className={`size-3.5 text-${textColor} opacity-60`} />\n </div>\n )}\n </div>\n\n {/* Content */}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex w-full items-center gap-1.5\">\n <p\n className={`flex-1 text-base font-semibold text-${textColor} truncate`}\n >\n {activity.activityType}\n </p>\n <p className={`text-xs text-${textColor} shrink-0 opacity-50`}>\n {formatTimestamp(activity.timestamp)}\n </p>\n </div>\n <p className={`text-sm text-${textColor} opacity-80`}>\n <span className={`font-medium text-${accentColor}`}>\n {activity.userName}\n </span>{\" \"}\n <span\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(activity.targetName, {\n ALLOWED_TAGS: [\"br\", \"strong\", \"em\", \"b\", \"i\"],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n </p>\n </div>\n </div>\n );\n}\n\ntype RecentActivityWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n\n // Activity settings\n maxItemsToShow?: number;\n};\n\nexport function RecentActivityWidget({\n // Title defaults\n titleEnabled = true,\n titleText = \"Recent Activity\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n\n // Styling defaults\n background = {\n type: \"solid\",\n color: \"background\",\n },\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"thin\",\n borderColor = \"muted\",\n\n // Activity defaults\n maxItemsToShow = 5,\n\n className,\n ...props\n}: RecentActivityWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n const { data: activities = [], isLoading, isError } = useActivities();\n\n const groupedActivities = useMemo(\n () => groupActivitiesByDate(activities),\n [activities],\n );\n\n const totalCount = Math.min(activities.length, maxItemsToShow);\n\n // Get activities to display (limited by maxItemsToShow)\n const activitiesToShow = useMemo(() => {\n const result: { date: string; items: Activity[] }[] = [];\n let count = 0;\n\n for (const [dateKey, items] of groupedActivities) {\n if (count >= maxItemsToShow) break;\n\n const remainingSlots = maxItemsToShow - count;\n const itemsToAdd = items.slice(0, remainingSlots);\n\n if (itemsToAdd.length > 0) {\n result.push({\n date: formatDateHeader(items[0]?.timestamp ?? dateKey),\n items: itemsToAdd,\n });\n count += itemsToAdd.length;\n }\n }\n\n return result;\n }, [groupedActivities, maxItemsToShow]);\n\n return (\n <div\n className={`@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n <div className={`p-${padding} flex flex-col gap-2`}>\n {/* Header */}\n {titleEnabled && titleText && (\n <div className=\"flex w-full items-start gap-2\">\n <h2\n className={`flex-1 text-${titleFontSize} font-header font-bold text-${titleColor}`}\n >\n {titleText}\n </h2>\n {!isLoading && (\n <span\n className={`text-4xl font-bold text-${textColor} leading-none`}\n >\n {totalCount.toString().padStart(2, \"0\")}\n </span>\n )}\n </div>\n )}\n\n {/* Loading state */}\n {isLoading ? (\n <div className=\"flex min-h-[200px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : activities.length === 0 ? (\n /* Empty state */\n <div className=\"flex min-h-[200px] flex-col items-center justify-center gap-2\">\n <User className={`size-12 text-${textColor} opacity-30`} />\n <p\n className={`text-base font-semibold text-${textColor} opacity-50`}\n >\n No Activity To Report\n </p>\n <p className={`text-sm text-${textColor} opacity-40`}>\n You'll Do Great!\n </p>\n </div>\n ) : (\n /* Activity list */\n <div className=\"flex flex-col gap-4\">\n {activitiesToShow.map((group, groupIndex) => (\n <div key={groupIndex} className=\"flex flex-col gap-4\">\n {/* Date header */}\n <p className={`text-base font-semibold text-${textColor}`}>\n {group.date}\n </p>\n\n {/* Activity items */}\n <div className=\"flex flex-col gap-4\">\n {group.items.map((activity) => (\n <ActivityFeedItem\n key={activity.id}\n activity={activity}\n accentColor={accentColor}\n textColor={textColor}\n />\n ))}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport const recentActivityWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"RecentActivityWidget\",\n displayName: \"Recent Activity Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the activity feed\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Title text displayed above the activity feed\",\n defaultValue: \"Recent Activity\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the widget title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the widget title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Design Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the widget container\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for activity content\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for links and highlights\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the widget container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the widget container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget container\",\n defaultValue: \"thin\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget container\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n\n // Styling Tab - Display Group\n {\n key: \"maxItemsToShow\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of activity items to display\",\n defaultValue: 5,\n tab: \"styling\",\n group: \"Display\",\n },\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAEA,MAAM,sBAAM,IAAI,MAAM;AAEtB,SAAS,WAAW,SAAyB;AAC3C,yBAAO,IAAI,KAAK,IAAI,SAAS,GAAG,UAAU,IAAO,EAAC,aAAa;;AAGjE,MAAa,eAA2B;CACtC;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,cAAc;EACd,YAAY;EACZ,WAAW,WAAW,GAAG;EACzB,MAAM;EACP;CACD;EACE,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AK;GACL,OAAO;GACR;yDACe;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;8DACmB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;6DACkB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACF;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
|
|
2
2
|
import { i as useDataSourceConfig, n as useWidgetPreviewContext, t as ErrorState } from "./error-state-BGEvTYIh.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as getBorderColorField, l as getColorField, m as getPaddingField, n as borderWidthClasses, o as getBorderRadiusField, s as getBorderWidthField, t as borderColorClasses, u as getFontSizeField } from "./fields-CjDogNNF.mjs";
|
|
4
4
|
import { t as purify } from "./purify.es-CKZbQnR8.mjs";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -208,7 +208,7 @@ function ActivityFeedItem({ activity, accentColor, textColor }) {
|
|
|
208
208
|
function RecentActivityWidget({ titleEnabled = true, titleText = "Recent Activity", titleFontSize = "lg", titleColor = "foreground", background = {
|
|
209
209
|
type: "solid",
|
|
210
210
|
color: "background"
|
|
211
|
-
}, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", maxItemsToShow = 5, className, ...props }) {
|
|
211
|
+
}, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", borderWidth = "thin", borderColor = "muted", maxItemsToShow = 5, className, ...props }) {
|
|
212
212
|
const backgroundColor = background.color || "background";
|
|
213
213
|
const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
|
|
214
214
|
const { data: activities = [], isLoading, isError } = useActivities();
|
|
@@ -232,7 +232,7 @@ function RecentActivityWidget({ titleEnabled = true, titleText = "Recent Activit
|
|
|
232
232
|
return result;
|
|
233
233
|
}, [groupedActivities, maxItemsToShow]);
|
|
234
234
|
return /* @__PURE__ */ jsx("div", {
|
|
235
|
-
className: `@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor}
|
|
235
|
+
className: `@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} ${borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? borderColorClasses[borderColor] : ""} ${className}`,
|
|
236
236
|
style: { backgroundImage },
|
|
237
237
|
...props,
|
|
238
238
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -375,6 +375,22 @@ const recentActivityWidgetPropertySchema = {
|
|
|
375
375
|
tab: "styling",
|
|
376
376
|
group: "Design"
|
|
377
377
|
}),
|
|
378
|
+
getBorderWidthField({
|
|
379
|
+
key: "borderWidth",
|
|
380
|
+
label: "Border Width",
|
|
381
|
+
description: "Border width for the widget container",
|
|
382
|
+
defaultValue: "thin",
|
|
383
|
+
tab: "styling",
|
|
384
|
+
group: "Design"
|
|
385
|
+
}),
|
|
386
|
+
getBorderColorField({
|
|
387
|
+
key: "borderColor",
|
|
388
|
+
label: "Border Color",
|
|
389
|
+
description: "Border color for the widget container",
|
|
390
|
+
defaultValue: "muted",
|
|
391
|
+
tab: "styling",
|
|
392
|
+
group: "Design"
|
|
393
|
+
}),
|
|
378
394
|
{
|
|
379
395
|
key: "maxItemsToShow",
|
|
380
396
|
label: "Max Items",
|
|
@@ -389,4 +405,4 @@ const recentActivityWidgetPropertySchema = {
|
|
|
389
405
|
//#endregion
|
|
390
406
|
export { RecentActivityWidget_exports as n, recentActivityWidgetPropertySchema as r, RecentActivityWidget as t };
|
|
391
407
|
|
|
392
|
-
//# sourceMappingURL=RecentActivityWidget-
|
|
408
|
+
//# sourceMappingURL=RecentActivityWidget-uegOsG5c.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecentActivityWidget-uegOsG5c.mjs","names":["DOMPurify"],"sources":["../../widgets/src/hooks/use-activities.preview.ts","../../widgets/src/hooks/use-activities.ts","../../widgets/src/widgets/RecentActivityWidget.tsx"],"sourcesContent":["import type { Activity } from \"./use-activities.types\";\n\nconst now = new Date();\n\nfunction minutesAgo(minutes: number): string {\n return new Date(now.getTime() - minutes * 60_000).toISOString();\n}\n\nexport const PREVIEW_DATA: Activity[] = [\n {\n id: 1,\n userName: \"Sarah Johnson\",\n avatarUrl: null,\n activityType: \"Order Placed\",\n targetName: \"Wellness Starter Kit\",\n timestamp: minutesAgo(12),\n slug: \"order_placed\",\n },\n {\n id: 2,\n userName: \"Mike Chen\",\n avatarUrl: null,\n activityType: \"New Lead\",\n targetName: \"Signed up from Instagram link\",\n timestamp: minutesAgo(45),\n slug: \"new_lead\",\n },\n {\n id: 3,\n userName: \"Visitor from Austin, TX\",\n avatarUrl: null,\n activityType: \"Page Views\",\n targetName: \"Viewed product catalog (3 pages)\",\n timestamp: minutesAgo(90),\n slug: \"page_views\",\n },\n {\n id: 4,\n userName: \"Lisa Park\",\n avatarUrl: null,\n activityType: \"Video Complete\",\n targetName: \"Watched: Getting Started Guide\",\n timestamp: minutesAgo(180),\n slug: \"video_complete\",\n },\n];\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useDataSourceConfig } from \"@fluid-app/portal-react/data-sources/context\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-react/data-sources/preview-context\";\nimport { PREVIEW_DATA } from \"./use-activities.preview\";\nimport type {\n Activity,\n ActivityContact,\n ActivityVisitor,\n ApiActivity,\n} from \"./use-activities.types\";\n\nexport type {\n ActivityContact,\n ActivityVisitor,\n ActivitySlug,\n ApiActivity,\n Activity,\n} from \"./use-activities.types\";\n\ntype PaginationInfo = {\n current: number;\n previous: number | null;\n next: number | null;\n per_page: number;\n pages: number;\n count: number;\n};\n\ntype ApiResponse = [{ pagination: PaginationInfo }, { items: ApiActivity[] }];\n\nexport function useActivities(): UseQueryResult<Activity[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"activities\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<Activity[]> => {\n const url = baseUrl\n ? `${baseUrl}/v1.1/activities.json`\n : \"/v1.1/activities.json\";\n const response = await fetch(url, {\n headers: {\n \"content-type\": \"application/json\",\n ...getApiHeaders?.(),\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch activities: ${response.status}`);\n }\n\n const data: ApiResponse = await response.json();\n return transformActivities(data);\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n\n// Transform and format helpers\nfunction getUserName(\n contact: ActivityContact | null,\n visitor: ActivityVisitor | null,\n): string {\n if (contact?.full_name) {\n return contact.full_name;\n }\n if (contact?.first_name && contact?.last_name) {\n return `${contact.first_name} ${contact.last_name}`;\n }\n if (visitor?.city && visitor?.state) {\n return `Visitor from ${visitor.city}, ${visitor.state}`;\n }\n return \"Unknown Visitor\";\n}\n\nfunction transformActivities(rawData: ApiResponse): Activity[] {\n const itemsObj = rawData[1];\n if (!itemsObj?.items) return [];\n\n return itemsObj.items\n .map((activity) => ({\n id: activity.id,\n userName: getUserName(activity.contact, activity.visitor),\n avatarUrl: activity.contact?.avatar_url ?? null,\n activityType: formatActivityType(activity.slug),\n targetName: activity.description || activity.title,\n timestamp: activity.created_at,\n slug: activity.slug,\n }))\n .sort(\n (a, b) =>\n new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),\n );\n}\n\nfunction formatActivityType(slug: string): string {\n return slug\n .split(\"_\")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n}\n","import DOMPurify from \"dompurify\";\nimport { useMemo, type ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getBorderWidthField,\n getBorderColorField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport {\n useActivities,\n type Activity,\n type ActivitySlug,\n} from \"../hooks/use-activities\";\nimport { ErrorState } from \"../components/error-state\";\nimport {\n Bell,\n Calendar,\n SquareCheck,\n Eye,\n MessageSquare,\n Play,\n ShoppingCart,\n Star,\n Trophy,\n User,\n UserPlus,\n type LucideIcon,\n} from \"lucide-react\";\n\n// Format timestamp to time string\nconst formatTimestamp = (timestamp: string): string => {\n const date = new Date(timestamp);\n return date.toLocaleTimeString(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: true,\n });\n};\n\n// Format date for grouping header\nconst formatDateHeader = (timestamp: string): string => {\n const date = new Date(timestamp);\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n });\n};\n\n// Get date string for grouping (without time)\nconst getDateKey = (timestamp: string): string => {\n const date = new Date(timestamp);\n return date.toISOString().split(\"T\")[0] ?? timestamp;\n};\n\n// Group activities by date\nconst groupActivitiesByDate = (\n activities: Activity[],\n): Map<string, Activity[]> => {\n const grouped = new Map<string, Activity[]>();\n\n for (const activity of activities) {\n const dateKey = getDateKey(activity.timestamp);\n const existing = grouped.get(dateKey);\n if (existing) {\n existing.push(activity);\n } else {\n grouped.set(dateKey, [activity]);\n }\n }\n\n return grouped;\n};\n\n// Activity slug to icon mapping\nconst ACTIVITY_ICON_MAP: Record<ActivitySlug, LucideIcon> = {\n // Orders/Cart\n order_placed: ShoppingCart,\n abandoned_cart: ShoppingCart,\n cart_items_added: ShoppingCart,\n new_cart_items_added: ShoppingCart,\n // Messages\n direct_message: MessageSquare,\n comment_reply: MessageSquare,\n message_received: MessageSquare,\n message_sent: MessageSquare,\n // Video\n video: Play,\n video_complete: Play,\n video_contact: Play,\n video_complete_contact: Play,\n // Leads\n new_lead: UserPlus,\n page_views_contact: UserPlus,\n smart_link_clicked: UserPlus,\n // Page Views\n page_views: Eye,\n // Events\n upcoming_event: Calendar,\n // Reviews\n review_left: Star,\n // Tasks\n tasks: SquareCheck,\n // Announcements\n announcements: Bell,\n // Fantasy\n fantasy_point: Trophy,\n};\n\nconst getActivityIcon = (slug: ActivitySlug) => ACTIVITY_ICON_MAP[slug] ?? User;\n\n// Activity feed item component\ntype ActivityFeedItemProps = {\n activity: Activity;\n accentColor: ColorOptions;\n textColor: ColorOptions;\n};\n\nfunction ActivityFeedItem({\n activity,\n accentColor,\n textColor,\n}: ActivityFeedItemProps) {\n const Icon = getActivityIcon(activity.slug);\n\n return (\n <div className=\"flex w-full items-start gap-1.5\">\n {/* Avatar */}\n <div className=\"shrink-0\">\n {activity.avatarUrl ? (\n <div className=\"relative size-8 overflow-hidden rounded-full\">\n <img\n src={activity.avatarUrl}\n alt={activity.userName}\n className=\"size-full object-cover\"\n />\n <div className=\"border-foreground/[0.08] absolute inset-0 rounded-full border\" />\n </div>\n ) : (\n <div\n className={`bg-muted flex size-8 items-center justify-center rounded-full`}\n >\n <Icon className={`size-3.5 text-${textColor} opacity-60`} />\n </div>\n )}\n </div>\n\n {/* Content */}\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex w-full items-center gap-1.5\">\n <p\n className={`flex-1 text-base font-semibold text-${textColor} truncate`}\n >\n {activity.activityType}\n </p>\n <p className={`text-xs text-${textColor} shrink-0 opacity-50`}>\n {formatTimestamp(activity.timestamp)}\n </p>\n </div>\n <p className={`text-sm text-${textColor} opacity-80`}>\n <span className={`font-medium text-${accentColor}`}>\n {activity.userName}\n </span>{\" \"}\n <span\n dangerouslySetInnerHTML={{\n __html: DOMPurify.sanitize(activity.targetName, {\n ALLOWED_TAGS: [\"br\", \"strong\", \"em\", \"b\", \"i\"],\n ALLOWED_ATTR: [],\n }),\n }}\n />\n </p>\n </div>\n </div>\n );\n}\n\ntype RecentActivityWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n\n // Activity settings\n maxItemsToShow?: number;\n};\n\nexport function RecentActivityWidget({\n // Title defaults\n titleEnabled = true,\n titleText = \"Recent Activity\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n\n // Styling defaults\n background = {\n type: \"solid\",\n color: \"background\",\n },\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n borderWidth = \"thin\",\n borderColor = \"muted\",\n\n // Activity defaults\n maxItemsToShow = 5,\n\n className,\n ...props\n}: RecentActivityWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n const { data: activities = [], isLoading, isError } = useActivities();\n\n const groupedActivities = useMemo(\n () => groupActivitiesByDate(activities),\n [activities],\n );\n\n const totalCount = Math.min(activities.length, maxItemsToShow);\n\n // Get activities to display (limited by maxItemsToShow)\n const activitiesToShow = useMemo(() => {\n const result: { date: string; items: Activity[] }[] = [];\n let count = 0;\n\n for (const [dateKey, items] of groupedActivities) {\n if (count >= maxItemsToShow) break;\n\n const remainingSlots = maxItemsToShow - count;\n const itemsToAdd = items.slice(0, remainingSlots);\n\n if (itemsToAdd.length > 0) {\n result.push({\n date: formatDateHeader(items[0]?.timestamp ?? dateKey),\n items: itemsToAdd,\n });\n count += itemsToAdd.length;\n }\n }\n\n return result;\n }, [groupedActivities, maxItemsToShow]);\n\n return (\n <div\n className={`@container overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${className}`}\n style={{ backgroundImage }}\n {...props}\n >\n <div className={`p-${padding} flex flex-col gap-2`}>\n {/* Header */}\n {titleEnabled && titleText && (\n <div className=\"flex w-full items-start gap-2\">\n <h2\n className={`flex-1 text-${titleFontSize} font-header font-bold text-${titleColor}`}\n >\n {titleText}\n </h2>\n {!isLoading && (\n <span\n className={`text-4xl font-bold text-${textColor} leading-none`}\n >\n {totalCount.toString().padStart(2, \"0\")}\n </span>\n )}\n </div>\n )}\n\n {/* Loading state */}\n {isLoading ? (\n <div className=\"flex min-h-[200px] items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : activities.length === 0 ? (\n /* Empty state */\n <div className=\"flex min-h-[200px] flex-col items-center justify-center gap-2\">\n <User className={`size-12 text-${textColor} opacity-30`} />\n <p\n className={`text-base font-semibold text-${textColor} opacity-50`}\n >\n No Activity To Report\n </p>\n <p className={`text-sm text-${textColor} opacity-40`}>\n You'll Do Great!\n </p>\n </div>\n ) : (\n /* Activity list */\n <div className=\"flex flex-col gap-4\">\n {activitiesToShow.map((group, groupIndex) => (\n <div key={groupIndex} className=\"flex flex-col gap-4\">\n {/* Date header */}\n <p className={`text-base font-semibold text-${textColor}`}>\n {group.date}\n </p>\n\n {/* Activity items */}\n <div className=\"flex flex-col gap-4\">\n {group.items.map((activity) => (\n <ActivityFeedItem\n key={activity.id}\n activity={activity}\n accentColor={accentColor}\n textColor={textColor}\n />\n ))}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n\nexport const recentActivityWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"RecentActivityWidget\",\n displayName: \"Recent Activity Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the activity feed\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Title text displayed above the activity feed\",\n defaultValue: \"Recent Activity\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the widget title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the widget title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Design Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the widget container\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for activity content\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for links and highlights\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the widget container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the widget container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget container\",\n defaultValue: \"thin\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget container\",\n defaultValue: \"muted\",\n tab: \"styling\",\n group: \"Design\",\n }),\n\n // Styling Tab - Display Group\n {\n key: \"maxItemsToShow\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of activity items to display\",\n defaultValue: 5,\n tab: \"styling\",\n group: \"Display\",\n },\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;AAEA,MAAM,sBAAM,IAAI,MAAM;AAEtB,SAAS,WAAW,SAAyB;AAC3C,yBAAO,IAAI,KAAK,IAAI,SAAS,GAAG,UAAU,IAAO,EAAC,aAAa;;AAGjE,MAAa,eAA2B;CACtC;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,cAAc;EACd,YAAY;EACZ,WAAW,WAAW,GAAG;EACzB,MAAM;EACP;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,cAAc;EACd,YAAY;EACZ,WAAW,WAAW,GAAG;EACzB,MAAM;EACP;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,cAAc;EACd,YAAY;EACZ,WAAW,WAAW,GAAG;EACzB,MAAM;EACP;CACD;EACE,IAAI;EACJ,UAAU;EACV,WAAW;EACX,cAAc;EACd,YAAY;EACZ,WAAW,WAAW,IAAI;EAC1B,MAAM;EACP;CACF;;;ACfD,SAAgB,gBAAmD;CACjE,MAAM,EAAE,SAAS,kBAAkB,qBAAqB;CACxD,MAAM,EAAE,cAAc,yBAAyB;AAE/C,QAAO,SAA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K;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAGF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACF;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-CRV2RMSr.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { l as getColorField } from "./fields-CjDogNNF.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Ban } from "lucide-react";
|
|
5
5
|
//#region ../widgets/src/widgets/SeparatorWidget.tsx
|
|
@@ -166,4 +166,4 @@ const separatorWidgetPropertySchema = {
|
|
|
166
166
|
//#endregion
|
|
167
167
|
export { SeparatorWidget_exports as n, separatorWidgetPropertySchema as r, SeparatorWidget as t };
|
|
168
168
|
|
|
169
|
-
//# sourceMappingURL=SeparatorWidget-
|
|
169
|
+
//# sourceMappingURL=SeparatorWidget-CkFIxxkI.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeparatorWidget-
|
|
1
|
+
{"version":3,"file":"SeparatorWidget-CkFIxxkI.mjs","names":[],"sources":["../../widgets/src/widgets/SeparatorWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ColorOptions } from \"@fluid-app/portal-core/types\";\nimport { Ban } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport { getColorField } from \"../core/fields\";\n\ntype SpacingOptions = 0 | 2 | 4 | 6 | 8 | 10;\n\ntype SeparatorWidgetProps = ComponentProps<\"div\"> & {\n orientation?: \"horizontal\" | \"vertical\";\n color?: ColorOptions;\n thickness?: `${number}px`;\n width?: `${number}%`;\n marginTop?: SpacingOptions;\n marginBottom?: SpacingOptions;\n};\n\nexport function SeparatorWidget({\n orientation = \"horizontal\",\n color = \"muted\",\n thickness = \"1px\",\n width = \"100%\",\n marginTop = 4,\n marginBottom = 4,\n className,\n style,\n ...props\n}: SeparatorWidgetProps): React.JSX.Element {\n const isHorizontal = orientation === \"horizontal\";\n\n return (\n <div\n className={`flex ${isHorizontal ? \"flex-row justify-center\" : \"h-full flex-col items-center\"} ${className ?? \"\"}`}\n style={{\n ...(isHorizontal\n ? {\n marginTop: `${marginTop * 4}px`,\n marginBottom: `${marginBottom * 4}px`,\n }\n : {\n paddingTop: `${marginTop * 4}px`,\n paddingBottom: `${marginBottom * 4}px`,\n }),\n ...style,\n }}\n aria-hidden=\"true\"\n {...props}\n >\n {isHorizontal ? (\n <div\n className={`bg-${color}`}\n style={{\n width,\n height: thickness,\n }}\n />\n ) : (\n <div\n className={`bg-${color}`}\n style={{\n width: thickness,\n height: \"100%\",\n }}\n />\n )}\n </div>\n );\n}\n\nexport const separatorWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SeparatorWidget\",\n displayName: \"Separator\",\n fields: [\n {\n key: \"orientation\",\n label: \"Orientation\",\n type: \"select\",\n description: \"Direction of the separator line\",\n defaultValue: \"horizontal\",\n options: [\n { label: \"Horizontal\", value: \"horizontal\" },\n { label: \"Vertical\", value: \"vertical\" },\n ],\n group: \"Separator\",\n },\n getColorField({\n key: \"color\",\n label: \"Color\",\n description: \"Color of the separator line\",\n defaultValue: \"muted\",\n group: \"Separator\",\n }),\n {\n key: \"thickness\",\n label: \"Thickness\",\n type: \"cssUnit\",\n description: \"Thickness of the separator line\",\n defaultValue: \"1px\",\n allowedUnits: [\"px\"],\n minByUnit: { px: 1 },\n maxByUnit: { px: 20 },\n stepByUnit: { px: 1 },\n group: \"Separator\",\n },\n {\n key: \"width\",\n label: \"Width\",\n type: \"cssUnit\",\n description: \"Width of the separator\",\n defaultValue: \"100%\",\n allowedUnits: [\"%\"],\n defaultUnit: \"%\",\n minByUnit: { \"%\": 1 },\n maxByUnit: { \"%\": 100 },\n stepByUnit: { \"%\": 1 },\n group: \"Separator\",\n requiresKeyValue: { key: \"orientation\", value: \"horizontal\" },\n },\n {\n key: \"marginTop\",\n label: \"Margin Top\",\n type: \"buttonGroup\",\n description: \"Space above the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n {\n key: \"marginBottom\",\n label: \"Margin Bottom\",\n type: \"buttonGroup\",\n description: \"Space below the separator\",\n defaultValue: 4,\n options: [\n { icon: Ban, value: 0 },\n { label: \"SM\", value: 2 },\n { label: \"MD\", value: 4 },\n { label: \"LG\", value: 6 },\n { label: \"XL\", value: 8 },\n { label: \"FULL\", value: 10 },\n ],\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,gBAAgB,EAC9B,cAAc,cACd,QAAQ,SACR,YAAY,OACZ,QAAQ,QACR,YAAY,GACZ,eAAe,GACf,WACA,OACA,GAAG,SACuC;CAC1C,MAAM,eAAe,gBAAgB;AAErC,QACE,oBAAC,OAAD;EACE,WAAW,QAAQ,eAAe,4BAA4B,+BAA+B,GAAG,aAAa;EAC7G,OAAO;GACL,GAAI,eACA;IACE,WAAW,GAAG,YAAY,EAAE;IAC5B,cAAc,GAAG,eAAe,EAAE;IACnC,GACD;IACE,YAAY,GAAG,YAAY,EAAE;IAC7B,eAAe,GAAG,eAAe,EAAE;IACpC;GACL,GAAG;GACJ;EACD,eAAY;EACZ,G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ACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS;IACP;KAAE,MAAM;KAAK,OAAO;KAAG;IACvB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAM,OAAO;KAAG;IACzB;KAAE,OAAO;KAAQ,OAAO;KAAI;IAC7B;GACD,OAAO;GACR;EACF;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as useSdkClient } from "./use-account-clients-
|
|
2
|
-
import { i as ShareablesCoreProvider, n as ShareablesApp, r as ShareablesUIProvider } from "./src-
|
|
3
|
-
import { i as useCurrentUser } from "./products-
|
|
1
|
+
import { i as useSdkClient } from "./use-account-clients-EEcG-B1B.mjs";
|
|
2
|
+
import { i as ShareablesCoreProvider, n as ShareablesApp, r as ShareablesUIProvider } from "./src-CIhTbou2.mjs";
|
|
3
|
+
import { i as useCurrentUser } from "./products-DOCuAQDz.mjs";
|
|
4
4
|
import { n as useAppNavigation } from "./AppNavigationContext-CcRZ_LqM.mjs";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -130,4 +130,4 @@ const shareablesScreenPropertySchema = {
|
|
|
130
130
|
//#endregion
|
|
131
131
|
export { shareablesScreenPropertySchema as n, ShareablesScreen as t };
|
|
132
132
|
|
|
133
|
-
//# sourceMappingURL=ShareablesScreen-
|
|
133
|
+
//# sourceMappingURL=ShareablesScreen-0JcyLc7i.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareablesScreen-
|
|
1
|
+
{"version":3,"file":"ShareablesScreen-0JcyLc7i.mjs","names":[],"sources":["../../../file-picker/api-client/src/client.ts","../src/screens/ShareablesScreen.tsx"],"sourcesContent":["import type { FetchClientInstance } from \"@fluid-app/api-client-core\";\nimport type { DamAssetCreateResponse } from \"@fluid-app/file-picker-core\";\n\nexport interface DamUploadStrategy {\n uploadFile(params: {\n file: File;\n name: string;\n description?: string;\n tags?: string[];\n onProgress?: (progress: number) => void;\n companyId?: number;\n }): Promise<DamAssetCreateResponse>;\n}\n\nexport interface FilePickerClientConfig {\n fetchClient: FetchClientInstance;\n uploadStrategy?: DamUploadStrategy;\n unsplashAccessKey?: string;\n proxyEndpoint?: string; // defaults to \"/api/proxy-url\"\n}\n\nexport interface FilePickerClient {\n fetchClient: FetchClientInstance;\n uploadStrategy?: DamUploadStrategy;\n unsplashAccessKey?: string;\n proxyEndpoint: string;\n}\n\nexport function createFilePickerClient(\n config: FilePickerClientConfig,\n): FilePickerClient {\n return {\n fetchClient: config.fetchClient,\n uploadStrategy: config.uploadStrategy,\n unsplashAccessKey: config.unsplashAccessKey,\n proxyEndpoint: config.proxyEndpoint ?? \"/api/proxy-url\",\n };\n}\n","import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { createFilePickerClient } from \"@fluid-app/file-picker-api-client\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useSdkClient } from \"../account/use-account-clients\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ShareablesScreenProps): React.JSX.Element {\n const domainClient = useSdkClient();\n const { data: userData } = useCurrentUser();\n const { currentSlug, navigate } = useAppNavigation();\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n // Navigate back to the listing for the current screen\n navigate(`share/${screen}`);\n } else {\n // Navigate to the default shareables screen\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n client: domainClient,\n user: userData ? { id: userData.id } : null,\n repContext: true,\n }),\n [domainClient, userData],\n );\n\n const filePickerClient = useMemo(\n () => createFilePickerClient({ fetchClient: domainClient }),\n [domainClient],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: userData\n ? {\n id: userData.id,\n company: userData.company\n ? { logo_url: userData.company.logo_url }\n : null,\n }\n : undefined,\n affiliateId:\n (userData as { affiliate_id?: number } | undefined)?.affiliate_id ??\n null,\n basePath: \"\",\n navigate: (path: string) => {\n // Strip leading slash — cards generate paths like \"/share/product/123\"\n const cleanPath = path.replace(/^\\//, \"\");\n // Ensure share/ prefix — screen components pass relative paths like \"media/new\"\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n }) => {\n console.warn(`[Shareables] ${opts.type}: ${opts.title}`);\n },\n filePickerClient,\n onToggleFavorite: async (params: {\n favoriteableId: number;\n favoriteableType: string;\n }) => {\n const affiliateId = (userData as { affiliate_id?: number } | undefined)\n ?.affiliate_id;\n if (!affiliateId) throw new Error(\"No affiliate ID\");\n return domainClient.post<{ is_favorited: boolean }>(\n `/user_companies/${affiliateId}/favorites/toggle.json`,\n {\n favoriteable_id: params.favoriteableId,\n favoriteable_type: params.favoriteableType,\n },\n );\n },\n onDeletePlaylist: async (playlistId: number) => {\n const { playlists: playlistsApi } =\n await import(\"@fluid-app/shareables-api-client\");\n await playlistsApi.deletePlaylist(domainClient, playlistId);\n },\n }),\n [userData, navigate, filePickerClient, domainClient],\n );\n\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={userData?.company?.logo_url}\n countryCode={userData?.country?.iso}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n </div>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":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enderer-C-H-ju1C.cjs");
|
|
5
|
+
require("./WidgetInteractionContext-ywxCBIMm.cjs");
|
|
6
|
+
require("./EmbedWidget-D6eRvOud.cjs");
|
|
7
|
+
require("./fields-BCNGRVzZ.cjs");
|
|
8
|
+
require("./TextWidget-XBeVX2oM.cjs");
|
|
9
|
+
require("./AlertWidget-CSYWU2c3.cjs");
|
|
10
|
+
require("./BulletListWidget-BUMq15V1.cjs");
|
|
11
|
+
require("./CalendarWidget-DLkcnQVx.cjs");
|
|
12
|
+
require("./CardWidget-B4cJHq6g.cjs");
|
|
13
|
+
require("./purify.es-CmsCRU2T.cjs");
|
|
14
|
+
require("./src-CWGmmrLZ.cjs");
|
|
15
|
+
require("./scroll-arrows-Dw7eLYdG.cjs");
|
|
16
|
+
require("./MediaRenderer-CEV-eeB-.cjs");
|
|
17
|
+
require("./CarouselWidget-Bx5jrthO.cjs");
|
|
18
|
+
require("./CatchUpWidget-CFL4REYX.cjs");
|
|
19
|
+
require("./ChartWidget-DWWeWN0Q.cjs");
|
|
20
|
+
require("./LayoutWidget-CsdItxHF.cjs");
|
|
21
|
+
require("./ContainerWidget-DZXzmDZl.cjs");
|
|
22
|
+
require("./ImageWidget-DwM4H6SC.cjs");
|
|
23
|
+
require("./LinkWidget-CJKveS10.cjs");
|
|
24
|
+
require("./ListWidget-D8yMrpa5.cjs");
|
|
25
|
+
require("./MySiteWidget-DeAwyK5y.cjs");
|
|
26
|
+
require("./NestedWidget-CZuN2QY2.cjs");
|
|
27
|
+
require("./QuickShareWidget-CIfXUWCx.cjs");
|
|
28
|
+
require("./RecentActivityWidget-kRfjO1IV.cjs");
|
|
29
|
+
require("./SeparatorWidget-BUXIxV-F.cjs");
|
|
30
|
+
require("./SpacerWidget-DW_7QXrs.cjs");
|
|
31
|
+
require("./TableWidget-DFWfQIWv.cjs");
|
|
32
|
+
require("./ToDoWidget-GmeRwP_0.cjs");
|
|
33
|
+
require("./VideoWidget-CN8nMeGP.cjs");
|
|
34
|
+
require("./src-CXGrnE7x.cjs");
|
|
35
|
+
require("./dist-CtcLRHrv.cjs");
|
|
36
|
+
require("./es-BZa0y3qY.cjs");
|
|
37
|
+
require("./dist-BUWkpuUk.cjs");
|
|
38
|
+
const require_ShareablesScreen = require("./ShareablesScreen-Dfa0LM6R.cjs");
|
|
39
|
+
require("./dist-DqYiTOfX.cjs");
|
|
40
|
+
exports.ShareablesScreen = require_ShareablesScreen.ShareablesScreen;
|
|
41
|
+
exports.shareablesScreenPropertySchema = require_ShareablesScreen.shareablesScreenPropertySchema;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-DAgNkxik.cjs");
|
|
2
|
-
const require_use_account_clients = require("./use-account-clients-
|
|
3
|
-
const require_src = require("./src-
|
|
4
|
-
const require_products = require("./products-
|
|
2
|
+
const require_use_account_clients = require("./use-account-clients-BOwgvZok.cjs");
|
|
3
|
+
const require_src = require("./src-CXGrnE7x.cjs");
|
|
4
|
+
const require_products = require("./products-zutaVs48.cjs");
|
|
5
5
|
const require_AppNavigationContext = require("./AppNavigationContext-CbWjJMoI.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -142,4 +142,4 @@ Object.defineProperty(exports, "shareablesScreenPropertySchema", {
|
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
//# sourceMappingURL=ShareablesScreen-
|
|
145
|
+
//# sourceMappingURL=ShareablesScreen-Dfa0LM6R.cjs.map
|