@salla.sa/twilight-theme-engine 1.0.73 → 1.0.75
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/{AddToCartForm-G2HK5QB3.js → AddToCartForm-WVHFHEWG.js} +8 -6
- package/dist/AddToCartForm-WVHFHEWG.js.map +1 -0
- package/dist/{BlogAuthorPage-BU2LVISS.js → BlogAuthorPage-GBT4WZHM.js} +21 -22
- package/dist/BlogAuthorPage-GBT4WZHM.js.map +1 -0
- package/dist/{BlogCategoryPage-UR4MPDLE.js → BlogCategoryPage-IHXISMB2.js} +21 -22
- package/dist/BlogCategoryPage-IHXISMB2.js.map +1 -0
- package/dist/{BlogPage-E2XZGFOP.js → BlogPage-NSICXETX.js} +19 -20
- package/dist/BlogPage-NSICXETX.js.map +1 -0
- package/dist/{BlogSinglePage-ZK2K6WEU.js → BlogSinglePage-7XINXQYI.js} +19 -20
- package/dist/BlogSinglePage-7XINXQYI.js.map +1 -0
- package/dist/{BlogTagPage-5N4VTPDN.js → BlogTagPage-APMDE5GK.js} +21 -22
- package/dist/BlogTagPage-APMDE5GK.js.map +1 -0
- package/dist/{BrandsPage-XE7RYGXA.js → BrandsPage-S4DMAHMG.js} +20 -21
- package/dist/BrandsPage-S4DMAHMG.js.map +1 -0
- package/dist/{Breadcrumb-NX6BUSOA.js → Breadcrumb-6VP2HOUT.js} +19 -20
- package/dist/Breadcrumb-6VP2HOUT.js.map +1 -0
- package/dist/{CartItem-SO34G6GZ.js → CartItem-WGQIMDM2.js} +19 -20
- package/dist/CartItem-WGQIMDM2.js.map +1 -0
- package/dist/{CartSummary-SDTY2CR2.js → CartSummary-MI5BNX25.js} +19 -20
- package/dist/CartSummary-MI5BNX25.js.map +1 -0
- package/dist/{Copyright-C426OB5D.js → Copyright-PNRLMJ4P.js} +3 -3
- package/dist/{Copyright-C426OB5D.js.map → Copyright-PNRLMJ4P.js.map} +1 -1
- package/dist/{CustomerLayout-UXX5KJWR.js → CustomerLayout-PI2XG5GK.js} +19 -20
- package/dist/CustomerLayout-PI2XG5GK.js.map +1 -0
- package/dist/{Footer-M5QEXJ4Z.js → Footer-S7WC4G4Z.js} +19 -20
- package/dist/{Footer-M5QEXJ4Z.js.map → Footer-S7WC4G4Z.js.map} +1 -1
- package/dist/{Header-CUJ4SYDF.js → Header-NYYH3YQ3.js} +8 -7
- package/dist/{Header-CUJ4SYDF.js.map → Header-NYYH3YQ3.js.map} +1 -1
- package/dist/{LoyaltyPage-UMQ2ZWA6.js → LoyaltyPage-KR526VEL.js} +19 -20
- package/dist/LoyaltyPage-KR526VEL.js.map +1 -0
- package/dist/{LoyaltyPointsPage-5YHEQSLT.js → LoyaltyPointsPage-TYYB6ZGC.js} +3 -3
- package/dist/{LoyaltyPointsPage-5YHEQSLT.js.map → LoyaltyPointsPage-TYYB6ZGC.js.map} +1 -1
- package/dist/{MainMenu-OFQDXUGW.js → MainMenu-LBDNR3RQ.js} +6 -7
- package/dist/MainMenu-LBDNR3RQ.js.map +1 -0
- package/dist/{MasterLayout-TSHKSJ7U.js → MasterLayout-CWNZSOY3.js} +19 -20
- package/dist/{MasterLayout-TSHKSJ7U.js.map → MasterLayout-CWNZSOY3.js.map} +1 -1
- package/dist/{MobileMenu-7EKUQ4MU.js → MobileMenu-7YCDXYRB.js} +20 -21
- package/dist/MobileMenu-7YCDXYRB.js.map +1 -0
- package/dist/{NotificationsPage-TBDOI7YB.js → NotificationsPage-ZF5KLMY6.js} +19 -20
- package/dist/NotificationsPage-ZF5KLMY6.js.map +1 -0
- package/dist/{OrderSinglePage-7A37FKJE.js → OrderSinglePage-2CY447QH.js} +27 -23
- package/dist/OrderSinglePage-2CY447QH.js.map +1 -0
- package/dist/{OrdersPage-NJ3JH6SG.js → OrdersPage-ZQ574GRT.js} +19 -20
- package/dist/OrdersPage-ZQ574GRT.js.map +1 -0
- package/dist/{PageSingle-UKA2U3E5.js → PageSingle-UEWTOGK4.js} +5 -6
- package/dist/PageSingle-UEWTOGK4.js.map +1 -0
- package/dist/{ProductDetails-XDNE62ZZ.js → ProductDetails-VBABSD5L.js} +14 -7
- package/dist/ProductDetails-VBABSD5L.js.map +1 -0
- package/dist/{ProfilePage-WPJYGKYR.js → ProfilePage-MU4SS3TT.js} +19 -20
- package/dist/ProfilePage-MU4SS3TT.js.map +1 -0
- package/dist/ReviewsPage-GZVEGFYE.js +18 -0
- package/dist/ReviewsPage-GZVEGFYE.js.map +1 -0
- package/dist/{SeoCartWidget-G7NAANUN.js → SeoCartWidget-R7AGEQBX.js} +19 -20
- package/dist/SeoCartWidget-R7AGEQBX.js.map +1 -0
- package/dist/{SettingsPage-X7GPCBJL.js → SettingsPage-D2YWUYH7.js} +19 -20
- package/dist/SettingsPage-D2YWUYH7.js.map +1 -0
- package/dist/{StoreClosedNotification-NKRYCLKX.js → StoreClosedNotification-GIBLCR4I.js} +20 -21
- package/dist/{StoreClosedNotification-NKRYCLKX.js.map → StoreClosedNotification-GIBLCR4I.js.map} +1 -1
- package/dist/{TestimonialsPage-JTUWHKPU.js → TestimonialsPage-RTEHCAWG.js} +5 -6
- package/dist/TestimonialsPage-RTEHCAWG.js.map +1 -0
- package/dist/{ThankYouPage-MCMBGHO2.js → ThankYouPage-OXZGYHCQ.js} +19 -20
- package/dist/ThankYouPage-OXZGYHCQ.js.map +1 -0
- package/dist/{WalletPage-JJI6WPNT.js → WalletPage-U2IW7IMG.js} +20 -21
- package/dist/WalletPage-U2IW7IMG.js.map +1 -0
- package/dist/{WishlistPage-HAOYS7NV.js → WishlistPage-W6D7TR2M.js} +21 -22
- package/dist/WishlistPage-W6D7TR2M.js.map +1 -0
- package/dist/api/apps.js +3 -4
- package/dist/api/blog.js +5 -6
- package/dist/api/brands.js +5 -6
- package/dist/api/cart.d.ts +1 -1
- package/dist/api/cart.d.ts.map +1 -1
- package/dist/api/cart.js +5 -6
- package/dist/api/category.js +5 -6
- package/dist/api/client.d.ts +6 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +2 -3
- package/dist/api/home.js +3 -4
- package/dist/api/loyalty.js +5 -6
- package/dist/api/menu.js +3 -4
- package/dist/api/notification.js +3 -4
- package/dist/api/order.js +5 -6
- package/dist/api/page.js +5 -6
- package/dist/api/product.d.ts +20 -0
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +5 -6
- package/dist/api/profile.js +2 -3
- package/dist/api/profile.js.map +1 -1
- package/dist/api/store.d.ts +3 -1
- package/dist/api/store.d.ts.map +1 -1
- package/dist/api/store.js +3 -4
- package/dist/api/translations.js +3 -4
- package/dist/api/user.js +3 -4
- package/dist/api/wallet.js +3 -4
- package/dist/api/wishlist.js +6 -7
- package/dist/{chunk-U53LIN2F.js → chunk-2AFTZGJY.js} +58 -9
- package/dist/chunk-2AFTZGJY.js.map +1 -0
- package/dist/chunk-2APQP7KK.js +40 -0
- package/dist/chunk-2APQP7KK.js.map +1 -0
- package/dist/{chunk-5DPR7GWH.js → chunk-3GZ5OOAK.js} +3 -3
- package/dist/{chunk-5DPR7GWH.js.map → chunk-3GZ5OOAK.js.map} +1 -1
- package/dist/{chunk-3EE62REP.js → chunk-3UMHUKMJ.js} +3 -3
- package/dist/{chunk-3EE62REP.js.map → chunk-3UMHUKMJ.js.map} +1 -1
- package/dist/chunk-4A5IAMNL.js +402 -0
- package/dist/chunk-4A5IAMNL.js.map +1 -0
- package/dist/{chunk-WLDDKFSZ.js → chunk-52JLMGZK.js} +4 -4
- package/dist/{chunk-WLDDKFSZ.js.map → chunk-52JLMGZK.js.map} +1 -1
- package/dist/{chunk-CMD3ARR2.js → chunk-575U6BIW.js} +58 -28
- package/dist/chunk-575U6BIW.js.map +1 -0
- package/dist/{chunk-BVSJPBJ6.js → chunk-6WI7R2BD.js} +14 -3
- package/dist/chunk-6WI7R2BD.js.map +1 -0
- package/dist/{chunk-OGVUFMLX.js → chunk-7FDT2IFI.js} +3 -3
- package/dist/{chunk-OGVUFMLX.js.map → chunk-7FDT2IFI.js.map} +1 -1
- package/dist/{chunk-2ALN2BPM.js → chunk-7HWX2PEO.js} +3 -3
- package/dist/{chunk-2ALN2BPM.js.map → chunk-7HWX2PEO.js.map} +1 -1
- package/dist/{chunk-EXBH6RGD.js → chunk-BP6LUZXJ.js} +25 -6
- package/dist/chunk-BP6LUZXJ.js.map +1 -0
- package/dist/{chunk-3YAR2SXQ.js → chunk-BSXVOHE2.js} +78 -18
- package/dist/chunk-BSXVOHE2.js.map +1 -0
- package/dist/{chunk-WYW7USLQ.js → chunk-DC7ZWXH4.js} +4 -4
- package/dist/{chunk-WYW7USLQ.js.map → chunk-DC7ZWXH4.js.map} +1 -1
- package/dist/{chunk-52ETYODY.js → chunk-EUWKQJNI.js} +4 -4
- package/dist/{chunk-52ETYODY.js.map → chunk-EUWKQJNI.js.map} +1 -1
- package/dist/{chunk-OYP5CGHU.js → chunk-F2YLRVPH.js} +3 -3
- package/dist/{chunk-OYP5CGHU.js.map → chunk-F2YLRVPH.js.map} +1 -1
- package/dist/{chunk-3IHFA2X5.js → chunk-F4FCETQT.js} +3 -3
- package/dist/{chunk-3IHFA2X5.js.map → chunk-F4FCETQT.js.map} +1 -1
- package/dist/{chunk-VFYT2VWC.js → chunk-FSCIJ55A.js} +13 -4
- package/dist/chunk-FSCIJ55A.js.map +1 -0
- package/dist/{chunk-YKFGUVF7.js → chunk-HZYFU3PZ.js} +5 -4
- package/dist/chunk-HZYFU3PZ.js.map +1 -0
- package/dist/{chunk-KOMV5SEF.js → chunk-IJYJ23SB.js} +7 -6
- package/dist/chunk-IJYJ23SB.js.map +1 -0
- package/dist/{chunk-RO6KBURF.js → chunk-J2VJGXIX.js} +7 -6
- package/dist/chunk-J2VJGXIX.js.map +1 -0
- package/dist/{chunk-HBTIZWT2.js → chunk-LCDSHSP7.js} +3 -3
- package/dist/{chunk-HBTIZWT2.js.map → chunk-LCDSHSP7.js.map} +1 -1
- package/dist/{chunk-B5FDWE4U.js → chunk-LL3X2N7L.js} +4 -4
- package/dist/{chunk-B5FDWE4U.js.map → chunk-LL3X2N7L.js.map} +1 -1
- package/dist/{chunk-RSVAPXXI.js → chunk-LLQE4JAW.js} +23 -15
- package/dist/chunk-LLQE4JAW.js.map +1 -0
- package/dist/{chunk-54XX3YPP.js → chunk-LQGSMR3X.js} +8 -8
- package/dist/{chunk-54XX3YPP.js.map → chunk-LQGSMR3X.js.map} +1 -1
- package/dist/{chunk-L3X2H2RP.js → chunk-MFYX3DFH.js} +7 -7
- package/dist/{chunk-L3X2H2RP.js.map → chunk-MFYX3DFH.js.map} +1 -1
- package/dist/{chunk-YLSG4MEK.js → chunk-MHVR2OUR.js} +4 -4
- package/dist/{chunk-YLSG4MEK.js.map → chunk-MHVR2OUR.js.map} +1 -1
- package/dist/{chunk-DIVEHHMD.js → chunk-MOANE2YM.js} +3 -3
- package/dist/{chunk-DIVEHHMD.js.map → chunk-MOANE2YM.js.map} +1 -1
- package/dist/{chunk-XVNXXF67.js → chunk-MYJL5MGW.js} +3 -3
- package/dist/{chunk-XVNXXF67.js.map → chunk-MYJL5MGW.js.map} +1 -1
- package/dist/{chunk-IXUY5RMV.js → chunk-NJQC4Z73.js} +3 -3
- package/dist/{chunk-IXUY5RMV.js.map → chunk-NJQC4Z73.js.map} +1 -1
- package/dist/{chunk-25FWAL3O.js → chunk-NJWKVTQD.js} +4 -4
- package/dist/{chunk-25FWAL3O.js.map → chunk-NJWKVTQD.js.map} +1 -1
- package/dist/{chunk-UAY6LTWB.js → chunk-O6L3BZBB.js} +4 -4
- package/dist/{chunk-UAY6LTWB.js.map → chunk-O6L3BZBB.js.map} +1 -1
- package/dist/{chunk-JZ7BOB4G.js → chunk-ODF4CAF4.js} +4 -4
- package/dist/{chunk-JZ7BOB4G.js.map → chunk-ODF4CAF4.js.map} +1 -1
- package/dist/{chunk-ZGHRSRDO.js → chunk-OUW6WESU.js} +3 -2
- package/dist/chunk-OUW6WESU.js.map +1 -0
- package/dist/{chunk-R5MZV6KW.js → chunk-RYFIWQ6L.js} +4 -4
- package/dist/{chunk-R5MZV6KW.js.map → chunk-RYFIWQ6L.js.map} +1 -1
- package/dist/{chunk-5AFTFN72.js → chunk-SLXGP6KF.js} +3 -3
- package/dist/{chunk-5AFTFN72.js.map → chunk-SLXGP6KF.js.map} +1 -1
- package/dist/chunk-SP2OVEOB.js +14 -0
- package/dist/{chunk-4LVBS3VI.js.map → chunk-SP2OVEOB.js.map} +1 -1
- package/dist/{chunk-L2QUP6J3.js → chunk-UJKJROMG.js} +6 -6
- package/dist/{chunk-L2QUP6J3.js.map → chunk-UJKJROMG.js.map} +1 -1
- package/dist/{chunk-MISI3T6V.js → chunk-VPNKJFT7.js} +3 -3
- package/dist/{chunk-MISI3T6V.js.map → chunk-VPNKJFT7.js.map} +1 -1
- package/dist/{chunk-SDIQHTDG.js → chunk-VPPSRRGK.js} +19 -5
- package/dist/chunk-VPPSRRGK.js.map +1 -0
- package/dist/{chunk-3CYIB6BL.js → chunk-W3LADQOR.js} +3 -3
- package/dist/{chunk-3CYIB6BL.js.map → chunk-W3LADQOR.js.map} +1 -1
- package/dist/{chunk-HFISEQPK.js → chunk-WU5DIIHB.js} +8 -8
- package/dist/{chunk-HFISEQPK.js.map → chunk-WU5DIIHB.js.map} +1 -1
- package/dist/{chunk-WSXRUOI2.js → chunk-WV3B2FOG.js} +4 -4
- package/dist/{chunk-WSXRUOI2.js.map → chunk-WV3B2FOG.js.map} +1 -1
- package/dist/{chunk-L5K7VBOH.js → chunk-XON5AXAP.js} +3 -3
- package/dist/{chunk-L5K7VBOH.js.map → chunk-XON5AXAP.js.map} +1 -1
- package/dist/{chunk-J427UFSZ.js → chunk-YJAMQRFS.js} +5 -6
- package/dist/chunk-YJAMQRFS.js.map +1 -0
- package/dist/components/cart/index.js +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/drawer/index.js +17 -18
- package/dist/components/home/ReorderProducts.d.ts +7 -0
- package/dist/components/home/ReorderProducts.d.ts.map +1 -0
- package/dist/components/home/SquarePhotos.d.ts +2 -1
- package/dist/components/home/SquarePhotos.d.ts.map +1 -1
- package/dist/components/home/index.d.ts +2 -0
- package/dist/components/home/index.d.ts.map +1 -1
- package/dist/components/home/index.js +21 -22
- package/dist/components/home/reorder-hooks.d.ts +6 -0
- package/dist/components/home/reorder-hooks.d.ts.map +1 -0
- package/dist/components/layout/index.js +1 -1
- package/dist/components/product/AddToCartForm.d.ts.map +1 -1
- package/dist/components/product/ProductDetails.d.ts.map +1 -1
- package/dist/components/product/index.js +18 -19
- package/dist/components/snippets/AppsSnippets.d.ts +2 -0
- package/dist/components/snippets/AppsSnippets.d.ts.map +1 -1
- package/dist/components/store/index.js +19 -20
- package/dist/components/store/index.js.map +1 -1
- package/dist/components/toast/index.js +3 -4
- package/dist/components/toast/index.js.map +1 -1
- package/dist/document-class-SA4RND4Z.js +24 -0
- package/dist/{document-class-DOQDO2DN.js.map → document-class-SA4RND4Z.js.map} +1 -1
- package/dist/hooks/index.js +17 -18
- package/dist/hooks/useComments.js +2 -3
- package/dist/hooks/useCoupon.d.ts +0 -41
- package/dist/hooks/useCoupon.d.ts.map +1 -1
- package/dist/hooks/useCoupon.js +3 -1
- package/dist/hooks/useGtm.js +17 -18
- package/dist/hooks/useMoney.js +17 -18
- package/dist/hooks/useProduct.js +2 -3
- package/dist/hooks/useStore.js +17 -18
- package/dist/hooks/useUser.js +4 -5
- package/dist/hooks/useWishlist.d.ts.map +1 -1
- package/dist/hooks/useWishlist.js +3 -1
- package/dist/index.js +17 -18
- package/dist/index.js.map +1 -1
- package/dist/native-app/index.js +2 -3
- package/dist/navigation-KMDVLHXU.js +13 -0
- package/dist/{navigation-P3GZOWUU.js.map → navigation-KMDVLHXU.js.map} +1 -1
- package/dist/{navigation-TA3I3XEC.js → navigation-WEV6XJJT.js} +6 -5
- package/dist/navigation-WEV6XJJT.js.map +1 -0
- package/dist/{not-found-6B6QSJYA.js → not-found-LB6HMAJ5.js} +58 -33
- package/dist/not-found-LB6HMAJ5.js.map +1 -0
- package/dist/providers/NavigationProvider.d.ts +9 -0
- package/dist/providers/NavigationProvider.d.ts.map +1 -1
- package/dist/providers/index.js +17 -18
- package/dist/providers/twilight-init.d.ts.map +1 -1
- package/dist/router/route-ids.d.ts +1 -0
- package/dist/router/route-ids.d.ts.map +1 -1
- package/dist/routes/account/orders/single/OrderHeader.d.ts.map +1 -1
- package/dist/routes/account/orders.js +6 -7
- package/dist/routes/account.js +15 -16
- package/dist/routes/account.js.map +1 -1
- package/dist/routes/blog.js +10 -11
- package/dist/routes/blog.js.map +1 -1
- package/dist/routes/brands.js +6 -7
- package/dist/routes/brands.js.map +1 -1
- package/dist/routes/cart.js +25 -26
- package/dist/routes/cart.js.map +1 -1
- package/dist/routes/home/HomePage.d.ts.map +1 -1
- package/dist/routes/home.js +22 -23
- package/dist/routes/index.d.ts +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +5 -4
- package/dist/routes/loyalty.js +7 -8
- package/dist/routes/loyalty.js.map +1 -1
- package/dist/routes/page.js +6 -7
- package/dist/routes/page.js.map +1 -1
- package/dist/routes/product/index.d.ts.map +1 -1
- package/dist/routes/product-listing/ProductListPage.d.ts.map +1 -1
- package/dist/routes/product-listing/loader.d.ts.map +1 -1
- package/dist/routes/product-listing/types.d.ts +1 -1
- package/dist/routes/product-listing/types.d.ts.map +1 -1
- package/dist/routes/product-listing.js +203 -183
- package/dist/routes/product-listing.js.map +1 -1
- package/dist/routes/product-short-link.d.ts +9 -5
- package/dist/routes/product-short-link.d.ts.map +1 -1
- package/dist/routes/product.js +22 -23
- package/dist/routes/product.js.map +1 -1
- package/dist/routes/root/beforeLoad.d.ts +28 -0
- package/dist/routes/root/beforeLoad.d.ts.map +1 -1
- package/dist/routes/seo-redirects.js +5 -4
- package/dist/routes/testimonials/ReviewsPage.d.ts +3 -0
- package/dist/routes/testimonials/ReviewsPage.d.ts.map +1 -0
- package/dist/routes/testimonials/index.d.ts +15 -3
- package/dist/routes/testimonials/index.d.ts.map +1 -1
- package/dist/routes/testimonials/loader.d.ts +3 -1
- package/dist/routes/testimonials/loader.d.ts.map +1 -1
- package/dist/routes/testimonials/types.d.ts +3 -0
- package/dist/routes/testimonials/types.d.ts.map +1 -1
- package/dist/routes/testimonials.js +38 -3
- package/dist/routes/testimonials.js.map +1 -1
- package/dist/routes/thank-you.js +6 -7
- package/dist/routes/thank-you.js.map +1 -1
- package/dist/skeleton.js +22 -23
- package/dist/tanstack/document-class.d.ts.map +1 -1
- package/dist/tanstack/middleware/twilight.d.ts.map +1 -1
- package/dist/tanstack/router.d.ts.map +1 -1
- package/dist/tanstack.js +16 -17
- package/dist/tanstack.js.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/salla-sdk.d.ts +4 -0
- package/dist/types/salla-sdk.d.ts.map +1 -1
- package/dist/utils/cookies.d.ts +31 -0
- package/dist/utils/cookies.d.ts.map +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/sdk-events.d.ts +6 -0
- package/dist/utils/sdk-events.d.ts.map +1 -1
- package/dist/utils/theme-version.d.ts +0 -29
- package/dist/utils/theme-version.d.ts.map +1 -1
- package/dist/vite/adapters/tanstack.adapter.d.ts.map +1 -1
- package/dist/vite/index.js +60 -1
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/AddToCartForm-G2HK5QB3.js.map +0 -1
- package/dist/BlogAuthorPage-BU2LVISS.js.map +0 -1
- package/dist/BlogCategoryPage-UR4MPDLE.js.map +0 -1
- package/dist/BlogPage-E2XZGFOP.js.map +0 -1
- package/dist/BlogSinglePage-ZK2K6WEU.js.map +0 -1
- package/dist/BlogTagPage-5N4VTPDN.js.map +0 -1
- package/dist/BrandsPage-XE7RYGXA.js.map +0 -1
- package/dist/Breadcrumb-NX6BUSOA.js.map +0 -1
- package/dist/CartItem-SO34G6GZ.js.map +0 -1
- package/dist/CartSummary-SDTY2CR2.js.map +0 -1
- package/dist/CustomerLayout-UXX5KJWR.js.map +0 -1
- package/dist/LoyaltyPage-UMQ2ZWA6.js.map +0 -1
- package/dist/MainMenu-OFQDXUGW.js.map +0 -1
- package/dist/MobileMenu-7EKUQ4MU.js.map +0 -1
- package/dist/NotificationsPage-TBDOI7YB.js.map +0 -1
- package/dist/OrderSinglePage-7A37FKJE.js.map +0 -1
- package/dist/OrdersPage-NJ3JH6SG.js.map +0 -1
- package/dist/PageSingle-UKA2U3E5.js.map +0 -1
- package/dist/ProductDetails-XDNE62ZZ.js.map +0 -1
- package/dist/ProfilePage-WPJYGKYR.js.map +0 -1
- package/dist/SeoCartWidget-G7NAANUN.js.map +0 -1
- package/dist/SettingsPage-X7GPCBJL.js.map +0 -1
- package/dist/TestimonialsPage-JTUWHKPU.js.map +0 -1
- package/dist/ThankYouPage-MCMBGHO2.js.map +0 -1
- package/dist/WalletPage-JJI6WPNT.js.map +0 -1
- package/dist/WishlistPage-HAOYS7NV.js.map +0 -1
- package/dist/chunk-3YAR2SXQ.js.map +0 -1
- package/dist/chunk-4LVBS3VI.js +0 -14
- package/dist/chunk-5ZR2HKZ7.js +0 -14
- package/dist/chunk-5ZR2HKZ7.js.map +0 -1
- package/dist/chunk-BVSJPBJ6.js.map +0 -1
- package/dist/chunk-CMD3ARR2.js.map +0 -1
- package/dist/chunk-EXBH6RGD.js.map +0 -1
- package/dist/chunk-J427UFSZ.js.map +0 -1
- package/dist/chunk-KOMV5SEF.js.map +0 -1
- package/dist/chunk-LPQFTXBB.js +0 -203
- package/dist/chunk-LPQFTXBB.js.map +0 -1
- package/dist/chunk-QVJDYSCT.js +0 -166
- package/dist/chunk-QVJDYSCT.js.map +0 -1
- package/dist/chunk-RO6KBURF.js.map +0 -1
- package/dist/chunk-RSVAPXXI.js.map +0 -1
- package/dist/chunk-SDIQHTDG.js.map +0 -1
- package/dist/chunk-U53LIN2F.js.map +0 -1
- package/dist/chunk-VFYT2VWC.js.map +0 -1
- package/dist/chunk-YKFGUVF7.js.map +0 -1
- package/dist/chunk-ZGHRSRDO.js.map +0 -1
- package/dist/document-class-DOQDO2DN.js +0 -25
- package/dist/navigation-P3GZOWUU.js +0 -13
- package/dist/navigation-TA3I3XEC.js.map +0 -1
- package/dist/not-found-6B6QSJYA.js.map +0 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { sortOptions } from '../chunk-6Z4MOC4S.js';
|
|
2
|
-
import { category } from '../chunk-
|
|
3
|
-
import { brand } from '../chunk-
|
|
2
|
+
import { category } from '../chunk-MHVR2OUR.js';
|
|
3
|
+
import { brand } from '../chunk-WV3B2FOG.js';
|
|
4
4
|
import { buildHreflangAlternates } from '../chunk-TZ3E5BN4.js';
|
|
5
|
-
import { LazyTestimonials } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import { product } from '../chunk-
|
|
5
|
+
import { useReorderButtons, LazyTestimonials } from '../chunk-2AFTZGJY.js';
|
|
6
|
+
import '../chunk-W3LADQOR.js';
|
|
7
|
+
import { product } from '../chunk-FSCIJ55A.js';
|
|
8
8
|
import { Drawer } from '../chunk-6TKIUG5C.js';
|
|
9
|
-
import { ProductCard } from '../chunk-
|
|
9
|
+
import { ProductCard } from '../chunk-LQGSMR3X.js';
|
|
10
10
|
import '../chunk-342EPVXN.js';
|
|
11
|
-
import { useStore } from '../chunk-
|
|
12
|
-
import '../chunk-
|
|
11
|
+
import { useStore } from '../chunk-575U6BIW.js';
|
|
12
|
+
import '../chunk-UJKJROMG.js';
|
|
13
13
|
import '../chunk-JKIRRMBU.js';
|
|
14
14
|
import '../chunk-2JV6WZ6O.js';
|
|
15
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-F2YLRVPH.js';
|
|
16
16
|
import '../chunk-VVZNW5CB.js';
|
|
17
|
-
import '../chunk-
|
|
18
|
-
import { notFound, useNavigate, useLocation } from '../chunk-
|
|
19
|
-
import { RouteId } from '../chunk-
|
|
20
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-LCDSHSP7.js';
|
|
18
|
+
import { unauthorized, notFound, orThrow, useNavigate, useLocation } from '../chunk-VPPSRRGK.js';
|
|
19
|
+
import { RouteId } from '../chunk-OUW6WESU.js';
|
|
20
|
+
import '../chunk-MOANE2YM.js';
|
|
21
21
|
import '../chunk-HI5V5X3S.js';
|
|
22
|
-
import '../chunk-
|
|
23
|
-
import '../chunk-
|
|
24
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-3UMHUKMJ.js';
|
|
23
|
+
import '../chunk-XON5AXAP.js';
|
|
24
|
+
import { getAuthToken } from '../chunk-BP6LUZXJ.js';
|
|
25
25
|
import '../chunk-MVT5AF2A.js';
|
|
26
26
|
import '../chunk-Z653O7MX.js';
|
|
27
27
|
import '../chunk-ZCH7W7DZ.js';
|
|
28
|
-
import '../chunk-
|
|
28
|
+
import '../chunk-7FDT2IFI.js';
|
|
29
29
|
import '../chunk-JWXJPJBO.js';
|
|
30
30
|
import '../chunk-CW625T2E.js';
|
|
31
31
|
import '../chunk-7V36I5GT.js';
|
|
32
|
-
import '../chunk-
|
|
33
|
-
import '../chunk-
|
|
32
|
+
import '../chunk-6WI7R2BD.js';
|
|
33
|
+
import '../chunk-LLQE4JAW.js';
|
|
34
34
|
import '../chunk-OAMIDZKW.js';
|
|
35
35
|
import { useTranslation } from '../chunk-TYNZ5B2B.js';
|
|
36
36
|
import '../chunk-V2ZDTY6H.js';
|
|
37
37
|
import { HookSlot } from '../chunk-5XDPAKF5.js';
|
|
38
38
|
import '../chunk-GCPEMNSU.js';
|
|
39
|
-
import { LazyBreadcrumb, Image, LazyNoContent, ProductCardSkeleton, LazyRenderWhenVisible } from '../chunk-
|
|
39
|
+
import { LazyBreadcrumb, Image, LazyNoContent, ProductCardSkeleton, LazyRenderWhenVisible } from '../chunk-NJQC4Z73.js';
|
|
40
40
|
import '../chunk-AXW67SY7.js';
|
|
41
41
|
import '../chunk-SKLEJJ6M.js';
|
|
42
42
|
import '../chunk-BYMOPN2S.js';
|
|
@@ -44,10 +44,9 @@ import '../chunk-6BZ5TKEV.js';
|
|
|
44
44
|
import '../chunk-FZKRSGLP.js';
|
|
45
45
|
import '../chunk-7V5HOZW4.js';
|
|
46
46
|
import '../chunk-YA6ABQB7.js';
|
|
47
|
-
import '../chunk-
|
|
48
|
-
import '../chunk-
|
|
49
|
-
import { onSallaEvent } from '../chunk-
|
|
50
|
-
import '../chunk-LPQFTXBB.js';
|
|
47
|
+
import '../chunk-VPNKJFT7.js';
|
|
48
|
+
import '../chunk-F4FCETQT.js';
|
|
49
|
+
import { onSallaEvent } from '../chunk-4A5IAMNL.js';
|
|
51
50
|
import { getTwilightContext } from '../chunk-N2S25NXP.js';
|
|
52
51
|
import '../chunk-T72DAX7R.js';
|
|
53
52
|
import { useTwilight } from '../chunk-DF6FBKDN.js';
|
|
@@ -66,17 +65,20 @@ var SOURCE_TO_API = {
|
|
|
66
65
|
offers: "offers",
|
|
67
66
|
search: "search",
|
|
68
67
|
tags: "tags",
|
|
69
|
-
brands: "brands"
|
|
68
|
+
brands: "brands",
|
|
69
|
+
reorder: "reorder"
|
|
70
70
|
};
|
|
71
71
|
var SOURCE_TITLE_KEY = {
|
|
72
72
|
latest: "blocks.home.latest_products",
|
|
73
73
|
sales: "common.titles.most_sales",
|
|
74
|
-
offers: "common.titles.discounts"
|
|
74
|
+
offers: "common.titles.discounts",
|
|
75
|
+
reorder: "pages.orders.repurchase"
|
|
75
76
|
};
|
|
76
77
|
var SOURCE_SLUG = {
|
|
77
78
|
latest: "latest-products",
|
|
78
79
|
sales: "most-sales-products",
|
|
79
|
-
offers: "offers"
|
|
80
|
+
offers: "offers",
|
|
81
|
+
reorder: "products?source=reorder"
|
|
80
82
|
};
|
|
81
83
|
async function productListLoader(ctx) {
|
|
82
84
|
const { params, search } = ctx;
|
|
@@ -100,7 +102,8 @@ async function productListLoader(ctx) {
|
|
|
100
102
|
if (sourceType === "brands" && params.id) {
|
|
101
103
|
return loadBrandProducts(params.id, cursor, sort);
|
|
102
104
|
}
|
|
103
|
-
if (sourceType === "
|
|
105
|
+
if (sourceType === "reorder" && !getAuthToken()) throw unauthorized();
|
|
106
|
+
if (sourceType in SOURCE_TITLE_KEY) {
|
|
104
107
|
return loadStaticProducts(
|
|
105
108
|
sourceType,
|
|
106
109
|
params.title ?? "",
|
|
@@ -198,17 +201,20 @@ async function loadSearchProducts(keyword, cursor, sort) {
|
|
|
198
201
|
}
|
|
199
202
|
async function loadTagProducts(id, cursor, sort) {
|
|
200
203
|
const { queryClient, i18n } = getTwilightContext();
|
|
201
|
-
const productsResult = await
|
|
202
|
-
product.queries.
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
const [tagData, productsResult] = await Promise.all([
|
|
205
|
+
orThrow(queryClient.fetchQuery(product.queries.tag(id))),
|
|
206
|
+
queryClient.fetchQuery(
|
|
207
|
+
product.queries.list({
|
|
208
|
+
source: "tags",
|
|
209
|
+
sourceValue: id,
|
|
210
|
+
cursor,
|
|
211
|
+
sort
|
|
212
|
+
})
|
|
213
|
+
)
|
|
214
|
+
]);
|
|
215
|
+
if (!tagData) throw notFound();
|
|
216
|
+
const tagUrl = productsResult.items[0]?.tags?.find((t) => String(t.id) === id)?.url ?? "";
|
|
217
|
+
const tag = { id: Number(tagData.id), name: tagData.name, url: tagUrl };
|
|
212
218
|
return {
|
|
213
219
|
page: {
|
|
214
220
|
slug: RouteId.PRODUCT_INDEX_TAG,
|
|
@@ -216,7 +222,8 @@ async function loadTagProducts(id, cursor, sort) {
|
|
|
216
222
|
title: tag.name,
|
|
217
223
|
breadcrumbs: [
|
|
218
224
|
{ name: i18n.t("common.titles.home"), url: "/" },
|
|
219
|
-
{
|
|
225
|
+
// Laravel's own `tags/{id}` route, for when the listed tags carry no URL.
|
|
226
|
+
{ name: tag.name, url: tag.url || `/tags/${id}` }
|
|
220
227
|
]
|
|
221
228
|
},
|
|
222
229
|
source: { type: "tags", value: id, entity: tag },
|
|
@@ -268,19 +275,22 @@ async function loadBrandProducts(id, cursor, sort) {
|
|
|
268
275
|
var SOURCE_ROUTE_ID = {
|
|
269
276
|
latest: RouteId.PRODUCT_INDEX_LATEST,
|
|
270
277
|
sales: RouteId.PRODUCT_INDEX_SALES,
|
|
271
|
-
offers: RouteId.PRODUCT_INDEX_OFFERS
|
|
278
|
+
offers: RouteId.PRODUCT_INDEX_OFFERS,
|
|
279
|
+
reorder: RouteId.PRODUCT_INDEX
|
|
272
280
|
};
|
|
273
281
|
async function loadStaticProducts(source, title, slug, cursor, sort) {
|
|
274
282
|
const { queryClient, i18n } = getTwilightContext();
|
|
275
283
|
const resolvedTitle = title || i18n.t(SOURCE_TITLE_KEY[source]);
|
|
276
284
|
const resolvedSlug = slug || SOURCE_SLUG[source];
|
|
277
|
-
const productsResult = await queryClient.fetchQuery(
|
|
278
|
-
product.queries.list({
|
|
285
|
+
const productsResult = await queryClient.fetchQuery({
|
|
286
|
+
...product.queries.list({
|
|
279
287
|
source: SOURCE_TO_API[source],
|
|
280
288
|
cursor,
|
|
281
289
|
sort
|
|
282
|
-
})
|
|
283
|
-
|
|
290
|
+
}),
|
|
291
|
+
// The reorder key names no customer, so a cached list could be another session's.
|
|
292
|
+
...source === "reorder" && { staleTime: 0 }
|
|
293
|
+
});
|
|
284
294
|
return {
|
|
285
295
|
page: {
|
|
286
296
|
slug: SOURCE_ROUTE_ID[source],
|
|
@@ -379,6 +389,8 @@ function ProductListPage({
|
|
|
379
389
|
const showFilters = query.filters && store?.settings?.product?.filters;
|
|
380
390
|
const isBrand = source.type === "brands";
|
|
381
391
|
const brand2 = isBrand ? source.entity : null;
|
|
392
|
+
const isReorder = source.type === "reorder";
|
|
393
|
+
useReorderButtons(isReorder);
|
|
382
394
|
const sortOptionsWithTrans = useMemo(() => sortOptions(selectedSort, t), [selectedSort, t]);
|
|
383
395
|
const location = useLocation();
|
|
384
396
|
const {
|
|
@@ -425,160 +437,168 @@ function ProductListPage({
|
|
|
425
437
|
nextCursorRef.current = result.next;
|
|
426
438
|
return result;
|
|
427
439
|
}, [source.type, source.value, selectedSort, appliedFilters]);
|
|
428
|
-
return /* @__PURE__ */ jsxs(
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
alt: brand2.name,
|
|
439
|
-
priority: true
|
|
440
|
-
}
|
|
441
|
-
),
|
|
442
|
-
/* @__PURE__ */ jsxs("header", { className: "flex flex-col md:flex-row items-center md:items-start text-center rtl:md:text-right ltr:md:text-left mt-2 mb-8", children: [
|
|
443
|
-
/* @__PURE__ */ jsx(
|
|
444
|
-
Image,
|
|
445
|
-
{
|
|
446
|
-
className: "rounded-md w-40 h-24 object-contain shadow-md p-4 bg-white shrink-0",
|
|
447
|
-
src: brand2.logo || void 0,
|
|
448
|
-
alt: brand2.name,
|
|
449
|
-
aspectRatio: "5/3"
|
|
450
|
-
}
|
|
451
|
-
),
|
|
452
|
-
/* @__PURE__ */ jsxs("div", { className: "px-5 pt-3 rtl:text-right", children: [
|
|
453
|
-
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-1", children: brand2.name }),
|
|
454
|
-
brand2.description && /* @__PURE__ */ jsx(
|
|
455
|
-
"p",
|
|
440
|
+
return /* @__PURE__ */ jsxs(
|
|
441
|
+
"div",
|
|
442
|
+
{
|
|
443
|
+
className: "container px-2.5 ms:px-5 mb-10",
|
|
444
|
+
"data-source": isReorder ? "reorder" : void 0,
|
|
445
|
+
children: [
|
|
446
|
+
theme?.settings?.product_index_show_breadcrumbs !== false && /* @__PURE__ */ jsx(LazyBreadcrumb, { page }),
|
|
447
|
+
isBrand && brand2 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
448
|
+
/* @__PURE__ */ jsx(
|
|
449
|
+
Image,
|
|
456
450
|
{
|
|
457
|
-
|
|
458
|
-
|
|
451
|
+
width: 1200,
|
|
452
|
+
height: 300,
|
|
453
|
+
className: "w-full max-h-[300px] object-cover rounded-md bg-gray-100",
|
|
454
|
+
src: brand2.banner || void 0,
|
|
455
|
+
alt: brand2.name,
|
|
456
|
+
priority: true
|
|
459
457
|
}
|
|
460
|
-
)
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.start" }),
|
|
465
|
-
/* @__PURE__ */ jsxs("div", { className: showFilters ? "md:grid md:grid-cols-[288px_1fr] gap-8" : "", children: [
|
|
466
|
-
showFilters && /* @__PURE__ */ jsx(
|
|
467
|
-
SallaFilters,
|
|
468
|
-
{
|
|
469
|
-
id: "filters-menu",
|
|
470
|
-
className: "hidden md:block lg:sticky lg:top-20",
|
|
471
|
-
filters
|
|
472
|
-
}
|
|
473
|
-
),
|
|
474
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
475
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-4 sm:mb-6 flex justify-between items-center", children: [
|
|
476
|
-
/* @__PURE__ */ jsx("h1", { className: "font-bold text-xl rtl:pl-3 ltr:pr-3", id: "page-main-title", children: isBrand ? t("common.titles.products") : page.title }),
|
|
477
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 rtl:space-x-reverse", children: [
|
|
478
|
-
showFilters && /* @__PURE__ */ jsx(
|
|
479
|
-
"button",
|
|
458
|
+
),
|
|
459
|
+
/* @__PURE__ */ jsxs("header", { className: "flex flex-col md:flex-row items-center md:items-start text-center rtl:md:text-right ltr:md:text-left mt-2 mb-8", children: [
|
|
460
|
+
/* @__PURE__ */ jsx(
|
|
461
|
+
Image,
|
|
480
462
|
{
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
463
|
+
className: "rounded-md w-40 h-24 object-contain shadow-md p-4 bg-white shrink-0",
|
|
464
|
+
src: brand2.logo || void 0,
|
|
465
|
+
alt: brand2.name,
|
|
466
|
+
aspectRatio: "5/3"
|
|
485
467
|
}
|
|
486
468
|
),
|
|
487
|
-
|
|
488
|
-
/* @__PURE__ */ jsx(
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
className: "hidden sm:block rtl:ml-3 ltr:mr-3 whitespace-nowrap",
|
|
492
|
-
htmlFor: "product-sort",
|
|
493
|
-
children: t("pages.categories.sorting", "Sort By")
|
|
494
|
-
}
|
|
495
|
-
),
|
|
496
|
-
/* @__PURE__ */ jsx(
|
|
497
|
-
"select",
|
|
469
|
+
/* @__PURE__ */ jsxs("div", { className: "px-5 pt-3 rtl:text-right", children: [
|
|
470
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold mb-1", children: brand2.name }),
|
|
471
|
+
brand2.description && /* @__PURE__ */ jsx(
|
|
472
|
+
"p",
|
|
498
473
|
{
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
value: selectedSort,
|
|
502
|
-
onChange: handleSortChange,
|
|
503
|
-
children: sortOptionsWithTrans.map((option) => /* @__PURE__ */ jsx("option", { value: option.id, children: option.name }, option.id))
|
|
474
|
+
className: "text-base text-gray-500 font-medium",
|
|
475
|
+
dangerouslySetInnerHTML: { __html: brand2.description }
|
|
504
476
|
}
|
|
505
477
|
)
|
|
506
478
|
] })
|
|
507
479
|
] })
|
|
508
480
|
] }),
|
|
509
|
-
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
ItemsList,
|
|
526
|
-
{
|
|
527
|
-
resetKey: `${listKey}-${selectedSort}${filteredKey}`,
|
|
528
|
-
items: shownProducts,
|
|
529
|
-
loader,
|
|
530
|
-
mode: shownNext ? "infinite" : "static",
|
|
531
|
-
pageUrl: location.pathname + location.searchStr,
|
|
532
|
-
className: "s-products-list flex-1 min-w-0",
|
|
533
|
-
itemsClassName: `s-products-list-wrapper s-products-list-vertical-cards${showFilters ? " s-products-list-with-filters" : ""}`,
|
|
534
|
-
skeleton: /* @__PURE__ */ jsx(ProductCardSkeleton, {}),
|
|
535
|
-
skeletonType: "item",
|
|
536
|
-
skeletonCount: 12,
|
|
537
|
-
empty: /* @__PURE__ */ jsx(
|
|
538
|
-
LazyNoContent,
|
|
481
|
+
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.start" }),
|
|
482
|
+
/* @__PURE__ */ jsxs("div", { className: showFilters ? "md:grid md:grid-cols-[288px_1fr] gap-8" : "", children: [
|
|
483
|
+
showFilters && /* @__PURE__ */ jsx(
|
|
484
|
+
SallaFilters,
|
|
485
|
+
{
|
|
486
|
+
id: "filters-menu",
|
|
487
|
+
className: "hidden md:block lg:sticky lg:top-20",
|
|
488
|
+
filters
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
492
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4 sm:mb-6 flex justify-between items-center", children: [
|
|
493
|
+
/* @__PURE__ */ jsx("h1", { className: "font-bold text-xl rtl:pl-3 ltr:pr-3", id: "page-main-title", children: isBrand ? t("common.titles.products") : page.title }),
|
|
494
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 rtl:space-x-reverse", children: [
|
|
495
|
+
showFilters && /* @__PURE__ */ jsx(
|
|
496
|
+
"button",
|
|
539
497
|
{
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
)
|
|
498
|
+
type: "button",
|
|
499
|
+
onClick: () => setFiltersOpen(true),
|
|
500
|
+
className: "filters-trigger bg-border-color text-primary lg:hidden p-2 rounded",
|
|
501
|
+
children: /* @__PURE__ */ jsx("i", { className: "sicon-filter text-gray-text text-2xl" })
|
|
545
502
|
}
|
|
546
503
|
),
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
504
|
+
sortOptionsWithTrans.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
505
|
+
/* @__PURE__ */ jsx(
|
|
506
|
+
"label",
|
|
507
|
+
{
|
|
508
|
+
className: "hidden sm:block rtl:ml-3 ltr:mr-3 whitespace-nowrap",
|
|
509
|
+
htmlFor: "product-sort",
|
|
510
|
+
children: t("pages.categories.sorting", "Sort By")
|
|
511
|
+
}
|
|
512
|
+
),
|
|
513
|
+
/* @__PURE__ */ jsx(
|
|
514
|
+
"select",
|
|
515
|
+
{
|
|
516
|
+
id: "product-sort",
|
|
517
|
+
className: "form-input pt-0 pb-1 rtl:md:pl-10 ltr:md:pr-10",
|
|
518
|
+
value: selectedSort,
|
|
519
|
+
onChange: handleSortChange,
|
|
520
|
+
children: sortOptionsWithTrans.map((option) => /* @__PURE__ */ jsx("option", { value: option.id, children: option.name }, option.id))
|
|
521
|
+
}
|
|
522
|
+
)
|
|
523
|
+
] })
|
|
524
|
+
] })
|
|
525
|
+
] }),
|
|
526
|
+
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.items.start" }),
|
|
527
|
+
/* @__PURE__ */ jsx(
|
|
528
|
+
"div",
|
|
529
|
+
{
|
|
530
|
+
className: `flex min-h-screen${filterStatus === "loading" ? " opacity-60" : ""}`,
|
|
531
|
+
"aria-busy": filterStatus === "loading",
|
|
532
|
+
children: filterStatus === "error" ? /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 flex flex-col items-center", children: [
|
|
533
|
+
/* @__PURE__ */ jsx(
|
|
534
|
+
LazyNoContent,
|
|
535
|
+
{
|
|
536
|
+
icon: "sicon-shopping-bag",
|
|
537
|
+
message: t("common.errors.error_occurred", "Something went wrong")
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "link--primary mt-4", onClick: retryFilters, children: t("common.elements.try_again", "Try again") })
|
|
541
|
+
] }) : /* @__PURE__ */ jsx(
|
|
542
|
+
ItemsList,
|
|
550
543
|
{
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
544
|
+
resetKey: `${listKey}-${selectedSort}${filteredKey}`,
|
|
545
|
+
items: shownProducts,
|
|
546
|
+
loader,
|
|
547
|
+
mode: shownNext ? "infinite" : "static",
|
|
548
|
+
pageUrl: location.pathname + location.searchStr,
|
|
549
|
+
className: "s-products-list flex-1 min-w-0",
|
|
550
|
+
itemsClassName: `s-products-list-wrapper s-products-list-vertical-cards${showFilters ? " s-products-list-with-filters" : ""}`,
|
|
551
|
+
skeleton: /* @__PURE__ */ jsx(ProductCardSkeleton, {}),
|
|
552
|
+
skeletonType: "item",
|
|
553
|
+
skeletonCount: 12,
|
|
554
|
+
empty: /* @__PURE__ */ jsx(
|
|
555
|
+
LazyNoContent,
|
|
556
|
+
{
|
|
557
|
+
icon: "sicon-shopping-bag",
|
|
558
|
+
message: t(
|
|
559
|
+
"pages.categories.no_products",
|
|
560
|
+
"No products found in this category"
|
|
561
|
+
)
|
|
562
|
+
}
|
|
563
|
+
),
|
|
564
|
+
t: (key, fallback) => t(key, fallback || key),
|
|
565
|
+
children: (items) => items.map((prod, idx) => /* @__PURE__ */ jsx(
|
|
566
|
+
ProductCard,
|
|
567
|
+
{
|
|
568
|
+
product: prod,
|
|
569
|
+
index: idx,
|
|
570
|
+
sizes: showFilters ? FILTERED_PRODUCT_IMAGE_SIZES : void 0
|
|
571
|
+
},
|
|
572
|
+
prod.id
|
|
573
|
+
))
|
|
554
574
|
},
|
|
555
|
-
|
|
556
|
-
)
|
|
557
|
-
}
|
|
558
|
-
|
|
575
|
+
`${listKey}-${selectedSort}${filteredKey}`
|
|
576
|
+
)
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.items.end" })
|
|
580
|
+
] })
|
|
581
|
+
] }),
|
|
582
|
+
showFilters && /* @__PURE__ */ jsx(Drawer, { isOpen: filtersOpen, onClose: () => setFiltersOpen(false), size: "md", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
|
|
583
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center mb-4", children: [
|
|
584
|
+
/* @__PURE__ */ jsx("h3", { className: "font-bold text-lg", children: t("pages.categories.filters", "Filters") }),
|
|
585
|
+
/* @__PURE__ */ jsx(
|
|
586
|
+
"button",
|
|
587
|
+
{
|
|
588
|
+
type: "button",
|
|
589
|
+
onClick: () => setFiltersOpen(false),
|
|
590
|
+
className: "btn--close-sm sicon-cancel text-gray-500"
|
|
591
|
+
}
|
|
559
592
|
)
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
"button",
|
|
570
|
-
{
|
|
571
|
-
type: "button",
|
|
572
|
-
onClick: () => setFiltersOpen(false),
|
|
573
|
-
className: "btn--close-sm sicon-cancel text-gray-500"
|
|
574
|
-
}
|
|
575
|
-
)
|
|
576
|
-
] }),
|
|
577
|
-
/* @__PURE__ */ jsx(SallaFilters, { id: "filters-menu-mobile", filters })
|
|
578
|
-
] }) }),
|
|
579
|
-
source.type === "categories" && store?.settings?.category?.testimonial_enabled && /* @__PURE__ */ jsx(LazyRenderWhenVisible, { placeholder: /* @__PURE__ */ jsx(ReviewItemSkeleton, {}), children: /* @__PURE__ */ jsx(LazyTestimonials, { data: {} }) }),
|
|
580
|
-
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.end" })
|
|
581
|
-
] }, listKey);
|
|
593
|
+
] }),
|
|
594
|
+
/* @__PURE__ */ jsx(SallaFilters, { id: "filters-menu-mobile", filters })
|
|
595
|
+
] }) }),
|
|
596
|
+
source.type === "categories" && store?.settings?.category?.testimonial_enabled && /* @__PURE__ */ jsx(LazyRenderWhenVisible, { placeholder: /* @__PURE__ */ jsx(ReviewItemSkeleton, {}), children: /* @__PURE__ */ jsx(LazyTestimonials, { data: {} }) }),
|
|
597
|
+
/* @__PURE__ */ jsx(HookSlot, { name: "product:list.end" })
|
|
598
|
+
]
|
|
599
|
+
},
|
|
600
|
+
listKey
|
|
601
|
+
);
|
|
582
602
|
}
|
|
583
603
|
|
|
584
604
|
// src/routes/product-listing/index.tsx
|
|
@@ -586,7 +606,7 @@ function head(ctx, data) {
|
|
|
586
606
|
const entity = data.source.entity;
|
|
587
607
|
const category2 = data.source.type === "categories" ? entity : void 0;
|
|
588
608
|
const tag = data.source.type === "tags" ? entity : void 0;
|
|
589
|
-
const canonical = category2?.url ?? tag?.url;
|
|
609
|
+
const canonical = category2?.url ?? (tag?.url || void 0);
|
|
590
610
|
const title = category2?.name ?? tag?.name ?? data.page.title;
|
|
591
611
|
const image = category2?.image ?? void 0;
|
|
592
612
|
const storeName = ctx.settings?.store?.name;
|