tabexseriescomponents 0.0.64 → 0.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/index.cjs.js +6838 -6468
  2. package/dist/index.esm.js +6841 -6471
  3. package/dist/index.umd.js +6841 -6472
  4. package/package.json +1 -1
  5. package/srcOLD/Contexts/LanguageContext.jsx +347 -0
  6. package/srcOLD/Contexts/ProductsCardsSectionContext.jsx +28 -0
  7. package/srcOLD/StylesJS/Customstyles.js +235 -0
  8. package/srcOLD/TabexComponents/Cards/CategoryCardwithhoveraction/CategoryCardwithhoveraction.jsx +214 -0
  9. package/srcOLD/TabexComponents/Cards/Categorycard_fullimage/Categorycard_fullimage.jsx +258 -0
  10. package/srcOLD/TabexComponents/Cards/Categorycard_slidebgscaled/Categorycard_slidebgscaled.jsx +206 -0
  11. package/srcOLD/TabexComponents/Cards/Categorycard_with_trianglebg/Categorycard_with_trianglebg.jsx +176 -0
  12. package/srcOLD/TabexComponents/Cards/Categorycard_with_twolinestransition/Categorycard_with_twolinestransition.jsx +207 -0
  13. package/srcOLD/TabexComponents/Cards/Categorycard_withshapes/Categorycard_withshapes.jsx +162 -0
  14. package/srcOLD/TabexComponents/Cards/Categorycard_withtext/Categorycard_withtext.jsx +193 -0
  15. package/srcOLD/TabexComponents/Cards/Classiccategorycard/Classiccategorycard.jsx +158 -0
  16. package/srcOLD/TabexComponents/Cards/Horizontalcard/Horizontalcard.jsx +286 -0
  17. package/srcOLD/TabexComponents/Cards/MenuCard/MenuCard.jsx +558 -0
  18. package/srcOLD/TabexComponents/Cards/ModernProductCard/ModernProductCard.jsx +486 -0
  19. package/srcOLD/TabexComponents/Cards/Productcard6/Productcard6.jsx +300 -0
  20. package/srcOLD/TabexComponents/Cards/Productcard7/Productcard7.jsx +288 -0
  21. package/srcOLD/TabexComponents/Cards/Productcard_animatedbuttons/Productcard_animatedbuttons.jsx +307 -0
  22. package/srcOLD/TabexComponents/Cards/Productcard_with_circularbg/Productcard_with_circularbg.jsx +295 -0
  23. package/srcOLD/TabexComponents/Cards/Productcard_with_circularhover/Productcard_with_circularhover.jsx +325 -0
  24. package/srcOLD/TabexComponents/Cards/Productcard_with_slideanimation/Productcard_with_slideanimation.jsx +290 -0
  25. package/srcOLD/TabexComponents/Cards/Productcard_with_variants/Productcard_with_variants.jsx +303 -0
  26. package/srcOLD/TabexComponents/Cards/Productcard_with_zoominonhover/Productcard_with_zoominonhover.jsx +466 -0
  27. package/srcOLD/TabexComponents/Cards/Productcarddefault/Productcarddefault.jsx +282 -0
  28. package/srcOLD/TabexComponents/Cards/Productccard_with_imageontopleft/Productccard_with_imageontopleft.jsx +298 -0
  29. package/srcOLD/TabexComponents/Cards/Prouductcard_with_zoomhover/Prouductcard_with_zoomhover.jsx +139 -0
  30. package/srcOLD/TabexComponents/Cards/Simplecategorycardwithtextbelow/Simplecategorycardwithtextbelow.jsx +135 -0
  31. package/srcOLD/TabexComponents/Cards/Simpleproductcard/Simpleproductcard.jsx +304 -0
  32. package/srcOLD/TabexComponents/Cards/StylishProductCard/StylishProductCard.jsx +291 -0
  33. package/srcOLD/TabexComponents/Footer/Footer1/Footer1.jsx +418 -0
  34. package/srcOLD/TabexComponents/Footer/Footer2/Footer2.jsx +382 -0
  35. package/srcOLD/TabexComponents/Footer/Footer3/Footer3.jsx +308 -0
  36. package/srcOLD/TabexComponents/Footer/Footer4/Footer4.jsx +438 -0
  37. package/srcOLD/TabexComponents/Footer/Footer5/Footer5.jsx +495 -0
  38. package/srcOLD/TabexComponents/Footer/Footer6/Footer6.jsx +295 -0
  39. package/srcOLD/TabexComponents/Footer/Footer7/Footer7.jsx +373 -0
  40. package/srcOLD/TabexComponents/Footer/Simplefooter/Simplefooter.jsx +238 -0
  41. package/srcOLD/TabexComponents/Generalfiles/images/egyptflag.png +0 -0
  42. package/srcOLD/TabexComponents/Generalfiles/images/noimage.png +0 -0
  43. package/srcOLD/TabexComponents/Generalfiles/images/payment/cod.png +0 -0
  44. package/srcOLD/TabexComponents/Generalfiles/images/payment/fawry.png +0 -0
  45. package/srcOLD/TabexComponents/Generalfiles/images/payment/payment.png +0 -0
  46. package/srcOLD/TabexComponents/Generalfiles/images/payment/paymob.png +0 -0
  47. package/srcOLD/TabexComponents/Generalfiles/images/payment/paypal.png +0 -0
  48. package/srcOLD/TabexComponents/Generalfiles/images/payment/visa.png +0 -0
  49. package/srcOLD/TabexComponents/Generalfiles/images/shoppingcart.png +0 -0
  50. package/srcOLD/TabexComponents/Generalfiles/images/tabexlogo.png +0 -0
  51. package/srcOLD/TabexComponents/Generalfiles/images/unknownmaleuser.png +0 -0
  52. package/srcOLD/TabexComponents/Generalfiles/images/usflag.png +0 -0
  53. package/srcOLD/TabexComponents/Generalfiles/images/whatsapp.png +0 -0
  54. package/srcOLD/TabexComponents/Headers/AllinoneHeader/AllinoneHeader.jsx +724 -0
  55. package/srcOLD/TabexComponents/Headers/ClassicHeader/ClassicHeader.jsx +687 -0
  56. package/srcOLD/TabexComponents/Headers/Header4/Header4.jsx +632 -0
  57. package/srcOLD/TabexComponents/Headers/Header6/Header6.jsx +669 -0
  58. package/srcOLD/TabexComponents/Headers/Header8/Header8.jsx +882 -0
  59. package/srcOLD/TabexComponents/Headers/HeaderRestaurant/HeaderRestaurant.jsx +754 -0
  60. package/srcOLD/TabexComponents/Headers/Header_threesectionslogocentered/Header_threesectionslogocentered.jsx +798 -0
  61. package/srcOLD/TabexComponents/Headers/Headerresponsive/Headerresponsive.jsx +686 -0
  62. package/srcOLD/TabexComponents/Headers/HeaderwithContactinfo/HeaderwithContactinfo.jsx +938 -0
  63. package/srcOLD/TabexComponents/Headers/Modernheader/Modernheader.jsx +706 -0
  64. package/srcOLD/TabexComponents/Headers/StylishHeader/StylishHeader.jsx +821 -0
  65. package/srcOLD/TabexComponents/Headers/Subheader/Subheader copy.jsx +228 -0
  66. package/srcOLD/TabexComponents/Headers/Subheader/Subheader.jsx +251 -0
  67. package/srcOLD/TabexComponents/Sections/BackgroundImages/Backgroundimage1/Backgroundimage1.jsx +312 -0
  68. package/srcOLD/TabexComponents/Sections/BackgroundImages/Backgroundimage_with_toppill/Backgroundimage_with_toppill.jsx +278 -0
  69. package/srcOLD/TabexComponents/Sections/BackgroundImages/BackgroundimageandTextsection/BackgroundimageandTextsection.jsx +138 -0
  70. package/srcOLD/TabexComponents/Sections/BackgroundImages/Section_with_rightbgcont/Section_with_rightbgcont.jsx +160 -0
  71. package/srcOLD/TabexComponents/Sections/BackgroundImages/Threebgimages/Threebgimages.jsx +295 -0
  72. package/srcOLD/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +784 -0
  73. package/srcOLD/TabexComponents/Sections/Cards/CardsSection/CardsSection.jsx +861 -0
  74. package/srcOLD/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.js +496 -0
  75. package/srcOLD/TabexComponents/Sections/Cards/CardsSection7/CardsSection7.js +888 -0
  76. package/srcOLD/TabexComponents/Sections/Cards/CardsSection8/CardsSection8.js +419 -0
  77. package/srcOLD/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.js +552 -0
  78. package/srcOLD/TabexComponents/Sections/Slideshow/AboutSection/AboutSection.jsx +281 -0
  79. package/srcOLD/TabexComponents/Sections/Slideshow/Backgroundimage_with_topcircle/Backgroundimage_with_topcircle.jsx +166 -0
  80. package/srcOLD/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx +152 -0
  81. package/srcOLD/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +284 -0
  82. package/srcOLD/TabexComponents/Sections/Slideshow/Image_with_rightwords/Image_with_rightwords.jsx +146 -0
  83. package/srcOLD/TabexComponents/Sections/Slideshow/Servicesection/Servicesection.jsx +209 -0
  84. package/srcOLD/TabexComponents/Sections/Slideshow/ServicesectionCenteredcards/ServicesectionCenteredcards.jsx +145 -0
  85. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshow_with_rotatedsquare/Slideshow_with_rotatedsquare.jsx +252 -0
  86. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshow_with_squarebg/Slideshow_with_squarebg.jsx +175 -0
  87. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowdifferentanimations/Slideshowdifferentanimations.jsx +154 -0
  88. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowfade/Slideshowfade.jsx +201 -0
  89. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +414 -0
  90. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowzoom/Slideshowzoom.jsx +270 -0
  91. package/srcOLD/TabexComponents/StaticPages/Aboutus/Aboutus.js +175 -0
  92. package/srcOLD/TabexComponents/StaticPages/AccountInformation/AccountInformation.jsx +275 -0
  93. package/srcOLD/TabexComponents/StaticPages/CartSlider/CartSlider.jsx +459 -0
  94. package/srcOLD/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.js +146 -0
  95. package/srcOLD/TabexComponents/StaticPages/Checkout/Checkout.jsx +1220 -0
  96. package/srcOLD/TabexComponents/StaticPages/Filter/Filter.jsx +542 -0
  97. package/srcOLD/TabexComponents/StaticPages/Login/FacebookLoginButton.jsx +51 -0
  98. package/srcOLD/TabexComponents/StaticPages/Login/GoogleLoginButton.jsx +35 -0
  99. package/srcOLD/TabexComponents/StaticPages/Login/Login.jsx +299 -0
  100. package/srcOLD/TabexComponents/StaticPages/OrderSuccess/OrderSuccess.js +192 -0
  101. package/srcOLD/TabexComponents/StaticPages/Ordershistory/Ordershistory.jsx +1285 -0
  102. package/srcOLD/TabexComponents/StaticPages/Policies/Policies.jsx +358 -0
  103. package/srcOLD/TabexComponents/StaticPages/Productinfo/Productinfo.jsx +1506 -0
  104. package/srcOLD/TabexComponents/StaticPages/Searchlist/Searchlist.jsx +225 -0
  105. package/srcOLD/TabexComponents/StaticPages/Signup/CustomerInformationForm.jsx +788 -0
  106. package/srcOLD/TabexComponents/StaticPages/Signup/Signup.jsx +157 -0
  107. package/srcOLD/TabexComponents/StaticPages/Staticpagesrouter/Staticpagesrouter.jsx +295 -0
  108. package/srcOLD/TabexComponents/StaticPages/Viewcart/Viewcart.js +1090 -0
  109. package/srcOLD/TabexComponents/StaticPages/Wishlist/Wishlist.jsx +629 -0
  110. package/srcOLD/assets/images/cod.png +0 -0
  111. package/srcOLD/assets/images/egyptflag.png +0 -0
  112. package/srcOLD/assets/images/fawry.png +0 -0
  113. package/srcOLD/assets/images/payment.png +0 -0
  114. package/srcOLD/assets/images/paymob.png +0 -0
  115. package/srcOLD/assets/images/paypal.png +0 -0
  116. package/srcOLD/assets/images/shoppingcart.png +0 -0
  117. package/srcOLD/assets/images/usflag.png +0 -0
  118. package/srcOLD/assets/images/visa.png +0 -0
  119. package/srcOLD/assets/images/whatsapp.png +0 -0
  120. package/srcOLD/button.jsx +40 -0
  121. package/srcOLD/index.jsx +175 -0
  122. package/srcOLD/styles/Home.module.css +129 -0
  123. package/srcOLD/styles/cards/Categorcycard_fullimage.module.css +10 -0
  124. package/srcOLD/styles/cards/Categorycard_slidebgscaled.module.css +73 -0
  125. package/srcOLD/styles/cards/Categorycard_withshapes.module.css +189 -0
  126. package/srcOLD/styles/cards/Productcard6.module.css +9 -0
  127. package/srcOLD/styles/cards/Productcard_with_circularbg.module.css +137 -0
  128. package/srcOLD/styles/cards/Productccard_with_zoominonhover.module.css +51 -0
  129. package/srcOLD/styles/cards/Prouductcard_with_zoomhover.module.css +61 -0
  130. package/srcOLD/styles/cards/categorycard.module.css +102 -0
  131. package/srcOLD/styles/cards/categorycard3.module.css +51 -0
  132. package/srcOLD/styles/cards/categorycardwithtext.module.css +40 -0
  133. package/srcOLD/styles/cards/productcard_animatedbuttons.module.css +104 -0
  134. package/srcOLD/styles/cards/productcard_with_textonhover.module.css +12 -0
  135. package/srcOLD/styles/cards/productccard_with_imageontopleft.module.css +85 -0
  136. package/srcOLD/styles/general/bootstrap.css +4420 -0
  137. package/srcOLD/styles/general/dropdown.css +199 -0
  138. package/srcOLD/styles/general/editorbardropdown.module.css +94 -0
  139. package/srcOLD/styles/general/filter.module.css +108 -0
  140. package/srcOLD/styles/general/form.module.css +273 -0
  141. package/srcOLD/styles/general/general.module.css +709 -0
  142. package/srcOLD/styles/general/image-gallery.css +481 -0
  143. package/srcOLD/styles/general/react-accessible-accordion.module.css +52 -0
  144. package/srcOLD/styles/general/react-phone-input-2.module.css +927 -0
  145. package/srcOLD/styles/general/scrollbtn.module.css +22 -0
  146. package/srcOLD/styles/general/slick.module.css +166 -0
  147. package/srcOLD/styles/general/tabs.module.css +110 -0
  148. package/srcOLD/styles/general/workplaceeditor.module.css +328 -0
  149. package/srcOLD/styles/globals.css +26 -0
  150. package/srcOLD/styles/headers/Allinoneheader.module.css +91 -0
  151. package/srcOLD/styles/headers/Header7.module.css +50 -0
  152. package/srcOLD/styles/headers/Header_threesectionslogocentered.module.css +97 -0
  153. package/srcOLD/styles/headers/Sideheader.module.css +108 -0
  154. package/srcOLD/styles/headers/classicheaderstyles.module.css +16 -0
  155. package/srcOLD/styles/headers/dropdown.css +0 -0
  156. package/srcOLD/styles/headers/header4.module.css +175 -0
  157. package/srcOLD/styles/headers/header5.module.css +30 -0
  158. package/srcOLD/styles/headers/header6.module.css +117 -0
  159. package/srcOLD/styles/headers/header_contactinfo.module.css +78 -0
  160. package/srcOLD/styles/headers/headerresturant.module.css +89 -0
  161. package/srcOLD/styles/headers/headerstyles.module.css +24 -0
  162. package/srcOLD/styles/headers/modernheader.module.css +78 -0
  163. package/srcOLD/styles/headers/subheader.module.css +114 -0
  164. package/srcOLD/styles/sections/Backgroundimage1.module.css +17 -0
  165. package/srcOLD/styles/sections/Backgroundimage_with_topcircle.module.css +28 -0
  166. package/srcOLD/styles/sections/Section_with_rightbgcont.module.css +49 -0
  167. package/srcOLD/styles/sections/Slideshow_with_rotatedsquare.module.css +35 -0
  168. package/srcOLD/styles/sections/Slideshow_with_squarebg.module.css +39 -0
  169. package/srcOLD/styles/staticpages/accordion.module.css +9 -0
  170. package/srcOLD/styles/staticpages/cart.module.css +108 -0
  171. package/srcOLD/styles/staticpages/dropdown.css +196 -0
  172. package/srcOLD/styles/staticpages/filter.module.css +139 -0
  173. package/srcOLD/styles/staticpages/login.module.css +146 -0
  174. package/srcOLD/styles/staticpages/productinfo.module.css +54 -0
  175. package/srcOLD/styles/staticpages/shop.module.css +191 -0
  176. package/srcOLD/styles/staticpages/signup.module.css +206 -0
  177. package/srcOLD/styles/staticpages/staticroutersidenav.module.css +129 -0
  178. package/srcOLD/styles/staticpages/viewcart.module.css +129 -0
  179. package/srcOLD/styles/staticpages/wishlist.module.css +29 -0
