@fluid-app/portal-sdk 0.1.215 → 0.1.217
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/{AppDownloadScreen-rZkhl4Q9.cjs → AppDownloadScreen-CBoC31wL.cjs} +2 -2
- package/dist/{AppDownloadScreen-rZkhl4Q9.cjs.map → AppDownloadScreen-CBoC31wL.cjs.map} +1 -1
- package/dist/{AppDownloadScreen-CTqsyx3n.mjs → AppDownloadScreen-CZ0EOIZ5.mjs} +2 -2
- package/dist/{AppDownloadScreen-CTqsyx3n.mjs.map → AppDownloadScreen-CZ0EOIZ5.mjs.map} +1 -1
- package/dist/{AppNavigationContext-N5oUbgNL.cjs → AppNavigationContext-CbK8uCjS.cjs} +1 -1
- package/dist/{AppNavigationContext-N5oUbgNL.cjs.map → AppNavigationContext-CbK8uCjS.cjs.map} +1 -1
- package/dist/{AppNavigationContext-BW3lSpfT.mjs → AppNavigationContext-Cq3BDKSf.mjs} +1 -1
- package/dist/{AppNavigationContext-BW3lSpfT.mjs.map → AppNavigationContext-Cq3BDKSf.mjs.map} +1 -1
- package/dist/{CardWidget-Scr2BDrZ.mjs → CardWidget-B1-STzEY.mjs} +2 -2
- package/dist/{CardWidget-Scr2BDrZ.mjs.map → CardWidget-B1-STzEY.mjs.map} +1 -1
- package/dist/{CardWidget-BAl-3dJF.cjs → CardWidget-CdrGXdUr.cjs} +2 -2
- package/dist/{CardWidget-BAl-3dJF.cjs.map → CardWidget-CdrGXdUr.cjs.map} +1 -1
- package/dist/{CardWidget-CFtUC9RB.cjs → CardWidget-Cze0MIZ4.cjs} +2 -2
- package/dist/{ContactsScreen-UnYKZlkb.cjs → ContactsScreen-CSY7Of6x.cjs} +6 -6
- package/dist/{ContactsScreen-UnYKZlkb.cjs.map → ContactsScreen-CSY7Of6x.cjs.map} +1 -1
- package/dist/{ContactsScreen-DscaUwNM.mjs → ContactsScreen-CbV-r1fn.mjs} +6 -6
- package/dist/{ContactsScreen-DscaUwNM.mjs.map → ContactsScreen-CbV-r1fn.mjs.map} +1 -1
- package/dist/{ContactsScreen-Cs9bKvMr.cjs → ContactsScreen-D-g7XEB-.cjs} +6 -6
- package/dist/{ContainerWidget-DXgM6Mxa.cjs → ContainerWidget-D89LdXUJ.cjs} +2 -2
- package/dist/{ContainerWidget-DXgM6Mxa.cjs.map → ContainerWidget-D89LdXUJ.cjs.map} +1 -1
- package/dist/{ContainerWidget-CxAu29Rz.mjs → ContainerWidget-DQwZ-weo.mjs} +2 -2
- package/dist/{ContainerWidget-CxAu29Rz.mjs.map → ContainerWidget-DQwZ-weo.mjs.map} +1 -1
- package/dist/{ContainerWidget-DV-Ng6tH.cjs → ContainerWidget-oF_cuYkn.cjs} +3 -3
- package/dist/{CustomersScreen-BgbvmBoF.mjs → CustomersScreen-DSNokGQu.mjs} +1 -1
- package/dist/{CustomersScreen-BgbvmBoF.mjs.map → CustomersScreen-DSNokGQu.mjs.map} +1 -1
- package/dist/{CustomersScreen-CKMopTNU.cjs → CustomersScreen-Rf5uucRx.cjs} +1 -1
- package/dist/{CustomersScreen-CKMopTNU.cjs.map → CustomersScreen-Rf5uucRx.cjs.map} +1 -1
- package/dist/EmbedWidget-BysWpVIC.cjs +684 -0
- package/dist/EmbedWidget-BysWpVIC.cjs.map +1 -0
- package/dist/EmbedWidget-tU8njf5H.mjs +654 -0
- package/dist/EmbedWidget-tU8njf5H.mjs.map +1 -0
- package/dist/{FluidProvider-_xK5H6F3.mjs → FluidProvider-02beRTpR.mjs} +27 -24
- package/dist/{FluidProvider-_xK5H6F3.mjs.map → FluidProvider-02beRTpR.mjs.map} +1 -1
- package/dist/{FluidProvider-CG8EpvkS.cjs → FluidProvider-BgFmXtHo.cjs} +27 -24
- package/dist/{FluidProvider-CG8EpvkS.cjs.map → FluidProvider-BgFmXtHo.cjs.map} +1 -1
- package/dist/{InfiniteScrollSentinel-CUU5C88p.mjs → InfiniteScrollSentinel-DCxWTHrA.mjs} +1 -1
- package/dist/{InfiniteScrollSentinel-CUU5C88p.mjs.map → InfiniteScrollSentinel-DCxWTHrA.mjs.map} +1 -1
- package/dist/{InfiniteScrollSentinel-BGXp134B.cjs → InfiniteScrollSentinel-DPyNdLiU.cjs} +1 -1
- package/dist/{InfiniteScrollSentinel-BGXp134B.cjs.map → InfiniteScrollSentinel-DPyNdLiU.cjs.map} +1 -1
- package/dist/{LayoutWidget-MTchacII.mjs → LayoutWidget-BqzP7L10.mjs} +2 -2
- package/dist/{LayoutWidget-MTchacII.mjs.map → LayoutWidget-BqzP7L10.mjs.map} +1 -1
- package/dist/{LayoutWidget-CSouwqRJ.cjs → LayoutWidget-CTxbrzsY.cjs} +2 -2
- package/dist/{LayoutWidget-BbABNLAR.cjs → LayoutWidget-Dh8JWX2-.cjs} +2 -2
- package/dist/{LayoutWidget-BbABNLAR.cjs.map → LayoutWidget-Dh8JWX2-.cjs.map} +1 -1
- package/dist/{MessagingScreen-p-ZeCwpa.cjs → MessagingScreen-BkLcqJbs.cjs} +5 -5
- package/dist/{MessagingScreen-p-ZeCwpa.cjs.map → MessagingScreen-BkLcqJbs.cjs.map} +1 -1
- package/dist/{MessagingScreen-C58vXVET.mjs → MessagingScreen-CJlVOY5R.mjs} +3 -3
- package/dist/{MessagingScreen-C58vXVET.mjs.map → MessagingScreen-CJlVOY5R.mjs.map} +1 -1
- package/dist/{MessagingScreen-DgmMx15d.cjs → MessagingScreen-sN7aBvGk.cjs} +17 -16
- package/dist/{MySiteScreen-CiQcyMSg.cjs → MySiteScreen-B0aOIzU4.cjs} +4 -4
- package/dist/{MySiteScreen-Cjkw8dKY.cjs → MySiteScreen-B1L8coGs.cjs} +4 -4
- package/dist/{MySiteScreen-Cjkw8dKY.cjs.map → MySiteScreen-B1L8coGs.cjs.map} +1 -1
- package/dist/{MySiteScreen-Bg0gFxf0.mjs → MySiteScreen-DUN5TTvU.mjs} +4 -4
- package/dist/{MySiteScreen-Bg0gFxf0.mjs.map → MySiteScreen-DUN5TTvU.mjs.map} +1 -1
- package/dist/OrdersScreen-BmwiVbLV.cjs +9 -0
- package/dist/{OrdersScreen-BklAH7FW.mjs → OrdersScreen-D-SgUl2a.mjs} +4 -4
- package/dist/{OrdersScreen-BklAH7FW.mjs.map → OrdersScreen-D-SgUl2a.mjs.map} +1 -1
- package/dist/{OrdersScreen-DPSqqmhe.cjs → OrdersScreen-Dp7SzXVv.cjs} +4 -4
- package/dist/{OrdersScreen-DPSqqmhe.cjs.map → OrdersScreen-Dp7SzXVv.cjs.map} +1 -1
- package/dist/{PortalContentApiProvider-CB32GRS5.mjs → PortalContentApiProvider-C9FeVwRb.mjs} +7 -7
- package/dist/{PortalContentApiProvider-CB32GRS5.mjs.map → PortalContentApiProvider-C9FeVwRb.mjs.map} +1 -1
- package/dist/{PortalContentApiProvider-BU3UTVjk.cjs → PortalContentApiProvider-RXBp8FNj.cjs} +8 -8
- package/dist/{PortalContentApiProvider-BU3UTVjk.cjs.map → PortalContentApiProvider-RXBp8FNj.cjs.map} +1 -1
- package/dist/{PortalProductsApiProvider-DHni3Y1V.mjs → PortalProductsApiProvider-CE71zDj9.mjs} +1 -1
- package/dist/{PortalProductsApiProvider-DHni3Y1V.mjs.map → PortalProductsApiProvider-CE71zDj9.mjs.map} +1 -1
- package/dist/{PortalProductsApiProvider-DnhHoraV.cjs → PortalProductsApiProvider-Ca1oeTtJ.cjs} +1 -1
- package/dist/{PortalProductsApiProvider-DnhHoraV.cjs.map → PortalProductsApiProvider-Ca1oeTtJ.cjs.map} +1 -1
- package/dist/{ProductsScreen-DNMT2I69.cjs → ProductsScreen-BD53vh6Y.cjs} +6 -6
- package/dist/{ProductsScreen-DNMT2I69.cjs.map → ProductsScreen-BD53vh6Y.cjs.map} +1 -1
- package/dist/{ProductsScreen-C8GO63G2.mjs → ProductsScreen-BtUZxJCt.mjs} +6 -6
- package/dist/{ProductsScreen-C8GO63G2.mjs.map → ProductsScreen-BtUZxJCt.mjs.map} +1 -1
- package/dist/ProductsScreen-DNpzJ6lh.cjs +15 -0
- package/dist/ProductsScreen-pkOeOW8M.mjs +13 -0
- package/dist/{ProfileScreen-CfCewCM7.cjs → ProfileScreen-Bgo6iTKe.cjs} +16 -15
- package/dist/{ProfileScreen-TLKSlv4_.mjs → ProfileScreen-CNYqUDNB.mjs} +4 -4
- package/dist/{ProfileScreen-TLKSlv4_.mjs.map → ProfileScreen-CNYqUDNB.mjs.map} +1 -1
- package/dist/{ProfileScreen-T7HQoFiw.cjs → ProfileScreen-rPqgsNCc.cjs} +4 -4
- package/dist/{ProfileScreen-T7HQoFiw.cjs.map → ProfileScreen-rPqgsNCc.cjs.map} +1 -1
- package/dist/QuickLinksWidget-BwEGtrV0.cjs +563 -0
- package/dist/QuickLinksWidget-BwEGtrV0.cjs.map +1 -0
- package/dist/QuickLinksWidget-D8RlDvkB.mjs +546 -0
- package/dist/QuickLinksWidget-D8RlDvkB.mjs.map +1 -0
- package/dist/{QuickShareWidget-CkPsax9Z.mjs → QuickShareWidget-BURtESV2.mjs} +1 -1
- package/dist/{QuickShareWidget-CkPsax9Z.mjs.map → QuickShareWidget-BURtESV2.mjs.map} +1 -1
- package/dist/{QuickShareWidget-BwOhBs6H.cjs → QuickShareWidget-D171Z9mX.cjs} +1 -1
- package/dist/{QuickShareWidget-BwOhBs6H.cjs.map → QuickShareWidget-D171Z9mX.cjs.map} +1 -1
- package/dist/{RecentActivityWidget-Bg7N2Lpp.cjs → RecentActivityWidget-BmE7_-iJ.cjs} +1 -1
- package/dist/{RecentActivityWidget-Bg7N2Lpp.cjs.map → RecentActivityWidget-BmE7_-iJ.cjs.map} +1 -1
- package/dist/{RecentActivityWidget-8LkuMmbc.mjs → RecentActivityWidget-Dy5SAx61.mjs} +1 -1
- package/dist/{RecentActivityWidget-8LkuMmbc.mjs.map → RecentActivityWidget-Dy5SAx61.mjs.map} +1 -1
- package/dist/{ScreenHeaderContext-FYyYk97y.mjs → ScreenHeaderContext-BDjNSUfr.mjs} +1 -1
- package/dist/{ScreenHeaderContext-FYyYk97y.mjs.map → ScreenHeaderContext-BDjNSUfr.mjs.map} +1 -1
- package/dist/{ScreenHeaderContext-DA8cEfP-.cjs → ScreenHeaderContext-BXgWydjB.cjs} +1 -1
- package/dist/{ScreenHeaderContext-DA8cEfP-.cjs.map → ScreenHeaderContext-BXgWydjB.cjs.map} +1 -1
- package/dist/{ScreenRenderer-Cv2rxvtF.mjs → ScreenRenderer-BqDTKZEZ.mjs} +2 -1
- package/dist/ScreenRenderer-BqDTKZEZ.mjs.map +1 -0
- package/dist/{ScreenRenderer-DfeRRgBO.cjs → ScreenRenderer-Cg85jtXq.cjs} +2 -1
- package/dist/ScreenRenderer-Cg85jtXq.cjs.map +1 -0
- package/dist/{SearchSort-CPkF1EaA.cjs → SearchSort-DHDDqero.cjs} +1 -1
- package/dist/{SearchSort-CPkF1EaA.cjs.map → SearchSort-DHDDqero.cjs.map} +1 -1
- package/dist/{SearchSort-YYd9-Hdf.mjs → SearchSort-DXBt-uj0.mjs} +1 -1
- package/dist/{SearchSort-YYd9-Hdf.mjs.map → SearchSort-DXBt-uj0.mjs.map} +1 -1
- package/dist/{SeparatorWidget-DeCY23G9.mjs → SeparatorWidget-CheNBJwz.mjs} +1 -1
- package/dist/{SeparatorWidget-DeCY23G9.mjs.map → SeparatorWidget-CheNBJwz.mjs.map} +1 -1
- package/dist/{SeparatorWidget-R9PjLUJh.cjs → SeparatorWidget-CjVHbHzQ.cjs} +1 -1
- package/dist/{SeparatorWidget-R9PjLUJh.cjs.map → SeparatorWidget-CjVHbHzQ.cjs.map} +1 -1
- package/dist/{ShareablesScreen-DRpf5u05.mjs → ShareablesScreen-CW1e9x4K.mjs} +7 -7
- package/dist/{ShareablesScreen-DRpf5u05.mjs.map → ShareablesScreen-CW1e9x4K.mjs.map} +1 -1
- package/dist/ShareablesScreen-D1J2Kljk.mjs +15 -0
- package/dist/{ShareablesScreen-D9Q0dQhz.cjs → ShareablesScreen-DC8xXUo4.cjs} +7 -7
- package/dist/{ShareablesScreen-D9Q0dQhz.cjs.map → ShareablesScreen-DC8xXUo4.cjs.map} +1 -1
- package/dist/ShareablesScreen-smU5pGyH.cjs +17 -0
- package/dist/{ShopScreen-u8i7hVdL.mjs → ShopScreen-B9lHJ8L2.mjs} +7 -7
- package/dist/{ShopScreen-u8i7hVdL.mjs.map → ShopScreen-B9lHJ8L2.mjs.map} +1 -1
- package/dist/{ShopScreen-C7aJIMGh.cjs → ShopScreen-DUHzufCU.cjs} +7 -7
- package/dist/{ShopScreen-C7aJIMGh.cjs.map → ShopScreen-DUHzufCU.cjs.map} +1 -1
- package/dist/{ShopScreen-DLcv_4Iu.cjs → ShopScreen-g6FQ4R1_.cjs} +18 -17
- package/dist/{SpacerWidget-CvuJeeAj.mjs → SpacerWidget-D-WjN1xb.mjs} +1 -1
- package/dist/{SpacerWidget-CvuJeeAj.mjs.map → SpacerWidget-D-WjN1xb.mjs.map} +1 -1
- package/dist/{SpacerWidget-CYHjTF38.cjs → SpacerWidget-D9lOLPr5.cjs} +1 -1
- package/dist/{SpacerWidget-CYHjTF38.cjs.map → SpacerWidget-D9lOLPr5.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-oMAid0AM.cjs → SubscriptionsScreen-8zup9pEX.cjs} +5 -5
- package/dist/{SubscriptionsScreen-rYK8dckl.mjs → SubscriptionsScreen-CwUdB9rW.mjs} +7 -7
- package/dist/{SubscriptionsScreen-rYK8dckl.mjs.map → SubscriptionsScreen-CwUdB9rW.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-C1GXipTn.cjs → SubscriptionsScreen-DKyatNoJ.cjs} +8 -8
- package/dist/{SubscriptionsScreen-C1GXipTn.cjs.map → SubscriptionsScreen-DKyatNoJ.cjs.map} +1 -1
- package/dist/{TableWidget-CT7Ydlw8.cjs → TableWidget-C2BG7wMg.cjs} +1 -1
- package/dist/{TableWidget-BAwpJ-Vb.mjs → TableWidget-CDVOq4aN.mjs} +1 -1
- package/dist/{TableWidget-BAwpJ-Vb.mjs.map → TableWidget-CDVOq4aN.mjs.map} +1 -1
- package/dist/{TableWidget-QlLGELmp.cjs → TableWidget-D5gAsgv6.cjs} +1 -1
- package/dist/{TableWidget-QlLGELmp.cjs.map → TableWidget-D5gAsgv6.cjs.map} +1 -1
- package/dist/{ToDoWidget-DT30Nnjt.mjs → ToDoWidget-BRNDE3MH.mjs} +1 -1
- package/dist/{ToDoWidget-DT30Nnjt.mjs.map → ToDoWidget-BRNDE3MH.mjs.map} +1 -1
- package/dist/{ToDoWidget-Tcy4VK1v.cjs → ToDoWidget-x86UGKLQ.cjs} +1 -1
- package/dist/{ToDoWidget-Tcy4VK1v.cjs.map → ToDoWidget-x86UGKLQ.cjs.map} +1 -1
- package/dist/{UpgradeScreen-BZ92a6w9.cjs → UpgradeScreen-BdY0rCoF.cjs} +1 -1
- package/dist/{UpgradeScreen-CNieK9ud.mjs → UpgradeScreen-Dau5Elx4.mjs} +1 -1
- package/dist/{UpgradeScreen-CNieK9ud.mjs.map → UpgradeScreen-Dau5Elx4.mjs.map} +1 -1
- package/dist/{UpgradeScreen-BEHFQRlO.cjs → UpgradeScreen-DrBa2uzD.cjs} +1 -1
- package/dist/{UpgradeScreen-BEHFQRlO.cjs.map → UpgradeScreen-DrBa2uzD.cjs.map} +1 -1
- package/dist/{VideoWidget-CK4I8Xmv.cjs → VideoWidget-BIokMYTX.cjs} +1 -1
- package/dist/{VideoWidget-CK4I8Xmv.cjs.map → VideoWidget-BIokMYTX.cjs.map} +1 -1
- package/dist/{VideoWidget-BE_cv0Fm.mjs → VideoWidget-BMIt-eiQ.mjs} +1 -1
- package/dist/{VideoWidget-BE_cv0Fm.mjs.map → VideoWidget-BMIt-eiQ.mjs.map} +1 -1
- package/dist/{dist-BRT-FAUb.cjs → dist-CGuUUVNt.cjs} +1 -1
- package/dist/{dist-BRT-FAUb.cjs.map → dist-CGuUUVNt.cjs.map} +1 -1
- package/dist/{dist-DBPpJ567.mjs → dist-Cis8L6HV.mjs} +2 -2
- package/dist/{dist-DBPpJ567.mjs.map → dist-Cis8L6HV.mjs.map} +1 -1
- package/dist/{dist-BETEuYfn.mjs → dist-D39Yezrv.mjs} +1 -1
- package/dist/{dist-BETEuYfn.mjs.map → dist-D39Yezrv.mjs.map} +1 -1
- package/dist/{dist-Y1iryX8H.cjs → dist-DDZMFlal.cjs} +2 -2
- package/dist/{dist-Y1iryX8H.cjs.map → dist-DDZMFlal.cjs.map} +1 -1
- package/dist/{dist-Ck1Xpuzh.cjs → dist-DWs3-WOI.cjs} +1 -1
- package/dist/{dist-Ck1Xpuzh.cjs.map → dist-DWs3-WOI.cjs.map} +1 -1
- package/dist/{es-Dr47illR.cjs → es-DHLLltoR.cjs} +1 -1
- package/dist/{es-Dr47illR.cjs.map → es-DHLLltoR.cjs.map} +1 -1
- package/dist/{format-C3sl4r8U.cjs → format-B8vxOIbt.cjs} +1 -1
- package/dist/{format-C3sl4r8U.cjs.map → format-B8vxOIbt.cjs.map} +1 -1
- package/dist/index.cjs +66 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +141 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +141 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +64 -63
- package/dist/index.mjs.map +1 -1
- package/dist/{order-status-badge-CPPesrcx.cjs → order-status-badge-CAu3UIzD.cjs} +3 -3
- package/dist/{order-status-badge-CPPesrcx.cjs.map → order-status-badge-CAu3UIzD.cjs.map} +1 -1
- package/dist/{order-status-badge-B2_tZYhG.mjs → order-status-badge-b0F_B7mu.mjs} +3 -3
- package/dist/{order-status-badge-B2_tZYhG.mjs.map → order-status-badge-b0F_B7mu.mjs.map} +1 -1
- package/dist/{sortable.esm-DFTEWOHN.mjs → sortable.esm-CJLSD-Ce.mjs} +1 -1
- package/dist/{sortable.esm-DFTEWOHN.mjs.map → sortable.esm-CJLSD-Ce.mjs.map} +1 -1
- package/dist/{use-account-8Bv6INGF.cjs → use-account-C5QI6NSe.cjs} +1 -1
- package/dist/{use-account-8Bv6INGF.cjs.map → use-account-C5QI6NSe.cjs.map} +1 -1
- package/dist/{use-account-B16Tor2Q.mjs → use-account-Cvig0exB.mjs} +1 -1
- package/dist/{use-account-B16Tor2Q.mjs.map → use-account-Cvig0exB.mjs.map} +1 -1
- package/dist/{use-mysite-portal-axe_PFzR.mjs → use-mysite-portal-BV-BP3CE.mjs} +1 -1
- package/dist/{use-mysite-portal-axe_PFzR.mjs.map → use-mysite-portal-BV-BP3CE.mjs.map} +1 -1
- package/dist/{use-mysite-portal-CJBowMpK.cjs → use-mysite-portal-DzDYRU0u.cjs} +1 -1
- package/dist/{use-mysite-portal-CJBowMpK.cjs.map → use-mysite-portal-DzDYRU0u.cjs.map} +1 -1
- package/dist/{use-store-CdYGxnIk.cjs → use-store-BLcehk1A.cjs} +1 -1
- package/dist/{use-store-CdYGxnIk.cjs.map → use-store-BLcehk1A.cjs.map} +1 -1
- package/dist/{use-store-BnHhQDYo.mjs → use-store-efmQhKpB.mjs} +1 -1
- package/dist/{use-store-BnHhQDYo.mjs.map → use-store-efmQhKpB.mjs.map} +1 -1
- package/package.json +15 -15
- package/dist/EmbedWidget-C3mGurOv.mjs +0 -221
- package/dist/EmbedWidget-C3mGurOv.mjs.map +0 -1
- package/dist/EmbedWidget-PIWoA9sU.cjs +0 -251
- package/dist/EmbedWidget-PIWoA9sU.cjs.map +0 -1
- package/dist/OrdersScreen-CH4wrbZJ.cjs +0 -9
- package/dist/ProductsScreen-A9LG5Pk7.mjs +0 -13
- package/dist/ProductsScreen-DFFOXSgX.cjs +0 -15
- package/dist/ScreenRenderer-Cv2rxvtF.mjs.map +0 -1
- package/dist/ScreenRenderer-DfeRRgBO.cjs.map +0 -1
- package/dist/ShareablesScreen-CoOLXqJ6.cjs +0 -17
- package/dist/ShareablesScreen-ysqC_x6z.mjs +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-account-
|
|
1
|
+
{"version":3,"file":"use-account-C5QI6NSe.cjs","names":["useAccountApi"],"sources":["../src/account/query-keys.ts","../src/hooks/use-account.ts"],"sourcesContent":["export const accountKeys = {\n all: [\"portalTenant\", \"account\"] as const,\n detail: (userId?: number) => [...accountKeys.all, userId] as const,\n} as const;\n\nexport const payKeys = {\n addresses: {\n all: [\"portalTenant\", \"addresses\"] as const,\n list: (userId?: number) => [...payKeys.addresses.all, userId] as const,\n },\n paymentMethods: {\n all: [\"portalTenant\", \"paymentMethods\"] as const,\n list: (userId?: number) => [...payKeys.paymentMethods.all, userId] as const,\n },\n pointsLedgers: {\n all: [\"portalTenant\", \"pointsLedgers\"] as const,\n list: (userId?: number) => [...payKeys.pointsLedgers.all, userId] as const,\n },\n} as const;\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useAccountApi } from \"@fluid-app/portal-core/account-api-context\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\nimport { accountKeys } from \"../account/query-keys\";\n\n/**\n * Fetches the current user's account from GET /api/account.\n * Replaces the old useCurrentUser (which called non-existent /api/me).\n */\nexport function useAccount(): UseQueryResult<AccountRep> {\n const api = useAccountApi();\n\n return useQuery({\n queryKey: accountKeys.detail(),\n queryFn: async () => {\n const response = await api.fetchAccount();\n return response.account;\n },\n staleTime: 5 * 60 * 1000,\n });\n}\n"],"mappings":";;;;AAAA,MAAa,cAAc;CACzB,KAAK,CAAC,gBAAgB,UAAU;CAChC,SAAS,WAAoB,CAAC,GAAG,YAAY,KAAK,OAAO;CAC1D;AAED,MAAa,UAAU;CACrB,WAAW;EACT,KAAK,CAAC,gBAAgB,YAAY;EAClC,OAAO,WAAoB,CAAC,GAAG,QAAQ,UAAU,KAAK,OAAO;EAC9D;CACD,gBAAgB;EACd,KAAK,CAAC,gBAAgB,iBAAiB;EACvC,OAAO,WAAoB,CAAC,GAAG,QAAQ,eAAe,KAAK,OAAO;EACnE;CACD,eAAe;EACb,KAAK,CAAC,gBAAgB,gBAAgB;EACtC,OAAO,WAAoB,CAAC,GAAG,QAAQ,cAAc,KAAK,OAAO;EAClE;CACF;;;;;;;ACTD,SAAgB,aAAyC;CACvD,MAAM,MAAMA,4BAAAA,eAAe;AAE3B,SAAA,GAAA,sBAAA,UAAgB;EACd,UAAU,YAAY,QAAQ;EAC9B,SAAS,YAAY;AAEnB,WADiB,MAAM,IAAI,cAAc,EACzB;;EAElB,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-account-
|
|
1
|
+
{"version":3,"file":"use-account-Cvig0exB.mjs","names":[],"sources":["../src/account/query-keys.ts","../src/hooks/use-account.ts"],"sourcesContent":["export const accountKeys = {\n all: [\"portalTenant\", \"account\"] as const,\n detail: (userId?: number) => [...accountKeys.all, userId] as const,\n} as const;\n\nexport const payKeys = {\n addresses: {\n all: [\"portalTenant\", \"addresses\"] as const,\n list: (userId?: number) => [...payKeys.addresses.all, userId] as const,\n },\n paymentMethods: {\n all: [\"portalTenant\", \"paymentMethods\"] as const,\n list: (userId?: number) => [...payKeys.paymentMethods.all, userId] as const,\n },\n pointsLedgers: {\n all: [\"portalTenant\", \"pointsLedgers\"] as const,\n list: (userId?: number) => [...payKeys.pointsLedgers.all, userId] as const,\n },\n} as const;\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useAccountApi } from \"@fluid-app/portal-core/account-api-context\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\nimport { accountKeys } from \"../account/query-keys\";\n\n/**\n * Fetches the current user's account from GET /api/account.\n * Replaces the old useCurrentUser (which called non-existent /api/me).\n */\nexport function useAccount(): UseQueryResult<AccountRep> {\n const api = useAccountApi();\n\n return useQuery({\n queryKey: accountKeys.detail(),\n queryFn: async () => {\n const response = await api.fetchAccount();\n return response.account;\n },\n staleTime: 5 * 60 * 1000,\n });\n}\n"],"mappings":";;;AAAA,MAAa,cAAc;CACzB,KAAK,CAAC,gBAAgB,UAAU;CAChC,SAAS,WAAoB,CAAC,GAAG,YAAY,KAAK,OAAO;CAC1D;AAED,MAAa,UAAU;CACrB,WAAW;EACT,KAAK,CAAC,gBAAgB,YAAY;EAClC,OAAO,WAAoB,CAAC,GAAG,QAAQ,UAAU,KAAK,OAAO;EAC9D;CACD,gBAAgB;EACd,KAAK,CAAC,gBAAgB,iBAAiB;EACvC,OAAO,WAAoB,CAAC,GAAG,QAAQ,eAAe,KAAK,OAAO;EACnE;CACD,eAAe;EACb,KAAK,CAAC,gBAAgB,gBAAgB;EACtC,OAAO,WAAoB,CAAC,GAAG,QAAQ,cAAc,KAAK,OAAO;EAClE;CACF;;;;;;;ACTD,SAAgB,aAAyC;CACvD,MAAM,MAAM,eAAe;AAE3B,QAAO,SAAS;EACd,UAAU,YAAY,QAAQ;EAC9B,SAAS,YAAY;AAEnB,WADiB,MAAM,IAAI,cAAc,EACzB;;EAElB,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -138,4 +138,4 @@ function usePortalMySiteThemes() {
|
|
|
138
138
|
//#endregion
|
|
139
139
|
export { usePortalFavorites as a, usePortalMySiteThemes as c, usePortalUpdateLink as d, usePortalUpdateProfile as f, usePortalDeleteLink as i, usePortalReorderFavorites as l, usePortalCreateLink as n, usePortalLinks as o, usePortalUpdateSettings as p, usePortalDeleteFavorite as r, usePortalMySiteProfile as s, PORTAL_MYSITE_KEYS as t, usePortalReorderLinks as u };
|
|
140
140
|
|
|
141
|
-
//# sourceMappingURL=use-mysite-portal-
|
|
141
|
+
//# sourceMappingURL=use-mysite-portal-BV-BP3CE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mysite-portal-axe_PFzR.mjs","names":[],"sources":["../../../mysite/ui/src/portal/hooks/use-mysite-portal.ts"],"sourcesContent":["\"use client\";\n\nimport { useQuery, useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useMySiteApi } from \"@fluid-app/mysite-core/mysite-api-context\";\nimport type {\n MySiteProfile,\n MySiteLink,\n MySiteFavorite,\n MySiteTheme,\n CreateLinkBody,\n UpdateLinkBody,\n UpdateProfileBody,\n UpdateSettingsBody,\n AddFavoriteBody,\n} from \"@fluid-app/mysite-core/mysite-api-types\";\n\n// ---------------------------------------------------------------------------\n// Query keys — session-scoped, no userId/affiliateId needed\n// ---------------------------------------------------------------------------\n\nexport const PORTAL_MYSITE_KEYS = {\n profile: () => [\"portal-mysite\", \"profile\"] as const,\n links: () => [\"portal-mysite\", \"links\"] as const,\n favorites: () => [\"portal-mysite\", \"favorites\"] as const,\n themes: () => [\"portal-mysite\", \"themes\"] as const,\n};\n\n// ---------------------------------------------------------------------------\n// Profile hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteProfile() {\n const api = useMySiteApi();\n return useQuery<MySiteProfile>({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n queryFn: () => api.fetchProfile(),\n });\n}\n\nexport function usePortalUpdateProfile(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateProfileBody) => api.updateProfile(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\nexport function usePortalUpdateSettings(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateSettingsBody) => api.updateSettings(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Links hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalLinks() {\n const api = useMySiteApi();\n return useQuery<MySiteLink[]>({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n queryFn: () => api.listLinks(),\n });\n}\n\nexport function usePortalCreateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: CreateLinkBody) => api.createLink(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalUpdateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({ linkId, body }: { linkId: number; body: UpdateLinkBody }) =>\n api.updateLink(linkId, body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalDeleteLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (linkId: number) => api.deleteLink(linkId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalReorderLinks() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteLink[];\n }) => api.reorderLinks(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n const previousData = queryClient.getQueryData<MySiteLink[]>(\n PORTAL_MYSITE_KEYS.links(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.links(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.links(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Favorites hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalFavorites() {\n const api = useMySiteApi();\n return useQuery<MySiteFavorite[]>({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n queryFn: () => api.listFavorites(),\n });\n}\n\nexport function usePortalAddFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: AddFavoriteBody) => api.addFavorite(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalDeleteFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (favoriteId: number) => api.deleteFavorite(favoriteId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalReorderFavorites() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteFavorite[];\n }) => api.reorderFavorites(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n const previousData = queryClient.getQueryData<MySiteFavorite[]>(\n PORTAL_MYSITE_KEYS.favorites(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.favorites(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.favorites(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Themes hook\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteThemes() {\n const api = useMySiteApi();\n return useQuery<MySiteTheme[]>({\n queryKey: PORTAL_MYSITE_KEYS.themes(),\n queryFn: () => api.listThemes(),\n });\n}\n"],"mappings":";;;AAoBA,MAAa,qBAAqB;CAChC,eAAe,CAAC,iBAAiB,UAAU;CAC3C,aAAa,CAAC,iBAAiB,QAAQ;CACvC,iBAAiB,CAAC,iBAAiB,YAAY;CAC/C,cAAc,CAAC,iBAAiB,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,iBAAiB,WAAW;EACtC,UAAU,OAAO,EAAE,sBAAsB;AACvC,SAAM,YAAY,cAAc,EAC9B,UAAU,mBAAmB,WAAW,EACzC,CAAC;GACF,MAAM,eAAe,YAAY,aAC/B,mBAAmB,WAAW,CAC/B;AACD,eAAY,aAAa,mBAAmB,WAAW,EAAE,gBAAgB;AACzE,UAAO,EAAE,cAAc;;EAEzB,UAAU,MAAM,OAAO,YAAY;AACjC,OAAI,SAAS,aACX,aAAY,aACV,mBAAmB,WAAW,EAC9B,QAAQ,aACT;;EAGL,iBAAiB;AACf,eAAY,kBAAkB,EAC5B,UAAU,mBAAmB,WAAW,EACzC,CAAC;;EAEL,CAAC;;AAOJ,SAAgB,wBAAwB;CACtC,MAAM,MAAM,cAAc;AAC1B,QAAO,SAAwB;EAC7B,UAAU,mBAAmB,QAAQ;EACrC,eAAe,IAAI,YAAY;EAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-mysite-portal-BV-BP3CE.mjs","names":[],"sources":["../../../mysite/ui/src/portal/hooks/use-mysite-portal.ts"],"sourcesContent":["\"use client\";\n\nimport { useQuery, useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useMySiteApi } from \"@fluid-app/mysite-core/mysite-api-context\";\nimport type {\n MySiteProfile,\n MySiteLink,\n MySiteFavorite,\n MySiteTheme,\n CreateLinkBody,\n UpdateLinkBody,\n UpdateProfileBody,\n UpdateSettingsBody,\n AddFavoriteBody,\n} from \"@fluid-app/mysite-core/mysite-api-types\";\n\n// ---------------------------------------------------------------------------\n// Query keys — session-scoped, no userId/affiliateId needed\n// ---------------------------------------------------------------------------\n\nexport const PORTAL_MYSITE_KEYS = {\n profile: () => [\"portal-mysite\", \"profile\"] as const,\n links: () => [\"portal-mysite\", \"links\"] as const,\n favorites: () => [\"portal-mysite\", \"favorites\"] as const,\n themes: () => [\"portal-mysite\", \"themes\"] as const,\n};\n\n// ---------------------------------------------------------------------------\n// Profile hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteProfile() {\n const api = useMySiteApi();\n return useQuery<MySiteProfile>({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n queryFn: () => api.fetchProfile(),\n });\n}\n\nexport function usePortalUpdateProfile(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateProfileBody) => api.updateProfile(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\nexport function usePortalUpdateSettings(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateSettingsBody) => api.updateSettings(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Links hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalLinks() {\n const api = useMySiteApi();\n return useQuery<MySiteLink[]>({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n queryFn: () => api.listLinks(),\n });\n}\n\nexport function usePortalCreateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: CreateLinkBody) => api.createLink(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalUpdateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({ linkId, body }: { linkId: number; body: UpdateLinkBody }) =>\n api.updateLink(linkId, body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalDeleteLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (linkId: number) => api.deleteLink(linkId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalReorderLinks() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteLink[];\n }) => api.reorderLinks(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n const previousData = queryClient.getQueryData<MySiteLink[]>(\n PORTAL_MYSITE_KEYS.links(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.links(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.links(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Favorites hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalFavorites() {\n const api = useMySiteApi();\n return useQuery<MySiteFavorite[]>({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n queryFn: () => api.listFavorites(),\n });\n}\n\nexport function usePortalAddFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: AddFavoriteBody) => api.addFavorite(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalDeleteFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (favoriteId: number) => api.deleteFavorite(favoriteId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalReorderFavorites() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteFavorite[];\n }) => api.reorderFavorites(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n const previousData = queryClient.getQueryData<MySiteFavorite[]>(\n PORTAL_MYSITE_KEYS.favorites(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.favorites(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.favorites(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Themes hook\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteThemes() {\n const api = useMySiteApi();\n return useQuery<MySiteTheme[]>({\n queryKey: PORTAL_MYSITE_KEYS.themes(),\n queryFn: () => api.listThemes(),\n });\n}\n"],"mappings":";;;AAoBA,MAAa,qBAAqB;CAChC,eAAe,CAAC,iBAAiB,UAAU;CAC3C,aAAa,CAAC,iBAAiB,QAAQ;CACvC,iBAAiB,CAAC,iBAAiB,YAAY;CAC/C,cAAc,CAAC,iBAAiB,SAAS;CAC1C;AAMD,SAAgB,yBAAyB;CACvC,MAAM,MAAM,cAAc;AAC1B,QAAO,SAAwB;EAC7B,UAAU,mBAAmB,SAAS;EACtC,eAAe,IAAI,cAAc;EAClC,CAAC;;AAGJ,SAAgB,uBAAuB,SAAsC;CAC3E,MAAM,MAAM,cAAc;CAC1B,MAAM,cAAc,gBAAgB;AAEpC,QAAO,YAAY;EACjB,aAAa,SAA4B,IAAI,cAAc,KAAK;EAChE,iBAAiB;AACf,eAAY,kBAAkB,EAC5B,UAAU,mBAAmB,SAAS,EACvC,CAAC;AACF,YAAS,aAAa;;EAEzB,CAAC;;AAGJ,SAAgB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AAC;;EAEL,CAAC;;AAOJ,SAAgB,wBAAwB;CACtC,MAAM,MAAM,cAAc;AAC1B,QAAO,SAAwB;EAC7B,UAAU,mBAAmB,QAAQ;EACrC,eAAe,IAAI,YAAY;EAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mysite-portal-CJBowMpK.cjs","names":["useMySiteApi"],"sources":["../../../mysite/ui/src/portal/hooks/use-mysite-portal.ts"],"sourcesContent":["\"use client\";\n\nimport { useQuery, useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useMySiteApi } from \"@fluid-app/mysite-core/mysite-api-context\";\nimport type {\n MySiteProfile,\n MySiteLink,\n MySiteFavorite,\n MySiteTheme,\n CreateLinkBody,\n UpdateLinkBody,\n UpdateProfileBody,\n UpdateSettingsBody,\n AddFavoriteBody,\n} from \"@fluid-app/mysite-core/mysite-api-types\";\n\n// ---------------------------------------------------------------------------\n// Query keys — session-scoped, no userId/affiliateId needed\n// ---------------------------------------------------------------------------\n\nexport const PORTAL_MYSITE_KEYS = {\n profile: () => [\"portal-mysite\", \"profile\"] as const,\n links: () => [\"portal-mysite\", \"links\"] as const,\n favorites: () => [\"portal-mysite\", \"favorites\"] as const,\n themes: () => [\"portal-mysite\", \"themes\"] as const,\n};\n\n// ---------------------------------------------------------------------------\n// Profile hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteProfile() {\n const api = useMySiteApi();\n return useQuery<MySiteProfile>({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n queryFn: () => api.fetchProfile(),\n });\n}\n\nexport function usePortalUpdateProfile(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateProfileBody) => api.updateProfile(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\nexport function usePortalUpdateSettings(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateSettingsBody) => api.updateSettings(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Links hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalLinks() {\n const api = useMySiteApi();\n return useQuery<MySiteLink[]>({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n queryFn: () => api.listLinks(),\n });\n}\n\nexport function usePortalCreateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: CreateLinkBody) => api.createLink(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalUpdateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({ linkId, body }: { linkId: number; body: UpdateLinkBody }) =>\n api.updateLink(linkId, body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalDeleteLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (linkId: number) => api.deleteLink(linkId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalReorderLinks() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteLink[];\n }) => api.reorderLinks(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n const previousData = queryClient.getQueryData<MySiteLink[]>(\n PORTAL_MYSITE_KEYS.links(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.links(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.links(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Favorites hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalFavorites() {\n const api = useMySiteApi();\n return useQuery<MySiteFavorite[]>({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n queryFn: () => api.listFavorites(),\n });\n}\n\nexport function usePortalAddFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: AddFavoriteBody) => api.addFavorite(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalDeleteFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (favoriteId: number) => api.deleteFavorite(favoriteId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalReorderFavorites() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteFavorite[];\n }) => api.reorderFavorites(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n const previousData = queryClient.getQueryData<MySiteFavorite[]>(\n PORTAL_MYSITE_KEYS.favorites(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.favorites(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.favorites(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Themes hook\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteThemes() {\n const api = useMySiteApi();\n return useQuery<MySiteTheme[]>({\n queryKey: PORTAL_MYSITE_KEYS.themes(),\n queryFn: () => api.listThemes(),\n });\n}\n"],"mappings":";;;;AAoBA,MAAa,qBAAqB;CAChC,eAAe,CAAC,iBAAiB,UAAU;CAC3C,aAAa,CAAC,iBAAiB,QAAQ;CACvC,iBAAiB,CAAC,iBAAiB,YAAY;CAC/C,cAAc,CAAC,iBAAiB,SAAS;CAC1C;AAMD,SAAgB,yBAAyB;CACvC,MAAM,MAAMA,2BAAAA,cAAc;AAC1B,SAAA,GAAA,sBAAA,UAA+B;EAC7B,UAAU,mBAAmB,SAAS;EACtC,eAAe,IAAI,cAAc;EAClC,CAAC;;AAGJ,SAAgB,uBAAuB,SAAsC;CAC3E,MAAM,MAAMA,2BAAAA,cAAc;CAC1B,MAAM,eAAA,GAAA,sBAAA,iBAA8B;AAEpC,SAAA,GAAA,sBAAA,aAAmB;EACjB,aAAa,SAA4B,IAAI,cAAc,KAAK;EAChE,iBAAiB;AACf,eAAY,kBAAkB,EAC5B,UAAU,mBAAmB,SAAS,EACvC,CAAC;AACF,YAAS,aAAa;;EAEzB,CAAC;;AAGJ,SAAgB,wBAAwB,SAAsC;CAC5E,MAAM,MAAMA,2BAAAA,cAAc;CAC1B,MAAM,eAAA,GAAA,sBAAA,iBAA8B;AAEpC,SAAA,GAAA,sBAAA,aAAmB;EACjB,aAAa,SAA6B,IAAI,eAAe,KAAK;EAClE,iBAAiB;AACf,eAAY,kBAAkB,EAC5B,UAAU,mBAAmB,SAAS,EACvC,CAAC;AACF,YAAS,aAAa;;EAEzB,CAAC;;AAOJ,SAAgB,iBAAiB;CAC/B,MAAM,MAAMA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;EAEL,CAAC;;AAOJ,SAAgB,wBAAwB;CACtC,MAAM,MAAMA,2BAAAA,cAAc;AAC1B,SAAA,GAAA,sBAAA,UAA+B;EAC7B,UAAU,mBAAmB,QAAQ;EACrC,eAAe,IAAI,YAAY;EAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"use-mysite-portal-DzDYRU0u.cjs","names":["useMySiteApi"],"sources":["../../../mysite/ui/src/portal/hooks/use-mysite-portal.ts"],"sourcesContent":["\"use client\";\n\nimport { useQuery, useMutation, useQueryClient } from \"@tanstack/react-query\";\nimport { useMySiteApi } from \"@fluid-app/mysite-core/mysite-api-context\";\nimport type {\n MySiteProfile,\n MySiteLink,\n MySiteFavorite,\n MySiteTheme,\n CreateLinkBody,\n UpdateLinkBody,\n UpdateProfileBody,\n UpdateSettingsBody,\n AddFavoriteBody,\n} from \"@fluid-app/mysite-core/mysite-api-types\";\n\n// ---------------------------------------------------------------------------\n// Query keys — session-scoped, no userId/affiliateId needed\n// ---------------------------------------------------------------------------\n\nexport const PORTAL_MYSITE_KEYS = {\n profile: () => [\"portal-mysite\", \"profile\"] as const,\n links: () => [\"portal-mysite\", \"links\"] as const,\n favorites: () => [\"portal-mysite\", \"favorites\"] as const,\n themes: () => [\"portal-mysite\", \"themes\"] as const,\n};\n\n// ---------------------------------------------------------------------------\n// Profile hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteProfile() {\n const api = useMySiteApi();\n return useQuery<MySiteProfile>({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n queryFn: () => api.fetchProfile(),\n });\n}\n\nexport function usePortalUpdateProfile(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateProfileBody) => api.updateProfile(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\nexport function usePortalUpdateSettings(options?: { onSuccess?: () => void }) {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: UpdateSettingsBody) => api.updateSettings(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.profile(),\n });\n options?.onSuccess?.();\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Links hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalLinks() {\n const api = useMySiteApi();\n return useQuery<MySiteLink[]>({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n queryFn: () => api.listLinks(),\n });\n}\n\nexport function usePortalCreateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: CreateLinkBody) => api.createLink(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalUpdateLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({ linkId, body }: { linkId: number; body: UpdateLinkBody }) =>\n api.updateLink(linkId, body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalDeleteLink() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (linkId: number) => api.deleteLink(linkId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\nexport function usePortalReorderLinks() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteLink[];\n }) => api.reorderLinks(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n const previousData = queryClient.getQueryData<MySiteLink[]>(\n PORTAL_MYSITE_KEYS.links(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.links(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.links(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.links(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Favorites hooks\n// ---------------------------------------------------------------------------\n\nexport function usePortalFavorites() {\n const api = useMySiteApi();\n return useQuery<MySiteFavorite[]>({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n queryFn: () => api.listFavorites(),\n });\n}\n\nexport function usePortalAddFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (body: AddFavoriteBody) => api.addFavorite(body),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalDeleteFavorite() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: (favoriteId: number) => api.deleteFavorite(favoriteId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\nexport function usePortalReorderFavorites() {\n const api = useMySiteApi();\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: ({\n orderedIds,\n }: {\n orderedIds: number[];\n optimisticItems: MySiteFavorite[];\n }) => api.reorderFavorites(orderedIds),\n onMutate: async ({ optimisticItems }) => {\n await queryClient.cancelQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n const previousData = queryClient.getQueryData<MySiteFavorite[]>(\n PORTAL_MYSITE_KEYS.favorites(),\n );\n queryClient.setQueryData(PORTAL_MYSITE_KEYS.favorites(), optimisticItems);\n return { previousData };\n },\n onError: (_err, _vars, context) => {\n if (context?.previousData) {\n queryClient.setQueryData(\n PORTAL_MYSITE_KEYS.favorites(),\n context.previousData,\n );\n }\n },\n onSettled: () => {\n queryClient.invalidateQueries({\n queryKey: PORTAL_MYSITE_KEYS.favorites(),\n });\n },\n });\n}\n\n// ---------------------------------------------------------------------------\n// Themes hook\n// ---------------------------------------------------------------------------\n\nexport function usePortalMySiteThemes() {\n const api = useMySiteApi();\n return useQuery<MySiteTheme[]>({\n queryKey: PORTAL_MYSITE_KEYS.themes(),\n queryFn: () => api.listThemes(),\n });\n}\n"],"mappings":";;;;AAoBA,MAAa,qBAAqB;CAChC,eAAe,CAAC,iBAAiB,UAAU;CAC3C,aAAa,CAAC,iBAAiB,QAAQ;CACvC,iBAAiB,CAAC,iBAAiB,YAAY;CAC/C,cAAc,CAAC,iBAAiB,SAAS;CAC1C;AAMD,SAAgB,yBAAyB;CACvC,MAAM,MAAMA,2BAAAA,cAAc;AAC1B,SAAA,GAAA,sBAAA,UAA+B;EAC7B,UAAU,mBAAmB,SAAS;EACtC,eAAe,IAAI,cAAc;EAClC,CAAC;;AAGJ,SAAgB,uBAAuB,SAAsC;CAC3E,MAAM,MAAMA,2BAAAA,cAAc;CAC1B,MAAM,eAAA,GAAA,sBAAA,iBAA8B;AAEpC,SAAA,GAAA,sBAAA,aAAmB;EACjB,aAAa,SAA4B,IAAI,cAAc,KAAK;EAChE,iBAAiB;AACf,eAAY,kBAAkB,EAC5B,UAAU,mBAAmB,SAAS,EACvC,CAAC;AACF,YAAS,aAAa;;EAEzB,CAAC;;AAGJ,SAAgB,wBAAwB,SAAsC;CAC5E,MAAM,MAAMA,2BAAAA,cAAc;CAC1B,MAAM,eAAA,GAAA,sBAAA,iBAA8B;AAEpC,SAAA,GAAA,sBAAA,aAAmB;EACjB,aAAa,SAA6B,IAAI,eAAe,KAAK;EAClE,iBAAiB;AACf,eAAY,kBAAkB,EAC5B,UAAU,mBAAmB,SAAS,EACvC,CAAC;AACF,YAAS,aAAa;;EAEzB,CAAC;;AAOJ,SAAgB,iBAAiB;CAC/B,MAAM,MAAMA,2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AEL,CAAC;;AAOJ,SAAgB,wBAAwB;CACtC,MAAM,MAAMA,2BAAAA,cAAc;AAC1B,SAAA,GAAA,sBAAA,UAA+B;EAC7B,UAAU,mBAAmB,QAAQ;EACrC,eAAe,IAAI,YAAY;EAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-store-
|
|
1
|
+
{"version":3,"file":"use-store-BLcehk1A.cjs","names":["useStoreApi"],"sources":["../src/hooks/use-store.ts"],"sourcesContent":["import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useStoreApi } from \"@fluid-app/portal-core/store-api-context\";\nimport type { Store } from \"@fluid-app/portal-core/store-types\";\n\n/**\n * Fetches the tenant store branding from GET /api/store.\n */\nexport function useStore(): UseQueryResult<Store> {\n const api = useStoreApi();\n\n return useQuery({\n queryKey: [\"portalTenant\", \"store\"],\n queryFn: async () => {\n const response = await api.fetchStore();\n return response.store;\n },\n staleTime: 5 * 60 * 1000,\n });\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,WAAkC;CAChD,MAAM,MAAMA,0BAAAA,aAAa;AAEzB,SAAA,GAAA,sBAAA,UAAgB;EACd,UAAU,CAAC,gBAAgB,QAAQ;EACnC,SAAS,YAAY;AAEnB,WADiB,MAAM,IAAI,YAAY,EACvB;;EAElB,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-store-
|
|
1
|
+
{"version":3,"file":"use-store-efmQhKpB.mjs","names":[],"sources":["../src/hooks/use-store.ts"],"sourcesContent":["import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useStoreApi } from \"@fluid-app/portal-core/store-api-context\";\nimport type { Store } from \"@fluid-app/portal-core/store-types\";\n\n/**\n * Fetches the tenant store branding from GET /api/store.\n */\nexport function useStore(): UseQueryResult<Store> {\n const api = useStoreApi();\n\n return useQuery({\n queryKey: [\"portalTenant\", \"store\"],\n queryFn: async () => {\n const response = await api.fetchStore();\n return response.store;\n },\n staleTime: 5 * 60 * 1000,\n });\n}\n"],"mappings":";;;;;;AAOA,SAAgB,WAAkC;CAChD,MAAM,MAAM,aAAa;AAEzB,QAAO,SAAS;EACd,UAAU,CAAC,gBAAgB,QAAQ;EACnC,SAAS,YAAY;AAEnB,WADiB,MAAM,IAAI,YAAY,EACvB;;EAElB,WAAW,MAAS;EACrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-app/portal-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.217",
|
|
4
4
|
"description": "SDK for building custom Fluid portals",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -72,50 +72,50 @@
|
|
|
72
72
|
"typescript": "^5",
|
|
73
73
|
"zod": "4.3.5",
|
|
74
74
|
"@fluid-app/api-client-core": "0.1.0",
|
|
75
|
-
"@fluid-app/company-switcher-core": "0.1.0",
|
|
76
|
-
"@fluid-app/auth": "0.1.0",
|
|
77
75
|
"@fluid-app/cart-ui": "0.1.17",
|
|
76
|
+
"@fluid-app/company-switcher-core": "0.1.0",
|
|
78
77
|
"@fluid-app/company-switcher-ui": "0.1.0",
|
|
79
|
-
"@fluid-app/
|
|
78
|
+
"@fluid-app/auth": "0.1.0",
|
|
80
79
|
"@fluid-app/contacts-core": "0.1.0",
|
|
81
|
-
"@fluid-app/
|
|
80
|
+
"@fluid-app/file-picker-api-client": "0.1.0",
|
|
82
81
|
"@fluid-app/file-picker-core": "0.1.0",
|
|
83
82
|
"@fluid-app/fluid-pay-core": "0.1.0",
|
|
83
|
+
"@fluid-app/fluidos-api-client": "0.1.0",
|
|
84
84
|
"@fluid-app/messaging-api-client": "0.1.0",
|
|
85
|
+
"@fluid-app/contacts-ui": "0.1.0",
|
|
85
86
|
"@fluid-app/messaging-core": "0.1.0",
|
|
86
|
-
"@fluid-app/fluidos-api-client": "0.1.0",
|
|
87
87
|
"@fluid-app/messaging-ui": "0.1.0",
|
|
88
88
|
"@fluid-app/mysite-core": "0.1.0",
|
|
89
89
|
"@fluid-app/mysite-ui": "0.1.0",
|
|
90
|
-
"@fluid-app/orders-ui": "0.1.0",
|
|
91
90
|
"@fluid-app/orders-core": "0.1.0",
|
|
92
91
|
"@fluid-app/permissions": "0.1.0",
|
|
93
|
-
"@fluid-app/
|
|
92
|
+
"@fluid-app/orders-ui": "0.1.0",
|
|
94
93
|
"@fluid-app/portal-app-download-ui": "0.1.0",
|
|
95
|
-
"@fluid-app/portal-
|
|
94
|
+
"@fluid-app/portal-core": "0.1.23",
|
|
96
95
|
"@fluid-app/portal-preview": "0.1.0",
|
|
96
|
+
"@fluid-app/portal-pro-upgrade-ui": "0.1.0",
|
|
97
97
|
"@fluid-app/portal-react": "0.1.0",
|
|
98
98
|
"@fluid-app/portal-tenant-api-client": "0.1.0",
|
|
99
99
|
"@fluid-app/portal-tenant-contacts-api-client": "0.1.0",
|
|
100
|
-
"@fluid-app/portal-tenant-mysite-api-client": "0.1.0",
|
|
101
100
|
"@fluid-app/portal-tenant-content-api-client": "0.1.0",
|
|
101
|
+
"@fluid-app/portal-tenant-mysite-api-client": "0.1.0",
|
|
102
102
|
"@fluid-app/portal-tenant-pay-api-client": "0.1.0",
|
|
103
103
|
"@fluid-app/portal-tenant-store-api-client": "0.1.0",
|
|
104
104
|
"@fluid-app/portal-widgets": "0.1.22",
|
|
105
105
|
"@fluid-app/products-api-client": "0.1.0",
|
|
106
|
-
"@fluid-app/profile-core": "0.1.0",
|
|
107
106
|
"@fluid-app/products-core": "0.1.0",
|
|
107
|
+
"@fluid-app/profile-core": "0.1.0",
|
|
108
108
|
"@fluid-app/profile-ui": "0.1.0",
|
|
109
109
|
"@fluid-app/query-persister": "0.1.0",
|
|
110
|
-
"@fluid-app/shareables-core": "0.1.0",
|
|
111
110
|
"@fluid-app/shareables-ui": "0.1.0",
|
|
111
|
+
"@fluid-app/shareables-core": "0.1.0",
|
|
112
112
|
"@fluid-app/shop-ui": "0.1.0",
|
|
113
113
|
"@fluid-app/store-api-client": "0.1.0",
|
|
114
|
+
"@fluid-app/store-core": "0.1.0",
|
|
114
115
|
"@fluid-app/subscriptions-core": "0.1.0",
|
|
115
|
-
"@fluid-app/
|
|
116
|
+
"@fluid-app/subscriptions-ui": "0.1.0",
|
|
116
117
|
"@fluid-app/ui-primitives": "0.1.13",
|
|
117
|
-
"@fluid-app/
|
|
118
|
-
"@fluid-app/subscriptions-ui": "0.1.0"
|
|
118
|
+
"@fluid-app/typescript-config": "0.0.0"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"@hookform/resolvers": "^5.2.2",
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { r as __exportAll } from "./es-Cw_Kikmu.mjs";
|
|
2
|
-
import { i as getBorderColorField, n as borderWidthClasses, o as getBorderRadiusField, p as getHeightField, s as getBorderWidthField, t as borderColorClasses } from "./registries-DT36l-bR.mjs";
|
|
3
|
-
import { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { Globe } from "lucide-react";
|
|
6
|
-
//#region ../widgets/src/contexts/RepUserContext.tsx
|
|
7
|
-
const RepUserContext = createContext(null);
|
|
8
|
-
function RepUserProvider({ user, children }) {
|
|
9
|
-
const value = useMemo(() => user, [user]);
|
|
10
|
-
return /* @__PURE__ */ jsx(RepUserContext.Provider, {
|
|
11
|
-
value,
|
|
12
|
-
children
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function useRepUser() {
|
|
16
|
-
return useContext(RepUserContext);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region ../widgets/src/widgets/EmbedWidget.tsx
|
|
20
|
-
var EmbedWidget_exports = /* @__PURE__ */ __exportAll({
|
|
21
|
-
EmbedWidget: () => EmbedWidget,
|
|
22
|
-
embedWidgetPropertySchema: () => embedWidgetPropertySchema
|
|
23
|
-
});
|
|
24
|
-
function isValidHttpUrl(urlString) {
|
|
25
|
-
try {
|
|
26
|
-
const parsed = new URL(urlString);
|
|
27
|
-
return parsed.protocol === "https:" || parsed.protocol === "http:";
|
|
28
|
-
} catch {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function EmbedWidget({ url = "", title = "Embedded Content", height = "400px", fullScreen = false, allowFullscreen = true, loading = "lazy", borderRadius = "md", borderWidth = "none", borderColor = "muted", editMode = false, isSelected = false, className, ...props }) {
|
|
33
|
-
const isFullScreen = fullScreen;
|
|
34
|
-
const iframeRef = useRef(null);
|
|
35
|
-
const publicId = useRepUser()?.publicId;
|
|
36
|
-
const normalizedUrl = url && (url.startsWith("http://") || url.startsWith("https://")) ? url : url ? `https://${url}` : "";
|
|
37
|
-
let isValidUrl = false;
|
|
38
|
-
if (normalizedUrl) try {
|
|
39
|
-
const parsed = new URL(normalizedUrl);
|
|
40
|
-
isValidUrl = (parsed.protocol === "http:" || parsed.protocol === "https:") && (parsed.hostname.includes(".") || parsed.hostname === "localhost");
|
|
41
|
-
} catch {}
|
|
42
|
-
const iframeSrc = useMemo(() => {
|
|
43
|
-
if (!isValidUrl) return normalizedUrl;
|
|
44
|
-
if (!publicId) return normalizedUrl;
|
|
45
|
-
const urlObj = new URL(normalizedUrl);
|
|
46
|
-
urlObj.searchParams.set("public_id", publicId);
|
|
47
|
-
return urlObj.toString();
|
|
48
|
-
}, [
|
|
49
|
-
normalizedUrl,
|
|
50
|
-
isValidUrl,
|
|
51
|
-
publicId
|
|
52
|
-
]);
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (!isValidUrl || editMode) return;
|
|
55
|
-
const expectedOrigin = new URL(normalizedUrl).origin;
|
|
56
|
-
function handleMessage(event) {
|
|
57
|
-
if (event.origin !== expectedOrigin) return;
|
|
58
|
-
if (event.source !== iframeRef.current?.contentWindow) return;
|
|
59
|
-
let data;
|
|
60
|
-
if (typeof event.data === "string") try {
|
|
61
|
-
data = JSON.parse(event.data);
|
|
62
|
-
} catch {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
else data = event.data;
|
|
66
|
-
if (typeof data === "object" && data !== null && "type" in data && data.type === "OPEN_FULL_SCREEN_WEBVIEW") {
|
|
67
|
-
const messageUrl = data.url;
|
|
68
|
-
if (messageUrl && isValidHttpUrl(messageUrl)) window.open(messageUrl, "_blank", "noopener,noreferrer");
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
window.addEventListener("message", handleMessage);
|
|
72
|
-
return () => window.removeEventListener("message", handleMessage);
|
|
73
|
-
}, [
|
|
74
|
-
normalizedUrl,
|
|
75
|
-
isValidUrl,
|
|
76
|
-
editMode
|
|
77
|
-
]);
|
|
78
|
-
if (!url) return /* @__PURE__ */ jsx("div", {
|
|
79
|
-
className: `flex items-center justify-center rounded-${borderRadius} border-border bg-muted text-muted-foreground border-2 border-dashed ${isFullScreen ? "h-full" : ""} ${className}`,
|
|
80
|
-
style: isFullScreen ? void 0 : { height },
|
|
81
|
-
...props,
|
|
82
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
83
|
-
className: "flex flex-col items-center gap-2 p-6 text-center",
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ jsx(Globe, { className: "h-12 w-12 opacity-50" }),
|
|
86
|
-
/* @__PURE__ */ jsx("p", {
|
|
87
|
-
className: "text-sm font-medium",
|
|
88
|
-
children: "Enter a URL to embed external content"
|
|
89
|
-
}),
|
|
90
|
-
/* @__PURE__ */ jsx("p", {
|
|
91
|
-
className: "text-xs opacity-75",
|
|
92
|
-
children: "Configure the URL in the properties panel"
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})
|
|
96
|
-
});
|
|
97
|
-
if (!isValidUrl) return /* @__PURE__ */ jsx("div", {
|
|
98
|
-
className: `flex items-center justify-center rounded-${borderRadius} border-border bg-muted text-muted-foreground border-2 border-dashed ${isFullScreen ? "h-full" : ""} ${className}`,
|
|
99
|
-
style: isFullScreen ? void 0 : { height },
|
|
100
|
-
...props,
|
|
101
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
102
|
-
className: "flex flex-col items-center gap-2 p-6 text-center",
|
|
103
|
-
children: [
|
|
104
|
-
/* @__PURE__ */ jsx(Globe, { className: "h-12 w-12 opacity-50" }),
|
|
105
|
-
/* @__PURE__ */ jsx("p", {
|
|
106
|
-
className: "text-sm font-medium",
|
|
107
|
-
children: "Enter a URL to embed external content"
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ jsx("p", {
|
|
110
|
-
className: "text-xs opacity-75",
|
|
111
|
-
children: "Configure the URL in the properties panel"
|
|
112
|
-
})
|
|
113
|
-
]
|
|
114
|
-
})
|
|
115
|
-
});
|
|
116
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
117
|
-
className: `relative w-full rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? borderColorClasses[borderColor] : ""} ${isFullScreen ? "h-full" : ""} ${className}`,
|
|
118
|
-
...props,
|
|
119
|
-
children: [/* @__PURE__ */ jsx("iframe", {
|
|
120
|
-
ref: iframeRef,
|
|
121
|
-
src: iframeSrc,
|
|
122
|
-
title,
|
|
123
|
-
width: "100%",
|
|
124
|
-
style: isFullScreen ? { height: "100%" } : { height },
|
|
125
|
-
loading,
|
|
126
|
-
allowFullScreen: allowFullscreen,
|
|
127
|
-
className: `rounded-${borderRadius} border-border border`,
|
|
128
|
-
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"
|
|
129
|
-
}), editMode && !isSelected && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-10" })]
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
const embedWidgetPropertySchema = {
|
|
133
|
-
widgetType: "EmbedWidget",
|
|
134
|
-
displayName: "Embed",
|
|
135
|
-
fields: [
|
|
136
|
-
{
|
|
137
|
-
key: "url",
|
|
138
|
-
label: "URL",
|
|
139
|
-
type: "text",
|
|
140
|
-
description: "The URL of the external site to embed",
|
|
141
|
-
placeholder: "https://example.com",
|
|
142
|
-
defaultValue: "",
|
|
143
|
-
group: "Content"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
key: "title",
|
|
147
|
-
label: "Title",
|
|
148
|
-
type: "text",
|
|
149
|
-
description: "Accessibility title for the embedded content",
|
|
150
|
-
defaultValue: "Embedded Content",
|
|
151
|
-
group: "Content"
|
|
152
|
-
},
|
|
153
|
-
getBorderRadiusField({
|
|
154
|
-
key: "borderRadius",
|
|
155
|
-
label: "Border Radius",
|
|
156
|
-
description: "Border radius for the embed container",
|
|
157
|
-
defaultValue: "md",
|
|
158
|
-
group: "Design"
|
|
159
|
-
}),
|
|
160
|
-
getBorderWidthField({
|
|
161
|
-
key: "borderWidth",
|
|
162
|
-
label: "Border Width",
|
|
163
|
-
description: "Border width for the widget",
|
|
164
|
-
defaultValue: "none",
|
|
165
|
-
group: "Design"
|
|
166
|
-
}),
|
|
167
|
-
getBorderColorField({
|
|
168
|
-
key: "borderColor",
|
|
169
|
-
label: "Border Color",
|
|
170
|
-
description: "Border color for the widget",
|
|
171
|
-
defaultValue: "muted",
|
|
172
|
-
group: "Design"
|
|
173
|
-
}),
|
|
174
|
-
{
|
|
175
|
-
key: "fullScreen",
|
|
176
|
-
label: "Full Screen",
|
|
177
|
-
type: "boolean",
|
|
178
|
-
description: "When enabled, the embed fills the available space",
|
|
179
|
-
defaultValue: false,
|
|
180
|
-
group: "Design"
|
|
181
|
-
},
|
|
182
|
-
getHeightField({
|
|
183
|
-
key: "height",
|
|
184
|
-
label: "Height",
|
|
185
|
-
description: "Height of the embedded iframe",
|
|
186
|
-
defaultValue: "400px",
|
|
187
|
-
group: "Design",
|
|
188
|
-
requiresKeyValue: {
|
|
189
|
-
key: "fullScreen",
|
|
190
|
-
value: false
|
|
191
|
-
}
|
|
192
|
-
}),
|
|
193
|
-
{
|
|
194
|
-
key: "allowFullscreen",
|
|
195
|
-
label: "Allow Fullscreen",
|
|
196
|
-
type: "boolean",
|
|
197
|
-
description: "Allow the embedded content to use fullscreen mode",
|
|
198
|
-
defaultValue: true,
|
|
199
|
-
group: "Settings"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
key: "loading",
|
|
203
|
-
label: "Loading",
|
|
204
|
-
type: "select",
|
|
205
|
-
description: "When to load the embedded content",
|
|
206
|
-
options: [{
|
|
207
|
-
label: "Lazy (on scroll)",
|
|
208
|
-
value: "lazy"
|
|
209
|
-
}, {
|
|
210
|
-
label: "Eager (immediately)",
|
|
211
|
-
value: "eager"
|
|
212
|
-
}],
|
|
213
|
-
defaultValue: "lazy",
|
|
214
|
-
group: "Settings"
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
};
|
|
218
|
-
//#endregion
|
|
219
|
-
export { useRepUser as a, RepUserProvider as i, EmbedWidget_exports as n, embedWidgetPropertySchema as r, EmbedWidget as t };
|
|
220
|
-
|
|
221
|
-
//# sourceMappingURL=EmbedWidget-C3mGurOv.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedWidget-C3mGurOv.mjs","names":[],"sources":["../../widgets/src/contexts/RepUserContext.tsx","../../widgets/src/widgets/EmbedWidget.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n useMemo,\n type ReactNode,\n} from \"react\";\n\nexport interface RepUser {\n name: string | null;\n email: string | null;\n imageUrl: string | null;\n publicId?: string;\n}\n\nconst RepUserContext = createContext<RepUser | null>(null);\n\nexport interface RepUserProviderProps {\n user: RepUser;\n children: ReactNode;\n}\n\nexport function RepUserProvider({\n user,\n children,\n}: RepUserProviderProps): React.JSX.Element {\n const value = useMemo(() => user, [user]);\n return (\n <RepUserContext.Provider value={value}>{children}</RepUserContext.Provider>\n );\n}\n\nexport function useRepUser(): RepUser | null {\n return useContext(RepUserContext);\n}\n","import { Globe } from \"lucide-react\";\nimport { useEffect, useMemo, useRef, type ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n BorderRadiusOptions,\n BorderWidthOptions,\n ColorOptions,\n} from \"@fluid-app/portal-core/types\";\nimport {\n getBorderWidthField,\n getBorderColorField,\n borderWidthClasses,\n borderColorClasses,\n} from \"../core/fields\";\nimport { useRepUser } from \"../contexts/RepUserContext\";\n\ntype EmbedWidgetMessage = {\n type: \"OPEN_FULL_SCREEN_WEBVIEW\";\n url: string;\n};\n\nfunction isValidHttpUrl(urlString: string): boolean {\n try {\n const parsed = new URL(urlString);\n return parsed.protocol === \"https:\" || parsed.protocol === \"http:\";\n } catch {\n return false;\n }\n}\n\ntype EmbedWidgetProps = ComponentProps<\"div\"> & {\n url?: string;\n title?: string;\n height?: string;\n fullScreen?: boolean;\n allowFullscreen?: boolean;\n loading?: \"eager\" | \"lazy\";\n borderRadius?: BorderRadiusOptions;\n borderWidth?: BorderWidthOptions;\n borderColor?: ColorOptions;\n editMode?: boolean;\n isSelected?: boolean;\n};\n\nexport function EmbedWidget({\n url = \"\",\n title = \"Embedded Content\",\n height = \"400px\",\n fullScreen = false,\n allowFullscreen = true,\n loading = \"lazy\",\n borderRadius = \"md\",\n borderWidth = \"none\",\n borderColor = \"muted\",\n editMode = false,\n isSelected = false,\n className,\n ...props\n}: EmbedWidgetProps): React.JSX.Element {\n const isFullScreen = fullScreen;\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const repUser = useRepUser();\n const publicId = repUser?.publicId;\n\n const normalizedUrl =\n url && (url.startsWith(\"http://\") || url.startsWith(\"https://\"))\n ? url\n : url\n ? `https://${url}`\n : \"\";\n\n let isValidUrl = false;\n if (normalizedUrl) {\n try {\n const parsed = new URL(normalizedUrl);\n isValidUrl =\n (parsed.protocol === \"http:\" || parsed.protocol === \"https:\") &&\n (parsed.hostname.includes(\".\") || parsed.hostname === \"localhost\");\n } catch {\n // invalid URL\n }\n }\n\n const iframeSrc = useMemo(() => {\n if (!isValidUrl) return normalizedUrl;\n if (!publicId) return normalizedUrl;\n const urlObj = new URL(normalizedUrl);\n urlObj.searchParams.set(\"public_id\", publicId);\n return urlObj.toString();\n }, [normalizedUrl, isValidUrl, publicId]);\n\n useEffect(() => {\n if (!isValidUrl || editMode) return;\n\n const expectedOrigin = new URL(normalizedUrl).origin;\n\n function handleMessage(event: MessageEvent) {\n if (event.origin !== expectedOrigin) return;\n if (event.source !== iframeRef.current?.contentWindow) return;\n\n let data: unknown;\n if (typeof event.data === \"string\") {\n try {\n data = JSON.parse(event.data);\n } catch {\n return;\n }\n } else {\n data = event.data;\n }\n\n if (\n typeof data === \"object\" &&\n data !== null &&\n \"type\" in data &&\n (data as EmbedWidgetMessage).type === \"OPEN_FULL_SCREEN_WEBVIEW\"\n ) {\n const messageUrl = (data as EmbedWidgetMessage).url;\n if (messageUrl && isValidHttpUrl(messageUrl)) {\n window.open(messageUrl, \"_blank\", \"noopener,noreferrer\");\n }\n }\n }\n\n window.addEventListener(\"message\", handleMessage);\n return () => window.removeEventListener(\"message\", handleMessage);\n }, [normalizedUrl, isValidUrl, editMode]);\n\n if (!url) {\n return (\n <div\n className={`flex items-center justify-center rounded-${borderRadius} border-border bg-muted text-muted-foreground border-2 border-dashed ${isFullScreen ? \"h-full\" : \"\"} ${className}`}\n style={isFullScreen ? undefined : { height }}\n {...props}\n >\n <div className=\"flex flex-col items-center gap-2 p-6 text-center\">\n <Globe className=\"h-12 w-12 opacity-50\" />\n <p className=\"text-sm font-medium\">\n Enter a URL to embed external content\n </p>\n <p className=\"text-xs opacity-75\">\n Configure the URL in the properties panel\n </p>\n </div>\n </div>\n );\n }\n\n if (!isValidUrl) {\n return (\n <div\n className={`flex items-center justify-center rounded-${borderRadius} border-border bg-muted text-muted-foreground border-2 border-dashed ${isFullScreen ? \"h-full\" : \"\"} ${className}`}\n style={isFullScreen ? undefined : { height }}\n {...props}\n >\n <div className=\"flex flex-col items-center gap-2 p-6 text-center\">\n <Globe className=\"h-12 w-12 opacity-50\" />\n <p className=\"text-sm font-medium\">\n Enter a URL to embed external content\n </p>\n <p className=\"text-xs opacity-75\">\n Configure the URL in the properties panel\n </p>\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`relative w-full rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} ${isFullScreen ? \"h-full\" : \"\"} ${className}`}\n {...props}\n >\n <iframe\n ref={iframeRef}\n src={iframeSrc}\n title={title}\n width=\"100%\"\n style={isFullScreen ? { height: \"100%\" } : { height }}\n loading={loading}\n allowFullScreen={allowFullscreen}\n className={`rounded-${borderRadius} border-border border`}\n sandbox=\"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox\"\n />\n {editMode && !isSelected && <div className=\"absolute inset-0 z-10\" />}\n </div>\n );\n}\n\nexport const embedWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"EmbedWidget\",\n displayName: \"Embed\",\n fields: [\n // Content\n {\n key: \"url\",\n label: \"URL\",\n type: \"text\",\n description: \"The URL of the external site to embed\",\n placeholder: \"https://example.com\",\n defaultValue: \"\",\n group: \"Content\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"Accessibility title for the embedded content\",\n defaultValue: \"Embedded Content\",\n group: \"Content\",\n },\n\n // Design\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the embed container\",\n defaultValue: \"md\",\n group: \"Design\",\n }),\n getBorderWidthField({\n key: \"borderWidth\",\n label: \"Border Width\",\n description: \"Border width for the widget\",\n defaultValue: \"none\",\n group: \"Design\",\n }),\n getBorderColorField({\n key: \"borderColor\",\n label: \"Border Color\",\n description: \"Border color for the widget\",\n defaultValue: \"muted\",\n group: \"Design\",\n }),\n {\n key: \"fullScreen\",\n label: \"Full Screen\",\n type: \"boolean\",\n description: \"When enabled, the embed fills the available space\",\n defaultValue: false,\n group: \"Design\",\n },\n getHeightField({\n key: \"height\",\n label: \"Height\",\n description: \"Height of the embedded iframe\",\n defaultValue: \"400px\",\n group: \"Design\",\n requiresKeyValue: {\n key: \"fullScreen\",\n value: false,\n },\n }),\n\n // Settings\n {\n key: \"allowFullscreen\",\n label: \"Allow Fullscreen\",\n type: \"boolean\",\n description: \"Allow the embedded content to use fullscreen mode\",\n defaultValue: true,\n group: \"Settings\",\n },\n {\n key: \"loading\",\n label: \"Loading\",\n type: \"select\",\n description: \"When to load the embedded content\",\n options: [\n { label: \"Lazy (on scroll)\", value: \"lazy\" },\n { label: \"Eager (immediately)\", value: \"eager\" },\n ],\n defaultValue: \"lazy\",\n group: \"Settings\",\n },\n ],\n};\n"],"mappings":";;;;;;AAcA,MAAM,iBAAiB,cAA8B,KAAK;AAO1D,SAAgB,gBAAgB,EAC9B,MACA,YAC0C;CAC1C,MAAM,QAAQ,cAAc,MAAM,CAAC,KAAK,CAAC;AACzC,QACE,oBAAC,eAAe,UAAhB;EAAgC;EAAQ;EAAmC,CAAA;;AAI/E,SAAgB,aAA6B;AAC3C,QAAO,WAAW,eAAe;;;;;;;;ACNnC,SAAS,eAAe,WAA4B;AAClD,KAAI;EACF,MAAM,SAAS,IAAI,IAAI,UAAU;AACjC,SAAO,OAAO,aAAa,YAAY,OAAO,aAAa;SACrD;AACN,SAAO;;;AAkBX,SAAgB,YAAY,EAC1B,MAAM,IACN,QAAQ,oBACR,SAAS,SACT,aAAa,OACb,kBAAkB,MAClB,UAAU,QACV,eAAe,MACf,cAAc,QACd,cAAc,SACd,WAAW,OACX,aAAa,OACb,WACA,GAAG,SACmC;CACtC,MAAM,eAAe;CACrB,MAAM,YAAY,OAA0B,KAAK;CAEjD,MAAM,WADU,YAAY,EACF;CAE1B,MAAM,gBACJ,QAAQ,IAAI,WAAW,UAAU,IAAI,IAAI,WAAW,WAAW,IAC3D,MACA,MACE,WAAW,QACX;CAER,IAAI,aAAa;AACjB,KAAI,cACF,KAA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