tabexseriescomponents 0.0.63 → 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 +6859 -6478
  2. package/dist/index.esm.js +6862 -6481
  3. package/dist/index.umd.js +6862 -6482
  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,552 @@
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';
7
+ import { IKImage } from 'imagekitio-react';
8
+
9
+ import { css } from 'glamor';
10
+ import { ProductsCardsSectionContext } from '../../../../../../../../Contexts/ProductsCardsSectionContext';
11
+ import { useQuery, useQueryClient, useMutation, useInfiniteQuery } from 'react-query';
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';
16
+ import axios from 'axios';
17
+ import { BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
18
+ import generalstyles from '../../../../../../../../styles/general/general.module.css';
19
+ import Horizontalcard from '../../../Cards/Horizontalcard/Horizontalcard';
20
+ const Sixverticalcardssection = (props) => {
21
+ const { ref, inView } = useInView();
22
+ const { lang, langdetect } = useContext(LanguageContext);
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);
29
+ const [sectionproperties, setsectionproperties] = useState('');
30
+ const [cardsarray, setcardsarray] = useState([]);
31
+ const [fetchingtype, setfetchingtype] = useState('');
32
+ const [searchinput, setsearchinput] = useState('');
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
+ });
79
+ React.useEffect(() => {
80
+ if (inView) {
81
+ fetchProductsQuery.fetchNextPage();
82
+ }
83
+ }, [inView]);
84
+ const [ProductsFetchingTypeSectionObj, setProductsFetchingTypeSectionObj] = useState({ productfetchingtype: 'Random', collectionid: '' });
85
+ useEffect(() => {
86
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
87
+ if (sectionitem.sectionid == props.sectionidprops) {
88
+ var secpropobj = {};
89
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
90
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
91
+ });
92
+ setsectionproperties({ ...secpropobj });
93
+
94
+ if (props.srcfromprops == 'GeneralProductsComponent') {
95
+ setfetchingtype('products');
96
+ setProductsFetchingTypeSectionObj({
97
+ productfetchingtype: 'Random',
98
+ collectionid: props.collectionidprops,
99
+ });
100
+ } else {
101
+ setfetchingtype(sectionitem.fetchingtype);
102
+ setProductsFetchingTypeSectionObj({
103
+ productfetchingtype: sectionitem.productsfetchingtype,
104
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
105
+ });
106
+ }
107
+ }
108
+ });
109
+ }, [StatePagePropertiesContext]);
110
+ useEffect(() => {
111
+ SearchHeaderMutationContext.reset();
112
+ const delayDebounceFn = setTimeout(() => {
113
+ if (searchinput.length != 0) {
114
+ SearchHeaderMutationContext.mutate({
115
+ SearchHeaderValue: searchinput,
116
+ });
117
+ }
118
+ }, 1000);
119
+
120
+ return () => clearTimeout(delayDebounceFn);
121
+ }, [searchinput]);
122
+ useEffect(() => {
123
+ if (sectionproperties.length != 0) {
124
+ if (cardsarray.length == 0) {
125
+ if (fetchingtype == 'collections') {
126
+ if (fetchcollectionsQueryContext.isSuccess) {
127
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
128
+ }
129
+ } else if (fetchingtype == 'products') {
130
+ if (fetchProductsQuery.isSuccess) {
131
+ var allpagesarr = [];
132
+ fetchProductsQuery.data.pages.forEach((page) => {
133
+ page.data.products.forEach((productobj) => {
134
+ allpagesarr.push(productobj);
135
+ });
136
+ });
137
+ cardobjassigner(allpagesarr);
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }, [sectionproperties]);
143
+ useEffect(() => {
144
+ if (fetchingtype.length != 0) {
145
+ var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
146
+
147
+ if (fetchingtype == 'collections') {
148
+ tempFetchQueriesEngineContext.collections = true;
149
+ }
150
+ if (fetchingtype == 'products') {
151
+ var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
152
+ tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
153
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
154
+
155
+ setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
156
+ }
157
+
158
+ setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
159
+ }
160
+ }, [fetchingtype, ProductsFetchingTypeSectionObj]);
161
+ useEffect(() => {
162
+ if (fetchingtype == 'products') {
163
+ if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
164
+ var allpagesarr = [];
165
+ fetchProductsQuery.data.pages.forEach((page) => {
166
+ page.data.products.forEach((productobj) => {
167
+ allpagesarr.push(productobj);
168
+ });
169
+ });
170
+ cardobjassigner(allpagesarr);
171
+ }
172
+ }
173
+ }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
174
+ useEffect(() => {
175
+ if (fetchingtype == 'collections') {
176
+ if (fetchcollectionsQueryContext.isSuccess) {
177
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
178
+ }
179
+ }
180
+ }, [fetchcollectionsQueryContext.isSuccess]);
181
+ useEffect(() => {
182
+ favassigner();
183
+ }, [favoriteprojectscountContext]);
184
+ const favassigner = () => {
185
+ if (fetchingtype == 'products') {
186
+ if (cardsarray.length != 0) {
187
+ if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
188
+ var tempcardsarray = [...cardsarray];
189
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
190
+ arrayItem.IsFavExists = false;
191
+ });
192
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
193
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
194
+ if (arrayItem.productid == favitem) {
195
+ arrayItem.IsFavExists = true;
196
+ }
197
+ });
198
+ });
199
+ setcardsarray([...tempcardsarray]);
200
+ }
201
+ }
202
+ }
203
+ };
204
+ const cardobjassigner = (fetchedarray) => {
205
+ var temparray = [];
206
+ fetchedarray.forEach(function (arrayItem, arrayindex) {
207
+ var cardobj = {
208
+ name: '',
209
+ image: '',
210
+ };
211
+ if (fetchingtype == 'products') {
212
+ var itemquantity = 0;
213
+ if (langdetect == 'en') {
214
+ cardobj.name = arrayItem.productinfo.name_en;
215
+ } else {
216
+ cardobj.name = arrayItem.productinfo.name_ar;
217
+ }
218
+ if (langdetect == 'en') {
219
+ cardobj.description = arrayItem.productinfo.description_en;
220
+ } else {
221
+ cardobj.description = arrayItem.productinfo.description_ar;
222
+ }
223
+ if (arrayItem.productinfo.hasvariants == 0) {
224
+ fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
225
+ if (cartitem.productid == arrayItem.productinfo.productid) {
226
+ itemquantity = cartitem.quantity;
227
+ }
228
+ });
229
+ }
230
+ cardobj.image = arrayItem.productinfo.productmainimage;
231
+ cardobj.hassale = arrayItem.productinfo.hassale;
232
+ cardobj.productid = arrayItem.productinfo.productid;
233
+ cardobj.hasvariants = arrayItem.productinfo.hasvariants;
234
+ cardobj.description_en = arrayItem.productinfo.description_en;
235
+ cardobj.description_ar = arrayItem.productinfo.description_ar;
236
+ cardobj.defaultprice = arrayItem.productinfo.defaultprice;
237
+ cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
238
+ cardobj.productimages = arrayItem.productinfo.productimages;
239
+ cardobj.quantity = itemquantity;
240
+ cardobj.timestamp = arrayItem.productinfo.timestamp;
241
+
242
+ if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
243
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
244
+ if (arrayItem.productinfo.productid == favitem) {
245
+ cardobj.IsFavExists = true;
246
+ }
247
+ });
248
+ }
249
+ } else if (fetchingtype == 'collections') {
250
+ cardobj.collectionid = arrayItem.collectionid;
251
+ if (langdetect == 'en') {
252
+ cardobj.name = arrayItem.title_en;
253
+ } else if (langdetect == 'ar') {
254
+ cardobj.name = arrayItem.title_ar;
255
+ }
256
+ cardobj.image = arrayItem.collectionlogo;
257
+ } else if (fetchingtype == 'custom') {
258
+ }
259
+ temparray.push(cardobj);
260
+ });
261
+
262
+ setcardsarray([...temparray]);
263
+ };
264
+ const [bgimagearrayofobjs, setbgimagearrayofobjs] = useState([]);
265
+ useEffect(() => {
266
+ if (sectionproperties.length != 0) {
267
+ if (sectionproperties.bgsection_imagearrayofobjs != null) {
268
+ var bgsection_imagearrayofobjsparsed = JSON.parse(sectionproperties.bgsection_imagearrayofobjs);
269
+ if (Array.isArray(bgsection_imagearrayofobjsparsed)) {
270
+ setbgimagearrayofobjs([...bgsection_imagearrayofobjsparsed]);
271
+ }
272
+ }
273
+ }
274
+ }, [sectionproperties]);
275
+ const section_cssstyles = {
276
+ sectiontitlespan: css({
277
+ ':after': {
278
+ width: sectionproperties.sectitle_lineafterwidth + '%',
279
+ backgroundColor: sectionproperties.linebgcolor,
280
+ },
281
+ }),
282
+ cardcontainer: css({
283
+ marginTop: sectionproperties.marginTop + 'px',
284
+ marginBottom: sectionproperties.marginBottom + 'px',
285
+ paddingLeft: sectionproperties.paddingLeft + 'px',
286
+ paddingRight: sectionproperties.paddingRight + 'px',
287
+ paddingTop: sectionproperties.paddingTop + 'px',
288
+ paddingBottom: sectionproperties.paddingBottom + 'px',
289
+ background: sectionproperties.backgroundColor,
290
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
291
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
292
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
293
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
294
+ border: sectionproperties.sectioncardborderwidth + 'px solid ' + sectionproperties.sectioncardbordercolor,
295
+ }),
296
+ sectiontitlespan: css({
297
+ ':after': {
298
+ height: '5px',
299
+ width: sectionproperties.sectitle_lineafterwidth + '%',
300
+ backgroundColor: sectionproperties.linebgcolor,
301
+ },
302
+ }),
303
+ line_left: css({
304
+ height: '1px',
305
+ position: 'relative',
306
+ flex: '1 1 auto',
307
+ minWidth: '10%',
308
+ background: sectionproperties.linebgcolor,
309
+ }),
310
+ line_right: css({
311
+ height: '1px',
312
+ position: 'relative',
313
+ flex: '1 1 auto',
314
+ minWidth: '10%',
315
+ background: sectionproperties.linebgcolor,
316
+ }),
317
+ filterbtn: css({
318
+ width: sectionproperties.filterbtn_Width + 'px',
319
+ height: sectionproperties.filterbtn_Height + 'px',
320
+ background: sectionproperties.filterbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.filterbtn_bgColor,
321
+ borderBottomLeftRadius: sectionproperties.filterbtn_borderBottomLeftRadius + 'px',
322
+ borderBottomRightRadius: sectionproperties.filterbtn_borderBottomRightRadius + 'px',
323
+ borderTopLeftRadius: sectionproperties.filterbtn_borderTopLeftRadius + 'px',
324
+ borderTopRightRadius: sectionproperties.filterbtn_borderTopRightRadius + 'px',
325
+ color: sectionproperties.filterbtn_Textcolor,
326
+ boxShadow: sectionproperties.filterbtn_showshadow == 'Show' ? '0 0 10px ' + sectionproperties.filterbtn_shadowcolor : '',
327
+ marginTop: sectionproperties.filterbtn_marginTop + 'px',
328
+ marginBottom: sectionproperties.filterbtn_marginBottom + 'px',
329
+ marginLeft: sectionproperties.filterbtn_marginLeft + 'px',
330
+ marginRight: sectionproperties.filterbtn_marginRight + 'px',
331
+ transition: '.3s',
332
+ ':hover': {
333
+ background: sectionproperties.filterbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.filterbtn_bgColoronhover,
334
+ color: sectionproperties.filterbtn_Textcoloronhover,
335
+ },
336
+ }),
337
+ viewmorebtn: css({
338
+ width: sectionproperties.viewmorebtn_Width + 'px',
339
+ height: sectionproperties.viewmorebtn_Height + 'px',
340
+ background: sectionproperties.viewmorebtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.viewmorebtn_bgColor,
341
+ borderBottomLeftRadius: sectionproperties.viewmorebtn_borderBottomLeftRadius + 'px',
342
+ borderBottomRightRadius: sectionproperties.viewmorebtn_borderBottomRightRadius + 'px',
343
+ borderTopLeftRadius: sectionproperties.viewmorebtn_borderTopLeftRadius + 'px',
344
+ borderTopRightRadius: sectionproperties.viewmorebtn_borderTopRightRadius + 'px',
345
+ color: sectionproperties.viewmorebtn_Textcolor,
346
+ fontSize: sectionproperties.viewmorebtn_fontSize + 'px',
347
+ fontWeight: sectionproperties.viewmorebtn_fontWeight,
348
+ textDecoration: sectionproperties.viewmorebtn_bgtransparent == 'Transparent' ? 'underline' : 'none',
349
+ transition: '.3s',
350
+ ':hover': {
351
+ background: sectionproperties.viewmorebtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.viewmorebtn_bgColoronhover,
352
+ color: sectionproperties.viewmorebtn_Textcoloronhover,
353
+ },
354
+ }),
355
+ };
356
+ const ImageSection = () => {
357
+ return (
358
+ <div
359
+ className="mt-sm-3 mb-sm-3"
360
+ style={{
361
+ width: '100%',
362
+ height: '100%',
363
+ borderTopLeftRadius: sectionproperties.image_bordertopleftradius + 'px',
364
+ borderTopRightRadius: sectionproperties.image_bordertoprightradius + 'px',
365
+ borderBottomLeftRadius: sectionproperties.image_borderBottomLeftRadius + 'px',
366
+ borderBottomRightRadius: sectionproperties.image_borderBottomRightRadius + 'px',
367
+ }}
368
+ >
369
+ <IKImage
370
+ className="h-sm-auto"
371
+ path={bgimagearrayofobjs.length != 0 ? (langdetect == 'en' ? bgimagearrayofobjs[0]?.bgsection_image : bgimagearrayofobjs[0]?.bgsection_image_ar) : ''}
372
+ style={{
373
+ width: '100%',
374
+ height: '100%',
375
+ objectFit: 'cover',
376
+ margin: 0,
377
+ padding: 0,
378
+ borderTopLeftRadius: sectionproperties.image_bordertopleftradius + 'px',
379
+ borderTopRightRadius: sectionproperties.image_bordertoprightradius + 'px',
380
+ borderBottomLeftRadius: sectionproperties.image_borderBottomLeftRadius + 'px',
381
+ borderBottomRightRadius: sectionproperties.image_borderBottomRightRadius + 'px',
382
+ }}
383
+ />
384
+ </div>
385
+ );
386
+ };
387
+ const CardsSection = () => {
388
+ return (
389
+ <div className="row m-0 w-100">
390
+ <div className="col-lg-12 p-0">
391
+ <div
392
+ className="row ml-0 mr-0 w-100 pl-md-1 pr-md-1 pl-sm-2 pr-sm-2"
393
+ style={{
394
+ marginTop: sectionproperties.sectionTitleMarginTop + 'px',
395
+ marginBottom: sectionproperties.sectionTitleMarginBottom + 'px',
396
+ paddingLeft: sectionproperties.sectionTitleMarginLeft + 'px',
397
+ paddingRight: sectionproperties.sectionTitleMarginRight + 'px',
398
+ }}
399
+ >
400
+ {sectionproperties.sectiontitleshow == 'Show' && (
401
+ <div
402
+ className={
403
+ sectionproperties.viewmorebtnshow == 'Show'
404
+ ? ' col-lg-6 col-md-6 col-sm-6 d-flex align-items-center p-0 '
405
+ : ' col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0 '
406
+ }
407
+ >
408
+ <div
409
+ className={`${generalstyles.sectiontitlecont}` + ' col-lg-12 p-0 d-flex align-items-center mb-auto mt-sm-auto mb-sm-auto '}
410
+ style={{
411
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : 'start',
412
+ }}
413
+ >
414
+ <div
415
+ className="d-flex align-items-center flex-row"
416
+ style={{
417
+ position: 'relative',
418
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : '',
419
+ width: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '100%' : '',
420
+ }}
421
+ >
422
+ {sectionproperties.sectiontitlestyle == 'Line Before Text' && <span className={section_cssstyles.line_left + ' d-sm-none '}></span>}
423
+ <p
424
+ className={`${section_cssstyles.sectiontitlespan}` + ' mb-auto mb-0 pb-0 font-sm-18 font-md-20 wordbreak d-flex align-items-center justify-content-start '}
425
+ style={{
426
+ fontSize: sectionproperties.sectionTitleFontSize + 'px',
427
+ color: sectionproperties.sectionTitleColor,
428
+ fontWeight: sectionproperties.sectionTitleFontWeight,
429
+ paddingLeft: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '12px' : 0,
430
+ paddingRight: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '12px' : 0,
431
+ }}
432
+ >
433
+ {langdetect == 'en' ? sectionproperties.sectionTitleContent : sectionproperties.sectionTitleContent_ar}
434
+ </p>
435
+ {sectionproperties.sectiontitlestyle == 'Line Before Text' && <span className={section_cssstyles.line_right + ' d-sm-none '}></span>}
436
+ </div>
437
+ </div>
438
+ </div>
439
+ )}
440
+ <div className="col-lg-6 col-md-6 col-sm-6 d-flex justify-content-end justify-content-sm-center p-0">
441
+ <div className="row m-0 w-100 d-flex align-item-center justify-content-end ">
442
+ {sectionproperties.viewmorebtnshow == 'Show' && (
443
+ <div className={'pl-0 pr-0 d-flex justify-content-end justify-content-sm-center pl-1 pr-0'}>
444
+ <button
445
+ className={`${section_cssstyles.viewmorebtn}` + ' w-sm-auto btn-circle-resp m-sm-0 '}
446
+ onClick={() => {
447
+ if (fetchingtype == 'products') {
448
+ if (ProductsFetchingTypeSectionObj.productfetchingtype == 'Collection') {
449
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, ProductsFetchingTypeSectionObj.collectionid);
450
+ } else {
451
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
452
+ }
453
+ } else {
454
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
455
+ }
456
+ }}
457
+ >
458
+ <span className="d-md-none">{langdetect == 'en' ? sectionproperties.viewmorebtn_text : sectionproperties.viewmorebtn_text_ar}</span>
459
+ <span className="d-none d-md-flex align-items-center justify-content-center">
460
+ <i className="h-100 d-flex align-items-center justify-content-center">
461
+ {langdetect == 'en' ? <BsFillArrowRightCircleFill /> : <BsFillArrowLeftCircleFill />}
462
+ </i>
463
+ </span>
464
+ </button>
465
+ </div>
466
+ )}
467
+ </div>
468
+ </div>
469
+ {sectionproperties.showseparator == 'Show' && (
470
+ <div className="col-lg-12 p-0">
471
+ <hr className="mt-2 mb-2" style={{ borderColor: sectionproperties.upperseparatorbgcolor }} />
472
+ </div>
473
+ )}
474
+ </div>
475
+ {cardsarray.length != 0 &&
476
+ StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
477
+ if (item.tabexsectioninfo != null) {
478
+ if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
479
+ var sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
480
+ return (
481
+ <div className={' row m-0 w-100 d-flex '}>
482
+ {cardsarray.map((cardinfoitem, cardinfoindex) => {
483
+ if (cardinfoindex <= 5) {
484
+ return (
485
+ <div className={'col-xl-4 col-lg-4 col-md-6 col-sm-12 p-0 '}>
486
+ {React.createElement(sectioncomp, {
487
+ sectionidprops: item.sectionid,
488
+ sectionindexprops: index,
489
+ cardinfoitemprops: cardinfoitem,
490
+ cardinfoindexprops: cardinfoindex,
491
+ fetchingtypeprops: fetchingtype,
492
+ })}
493
+ </div>
494
+ );
495
+ }
496
+ })}
497
+ </div>
498
+ );
499
+ }
500
+ }
501
+ })}
502
+ </div>
503
+ </div>
504
+ );
505
+ };
506
+ const cardsrender = () => {
507
+ return (
508
+ <div className="col-lg-12 p-0">
509
+ <div className={section_cssstyles.cardcontainer + ' row ml-0 mr-0 w-100 align-items-center pl-md-2 pr-md-2 '}>
510
+ {sectionproperties.sectionstyle == 'Image on left' && (
511
+ <div className="col-lg-12 p-0 h-100">
512
+ <div className="row m-0 w-100 h-100 d-flex align-items-stretch">
513
+ <div className="col-lg-2 col-md-3 col-sm-12 d-flex align-items-stretch h-sm-auto hmin-sm-auto" style={{ minHeight: '25vh' }}>
514
+ {ImageSection()}
515
+ </div>
516
+ <div className="col-lg-10 col-md-9 col-sm-12 d-flex align-items-stretch">{CardsSection()}</div>
517
+ </div>
518
+ </div>
519
+ )}
520
+ {sectionproperties.sectionstyle == 'Image on right' && (
521
+ <div className="col-lg-12 p-0 h-100">
522
+ <div className="row m-0 w-100 h-100 d-flex align-items-stretch">
523
+ <div className="col-lg-2 col-md-3 col-sm-12 d-none d-sm-flex align-items-stretch h-sm-auto">{ImageSection()}</div>
524
+ <div className="col-lg-10 col-md-9 col-sm-12 d-flex align-items-stretch">{CardsSection()}</div>
525
+ <div className="col-lg-2 col-md-3 col-sm-12 d-flex d-sm-none align-items-stretch" style={{ minHeight: '25vh' }}>
526
+ {ImageSection()}
527
+ </div>
528
+ </div>
529
+ </div>
530
+ )}
531
+ </div>
532
+ </div>
533
+ );
534
+ };
535
+ return (
536
+ <div className="row m-0 d-flex w-100 justify-content-center" style={{ zIndex: 2 }}>
537
+ <div className="col-lg-12 p-0 ">
538
+ {sectionproperties.length != 0 && (
539
+ <div
540
+ className={
541
+ langdetect == 'en' ? ' row ml-0 mr-0 d-flex justify-content-center w-md-100 h-md-100 pr-md-0 ' : ' row ml-0 mr-0 d-flex justify-content-center w-md-100 h-md-100 pl-md-0 '
542
+ }
543
+ >
544
+ {fetchingtype == 'custom' && <>{cardsrender()}</>}
545
+ {fetchingtype != 'custom' && cardsrender()}
546
+ </div>
547
+ )}
548
+ </div>
549
+ </div>
550
+ );
551
+ };
552
+ export default Sixverticalcardssection;