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