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,542 @@
1
+ import React, { useEffect, useState, useContext } from 'react';
2
+ import { Accordion, AccordionItem, AccordionItemHeading, AccordionItemButton, AccordionItemPanel, AccordionItemState } from 'react-accessible-accordion';
3
+ import filterstyles from '../../../styles/staticpages/filter.module.css';
4
+ import { IoMdClose } from 'react-icons/io';
5
+ import { HiOutlinePlus } from 'react-icons/hi';
6
+ import { AiOutlineMinus } from 'react-icons/ai';
7
+ import { css } from 'glamor';
8
+ import Dropdown from 'react-bootstrap/Dropdown';
9
+ const Filter = (props) => {
10
+ const lang = props.actions.lang;
11
+ const langdetect = props.actions.langdetect;
12
+ const productfiltercontext = props.actions.productfiltercontext;
13
+ const setproductfiltercontext = props.actions.setproductfiltercontext;
14
+ const ProductFilterObjContext = props.actions.ProductFilterObjContext;
15
+ const setProductFilterObjContext = props.actions.setProductFilterObjContext;
16
+ const authdetailsContext = props.actions.authdetailsContext;
17
+ const [sectionproperties, setsectionproperties] = useState('');
18
+ const [instfilters, setinstfilters] = useState([...authdetailsContext.instinfo.instfilters]);
19
+ const [instcollections, setinstcollections] = useState([...authdetailsContext.instinfo.instcollections]);
20
+ const [isfiltering, setisfiltering] = useState(false);
21
+
22
+ useEffect(() => {
23
+ filterupdater();
24
+ }, []);
25
+ useEffect(() => {
26
+ setinstfilters([...authdetailsContext.instinfo.instfilters]);
27
+ setinstcollections([...authdetailsContext.instinfo.instcollections]);
28
+ }, [authdetailsContext]);
29
+ useEffect(() => {
30
+ if (props.sectionpropertiesprops != undefined && props.sectionpropertiesprops.length != 0) {
31
+ setsectionproperties(props.sectionpropertiesprops);
32
+ }
33
+ }, [props.sectionpropertiesprops]);
34
+ useEffect(() => {
35
+ filterupdater();
36
+ }, [ProductFilterObjContext]);
37
+ const filterupdater = () => {
38
+ if (instfilters.length != 0) {
39
+ var tempinstfilters = [...instfilters];
40
+ tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
41
+ instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
42
+ valefilteritem.isfilterselected = false;
43
+ });
44
+ });
45
+ ProductFilterObjContext.FilterOptions.forEach(function (filteritem, filterindex) {
46
+ tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
47
+ instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
48
+ if (filteritem.valueid == valefilteritem.valueid) {
49
+ valefilteritem.isfilterselected = true;
50
+ }
51
+ });
52
+ });
53
+ });
54
+ setinstfilters([...tempinstfilters]);
55
+ }
56
+ if (instcollections.length != 0) {
57
+ var tempInstcollections = [...instcollections];
58
+ tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
59
+ instfilteritem.isfilterselected = false;
60
+ });
61
+ ProductFilterObjContext.collections.forEach(function (filteritem, filterindex) {
62
+ tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
63
+ if (instfilteritem.collectionid == filteritem) {
64
+ instfilteritem.isfilterselected = true;
65
+ }
66
+ });
67
+ });
68
+ setinstcollections([...tempInstcollections]);
69
+ }
70
+ };
71
+
72
+ const setfilterfunc = (valueid, valueindex, mainparentindex, type) => {
73
+ var tempfetchproductsfilerobjcontext = { ...ProductFilterObjContext };
74
+ if (type == 'clearfilters') {
75
+ tempfetchproductsfilerobjcontext.FilterOptions = [];
76
+ } else {
77
+ var FilterExists = false;
78
+ tempfetchproductsfilerobjcontext.FilterOptions.forEach(function (filteritem, filterindex) {
79
+ if (filteritem.valueid == valueid) {
80
+ FilterExists = true;
81
+ tempfetchproductsfilerobjcontext.FilterOptions.splice(filterindex, 1);
82
+ }
83
+ });
84
+ if (!FilterExists) {
85
+ tempfetchproductsfilerobjcontext.FilterOptions.push({ valueid: valueid });
86
+ }
87
+ }
88
+ if (tempfetchproductsfilerobjcontext.FilterOptions.length == 0) {
89
+ tempfetchproductsfilerobjcontext.isfilter = 0;
90
+ } else {
91
+ tempfetchproductsfilerobjcontext.isfilter = 1;
92
+ }
93
+ setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
94
+ };
95
+ const setCollectionFilterFunc = (collectionid) => {
96
+ var tempfetchproductsfilerobjcontext = { ...ProductFilterObjContext };
97
+ var CollectionExists = false;
98
+ tempfetchproductsfilerobjcontext.collections.forEach(function (filteritem, filterindex) {
99
+ if (filteritem == collectionid) {
100
+ CollectionExists = true;
101
+ tempfetchproductsfilerobjcontext.collections.splice(filterindex, 1);
102
+ }
103
+ });
104
+ if (!CollectionExists) {
105
+ tempfetchproductsfilerobjcontext.collections.push(collectionid);
106
+ }
107
+ setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
108
+ };
109
+
110
+ const filter_cssstyles = {
111
+ collapsetitle: css({
112
+ fontSize: sectionproperties.filtertitle_fontsize + 'px',
113
+ fontWeight: sectionproperties.filtertitle_fontweight,
114
+ textTransform: sectionproperties.filtertitle_texttransform,
115
+ color: sectionproperties.filtertitle_color,
116
+ ':hover': {
117
+ color: sectionproperties.filtertitle_coloronhover,
118
+ },
119
+ }),
120
+ titlecontainer: css({
121
+ color: sectionproperties.filtertitle_color,
122
+ ':hover i': {
123
+ color: sectionproperties.filtertitle_coloronhover,
124
+ },
125
+ }),
126
+ timeline_text: css({
127
+ fontSize: sectionproperties.timeline_text_fontsize + 'px',
128
+ fontWeight: sectionproperties.timeline_text_fontweight,
129
+ textTransform: sectionproperties.timeline_text_texttransform,
130
+ color: sectionproperties.timeline_text_color,
131
+ ':hover': {
132
+ color: sectionproperties.timeline_text_coloronhover,
133
+ },
134
+ }),
135
+ btnstyles: css({
136
+ color: sectionproperties.generalbtn_textColor,
137
+ fontSize: sectionproperties.generalbtn_fontsize + 'px',
138
+ textTransform: sectionproperties.generalbtn_texttransform,
139
+ width: sectionproperties.generalbtn_width + 'px',
140
+ height: sectionproperties.generalbtn_height + 'px',
141
+ background: sectionproperties.generalbtn_bgColor,
142
+ borderTopLeftRadius: sectionproperties.generalbtn_bordertopleftradius + 'px',
143
+ borderTopRightRadius: sectionproperties.generalbtn_bordertoprightradius + 'px',
144
+ borderBottomRightRadius: sectionproperties.generalbtn_borderbottomrightradius + 'px',
145
+ borderBottomLeftRadius: sectionproperties.generalbtn_borderbottomleftradius + 'px',
146
+ fontWeight: sectionproperties.generalbtn_fontweight,
147
+ transition: '.3s',
148
+ ':hover': {
149
+ background: sectionproperties.generalbtn_bgColoronhover,
150
+ color: sectionproperties.generalbtn_textColoronhover,
151
+ },
152
+ }),
153
+ close_menu_icon_cont: css({
154
+ background: sectionproperties.closeSliderBgColor,
155
+ width: sectionproperties.closeSliderWidth + 'px',
156
+ height: sectionproperties.closeSliderHeight + 'px',
157
+ borderRadius: sectionproperties.closeSlider_borderBottomLeftRadius + 'px',
158
+ ':hover': {
159
+ background: sectionproperties.closeSliderBgColorHover,
160
+ },
161
+ }),
162
+ horizontalfilter_card: css({
163
+ marginBottom: sectionproperties.horizontalfilter_mb + 'px',
164
+ marginTop: sectionproperties.horizontalfilter_mt + 'px',
165
+ background: sectionproperties.horizontalfilter_cardbg,
166
+ border: sectionproperties.horizontalfilter_cardborderwidth + 'px solid ' + sectionproperties.horizontalfilter_cardbordercolor,
167
+ boxShadow: sectionproperties.horizontalfilter_cardboxShadow == 'Show' ? sectionproperties.horizontalfilter_cardboxShadowcolor : 'horizontalfilter_cardboxShadow',
168
+ }),
169
+ btn_item: css({
170
+ ':hover': {
171
+ background: sectionproperties.filteritembtn_bghover,
172
+ },
173
+ width: '20px',
174
+ height: '20px',
175
+ // borderTopLeftRadius: sectionproperties.filteritembtn_borderTopLeftRadius + 'px',
176
+ // borderTopRightRadius: sectionproperties.filteritembtn_borderTopRightRadius + 'px',
177
+ // borderBottomLeftRadius: sectionproperties.filteritembtn_borderBottomLeftRadius + 'px',
178
+ // borderBottomRightRadius: sectionproperties.filteritembtn_borderBottomRightRadius + 'px',
179
+ background: sectionproperties.filteritembtn_bgcolor,
180
+ // marginLeft: sectionproperties.filteritembtn_ml + 'px',
181
+ }),
182
+ btn_item_active: css({
183
+ // background: 'green',
184
+ background: sectionproperties.btn_item_activebgcolor,
185
+ }),
186
+ timelineinnercont_active: css({
187
+ fontWeight: sectionproperties.activecat_fontweight,
188
+ color: sectionproperties.activecat_color,
189
+ }),
190
+ };
191
+
192
+ return (
193
+ <div className="col-lg-12 p-0 w-100 filter">
194
+ {sectionproperties.filterdirection == 'Horizontal' && (
195
+ <div className={sectionproperties.filterscat_showas == 'vertical' ? ' row m-0 w-100 ' : `${filterstyles.outercontainer}` + ' row m-0 w-100 '}>
196
+ {/* <div className={`${filterstyles.outercontainer}` + ' row m-0 w-100 bg-info '}> */}
197
+ <div className={`${filterstyles.card}` + ' col-lg-2 w-100 '}>
198
+ <div className={`${filterstyles.horizontalfilter_card}` + ' w-100 d-flex align-items-center '}>
199
+ <div className={`${filterstyles.timeline}` + ' w-100'}>
200
+ <Dropdown>
201
+ <Dropdown.Toggle className="d-flex align-items-center w-100 bg-transparent">
202
+ <div className="row m-0 w-100 h-100 d-flex align-items-center">
203
+ <div className="col-lg-11 d-flex align-items-start p-0">
204
+ <p className={`${filter_cssstyles.collapsetitle}` + ' p-0 m-0 '}>{langdetect == 'en' ? 'Collections' : 'المجموعات'}</p>
205
+ </div>
206
+ <i className="fa fa-chevron-down ml-auto"></i>
207
+ </div>
208
+ </Dropdown.Toggle>
209
+ <Dropdown.Menu>
210
+ {instcollections.map((item, index) => {
211
+ return (
212
+ <div
213
+ className={
214
+ `${filterstyles.border_left_line} ${filterstyles.timelineinnercont} ${filter_cssstyles.timelineinnercont} ${
215
+ item.isfilterselected ? `${filter_cssstyles.timelineinnercont_active} ${filterstyles.timelineinnercont_active}` : ''
216
+ } ` + ' d-flex align-items-start pb-3 '
217
+ }
218
+ onClick={() => {
219
+ setCollectionFilterFunc(item.collectionid);
220
+ // setfilterfunc(valueitem.valueid, valueindex, index, 'assign');
221
+ }}
222
+ >
223
+ <div>
224
+ <div
225
+ className={
226
+ ` ${item.isfilterselected ? filter_cssstyles.btn_item_active : ''} ${filterstyles.btn_item} ${filter_cssstyles.btn_item}` +
227
+ ' mb-2 d-flex align-items-center '
228
+ }
229
+ >
230
+ <i className="h-100 d-flex align-items-center"></i>
231
+ </div>
232
+ </div>
233
+ <div className={langdetect == 'en' ? 'ml-3' : 'mr-3 text-right'}>
234
+ <p className={`${filterstyles.timeline_text} ${filter_cssstyles.timeline_text}` + ' m-0 p-0 '}>
235
+ {langdetect == 'en' ? item.title_en : item.title_ar}
236
+ </p>
237
+ </div>
238
+ </div>
239
+ );
240
+ })}
241
+ </Dropdown.Menu>
242
+ </Dropdown>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ {instfilters.map((item, index) => {
247
+ return (
248
+ <div className={`${filterstyles.card}` + ' col-lg-2 w-100 '}>
249
+ <div className={`${filterstyles.horizontalfilter_card}` + ' w-100 d-flex align-items-center '}>
250
+ <div className={`${filterstyles.timeline}` + ' w-100'}>
251
+ <Dropdown>
252
+ <Dropdown.Toggle className="d-flex align-items-center w-100 bg-transparent">
253
+ <div className="row m-0 w-100 h-100 d-flex align-items-center">
254
+ <div className="col-lg-11 d-flex align-items-start p-0">
255
+ <p className={`${filter_cssstyles.collapsetitle}` + ' p-0 m-0 '}>{item.optionname}</p>
256
+ </div>
257
+ <i className="fa fa-chevron-down ml-auto"></i>
258
+ </div>
259
+ </Dropdown.Toggle>
260
+ <Dropdown.Menu>
261
+ {item.productvaluesfilter.map((valueitem, valueindex) => {
262
+ return (
263
+ <div
264
+ className={
265
+ `${filterstyles.border_left_line} ${filterstyles.timelineinnercont} ${filter_cssstyles.timelineinnercont}
266
+ ${valueitem.isfilterselected ? `${filter_cssstyles.timelineinnercont_active} ${filterstyles.timelineinnercont_active}` : ''}
267
+ ` + ' d-flex align-items-start pb-3 '
268
+ }
269
+ onClick={() => {
270
+ setfilterfunc(valueitem.valueid, valueindex, index, 'assign');
271
+ }}
272
+ >
273
+ <div>
274
+ <div
275
+ className={
276
+ ` ${valueitem.isfilterselected ? filter_cssstyles.btn_item_active : ''} ${filterstyles.btn_item} ${filter_cssstyles.btn_item}` +
277
+ ' mb-2 d-flex align-items-center '
278
+ }
279
+ >
280
+ <i className="h-100 d-flex align-items-center"></i>
281
+ </div>
282
+ </div>
283
+ <div className={langdetect == 'en' ? 'ml-3' : 'mr-3 text-right'}>
284
+ <p className={`${filterstyles.timeline_text} ${filter_cssstyles.timeline_text}` + ' m-0 p-0 '}>{valueitem.valuename}</p>
285
+ </div>
286
+ </div>
287
+ );
288
+ })}
289
+ </Dropdown.Menu>
290
+ </Dropdown>
291
+ </div>
292
+ </div>
293
+ </div>
294
+ );
295
+ })}
296
+ </div>
297
+ )}
298
+ {sectionproperties.filterdirection == 'Vertical' && (
299
+ <div
300
+ className={`${filterstyles.filterslider_container}`}
301
+ id="filterslider"
302
+ style={{
303
+ background: sectionproperties.filter_backgroundcolor,
304
+ borderRadius: sectionproperties.filter_borderBottomLeftRadius + 'px',
305
+ }}
306
+ >
307
+ <div className="row m-0 w-100 pt-2 pb-3">
308
+ <div className="col-lg-9 col-md-9 col-sm-9 d-flex align-items-center d-md-flex">
309
+ <p
310
+ className="m-0 p-0 font-16 font-weight-600"
311
+ style={{
312
+ color: sectionproperties.filter_titlecolor,
313
+ fontSize: sectionproperties.filter_titlefontsize + 'px',
314
+ fontWeight: sectionproperties.filter_titlefontweight,
315
+ textTransform: sectionproperties.filter_titletextransform,
316
+ }}
317
+ >
318
+ {langdetect == 'en' ? 'Filter' : 'فلترة'}
319
+ </p>
320
+ </div>
321
+ <div className="col-lg-3 col-md-3 col-sm-3 d-flex align-items-center justify-content-end p-0">
322
+ <div
323
+ className={`${filterstyles.close_menu_icon_cont} ${filter_cssstyles.close_menu_icon_cont}` + ' d-none d-md-flex align-items-center justify-content-center '}
324
+ onClick={() => {
325
+ var element = document.getElementById('filterslider');
326
+ element.classList.remove(filterstyles.filterslider_container_opened);
327
+ }}
328
+ >
329
+ <i className="h-100 d-flex align-items-center justify-content-center">
330
+ <IoMdClose
331
+ size={sectionproperties.closeSlider_fontSize}
332
+ style={{
333
+ color: sectionproperties.closeSlider_color,
334
+ }}
335
+ />
336
+ </i>
337
+ </div>
338
+ </div>
339
+ <div className="col-lg-12">
340
+ <hr className="mt-2 mb-3" />
341
+ </div>
342
+ <div className={filter_cssstyles.filteraccordion + ' col-lg-12 filter-accordion p-md-0 '}>
343
+ <Accordion allowMultipleExpanded={true} allowZeroExpanded={true} preExpanded={[0, 1, 2, 3]}>
344
+ <AccordionItem uuid={0}>
345
+ <AccordionItemHeading>
346
+ <AccordionItemButton>
347
+ <div className={filter_cssstyles.titlecontainer + ' row m-0 p-0 mb-2 '}>
348
+ <div className="col-lg-10 p-0">
349
+ <p className={langdetect == 'en' ? filter_cssstyles.collapsetitle + ' m-0 p-0 ' : filter_cssstyles.collapsetitle + ' m-0 p-0 text-right'}>
350
+ {langdetect == 'en' ? 'Collections' : 'المجموعات'}
351
+ </p>
352
+ </div>
353
+ <div className="col-lg-2 p-0">
354
+ <AccordionItemState>
355
+ {(state) => {
356
+ if (state.expanded == true) {
357
+ return (
358
+ <i className={filter_cssstyles.collapsetitleicon + ' h-100 d-flex align-items-center justify-content-end accordion__button '}>
359
+ <AiOutlineMinus />
360
+ </i>
361
+ );
362
+ } else {
363
+ return (
364
+ <i className={filter_cssstyles.collapsetitleicon + ' h-100 d-flex align-items-center justify-content-end accordion__button '}>
365
+ <HiOutlinePlus />
366
+ </i>
367
+ );
368
+ }
369
+ }}
370
+ </AccordionItemState>
371
+ </div>
372
+ </div>
373
+ </AccordionItemButton>
374
+ </AccordionItemHeading>
375
+ <AccordionItemPanel className="p-0">
376
+ <div className="row mt-0 mb-2 ml-0 mr-0 d-lg-flex">
377
+ <div className={'col-lg-12'}>
378
+ <div
379
+ className={
380
+ langdetect == 'en'
381
+ ? `${filterstyles.timeline} ${filterstyles.timelinetrans}` + ' p-sm-0 '
382
+ : `${filterstyles.timeline} ${filterstyles.timelinetrans}` + ' p-sm-0 '
383
+ }
384
+ >
385
+ {instcollections.map((item, index) => {
386
+ return (
387
+ <div
388
+ className={
389
+ `${filterstyles.border_left_line} ${filterstyles.timelineinnercont} ${filter_cssstyles.timelineinnercont}
390
+ ${item.isfilterselected ? `${filter_cssstyles.timelineinnercont_active} ${filterstyles.timelineinnercont_active}` : ''}
391
+ ` + ' d-flex align-items-start pb-3 '
392
+ }
393
+ onClick={() => {
394
+ setCollectionFilterFunc(item.collectionid);
395
+ }}
396
+ >
397
+ <div
398
+ className={
399
+ ` ${item.isfilterselected ? filter_cssstyles.btn_item_active : ''} ${filterstyles.btn_item} ${filter_cssstyles.btn_item}` +
400
+ ' mb-2 d-flex align-items-center '
401
+ }
402
+ >
403
+ <i className="h-100 d-flex align-items-center"></i>
404
+ </div>
405
+ <div className={langdetect == 'en' ? 'ml-3' : 'mr-3 text-right'}>
406
+ <p
407
+ className={`${filterstyles.timeline_text} ${filter_cssstyles.timeline_text}` + ' m-0 p-0 '}
408
+ style={{
409
+ color: item.isfilterselected ? sectionproperties.activecat_color : '',
410
+ }}
411
+ >
412
+ {langdetect == 'en' ? item.title_en : item.title_ar}
413
+ </p>
414
+ </div>
415
+ </div>
416
+ );
417
+ })}
418
+ </div>
419
+ </div>
420
+ </div>
421
+ </AccordionItemPanel>
422
+ </AccordionItem>
423
+ <hr className="mt-3 mb-3" />
424
+ </Accordion>
425
+ <Accordion allowMultipleExpanded={true} allowZeroExpanded={true} preExpanded={[0, 1, 2, 3]}>
426
+ {instfilters.map((item, index) => {
427
+ return (
428
+ <>
429
+ <AccordionItem uuid={index}>
430
+ <AccordionItemHeading>
431
+ <AccordionItemButton>
432
+ <div className={filter_cssstyles.titlecontainer + ' row m-0 p-0 mb-2 '}>
433
+ <div className="col-lg-10 p-0">
434
+ <p
435
+ className={
436
+ langdetect == 'en' ? filter_cssstyles.collapsetitle + ' m-0 p-0 ' : filter_cssstyles.collapsetitle + ' m-0 p-0 text-right'
437
+ }
438
+ >
439
+ {item.optionname}
440
+ </p>
441
+ </div>
442
+ <div className="col-lg-2 p-0">
443
+ <AccordionItemState>
444
+ {(state) => {
445
+ if (state.expanded == true) {
446
+ return (
447
+ <i
448
+ className={
449
+ filter_cssstyles.collapsetitleicon + ' h-100 d-flex align-items-center justify-content-end accordion__button '
450
+ }
451
+ >
452
+ <AiOutlineMinus />
453
+ </i>
454
+ );
455
+ } else {
456
+ return (
457
+ <i
458
+ className={
459
+ filter_cssstyles.collapsetitleicon + ' h-100 d-flex align-items-center justify-content-end accordion__button '
460
+ }
461
+ >
462
+ <HiOutlinePlus />
463
+ </i>
464
+ );
465
+ }
466
+ }}
467
+ </AccordionItemState>
468
+ </div>
469
+ </div>
470
+ </AccordionItemButton>
471
+ </AccordionItemHeading>
472
+ <AccordionItemPanel className="p-0">
473
+ <div className="row mt-0 mb-2 ml-0 mr-0 d-lg-flex">
474
+ <div className={'col-lg-12'}>
475
+ <div
476
+ className={
477
+ langdetect == 'en' ? `${filterstyles.timeline}` + ' p-sm-0 ' : `${filterstyles.timeline} ${filterstyles.timelinetrans}` + ' p-sm-0 '
478
+ }
479
+ >
480
+ {item.productvaluesfilter.map((valueitem, valueindex) => {
481
+ return (
482
+ <div
483
+ className={
484
+ `${filterstyles.border_left_line} ${filterstyles.timelineinnercont} ${filter_cssstyles.timelineinnercont}
485
+ ${valueitem.isfilterselected ? `${filter_cssstyles.timelineinnercont_active} ${filterstyles.timelineinnercont_active}` : ''}
486
+
487
+ ` + ' d-flex align-items-start pb-3 '
488
+ }
489
+ onClick={() => {
490
+ setfilterfunc(valueitem.valueid, valueindex, index, 'assign');
491
+ }}
492
+ >
493
+ <div>
494
+ <div
495
+ className={
496
+ ` ${valueitem.isfilterselected ? filter_cssstyles.btn_item_active : ''} ${filterstyles.btn_item} ${
497
+ filter_cssstyles.btn_item
498
+ }` + ' mb-2 d-flex align-items-center '
499
+ }
500
+ >
501
+ <i className="h-100 d-flex align-items-center"></i>
502
+ </div>
503
+ </div>
504
+ <div className={langdetect == 'en' ? 'ml-3' : 'mr-3 text-right'}>
505
+ <p
506
+ className={`${filterstyles.timeline_text} ${filter_cssstyles.timeline_text}` + ' m-0 p-0 '}
507
+ style={{
508
+ color: valueitem.isfilterselected ? sectionproperties.activecat_color : '',
509
+ }}
510
+ >
511
+ {valueitem.valuename}
512
+ </p>
513
+ </div>
514
+ </div>
515
+ );
516
+ })}
517
+ </div>
518
+ </div>
519
+ </div>
520
+ </AccordionItemPanel>
521
+ </AccordionItem>
522
+ <hr className="mt-3 mb-3" />
523
+ </>
524
+ );
525
+ })}
526
+ </Accordion>
527
+ </div>
528
+ <div
529
+ className="col-lg-12 d-flex align-items-center justify-content-center"
530
+ onClick={() => {
531
+ setfilterfunc('', '', '', 'clearfilters');
532
+ }}
533
+ >
534
+ <button className={filter_cssstyles.btnstyles + ' ml-1 ml-1 '}>{langdetect == 'en' ? 'Clear Filters' : 'حذف الإختيارات'}</button>
535
+ </div>
536
+ </div>
537
+ </div>
538
+ )}
539
+ </div>
540
+ );
541
+ };
542
+ export default Filter;
@@ -0,0 +1,51 @@
1
+ import React, { useEffect, useState, useContext } from 'react';
2
+
3
+ import generalstyles from '../../../styles/general/general.module.css';
4
+ import loginstyles from '../../../styles/staticpages/login.module.css';
5
+ import FacebookLogin from 'react-facebook-login/dist/facebook-login-render-props';
6
+ import { FaFacebookF } from 'react-icons/fa';
7
+
8
+ const FacebookLoginButton = (props) => {
9
+ // const { lang, langdetect } = useContext(LanguageContext);
10
+ // const { fetchAuthorizationQueryContext, SocialLoginMutationContext } = useContext(FetchingContext);
11
+ const lang = props.actions.lang;
12
+ const langdetect = props.actions.langdetect;
13
+ const authdetailsContext = props.actions.authdetailsContext;
14
+ const SocialLoginMutationContext = props.actions.SocialLoginMutationContext;
15
+ return (
16
+ <div className="">
17
+ {authdetailsContext.instinfo?.instcred?.facebookloginappid != null && (
18
+ <FacebookLogin
19
+ cssClass={`${generalstyles.btn} ${generalstyles.btn_primary} ${loginstyles.loginbtn}` + ' w-100 mb-3 d-flex align-items-center justify-content-center '}
20
+ appId={authdetailsContext.instinfo?.instcred?.facebookloginappid}
21
+ fields="name,email"
22
+ callback={(responseFacebook) => {
23
+ var googleresp = responseFacebook;
24
+
25
+ if (googleresp.status != 'unknown') {
26
+ SocialLoginMutationContext.mutate({
27
+ email: googleresp.email,
28
+ name: googleresp.name,
29
+ loginplattype: 'facebook',
30
+ });
31
+ }
32
+ }}
33
+ render={(renderProps) => {
34
+ return (
35
+ <button
36
+ type="button"
37
+ onClick={renderProps.onClick}
38
+ className={' d-flex align-items-center justify-content-center text-secondaryhovercontainer'}
39
+ style={{ border: '1px solid #ccc', height: '38px', borderRadius: '3px', width: '218px' }}
40
+ >
41
+ <FaFacebookF size={15} color="black" className="ml-1 mr-1 text-secondaryhover" />
42
+ <p className="m-0 p-0 font_13 ml-1 mr-1 text-secondaryhover">{lang.loginwithfacebook}</p>
43
+ </button>
44
+ );
45
+ }}
46
+ />
47
+ )}
48
+ </div>
49
+ );
50
+ };
51
+ export default FacebookLoginButton;
@@ -0,0 +1,35 @@
1
+ import React, { useEffect, useState, useContext } from 'react';
2
+ import { useGoogleLogin, hasGrantedAnyScopeGoogle, GoogleLogin, GoogleOAuthProvider } from '@react-oauth/google';
3
+ import jwtDecode from 'jwt-decode';
4
+ const GoogleLoginButton = (props) => {
5
+ const lang = props.actions.lang;
6
+ const langdetect = props.actions.langdetect;
7
+ const authdetailsContext = props.actions.authdetailsContext;
8
+ const SocialLoginMutationContext = props.actions.SocialLoginMutationContext;
9
+ return (
10
+ <>
11
+ {authdetailsContext.instinfo?.instcred?.googleloginclientid != null && (
12
+ <div className="d-flex align-items-center justify-content-center">
13
+ <GoogleOAuthProvider clientId={authdetailsContext.instinfo?.instcred?.googleloginclientid}>
14
+ <div className={'row m-0 w-100 d-flex align-items-center justify-content-center'}>
15
+ <GoogleLogin
16
+ onSuccess={(tokenResponse) => {
17
+ var tt = jwtDecode(tokenResponse.credential);
18
+ SocialLoginMutationContext.mutate({
19
+ email: tt.email,
20
+ name: tt.name,
21
+ loginplattype: 'google',
22
+ });
23
+ }}
24
+ onError={() => {
25
+ console.log('Login Failed');
26
+ }}
27
+ />
28
+ </div>
29
+ </GoogleOAuthProvider>
30
+ </div>
31
+ )}
32
+ </>
33
+ );
34
+ };
35
+ export default GoogleLoginButton;