tabexseriescomponents 0.0.64 → 0.0.66

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 (178) hide show
  1. package/dist/index.cjs.js +25023 -16634
  2. package/dist/index.esm.js +25033 -16645
  3. package/dist/index.umd.js +24824 -16437
  4. package/package.json +1 -1
  5. package/src1-10/Contexts/LanguageContext.jsx +347 -0
  6. package/src1-10/Contexts/ProductsCardsSectionContext.jsx +28 -0
  7. package/src1-10/StylesJS/Customstyles.js +235 -0
  8. package/src1-10/TabexComponents/Cards/CategoryCardwithhoveraction/CategoryCardwithhoveraction.jsx +205 -0
  9. package/src1-10/TabexComponents/Cards/Categorycard_fullimage/Categorycard_fullimage.jsx +239 -0
  10. package/src1-10/TabexComponents/Cards/Categorycard_slidebgscaled/Categorycard_slidebgscaled.jsx +198 -0
  11. package/src1-10/TabexComponents/Cards/Categorycard_with_trianglebg/Categorycard_with_trianglebg.jsx +169 -0
  12. package/src1-10/TabexComponents/Cards/Categorycard_with_twolinestransition/Categorycard_with_twolinestransition.jsx +180 -0
  13. package/src1-10/TabexComponents/Cards/Categorycard_withshapes/Categorycard_withshapes.jsx +162 -0
  14. package/src1-10/TabexComponents/Cards/Categorycard_withtext/Categorycard_withtext.jsx +184 -0
  15. package/src1-10/TabexComponents/Cards/Classiccategorycard/Classiccategorycard.jsx +149 -0
  16. package/src1-10/TabexComponents/Cards/Horizontalcard/Horizontalcard.jsx +271 -0
  17. package/src1-10/TabexComponents/Cards/MenuCard/MenuCard.jsx +546 -0
  18. package/src1-10/TabexComponents/Cards/ModernProductCard/ModernProductCard.jsx +474 -0
  19. package/src1-10/TabexComponents/Cards/Productcard6/Productcard6.jsx +290 -0
  20. package/src1-10/TabexComponents/Cards/Productcard7/Productcard7.jsx +278 -0
  21. package/src1-10/TabexComponents/Cards/Productcard_animatedbuttons/Productcard_animatedbuttons.jsx +293 -0
  22. package/src1-10/TabexComponents/Cards/Productcard_with_circularbg/Productcard_with_circularbg.jsx +278 -0
  23. package/src1-10/TabexComponents/Cards/Productcard_with_circularhover/Productcard_with_circularhover.jsx +312 -0
  24. package/src1-10/TabexComponents/Cards/Productcard_with_slideanimation/Productcard_with_slideanimation.jsx +279 -0
  25. package/src1-10/TabexComponents/Cards/Productcard_with_variants/Productcard_with_variants.jsx +293 -0
  26. package/src1-10/TabexComponents/Cards/Productcard_with_zoominonhover/Productcard_with_zoominonhover.jsx +456 -0
  27. package/src1-10/TabexComponents/Cards/Productcarddefault/Productcarddefault.jsx +272 -0
  28. package/src1-10/TabexComponents/Cards/Productccard_with_imageontopleft/Productccard_with_imageontopleft.jsx +286 -0
  29. package/src1-10/TabexComponents/Cards/Prouductcard_with_zoomhover/Prouductcard_with_zoomhover.jsx +127 -0
  30. package/src1-10/TabexComponents/Cards/Simplecategorycardwithtextbelow/Simplecategorycardwithtextbelow.jsx +126 -0
  31. package/src1-10/TabexComponents/Cards/Simpleproductcard/Simpleproductcard.jsx +292 -0
  32. package/src1-10/TabexComponents/Cards/StylishProductCard/StylishProductCard.jsx +281 -0
  33. package/src1-10/TabexComponents/Footer/Footer1/Footer1.jsx +418 -0
  34. package/src1-10/TabexComponents/Footer/Footer2/Footer2.jsx +381 -0
  35. package/src1-10/TabexComponents/Footer/Footer3/Footer3.jsx +316 -0
  36. package/src1-10/TabexComponents/Footer/Footer4/Footer4.jsx +437 -0
  37. package/src1-10/TabexComponents/Footer/Footer5/Footer5.jsx +488 -0
  38. package/src1-10/TabexComponents/Footer/Footer6/Footer6.jsx +286 -0
  39. package/src1-10/TabexComponents/Footer/Footer7/Footer7.jsx +370 -0
  40. package/src1-10/TabexComponents/Footer/Simplefooter/Simplefooter.jsx +231 -0
  41. package/src1-10/TabexComponents/Generalfiles/images/egyptflag.png +0 -0
  42. package/src1-10/TabexComponents/Generalfiles/images/noimage.png +0 -0
  43. package/src1-10/TabexComponents/Generalfiles/images/payment/cod.png +0 -0
  44. package/src1-10/TabexComponents/Generalfiles/images/payment/fawry.png +0 -0
  45. package/src1-10/TabexComponents/Generalfiles/images/payment/payment.png +0 -0
  46. package/src1-10/TabexComponents/Generalfiles/images/payment/paymob.png +0 -0
  47. package/src1-10/TabexComponents/Generalfiles/images/payment/paypal.png +0 -0
  48. package/src1-10/TabexComponents/Generalfiles/images/payment/visa.png +0 -0
  49. package/src1-10/TabexComponents/Generalfiles/images/shoppingcart.png +0 -0
  50. package/src1-10/TabexComponents/Generalfiles/images/tabexlogo.png +0 -0
  51. package/src1-10/TabexComponents/Generalfiles/images/unknownmaleuser.png +0 -0
  52. package/src1-10/TabexComponents/Generalfiles/images/usflag.png +0 -0
  53. package/src1-10/TabexComponents/Generalfiles/images/whatsapp.png +0 -0
  54. package/src1-10/TabexComponents/Headers/AllinoneHeader/AllinoneHeader.jsx +722 -0
  55. package/src1-10/TabexComponents/Headers/ClassicHeader/ClassicHeader.jsx +681 -0
  56. package/src1-10/TabexComponents/Headers/Header4/Header4.jsx +614 -0
  57. package/src1-10/TabexComponents/Headers/Header6/Header6.jsx +666 -0
  58. package/src1-10/TabexComponents/Headers/Header8/Header8.jsx +888 -0
  59. package/src1-10/TabexComponents/Headers/HeaderRestaurant/HeaderRestaurant.jsx +710 -0
  60. package/src1-10/TabexComponents/Headers/Header_threesectionslogocentered/Header_threesectionslogocentered.jsx +769 -0
  61. package/src1-10/TabexComponents/Headers/Headerresponsive/Headerresponsive.jsx +666 -0
  62. package/src1-10/TabexComponents/Headers/HeaderwithContactinfo/HeaderwithContactinfo.jsx +940 -0
  63. package/src1-10/TabexComponents/Headers/Modernheader/Modernheader.jsx +714 -0
  64. package/src1-10/TabexComponents/Headers/StylishHeader/StylishHeader.jsx +833 -0
  65. package/src1-10/TabexComponents/Headers/Subheader/Subheader.jsx +239 -0
  66. package/src1-10/TabexComponents/Sections/BackgroundImages/Backgroundimage1/Backgroundimage1.jsx +312 -0
  67. package/src1-10/TabexComponents/Sections/BackgroundImages/Backgroundimage_with_toppill/Backgroundimage_with_toppill.jsx +278 -0
  68. package/src1-10/TabexComponents/Sections/BackgroundImages/BackgroundimageandTextsection/BackgroundimageandTextsection.jsx +129 -0
  69. package/src1-10/TabexComponents/Sections/BackgroundImages/Section_with_rightbgcont/Section_with_rightbgcont.jsx +153 -0
  70. package/src1-10/TabexComponents/Sections/BackgroundImages/Threebgimages/Threebgimages.jsx +295 -0
  71. package/src1-10/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +409 -0
  72. package/src1-10/TabexComponents/Sections/Cards/CardsSection/CardsSection.jsx +793 -0
  73. package/src1-10/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.jsx +486 -0
  74. package/src1-10/TabexComponents/Sections/Cards/CardsSection7/CardsSection7.js +888 -0
  75. package/src1-10/TabexComponents/Sections/Cards/CardsSection8/CardsSection8.js +419 -0
  76. package/src1-10/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.jsx +512 -0
  77. package/src1-10/TabexComponents/Sections/Slideshow/AboutSection/AboutSection.jsx +281 -0
  78. package/src1-10/TabexComponents/Sections/Slideshow/Backgroundimage_with_topcircle/Backgroundimage_with_topcircle.jsx +166 -0
  79. package/src1-10/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx +152 -0
  80. package/src1-10/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +139 -0
  81. package/src1-10/TabexComponents/Sections/Slideshow/Image_with_rightwords/Image_with_rightwords.jsx +146 -0
  82. package/src1-10/TabexComponents/Sections/Slideshow/Servicesection/Servicesection.jsx +209 -0
  83. package/src1-10/TabexComponents/Sections/Slideshow/ServicesectionCenteredcards/ServicesectionCenteredcards.jsx +145 -0
  84. package/src1-10/TabexComponents/Sections/Slideshow/Slideshow_with_rotatedsquare/Slideshow_with_rotatedsquare.jsx +252 -0
  85. package/src1-10/TabexComponents/Sections/Slideshow/Slideshow_with_squarebg/Slideshow_with_squarebg.jsx +175 -0
  86. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowdifferentanimations/Slideshowdifferentanimations.jsx +154 -0
  87. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowfade/Slideshowfade.jsx +193 -0
  88. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +197 -0
  89. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowzoom/Arrow.js +91 -0
  90. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowzoom/Slideshowzoom.jsx +309 -0
  91. package/src1-10/TabexComponents/StaticPages/AccountInformation/AccountInformation.jsx +260 -0
  92. package/src1-10/TabexComponents/StaticPages/CartSlider/CartSlider.jsx +459 -0
  93. package/src1-10/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.jsx +216 -0
  94. package/src1-10/TabexComponents/StaticPages/Checkout/Checkout.jsx +1220 -0
  95. package/src1-10/TabexComponents/StaticPages/Filter/Filter.jsx +542 -0
  96. package/src1-10/TabexComponents/StaticPages/Login/FacebookLoginButton.jsx +51 -0
  97. package/src1-10/TabexComponents/StaticPages/Login/GoogleLoginButton.jsx +35 -0
  98. package/src1-10/TabexComponents/StaticPages/Login/Login.jsx +299 -0
  99. package/src1-10/TabexComponents/StaticPages/OrderSuccess/OrderSuccess.js +192 -0
  100. package/src1-10/TabexComponents/StaticPages/Ordershistory/Ordershistory.jsx +1271 -0
  101. package/src1-10/TabexComponents/StaticPages/Policies/Policies.jsx +353 -0
  102. package/src1-10/TabexComponents/StaticPages/Productinfo/Productinfo.jsx +1456 -0
  103. package/src1-10/TabexComponents/StaticPages/Searchlist/Searchlist.jsx +209 -0
  104. package/src1-10/TabexComponents/StaticPages/Signup/CustomerInformationForm.jsx +776 -0
  105. package/src1-10/TabexComponents/StaticPages/Signup/Signup.jsx +157 -0
  106. package/src1-10/TabexComponents/StaticPages/Staticpagesrouter/Staticpagesrouter.jsx +285 -0
  107. package/src1-10/TabexComponents/StaticPages/Viewcart/Viewcart.js +1090 -0
  108. package/src1-10/TabexComponents/StaticPages/Wishlist/Wishlist.jsx +606 -0
  109. package/src1-10/assets/images/cod.png +0 -0
  110. package/src1-10/assets/images/egyptflag.png +0 -0
  111. package/src1-10/assets/images/fawry.png +0 -0
  112. package/src1-10/assets/images/payment.png +0 -0
  113. package/src1-10/assets/images/paymob.png +0 -0
  114. package/src1-10/assets/images/paypal.png +0 -0
  115. package/src1-10/assets/images/shoppingcart.png +0 -0
  116. package/src1-10/assets/images/usflag.png +0 -0
  117. package/src1-10/assets/images/visa.png +0 -0
  118. package/src1-10/assets/images/whatsapp.png +0 -0
  119. package/src1-10/button.jsx +40 -0
  120. package/src1-10/index.jsx +179 -0
  121. package/src1-10/styles/Home.module.css +129 -0
  122. package/src1-10/styles/cards/Categorcycard_fullimage.module.css +10 -0
  123. package/src1-10/styles/cards/Categorycard_slidebgscaled.module.css +73 -0
  124. package/src1-10/styles/cards/Categorycard_withshapes.module.css +189 -0
  125. package/src1-10/styles/cards/Productcard6.module.css +9 -0
  126. package/src1-10/styles/cards/Productcard_with_circularbg.module.css +137 -0
  127. package/src1-10/styles/cards/Productccard_with_zoominonhover.module.css +51 -0
  128. package/src1-10/styles/cards/Prouductcard_with_zoomhover.module.css +61 -0
  129. package/src1-10/styles/cards/categorycard.module.css +102 -0
  130. package/src1-10/styles/cards/categorycard3.module.css +51 -0
  131. package/src1-10/styles/cards/categorycardwithtext.module.css +40 -0
  132. package/src1-10/styles/cards/productcard_animatedbuttons.module.css +104 -0
  133. package/src1-10/styles/cards/productcard_with_textonhover.module.css +12 -0
  134. package/src1-10/styles/cards/productccard_with_imageontopleft.module.css +85 -0
  135. package/src1-10/styles/general/bootstrap.css +4415 -0
  136. package/src1-10/styles/general/dropdown.css +199 -0
  137. package/src1-10/styles/general/editorbardropdown.module.css +94 -0
  138. package/src1-10/styles/general/filter.module.css +108 -0
  139. package/src1-10/styles/general/form.module.css +273 -0
  140. package/src1-10/styles/general/general.module.css +861 -0
  141. package/src1-10/styles/general/image-gallery.css +481 -0
  142. package/src1-10/styles/general/react-accessible-accordion.module.css +52 -0
  143. package/src1-10/styles/general/react-phone-input-2.module.css +927 -0
  144. package/src1-10/styles/general/scrollbtn.module.css +22 -0
  145. package/src1-10/styles/general/slick.module.css +166 -0
  146. package/src1-10/styles/general/tabs.module.css +110 -0
  147. package/src1-10/styles/general/workplaceeditor.module.css +328 -0
  148. package/src1-10/styles/globals.css +26 -0
  149. package/src1-10/styles/headers/Allinoneheader.module.css +91 -0
  150. package/src1-10/styles/headers/Header7.module.css +50 -0
  151. package/src1-10/styles/headers/Header_threesectionslogocentered.module.css +97 -0
  152. package/src1-10/styles/headers/Sideheader.module.css +108 -0
  153. package/src1-10/styles/headers/classicheaderstyles.module.css +16 -0
  154. package/src1-10/styles/headers/dropdown.css +0 -0
  155. package/src1-10/styles/headers/header4.module.css +175 -0
  156. package/src1-10/styles/headers/header5.module.css +30 -0
  157. package/src1-10/styles/headers/header6.module.css +117 -0
  158. package/src1-10/styles/headers/header_contactinfo.module.css +78 -0
  159. package/src1-10/styles/headers/headerresturant.module.css +89 -0
  160. package/src1-10/styles/headers/headerstyles.module.css +24 -0
  161. package/src1-10/styles/headers/modernheader.module.css +78 -0
  162. package/src1-10/styles/headers/subheader.module.css +114 -0
  163. package/src1-10/styles/sections/Backgroundimage1.module.css +17 -0
  164. package/src1-10/styles/sections/Backgroundimage_with_topcircle.module.css +28 -0
  165. package/src1-10/styles/sections/Section_with_rightbgcont.module.css +49 -0
  166. package/src1-10/styles/sections/Slideshow_with_rotatedsquare.module.css +35 -0
  167. package/src1-10/styles/sections/Slideshow_with_squarebg.module.css +39 -0
  168. package/src1-10/styles/staticpages/accordion.module.css +9 -0
  169. package/src1-10/styles/staticpages/cart.module.css +108 -0
  170. package/src1-10/styles/staticpages/dropdown.css +196 -0
  171. package/src1-10/styles/staticpages/filter.module.css +139 -0
  172. package/src1-10/styles/staticpages/login.module.css +146 -0
  173. package/src1-10/styles/staticpages/productinfo.module.css +54 -0
  174. package/src1-10/styles/staticpages/shop.module.css +191 -0
  175. package/src1-10/styles/staticpages/signup.module.css +206 -0
  176. package/src1-10/styles/staticpages/staticroutersidenav.module.css +129 -0
  177. package/src1-10/styles/staticpages/viewcart.module.css +129 -0
  178. package/src1-10/styles/staticpages/wishlist.module.css +29 -0
