tabexseriescomponents 0.0.71 → 0.0.74
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/index.cjs.js +689 -375
- package/dist/index.esm.js +696 -382
- package/dist/index.umd.js +692 -379
- package/package.json +1 -1
- package/{src1-10 → srcOLD}/Contexts/LanguageContext.jsx +0 -0
- package/{src1-10 → srcOLD}/Contexts/ProductsCardsSectionContext.jsx +0 -0
- package/{src1-10 → srcOLD}/StylesJS/Customstyles.js +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/CategoryCardwithhoveraction/CategoryCardwithhoveraction.jsx +9 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Categorycard_fullimage/Categorycard_fullimage.jsx +19 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Categorycard_slidebgscaled/Categorycard_slidebgscaled.jsx +8 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Categorycard_with_trianglebg/Categorycard_with_trianglebg.jsx +7 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Categorycard_with_twolinestransition/Categorycard_with_twolinestransition.jsx +72 -45
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Categorycard_withshapes/Categorycard_withshapes.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Categorycard_withtext/Categorycard_withtext.jsx +9 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Classiccategorycard/Classiccategorycard.jsx +9 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Horizontalcard/Horizontalcard.jsx +15 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/MenuCard/MenuCard.jsx +12 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/ModernProductCard/ModernProductCard.jsx +12 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard6/Productcard6.jsx +10 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard7/Productcard7.jsx +10 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard_animatedbuttons/Productcard_animatedbuttons.jsx +14 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard_with_circularbg/Productcard_with_circularbg.jsx +17 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard_with_circularhover/Productcard_with_circularhover.jsx +14 -1
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard_with_slideanimation/Productcard_with_slideanimation.jsx +11 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard_with_variants/Productcard_with_variants.jsx +10 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcard_with_zoominonhover/Productcard_with_zoominonhover.jsx +10 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productcarddefault/Productcarddefault.jsx +10 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Productccard_with_imageontopleft/Productccard_with_imageontopleft.jsx +12 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Prouductcard_with_zoomhover/Prouductcard_with_zoomhover.jsx +12 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Simplecategorycardwithtextbelow/Simplecategorycardwithtextbelow.jsx +9 -0
- package/{src1-10 → srcOLD}/TabexComponents/Cards/Simpleproductcard/Simpleproductcard.jsx +15 -3
- package/{src1-10 → srcOLD}/TabexComponents/Cards/StylishProductCard/StylishProductCard.jsx +11 -1
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer1/Footer1.jsx +26 -26
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer2/Footer2.jsx +25 -24
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer3/Footer3.jsx +6 -14
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer4/Footer4.jsx +12 -11
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer5/Footer5.jsx +88 -81
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer6/Footer6.jsx +48 -39
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Footer7/Footer7.jsx +61 -58
- package/{src1-10 → srcOLD}/TabexComponents/Footer/Simplefooter/Simplefooter.jsx +34 -27
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/egyptflag.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/noimage.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/payment/cod.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/payment/fawry.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/payment/payment.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/payment/paymob.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/payment/paypal.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/payment/visa.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/shoppingcart.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/tabexlogo.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/unknownmaleuser.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/usflag.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Generalfiles/images/whatsapp.png +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Headers/AllinoneHeader/AllinoneHeader.jsx +99 -97
- package/{src1-10 → srcOLD}/TabexComponents/Headers/ClassicHeader/ClassicHeader.jsx +80 -74
- package/{src1-10 → srcOLD}/TabexComponents/Headers/Header4/Header4.jsx +95 -77
- package/{src1-10 → srcOLD}/TabexComponents/Headers/Header6/Header6.jsx +76 -73
- package/srcOLD/TabexComponents/Headers/Header8/Header8.jsx +882 -0
- package/{src1-10 → srcOLD}/TabexComponents/Headers/HeaderRestaurant/HeaderRestaurant.jsx +137 -93
- package/{src1-10 → srcOLD}/TabexComponents/Headers/Header_threesectionslogocentered/Header_threesectionslogocentered.jsx +114 -85
- package/{src1-10 → srcOLD}/TabexComponents/Headers/Headerresponsive/Headerresponsive.jsx +23 -3
- package/{src1-10 → srcOLD}/TabexComponents/Headers/HeaderwithContactinfo/HeaderwithContactinfo.jsx +114 -116
- package/{src1-10 → srcOLD}/TabexComponents/Headers/Modernheader/Modernheader.jsx +92 -100
- package/{src1-10 → srcOLD}/TabexComponents/Headers/StylishHeader/StylishHeader.jsx +98 -110
- package/srcOLD/TabexComponents/Headers/Subheader/Subheader copy.jsx +228 -0
- package/{src1-10 → srcOLD}/TabexComponents/Headers/Subheader/Subheader.jsx +22 -10
- package/{src1-10 → srcOLD}/TabexComponents/Sections/BackgroundImages/Backgroundimage1/Backgroundimage1.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/BackgroundImages/Backgroundimage_with_toppill/Backgroundimage_with_toppill.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/BackgroundImages/BackgroundimageandTextsection/BackgroundimageandTextsection.jsx +9 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/BackgroundImages/Section_with_rightbgcont/Section_with_rightbgcont.jsx +7 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/BackgroundImages/Threebgimages/Threebgimages.jsx +0 -0
- package/srcOLD/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +784 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Cards/CardsSection/CardsSection.jsx +75 -7
- package/{src1-10/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.jsx → srcOLD/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.js} +92 -82
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Cards/CardsSection7/CardsSection7.js +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Cards/CardsSection8/CardsSection8.js +0 -0
- package/{src1-10/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.jsx → srcOLD/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.js} +74 -34
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/AboutSection/AboutSection.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Backgroundimage_with_topcircle/Backgroundimage_with_topcircle.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx +0 -0
- package/srcOLD/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +284 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Image_with_rightwords/Image_with_rightwords.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Servicesection/Servicesection.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/ServicesectionCenteredcards/ServicesectionCenteredcards.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Slideshow_with_rotatedsquare/Slideshow_with_rotatedsquare.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Slideshow_with_squarebg/Slideshow_with_squarebg.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Slideshowdifferentanimations/Slideshowdifferentanimations.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Slideshowfade/Slideshowfade.jsx +8 -0
- package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +414 -0
- package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Slideshowzoom/Slideshowzoom.jsx +53 -92
- package/srcOLD/TabexComponents/StaticPages/Aboutus/Aboutus.js +175 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/AccountInformation/AccountInformation.jsx +15 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/CartSlider/CartSlider.jsx +0 -0
- package/{src1-10/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.jsx → srcOLD/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.js} +40 -110
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Checkout/Checkout.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Filter/Filter.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Login/FacebookLoginButton.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Login/GoogleLoginButton.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Login/Login.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/OrderSuccess/OrderSuccess.js +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Ordershistory/Ordershistory.jsx +14 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Policies/Policies.jsx +5 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Productinfo/Productinfo.jsx +50 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Searchlist/Searchlist.jsx +16 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Signup/CustomerInformationForm.jsx +12 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Signup/Signup.jsx +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Staticpagesrouter/Staticpagesrouter.jsx +10 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Viewcart/Viewcart.js +0 -0
- package/{src1-10 → srcOLD}/TabexComponents/StaticPages/Wishlist/Wishlist.jsx +23 -0
- package/{src1-10 → srcOLD}/assets/images/cod.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/egyptflag.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/fawry.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/payment.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/paymob.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/paypal.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/shoppingcart.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/usflag.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/visa.png +0 -0
- package/{src1-10 → srcOLD}/assets/images/whatsapp.png +0 -0
- package/{src1-10 → srcOLD}/button.jsx +0 -0
- package/{src1-10 → srcOLD}/index.jsx +2 -6
- package/{src1-10 → srcOLD}/styles/Home.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Categorcycard_fullimage.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Categorycard_slidebgscaled.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Categorycard_withshapes.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Productcard6.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Productcard_with_circularbg.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Productccard_with_zoominonhover.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/Prouductcard_with_zoomhover.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/categorycard.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/categorycard3.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/categorycardwithtext.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/productcard_animatedbuttons.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/productcard_with_textonhover.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/cards/productccard_with_imageontopleft.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/bootstrap.css +73 -68
- package/{src1-10 → srcOLD}/styles/general/dropdown.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/editorbardropdown.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/filter.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/form.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/general.module.css +0 -152
- package/{src1-10 → srcOLD}/styles/general/image-gallery.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/react-accessible-accordion.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/react-phone-input-2.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/scrollbtn.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/slick.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/tabs.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/general/workplaceeditor.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/globals.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/Allinoneheader.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/Header7.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/Header_threesectionslogocentered.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/Sideheader.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/classicheaderstyles.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/dropdown.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/header4.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/header5.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/header6.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/header_contactinfo.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/headerresturant.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/headerstyles.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/modernheader.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/headers/subheader.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/sections/Backgroundimage1.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/sections/Backgroundimage_with_topcircle.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/sections/Section_with_rightbgcont.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/sections/Slideshow_with_rotatedsquare.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/sections/Slideshow_with_squarebg.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/accordion.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/cart.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/dropdown.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/filter.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/login.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/productinfo.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/shop.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/signup.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/staticroutersidenav.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/viewcart.module.css +0 -0
- package/{src1-10 → srcOLD}/styles/staticpages/wishlist.module.css +0 -0
- package/src1-10/TabexComponents/Headers/Header8/Header8.jsx +0 -888
- package/src1-10/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +0 -409
- package/src1-10/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +0 -139
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +0 -197
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowzoom/Arrow.js +0 -91
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// All take sectionidprops & sectionindexprops
|
|
2
2
|
import React, { useEffect, useState, useContext } from 'react';
|
|
3
|
+
|
|
3
4
|
import generalstyles from '../../../../styles/general/general.module.css';
|
|
4
5
|
import { css } from 'glamor';
|
|
5
6
|
import Filter from '../../../StaticPages/Filter/Filter.jsx';
|
|
@@ -7,6 +8,8 @@ import { useInView } from 'react-intersection-observer';
|
|
|
7
8
|
import { MdOutlineLayersClear } from 'react-icons/md';
|
|
8
9
|
import { BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
|
|
9
10
|
import { FiFilter } from 'react-icons/fi';
|
|
11
|
+
|
|
12
|
+
import axios from 'axios';
|
|
10
13
|
import { CircularProgress } from 'react-cssfx-loading';
|
|
11
14
|
import { ScrollMenu, VisibilityContext } from 'react-horizontal-scrolling-menu';
|
|
12
15
|
const CardsSection = (props) => {
|
|
@@ -46,6 +49,62 @@ const CardsSection = (props) => {
|
|
|
46
49
|
const [cardsarray, setcardsarray] = useState([]);
|
|
47
50
|
|
|
48
51
|
const [searchinput, setsearchinput] = useState('');
|
|
52
|
+
// const [ParentCollectionsForCollectionQueryArr, setParentCollectionsForCollectionQueryArr] = useState('');
|
|
53
|
+
// const fetchcollectionsQueryContext = useQuery(
|
|
54
|
+
// ['fetchcollections_API' + JSON.stringify(ParentCollectionsForCollectionQueryArr)],
|
|
55
|
+
// () => fetchcollections_API({ parentcollectionid: ParentCollectionsForCollectionQueryArr }),
|
|
56
|
+
// {
|
|
57
|
+
// keepPreviousData: true,
|
|
58
|
+
// staleTime: Infinity,
|
|
59
|
+
// enabled: instapikey().length != 0 && ParentCollectionsForCollectionQueryArr.length != 0 ? true : false,
|
|
60
|
+
// },
|
|
61
|
+
// );
|
|
62
|
+
// const FetchProductsAxios = (axiosdatatemp) => {
|
|
63
|
+
// var tempProductFilterObjContext = { ...ProductFilterObjContext };
|
|
64
|
+
// tempProductFilterObjContext.page = axiosdatatemp;
|
|
65
|
+
// if (templatepropcontext.instid == 'tabex') {
|
|
66
|
+
// tempProductFilterObjContext.instapikey = 'tabex';
|
|
67
|
+
// } else {
|
|
68
|
+
// tempProductFilterObjContext.instapikey = instapikey();
|
|
69
|
+
// }
|
|
70
|
+
// var serverbaselinktemp = window.location.hostname;
|
|
71
|
+
// if (serverbaselinktemp == 'localhost') {
|
|
72
|
+
// serverbaselinktemp = 'https://tabex-co.com';
|
|
73
|
+
// } else {
|
|
74
|
+
// serverbaselinktemp = 'https://' + serverbaselinktemp;
|
|
75
|
+
// }
|
|
76
|
+
// const axiosfetch = axios({
|
|
77
|
+
// method: 'post',
|
|
78
|
+
// url: serverbaselinktemp + '/customer/webapp/fetchproducts',
|
|
79
|
+
// headers: {
|
|
80
|
+
// Accept: 'application/json',
|
|
81
|
+
// 'Content-Type': 'application/json',
|
|
82
|
+
// },
|
|
83
|
+
// data: tempProductFilterObjContext,
|
|
84
|
+
// });
|
|
85
|
+
// return axiosfetch;
|
|
86
|
+
// };
|
|
87
|
+
// const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
|
|
88
|
+
// keepPreviousData: true,
|
|
89
|
+
// staleTime: Infinity,
|
|
90
|
+
// enabled:
|
|
91
|
+
// instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
|
|
92
|
+
// ? true
|
|
93
|
+
// : false,
|
|
94
|
+
// initialPageParam: 0,
|
|
95
|
+
// getNextPageParam: (lastPage, allPages) => {
|
|
96
|
+
// var currentpagefrombackend = lastPage.data.page;
|
|
97
|
+
|
|
98
|
+
// if (currentpagefrombackend == 'full') {
|
|
99
|
+
// return undefined;
|
|
100
|
+
// } else {
|
|
101
|
+
// var nextpage = parseInt(currentpagefrombackend) + 1;
|
|
102
|
+
// return nextpage;
|
|
103
|
+
// }
|
|
104
|
+
// },
|
|
105
|
+
|
|
106
|
+
// getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
|
|
107
|
+
// });
|
|
49
108
|
React.useEffect(() => {
|
|
50
109
|
if (inView) {
|
|
51
110
|
fetchProductsQuery.fetchNextPage();
|
|
@@ -652,7 +711,7 @@ const CardsSection = (props) => {
|
|
|
652
711
|
</div>
|
|
653
712
|
)}
|
|
654
713
|
{sectionproperties.view_as_slider_vertical != 'Slider (Horizontal)' && (
|
|
655
|
-
<div className="row m-0 w-100">
|
|
714
|
+
<div className="row m-0 w-100 ">
|
|
656
715
|
{cardsarray.map((cardinfoitem, cardinfoindex) => {
|
|
657
716
|
return (
|
|
658
717
|
<div
|
|
@@ -716,6 +775,13 @@ const CardsSection = (props) => {
|
|
|
716
775
|
: ''
|
|
717
776
|
}
|
|
718
777
|
>
|
|
778
|
+
{/* {React.createElement(sectioncomp, {
|
|
779
|
+
sectionidprops: item.sectionid,
|
|
780
|
+
sectionindexprops: index,
|
|
781
|
+
cardinfoitemprops: cardinfoitem,
|
|
782
|
+
cardinfoindexprops: cardinfoindex,
|
|
783
|
+
fetchingtypeprops: fetchingtype,
|
|
784
|
+
})} */}
|
|
719
785
|
<Sectioncomp
|
|
720
786
|
sectiontypeprops={'horizontal'}
|
|
721
787
|
fetchingtypeprops={fetchingtype}
|
|
@@ -723,6 +789,8 @@ const CardsSection = (props) => {
|
|
|
723
789
|
cardinfoitemprops={cardinfoitem}
|
|
724
790
|
sectionindexprops={index}
|
|
725
791
|
sectionidprops={item.sectionid}
|
|
792
|
+
// {...props}
|
|
793
|
+
// StatePagePropertiesContext={StatePagePropertiesContext}
|
|
726
794
|
actions={actions}
|
|
727
795
|
/>
|
|
728
796
|
</div>
|
|
@@ -760,15 +828,15 @@ const CardsSection = (props) => {
|
|
|
760
828
|
};
|
|
761
829
|
return (
|
|
762
830
|
<div
|
|
763
|
-
|
|
831
|
+
className={
|
|
764
832
|
sectionproperties.card_marginLeft != 0 && sectionproperties.card_marginRight != 0
|
|
765
833
|
? // mb-md-4
|
|
766
|
-
' row m-0 d-flex w-100 justify-content-center pl-md-2 pr-md-2 '
|
|
834
|
+
' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 pr-md-2 '
|
|
767
835
|
: sectionproperties.card_marginRight != 0
|
|
768
|
-
? ' row m-0 d-flex w-100 justify-content-center pr-md-2 '
|
|
836
|
+
? ' row m-0 d-flex w-100 justify-content-center align-items-center pr-md-2 '
|
|
769
837
|
: sectionproperties.card_marginLeft != 0
|
|
770
|
-
? ' row m-0 d-flex w-100 justify-content-center pl-md-2 '
|
|
771
|
-
: ' row m-0 d-flex w-100 justify-content-center '
|
|
838
|
+
? ' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 '
|
|
839
|
+
: ' row m-0 d-flex w-100 justify-content-center align-items-center '
|
|
772
840
|
}
|
|
773
841
|
style={{
|
|
774
842
|
zIndex: 2,
|
|
@@ -777,7 +845,7 @@ const CardsSection = (props) => {
|
|
|
777
845
|
}}
|
|
778
846
|
>
|
|
779
847
|
{sectionproperties.length != 0 && (
|
|
780
|
-
<div className={' row ml-0 mr-0 d-flex justify-content-center w-md-100 h-md-100 w-100 '}>
|
|
848
|
+
<div className={' row ml-0 mr-0 d-flex align-items-center justify-content-center w-md-100 h-md-100 w-100 '}>
|
|
781
849
|
{sectionproperties.showFilter == 'show' && (
|
|
782
850
|
<div className={sectionproperties.filterdirection == 'Horizontal' ? ' col-lg-12 ' : 'col-lg-3'}>
|
|
783
851
|
<Filter sectionpropertiesprops={sectionproperties} actions={actions} />
|
|
@@ -1,37 +1,90 @@
|
|
|
1
1
|
// All take sectionidprops & sectionindexprops
|
|
2
2
|
import React, { useEffect, useState, useContext } from 'react';
|
|
3
|
+
import { serverbaselink, instapikey } from '../../../../../../../../Env_Variables_Server';
|
|
4
|
+
import { WebsiteDesignWorkPlaceContext } from '../../../../../../../../Contexts/WebsiteDesignWorkPlaceContext';
|
|
5
|
+
import { TemplateRoutingContext } from '../../../../../../../../Contexts/TemplateRoutingContext';
|
|
6
|
+
import { LanguageContext } from '../../../../../../../../Contexts/LanguageContext';
|
|
7
|
+
import { FetchingContext } from '../../../../../../../../Contexts/FetchingContext';
|
|
8
|
+
import generalstyles from '../../../../../../../../styles/general/general.module.css';
|
|
9
|
+
|
|
3
10
|
import { css } from 'glamor';
|
|
11
|
+
import { ProductsCardsSectionContext } from '../../../../../../../../Contexts/ProductsCardsSectionContext';
|
|
12
|
+
import Filter from '../../../StaticPages/Filter/Filter';
|
|
13
|
+
import Pagepreloader from '../../../StaticPages/Pagepreloader/Pagepreloader';
|
|
14
|
+
import { useQuery, useQueryClient, useMutation, useInfiniteQuery } from 'react-query';
|
|
4
15
|
import { useInView } from 'react-intersection-observer';
|
|
16
|
+
import filterstyles from '../../../../../../../../styles/staticpages/filter.module.css';
|
|
17
|
+
import { fetchproducts_API } from '../../../../../../../../components/API/API';
|
|
5
18
|
import { MdOutlineLayersClear } from 'react-icons/md';
|
|
6
|
-
import {
|
|
19
|
+
import { BsSearch, BsFillArrowRightCircleFill } from 'react-icons/bs';
|
|
20
|
+
import Searchlist from '../../../StaticPages/Searchlist/Searchlist';
|
|
21
|
+
import { FiFilter } from 'react-icons/fi';
|
|
7
22
|
import { ScrollMenu, VisibilityContext } from 'react-horizontal-scrolling-menu';
|
|
23
|
+
|
|
24
|
+
// import { LeftArrow, RightArrow, onWheel } from './Arrows.js';
|
|
25
|
+
import axios from 'axios';
|
|
26
|
+
// import CircularProgress from 'react-cssfx-loading/lib/CircularProgress';
|
|
27
|
+
|
|
8
28
|
const CardsSection2 = (props) => {
|
|
9
29
|
const { ref, inView } = useInView();
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
16
|
-
const setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
17
|
-
const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
|
|
18
|
-
const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
19
|
-
const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
20
|
-
const SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
|
|
21
|
-
const fetchProductsQuery = props.actions.fetchProductsQuery;
|
|
22
|
-
const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
23
|
-
const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
|
|
24
|
-
const setfetchingtype = props.actions.setfetchingtype;
|
|
25
|
-
const fetchingtype = props.actions.fetchingtype;
|
|
26
|
-
const AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
|
|
27
|
-
const setShowProductInfoModalContext = props.actions.setShowProductInfoModalContext;
|
|
28
|
-
const authdetailsContext = props.actions.authdetailsContext;
|
|
29
|
-
const productfiltercontext = props.actions.productfiltercontext;
|
|
30
|
-
const setproductfiltercontext = props.actions.setproductfiltercontext;
|
|
31
|
-
const actions = props.actions;
|
|
30
|
+
const { lang, langdetect } = useContext(LanguageContext);
|
|
31
|
+
const queryClient = useQueryClient();
|
|
32
|
+
const { fetch_inst_tabex_websitetemplatesQueryContext, TabexSectionsComponentsContext, StatePagePropertiesContext } = useContext(WebsiteDesignWorkPlaceContext);
|
|
33
|
+
const { fetchcollectionsQueryContext, FetchQueriesEngineContext, setFetchQueriesEngineContext, SearchHeaderMutationContext, favoriteprojectscountContext } = useContext(FetchingContext);
|
|
34
|
+
const { ProductFilterObjContext, setProductFilterObjContext } = useContext(ProductsCardsSectionContext);
|
|
32
35
|
const [sectionproperties, setsectionproperties] = useState('');
|
|
33
36
|
const [cardsarray, setcardsarray] = useState([]);
|
|
37
|
+
const [fetchingtype, setfetchingtype] = useState('');
|
|
34
38
|
const [searchinput, setsearchinput] = useState('');
|
|
39
|
+
const FetchProductsAxios = (axiosdatatemp) => {
|
|
40
|
+
var tempProductFilterObjContext = { ...ProductFilterObjContext };
|
|
41
|
+
tempProductFilterObjContext.page = axiosdatatemp;
|
|
42
|
+
// setProductFilterObjContext({ ...tempProductFilterObjContext });
|
|
43
|
+
if (fetch_inst_tabex_websitetemplatesQueryContext.data.data.template.instid == 'tabex') {
|
|
44
|
+
tempProductFilterObjContext.instapikey = 'tabex';
|
|
45
|
+
} else {
|
|
46
|
+
tempProductFilterObjContext.instapikey = instapikey();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var serverbaselinktemp = window.location.hostname;
|
|
50
|
+
if (serverbaselinktemp == 'localhost') {
|
|
51
|
+
serverbaselinktemp = 'https://tabex-co.com';
|
|
52
|
+
} else {
|
|
53
|
+
serverbaselinktemp = 'https://' + serverbaselinktemp;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const axiosfetch = axios({
|
|
57
|
+
method: 'post',
|
|
58
|
+
url: serverbaselinktemp + '/customer/webapp/fetchproducts',
|
|
59
|
+
headers: {
|
|
60
|
+
Accept: 'application/json',
|
|
61
|
+
'Content-Type': 'application/json',
|
|
62
|
+
},
|
|
63
|
+
data: tempProductFilterObjContext,
|
|
64
|
+
});
|
|
65
|
+
return axiosfetch;
|
|
66
|
+
};
|
|
67
|
+
const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
|
|
68
|
+
keepPreviousData: true,
|
|
69
|
+
staleTime: Infinity,
|
|
70
|
+
enabled:
|
|
71
|
+
instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
|
|
72
|
+
? true
|
|
73
|
+
: false,
|
|
74
|
+
initialPageParam: 0,
|
|
75
|
+
getNextPageParam: (lastPage, allPages) => {
|
|
76
|
+
var currentpagefrombackend = lastPage.data.page;
|
|
77
|
+
|
|
78
|
+
if (currentpagefrombackend == 'full') {
|
|
79
|
+
return undefined;
|
|
80
|
+
} else {
|
|
81
|
+
var nextpage = parseInt(currentpagefrombackend) + 1;
|
|
82
|
+
return nextpage;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
|
|
87
|
+
});
|
|
35
88
|
React.useEffect(() => {
|
|
36
89
|
if (inView) {
|
|
37
90
|
fetchProductsQuery.fetchNextPage();
|
|
@@ -101,13 +154,7 @@ const CardsSection2 = (props) => {
|
|
|
101
154
|
var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
|
|
102
155
|
|
|
103
156
|
if (fetchingtype == 'collections') {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
|
|
107
|
-
setParentCollectionsForCollectionQueryArr('all');
|
|
108
|
-
} else {
|
|
109
|
-
setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
|
|
110
|
-
}
|
|
157
|
+
tempFetchQueriesEngineContext.collections = true;
|
|
111
158
|
}
|
|
112
159
|
if (fetchingtype == 'products') {
|
|
113
160
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
@@ -122,7 +169,7 @@ const CardsSection2 = (props) => {
|
|
|
122
169
|
}, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
123
170
|
useEffect(() => {
|
|
124
171
|
if (fetchingtype == 'products') {
|
|
125
|
-
if (fetchProductsQuery.isSuccess
|
|
172
|
+
if (fetchProductsQuery.isSuccess) {
|
|
126
173
|
var allpagesarr = [];
|
|
127
174
|
fetchProductsQuery.data.pages.forEach((page) => {
|
|
128
175
|
page.data.products.forEach((productobj) => {
|
|
@@ -132,7 +179,7 @@ const CardsSection2 = (props) => {
|
|
|
132
179
|
cardobjassigner(allpagesarr);
|
|
133
180
|
}
|
|
134
181
|
}
|
|
135
|
-
}, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data
|
|
182
|
+
}, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data]);
|
|
136
183
|
useEffect(() => {
|
|
137
184
|
if (fetchingtype == 'collections') {
|
|
138
185
|
if (fetchcollectionsQueryContext.isSuccess) {
|
|
@@ -171,24 +218,11 @@ const CardsSection2 = (props) => {
|
|
|
171
218
|
image: '',
|
|
172
219
|
};
|
|
173
220
|
if (fetchingtype == 'products') {
|
|
174
|
-
var itemquantity = 0;
|
|
175
221
|
if (langdetect == 'en') {
|
|
176
222
|
cardobj.name = arrayItem.productinfo.name_en;
|
|
177
223
|
} else {
|
|
178
224
|
cardobj.name = arrayItem.productinfo.name_ar;
|
|
179
225
|
}
|
|
180
|
-
if (langdetect == 'en') {
|
|
181
|
-
cardobj.description = arrayItem.productinfo.description_en;
|
|
182
|
-
} else {
|
|
183
|
-
cardobj.description = arrayItem.productinfo.description_ar;
|
|
184
|
-
}
|
|
185
|
-
if (arrayItem.productinfo.hasvariants == 0) {
|
|
186
|
-
fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
|
|
187
|
-
if (cartitem.productid == arrayItem.productinfo.productid) {
|
|
188
|
-
itemquantity = cartitem.quantity;
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
226
|
cardobj.image = arrayItem.productinfo.productmainimage;
|
|
193
227
|
cardobj.hassale = arrayItem.productinfo.hassale;
|
|
194
228
|
cardobj.productid = arrayItem.productinfo.productid;
|
|
@@ -198,9 +232,7 @@ const CardsSection2 = (props) => {
|
|
|
198
232
|
cardobj.defaultprice = arrayItem.productinfo.defaultprice;
|
|
199
233
|
cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
|
|
200
234
|
cardobj.productimages = arrayItem.productinfo.productimages;
|
|
201
|
-
cardobj.quantity = itemquantity;
|
|
202
235
|
cardobj.timestamp = arrayItem.productinfo.timestamp;
|
|
203
|
-
|
|
204
236
|
if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
205
237
|
favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
206
238
|
if (arrayItem.productinfo.productid == favitem) {
|
|
@@ -212,10 +244,8 @@ const CardsSection2 = (props) => {
|
|
|
212
244
|
cardobj.collectionid = arrayItem.collectionid;
|
|
213
245
|
if (langdetect == 'en') {
|
|
214
246
|
cardobj.name = arrayItem.title_en;
|
|
215
|
-
cardobj.description = arrayItem.description_en;
|
|
216
247
|
} else if (langdetect == 'ar') {
|
|
217
248
|
cardobj.name = arrayItem.title_ar;
|
|
218
|
-
cardobj.description = arrayItem.description_ar;
|
|
219
249
|
}
|
|
220
250
|
cardobj.image = arrayItem.collectionlogo;
|
|
221
251
|
} else if (fetchingtype == 'custom') {
|
|
@@ -270,6 +300,7 @@ const CardsSection2 = (props) => {
|
|
|
270
300
|
maxWidth: sectionproperties.card_widthhorizontal + 'px',
|
|
271
301
|
}),
|
|
272
302
|
};
|
|
303
|
+
|
|
273
304
|
const cardsrender = () => {
|
|
274
305
|
return (
|
|
275
306
|
<div
|
|
@@ -354,18 +385,19 @@ const CardsSection2 = (props) => {
|
|
|
354
385
|
StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
|
|
355
386
|
if (item.tabexsectioninfo != null) {
|
|
356
387
|
if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
|
|
357
|
-
var
|
|
388
|
+
var sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
|
|
358
389
|
return (
|
|
359
390
|
<div className="row m-0 w-100 d-flex justify-content-center">
|
|
360
391
|
<div className={langdetect == 'en' ? 'col-lg-12 p-0 pl-md-2 pr-md-0' : 'col-lg-12 p-0 pl-md-0 pr-md-2 '}>
|
|
361
392
|
<ScrollMenu
|
|
393
|
+
// onWheel={onWheel}
|
|
362
394
|
transitionBehavior={'auto'}
|
|
363
395
|
wrapperClassName={''}
|
|
364
396
|
itemClassName={
|
|
365
397
|
item.tabexsectioninfo.sectioncompname == 'Productcard6'
|
|
366
398
|
? 'scrollmenuclassnameitemProductcard6'
|
|
367
399
|
: item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
|
|
368
|
-
? '
|
|
400
|
+
? 'scrollmenuclassnameitemProductcardcircularhover'
|
|
369
401
|
: item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularbg'
|
|
370
402
|
? 'scrollmenuclassnameitemProductcard_with_circularbg'
|
|
371
403
|
: item.tabexsectioninfo.sectioncompname == 'Categorycard_with_twolinestransition'
|
|
@@ -381,31 +413,13 @@ const CardsSection2 = (props) => {
|
|
|
381
413
|
: item.tabexsectioninfo.sectioncompname == 'Productcarddefault'
|
|
382
414
|
? 'scrollmenuclassnameitemProductcarddefault'
|
|
383
415
|
: item.tabexsectioninfo.sectioncompname == 'Simpleproductcard'
|
|
384
|
-
? 'scrollmenuclassnameitemSimpleproductcard'
|
|
416
|
+
? section_cssstyles.scrollmenuclassnameitemSimpleproductcard + ' scrollmenuclassnameitemSimpleproductcard '
|
|
385
417
|
: item.tabexsectioninfo.sectioncompname == 'Categorycard_with_trianglebg'
|
|
386
418
|
? 'scrollmenuclassnameitemCategorycard_with_trianglebg'
|
|
387
419
|
: item.tabexsectioninfo.sectioncompname == 'Productcard_with_textonhover'
|
|
388
420
|
? 'scrollmenuclassnameitemProductcard_with_textonhover'
|
|
389
421
|
: item.tabexsectioninfo.sectioncompname == 'Categorycard_slidebgscaled'
|
|
390
422
|
? 'scrollmenuclassnameitemCategorycard_slidebgscaled'
|
|
391
|
-
: item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
|
|
392
|
-
? 'scrollmenuclassnameitemProductccard_with_imageontopleft'
|
|
393
|
-
: item.tabexsectioninfo.sectioncompname == 'Productcard_with_zoominonhover'
|
|
394
|
-
? 'scrollmenuclassnameitemProductcard_with_zoominonhover'
|
|
395
|
-
: item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
|
|
396
|
-
? 'scrollmenuclassnameitemProductcard_Horizontalcard'
|
|
397
|
-
: item.tabexsectioninfo.sectioncompname == 'Categorycard_fullimage'
|
|
398
|
-
? 'scrollmenuclassnameitemCategorycard_fullimage'
|
|
399
|
-
: item.tabexsectioninfo.sectioncompname == 'Classiccategorycard'
|
|
400
|
-
? 'scrollmenuclassnameitemClassiccategorycard'
|
|
401
|
-
: item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
|
|
402
|
-
? 'scrollmenuclassnameitemModernProductCard'
|
|
403
|
-
: item.tabexsectioninfo.sectioncompname == 'Simplecategorycardwithtextbelow'
|
|
404
|
-
? 'scrollmenuclassnameitemSimplecategorycardwithtextbelow'
|
|
405
|
-
: item.tabexsectioninfo.sectioncompname == 'Productcard7'
|
|
406
|
-
? 'scrollmenuclassnameitemProductcard7'
|
|
407
|
-
: item.tabexsectioninfo.sectioncompname == 'MenuCard'
|
|
408
|
-
? 'scrollmenuclassnameitemMenuCard'
|
|
409
423
|
: 'scrollmenuclassnameitem'
|
|
410
424
|
}
|
|
411
425
|
scrollContainerClassName={'scrollmenuclasssubscrollbar'}
|
|
@@ -419,24 +433,20 @@ const CardsSection2 = (props) => {
|
|
|
419
433
|
paddingLeft: sectionproperties.card_marginLeft + 'px',
|
|
420
434
|
}}
|
|
421
435
|
>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
// {...props}
|
|
430
|
-
// StatePagePropertiesContext={StatePagePropertiesContext}
|
|
431
|
-
actions={actions}
|
|
432
|
-
/>
|
|
436
|
+
{React.createElement(sectioncomp, {
|
|
437
|
+
sectionidprops: item.sectionid,
|
|
438
|
+
sectionindexprops: index,
|
|
439
|
+
cardinfoitemprops: cardinfoitem,
|
|
440
|
+
cardinfoindexprops: cardinfoindex,
|
|
441
|
+
fetchingtypeprops: fetchingtype,
|
|
442
|
+
})}
|
|
433
443
|
</div>
|
|
434
444
|
);
|
|
435
445
|
})}
|
|
436
446
|
{fetchingtype == 'products' && (
|
|
437
447
|
<button
|
|
438
448
|
className={section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center '}
|
|
439
|
-
|
|
449
|
+
ref={ref}
|
|
440
450
|
onClick={() => fetchProductsQuery.fetchNextPage()}
|
|
441
451
|
disabled={!fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage}
|
|
442
452
|
>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,37 +1,81 @@
|
|
|
1
1
|
import React, { useEffect, useState, useContext } from 'react';
|
|
2
|
+
import { instapikey } from '../../../../../../../../Env_Variables_Server';
|
|
3
|
+
import { WebsiteDesignWorkPlaceContext } from '../../../../../../../../Contexts/WebsiteDesignWorkPlaceContext';
|
|
4
|
+
import { TemplateRoutingContext } from '../../../../../../../../Contexts/TemplateRoutingContext';
|
|
5
|
+
import { LanguageContext } from '../../../../../../../../Contexts/LanguageContext';
|
|
6
|
+
import { FetchingContext } from '../../../../../../../../Contexts/FetchingContext';
|
|
2
7
|
import { IKImage } from 'imagekitio-react';
|
|
3
|
-
|
|
8
|
+
|
|
4
9
|
import { css } from 'glamor';
|
|
10
|
+
import { ProductsCardsSectionContext } from '../../../../../../../../Contexts/ProductsCardsSectionContext';
|
|
5
11
|
import { useQuery, useQueryClient, useMutation, useInfiniteQuery } from 'react-query';
|
|
6
12
|
import { useInView } from 'react-intersection-observer';
|
|
13
|
+
import { AiFillStar, AiOutlineStar } from 'react-icons/ai';
|
|
14
|
+
import { FaRegHeart, FaHeart } from 'react-icons/fa';
|
|
15
|
+
import { MdOutlineLayersClear } from 'react-icons/md';
|
|
7
16
|
import axios from 'axios';
|
|
8
17
|
import { BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
|
|
9
|
-
import generalstyles from '
|
|
18
|
+
import generalstyles from '../../../../../../../../styles/general/general.module.css';
|
|
19
|
+
import Horizontalcard from '../../../Cards/Horizontalcard/Horizontalcard';
|
|
10
20
|
const Sixverticalcardssection = (props) => {
|
|
21
|
+
const { ref, inView } = useInView();
|
|
22
|
+
const { lang, langdetect } = useContext(LanguageContext);
|
|
11
23
|
const queryClient = useQueryClient();
|
|
24
|
+
const { TabexSectionsComponentsContext, StatePagePropertiesContext, fetch_inst_tabex_websitetemplatesQueryContext } = useContext(WebsiteDesignWorkPlaceContext);
|
|
25
|
+
const { fetchcollectionsQueryContext, FetchQueriesEngineContext, setFetchQueriesEngineContext, SearchHeaderMutationContext, favoriteprojectscountContext, fetchcustomercartQueryContext } =
|
|
26
|
+
useContext(FetchingContext);
|
|
27
|
+
const { ProductFilterObjContext, setProductFilterObjContext } = useContext(ProductsCardsSectionContext);
|
|
28
|
+
const { routingcountext, StaticPagesLinksContext } = useContext(TemplateRoutingContext);
|
|
12
29
|
const [sectionproperties, setsectionproperties] = useState('');
|
|
13
30
|
const [cardsarray, setcardsarray] = useState([]);
|
|
31
|
+
const [fetchingtype, setfetchingtype] = useState('');
|
|
14
32
|
const [searchinput, setsearchinput] = useState('');
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const FetchProductsAxios = (axiosdatatemp) => {
|
|
34
|
+
var tempProductFilterObjContext = { ...ProductFilterObjContext };
|
|
35
|
+
tempProductFilterObjContext.page = axiosdatatemp;
|
|
36
|
+
if (fetch_inst_tabex_websitetemplatesQueryContext.data.data.template.instid == 'tabex') {
|
|
37
|
+
tempProductFilterObjContext.instapikey = 'tabex';
|
|
38
|
+
} else {
|
|
39
|
+
tempProductFilterObjContext.instapikey = instapikey();
|
|
40
|
+
}
|
|
41
|
+
var serverbaselinktemp = window.location.hostname;
|
|
42
|
+
if (serverbaselinktemp == 'localhost') {
|
|
43
|
+
serverbaselinktemp = 'https://tabex-co.com';
|
|
44
|
+
} else {
|
|
45
|
+
serverbaselinktemp = 'https://' + serverbaselinktemp;
|
|
46
|
+
}
|
|
47
|
+
const axiosfetch = axios({
|
|
48
|
+
method: 'post',
|
|
49
|
+
url: serverbaselinktemp + '/customer/webapp/fetchproducts',
|
|
50
|
+
headers: {
|
|
51
|
+
Accept: 'application/json',
|
|
52
|
+
'Content-Type': 'application/json',
|
|
53
|
+
},
|
|
54
|
+
data: tempProductFilterObjContext,
|
|
55
|
+
});
|
|
56
|
+
return axiosfetch;
|
|
57
|
+
};
|
|
58
|
+
const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
|
|
59
|
+
keepPreviousData: true,
|
|
60
|
+
staleTime: Infinity,
|
|
61
|
+
enabled:
|
|
62
|
+
instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
|
|
63
|
+
? true
|
|
64
|
+
: false,
|
|
65
|
+
initialPageParam: 0,
|
|
66
|
+
getNextPageParam: (lastPage, allPages) => {
|
|
67
|
+
var currentpagefrombackend = lastPage.data.page;
|
|
68
|
+
|
|
69
|
+
if (currentpagefrombackend == 'full') {
|
|
70
|
+
return undefined;
|
|
71
|
+
} else {
|
|
72
|
+
var nextpage = parseInt(currentpagefrombackend) + 1;
|
|
73
|
+
return nextpage;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
|
|
78
|
+
});
|
|
35
79
|
React.useEffect(() => {
|
|
36
80
|
if (inView) {
|
|
37
81
|
fetchProductsQuery.fetchNextPage();
|
|
@@ -323,8 +367,6 @@ const Sixverticalcardssection = (props) => {
|
|
|
323
367
|
}}
|
|
324
368
|
>
|
|
325
369
|
<IKImage
|
|
326
|
-
urlEndpoint={IKurlEndpoint}
|
|
327
|
-
publicKey={IKpublicKey}
|
|
328
370
|
className="h-sm-auto"
|
|
329
371
|
path={bgimagearrayofobjs.length != 0 ? (langdetect == 'en' ? bgimagearrayofobjs[0]?.bgsection_image : bgimagearrayofobjs[0]?.bgsection_image_ar) : ''}
|
|
330
372
|
style={{
|
|
@@ -434,22 +476,20 @@ const Sixverticalcardssection = (props) => {
|
|
|
434
476
|
StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
|
|
435
477
|
if (item.tabexsectioninfo != null) {
|
|
436
478
|
if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
|
|
437
|
-
var
|
|
479
|
+
var sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
|
|
438
480
|
return (
|
|
439
481
|
<div className={' row m-0 w-100 d-flex '}>
|
|
440
482
|
{cardsarray.map((cardinfoitem, cardinfoindex) => {
|
|
441
483
|
if (cardinfoindex <= 5) {
|
|
442
484
|
return (
|
|
443
485
|
<div className={'col-xl-4 col-lg-4 col-md-6 col-sm-12 p-0 '}>
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
actions={actions}
|
|
452
|
-
/>
|
|
486
|
+
{React.createElement(sectioncomp, {
|
|
487
|
+
sectionidprops: item.sectionid,
|
|
488
|
+
sectionindexprops: index,
|
|
489
|
+
cardinfoitemprops: cardinfoitem,
|
|
490
|
+
cardinfoindexprops: cardinfoindex,
|
|
491
|
+
fetchingtypeprops: fetchingtype,
|
|
492
|
+
})}
|
|
453
493
|
</div>
|
|
454
494
|
);
|
|
455
495
|
}
|
|
File without changes
|
|
File without changes
|
package/{src1-10 → srcOLD}/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx
RENAMED
|
File without changes
|