ordering-ui-external 1.0.1 → 1.1.2

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 (370) hide show
  1. package/_bundles/{0.ordering-ui.f64ae9230411e0edb7d6.js → 0.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  2. package/_bundles/{1.ordering-ui.f64ae9230411e0edb7d6.js → 1.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  3. package/_bundles/{3.ordering-ui.f64ae9230411e0edb7d6.js → 3.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  4. package/_bundles/{4.ordering-ui.f64ae9230411e0edb7d6.js → 4.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  5. package/_bundles/{5.ordering-ui.f64ae9230411e0edb7d6.js → 5.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  6. package/_bundles/{6.ordering-ui.f64ae9230411e0edb7d6.js → 6.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  7. package/_bundles/{7.ordering-ui.f64ae9230411e0edb7d6.js → 7.ordering-ui.61d857607dc95f3ab08c.js} +2 -2
  8. package/_bundles/{7.ordering-ui.f64ae9230411e0edb7d6.js.LICENSE.txt → 7.ordering-ui.61d857607dc95f3ab08c.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.f64ae9230411e0edb7d6.js → 8.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  10. package/_bundles/{9.ordering-ui.f64ae9230411e0edb7d6.js → 9.ordering-ui.61d857607dc95f3ab08c.js} +1 -1
  11. package/_bundles/ordering-ui.61d857607dc95f3ab08c.js +2 -0
  12. package/_bundles/{ordering-ui.f64ae9230411e0edb7d6.js.LICENSE.txt → ordering-ui.61d857607dc95f3ab08c.js.LICENSE.txt} +0 -0
  13. package/_modules/components/BusinessBasicInformation/index.js +17 -7
  14. package/_modules/components/BusinessProductsList/index.js +9 -9
  15. package/_modules/components/BusinessProductsList/layouts/groceries/index.js +9 -9
  16. package/_modules/components/Checkout/index.js +2 -1
  17. package/_modules/components/ForgotPasswordForm/index.js +4 -1
  18. package/_modules/components/LoginForm/index.js +4 -1
  19. package/_modules/components/OrderDetails/index.js +30 -13
  20. package/_modules/components/PaymentOptionSquare/index.js +6 -4
  21. package/_modules/components/PaymentOptionSquare/styles.js +13 -6
  22. package/_modules/components/PaymentOptions/index.js +6 -3
  23. package/_modules/components/ProductItemAccordion/index.js +7 -2
  24. package/_modules/components/RenderProductsLayout/SearchProducts/index.js +6 -2
  25. package/_modules/components/RenderProductsLayout/index.js +24 -34
  26. package/_modules/components/SignUpForm/index.js +4 -1
  27. package/_modules/components/SingleProductCard/index.js +2 -2
  28. package/_modules/components/TaxInformation/index.js +3 -5
  29. package/_modules/components/UserFormDetails/index.js +23 -7
  30. package/_modules/components/UserProfileForm/ProfileOptions/index.js +19 -1
  31. package/_modules/components/UserProfileForm/index.js +28 -6
  32. package/_modules/components/UserProfileForm/styles.js +1 -1
  33. package/_modules/hooks/useCountdownTimer.js +1 -1
  34. package/_modules/index.js +78 -0
  35. package/_modules/themes/callcenterOriginal/src/components/BusinessProductsList/layouts/groceries/styles.js +1 -1
  36. package/_modules/themes/callcenterOriginal/src/components/BusinessProductsList/styles.js +1 -1
  37. package/_modules/themes/callcenterOriginal/src/components/ForgotPasswordForm/index.js +4 -1
  38. package/_modules/themes/callcenterOriginal/src/components/LoginForm/index.js +4 -1
  39. package/_modules/themes/callcenterOriginal/src/components/SignUpBusiness/index.js +4 -1
  40. package/_modules/themes/callcenterOriginal/src/components/SignUpForm/index.js +4 -1
  41. package/_modules/themes/callcenterOriginal/src/components/UserFormDetails/index.js +4 -1
  42. package/_modules/themes/eight/src/components/BusinessProductsList/index.js +9 -9
  43. package/_modules/themes/eight/src/components/LoginForm/index.js +4 -1
  44. package/_modules/themes/eight/src/components/SignUpForm/index.js +4 -1
  45. package/_modules/themes/eight/src/components/SingleProductCard/index.js +2 -2
  46. package/_modules/themes/five/index.js +50 -2
  47. package/_modules/themes/five/src/components/AddressDetails/index.js +2 -20
  48. package/_modules/themes/five/src/components/AddressForm/index.js +18 -6
  49. package/_modules/themes/five/src/components/AddressForm/styles.js +1 -1
  50. package/_modules/themes/five/src/components/AddressList/index.js +24 -11
  51. package/_modules/themes/five/src/components/AddressList/styles.js +11 -7
  52. package/_modules/themes/five/src/components/BusinessInformation/index.js +11 -4
  53. package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +19 -4
  54. package/_modules/themes/five/src/components/BusinessItemAccordion/styles.js +30 -4
  55. package/_modules/themes/five/src/components/BusinessListingSearch/index.js +64 -3
  56. package/_modules/themes/five/src/components/BusinessPreorder/index.js +5 -3
  57. package/_modules/themes/five/src/components/BusinessPreorder/styles.js +1 -1
  58. package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +87 -54
  59. package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  60. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +2 -1
  61. package/_modules/themes/five/src/components/BusinessProductsList/layouts/groceries/styles.js +13 -10
  62. package/_modules/themes/five/src/components/BusinessProductsList/styles.js +3 -3
  63. package/_modules/themes/five/src/components/BusinessReviews/index.js +24 -30
  64. package/_modules/themes/five/src/components/BusinessesListing/index.js +22 -5
  65. package/_modules/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/index.js +23 -5
  66. package/_modules/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/styles.js +3 -3
  67. package/_modules/themes/five/src/components/Cart/index.js +28 -9
  68. package/_modules/themes/five/src/components/Cart/styles.js +4 -4
  69. package/_modules/themes/five/src/components/CartContent/index.js +11 -24
  70. package/_modules/themes/five/src/components/CartPopover/index.js +44 -4
  71. package/_modules/themes/five/src/components/CartPopover/styles.js +13 -3
  72. package/_modules/themes/five/src/components/Checkout/index.js +81 -30
  73. package/_modules/themes/five/src/components/Header/index.js +1 -5
  74. package/_modules/themes/five/src/components/HomeHero/layouts/KioskHomeHero/index.js +2 -1
  75. package/_modules/themes/five/src/components/HomeHero/layouts/KioskHomeHero/styles.js +1 -1
  76. package/_modules/themes/five/src/components/HorizontalOrdersLayout/index.js +4 -6
  77. package/_modules/themes/five/src/components/HorizontalOrdersLayout/styles.js +5 -5
  78. package/_modules/themes/five/src/components/LoginForm/styles.js +29 -29
  79. package/_modules/themes/five/src/components/Modal/index.js +5 -0
  80. package/_modules/themes/five/src/components/Modal/styles.js +20 -15
  81. package/_modules/themes/five/src/components/MomentControl/Layouts/CustomLayout/styles.js +4 -4
  82. package/_modules/themes/five/src/components/NotNetworkConnectivity/index.js +70 -5
  83. package/_modules/themes/five/src/components/OrderDetails/ActionsSection.js +5 -3
  84. package/_modules/themes/five/src/components/OrderDetails/OrderBillSection.js +3 -1
  85. package/_modules/themes/five/src/components/OrderDetails/index.js +121 -39
  86. package/_modules/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +8 -4
  87. package/_modules/themes/five/src/components/OrderDetails/styles.js +26 -18
  88. package/_modules/themes/five/src/components/OrderProgress/index.js +1 -0
  89. package/_modules/themes/five/src/components/OrdersOption/index.js +6 -0
  90. package/_modules/themes/five/src/components/OrdersOption/styles.js +13 -13
  91. package/_modules/themes/five/src/components/PaymentOptionWallet/index.js +6 -2
  92. package/_modules/themes/five/src/components/PaymentOptions/index.js +25 -3
  93. package/_modules/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
  94. package/_modules/themes/five/src/components/ProductForm/index.js +108 -43
  95. package/_modules/themes/five/src/components/ProductForm/styles.js +19 -21
  96. package/_modules/themes/five/src/components/ProductItemAccordion/index.js +11 -3
  97. package/_modules/themes/five/src/components/ProductOption/index.js +3 -1
  98. package/_modules/themes/five/src/components/ProductOption/styles.js +1 -1
  99. package/_modules/themes/five/src/components/ProfessionalProfile/styles.js +1 -1
  100. package/_modules/themes/five/src/components/ReviewDriver/index.js +330 -0
  101. package/_modules/themes/five/src/components/ReviewDriver/styles.js +137 -0
  102. package/_modules/themes/five/src/components/ReviewOrder/index.js +342 -0
  103. package/_modules/themes/five/src/components/ReviewOrder/styles.js +141 -0
  104. package/_modules/themes/five/src/components/ReviewProduct/index.js +329 -0
  105. package/_modules/themes/five/src/components/ReviewProduct/styles.js +111 -0
  106. package/_modules/themes/five/src/components/ReviewTrigger/index.js +130 -0
  107. package/_modules/themes/five/src/components/ReviewTrigger/styles.js +84 -0
  108. package/_modules/themes/five/src/components/SearchBar/index.js +4 -1
  109. package/_modules/themes/five/src/components/SearchProducts/index.js +1 -0
  110. package/_modules/themes/five/src/components/ServiceForm/index.js +93 -26
  111. package/_modules/themes/five/src/components/ServiceForm/styles.js +38 -14
  112. package/_modules/themes/five/src/components/SignUpBusiness/index.js +4 -1
  113. package/_modules/themes/five/src/components/SignUpDriver/index.js +4 -1
  114. package/_modules/themes/five/src/components/SignUpForm/styles.js +12 -12
  115. package/_modules/themes/five/src/components/SingleOrderCard/index.js +216 -26
  116. package/_modules/themes/five/src/components/SingleOrderCard/styles.js +7 -3
  117. package/_modules/themes/five/src/components/TaxInformation/index.js +3 -5
  118. package/_modules/themes/five/src/components/UserDetails/index.js +132 -9
  119. package/_modules/themes/five/src/components/UserDetails/styles.js +3 -3
  120. package/_modules/themes/five/src/components/UserFormDetails/index.js +69 -20
  121. package/_modules/themes/five/src/components/UserPopover/index.js +13 -7
  122. package/_modules/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +19 -1
  123. package/_modules/themes/five/src/components/UserProfileForm/index.js +119 -23
  124. package/_modules/themes/five/src/components/VerifyCodeForm/index.js +86 -0
  125. package/_modules/themes/five/src/components/VerifyCodeForm/styles.js +32 -0
  126. package/_modules/themes/four/src/components/AccordionDropdown/index.js +46 -0
  127. package/_modules/themes/four/src/components/AccordionDropdown/styles.js +31 -0
  128. package/_modules/themes/four/src/components/BusinessBasicInformation/index.js +2 -5
  129. package/_modules/themes/four/src/components/BusinessProductsCategories/index.js +2 -1
  130. package/_modules/themes/four/src/components/BusinessProductsCategories/layouts/groceries/index.js +128 -0
  131. package/_modules/themes/four/src/components/BusinessProductsCategories/layouts/groceries/styles.js +43 -0
  132. package/_modules/themes/four/src/components/BusinessProductsList/layouts/groceries/index.js +235 -0
  133. package/_modules/themes/four/src/components/BusinessProductsList/layouts/groceries/styles.js +52 -0
  134. package/_modules/themes/four/src/components/BusinessProductsListing/index.js +131 -108
  135. package/_modules/themes/four/src/components/BusinessProductsListing/styles.js +8 -33
  136. package/_modules/themes/four/src/components/ForgotPasswordForm/index.js +4 -1
  137. package/_modules/themes/four/src/components/LoginForm/index.js +4 -1
  138. package/_modules/themes/four/src/components/NotFoundSource/index.js +63 -0
  139. package/_modules/themes/four/src/components/NotFoundSource/styles.js +22 -0
  140. package/_modules/themes/four/src/components/RenderProductsLayout/index.js +301 -0
  141. package/_modules/themes/four/src/components/RenderProductsLayout/styles.js +68 -0
  142. package/_modules/themes/four/src/components/SignUpForm/index.js +4 -1
  143. package/_modules/themes/four/src/components/SingleProductCard/index.js +15 -5
  144. package/_modules/themes/four/src/components/UserFormDetails/index.js +4 -1
  145. package/_modules/themes/franchise/src/components/ForgotPasswordForm/index.js +4 -1
  146. package/_modules/themes/franchise/src/components/LoginForm/index.js +4 -1
  147. package/_modules/themes/franchise/src/components/SignUpForm/index.js +4 -1
  148. package/_modules/themes/franchise/src/components/UserFormDetails/index.js +4 -1
  149. package/_modules/themes/orderAndPay/src/components/ForgotPasswordForm/index.js +4 -1
  150. package/_modules/themes/orderAndPay/src/components/LoginForm/index.js +4 -1
  151. package/_modules/themes/orderAndPay/src/components/SignUpForm/index.js +4 -1
  152. package/_modules/themes/orderAndPay/src/components/UserFormDetails/index.js +4 -1
  153. package/_modules/themes/pwa/src/components/ForgotPasswordForm/index.js +4 -1
  154. package/_modules/themes/pwa/src/components/LoginForm/index.js +4 -1
  155. package/_modules/themes/pwa/src/components/SignUpForm/index.js +4 -1
  156. package/_modules/themes/pwa/src/components/UserFormDetails/index.js +4 -1
  157. package/_modules/themes/seven/index.js +4 -4
  158. package/_modules/themes/seven/src/components/ForgotPasswordForm/index.js +4 -1
  159. package/_modules/themes/seven/src/components/LoginForm/index.js +4 -1
  160. package/_modules/themes/seven/src/components/SignUpForm/index.js +4 -1
  161. package/_modules/themes/seven/src/components/SignUpForm/styles.js +1 -1
  162. package/_modules/themes/seven/src/components/UserFormDetails/index.js +4 -1
  163. package/_modules/themes/six/index.js +3 -3
  164. package/_modules/themes/six/src/components/AddressForm/index.js +3 -3
  165. package/_modules/themes/six/src/components/BusinessBasicInformation/index.js +16 -7
  166. package/_modules/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +6 -2
  167. package/_modules/themes/six/src/components/BusinessProductsListing/index.js +21 -27
  168. package/_modules/themes/six/src/components/DriverTips/index.js +2 -2
  169. package/_modules/themes/six/src/components/ForgotPasswordForm/index.js +4 -1
  170. package/_modules/themes/six/src/components/LoginForm/index.js +7 -4
  171. package/_modules/themes/six/src/components/PaymentOptionCash/index.js +2 -2
  172. package/_modules/themes/six/src/components/ProductForm/index.js +2 -2
  173. package/_modules/themes/six/src/components/SearchBar/index.js +2 -2
  174. package/_modules/themes/six/src/components/SignUpForm/index.js +8 -5
  175. package/_modules/themes/six/src/components/UserFormDetails/index.js +8 -5
  176. package/_modules/themes/three/src/components/ForgotPasswordForm/index.js +4 -1
  177. package/_modules/themes/three/src/components/LoginForm/index.js +4 -1
  178. package/_modules/themes/three/src/components/SignUpForm/index.js +4 -1
  179. package/_modules/themes/two/src/components/ForgotPasswordForm/index.js +4 -1
  180. package/_modules/themes/two/src/components/LoginForm/index.js +4 -1
  181. package/_modules/themes/two/src/components/SignUpForm/index.js +4 -1
  182. package/package.json +3 -3
  183. package/src/components/BusinessBasicInformation/index.js +64 -41
  184. package/src/components/BusinessProductsList/index.js +3 -3
  185. package/src/components/BusinessProductsList/layouts/groceries/index.js +3 -3
  186. package/src/components/Checkout/index.js +1 -0
  187. package/src/components/ForgotPasswordForm/index.js +3 -1
  188. package/src/components/Header/index.js +1 -1
  189. package/src/components/LoginForm/index.js +30 -28
  190. package/src/components/OrderDetails/index.js +101 -58
  191. package/src/components/PaymentOptionSquare/index.js +4 -8
  192. package/src/components/PaymentOptionSquare/styles.js +4 -1
  193. package/src/components/PaymentOptions/index.js +3 -0
  194. package/src/components/ProductItemAccordion/index.js +5 -3
  195. package/src/components/RenderProductsLayout/SearchProducts/index.js +3 -2
  196. package/src/components/RenderProductsLayout/index.js +13 -25
  197. package/src/components/SignUpForm/index.js +4 -2
  198. package/src/components/SingleProductCard/index.js +3 -3
  199. package/src/components/TaxInformation/index.js +1 -1
  200. package/src/components/UserFormDetails/index.js +35 -26
  201. package/src/components/UserProfileForm/ProfileOptions/index.js +12 -1
  202. package/src/components/UserProfileForm/index.js +70 -41
  203. package/src/components/UserProfileForm/styles.js +3 -1
  204. package/src/hooks/useCountdownTimer.js +9 -9
  205. package/src/index.js +28 -2
  206. package/src/themes/callcenterOriginal/src/components/BusinessProductsList/layouts/groceries/styles.js +1 -0
  207. package/src/themes/callcenterOriginal/src/components/BusinessProductsList/styles.js +4 -0
  208. package/src/themes/callcenterOriginal/src/components/ForgotPasswordForm/index.js +3 -1
  209. package/src/themes/callcenterOriginal/src/components/LoginForm/index.js +3 -1
  210. package/src/themes/callcenterOriginal/src/components/SignUpBusiness/index.js +3 -1
  211. package/src/themes/callcenterOriginal/src/components/SignUpForm/index.js +3 -1
  212. package/src/themes/callcenterOriginal/src/components/UserFormDetails/index.js +21 -19
  213. package/src/themes/eight/src/components/BusinessProductsList/index.js +3 -3
  214. package/src/themes/eight/src/components/LoginForm/index.js +34 -32
  215. package/src/themes/eight/src/components/SignUpForm/index.js +4 -2
  216. package/src/themes/eight/src/components/SingleProductCard/index.js +3 -3
  217. package/src/themes/five/index.js +15 -2
  218. package/src/themes/five/src/components/AddressDetails/index.js +0 -10
  219. package/src/themes/five/src/components/AddressForm/index.js +58 -45
  220. package/src/themes/five/src/components/AddressForm/styles.js +1 -1
  221. package/src/themes/five/src/components/AddressList/index.js +52 -28
  222. package/src/themes/five/src/components/AddressList/styles.js +9 -2
  223. package/src/themes/five/src/components/BusinessInformation/index.js +52 -37
  224. package/src/themes/five/src/components/BusinessItemAccordion/index.js +36 -3
  225. package/src/themes/five/src/components/BusinessItemAccordion/styles.js +46 -0
  226. package/src/themes/five/src/components/BusinessListingSearch/index.js +39 -1
  227. package/src/themes/five/src/components/BusinessPreorder/index.js +8 -4
  228. package/src/themes/five/src/components/BusinessPreorder/styles.js +1 -0
  229. package/src/themes/five/src/components/BusinessProductsCategories/index.js +89 -58
  230. package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
  231. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/index.js +1 -1
  232. package/src/themes/five/src/components/BusinessProductsList/layouts/groceries/styles.js +7 -1
  233. package/src/themes/five/src/components/BusinessProductsList/styles.js +8 -3
  234. package/src/themes/five/src/components/BusinessReviews/index.js +84 -56
  235. package/src/themes/five/src/components/BusinessesListing/index.js +8 -7
  236. package/src/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/index.js +9 -3
  237. package/src/themes/five/src/components/BusinessesListing/layouts/AppointmentsBusinessListing/styles.js +8 -2
  238. package/src/themes/five/src/components/Cart/index.js +15 -4
  239. package/src/themes/five/src/components/Cart/styles.js +6 -0
  240. package/src/themes/five/src/components/CartContent/index.js +10 -23
  241. package/src/themes/five/src/components/CartPopover/index.js +50 -12
  242. package/src/themes/five/src/components/CartPopover/styles.js +27 -0
  243. package/src/themes/five/src/components/Checkout/index.js +38 -3
  244. package/src/themes/five/src/components/Header/index.js +2 -3
  245. package/src/themes/five/src/components/HomeHero/layouts/KioskHomeHero/index.js +1 -1
  246. package/src/themes/five/src/components/HomeHero/layouts/KioskHomeHero/styles.js +1 -1
  247. package/src/themes/five/src/components/HorizontalOrdersLayout/index.js +2 -2
  248. package/src/themes/five/src/components/HorizontalOrdersLayout/styles.js +18 -0
  249. package/src/themes/five/src/components/LoginForm/styles.js +4 -1
  250. package/src/themes/five/src/components/Modal/index.js +5 -0
  251. package/src/themes/five/src/components/Modal/styles.js +36 -0
  252. package/src/themes/five/src/components/MomentControl/Layouts/CustomLayout/styles.js +22 -0
  253. package/src/themes/five/src/components/NotNetworkConnectivity/index.js +28 -2
  254. package/src/themes/five/src/components/OrderDetails/ActionsSection.js +14 -10
  255. package/src/themes/five/src/components/OrderDetails/OrderBillSection.js +1 -1
  256. package/src/themes/five/src/components/OrderDetails/index.js +102 -61
  257. package/src/themes/five/src/components/OrderDetails/layouts/Kiosk/index.js +6 -5
  258. package/src/themes/five/src/components/OrderDetails/styles.js +64 -1
  259. package/src/themes/five/src/components/OrderProgress/index.js +1 -0
  260. package/src/themes/five/src/components/OrdersOption/index.js +3 -2
  261. package/src/themes/five/src/components/OrdersOption/styles.js +25 -0
  262. package/src/themes/five/src/components/PaymentOptionWallet/index.js +41 -41
  263. package/src/themes/five/src/components/PaymentOptions/index.js +23 -2
  264. package/src/themes/five/src/components/PhoneAutocomplete/index.js +1 -1
  265. package/src/themes/five/src/components/ProductForm/index.js +147 -100
  266. package/src/themes/five/src/components/ProductForm/styles.js +68 -12
  267. package/src/themes/five/src/components/ProductItemAccordion/index.js +9 -5
  268. package/src/themes/five/src/components/ProductOption/index.js +1 -1
  269. package/src/themes/five/src/components/ProductOption/styles.js +5 -1
  270. package/src/themes/five/src/components/ProfessionalProfile/styles.js +1 -0
  271. package/src/themes/five/src/components/ReviewDriver/index.js +253 -0
  272. package/src/themes/five/src/components/ReviewDriver/styles.js +233 -0
  273. package/src/themes/five/src/components/ReviewOrder/index.js +241 -0
  274. package/src/themes/five/src/components/ReviewOrder/styles.js +253 -0
  275. package/src/themes/five/src/components/ReviewProduct/index.js +251 -0
  276. package/src/themes/five/src/components/ReviewProduct/styles.js +158 -0
  277. package/src/themes/five/src/components/ReviewTrigger/index.js +86 -0
  278. package/src/themes/five/src/components/ReviewTrigger/styles.js +121 -0
  279. package/src/themes/five/src/components/SearchBar/index.js +1 -0
  280. package/src/themes/five/src/components/SearchProducts/index.js +2 -0
  281. package/src/themes/five/src/components/ServiceForm/index.js +93 -22
  282. package/src/themes/five/src/components/ServiceForm/styles.js +43 -2
  283. package/src/themes/five/src/components/SignUpBusiness/index.js +5 -3
  284. package/src/themes/five/src/components/SignUpDriver/index.js +5 -3
  285. package/src/themes/five/src/components/SignUpForm/styles.js +33 -0
  286. package/src/themes/five/src/components/SingleOrderCard/index.js +118 -22
  287. package/src/themes/five/src/components/SingleOrderCard/styles.js +5 -0
  288. package/src/themes/five/src/components/TaxInformation/index.js +1 -1
  289. package/src/themes/five/src/components/UserDetails/index.js +122 -19
  290. package/src/themes/five/src/components/UserDetails/styles.js +7 -0
  291. package/src/themes/five/src/components/UserFormDetails/index.js +108 -63
  292. package/src/themes/five/src/components/UserPopover/index.js +6 -6
  293. package/src/themes/five/src/components/UserProfileForm/ProfileOptions/index.js +12 -1
  294. package/src/themes/five/src/components/UserProfileForm/index.js +130 -38
  295. package/src/themes/five/src/components/VerifyCodeForm/index.js +64 -0
  296. package/src/themes/five/src/components/VerifyCodeForm/styles.js +82 -0
  297. package/src/themes/four/src/components/AccordionDropdown/index.js +47 -0
  298. package/src/themes/four/src/components/AccordionDropdown/styles.js +25 -0
  299. package/src/themes/four/src/components/BusinessBasicInformation/index.js +16 -22
  300. package/src/themes/four/src/components/BusinessProductsCategories/index.js +1 -1
  301. package/src/themes/four/src/components/BusinessProductsCategories/layouts/groceries/index.js +125 -0
  302. package/src/themes/four/src/components/BusinessProductsCategories/layouts/groceries/styles.js +52 -0
  303. package/src/themes/four/src/components/BusinessProductsList/layouts/groceries/index.js +237 -0
  304. package/src/themes/four/src/components/BusinessProductsList/layouts/groceries/styles.js +62 -0
  305. package/src/themes/four/src/components/BusinessProductsListing/index.js +69 -113
  306. package/src/themes/four/src/components/BusinessProductsListing/styles.js +1 -71
  307. package/src/themes/four/src/components/ForgotPasswordForm/index.js +3 -1
  308. package/src/themes/four/src/components/LoginForm/index.js +48 -46
  309. package/src/themes/four/src/components/NotFoundSource/index.js +66 -0
  310. package/src/themes/four/src/components/NotFoundSource/styles.js +27 -0
  311. package/src/themes/four/src/components/RenderProductsLayout/index.js +306 -0
  312. package/src/themes/four/src/components/RenderProductsLayout/styles.js +177 -0
  313. package/src/themes/four/src/components/SignUpForm/index.js +4 -2
  314. package/src/themes/four/src/components/SingleProductCard/index.js +35 -23
  315. package/src/themes/four/src/components/UserFormDetails/index.js +21 -19
  316. package/src/themes/franchise/src/components/ForgotPasswordForm/index.js +3 -1
  317. package/src/themes/franchise/src/components/LoginForm/index.js +32 -30
  318. package/src/themes/franchise/src/components/SignUpForm/index.js +3 -1
  319. package/src/themes/franchise/src/components/UserFormDetails/index.js +21 -19
  320. package/src/themes/orderAndPay/src/components/ForgotPasswordForm/index.js +3 -1
  321. package/src/themes/orderAndPay/src/components/LoginForm/index.js +33 -31
  322. package/src/themes/orderAndPay/src/components/SignUpForm/index.js +11 -9
  323. package/src/themes/orderAndPay/src/components/UserFormDetails/index.js +21 -19
  324. package/src/themes/pwa/src/components/ForgotPasswordForm/index.js +3 -1
  325. package/src/themes/pwa/src/components/LoginForm/index.js +32 -30
  326. package/src/themes/pwa/src/components/SignUpForm/index.js +3 -1
  327. package/src/themes/pwa/src/components/UserFormDetails/index.js +3 -1
  328. package/src/themes/seven/index.js +4 -4
  329. package/src/themes/seven/src/components/CouponControl/index.js +0 -1
  330. package/src/themes/seven/src/components/ForgotPasswordForm/index.js +3 -1
  331. package/src/themes/seven/src/components/LoginForm/index.js +5 -3
  332. package/src/themes/seven/src/components/OrderDetails/index.js +1 -1
  333. package/src/themes/seven/src/components/SignUpForm/index.js +3 -1
  334. package/src/themes/seven/src/components/SignUpForm/styles.js +1 -0
  335. package/src/themes/seven/src/components/UserFormDetails/index.js +3 -1
  336. package/src/themes/six/index.js +3 -3
  337. package/src/themes/six/src/components/AddressForm/index.js +1 -1
  338. package/src/themes/six/src/components/BusinessBasicInformation/index.js +57 -34
  339. package/src/themes/six/src/components/BusinessProductsListing/SearchProducts/index.js +3 -2
  340. package/src/themes/six/src/components/BusinessProductsListing/index.js +7 -13
  341. package/src/themes/six/src/components/DriverTips/index.js +1 -1
  342. package/src/themes/six/src/components/ForgotPasswordForm/index.js +3 -1
  343. package/src/themes/six/src/components/LoginForm/index.js +33 -31
  344. package/src/themes/six/src/components/PaymentOptionCash/index.js +1 -1
  345. package/src/themes/six/src/components/ProductForm/index.js +1 -1
  346. package/src/themes/six/src/components/SearchBar/index.js +1 -1
  347. package/src/themes/six/src/components/SignUpForm/index.js +4 -2
  348. package/src/themes/six/src/components/UserFormDetails/index.js +22 -20
  349. package/src/themes/three/src/components/ForgotPasswordForm/index.js +3 -1
  350. package/src/themes/three/src/components/LoginForm/index.js +52 -50
  351. package/src/themes/three/src/components/SignUpForm/index.js +10 -8
  352. package/src/themes/two/src/components/ForgotPasswordForm/index.js +3 -1
  353. package/src/themes/two/src/components/LoginForm/index.js +42 -40
  354. package/src/themes/two/src/components/SignUpForm/index.js +10 -8
  355. package/template/components/ListenPageChanges/index.js +1 -1
  356. package/template/pages/Checkout/index.js +0 -1
  357. package/template/pages/Home/styles.js +0 -14
  358. package/_bundles/ordering-ui.f64ae9230411e0edb7d6.js +0 -2
  359. package/_modules/themes/five/src/components/FavoriteBusinesses/index.js +0 -268
  360. package/_modules/themes/five/src/components/FavoriteBusinesses/styles.js +0 -53
  361. package/_modules/themes/five/src/components/FavoriteOrders/index.js +0 -353
  362. package/_modules/themes/five/src/components/FavoriteOrders/styles.js +0 -53
  363. package/_modules/themes/five/src/components/FavoriteProducts/index.js +0 -190
  364. package/_modules/themes/five/src/components/FavoriteProducts/styles.js +0 -53
  365. package/src/themes/five/src/components/FavoriteBusinesses/index.js +0 -217
  366. package/src/themes/five/src/components/FavoriteBusinesses/styles.js +0 -85
  367. package/src/themes/five/src/components/FavoriteOrders/index.js +0 -225
  368. package/src/themes/five/src/components/FavoriteOrders/styles.js +0 -87
  369. package/src/themes/five/src/components/FavoriteProducts/index.js +0 -165
  370. package/src/themes/five/src/components/FavoriteProducts/styles.js +0 -87
@@ -1,3 +1,4 @@
1
+ import React from 'react'
1
2
  import styled, { css } from 'styled-components'
2
3
 
3
4
  export const AccordionSection = styled.div`
@@ -96,6 +97,10 @@ export const ContentInfo = styled.div`
96
97
  margin-left: 0;
97
98
  `}
98
99
 
100
+ span {
101
+ cursor: pointer;
102
+ }
103
+
99
104
  h2, span {
100
105
  margin: 0px;
101
106
  }
@@ -216,3 +221,44 @@ export const PriceContainer = styled.div`
216
221
  height: 50px;
217
222
  }
218
223
  `
224
+
225
+ const BusinessLogoStyled = styled.div`
226
+ display: flex;
227
+ width: 75px;
228
+ height: 75px;
229
+ min-height: 75px;
230
+ box-sizing: border-box;
231
+ position: relative;
232
+ background-repeat: no-repeat, repeat;
233
+ background-size: contain;
234
+ object-fit: contain;
235
+ background-position: center;
236
+ border-radius: 10px;
237
+ `
238
+
239
+ export const BusinessLogo = (props) => {
240
+ return (
241
+ <BusinessLogoStyled
242
+ {...props}
243
+ style={{ backgroundImage: `url(${props.bgimage})` }}
244
+ >
245
+ {props.children}
246
+ </BusinessLogoStyled>
247
+ )
248
+ }
249
+
250
+ export const WrapperBusinessLogo = styled.div`
251
+ max-width: 75px;
252
+ max-height: 75px;
253
+ height: 75px;
254
+ width: 75px;
255
+ margin-right: 10px;
256
+ `
257
+
258
+ export const TimeContainer = styled.div`
259
+ svg{
260
+ position: relative;
261
+ top: 1px;
262
+ margin-right: 5px;
263
+ }
264
+ `
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
  import {
3
3
  BusinessListingSearchContainer,
4
4
  FiltersContainer,
@@ -51,6 +51,8 @@ import { NotFoundSource } from '../NotFoundSource'
51
51
  import { useWindowSize } from '../../../../../hooks/useWindowSize'
52
52
  import BisDownArrow from '@meronex/icons/bi/BisDownArrow'
53
53
  import BisUpArrow from '@meronex/icons/bi/BisUpArrow'
54
+ import { Modal } from '../Modal'
55
+ import { ProductForm } from '../ProductForm'
54
56
 
55
57
  export const BusinessListingSearchUI = (props) => {
56
58
  const {
@@ -72,6 +74,7 @@ export const BusinessListingSearchUI = (props) => {
72
74
  const [orderState] = useOrder()
73
75
  const [, t] = useLanguage()
74
76
  const theme = useTheme()
77
+ const [curProduct, setCurProduct] = useState({ business: null, product: null })
75
78
  const [{ parsePrice, optimizeImage, parseDistance }] = useUtils()
76
79
  const [{ auth }] = useSession()
77
80
  const { width } = useWindowSize()
@@ -107,6 +110,19 @@ export const BusinessListingSearchUI = (props) => {
107
110
  else handleChangeFilters('price_level', value)
108
111
  }
109
112
 
113
+ const onProductClick = (product, business) => {
114
+ setCurProduct({ business: business, product: product })
115
+ }
116
+
117
+ const handleRedirectToCart = (product, code) => {
118
+ setCurProduct({ business: null, product: null })
119
+ onBusinessClick(curProduct?.business)
120
+ }
121
+
122
+ const closeModalProductForm = () => {
123
+ setCurProduct({ business: null, product: null })
124
+ }
125
+
110
126
  const MaxSectionItem = ({ title, options, filter }) => {
111
127
  const parseValue = (option) => {
112
128
  return filter === 'max_distance'
@@ -144,6 +160,7 @@ export const BusinessListingSearchUI = (props) => {
144
160
  <SearchBar
145
161
  lazyLoad
146
162
  isCustomLayout
163
+ forceFocus
147
164
  placeholder={`${t('SEARCH_BUSINESSES', 'Search Businesses')} / ${t('PLEASE_TYPE_AT_LEAST_3_CHARACTERS', 'Please type at least 3 characters')}`}
148
165
  onSearch={(val) => handleChangeTermValue(val)}
149
166
  search={termValue}
@@ -354,6 +371,7 @@ export const BusinessListingSearchUI = (props) => {
354
371
  isSoldOut={(product.inventoried && !product.quantity)}
355
372
  product={product}
356
373
  businessId={business?.id}
374
+ onProductClick={(product) => onProductClick(product, business)}
357
375
  handleUpdateProducts={(productId, changes) => handleUpdateProducts(productId, category?.id, business?.id, changes)}
358
376
  />
359
377
  )))}
@@ -396,6 +414,26 @@ export const BusinessListingSearchUI = (props) => {
396
414
  </ProductsList>
397
415
  </FiltersResultContainer>
398
416
  </FiltersContainer>
417
+ <Modal
418
+ width={props?.useKioskApp ? '80%' : '760px'}
419
+ open={!!curProduct?.product}
420
+ closeOnBackdrop
421
+ onClose={() => closeModalProductForm()}
422
+ padding='0'
423
+ isProductForm
424
+ disableOverflowX
425
+ >
426
+ {(!!curProduct?.product) && (
427
+ <ProductForm
428
+ businessSlug={curProduct?.business?.slug}
429
+ useKioskApp={props?.useKioskApp}
430
+ businessId={curProduct?.business?.id}
431
+ categoryId={curProduct?.product?.category_id}
432
+ productId={curProduct?.product?.id}
433
+ onSave={handleRedirectToCart}
434
+ />
435
+ )}
436
+ </Modal>
399
437
  </BusinessListingSearchContainer>
400
438
  )
401
439
  }
@@ -145,7 +145,7 @@ const BusinessPreorderUI = (props) => {
145
145
  const selectedMenu = menu ? (menu?.use_business_schedule ? business : menu) : business
146
146
  const _times = getTimes(dateSelected, selectedMenu)
147
147
  setTimeList(_times)
148
- }, [dateSelected, menu])
148
+ }, [dateSelected, menu, business])
149
149
 
150
150
  useEffect(() => {
151
151
  if (type === 'business_hours') setMenu(null)
@@ -254,12 +254,16 @@ const BusinessPreorderUI = (props) => {
254
254
  ))}
255
255
  </>
256
256
  ) : (
257
- <ClosedBusinessMsg>{t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')}</ClosedBusinessMsg>
257
+ <ClosedBusinessMsg>
258
+ {!isProfessional
259
+ ? t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')
260
+ : t('PROFESSIONAL_NOT_AVAILABLE', 'Professional is not available at the moment')}
261
+ </ClosedBusinessMsg>
258
262
  )}
259
263
  </TimeListWrapper>
260
264
  </OrderTimeWrapper>
261
265
  )}
262
- {!isPreOrderSetting && (
266
+ {!isPreOrderSetting && !isProfessional && (
263
267
  <ClosedBusinessMsg>{t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment')}</ClosedBusinessMsg>
264
268
  )}
265
269
  {showButton && (
@@ -275,7 +279,7 @@ const BusinessPreorderUI = (props) => {
275
279
  </ButtonWrapper>
276
280
  )}
277
281
  {orderState?.loading && (
278
- <Layer>
282
+ <Layer nobg={!!isProfessional}>
279
283
  {(window.location.pathname !== '/search' || orderState?.options?.address?.location) && (
280
284
  <SpinnerLoader
281
285
  style={{
@@ -256,6 +256,7 @@ export const TypeContent = styled.div`
256
256
  export const Layer = styled.div`
257
257
  ${({ nobg }) => !nobg && css`
258
258
  background-color: rgba(255, 255, 255, 0.7);
259
+ z-index: 1;
259
260
  `}
260
261
  position: absolute;
261
262
  top: 0;
@@ -18,8 +18,12 @@ const BusinessProductsCategoriesUI = (props) => {
18
18
  } = props
19
19
 
20
20
  const [selectedCategory, setSelectedCateogry] = useState({ id: null })
21
+ const scrollTopSpan = 60
21
22
 
22
23
  const handleChangeCategory = (category) => {
24
+ const isBlockScroll = window.location.search.includes('category') &&
25
+ window.location.search.includes('product')
26
+
23
27
  if (business?.lazy_load_products_recommended) {
24
28
  handlerClickCategory({ ...category })
25
29
  return
@@ -27,11 +31,13 @@ const BusinessProductsCategoriesUI = (props) => {
27
31
  let topPos = 0
28
32
  if (!category?.id) topPos = document.getElementById('businessProductList')?.offsetTop
29
33
  else topPos = document.getElementById(`category${category.id}`)?.offsetTop
30
- window.scroll({
31
- top: topPos - 60,
32
- left: 0,
33
- behavior: 'smooth'
34
- })
34
+ if (!isBlockScroll) {
35
+ window.scroll({
36
+ top: topPos - scrollTopSpan,
37
+ left: 0,
38
+ behavior: 'smooth'
39
+ })
40
+ }
35
41
  }
36
42
 
37
43
  const ProductCategories = () => {
@@ -39,6 +45,7 @@ const BusinessProductsCategoriesUI = (props) => {
39
45
  categories && categories.length && categories.map((category, i) => (
40
46
  <Tab
41
47
  key={i}
48
+ id={`category-menu${category?.id || '-all'}`}
42
49
  className={`category ${category.id === 'featured' ? 'special' : ''}`}
43
50
  active={business?.lazy_load_products_recommended ? (categorySelected?.id === category.id) : (selectedCategory?.id === category.id)}
44
51
  onClick={() => handleChangeCategory(category)}
@@ -50,66 +57,90 @@ const BusinessProductsCategoriesUI = (props) => {
50
57
  )
51
58
  }
52
59
 
53
- useEffect(() => {
54
- const handleScroll = () => {
55
- if (business?.lazy_load_products_recommended) return
56
- const featuredElement = document.getElementById('categoryfeatured')
57
- const _categories = featuredElement ? [...categories] : categories.filter(category => category.id !== 'featured')
58
- _categories?.length && _categories.forEach(category => {
59
- const windowTop = window.scrollY
60
- let topPos = 0
61
- if (!category?.id) topPos = document.getElementById('businessProductList')?.offsetTop
62
- else topPos = document.getElementById(`category${category.id}`)?.offsetTop
63
-
64
- if (windowTop >= (topPos - 60)) {
65
- setSelectedCateogry(category)
60
+ const handleScroll = () => {
61
+ if (business?.lazy_load_products_recommended) return
62
+ const featuredElement = document.getElementById('categoryfeatured')
63
+ const _categories = featuredElement ? [...categories] : categories.filter(category => category.id !== 'featured')
64
+
65
+ const windowTop = window.scrollY
66
+ const categoryListsElement = document.getElementById('category-lists')
67
+ const categoryAreaWidth = categoryListsElement?.clientWidth || 0
68
+ const categoryScrollChange = categoryListsElement?.scrollLeft
69
+
70
+ const _diff = -50
71
+ const _moveDiff = 30
72
+
73
+ _categories?.length && _categories.some(category => {
74
+ const topPos = category?.id ? document.getElementById(`category${category.id}`)?.offsetTop
75
+ : document.getElementById('businessProductList')?.offsetTop
76
+
77
+ if (topPos - windowTop < scrollTopSpan + 5 && topPos - windowTop > 0 && category?.id) {
78
+ const choosedCategory = document.getElementById(`category-menu${category?.id || '-all'}`)
79
+ const choosedCategoryLeft = choosedCategory?.offsetLeft || 0
80
+
81
+ if (choosedCategoryLeft - categoryAreaWidth - categoryScrollChange > _diff || categoryScrollChange - choosedCategoryLeft > 0) {
82
+ const moveAmount = (choosedCategoryLeft < 100) ? 0 : choosedCategoryLeft - _moveDiff
83
+ categoryListsElement.scrollTo({
84
+ top: 0,
85
+ left: moveAmount,
86
+ behavior: 'smooth'
87
+ })
66
88
  }
67
- })
89
+ setSelectedCateogry(category)
90
+ return true
91
+ }
92
+ })
93
+
94
+ const navbar = document.getElementById('category-lists')
95
+ const cart = document.getElementById('BusinessCartContainer')
96
+ const search = document.getElementById('WrapperSearchAbsolute')
97
+ const wrapperCategories = document.getElementById('wrapper-categories')
98
+ const limit = window.pageYOffset >= wrapperCategories?.offsetTop && window.pageYOffset > 0
68
99
 
69
- const navbar = document.getElementById('category-lists')
70
- const cart = document.getElementById('BusinessCartContainer')
71
- const search = document.getElementById('WrapperSearchAbsolute')
72
- const wrapperCategories = document.getElementById('wrapper-categories')
73
-
74
- const styleSheet = document.getElementById('styles').sheet
75
-
76
- let style0 = '.sticky-prod-cat {'
77
- style0 += 'position: fixed !important;'
78
- style0 += 'top: 0 !important;'
79
- style0 += 'width: 65.5% !important;'
80
- style0 += '}'
81
-
82
- let style1 = '.sticky-prod-cart {'
83
- style1 += 'position: fixed !important;'
84
- style1 += 'top: 0 !important;'
85
- style1 += 'right: 2.5% !important;'
86
- style1 += 'width: 28.5% !important;'
87
- style1 += '}'
88
-
89
- let style2 = '.sticky-search {'
90
- style2 += 'position: fixed !important;'
91
- style2 += 'top: 10px !important;'
92
- style2 += 'right: 32% !important;'
93
- style2 += 'height: 50px !important;'
94
- style2 += 'z-index: 9999 !important;'
95
- style2 += '}'
96
-
97
- styleSheet.insertRule(style0, 0)
98
- styleSheet.insertRule(style1, 1)
99
- styleSheet.insertRule(style2, 2)
100
-
101
- const limit = window.pageYOffset >= wrapperCategories?.offsetTop && window.pageYOffset > 0
102
-
103
- if (limit) {
100
+ if (limit) {
101
+ const classAdded = navbar.classList.contains('sticky-prod-cat')
102
+ if (!classAdded) {
104
103
  navbar && navbar.classList.add('sticky-prod-cat')
105
104
  cart && cart.classList.add('sticky-prod-cart')
106
105
  search && search.classList.add('sticky-search')
107
- } else {
108
- navbar && navbar.classList.remove('sticky-prod-cat')
109
- cart && cart.classList.remove('sticky-prod-cart')
110
- search && search.classList.remove('sticky-search')
111
106
  }
107
+ } else {
108
+ navbar && navbar.classList.remove('sticky-prod-cat')
109
+ cart && cart.classList.remove('sticky-prod-cart')
110
+ search && search.classList.remove('sticky-search')
112
111
  }
112
+ }
113
+
114
+ useEffect(() => {
115
+ const styleSheet = document.getElementById('styles').sheet
116
+
117
+ let style0 = '.sticky-prod-cat {'
118
+ style0 += 'position: fixed !important;'
119
+ style0 += 'top: 0 !important;'
120
+ style0 += 'width: 97% !important;'
121
+ style0 += 'padding: 15px 5px 0px 0px;'
122
+ style0 += '}'
123
+
124
+ let style1 = '.sticky-prod-cart {'
125
+ style1 += 'position: fixed !important;'
126
+ style1 += 'top: 0 !important;'
127
+ style1 += 'right: 2.5% !important;'
128
+ style1 += 'width: 28.5% !important;'
129
+ style1 += 'margin-top: 32px !important;'
130
+ style1 += '}'
131
+
132
+ let style2 = '.sticky-search {'
133
+ style2 += 'position: fixed !important;'
134
+ style2 += 'top: 10px !important;'
135
+ style2 += 'right: 32% !important;'
136
+ style2 += 'height: 50px !important;'
137
+ style2 += 'z-index: 9999 !important;'
138
+ style2 += '}'
139
+
140
+ styleSheet.insertRule(style0, 0)
141
+ styleSheet.insertRule(style1, 1)
142
+ styleSheet.insertRule(style2, 2)
143
+
113
144
  window.addEventListener('scroll', handleScroll)
114
145
  return () => window.removeEventListener('scroll', handleScroll)
115
146
  }, [])
@@ -6,7 +6,7 @@ export const CategoriesContainer = styled.div`
6
6
  padding: 5px 0px 0px 0px;
7
7
  background: ${props => props.theme.colors.backgroundPage};
8
8
  z-index: 1000;
9
- position: sticky;
9
+ position: absolute;
10
10
  top: 0;
11
11
  border-bottom: 1px solid #D9D9D9;
12
12
  text-align: center;
@@ -50,7 +50,7 @@ const BusinessProductsListUI = (props) => {
50
50
  return (
51
51
  <ProductsContainer>
52
52
  {category?.id && (
53
- <WrapAllCategories id='container'>
53
+ <WrapAllCategories id='container' isCategorySelected>
54
54
  <HeaderWrapper>
55
55
  <div className='category-title'>
56
56
  {
@@ -22,12 +22,13 @@ export const WrapAllCategories = styled.div`
22
22
  .category-title {
23
23
  display: flex;
24
24
  align-items: center;
25
+ justify-content: ${({ isCategorySelected }) => isCategorySelected ? 'flex-start' : 'space-between'};
25
26
  margin-left: 10px;
26
- width: 100%;
27
27
  ${props => props.theme?.rtl && css`
28
28
  margin-right: 10px;
29
29
  margin-left: 0;
30
30
  `}
31
+
31
32
  img {
32
33
  border-radius: 7.6px;
33
34
  min-width: 41px;
@@ -52,6 +53,7 @@ export const WrapAllCategories = styled.div`
52
53
  cursor: pointer;
53
54
  }
54
55
  }
56
+
55
57
  .wrap-header {
56
58
  display: flex;
57
59
  justify-content: space-between;
@@ -114,16 +116,20 @@ export const RibbonBox = styled.div`
114
116
  -webkit-line-clamp: 2;
115
117
  overflow: hidden;
116
118
  margin-left: 5px;
119
+
117
120
  ${props => props.theme.rtl && css`
118
121
  margin-left: 0px;
119
122
  margin-right: 5px;
120
123
  `}
124
+
121
125
  ${({ bgColor }) => bgColor && css`
122
126
  background-color: ${bgColor};
123
127
  `}
128
+
124
129
  ${({ isRoundRect }) => isRoundRect && css`
125
130
  border-radius: 7.6px;
126
131
  `}
132
+
127
133
  ${({ isCapsule }) => isCapsule && css`
128
134
  border-radius: 50px;
129
135
  `}
@@ -31,6 +31,7 @@ export const WrapAllCategories = styled.div`
31
31
  margin-right: 10px;
32
32
  margin-left: 0;
33
33
  `}
34
+
34
35
  img {
35
36
  border-radius: 7.6px;
36
37
  min-width: 41px;
@@ -43,10 +44,12 @@ export const WrapAllCategories = styled.div`
43
44
  margin-right: 0;
44
45
  `}
45
46
  }
47
+
46
48
  @media (min-width: 993px) {
47
49
  margin: 0px;
48
50
  }
49
51
  }
52
+
50
53
  h3 {
51
54
  font-weight: 600;
52
55
  font-size: 24px;
@@ -55,6 +58,7 @@ export const WrapAllCategories = styled.div`
55
58
  ${props => props.theme?.rtl && css`
56
59
  margin: 0px 10px 0px 0px;
57
60
  `}
61
+
58
62
  @media (min-width: 993px) {
59
63
  margin: 0px;
60
64
  }
@@ -104,9 +108,6 @@ export const DescriptionModalContainer = styled.div`
104
108
  min-height: 200px;
105
109
  margin-bottom: 20px;
106
110
  }
107
- p{
108
- white-space: pre;
109
- }
110
111
  `
111
112
 
112
113
  export const DescriptionContainer = styled.div`
@@ -141,16 +142,20 @@ export const RibbonBox = styled.div`
141
142
  -webkit-line-clamp: 2;
142
143
  overflow: hidden;
143
144
  margin-left: 5px;
145
+
144
146
  ${props => props.theme.rtl && css`
145
147
  margin-left: 0px;
146
148
  margin-right: 5px;
147
149
  `}
150
+
148
151
  ${({ bgColor }) => bgColor && css`
149
152
  background-color: ${bgColor};
150
153
  `}
154
+
151
155
  ${({ isRoundRect }) => isRoundRect && css`
152
156
  border-radius: 7.6px;
153
157
  `}
158
+
154
159
  ${({ isCapsule }) => isCapsule && css`
155
160
  border-radius: 50px;
156
161
  `}
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import Skeleton from 'react-loading-skeleton'
3
- import { BusinessReviews as BusinessReviewController, useLanguage } from 'ordering-components-external'
3
+ import { BusinessReviews as BusinessReviewController, useLanguage, useOrderingTheme } from 'ordering-components-external'
4
4
  import { useTheme } from '../../../../../contexts/ThemeContext'
5
5
  import moment from 'moment'
6
6
 
@@ -28,12 +28,20 @@ export const BusinessReviewsUI = (props) => {
28
28
  const { stars, reviewsList, handleClickOption } = props
29
29
  const [, t] = useLanguage()
30
30
  const [theme] = useTheme()
31
-
31
+ const [orderingTheme] = useOrderingTheme()
32
32
  const handleOnChange = (evt) => {
33
33
  if (evt.target.value === '') handleClickOption('all')
34
34
  else handleClickOption(evt.target.value)
35
35
  }
36
36
 
37
+ const showRanking = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.ranking?.hidden
38
+ const showReviewDate = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.review_date?.hidden
39
+ const showCustomerComments = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.customer_comments?.hidden
40
+ const showSearch = !orderingTheme?.theme?.business_view?.components?.reviews?.components?.search?.hidden
41
+ const hideElement = !(!showReviewDate && !showCustomerComments)
42
+
43
+ const reviewPoints = [t('TERRIBLE', 'Terrible'), t('BAD', 'Bad'), t('OKAY', 'Okay'), t('GOOD', 'Good'), t('GREAT', 'Great')]
44
+
37
45
  return (
38
46
  <>
39
47
  {props.beforeElements?.map((BeforeElement, i) => (
@@ -57,61 +65,81 @@ export const BusinessReviewsUI = (props) => {
57
65
  )
58
66
  }
59
67
  </ReviewsHeaderWrapper>
60
- <ReviewOf>
61
- {!reviewsList.loading
62
- ? (
63
- <SearchContainer>
64
- <input
65
- type='number'
66
- min='1'
67
- max='5'
68
- onChange={handleOnChange}
69
- placeholder={t('SEARCH', 'Search')}
70
- style={{ backgroundImage: `url(${theme?.images?.general?.searchIcon})` }}
71
- />
72
- </SearchContainer>
73
- )
74
- : <Skeleton width={200} height={30} />}
75
- </ReviewOf>
76
- <ReviewsProgressWrapper>
77
- <p>{t('REVIEW_ORDER', 'Review order')}</p>
78
- <ReviewsProgressContent>
79
- <ReviewsProgressBar style={{ width: `${(stars / 5) * 100}%` }} />
80
- <ReviewsMarkPoint style={{ left: theme.rtl ? 'initial' : '0', right: theme?.rtl ? '0' : 'initial' }}>{t('TERRIBLE', 'Terrible')}</ReviewsMarkPoint>
81
- <ReviewsMarkPoint style={{ left: theme.rtl ? 'initial' : '25%', right: theme?.rtl ? '25%' : 'initial' }}>{t('BAD', 'Bad')}</ReviewsMarkPoint>
82
- <ReviewsMarkPoint style={{ left: theme.rtl ? 'initial' : '50%', right: theme?.rtl ? '50%' : 'initial' }}>{t('OKAY', 'Okay')}</ReviewsMarkPoint>
83
- <ReviewsMarkPoint style={{ left: theme.rtl ? 'initial' : '75%', right: theme?.rtl ? '75%' : 'initial' }}>{t('GOOD', 'Good')}</ReviewsMarkPoint>
84
- <ReviewsMarkPoint style={{ left: theme.rtl ? '0' : 'initial', right: theme?.rtl ? 'initial' : '0' }}>{t('GREAT', 'Great')}</ReviewsMarkPoint>
85
- </ReviewsProgressContent>
86
- </ReviewsProgressWrapper>
87
- <Content id='content'>
88
- {!reviewsList.loading ? reviewsList?.reviews.map((review) => (
89
- <Review key={review.id} id='review'>
90
- <ReviewItemHeader>
91
- <ReviewTime>{moment(review?.created_at).format('LLL')}</ReviewTime>
92
- </ReviewItemHeader>
93
- <ReviewItemContent>{review?.comment}</ReviewItemContent>
94
- </Review>
95
- )) : (
96
- <>
97
- {[...Array(2)].map((item, i) => (
98
- <SkeletonContainer key={i}>
99
- <div>
100
- <Skeleton width={100} height={30} />
101
- <Skeleton width={100} />
102
- </div>
103
- <div>
104
- <Skeleton width={150} height={50} />
105
- </div>
106
- </SkeletonContainer>
107
- ))}
68
+ {showSearch && (
69
+ <ReviewOf>
70
+ {!reviewsList.loading
71
+ ? (
72
+ <SearchContainer>
73
+ <input
74
+ type='number'
75
+ min='1'
76
+ max='5'
77
+ onChange={handleOnChange}
78
+ placeholder={t('SEARCH', 'Search')}
79
+ style={{ backgroundImage: `url(${theme?.images?.general?.searchIcon})` }}
80
+ />
81
+ </SearchContainer>
82
+ )
83
+ : <Skeleton width={200} height={30} />}
84
+ </ReviewOf>
85
+ )}
86
+ {showRanking && (
87
+ <ReviewsProgressWrapper>
88
+ <p>{t('REVIEW_ORDER', 'Review order')}</p>
89
+ <ReviewsProgressContent>
90
+ <ReviewsProgressBar style={{ width: `${(stars / 5) * 100}%` }} />
91
+ {reviewPoints.map((reviewPoint, i) => {
92
+ const isLastReviewPoint = i === reviewPoints?.length - 1
93
+ return (
94
+ <ReviewsMarkPoint
95
+ key={i}
96
+ style={{
97
+ left: theme.rtl !== isLastReviewPoint ? 'initial' : `${25 * (isLastReviewPoint ? 0 : i)}%`,
98
+ right: theme.rtl !== isLastReviewPoint ? `${25 * (isLastReviewPoint ? 0 : i)}%` : 'initial'
99
+ }}
100
+ >
101
+ {reviewPoint}
102
+ </ReviewsMarkPoint>
103
+ )
104
+ })}
105
+ </ReviewsProgressContent>
106
+ </ReviewsProgressWrapper>
107
+ )}
108
+ {hideElement && (
109
+ <Content id='content'>
110
+ {!reviewsList.loading ? reviewsList?.reviews.map((review) => (
111
+ <Review key={review.id} id='review'>
112
+ {showReviewDate && (
113
+ <ReviewItemHeader>
114
+ <ReviewTime>{moment(review?.created_at).format('LLL')}</ReviewTime>
115
+ </ReviewItemHeader>
116
+ )}
117
+ {showCustomerComments && (
118
+ <ReviewItemContent>{review?.comment}</ReviewItemContent>
119
+ )}
120
+ </Review>
121
+ )) : (
122
+ <>
123
+ {[...Array(2)].map((item, i) => (
124
+ <SkeletonContainer key={i}>
125
+ <div>
126
+ <Skeleton width={100} height={30} />
127
+ <Skeleton width={100} />
128
+ </div>
129
+ <div>
130
+ <Skeleton width={150} height={50} />
131
+ </div>
132
+ </SkeletonContainer>
133
+ ))}
134
+
135
+ </>
136
+ )}
137
+ {!reviewsList.loading && reviewsList?.reviews.length === 0 && (
138
+ <ReviewsNotFound>{t('NO_REVIEWS', 'No reviews')}</ReviewsNotFound>
139
+ )}
140
+ </Content>
141
+ )}
108
142
 
109
- </>
110
- )}
111
- {!reviewsList.loading && reviewsList?.reviews.length === 0 && (
112
- <ReviewsNotFound>{t('NO_REVIEWS', 'No reviews')}</ReviewsNotFound>
113
- )}
114
- </Content>
115
143
  </>
116
144
  )}
117
145
  </BusinessReviewsContainer>