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,193 @@
1
+ import React, { useEffect, useState, useContext } from 'react';
2
+ import { Fade } from 'react-slideshow-image';
3
+ import { css } from 'glamor';
4
+ import { serverbaselink } from '../../../../../Env';
5
+ import { IoIosArrowRoundForward, IoIosArrowRoundBack } from 'react-icons/io';
6
+ const Slideshowfade = (props) => {
7
+ const [sectionproperties, setsectionproperties] = useState('');
8
+ const [bgimagearrayofobjs, setbgimagearrayofobjs] = useState([]);
9
+ const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
10
+ const lang = props.actions.lang;
11
+ const langdetect = props.actions.langdetect;
12
+ const routingcountext = props.actions.routingcountext;
13
+ const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
14
+
15
+ useEffect(() => {
16
+ if (props.srcfrom == 'addsectionform') {
17
+ var secpropobj = {};
18
+ props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
19
+ secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
20
+ });
21
+ setsectionproperties({ ...secpropobj });
22
+ } else {
23
+ var secpropobj = {};
24
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
25
+ if (sectionitem.sectionid == props.sectionidprops) {
26
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
27
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
28
+ });
29
+ }
30
+ });
31
+ setsectionproperties({ ...secpropobj });
32
+ }
33
+ }, [StatePagePropertiesContext]);
34
+ useEffect(() => {
35
+ if (sectionproperties.length != 0 && sectionproperties.slideshowarrayofobj != undefined) {
36
+ var bg_arrayofobjsparsed = JSON.parse(sectionproperties.slideshowarrayofobj);
37
+ if (Array.isArray(bg_arrayofobjsparsed)) {
38
+ setbgimagearrayofobjs([...bg_arrayofobjsparsed]);
39
+ }
40
+ }
41
+ }, [sectionproperties]);
42
+ const Slideshowsettings = {
43
+ indicators: false,
44
+ arrows: false,
45
+ pauseOnHover: false,
46
+ scale: 1.4,
47
+ };
48
+ const slideshow_styles = {
49
+ slideshow_btn: css({
50
+ zIndex: 1000,
51
+ height: sectionproperties.generalbtn_height + 'px',
52
+ width: sectionproperties.generalbtn_width + 'px',
53
+ background: sectionproperties.generalbtn_bgColor,
54
+ color: sectionproperties.generalbtn_textColor,
55
+ borderTopLeftRadius: sectionproperties.generalbtn_bordertopleftradius + 'px',
56
+ borderTopRightRadius: sectionproperties.generalbtn_bordertoprightradius + 'px',
57
+ borderBottomLeftRadius: sectionproperties.generalbtn_borderbottomleftradius + 'px',
58
+ borderBottomRightRadius: sectionproperties.generalbtn_borderbottomrightradius + 'px',
59
+ fontSize: sectionproperties.generalbtn_fontsize + 'px',
60
+ lineHeight: sectionproperties.generalbtn_fontsize + 'px',
61
+ textTransform: sectionproperties.generalbtn_texttransform,
62
+ fontWeight: sectionproperties.generalbtn_fontweight,
63
+ transition: '.3s',
64
+ ':hover': {
65
+ background: sectionproperties.generalbtn_bgColoronhover,
66
+ color: sectionproperties.generalbtn_textColoronhover,
67
+ },
68
+ }),
69
+ };
70
+ const SlideShowTextContainer = (item) => {
71
+ return (
72
+ <div
73
+ class={'row m-0 w-100 pl-md-2 pr-md-2'}
74
+ style={{
75
+ position: 'absolute',
76
+ top: '40%',
77
+ zIndex: 1000,
78
+ paddingTop: sectionproperties.paddingTop + 'px',
79
+ paddingLeft: langdetect == 'en' ? sectionproperties.paddingLeft + 'px' : '',
80
+ paddingRight: langdetect == 'en' ? '' : sectionproperties.paddingLeft + 'px',
81
+ }}
82
+ >
83
+ <div class={sectionproperties.text1centered == 'Centered' ? 'col-lg-12 allcentered' : 'col-lg-12 d-flex justify-content-start'}>
84
+ <p
85
+ className="m-0 p-0 wordbreak PacificoFont"
86
+ style={{
87
+ fontSize: sectionproperties.slideshowText1ContentFontSize + 'px',
88
+ color: sectionproperties.slideshowText1ContentColor,
89
+ fontWeight: sectionproperties.slideshowText1ContentFontWeight,
90
+ }}
91
+ >
92
+ {langdetect == 'en' ? item.titleen : item.titlear}
93
+ </p>
94
+ </div>
95
+ <div class={sectionproperties.text2centered == 'Centered' ? 'col-lg-12 allcentered' : 'col-lg-12 d-flex justify-content-start'}>
96
+ <p
97
+ className="m-0 p-0 wordbreak"
98
+ style={{
99
+ fontSize: sectionproperties.slideshowText2ContentFontSize + 'px',
100
+ color: sectionproperties.slideshowText2ContentColor,
101
+ fontWeight: sectionproperties.slideshowText2ContentFontWeight,
102
+ }}
103
+ >
104
+ {langdetect == 'en' ? item.descriptionen : item.descriptionar}
105
+ </p>
106
+ </div>
107
+ <div class={sectionproperties.text2centered == 'Centered' ? 'col-lg-12 allcentered mt-3' : 'col-lg-12 d-flex justify-content-start mt-3'}>
108
+ <button
109
+ class={`${slideshow_styles.slideshow_btn}` + ' allcentered '}
110
+ style={{
111
+ letterSpacing: langdetect == 'en' ? '1px' : 0,
112
+ }}
113
+ onClick={() => {
114
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent);
115
+ }}
116
+ >
117
+ {langdetect == 'en' ? sectionproperties.generalbtn_content : sectionproperties.slideshow_btn_text_ar}{' '}
118
+ {langdetect == 'en' ? <IoIosArrowRoundForward size={20} /> : <IoIosArrowRoundBack size={20} />}
119
+ </button>
120
+ </div>
121
+ </div>
122
+ );
123
+ };
124
+ return (
125
+ <div class="row m-0 w-100 d-flex justify-content-center align-items-center">
126
+ <div class={'col-lg-12 p-0 d-flex justify-content-center'} style={{ height: sectionproperties.height + 'vh' }}>
127
+ <div
128
+ style={{
129
+ position: 'relative',
130
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
131
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
132
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
133
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
134
+ width: sectionproperties.width + 'vw',
135
+ marginBottom: sectionproperties.marginBottom + 'px',
136
+ marginTop: sectionproperties.marginTop + 'px',
137
+ height: sectionproperties.height + 'vh',
138
+ }}
139
+ >
140
+ <Fade {...Slideshowsettings} transitionDuration={1500} duration={1500} arrow={true} easing="ease">
141
+ {Object.keys(bgimagearrayofobjs).length != 0 &&
142
+ bgimagearrayofobjs.map((item, index) => {
143
+ return (
144
+ <div
145
+ class="row m-0 w-100"
146
+ style={{
147
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
148
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
149
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
150
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
151
+ }}
152
+ >
153
+ <div
154
+ class={'p-0 align-items-center d-flex d-sm-none '}
155
+ key={index}
156
+ style={{
157
+ direction: langdetect == 'en' ? 'ltr' : 'rtl',
158
+ width: '100%',
159
+ height: sectionproperties.height + 'vh',
160
+ backgroundSize: 'cover',
161
+ backgroundPosition: 'center',
162
+ backgroundImage: langdetect == 'en' ? `url(` + serverbaselink + item.imageen + `)` : `url(` + serverbaselink + item.imagear + `)`,
163
+ paddingTop: sectionproperties.paddingTop + 'px',
164
+ }}
165
+ >
166
+ {SlideShowTextContainer(item)}
167
+ </div>
168
+ <div
169
+ class={'p-0 align-items-center d-none d-sm-flex '}
170
+ key={index}
171
+ style={{
172
+ width: '100%',
173
+ height: sectionproperties.height + 'vh',
174
+ backgroundSize: 'cover',
175
+ backgroundPosition: 'center',
176
+ backgroundImage: langdetect == 'en' ? `url(` + serverbaselink + item.image_resp_en + `)` : `url(` + serverbaselink + item.image_resp_ar + `)`,
177
+ paddingTop: sectionproperties.paddingTop + 'px',
178
+ paddingLeft: langdetect == 'en' ? sectionproperties.paddingLeft + 'px' : '',
179
+ paddingRight: langdetect == 'en' ? '' : sectionproperties.paddingLeft + 'px',
180
+ }}
181
+ >
182
+ {SlideShowTextContainer(item)}
183
+ </div>
184
+ </div>
185
+ );
186
+ })}
187
+ </Fade>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ );
192
+ };
193
+ export default Slideshowfade;
@@ -0,0 +1,197 @@
1
+ import React, { useEffect, useState, useContext } from 'react';
2
+ import { Slide } from 'react-slideshow-image';
3
+ import { css } from 'glamor';
4
+ import { serverbaselink } from '../../../../../Env';
5
+ import { IoIosArrowRoundForward, IoIosArrowRoundBack } from 'react-icons/io';
6
+ const Slideshowslide = (props) => {
7
+ const [sectionproperties, setsectionproperties] = useState('');
8
+ const [bgimagearrayofobjs, setbgimagearrayofobjs] = useState([]);
9
+ const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
10
+ const lang = props.actions.lang;
11
+ const langdetect = props.actions.langdetect;
12
+ const routingcountext = props.actions.routingcountext;
13
+ const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
14
+ useEffect(() => {
15
+ if (props.srcfrom == 'addsectionform') {
16
+ var secpropobj = {};
17
+ props.defaultproperties.forEach(function (defaultpropobj, defaultpropindex) {
18
+ secpropobj[defaultpropobj.property_css_name] = defaultpropobj.property_value;
19
+ });
20
+ setsectionproperties({ ...secpropobj });
21
+ } else {
22
+ var secpropobj = {};
23
+ StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
24
+ if (sectionitem.sectionid == props.sectionidprops) {
25
+ sectionitem.sectionproperties.forEach(function (sectionpropertiesobj, sectionpropertiesindex) {
26
+ secpropobj[sectionpropertiesobj.property_css_name] = sectionpropertiesobj.property_value;
27
+ });
28
+ }
29
+ });
30
+ setsectionproperties({ ...secpropobj });
31
+ }
32
+ }, [StatePagePropertiesContext]);
33
+ useEffect(() => {
34
+ if (sectionproperties.length != 0 && sectionproperties.slideshowarrayofobj != undefined) {
35
+ var bg_arrayofobjsparsed = JSON.parse(sectionproperties.slideshowarrayofobj);
36
+ if (Array.isArray(bg_arrayofobjsparsed)) {
37
+ setbgimagearrayofobjs([...bg_arrayofobjsparsed]);
38
+ }
39
+ }
40
+ }, [sectionproperties]);
41
+ const Slideshowsettings = {
42
+ indicators: false,
43
+ arrows: false,
44
+ pauseOnHover: false,
45
+ scale: 1.4,
46
+ };
47
+ const slideshow_styles = {
48
+ slideshow_btn: css({
49
+ zIndex: 1000,
50
+ height: sectionproperties.generalbtn_height + 'px',
51
+ width: sectionproperties.generalbtn_width + 'px',
52
+ background: sectionproperties.generalbtn_bgColor,
53
+ color: sectionproperties.generalbtn_textColor,
54
+ borderTopLeftRadius: sectionproperties.generalbtn_bordertopleftradius + 'px',
55
+ borderTopRightRadius: sectionproperties.generalbtn_bordertoprightradius + 'px',
56
+ borderBottomLeftRadius: sectionproperties.generalbtn_borderbottomleftradius + 'px',
57
+ borderBottomRightRadius: sectionproperties.generalbtn_borderbottomrightradius + 'px',
58
+ fontSize: sectionproperties.generalbtn_fontsize + 'px',
59
+ lineHeight: sectionproperties.generalbtn_fontsize + 'px',
60
+ textTransform: sectionproperties.generalbtn_texttransform,
61
+ fontWeight: sectionproperties.generalbtn_fontweight,
62
+ transition: '.3s',
63
+ ':hover': {
64
+ background: sectionproperties.generalbtn_bgColoronhover,
65
+ color: sectionproperties.generalbtn_textColoronhover,
66
+ },
67
+ }),
68
+ };
69
+ const SlideShowTextContainer = (item) => {
70
+ return (
71
+ <div
72
+ class={'row m-0 w-100 pl-md-2 pr-md-2'}
73
+ style={{
74
+ position: 'absolute',
75
+ top: '40%',
76
+ zIndex: 1000,
77
+ paddingTop: sectionproperties.paddingTop + 'px',
78
+ paddingLeft: langdetect == 'en' ? sectionproperties.paddingLeft + 'px' : '',
79
+ paddingRight: langdetect == 'en' ? '' : sectionproperties.paddingLeft + 'px',
80
+ }}
81
+ >
82
+ <div
83
+ class={'col-lg-12 d-flex justify-content-start'}
84
+ style={{
85
+ textAlign: 'center',
86
+ }}
87
+ >
88
+ <p
89
+ className="m-0 p-0 wordbreak PacificoFont"
90
+ style={{
91
+ fontSize: sectionproperties.slideshowText1ContentFontSize + 'px',
92
+ color: sectionproperties.slideshowText1ContentColor,
93
+ fontWeight: sectionproperties.slideshowText1ContentFontWeight,
94
+ }}
95
+ >
96
+ {langdetect == 'en' ? item.titleen : item.titlear}
97
+ </p>
98
+ </div>
99
+ <div class={'col-lg-12 d-flex justify-content-start'}>
100
+ <p
101
+ className="m-0 p-0 wordbreak"
102
+ style={{
103
+ fontSize: sectionproperties.slideshowText2ContentFontSize + 'px',
104
+ color: sectionproperties.slideshowText2ContentColor,
105
+ fontWeight: sectionproperties.slideshowText2ContentFontWeight,
106
+ }}
107
+ >
108
+ {langdetect == 'en' ? item.descriptionen : item.descriptionar}
109
+ </p>
110
+ </div>
111
+ <div class={'col-lg-12 d-flex justify-content-start mt-3'}>
112
+ <button
113
+ class={`${slideshow_styles.slideshow_btn}` + ' allcentered '}
114
+ style={{
115
+ letterSpacing: langdetect == 'en' ? '1px' : 0,
116
+ }}
117
+ onClick={() => {
118
+ routingcountext(StaticPagesLinksContext.GeneralProductsComponent);
119
+ }}
120
+ >
121
+ {langdetect == 'en' ? sectionproperties.generalbtn_content : sectionproperties.slideshow_btn_text_ar}{' '}
122
+ {langdetect == 'en' ? <IoIosArrowRoundForward size={20} /> : <IoIosArrowRoundBack size={20} />}
123
+ </button>
124
+ </div>
125
+ </div>
126
+ );
127
+ };
128
+ return (
129
+ <div class="row m-0 w-100 d-flex justify-content-center align-items-center">
130
+ <div class={'col-lg-12 p-0 d-flex justify-content-center'} style={{ height: sectionproperties.height + 'vh' }}>
131
+ <div
132
+ style={{
133
+ position: 'relative',
134
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
135
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
136
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
137
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
138
+ width: sectionproperties.width + 'vw',
139
+ marginBottom: sectionproperties.marginBottom + 'px',
140
+ marginTop: sectionproperties.marginTop + 'px',
141
+ height: sectionproperties.height + 'vh',
142
+ }}
143
+ >
144
+ <Slide {...Slideshowsettings} transitionDuration={1500} duration={1500} arrow={true} easing="ease">
145
+ {Object.keys(bgimagearrayofobjs).length != 0 &&
146
+ bgimagearrayofobjs.map((item, index) => {
147
+ return (
148
+ <div
149
+ class="row m-0 w-100"
150
+ style={{
151
+ borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
152
+ borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
153
+ borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
154
+ borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
155
+ }}
156
+ >
157
+ <div
158
+ class={'p-0 align-items-center d-flex d-sm-none '}
159
+ key={index}
160
+ style={{
161
+ direction: langdetect == 'en' ? 'ltr' : 'rtl',
162
+ width: '100%',
163
+ height: sectionproperties.height + 'vh',
164
+ backgroundSize: 'cover',
165
+ backgroundPosition: 'center',
166
+ backgroundImage: langdetect == 'en' ? `url(` + serverbaselink + item.imageen + `)` : `url(` + serverbaselink + item.imagear + `)`,
167
+ paddingTop: sectionproperties.paddingTop + 'px',
168
+ }}
169
+ >
170
+ {SlideShowTextContainer(item)}
171
+ </div>
172
+ <div
173
+ class={'p-0 align-items-center d-none d-sm-flex '}
174
+ key={index}
175
+ style={{
176
+ width: '100%',
177
+ height: sectionproperties.height + 'vh',
178
+ backgroundSize: 'cover',
179
+ backgroundPosition: 'center',
180
+ backgroundImage: langdetect == 'en' ? `url(` + serverbaselink + item.image_resp_en + `)` : `url(` + serverbaselink + item.image_resp_ar + `)`,
181
+ paddingTop: sectionproperties.paddingTop + 'px',
182
+ paddingLeft: langdetect == 'en' ? sectionproperties.paddingLeft + 'px' : '',
183
+ paddingRight: langdetect == 'en' ? '' : sectionproperties.paddingLeft + 'px',
184
+ }}
185
+ >
186
+ {SlideShowTextContainer(item)}
187
+ </div>
188
+ </div>
189
+ );
190
+ })}
191
+ </Slide>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ );
196
+ };
197
+ export default Slideshowslide;
@@ -0,0 +1,91 @@
1
+ import React from 'react';
2
+ import { VisibilityContext } from 'react-horizontal-scrolling-menu';
3
+ function Arrow({ children, disabled, onClick }: { children: React.ReactNode, disabled: boolean, onClick: VoidFunction }) {
4
+ return (
5
+ <button
6
+ disabled={disabled}
7
+ onClick={onClick}
8
+ style={{
9
+ cursor: 'pointer',
10
+ display: 'flex',
11
+ flexDirection: 'column',
12
+ justifyContent: 'center',
13
+ opacity: disabled ? '0' : '1',
14
+ userSelect: 'none',
15
+ width: '100%',
16
+ height: 50,
17
+ position: 'absolute',
18
+ top: 0,
19
+ bottom: 0,
20
+ margin: 'auto',
21
+ }}
22
+ >
23
+ {children}
24
+ </button>
25
+ );
26
+ }
27
+
28
+ export function LeftArrow() {
29
+ const { isFirstItemVisible, scrollNext, scrollPrev, visibleItemsWithoutSeparators, initComplete } = React.useContext(VisibilityContext);
30
+ const [disabled, setDisabled] = React.useState(!initComplete || (initComplete && isFirstItemVisible));
31
+ React.useEffect(() => {
32
+ // NOTE: detect if whole component visible
33
+ if (visibleItemsWithoutSeparators.length) {
34
+ setDisabled(isFirstItemVisible);
35
+ }
36
+ }, [isFirstItemVisible, visibleItemsWithoutSeparators]);
37
+
38
+ return (
39
+ <Arrow
40
+ disabled={disabled}
41
+ onClick={() => {
42
+ scrollPrev();
43
+ }}
44
+ style={[]}
45
+ >
46
+ <div
47
+ class="d-flex align-items-center justify-content-center text-secondaryhover"
48
+ style={{ position: 'absolute', left: 20, width: '5vh', height: '5vh', borderRadius: '50%', zIndex: 1000 }}
49
+ >
50
+ <i class="fa fa-chevron-left text-white"></i>
51
+ </div>
52
+ </Arrow>
53
+ );
54
+ }
55
+
56
+ export function RightArrow() {
57
+ const { isLastItemVisible, scrollNext, scrollPrev, visibleItemsWithoutSeparators } = React.useContext(VisibilityContext);
58
+ const [disabled, setDisabled] = React.useState(!visibleItemsWithoutSeparators.length && isLastItemVisible);
59
+ React.useEffect(() => {
60
+ if (visibleItemsWithoutSeparators.length) {
61
+ setDisabled(isLastItemVisible);
62
+ }
63
+ }, [isLastItemVisible, visibleItemsWithoutSeparators]);
64
+
65
+ return (
66
+ <Arrow
67
+ disabled={disabled}
68
+ onClick={() => {
69
+ scrollNext();
70
+ }}
71
+ >
72
+ <div class="d-flex align-items-center justify-content-center text-secondaryhover" style={{ position: 'absolute', right: 20, width: '5vh', height: '5vh', borderRadius: '50%' }}>
73
+ <i class="fa fa-chevron-right text-white"></i>
74
+ </div>
75
+ </Arrow>
76
+ );
77
+ }
78
+ export function onWheel(apiObj: scrollVisibilityApiType, ev: React.WheelEvent): void {
79
+ const isThouchpad = Math.abs(ev.deltaX) !== 0 || Math.abs(ev.deltaY) < 15;
80
+
81
+ if (isThouchpad) {
82
+ ev.stopPropagation();
83
+ return;
84
+ }
85
+
86
+ if (ev.deltaY < 0) {
87
+ apiObj.scrollNext();
88
+ } else if (ev.deltaY > 0) {
89
+ apiObj.scrollPrev();
90
+ }
91
+ }