tabexseriescomponents 0.0.80 → 0.0.82

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