@@ -0,0 +1,861 @@
1
+ // All take sectionidprops & sectionindexprops
2
+ import React, { useEffect, useState, useContext } from 'react';
3
+
4
+ import generalstyles from '../../../../styles/general/general.module.css';
5
+ import { css } from 'glamor';
6
+ import Filter from '../../../StaticPages/Filter/Filter.jsx';
7
+ import { useInView } from 'react-intersection-observer';
8
+ import { MdOutlineLayersClear } from 'react-icons/md';
9
+ import { BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
10
+ import { FiFilter } from 'react-icons/fi';
11
+
12
+ import axios from 'axios';
13
+ import { CircularProgress } from 'react-cssfx-loading';
14
+ import { ScrollMenu, VisibilityContext } from 'react-horizontal-scrolling-menu';
15
+ const CardsSection = (props) => {
16
+ const { ref, inView } = useInView();
17
+ const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
18
+ const lang = props.actions.lang;
19
+ const langdetect = props.actions.langdetect;
20
+ const setlang = props.actions.setlang;
21
+ const templatepropcontext = props.actions.templatepropcontext;
22
+ const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
23
+ const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
24
+ const routingcountext = props.actions.routingcountext;
25
+ const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
26
+ const ProductFilterObjContext = props.actions.ProductFilterObjContext;
27
+ const setProductFilterObjContext = props.actions.setProductFilterObjContext;
28
+ const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
29
+ const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
30
+ const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
31
+ const SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
32
+ const serverbaselink = props.actions.serverbaselink;
33
+ const instapikey = props.actions.instapikey;
34
+ const fetchcollections_API = props.actions.fetchcollections_API;
35
+ const fetchProductsQuery = props.actions.fetchProductsQuery;
36
+ const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
37
+ const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
38
+ const ParentCollectionsForCollectionQueryArr = props.actions.ParentCollectionsForCollectionQueryArr;
39
+ const setfetchingtype = props.actions.setfetchingtype;
40
+ const fetchingtype = props.actions.fetchingtype;
41
+ const AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
42
+ const setShowProductInfoModalContext = props.actions.setShowProductInfoModalContext;
43
+ const authdetailsContext = props.actions.authdetailsContext;
44
+ const productfiltercontext = props.actions.productfiltercontext;
45
+ const setproductfiltercontext = props.actions.setproductfiltercontext;
46
+ const actions = props.actions;
47
+ const [sectionproperties, setsectionproperties] = useState('');
48
+ const [imagesarray, setimagesarray] = useState([]);
49
+ const [cardsarray, setcardsarray] = useState([]);
50
+
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
+ // });
108
+ React.useEffect(() => {
109
+ if (inView) {
110
+ fetchProductsQuery.fetchNextPage();
111
+ }
112
+ }, [inView]);
113
+ const [ProductsFetchingTypeSectionObj, setProductsFetchingTypeSectionObj] = useState({ productfetchingtype: 'Random', collectionid: '' });
114
+ useEffect(() => {
115
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
116
+ if (sectionitem.sectionid == props.sectionidprops) {
117
+ var secpropobj = {};
118
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
119
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
120
+ });
121
+ setsectionproperties({ ...secpropobj });
122
+
123
+ if (props.srcfromprops == 'GeneralProductsComponent') {
124
+ setfetchingtype('products');
125
+ setProductsFetchingTypeSectionObj({
126
+ productfetchingtype: 'Random',
127
+ collectionid: props.collectionidprops,
128
+ });
129
+ } else {
130
+ setfetchingtype(sectionitem.fetchingtype);
131
+ setProductsFetchingTypeSectionObj({
132
+ productfetchingtype: sectionitem.productsfetchingtype,
133
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
134
+ });
135
+ }
136
+ }
137
+ });
138
+ }, [StatePagePropertiesContext]);
139
+ useEffect(() => {
140
+ SearchHeaderMutationContext.reset();
141
+ const delayDebounceFn = setTimeout(() => {
142
+ if (searchinput.length != 0) {
143
+ SearchHeaderMutationContext.mutate({
144
+ SearchHeaderValue: searchinput,
145
+ });
146
+ }
147
+ }, 1000);
148
+
149
+ return () => clearTimeout(delayDebounceFn);
150
+ }, [searchinput]);
151
+ useEffect(() => {
152
+ if (sectionproperties.length != 0) {
153
+ if (cardsarray.length == 0) {
154
+ if (fetchingtype == 'collections') {
155
+ if (fetchcollectionsQueryContext.isSuccess) {
156
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
157
+ }
158
+ } else if (fetchingtype == 'products') {
159
+ if (fetchProductsQuery.isSuccess) {
160
+ var allpagesarr = [];
161
+ fetchProductsQuery.data.pages.forEach((page) => {
162
+ page.data.products.forEach((productobj) => {
163
+ allpagesarr.push(productobj);
164
+ });
165
+ });
166
+ cardobjassigner(allpagesarr);
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }, [sectionproperties]);
172
+ useEffect(() => {
173
+ if (fetchingtype.length != 0) {
174
+ var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
175
+
176
+ if (fetchingtype == 'collections') {
177
+ // tempFetchQueriesEngineContext.collections = true;
178
+
179
+ if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
180
+ setParentCollectionsForCollectionQueryArr('all');
181
+ } else {
182
+ setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
183
+ }
184
+ }
185
+ if (fetchingtype == 'products') {
186
+ var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
187
+ tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
188
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
189
+
190
+ setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
191
+ }
192
+
193
+ setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
194
+ }
195
+ }, [fetchingtype, ProductsFetchingTypeSectionObj]);
196
+ useEffect(() => {
197
+ if (fetchingtype == 'products') {
198
+ if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
199
+ var allpagesarr = [];
200
+ fetchProductsQuery.data.pages.forEach((page) => {
201
+ page.data.products.forEach((productobj) => {
202
+ allpagesarr.push(productobj);
203
+ });
204
+ });
205
+ cardobjassigner(allpagesarr);
206
+ }
207
+ }
208
+ }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
209
+ useEffect(() => {
210
+ if (fetchingtype == 'collections') {
211
+ if (fetchcollectionsQueryContext.isSuccess) {
212
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
213
+ }
214
+ }
215
+ }, [fetchcollectionsQueryContext.isSuccess]);
216
+ useEffect(() => {
217
+ favassigner();
218
+ }, [favoriteprojectscountContext]);
219
+ const favassigner = () => {
220
+ if (fetchingtype == 'products') {
221
+ if (cardsarray.length != 0) {
222
+ if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
223
+ var tempcardsarray = [...cardsarray];
224
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
225
+ arrayItem.IsFavExists = false;
226
+ });
227
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
228
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
229
+ if (arrayItem.productid == favitem) {
230
+ arrayItem.IsFavExists = true;
231
+ }
232
+ });
233
+ });
234
+ setcardsarray([...tempcardsarray]);
235
+ }
236
+ }
237
+ }
238
+ };
239
+ const cardobjassigner = (fetchedarray) => {
240
+ var temparray = [];
241
+ fetchedarray.forEach(function (arrayItem, arrayindex) {
242
+ var cardobj = {
243
+ name: '',
244
+ image: '',
245
+ };
246
+ if (fetchingtype == 'products') {
247
+ var itemquantity = 0;
248
+ if (langdetect == 'en') {
249
+ cardobj.name = arrayItem.productinfo.name_en;
250
+ } else {
251
+ cardobj.name = arrayItem.productinfo.name_ar;
252
+ }
253
+ if (langdetect == 'en') {
254
+ cardobj.description = arrayItem.productinfo.description_en;
255
+ } else {
256
+ cardobj.description = arrayItem.productinfo.description_ar;
257
+ }
258
+ if (arrayItem.productinfo.hasvariants == 0) {
259
+ fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
260
+ if (cartitem.productid == arrayItem.productinfo.productid) {
261
+ itemquantity = cartitem.quantity;
262
+ }
263
+ });
264
+ }
265
+ cardobj.image = arrayItem.productinfo.productmainimage;
266
+ cardobj.hassale = arrayItem.productinfo.hassale;
267
+ cardobj.productid = arrayItem.productinfo.productid;
268
+ cardobj.hasvariants = arrayItem.productinfo.hasvariants;
269
+ cardobj.description_en = arrayItem.productinfo.description_en;
270
+ cardobj.description_ar = arrayItem.productinfo.description_ar;
271
+ cardobj.defaultprice = arrayItem.productinfo.defaultprice;
272
+ cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
273
+ cardobj.productimages = arrayItem.productinfo.productimages;
274
+ cardobj.quantity = itemquantity;
275
+ cardobj.timestamp = arrayItem.productinfo.timestamp;
276
+
277
+ if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
278
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
279
+ if (arrayItem.productinfo.productid == favitem) {
280
+ cardobj.IsFavExists = true;
281
+ }
282
+ });
283
+ }
284
+ } else if (fetchingtype == 'collections') {
285
+ cardobj.collectionid = arrayItem.collectionid;
286
+ if (langdetect == 'en') {
287
+ cardobj.name = arrayItem.title_en;
288
+ cardobj.description = arrayItem.description_en;
289
+ } else if (langdetect == 'ar') {
290
+ cardobj.name = arrayItem.title_ar;
291
+ cardobj.description = arrayItem.description_ar;
292
+ }
293
+ cardobj.image = arrayItem.collectionlogo;
294
+ } else if (fetchingtype == 'custom') {
295
+ }
296
+ temparray.push(cardobj);
297
+ });
298
+
299
+ setcardsarray([...temparray]);
300
+ };
301
+ const section_cssstyles = {
302
+ sectiontitlespan: css({
303
+ ':after': {
304
+ height: '5px',
305
+ width: sectionproperties.sectitle_lineafterwidth + '%',
306
+ backgroundColor: sectionproperties.linebgcolor,
307
+ },
308
+ }),
309
+ line_left: css({
310
+ height: '1px',
311
+ position: 'relative',
312
+ flex: '1 1 auto',
313
+ minWidth: '10%',
314
+ background: sectionproperties.linebgcolor,
315
+ }),
316
+ line_right: css({
317
+ height: '1px',
318
+ position: 'relative',
319
+ flex: '1 1 auto',
320
+ minWidth: '10%',
321
+ background: sectionproperties.linebgcolor,
322
+ }),
323
+ cards_sections: css({
324
+ marginTop: sectionproperties.marginTop + 'px',
325
+ marginBottom: sectionproperties.marginBottom + 'px',
326
+ paddingLeft: langdetect == 'en' ? sectionproperties.paddingLeft + 'px' : sectionproperties.paddingRight + 'px',
327
+ paddingRight: langdetect == 'en' ? sectionproperties.paddingRight + 'px' : sectionproperties.paddingLeft + 'px',
328
+ paddingTop: sectionproperties.paddingTop + 'px',
329
+ paddingBottom: sectionproperties.paddingBottom + 'px',
330
+
331
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
332
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
333
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
334
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
335
+ boxShadow: sectionproperties.sectioncardshadow == 'Show' ? '0 0 10px ' + sectionproperties.sectioncardshadowcolor : 'none',
336
+ borderColor: sectionproperties.sectioncardbordercolor,
337
+ border: sectionproperties.sectioncardborderwidth + 'px solid',
338
+ }),
339
+ filterbtn: css({
340
+ width: sectionproperties.filterbtn_Width + 'px',
341
+ height: sectionproperties.filterbtn_Height + 'px',
342
+ background: sectionproperties.filterbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.filterbtn_bgColor,
343
+ borderBottomLeftRadius: sectionproperties.filterbtn_borderBottomLeftRadius + 'px',
344
+ borderBottomRightRadius: sectionproperties.filterbtn_borderBottomRightRadius + 'px',
345
+ borderTopLeftRadius: sectionproperties.filterbtn_borderTopLeftRadius + 'px',
346
+ borderTopRightRadius: sectionproperties.filterbtn_borderTopRightRadius + 'px',
347
+ color: sectionproperties.filterbtn_Textcolor,
348
+ boxShadow: sectionproperties.filterbtn_showshadow == 'Show' ? '0 0 10px ' + sectionproperties.filterbtn_shadowcolor : '',
349
+ marginTop: sectionproperties.filterbtn_marginTop + 'px',
350
+ marginBottom: sectionproperties.filterbtn_marginBottom + 'px',
351
+ marginLeft: sectionproperties.filterbtn_marginLeft + 'px',
352
+ marginRight: sectionproperties.filterbtn_marginRight + 'px',
353
+ transition: '.3s',
354
+ ':hover': {
355
+ background: sectionproperties.filterbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.filterbtn_bgColoronhover,
356
+ color: sectionproperties.filterbtn_Textcoloronhover,
357
+ },
358
+ }),
359
+ viewmorebtn: css({
360
+ width: sectionproperties.viewmorebtn_Width + 'px',
361
+ height: sectionproperties.viewmorebtn_Height + 'px',
362
+ background: sectionproperties.viewmorebtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.viewmorebtn_bgColor,
363
+ borderRadius: sectionproperties.viewmorebtn_borderBottomLeftRadius + 'px',
364
+ color: sectionproperties.viewmorebtn_Textcolor,
365
+ fontSize: sectionproperties.viewmorebtn_fontSize + 'px',
366
+ fontWeight: sectionproperties.viewmorebtn_fontWeight,
367
+ textDecoration: sectionproperties.viewmorebtn_bgtransparent == 'Transparent' ? 'underline' : 'none',
368
+ transition: '.3s',
369
+ ':hover': {
370
+ background: sectionproperties.viewmorebtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.viewmorebtn_bgColoronhover,
371
+ color: sectionproperties.viewmorebtn_Textcoloronhover,
372
+ },
373
+ }),
374
+ loadbtn: css({
375
+ fontSize: sectionproperties.generaltext_fontSize + 'px',
376
+ color: sectionproperties.generaltext_fontColor,
377
+ fontWeight: sectionproperties.generaltext_fontWeight,
378
+ textDecoration: 'underline',
379
+ transition: '.3s',
380
+ ':hover': {
381
+ color: sectionproperties.text_secondarycolor,
382
+ },
383
+ }),
384
+ };
385
+ const cardsrender = () => {
386
+ return (
387
+ <div
388
+ style={{ background: sectionproperties.backgroundColor }}
389
+ className={sectionproperties.showFilter == 'show' && sectionproperties.filterdirection == 'Vertical' ? 'col-lg-9 p-sm-0' : 'row m-0 w-100'}
390
+ >
391
+ {!fetchProductsQuery.isFetching && cardsarray.length == 0 && (
392
+ <div className="row m-0 w-100 d-flex align-items-center" style={{ height: '50vh' }}>
393
+ <div className="col-lg-12 text-light d-flex align-items-center justify-content-center flex-column">
394
+ <MdOutlineLayersClear
395
+ style={{
396
+ fontSize: sectionproperties.noprod_iconfontSize + 'px',
397
+ color: sectionproperties.noprod_iconcolor,
398
+ }}
399
+ />
400
+ <p
401
+ style={{
402
+ fontSize: sectionproperties.noprod_fontSize + 'px',
403
+ fontWeight: sectionproperties.noprod_fontWeight,
404
+ textTransform: sectionproperties.noprod_textTransform,
405
+ color: sectionproperties.noprod_color,
406
+ }}
407
+ >
408
+ {langdetect == 'en' ? 'No Products Found' : 'لا توجد منتجات'}
409
+ </p>
410
+ </div>
411
+ </div>
412
+ )}
413
+ {cardsarray.length != 0 && sectionproperties.length != 0 && (
414
+ <div className="row m-0 w-100 d-flex align-items-center p-sm-0">
415
+ <div
416
+ className="row ml-0 mr-0 w-100 pl-md-2 pr-md-2 pl-sm-2 pr-sm-2"
417
+ style={{
418
+ marginTop: sectionproperties.sectionTitleMarginTop + 'px',
419
+ marginBottom: sectionproperties.sectionTitleMarginBottom + 'px',
420
+ paddingLeft: sectionproperties.sectionTitleMarginLeft + 'px',
421
+ paddingRight: sectionproperties.sectionTitleMarginRight + 'px',
422
+ }}
423
+ >
424
+ {sectionproperties.sectiontitleshow == 'Show' && (
425
+ <div
426
+ className={
427
+ sectionproperties.viewmorebtnshow == 'Show'
428
+ ? sectionproperties.sectiontitleposition == 'Centered'
429
+ ? ' col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0 '
430
+ : ' col-lg-7 col-md-7 col-sm-7 d-flex align-items-center p-0 '
431
+ : sectionproperties.showFilter == 'show'
432
+ ? ' col-lg-12 col-md-7 col-sm-7 d-flex align-items-center p-0 '
433
+ : ' col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0 '
434
+ }
435
+ >
436
+ <div
437
+ // mb-auto
438
+ className={`${generalstyles.sectiontitlecont}` + ' col-lg-12 p-0 d-flex align-items-center '}
439
+ style={{
440
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : 'start',
441
+ }}
442
+ >
443
+ <div
444
+ className="d-flex align-items-center flex-row"
445
+ style={{
446
+ position: 'relative',
447
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : '',
448
+ width: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '100%' : '',
449
+ }}
450
+ >
451
+ {sectionproperties.sectiontitlestyle == 'Line Before Text' && <span className={section_cssstyles.line_left}></span>}
452
+ <p
453
+ className={
454
+ sectionproperties.sectiontitlefontfamily == 'Pacifico'
455
+ ? `${section_cssstyles.sectiontitlespan}` +
456
+ ' PacificoFont mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start '
457
+ : sectionproperties.sectiontitlefontfamily == 'Playfair'
458
+ ? `${section_cssstyles.sectiontitlespan}` +
459
+ ' PlayfairFont mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start '
460
+ : sectionproperties.sectiontitlefontfamily == 'Great Vibes'
461
+ ? `${section_cssstyles.sectiontitlespan}` +
462
+ ' GreatvibesFont mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start '
463
+ : `${section_cssstyles.sectiontitlespan}` +
464
+ ' mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start '
465
+ }
466
+ style={{
467
+ fontSize: sectionproperties.sectionTitleFontSize + 'px',
468
+ color: sectionproperties.sectionTitleColor,
469
+ fontWeight: sectionproperties.sectionTitleFontWeight,
470
+ paddingLeft: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '12px' : 0,
471
+ paddingRight: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '12px' : 0,
472
+ textAlign: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : '',
473
+ }}
474
+ >
475
+ {langdetect == 'en' ? sectionproperties.sectionTitleContent : sectionproperties.sectionTitleContent_ar}
476
+ </p>
477
+ {sectionproperties.sectiontitlestyle == 'Line Before Text' && <span className={section_cssstyles.line_right}></span>}
478
+ </div>
479
+ </div>
480
+ </div>
481
+ )}
482
+ {sectionproperties.prodCatShow == 'Show' && (
483
+ <div
484
+ className={' col-lg-12 d-flex align-items-center '}
485
+ style={{
486
+ justifyContent: sectionproperties.descriptionCentered == 'Centered' ? 'center' : 'start',
487
+ marginBottom: sectionproperties.descriptionMarginBottom + 'px',
488
+ paddingLeft: langdetect == 'en' ? sectionproperties.description_marginLeft + 'px' : sectionproperties.description_marginRight + 'px',
489
+ paddingRight: langdetect == 'en' ? sectionproperties.description_marginRight + 'px' : sectionproperties.description_marginLeft + 'px',
490
+ }}
491
+ >
492
+ <p
493
+ className="m-0 p-0 wordbreak "
494
+ style={{
495
+ fontSize: sectionproperties.prodCatFontSize + 'px',
496
+ color: sectionproperties.prodCatColor,
497
+ fontWeight: sectionproperties.prodCatFontWeight,
498
+ textAlign: sectionproperties.descriptionCentered == 'Centered' ? 'center' : langdetect == 'en' ? 'left' : 'right',
499
+ }}
500
+ >
501
+ {langdetect == 'en' ? sectionproperties.descriptionContentEn : sectionproperties.descriptionContentAr}
502
+ </p>
503
+ </div>
504
+ )}
505
+ <div
506
+ className={
507
+ sectionproperties.sectiontitleposition == 'Centered'
508
+ ? 'col-lg-12 col-md-12 col-sm-12 d-flex align-item-center justify-content-center p-0'
509
+ : 'col-lg-5 col-md-5 col-sm-5 d-flex align-item-center justify-content-end justify-content-sm-center p-0'
510
+ }
511
+ style={{
512
+ marginTop: sectionproperties.sectiontitleposition == 'Centered' ? '10px' : 0,
513
+ }}
514
+ >
515
+ <div
516
+ className={
517
+ sectionproperties.sectiontitleposition == 'Centered'
518
+ ? ' row m-0 w-100 d-flex align-item-center justify-content-center '
519
+ : ' row m-0 w-100 d-flex align-item-center justify-content-end '
520
+ }
521
+ >
522
+ {/* sectionproperties.view_as_slider_vertical == 'Slider (Horizontal)' && */}
523
+ {sectionproperties.viewmorebtnshow == 'Show' && (
524
+ <button
525
+ className={
526
+ sectionproperties.sectiontitleposition == 'Centered'
527
+ ? `${section_cssstyles.viewmorebtn}` + ' m-sm-0 allcentered mt-auto mb-auto '
528
+ : `${section_cssstyles.viewmorebtn}` + ' w-sm-auto btn-circle-resp m-sm-0 mt-auto mb-auto '
529
+ }
530
+ onClick={() => {
531
+ if (fetchingtype == 'products') {
532
+ if (ProductsFetchingTypeSectionObj.productfetchingtype == 'Collection') {
533
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, ProductsFetchingTypeSectionObj.collectionid);
534
+ } else {
535
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
536
+ }
537
+ } else {
538
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
539
+ }
540
+ }}
541
+ >
542
+ <span
543
+ className={
544
+ sectionproperties.sectiontitleposition == 'Centered'
545
+ ? 'd-flex justify-content-center align-items-center'
546
+ : 'd-flex justify-content-center align-items-center d-md-none'
547
+ }
548
+ >
549
+ {langdetect == 'en' ? sectionproperties.viewmorebtn_text : sectionproperties.viewmorebtn_text_ar}
550
+ </span>
551
+ <span
552
+ className={
553
+ sectionproperties.sectiontitleposition == 'Centered'
554
+ ? 'd-none align-items-center justify-content-center'
555
+ : 'd-none d-md-flex align-items-center justify-content-center'
556
+ }
557
+ >
558
+ <i className="h-100 d-flex align-items-center justify-content-center">
559
+ {langdetect == 'en' ? <BsFillArrowRightCircleFill /> : <BsFillArrowLeftCircleFill />}
560
+ </i>
561
+ </span>
562
+ </button>
563
+ )}
564
+ {sectionproperties.showFilter == 'show' && (
565
+ <button
566
+ className={
567
+ sectionproperties.searchbar_show == 'Show'
568
+ ? ' col-lg-3 col-md-3 pl-0 pr-0 d-none d-md-flex justify-content-end ml-1 '
569
+ : ' col-lg-12 col-sm-12 pl-0 pr-0 d-none d-md-flex justify-content-end ml-1 '
570
+ }
571
+ onClick={() => {
572
+ var element = document.getElementById('filterslider');
573
+ element.classList.add(filterstyles.filterslider_container_opened);
574
+ }}
575
+ >
576
+ <div className={`${section_cssstyles.filterbtn}` + ' btn-circle-resp '}>
577
+ <i className="h-100 d-flex align-items-center justify-content-center">
578
+ <FiFilter />
579
+ </i>
580
+ </div>
581
+ </button>
582
+ )}
583
+ </div>
584
+ </div>
585
+ {sectionproperties.showseparator == 'Show' && (
586
+ <div className="col-lg-12 p-0">
587
+ <hr className="mt-3 mb-2" style={{ borderColor: sectionproperties.upperseparatorbgcolor }} />
588
+ </div>
589
+ )}
590
+ </div>
591
+ {StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
592
+ if (item.tabexsectioninfo != null) {
593
+ if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
594
+ var Sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
595
+ return (
596
+ <div
597
+ className={
598
+ sectionproperties.paddingLeft != 0 && sectionproperties.paddingRight != 0
599
+ ? section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 pl-md-2 pr-md-2 '
600
+ : sectionproperties.paddingRight != 0
601
+ ? section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 pr-md-2 '
602
+ : sectionproperties.paddingLeft != 0
603
+ ? section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 pl-md-2 '
604
+ : section_cssstyles.cards_sections + ' row ml-0 mr-0 w-100 '
605
+ }
606
+ >
607
+ {sectionproperties.view_as_slider_vertical == 'Slider (Horizontal)' && (
608
+ <div className={langdetect == 'en' ? 'col-lg-12 p-0 pl-sm-2' : 'col-lg-12 p-0 pr-sm-2'}>
609
+ <ScrollMenu
610
+ transitionBehavior={'auto'}
611
+ wrapperClassName={''}
612
+ itemClassName={
613
+ item.tabexsectioninfo.sectioncompname == 'Productcard6'
614
+ ? 'scrollmenuclassnameitemProductcard6'
615
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
616
+ ? 'scrollmenuclassnameitemProductcard_with_circularhover'
617
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularbg'
618
+ ? 'scrollmenuclassnameitemProductcard_with_circularbg'
619
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_twolinestransition'
620
+ ? 'scrollmenuclassnameitemCategorycard_with_twolinestransition'
621
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_slideanimation'
622
+ ? 'scrollmenuclassnameitemProductcard_with_slideanimation'
623
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_withtext'
624
+ ? 'scrollmenuclassnameitemCategorycard_withtext'
625
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons'
626
+ ? 'scrollmenuclassnameitemProductcard_animatedbuttons'
627
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_variants'
628
+ ? 'scrollmenuclassnameitemProductcard_with_variants'
629
+ : item.tabexsectioninfo.sectioncompname == 'Productcarddefault'
630
+ ? 'scrollmenuclassnameitemProductcarddefault'
631
+ : item.tabexsectioninfo.sectioncompname == 'Simpleproductcard'
632
+ ? 'scrollmenuclassnameitemSimpleproductcard'
633
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_trianglebg'
634
+ ? 'scrollmenuclassnameitemCategorycard_with_trianglebg'
635
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_textonhover'
636
+ ? 'scrollmenuclassnameitemProductcard_with_textonhover'
637
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_slidebgscaled'
638
+ ? 'scrollmenuclassnameitemCategorycard_slidebgscaled'
639
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
640
+ ? 'scrollmenuclassnameitemProductccard_with_imageontopleft'
641
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_zoominonhover'
642
+ ? 'scrollmenuclassnameitemProductcard_with_zoominonhover'
643
+ : item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
644
+ ? 'scrollmenuclassnameitemProductcard_Horizontalcard'
645
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_fullimage'
646
+ ? 'scrollmenuclassnameitemCategorycard_fullimage'
647
+ : item.tabexsectioninfo.sectioncompname == 'Classiccategorycard'
648
+ ? 'scrollmenuclassnameitemClassiccategorycard'
649
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
650
+ ? 'scrollmenuclassnameitemModernProductCard'
651
+ : item.tabexsectioninfo.sectioncompname == 'Simplecategorycardwithtextbelow'
652
+ ? 'scrollmenuclassnameitemSimplecategorycardwithtextbelow'
653
+ : item.tabexsectioninfo.sectioncompname == 'Productcard7'
654
+ ? 'scrollmenuclassnameitemProductcard7'
655
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
656
+ ? 'scrollmenuclassnameitemMenuCard'
657
+ : 'scrollmenuclassnameitem'
658
+ }
659
+ scrollContainerClassName={'scrollmenuclasssubscrollbar'}
660
+ >
661
+ {cardsarray.map((cardinfoitem, cardinfoindex) => {
662
+ return (
663
+ <div
664
+ className={' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 w-100'}
665
+ // style={{
666
+ // minWidth:
667
+ // item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons' ||
668
+ // item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
669
+ // ? sectionproperties.width + 'px'
670
+ // : '',
671
+ // maxWidth:
672
+ // item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons' ||
673
+ // item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
674
+ // ? sectionproperties.width + 'px'
675
+ // : '',
676
+ // }}
677
+ >
678
+ {/* {React.createElement(sectioncomp, {
679
+ sectionidprops: item.sectionid,
680
+ sectionindexprops: index,
681
+ cardinfoitemprops: cardinfoitem,
682
+ cardinfoindexprops: cardinfoindex,
683
+ fetchingtypeprops: fetchingtype,
684
+ sectiontypeprops: 'horizontal',
685
+ })} */}
686
+ <Sectioncomp
687
+ sectiontypeprops={'horizontal'}
688
+ fetchingtypeprops={fetchingtype}
689
+ cardinfoindexprops={cardinfoindex}
690
+ cardinfoitemprops={cardinfoitem}
691
+ sectionindexprops={index}
692
+ sectionidprops={item.sectionid}
693
+ // {...props}
694
+ // StatePagePropertiesContext={StatePagePropertiesContext}
695
+ actions={actions}
696
+ />
697
+ </div>
698
+ );
699
+ })}
700
+ {fetchingtype == 'products' && fetchProductsQuery.isFetchingNextPage && (
701
+ <button
702
+ className={section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center '}
703
+ ref={ref}
704
+ onClick={() => fetchProductsQuery.fetchNextPage()}
705
+ disabled={!fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage}
706
+ >
707
+ <CircularProgress color="#000" width="20px" height="20px" duration="1s" />
708
+ </button>
709
+ )}
710
+ </ScrollMenu>
711
+ </div>
712
+ )}
713
+ {sectionproperties.view_as_slider_vertical != 'Slider (Horizontal)' && (
714
+ <div className="row m-0 w-100 ">
715
+ {cardsarray.map((cardinfoitem, cardinfoindex) => {
716
+ return (
717
+ <div
718
+ className={
719
+ sectionproperties.numberOfColsvertical == '1'
720
+ ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
721
+ ? ' col-xl-12 p-0 col-lg-12 col-md-4 p-0 d-flex justify-content-center col-sm-6 '
722
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
723
+ ? ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-6 d-flex justify-content-center p-0 '
724
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
725
+ ? ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
726
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
727
+ ? ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
728
+ : ' col-xl-12 p-0 col-lg-12 col-md-6 col-sm-12 d-flex justify-content-center p-0 '
729
+ : sectionproperties.numberOfColsvertical == '2'
730
+ ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
731
+ ? ' col-xl-6 p-0 col-lg-6 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
732
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft '
733
+ ? ' col-xl-6 p-0 col-lg-6 col-md-6 col-sm-6 d-flex justify-content-center p-0 '
734
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
735
+ ? ' col-xl-6 p-0 col-lg-6 col-md-6 col-sm-12 d-flex justify-content-center p-0 '
736
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
737
+ ? ' col-xl-6 p-0 col-lg-6 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
738
+ : ' col-xl-6 p-0 col-lg-6 col-md-6 col-sm-12 d-flex justify-content-center p-0'
739
+ : sectionproperties.numberOfColsvertical == '3'
740
+ ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
741
+ ? ' col-xl-4 col-lg-4 col-md-4 col-sm-6 p-0 d-flex justify-content-center '
742
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
743
+ ? ' col-xl-4 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
744
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
745
+ ? ' col-xl-4 p-0 col-lg-4 col-md-4 col-sm-12 d-flex justify-content-center p-0 '
746
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
747
+ ? ' col-xl-4 p-0 col-lg-4 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
748
+ : ' col-xl-4 col-lg-4 col-md-6 col-sm-12 d-flex justify-content-center p-0 '
749
+ : sectionproperties.numberOfColsvertical == '4'
750
+ ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
751
+ ? ' col-xl-3 p-0 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
752
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
753
+ ? ' col-xl-3 p-0 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
754
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
755
+ ? ' col-xl-3 p-0 col-lg-4 col-md-6 col-sm-12 d-flex justify-content-center p-0 '
756
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
757
+ ? ' col-xl-3 p-0 col-lg-3 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
758
+ : ' col-xl-3 col-lg-4 col-md-4 col-sm-6 p-0 d-flex justify-content-center p-0 '
759
+ : sectionproperties.numberOfColsvertical == '12'
760
+ ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
761
+ ? ' col-xl-3 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
762
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
763
+ ? ' col-xl-3 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
764
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
765
+ ? ' col-xl-3 p-0 col-lg-4 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
766
+ : ''
767
+ : sectionproperties.numberOfColsvertical == '6'
768
+ ? item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
769
+ ? ' col-xl-2 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
770
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
771
+ ? ' col-xl-2 col-lg-4 col-md-4 col-sm-6 d-flex justify-content-center p-0 '
772
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
773
+ ? ' col-xl-2 p-0 col-lg-2 col-md-12 col-sm-12 d-flex justify-content-center p-0 '
774
+ : ' col-xl-2 col-lg-4 col-md-6 col-sm-12 d-flex justify-content-center p-0 '
775
+ : ''
776
+ }
777
+ >
778
+ {/* {React.createElement(sectioncomp, {
779
+ sectionidprops: item.sectionid,
780
+ sectionindexprops: index,
781
+ cardinfoitemprops: cardinfoitem,
782
+ cardinfoindexprops: cardinfoindex,
783
+ fetchingtypeprops: fetchingtype,
784
+ })} */}
785
+ <Sectioncomp
786
+ sectiontypeprops={'horizontal'}
787
+ fetchingtypeprops={fetchingtype}
788
+ cardinfoindexprops={cardinfoindex}
789
+ cardinfoitemprops={cardinfoitem}
790
+ sectionindexprops={index}
791
+ sectionidprops={item.sectionid}
792
+ // {...props}
793
+ // StatePagePropertiesContext={StatePagePropertiesContext}
794
+ actions={actions}
795
+ />
796
+ </div>
797
+ );
798
+ })}
799
+ {fetchingtype == 'products' && (
800
+ <div className="w-100 col-lg-12 allcentered">
801
+ <button
802
+ className={section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center '}
803
+ // ref={ref}
804
+ onClick={() => fetchProductsQuery.fetchNextPage()}
805
+ disabled={!fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage}
806
+ >
807
+ {fetchProductsQuery.isFetchingNextPage ? (
808
+ <CircularProgress color="#000" width="20px" height="20px" duration="1s" />
809
+ ) : fetchProductsQuery.hasNextPage ? (
810
+ 'Load more'
811
+ ) : (
812
+ <CircularProgress color="#000" width="20px" height="20px" duration="1s" />
813
+ )}
814
+ </button>
815
+ </div>
816
+ )}
817
+ </div>
818
+ )}
819
+ </div>
820
+ );
821
+ }
822
+ }
823
+ })}
824
+ </div>
825
+ )}
826
+ </div>
827
+ );
828
+ };
829
+ return (
830
+ <div
831
+ className={
832
+ sectionproperties.card_marginLeft != 0 && sectionproperties.card_marginRight != 0
833
+ ? // mb-md-4
834
+ ' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 pr-md-2 '
835
+ : sectionproperties.card_marginRight != 0
836
+ ? ' row m-0 d-flex w-100 justify-content-center align-items-center pr-md-2 '
837
+ : sectionproperties.card_marginLeft != 0
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 '
840
+ }
841
+ style={{
842
+ zIndex: 2,
843
+ paddingLeft: langdetect == 'en' ? sectionproperties.card_marginLeft + 'px' : sectionproperties.card_marginRight + 'px',
844
+ paddingRight: langdetect == 'en' ? sectionproperties.card_marginRight + 'px' : sectionproperties.card_marginLeft + 'px',
845
+ }}
846
+ >
847
+ {sectionproperties.length != 0 && (
848
+ <div className={' row ml-0 mr-0 d-flex align-items-center justify-content-center w-md-100 h-md-100 w-100 '}>
849
+ {sectionproperties.showFilter == 'show' && (
850
+ <div className={sectionproperties.filterdirection == 'Horizontal' ? ' col-lg-12 ' : 'col-lg-3'}>
851
+ <Filter sectionpropertiesprops={sectionproperties} actions={actions} />
852
+ </div>
853
+ )}
854
+ {fetchingtype == 'custom' && <>{cardsrender()}</>}
855
+ {fetchingtype != 'custom' && cardsrender()}
856
+ </div>
857
+ )}
858
+ </div>
859
+ );
860
+ };
861
+ export default CardsSection;