@@ -0,0 +1,486 @@
1
+ // All take sectionidprops & sectionindexprops
2
+ import React, { useEffect, useState, useContext } from 'react';
3
+ import { css } from 'glamor';
4
+ import { useInView } from 'react-intersection-observer';
5
+ import { MdOutlineLayersClear } from 'react-icons/md';
6
+ import { CircularProgress } from 'react-cssfx-loading';
7
+ import { ScrollMenu, VisibilityContext } from 'react-horizontal-scrolling-menu';
8
+ const CardsSection2 = (props) => {
9
+ const { ref, inView } = useInView();
10
+ const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
11
+ const lang = props.actions.lang;
12
+ const langdetect = props.actions.langdetect;
13
+ const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
14
+ const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
15
+ const ProductFilterObjContext = props.actions.ProductFilterObjContext;
16
+ const setProductFilterObjContext = props.actions.setProductFilterObjContext;
17
+ const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
18
+ const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
19
+ const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
20
+ const SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
21
+ const fetchProductsQuery = props.actions.fetchProductsQuery;
22
+ const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
23
+ const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
24
+ const setfetchingtype = props.actions.setfetchingtype;
25
+ const fetchingtype = props.actions.fetchingtype;
26
+ const AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
27
+ const setShowProductInfoModalContext = props.actions.setShowProductInfoModalContext;
28
+ const authdetailsContext = props.actions.authdetailsContext;
29
+ const productfiltercontext = props.actions.productfiltercontext;
30
+ const setproductfiltercontext = props.actions.setproductfiltercontext;
31
+ const actions = props.actions;
32
+ const [sectionproperties, setsectionproperties] = useState('');
33
+ const [cardsarray, setcardsarray] = useState([]);
34
+ const [searchinput, setsearchinput] = useState('');
35
+ React.useEffect(() => {
36
+ if (inView) {
37
+ fetchProductsQuery.fetchNextPage();
38
+ }
39
+ }, [inView]);
40
+ const [ProductsFetchingTypeSectionObj, setProductsFetchingTypeSectionObj] = useState({ productfetchingtype: 'Random', collectionid: '' });
41
+ useEffect(() => {
42
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
43
+ if (sectionitem.sectionid == props.sectionidprops) {
44
+ var secpropobj = {};
45
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
46
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
47
+ });
48
+ setsectionproperties({ ...secpropobj });
49
+
50
+ if (props.srcfromprops == 'GeneralProductsComponent') {
51
+ setfetchingtype('products');
52
+ setProductsFetchingTypeSectionObj({
53
+ productfetchingtype: 'Random',
54
+ collectionid: props.collectionidprops,
55
+ });
56
+ } else {
57
+ setfetchingtype(sectionitem.fetchingtype);
58
+ setProductsFetchingTypeSectionObj({
59
+ productfetchingtype: sectionitem.productsfetchingtype,
60
+ collectionid: sectionitem.productsfetchingtypeCollectioncollectionid,
61
+ });
62
+ }
63
+ }
64
+ });
65
+ }, [StatePagePropertiesContext]);
66
+ useEffect(() => {
67
+ SearchHeaderMutationContext.reset();
68
+ const delayDebounceFn = setTimeout(() => {
69
+ if (searchinput.length != 0) {
70
+ SearchHeaderMutationContext.mutate({
71
+ SearchHeaderValue: searchinput,
72
+ });
73
+ }
74
+ }, 1000);
75
+
76
+ return () => clearTimeout(delayDebounceFn);
77
+ }, [searchinput]);
78
+ useEffect(() => {
79
+ if (sectionproperties.length != 0) {
80
+ if (cardsarray.length == 0) {
81
+ if (fetchingtype == 'collections') {
82
+ if (fetchcollectionsQueryContext.isSuccess) {
83
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
84
+ }
85
+ } else if (fetchingtype == 'products') {
86
+ if (fetchProductsQuery.isSuccess) {
87
+ var allpagesarr = [];
88
+ fetchProductsQuery.data.pages.forEach((page) => {
89
+ page.data.products.forEach((productobj) => {
90
+ allpagesarr.push(productobj);
91
+ });
92
+ });
93
+ cardobjassigner(allpagesarr);
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }, [sectionproperties]);
99
+ useEffect(() => {
100
+ if (fetchingtype.length != 0) {
101
+ var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
102
+
103
+ if (fetchingtype == 'collections') {
104
+ // tempFetchQueriesEngineContext.collections = true;
105
+
106
+ if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
107
+ setParentCollectionsForCollectionQueryArr('all');
108
+ } else {
109
+ setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
110
+ }
111
+ }
112
+ if (fetchingtype == 'products') {
113
+ var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
114
+ tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
115
+ tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
116
+
117
+ setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
118
+ }
119
+
120
+ setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
121
+ }
122
+ }, [fetchingtype, ProductsFetchingTypeSectionObj]);
123
+ useEffect(() => {
124
+ if (fetchingtype == 'products') {
125
+ if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
126
+ var allpagesarr = [];
127
+ fetchProductsQuery.data.pages.forEach((page) => {
128
+ page.data.products.forEach((productobj) => {
129
+ allpagesarr.push(productobj);
130
+ });
131
+ });
132
+ cardobjassigner(allpagesarr);
133
+ }
134
+ }
135
+ }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
136
+ useEffect(() => {
137
+ if (fetchingtype == 'collections') {
138
+ if (fetchcollectionsQueryContext.isSuccess) {
139
+ cardobjassigner(fetchcollectionsQueryContext.data.data.collections);
140
+ }
141
+ }
142
+ }, [fetchcollectionsQueryContext.isSuccess]);
143
+ useEffect(() => {
144
+ favassigner();
145
+ }, [favoriteprojectscountContext]);
146
+ const favassigner = () => {
147
+ if (fetchingtype == 'products') {
148
+ if (cardsarray.length != 0) {
149
+ if (favoriteprojectscountContext != undefined && Array.isArray(favoriteprojectscountContext)) {
150
+ var tempcardsarray = [...cardsarray];
151
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
152
+ arrayItem.IsFavExists = false;
153
+ });
154
+ tempcardsarray.forEach(function (arrayItem, arrayindex) {
155
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
156
+ if (arrayItem.productid == favitem) {
157
+ arrayItem.IsFavExists = true;
158
+ }
159
+ });
160
+ });
161
+ setcardsarray([...tempcardsarray]);
162
+ }
163
+ }
164
+ }
165
+ };
166
+ const cardobjassigner = (fetchedarray) => {
167
+ var temparray = [];
168
+ fetchedarray.forEach(function (arrayItem, arrayindex) {
169
+ var cardobj = {
170
+ name: '',
171
+ image: '',
172
+ };
173
+ if (fetchingtype == 'products') {
174
+ var itemquantity = 0;
175
+ if (langdetect == 'en') {
176
+ cardobj.name = arrayItem.productinfo.name_en;
177
+ } else {
178
+ cardobj.name = arrayItem.productinfo.name_ar;
179
+ }
180
+ if (langdetect == 'en') {
181
+ cardobj.description = arrayItem.productinfo.description_en;
182
+ } else {
183
+ cardobj.description = arrayItem.productinfo.description_ar;
184
+ }
185
+ if (arrayItem.productinfo.hasvariants == 0) {
186
+ fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
187
+ if (cartitem.productid == arrayItem.productinfo.productid) {
188
+ itemquantity = cartitem.quantity;
189
+ }
190
+ });
191
+ }
192
+ cardobj.image = arrayItem.productinfo.productmainimage;
193
+ cardobj.hassale = arrayItem.productinfo.hassale;
194
+ cardobj.productid = arrayItem.productinfo.productid;
195
+ cardobj.hasvariants = arrayItem.productinfo.hasvariants;
196
+ cardobj.description_en = arrayItem.productinfo.description_en;
197
+ cardobj.description_ar = arrayItem.productinfo.description_ar;
198
+ cardobj.defaultprice = arrayItem.productinfo.defaultprice;
199
+ cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
200
+ cardobj.productimages = arrayItem.productinfo.productimages;
201
+ cardobj.quantity = itemquantity;
202
+ cardobj.timestamp = arrayItem.productinfo.timestamp;
203
+
204
+ if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
205
+ favoriteprojectscountContext.forEach(function (favitem, favindex) {
206
+ if (arrayItem.productinfo.productid == favitem) {
207
+ cardobj.IsFavExists = true;
208
+ }
209
+ });
210
+ }
211
+ } else if (fetchingtype == 'collections') {
212
+ cardobj.collectionid = arrayItem.collectionid;
213
+ if (langdetect == 'en') {
214
+ cardobj.name = arrayItem.title_en;
215
+ cardobj.description = arrayItem.description_en;
216
+ } else if (langdetect == 'ar') {
217
+ cardobj.name = arrayItem.title_ar;
218
+ cardobj.description = arrayItem.description_ar;
219
+ }
220
+ cardobj.image = arrayItem.collectionlogo;
221
+ } else if (fetchingtype == 'custom') {
222
+ }
223
+ temparray.push(cardobj);
224
+ });
225
+
226
+ setcardsarray([...temparray]);
227
+ };
228
+ const section_cssstyles = {
229
+ sectiontitlespan: css({
230
+ ':after': {
231
+ width: sectionproperties.sectitle_lineafterwidth + '%',
232
+ backgroundColor: sectionproperties.linebgcolor,
233
+ },
234
+ }),
235
+ cards_sections: css({
236
+ width: sectionproperties.width + 'vw',
237
+ marginTop: sectionproperties.marginTop + 'px',
238
+ marginBottom: sectionproperties.marginBottom + 'px',
239
+ paddingLeft: sectionproperties.paddingLeft + 'px',
240
+ paddingRight: sectionproperties.paddingRight + 'px',
241
+ paddingTop: sectionproperties.paddingTop + 'px',
242
+ paddingBottom: sectionproperties.paddingBottom + 'px',
243
+ background: sectionproperties.backgroundColor,
244
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
245
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
246
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
247
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
248
+ boxShadow: sectionproperties.sectioncardshadow == 'Show' ? '0 0 10px ' + sectionproperties.sectioncardshadowcolor : 'none',
249
+ borderColor: sectionproperties.sectioncardbordercolor,
250
+ border: sectionproperties.sectioncardborderwidth + 'px solid',
251
+ }),
252
+ loadbtn: css({
253
+ width: sectionproperties.loadbtn_Width + 'px',
254
+ height: sectionproperties.loadbtn_Height + 'px',
255
+ background: sectionproperties.loadbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.loadbtn_bgColor,
256
+ borderBottomLeftRadius: sectionproperties.loadbtn_borderBottomLeftRadius + 'px',
257
+ borderBottomRightRadius: sectionproperties.loadbtn_borderBottomRightRadius + 'px',
258
+ borderTopLeftRadius: sectionproperties.loadbtn_borderTopLeftRadius + 'px',
259
+ borderTopRightRadius: sectionproperties.loadbtn_borderTopRightRadius + 'px',
260
+ color: sectionproperties.loadbtn_Textcolor,
261
+ boxShadow: sectionproperties.loadbtn_showshadow == 'Show' ? '0 0 10px ' + sectionproperties.loadbtn_shadowcolor : '',
262
+ transition: '.3s',
263
+ ':hover': {
264
+ background: sectionproperties.loadbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.loadbtn_bgColoronhover,
265
+ color: sectionproperties.loadbtn_Textcoloronhover,
266
+ },
267
+ }),
268
+ scrollmenuclassnameitemSimpleproductcard: css({
269
+ minWidth: sectionproperties.card_widthhorizontal + 'px',
270
+ maxWidth: sectionproperties.card_widthhorizontal + 'px',
271
+ }),
272
+ };
273
+ const cardsrender = () => {
274
+ return (
275
+ <div
276
+ className="row m-0 w-100"
277
+ style={{
278
+ height: '100%',
279
+ }}
280
+ >
281
+ <div className="col-lg-12 p-0">
282
+ {sectionproperties.length != 0 && (
283
+ <div className="row m-0 w-100 d-flex align-items-center" style={{ position: 'relative' }}>
284
+ <p
285
+ className="m-0 p-0 d-block d-md-none"
286
+ style={{
287
+ position: 'absolute',
288
+ top: langdetect == 'en' ? sectionproperties.slideshowText1Content_marginTop + 'px' : '',
289
+ left: langdetect == 'en' ? sectionproperties.slideshowText1Content_marginLeft + 'px' : '-' + sectionproperties.slideshowText1Content_marginLeft + 'px',
290
+ textTransform: sectionproperties.slideshowText1ContentTextTransform,
291
+ color: sectionproperties.slideshowText1ContentColor,
292
+ fontSize: sectionproperties.slideshowText1ContentFontSize + 'px',
293
+ fontWeight: sectionproperties.slideshowText1ContentFontWeight,
294
+ letterSpacing: langdetect == 'en' ? '5px' : 0,
295
+ opacity: 0.7,
296
+ transform: langdetect == 'en' ? 'rotate(-90deg)' : 'rotate(90deg)',
297
+ }}
298
+ >
299
+ {langdetect == 'en' ? sectionproperties.slideshowText1Content : sectionproperties.slideshowText1Content_ar}
300
+ </p>
301
+ <div className={langdetect == 'en' ? 'col-lg-10 col-md-12 d-flex justify-content-center ml-auto p-0' : 'col-lg-10 col-md-12 d-flex justify-content-center mr-auto p-0'}>
302
+ <div className="row m-0 w-100">
303
+ <div className="col-lg-12 d-flex justify-content-center">
304
+ <p
305
+ className="m-0 p-0 d-none d-md-flex"
306
+ style={{
307
+ textTransform: sectionproperties.slideshowText1ContentTextTransform,
308
+ color: sectionproperties.slideshowText1ContentColor,
309
+ fontSize: '25px',
310
+ fontWeight: sectionproperties.slideshowText1ContentFontWeight,
311
+ letterSpacing: langdetect == 'en' ? '5px' : 0,
312
+ opacity: 0.7,
313
+ }}
314
+ >
315
+ {sectionproperties.slideshowText1Content}
316
+ </p>
317
+ </div>
318
+ <div className="col-lg-12 d-flex align-items-center justify-content-center" style={{ marginBottom: sectionproperties.slideshowText2Content_marginBottom + 'px' }}>
319
+ <p
320
+ className="font-md-23"
321
+ style={{
322
+ fontSize: sectionproperties.slideshowText2ContentFontSize + 'px',
323
+ color: sectionproperties.slideshowText2ContentColor,
324
+ fontWeight: sectionproperties.slideshowText2ContentFontWeight,
325
+ textTransform: sectionproperties.slideshowText2ContentTextTransform,
326
+ }}
327
+ >
328
+ {langdetect == 'en' ? sectionproperties.slideshowText2Content : sectionproperties.slideshowText2Content_Ar}
329
+ </p>
330
+ </div>
331
+ {!fetchProductsQuery.isFetching && cardsarray.length == 0 && (
332
+ <div className="row m-0 w-100 d-flex align-items-center" style={{ height: '50vh' }}>
333
+ <div className="col-lg-12 text-light d-flex align-items-center justify-content-center flex-column">
334
+ <MdOutlineLayersClear
335
+ style={{
336
+ fontSize: sectionproperties.noprod_iconfontSize + 'px',
337
+ color: sectionproperties.noprod_iconcolor,
338
+ }}
339
+ />
340
+ <p
341
+ style={{
342
+ fontSize: sectionproperties.noprod_fontSize + 'px',
343
+ fontWeight: sectionproperties.noprod_fontWeight,
344
+ textTransform: sectionproperties.noprod_textTransform,
345
+ color: sectionproperties.noprod_color,
346
+ }}
347
+ >
348
+ No Products Found
349
+ </p>
350
+ </div>
351
+ </div>
352
+ )}
353
+ {cardsarray.length != 0 &&
354
+ StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
355
+ if (item.tabexsectioninfo != null) {
356
+ if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
357
+ var Sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
358
+ return (
359
+ <div className="row m-0 w-100 d-flex justify-content-center">
360
+ <div className={langdetect == 'en' ? 'col-lg-12 p-0 pl-md-2 pr-md-0' : 'col-lg-12 p-0 pl-md-0 pr-md-2 '}>
361
+ <ScrollMenu
362
+ transitionBehavior={'auto'}
363
+ wrapperClassName={''}
364
+ itemClassName={
365
+ item.tabexsectioninfo.sectioncompname == 'Productcard6'
366
+ ? 'scrollmenuclassnameitemProductcard6'
367
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
368
+ ? 'scrollmenuclassnameitemProductcard_with_circularhover'
369
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularbg'
370
+ ? 'scrollmenuclassnameitemProductcard_with_circularbg'
371
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_twolinestransition'
372
+ ? 'scrollmenuclassnameitemCategorycard_with_twolinestransition'
373
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_slideanimation'
374
+ ? 'scrollmenuclassnameitemProductcard_with_slideanimation'
375
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_withtext'
376
+ ? 'scrollmenuclassnameitemCategorycard_withtext'
377
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_animatedbuttons'
378
+ ? 'scrollmenuclassnameitemProductcard_animatedbuttons'
379
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_variants'
380
+ ? 'scrollmenuclassnameitemProductcard_with_variants'
381
+ : item.tabexsectioninfo.sectioncompname == 'Productcarddefault'
382
+ ? 'scrollmenuclassnameitemProductcarddefault'
383
+ : item.tabexsectioninfo.sectioncompname == 'Simpleproductcard'
384
+ ? 'scrollmenuclassnameitemSimpleproductcard'
385
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_trianglebg'
386
+ ? 'scrollmenuclassnameitemCategorycard_with_trianglebg'
387
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_textonhover'
388
+ ? 'scrollmenuclassnameitemProductcard_with_textonhover'
389
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_slidebgscaled'
390
+ ? 'scrollmenuclassnameitemCategorycard_slidebgscaled'
391
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
392
+ ? 'scrollmenuclassnameitemProductccard_with_imageontopleft'
393
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_zoominonhover'
394
+ ? 'scrollmenuclassnameitemProductcard_with_zoominonhover'
395
+ : item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
396
+ ? 'scrollmenuclassnameitemProductcard_Horizontalcard'
397
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_fullimage'
398
+ ? 'scrollmenuclassnameitemCategorycard_fullimage'
399
+ : item.tabexsectioninfo.sectioncompname == 'Classiccategorycard'
400
+ ? 'scrollmenuclassnameitemClassiccategorycard'
401
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
402
+ ? 'scrollmenuclassnameitemModernProductCard'
403
+ : item.tabexsectioninfo.sectioncompname == 'Simplecategorycardwithtextbelow'
404
+ ? 'scrollmenuclassnameitemSimplecategorycardwithtextbelow'
405
+ : item.tabexsectioninfo.sectioncompname == 'Productcard7'
406
+ ? 'scrollmenuclassnameitemProductcard7'
407
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
408
+ ? 'scrollmenuclassnameitemMenuCard'
409
+ : 'scrollmenuclassnameitem'
410
+ }
411
+ scrollContainerClassName={'scrollmenuclasssubscrollbar'}
412
+ >
413
+ {cardsarray.map((cardinfoitem, cardinfoindex) => {
414
+ return (
415
+ <div
416
+ className={' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 '}
417
+ style={{
418
+ paddingRight: sectionproperties.card_marginRight + 'px',
419
+ paddingLeft: sectionproperties.card_marginLeft + 'px',
420
+ }}
421
+ >
422
+ <Sectioncomp
423
+ sectiontypeprops={'horizontal'}
424
+ fetchingtypeprops={fetchingtype}
425
+ cardinfoindexprops={cardinfoindex}
426
+ cardinfoitemprops={cardinfoitem}
427
+ sectionindexprops={index}
428
+ sectionidprops={item.sectionid}
429
+ // {...props}
430
+ // StatePagePropertiesContext={StatePagePropertiesContext}
431
+ actions={actions}
432
+ />
433
+ </div>
434
+ );
435
+ })}
436
+ {fetchingtype == 'products' && (
437
+ <button
438
+ className={section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center '}
439
+ // ref={ref}
440
+ onClick={() => fetchProductsQuery.fetchNextPage()}
441
+ disabled={!fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage}
442
+ >
443
+ {fetchProductsQuery.isFetchingNextPage ? (
444
+ <CircularProgress color={sectionproperties.loadbtn_Textcolor} width="20px" height="20px" duration="1s" />
445
+ ) : fetchProductsQuery.hasNextPage ? (
446
+ <i className="fa fa-spinner"></i>
447
+ ) : (
448
+ <i className="fa fa-spinner"></i>
449
+ )}
450
+ </button>
451
+ )}
452
+ </ScrollMenu>
453
+ </div>
454
+ </div>
455
+ );
456
+ }
457
+ }
458
+ })}
459
+ </div>
460
+ </div>
461
+ </div>
462
+ )}
463
+ </div>
464
+ </div>
465
+ );
466
+ };
467
+ return (
468
+ <div className="row m-0 d-flex w-100 justify-content-center mb-md-4 " style={{ zIndex: 2 }}>
469
+ <div className="col-lg-12 p-0 d-flex justify-content-center">
470
+ {sectionproperties.length != 0 && (
471
+ <div
472
+ className={
473
+ langdetect == 'en'
474
+ ? section_cssstyles.cards_sections + ' row ml-0 mr-0 d-flex justify-content-center w-md-100 h-md-100 pr-md-0 '
475
+ : section_cssstyles.cards_sections + ' row ml-0 mr-0 d-flex justify-content-center w-md-100 h-md-100 pl-md-0 '
476
+ }
477
+ >
478
+ {fetchingtype == 'custom' && <>{cardsrender()}</>}
479
+ {fetchingtype != 'custom' && cardsrender()}
480
+ </div>
481
+ )}
482
+ </div>
483
+ </div>
484
+ );
485
+ };
486
+ export default CardsSection2;